@pop-ui/core 0.1.0 → 0.1.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/core.css +1 -1
- package/dist/core.js +1226 -1011
- package/dist/core.umd.cjs +18 -18
- package/dist/types/index.d.ts +11 -2
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { notifications as
|
|
5
|
-
import { IconChevronRight as
|
|
6
|
-
import { DatePicker as
|
|
7
|
-
import
|
|
1
|
+
import { jsxs as x, jsx as l, Fragment as Ve } from "react/jsx-runtime";
|
|
2
|
+
import { Button as kt, Loader as Ge, Checkbox as Ct, Popover as ke, Input as J, Tooltip as fe, Select as Dt, Modal as xt, Stack as Pt, Group as Mt, Radio as bt, Autocomplete as St, SegmentedControl as Tt, Tabs as ce, Textarea as wt, ActionIcon as It, Switch as Lt, createTheme as Bt, MantineProvider as vt } from "@mantine/core";
|
|
3
|
+
import { useState as I, useMemo as Le, useCallback as H, useRef as oe, useEffect as X, createContext as Be, useContext as ve } from "react";
|
|
4
|
+
import { notifications as he, Notifications as Et } from "@mantine/notifications";
|
|
5
|
+
import { IconChevronRight as Ke, IconChevronLeft as Je, parseDateValue as Ne, formatDateDisplay as At, IconCalendar as Nt, toValueString as Ft, IconInfoCircle as Ee, IconChevronUp as Rt, IconChevronDown as $t, ColorGray900 as Ot, IconX as Ae, ColorGray600 as zt, IconXCircle as Ht, ColorAqua500 as Xe, IconDragMenu as Yt, IconPhoto as ue, IconSearch as Wt, IconClock as Zt, colors as qe, getCSSVariableName as jt, getCSSVariableRef as Q, IconMap as Ut, ColorGray800 as Vt, IconMapMarker as Gt } from "@pop-ui/foundation";
|
|
6
|
+
import { DatePicker as Kt, DateTimePicker as Jt, TimeInput as Xt } from "@mantine/dates";
|
|
7
|
+
import z from "dayjs";
|
|
8
8
|
import "dayjs/locale/ko";
|
|
9
|
-
import
|
|
10
|
-
import { useSensors as
|
|
11
|
-
import { useSortable as
|
|
12
|
-
import { Dropzone as
|
|
13
|
-
import
|
|
14
|
-
import { CSS as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
9
|
+
import qt from "dayjs/plugin/customParseFormat";
|
|
10
|
+
import { useSensors as Qt, useSensor as Fe, PointerSensor as er, KeyboardSensor as tr, DndContext as Qe, closestCenter as et } from "@dnd-kit/core";
|
|
11
|
+
import { useSortable as tt, defaultAnimateLayoutChanges as rt, sortableKeyboardCoordinates as rr, SortableContext as nt, rectSortingStrategy as ot } from "@dnd-kit/sortable";
|
|
12
|
+
import { Dropzone as nr, IMAGE_MIME_TYPE as Re } from "@mantine/dropzone";
|
|
13
|
+
import or from "react-easy-crop";
|
|
14
|
+
import { CSS as at } from "@dnd-kit/utilities";
|
|
15
|
+
import ar from "lottie-react";
|
|
16
|
+
const sr = {
|
|
17
17
|
sm: 14,
|
|
18
18
|
md: 16,
|
|
19
19
|
lg: 18
|
|
20
|
-
},
|
|
21
|
-
Button:
|
|
22
|
-
Button__Inner:
|
|
23
|
-
Button__Label:
|
|
24
|
-
Button__Section:
|
|
25
|
-
Button__Loader:
|
|
20
|
+
}, ir = "styles-module__Button___7ywU9", lr = "styles-module__Button__Inner___s7vuY", cr = "styles-module__Button__Label___xnZNh", _r = "styles-module__Button__Section___7GPRl", dr = "styles-module__Button__Loader___AZg1v", ur = "styles-module__Button__Disabled___NUWy8", Z = {
|
|
21
|
+
Button: ir,
|
|
22
|
+
Button__Inner: lr,
|
|
23
|
+
Button__Label: cr,
|
|
24
|
+
Button__Section: _r,
|
|
25
|
+
Button__Loader: dr,
|
|
26
26
|
"Button--Small": "styles-module__Button--Small___9VzCE",
|
|
27
27
|
"Button--Medium": "styles-module__Button--Medium___35lhd",
|
|
28
28
|
"Button--Large": "styles-module__Button--Large___fbUio",
|
|
29
29
|
"Button--Primary": "styles-module__Button--Primary___1ZKgs",
|
|
30
|
-
Button__Disabled:
|
|
30
|
+
Button__Disabled: ur,
|
|
31
31
|
"Button--PrimaryLine": "styles-module__Button--PrimaryLine___76iyF",
|
|
32
32
|
"Button--Basic": "styles-module__Button--Basic___sWKzj",
|
|
33
33
|
"Button--Warning": "styles-module__Button--Warning___8gZ6-",
|
|
34
34
|
"Button--Setting": "styles-module__Button--Setting___KNjZA",
|
|
35
35
|
"Button--Danger": "styles-module__Button--Danger___m9tbm",
|
|
36
36
|
"Button--Ghost": "styles-module__Button--Ghost___-zzS-"
|
|
37
|
-
},
|
|
38
|
-
inner:
|
|
39
|
-
label:
|
|
40
|
-
section:
|
|
41
|
-
loader:
|
|
42
|
-
},
|
|
43
|
-
sm:
|
|
44
|
-
md:
|
|
45
|
-
lg:
|
|
46
|
-
},
|
|
47
|
-
primary:
|
|
48
|
-
primaryLine:
|
|
49
|
-
basic:
|
|
50
|
-
danger:
|
|
51
|
-
setting:
|
|
52
|
-
warning:
|
|
53
|
-
ghost:
|
|
54
|
-
},
|
|
37
|
+
}, Ce = {
|
|
38
|
+
inner: Z.Button__Inner,
|
|
39
|
+
label: Z.Button__Label,
|
|
40
|
+
section: Z.Button__Section,
|
|
41
|
+
loader: Z.Button__Loader
|
|
42
|
+
}, mr = {
|
|
43
|
+
sm: Z["Button--Small"],
|
|
44
|
+
md: Z["Button--Medium"],
|
|
45
|
+
lg: Z["Button--Large"]
|
|
46
|
+
}, pr = {
|
|
47
|
+
primary: Z["Button--Primary"],
|
|
48
|
+
primaryLine: Z["Button--PrimaryLine"],
|
|
49
|
+
basic: Z["Button--Basic"],
|
|
50
|
+
danger: Z["Button--Danger"],
|
|
51
|
+
setting: Z["Button--Setting"],
|
|
52
|
+
warning: Z["Button--Warning"],
|
|
53
|
+
ghost: Z["Button--Ghost"]
|
|
54
|
+
}, fr = (...e) => e.filter(Boolean).join(" ") || void 0, hr = (e) => {
|
|
55
55
|
const r = (n, t) => {
|
|
56
56
|
const o = Object.keys(n).reduce((s, a) => {
|
|
57
57
|
const i = a, c = [n[i], t[i]].filter(Boolean).join(" ");
|
|
@@ -62,9 +62,9 @@ const Qt = {
|
|
|
62
62
|
!(a in n) && t[a] && (o[a] = t[a]);
|
|
63
63
|
}), o;
|
|
64
64
|
};
|
|
65
|
-
return typeof e == "function" ? (n, t, o) => r(
|
|
65
|
+
return typeof e == "function" ? (n, t, o) => r(Ce, e(n, t, o)) : typeof e == "object" && e !== null && !Array.isArray(e) ? r(Ce, e) : Ce;
|
|
66
66
|
};
|
|
67
|
-
function
|
|
67
|
+
function me({
|
|
68
68
|
children: e,
|
|
69
69
|
size: r = "md",
|
|
70
70
|
variant: n = "primary",
|
|
@@ -74,47 +74,47 @@ function le({
|
|
|
74
74
|
className: a,
|
|
75
75
|
classNames: i,
|
|
76
76
|
loaderProps: c,
|
|
77
|
-
...
|
|
77
|
+
...p
|
|
78
78
|
}) {
|
|
79
|
-
const d =
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
79
|
+
const d = sr[r], _ = t, u = s || _;
|
|
80
|
+
return /* @__PURE__ */ x(
|
|
81
|
+
kt,
|
|
82
82
|
{
|
|
83
83
|
type: "button",
|
|
84
84
|
unstyled: !0,
|
|
85
|
-
className:
|
|
86
|
-
|
|
87
|
-
s ?
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
className: fr(
|
|
86
|
+
Z.Button,
|
|
87
|
+
s ? Z.Button__Disabled : "",
|
|
88
|
+
mr[r],
|
|
89
|
+
pr[n],
|
|
90
90
|
a
|
|
91
91
|
),
|
|
92
|
-
classNames:
|
|
93
|
-
...
|
|
94
|
-
disabled:
|
|
92
|
+
classNames: hr(i),
|
|
93
|
+
...p,
|
|
94
|
+
disabled: u,
|
|
95
95
|
children: [
|
|
96
|
-
_ && /* @__PURE__ */ l(
|
|
97
|
-
/* @__PURE__ */ l("span", { className:
|
|
96
|
+
_ && /* @__PURE__ */ l(Ge, { color: "currentColor", size: d, ...c }),
|
|
97
|
+
/* @__PURE__ */ l("span", { className: Z.Button__Label, children: _ && o ? null : e })
|
|
98
98
|
]
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const De = {
|
|
103
103
|
"Checkbox--Small": "styles-module__Checkbox--Small___VZGlw",
|
|
104
104
|
"Checkbox--Medium": "styles-module__Checkbox--Medium___Vwpa3",
|
|
105
105
|
"Checkbox--Large": "styles-module__Checkbox--Large___ybTGE"
|
|
106
|
-
},
|
|
107
|
-
sm:
|
|
108
|
-
md:
|
|
109
|
-
lg:
|
|
110
|
-
},
|
|
106
|
+
}, gr = {
|
|
107
|
+
sm: De["Checkbox--Small"],
|
|
108
|
+
md: De["Checkbox--Medium"],
|
|
109
|
+
lg: De["Checkbox--Large"]
|
|
110
|
+
}, yr = {
|
|
111
111
|
sm: 18,
|
|
112
112
|
md: 24,
|
|
113
113
|
lg: 32
|
|
114
|
-
},
|
|
115
|
-
const n =
|
|
114
|
+
}, sa = ({ size: e = "md", ...r }) => {
|
|
115
|
+
const n = gr[e], t = yr[e];
|
|
116
116
|
return /* @__PURE__ */ l(
|
|
117
|
-
|
|
117
|
+
Ct,
|
|
118
118
|
{
|
|
119
119
|
className: n,
|
|
120
120
|
size: e,
|
|
@@ -127,51 +127,51 @@ const me = {
|
|
|
127
127
|
...r
|
|
128
128
|
}
|
|
129
129
|
);
|
|
130
|
-
},
|
|
131
|
-
CalendarDatePicker__Wrapper:
|
|
132
|
-
CalendarDatePicker__DayContent:
|
|
133
|
-
CalendarDatePicker__DayLabel:
|
|
134
|
-
CalendarDatePicker__TodayIndicator:
|
|
135
|
-
CalendarDatePicker__Day:
|
|
136
|
-
CalendarDatePicker__Header:
|
|
137
|
-
CalendarDatePicker__HeaderLevel:
|
|
138
|
-
CalendarDatePicker__HeaderControl:
|
|
139
|
-
CalendarDatePicker__HeaderControlIcon:
|
|
140
|
-
CalendarDatePicker__Month:
|
|
141
|
-
CalendarDatePicker__MonthRow:
|
|
142
|
-
CalendarDatePicker__MonthCell:
|
|
143
|
-
CalendarDatePicker__WeekdaysRow:
|
|
144
|
-
CalendarDatePicker__Weekday:
|
|
145
|
-
},
|
|
130
|
+
}, kr = "styles-module__CalendarDatePicker__Wrapper___n4ux3", Cr = "styles-module__CalendarDatePicker__DayContent___2xr8Q", Dr = "styles-module__CalendarDatePicker__DayLabel___-4E1W", xr = "styles-module__CalendarDatePicker__TodayIndicator___ij6hs", Pr = "styles-module__CalendarDatePicker__Day___eYyiw", Mr = "styles-module__CalendarDatePicker__Header___hGYbK", br = "styles-module__CalendarDatePicker__HeaderLevel___yuhOQ", Sr = "styles-module__CalendarDatePicker__HeaderControl___gz5tC", Tr = "styles-module__CalendarDatePicker__HeaderControlIcon___OVuQp", wr = "styles-module__CalendarDatePicker__Month___8-Nvy", Ir = "styles-module__CalendarDatePicker__MonthRow___PihZV", Lr = "styles-module__CalendarDatePicker__MonthCell___bEPui", Br = "styles-module__CalendarDatePicker__WeekdaysRow___lbdgy", vr = "styles-module__CalendarDatePicker__Weekday___-Seq9", G = {
|
|
131
|
+
CalendarDatePicker__Wrapper: kr,
|
|
132
|
+
CalendarDatePicker__DayContent: Cr,
|
|
133
|
+
CalendarDatePicker__DayLabel: Dr,
|
|
134
|
+
CalendarDatePicker__TodayIndicator: xr,
|
|
135
|
+
CalendarDatePicker__Day: Pr,
|
|
136
|
+
CalendarDatePicker__Header: Mr,
|
|
137
|
+
CalendarDatePicker__HeaderLevel: br,
|
|
138
|
+
CalendarDatePicker__HeaderControl: Sr,
|
|
139
|
+
CalendarDatePicker__HeaderControlIcon: Tr,
|
|
140
|
+
CalendarDatePicker__Month: wr,
|
|
141
|
+
CalendarDatePicker__MonthRow: Ir,
|
|
142
|
+
CalendarDatePicker__MonthCell: Lr,
|
|
143
|
+
CalendarDatePicker__WeekdaysRow: Br,
|
|
144
|
+
CalendarDatePicker__Weekday: vr
|
|
145
|
+
}, Er = ({
|
|
146
146
|
excludedDays: e = [],
|
|
147
147
|
excludedDates: r = []
|
|
148
148
|
}) => {
|
|
149
149
|
const n = [], t = [];
|
|
150
150
|
for (const a of r)
|
|
151
151
|
typeof a == "string" ? n.push(a) : t.push(a);
|
|
152
|
-
const o = n.map((a) =>
|
|
152
|
+
const o = n.map((a) => z(a)).filter((a) => a.isValid()).map((a) => a.format("YYYY-MM-DD")), s = t.map(([a, i]) => [z(a), z(i)]).filter(([a, i]) => a.isValid() && i.isValid());
|
|
153
153
|
return (a) => {
|
|
154
|
-
const i =
|
|
154
|
+
const i = z(a);
|
|
155
155
|
if (!i.isValid()) return !1;
|
|
156
156
|
if (Array.isArray(e) && e.includes(i.day()) || o.includes(i.format("YYYY-MM-DD")))
|
|
157
157
|
return !0;
|
|
158
|
-
for (const [c,
|
|
159
|
-
if ((i.isSame(c, "day") || i.isAfter(c, "day")) && (i.isSame(
|
|
158
|
+
for (const [c, p] of s)
|
|
159
|
+
if ((i.isSame(c, "day") || i.isAfter(c, "day")) && (i.isSame(p, "day") || i.isBefore(p, "day")))
|
|
160
160
|
return !0;
|
|
161
161
|
return !1;
|
|
162
162
|
};
|
|
163
|
-
},
|
|
164
|
-
const o =
|
|
163
|
+
}, Ar = (e, r, n, t) => {
|
|
164
|
+
const o = z(e), s = z(r);
|
|
165
165
|
for (const a of n)
|
|
166
166
|
if (Array.isArray(a)) {
|
|
167
|
-
const i =
|
|
167
|
+
const i = z(a[0]), c = z(a[1]);
|
|
168
168
|
if (!i.isValid() || !c.isValid()) continue;
|
|
169
169
|
if (!(s.isBefore(i, "day") || o.isAfter(c, "day")))
|
|
170
170
|
return !0;
|
|
171
171
|
}
|
|
172
172
|
for (const a of n)
|
|
173
173
|
if (typeof a == "string") {
|
|
174
|
-
const i =
|
|
174
|
+
const i = z(a);
|
|
175
175
|
if (!i.isValid()) continue;
|
|
176
176
|
if ((i.isSame(o, "day") || i.isAfter(o, "day")) && (i.isSame(s, "day") || i.isBefore(s, "day")))
|
|
177
177
|
return !0;
|
|
@@ -185,7 +185,7 @@ const me = {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
return !1;
|
|
188
|
-
},
|
|
188
|
+
}, ne = (e = "default") => {
|
|
189
189
|
switch (e) {
|
|
190
190
|
case "range":
|
|
191
191
|
return [null, null];
|
|
@@ -194,15 +194,15 @@ const me = {
|
|
|
194
194
|
default:
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, $e = (e = "default", r) => r == null ? ne(e) : e === "range" ? Array.isArray(r) ? r : ne("range") : e === "multiple" ? Array.isArray(r) ? r : ne("multiple") : Array.isArray(r) ? r[0] ?? null : r, st = ({
|
|
198
198
|
type: e,
|
|
199
199
|
externalValue: r,
|
|
200
200
|
internalValue: n
|
|
201
|
-
}) => r !== void 0 ?
|
|
201
|
+
}) => r !== void 0 ? $e(e, r) : n !== void 0 ? $e(e, n) : ne(e), we = (e, r) => {
|
|
202
202
|
const n = (t, o) => {
|
|
203
203
|
const s = Object.keys(t).reduce(
|
|
204
204
|
(a, i) => {
|
|
205
|
-
const c = i,
|
|
205
|
+
const c = i, p = t[c], d = o[c], _ = [p, d].filter(Boolean).join(" ");
|
|
206
206
|
return _ && (a[c] = _), a;
|
|
207
207
|
},
|
|
208
208
|
{}
|
|
@@ -213,31 +213,31 @@ const me = {
|
|
|
213
213
|
}), s;
|
|
214
214
|
};
|
|
215
215
|
return typeof r == "function" ? (t, o, s) => n(e, r(t, o, s)) : typeof r == "object" && r !== null && !Array.isArray(r) ? n(e, r) : e;
|
|
216
|
-
},
|
|
216
|
+
}, Nr = (e) => {
|
|
217
217
|
if (e == null)
|
|
218
218
|
return null;
|
|
219
219
|
if (Array.isArray(e)) {
|
|
220
220
|
for (let r = e.length - 1; r >= 0; r -= 1) {
|
|
221
221
|
const n = e[r];
|
|
222
222
|
if (n instanceof Date)
|
|
223
|
-
return
|
|
223
|
+
return z(n).format("YYYY-MM-DD");
|
|
224
224
|
}
|
|
225
225
|
return null;
|
|
226
226
|
}
|
|
227
|
-
return e instanceof Date ?
|
|
228
|
-
},
|
|
229
|
-
levelsGroup:
|
|
230
|
-
calendarHeader:
|
|
231
|
-
calendarHeaderLevel:
|
|
232
|
-
calendarHeaderControl:
|
|
233
|
-
calendarHeaderControlIcon:
|
|
234
|
-
month:
|
|
235
|
-
monthCell:
|
|
236
|
-
day:
|
|
237
|
-
monthRow:
|
|
238
|
-
weekdaysRow:
|
|
239
|
-
weekday:
|
|
240
|
-
},
|
|
227
|
+
return e instanceof Date ? z(e).format("YYYY-MM-DD") : null;
|
|
228
|
+
}, Fr = {
|
|
229
|
+
levelsGroup: G.CalendarDatePicker__Wrapper,
|
|
230
|
+
calendarHeader: G.CalendarDatePicker__Header,
|
|
231
|
+
calendarHeaderLevel: G.CalendarDatePicker__HeaderLevel,
|
|
232
|
+
calendarHeaderControl: G.CalendarDatePicker__HeaderControl,
|
|
233
|
+
calendarHeaderControlIcon: G.CalendarDatePicker__HeaderControlIcon,
|
|
234
|
+
month: G.CalendarDatePicker__Month,
|
|
235
|
+
monthCell: G.CalendarDatePicker__MonthCell,
|
|
236
|
+
day: G.CalendarDatePicker__Day,
|
|
237
|
+
monthRow: G.CalendarDatePicker__MonthRow,
|
|
238
|
+
weekdaysRow: G.CalendarDatePicker__WeekdaysRow,
|
|
239
|
+
weekday: G.CalendarDatePicker__Weekday
|
|
240
|
+
}, Rr = ({
|
|
241
241
|
excludedDates: e = [],
|
|
242
242
|
excludedDays: r = [],
|
|
243
243
|
type: n = "default",
|
|
@@ -246,133 +246,133 @@ const me = {
|
|
|
246
246
|
highlightToday: s = !1,
|
|
247
247
|
...a
|
|
248
248
|
}) => {
|
|
249
|
-
const { classNames: i, date: c, defaultDate:
|
|
250
|
-
() => t ??
|
|
251
|
-
), [h,
|
|
252
|
-
() =>
|
|
249
|
+
const { classNames: i, date: c, defaultDate: p, onDateChange: d, getDayProps: _, ...u } = a, [m, f] = I(
|
|
250
|
+
() => t ?? ne(n)
|
|
251
|
+
), [h, g] = I(() => c || p || (Nr(t ?? ne(n)) ?? /* @__PURE__ */ new Date())), y = Le(
|
|
252
|
+
() => Er({
|
|
253
253
|
excludedDays: r,
|
|
254
254
|
excludedDates: e
|
|
255
255
|
}),
|
|
256
256
|
[r, e]
|
|
257
|
-
),
|
|
258
|
-
(
|
|
259
|
-
c === void 0 &&
|
|
257
|
+
), C = H(
|
|
258
|
+
(k) => {
|
|
259
|
+
c === void 0 && g(k), d?.(k);
|
|
260
260
|
},
|
|
261
261
|
[c, d]
|
|
262
|
-
),
|
|
263
|
-
if (n === "range" && Array.isArray(
|
|
264
|
-
const [
|
|
265
|
-
if (
|
|
266
|
-
const
|
|
267
|
-
f(
|
|
262
|
+
), M = (k) => {
|
|
263
|
+
if (n === "range" && Array.isArray(k) && k.length === 2) {
|
|
264
|
+
const [L, N] = k;
|
|
265
|
+
if (L && N && Ar(L, N, e, r)) {
|
|
266
|
+
const S = ne("range");
|
|
267
|
+
f(S), o?.(S);
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
f(
|
|
272
|
-
},
|
|
271
|
+
f(k), o?.(k);
|
|
272
|
+
}, F = st({
|
|
273
273
|
type: n,
|
|
274
274
|
externalValue: t,
|
|
275
|
-
internalValue:
|
|
276
|
-
}),
|
|
277
|
-
(
|
|
278
|
-
const
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */ l("span", { className:
|
|
281
|
-
|
|
275
|
+
internalValue: m
|
|
276
|
+
}), E = H(
|
|
277
|
+
(k) => {
|
|
278
|
+
const L = z(k).date(), S = z(k).isSame(z(), "day") && s;
|
|
279
|
+
return /* @__PURE__ */ x("span", { className: G.CalendarDatePicker__DayContent, children: [
|
|
280
|
+
/* @__PURE__ */ l("span", { className: G.CalendarDatePicker__DayLabel, children: L }),
|
|
281
|
+
S && /* @__PURE__ */ l("span", { className: G.CalendarDatePicker__TodayIndicator, children: "오늘" })
|
|
282
282
|
] });
|
|
283
283
|
},
|
|
284
284
|
[s]
|
|
285
|
-
),
|
|
286
|
-
(
|
|
287
|
-
const
|
|
285
|
+
), Y = we(Fr, i), R = c ?? h, w = z(R ?? /* @__PURE__ */ new Date()).format("YYYY-MM"), P = H(
|
|
286
|
+
(k) => {
|
|
287
|
+
const L = _?.(k) ?? {}, N = z(k).format("YYYY-MM") !== w;
|
|
288
288
|
return {
|
|
289
|
-
...
|
|
290
|
-
onClick: (
|
|
291
|
-
|
|
289
|
+
...L,
|
|
290
|
+
onClick: (S) => {
|
|
291
|
+
L.onClick?.(S), N && C(k);
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
},
|
|
295
|
-
[
|
|
295
|
+
[w, _, C]
|
|
296
296
|
);
|
|
297
297
|
return /* @__PURE__ */ l(
|
|
298
|
-
|
|
298
|
+
Kt,
|
|
299
299
|
{
|
|
300
300
|
locale: "ko",
|
|
301
301
|
firstDayOfWeek: 0,
|
|
302
302
|
monthLabelFormat: "YYYY년 M월",
|
|
303
303
|
maxLevel: "month",
|
|
304
304
|
type: n,
|
|
305
|
-
previousIcon: /* @__PURE__ */ l(
|
|
306
|
-
nextIcon: /* @__PURE__ */ l(
|
|
307
|
-
...
|
|
305
|
+
previousIcon: /* @__PURE__ */ l(Je, {}),
|
|
306
|
+
nextIcon: /* @__PURE__ */ l(Ke, {}),
|
|
307
|
+
...u,
|
|
308
308
|
size: "lg",
|
|
309
|
-
onChange:
|
|
309
|
+
onChange: M,
|
|
310
310
|
weekendDays: [0],
|
|
311
311
|
highlightToday: s,
|
|
312
|
-
classNames:
|
|
313
|
-
defaultDate: c === void 0 ?
|
|
314
|
-
date:
|
|
315
|
-
onDateChange:
|
|
316
|
-
getDayProps:
|
|
317
|
-
value:
|
|
318
|
-
excludeDate:
|
|
319
|
-
renderDay:
|
|
312
|
+
classNames: Y,
|
|
313
|
+
defaultDate: c === void 0 ? p : void 0,
|
|
314
|
+
date: R,
|
|
315
|
+
onDateChange: C,
|
|
316
|
+
getDayProps: P,
|
|
317
|
+
value: F,
|
|
318
|
+
excludeDate: y,
|
|
319
|
+
renderDay: E
|
|
320
320
|
}
|
|
321
321
|
);
|
|
322
|
-
},
|
|
323
|
-
DatePickerBase:
|
|
324
|
-
DatePickerRoot:
|
|
322
|
+
}, $r = "styles-module__DatePickerBase___yJlGe", Or = "styles-module__DatePickerRoot___HG6Zb", zr = "styles-module__DatePicker__Wrapper___7X5ke", Hr = "styles-module__DatePicker__Input___sTaqF", Yr = "styles-module__DatePicker__Placeholder___PZnzX", Wr = "styles-module__DatePicker__Section___waCJM", Zr = "styles-module__DatePicker__Icon___fceRx", jr = "styles-module__DatePicker__Dropdown___Iy9KE", Ur = "styles-module__DatePicker__DropdownArrow___zeIIm", Vr = "styles-module__DatePicker__Root___2Q8qm", Gr = "styles-module__DatePicker__LevelsGroup___lrWsl", Kr = "styles-module__DatePicker__CalendarHeader___VI-Of", Jr = "styles-module__DatePicker__CalendarHeaderLevel___F4DtE", Xr = "styles-module__DatePicker__CalendarHeaderControl___72yIl", qr = "styles-module__DatePicker__CalendarHeaderControlIcon___CnQei", Qr = "styles-module__DatePicker__Month___W7LuG", en = "styles-module__DatePicker__WeekdaysRow___4NdYk", tn = "styles-module__DatePicker__Weekday___tL-rR", rn = "styles-module__DatePicker__MonthRow___NSs67", nn = "styles-module__DatePicker__MonthCell___iGYhy", on = "styles-module__DatePicker__Day___7LDrl", an = "styles-module__DatePicker__TimeWrapper___BlHZZ", sn = "styles-module__DatePicker__TimeInput___Acg-L", ln = "styles-module__DatePicker__SubmitButton___6DvfS", b = {
|
|
323
|
+
DatePickerBase: $r,
|
|
324
|
+
DatePickerRoot: Or,
|
|
325
325
|
"DatePicker--Small": "styles-module__DatePicker--Small___m8asv",
|
|
326
326
|
"DatePicker--Medium": "styles-module__DatePicker--Medium___Po2-B",
|
|
327
327
|
"DatePicker--Large": "styles-module__DatePicker--Large___oQ6EM",
|
|
328
|
-
DatePicker__Wrapper:
|
|
329
|
-
DatePicker__Input:
|
|
330
|
-
DatePicker__Placeholder:
|
|
331
|
-
DatePicker__Section:
|
|
332
|
-
DatePicker__Icon:
|
|
333
|
-
DatePicker__Dropdown:
|
|
334
|
-
DatePicker__DropdownArrow:
|
|
335
|
-
DatePicker__Root:
|
|
336
|
-
DatePicker__LevelsGroup:
|
|
337
|
-
DatePicker__CalendarHeader:
|
|
338
|
-
DatePicker__CalendarHeaderLevel:
|
|
339
|
-
DatePicker__CalendarHeaderControl:
|
|
340
|
-
DatePicker__CalendarHeaderControlIcon:
|
|
341
|
-
DatePicker__Month:
|
|
342
|
-
DatePicker__WeekdaysRow:
|
|
343
|
-
DatePicker__Weekday:
|
|
344
|
-
DatePicker__MonthRow:
|
|
345
|
-
DatePicker__MonthCell:
|
|
346
|
-
DatePicker__Day:
|
|
347
|
-
DatePicker__TimeWrapper:
|
|
348
|
-
DatePicker__TimeInput:
|
|
349
|
-
DatePicker__SubmitButton:
|
|
328
|
+
DatePicker__Wrapper: zr,
|
|
329
|
+
DatePicker__Input: Hr,
|
|
330
|
+
DatePicker__Placeholder: Yr,
|
|
331
|
+
DatePicker__Section: Wr,
|
|
332
|
+
DatePicker__Icon: Zr,
|
|
333
|
+
DatePicker__Dropdown: jr,
|
|
334
|
+
DatePicker__DropdownArrow: Ur,
|
|
335
|
+
DatePicker__Root: Vr,
|
|
336
|
+
DatePicker__LevelsGroup: Gr,
|
|
337
|
+
DatePicker__CalendarHeader: Kr,
|
|
338
|
+
DatePicker__CalendarHeaderLevel: Jr,
|
|
339
|
+
DatePicker__CalendarHeaderControl: Xr,
|
|
340
|
+
DatePicker__CalendarHeaderControlIcon: qr,
|
|
341
|
+
DatePicker__Month: Qr,
|
|
342
|
+
DatePicker__WeekdaysRow: en,
|
|
343
|
+
DatePicker__Weekday: tn,
|
|
344
|
+
DatePicker__MonthRow: rn,
|
|
345
|
+
DatePicker__MonthCell: nn,
|
|
346
|
+
DatePicker__Day: on,
|
|
347
|
+
DatePicker__TimeWrapper: an,
|
|
348
|
+
DatePicker__TimeInput: sn,
|
|
349
|
+
DatePicker__SubmitButton: ln
|
|
350
350
|
};
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
wrapper:
|
|
354
|
-
input:
|
|
355
|
-
section:
|
|
356
|
-
placeholder:
|
|
357
|
-
datePickerRoot:
|
|
358
|
-
levelsGroup:
|
|
359
|
-
calendarHeader:
|
|
360
|
-
calendarHeaderLevel:
|
|
361
|
-
calendarHeaderControl:
|
|
362
|
-
calendarHeaderControlIcon:
|
|
363
|
-
month:
|
|
364
|
-
weekdaysRow:
|
|
365
|
-
weekday:
|
|
366
|
-
monthRow:
|
|
367
|
-
monthCell:
|
|
368
|
-
day:
|
|
369
|
-
timeWrapper:
|
|
370
|
-
timeInput:
|
|
371
|
-
submitButton:
|
|
372
|
-
},
|
|
373
|
-
dropdown:
|
|
374
|
-
arrow:
|
|
375
|
-
},
|
|
351
|
+
z.extend(qt);
|
|
352
|
+
const cn = {
|
|
353
|
+
wrapper: b.DatePicker__Wrapper,
|
|
354
|
+
input: b.DatePicker__Input,
|
|
355
|
+
section: b.DatePicker__Section,
|
|
356
|
+
placeholder: b.DatePicker__Placeholder,
|
|
357
|
+
datePickerRoot: b.DatePicker__Root,
|
|
358
|
+
levelsGroup: b.DatePicker__LevelsGroup,
|
|
359
|
+
calendarHeader: b.DatePicker__CalendarHeader,
|
|
360
|
+
calendarHeaderLevel: b.DatePicker__CalendarHeaderLevel,
|
|
361
|
+
calendarHeaderControl: b.DatePicker__CalendarHeaderControl,
|
|
362
|
+
calendarHeaderControlIcon: b.DatePicker__CalendarHeaderControlIcon,
|
|
363
|
+
month: b.DatePicker__Month,
|
|
364
|
+
weekdaysRow: b.DatePicker__WeekdaysRow,
|
|
365
|
+
weekday: b.DatePicker__Weekday,
|
|
366
|
+
monthRow: b.DatePicker__MonthRow,
|
|
367
|
+
monthCell: b.DatePicker__MonthCell,
|
|
368
|
+
day: b.DatePicker__Day,
|
|
369
|
+
timeWrapper: b.DatePicker__TimeWrapper,
|
|
370
|
+
timeInput: b.DatePicker__TimeInput,
|
|
371
|
+
submitButton: b.DatePicker__SubmitButton
|
|
372
|
+
}, _n = {
|
|
373
|
+
dropdown: b.DatePicker__Dropdown,
|
|
374
|
+
arrow: b.DatePicker__DropdownArrow
|
|
375
|
+
}, Oe = (...e) => e.filter(Boolean).join(" ") || void 0, _e = (e) => {
|
|
376
376
|
if (e == null) return null;
|
|
377
377
|
if (e instanceof Date) return e;
|
|
378
378
|
if (typeof e == "string" && e) {
|
|
@@ -381,7 +381,7 @@ const tn = {
|
|
|
381
381
|
return new Date(r[0], r[1] - 1, r[2]);
|
|
382
382
|
}
|
|
383
383
|
return null;
|
|
384
|
-
},
|
|
384
|
+
}, ia = ({
|
|
385
385
|
size: e = "md",
|
|
386
386
|
type: r = "default",
|
|
387
387
|
withTime: n,
|
|
@@ -391,43 +391,43 @@ const tn = {
|
|
|
391
391
|
rightSectionWidth: a,
|
|
392
392
|
value: i,
|
|
393
393
|
defaultValue: c,
|
|
394
|
-
onChange:
|
|
394
|
+
onChange: p,
|
|
395
395
|
placeholder: d,
|
|
396
396
|
disabled: _,
|
|
397
|
-
minDate:
|
|
398
|
-
maxDate:
|
|
397
|
+
minDate: u,
|
|
398
|
+
maxDate: m,
|
|
399
399
|
displayValueFormat: f = "YYYY년 MM월 DD일",
|
|
400
400
|
valueFormat: h,
|
|
401
|
-
excludedDates:
|
|
402
|
-
excludedDays:
|
|
403
|
-
highlightToday:
|
|
401
|
+
excludedDates: g,
|
|
402
|
+
excludedDays: y,
|
|
403
|
+
highlightToday: C
|
|
404
404
|
}) => {
|
|
405
|
-
const
|
|
406
|
-
() =>
|
|
405
|
+
const M = h ?? (n ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD"), [F, E] = I(!1), [Y, R] = I(
|
|
406
|
+
() => Ne(i ?? c, r, M) ?? ne(r)
|
|
407
407
|
);
|
|
408
|
-
let
|
|
409
|
-
e === "sm" ? (
|
|
410
|
-
const
|
|
411
|
-
|
|
408
|
+
let w = b["DatePicker--Medium"], P = 18, k = 42;
|
|
409
|
+
e === "sm" ? (w = b["DatePicker--Small"], P = 14, k = 34) : e === "lg" && (w = b["DatePicker--Large"], P = 24, k = 50);
|
|
410
|
+
const L = we(
|
|
411
|
+
_n,
|
|
412
412
|
o?.classNames
|
|
413
|
-
),
|
|
413
|
+
), N = s ?? /* @__PURE__ */ l("span", { "aria-hidden": "true", className: b.DatePicker__Icon, children: /* @__PURE__ */ l(Nt, { size: P }) });
|
|
414
414
|
if (n) {
|
|
415
|
-
const
|
|
416
|
-
if (!
|
|
417
|
-
const
|
|
418
|
-
return
|
|
419
|
-
},
|
|
415
|
+
const B = (D) => {
|
|
416
|
+
if (!D) return null;
|
|
417
|
+
const A = z(D, M, !0);
|
|
418
|
+
return A.isValid() ? A.toDate() : null;
|
|
419
|
+
}, O = i !== void 0, U = O ? B(i) : null, T = B(c);
|
|
420
420
|
return /* @__PURE__ */ l(
|
|
421
|
-
|
|
421
|
+
Jt,
|
|
422
422
|
{
|
|
423
|
-
className:
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
className: Oe(
|
|
424
|
+
b.DatePickerBase,
|
|
425
|
+
b.DatePickerRoot,
|
|
426
|
+
w,
|
|
427
427
|
t
|
|
428
428
|
),
|
|
429
|
-
classNames:
|
|
430
|
-
|
|
429
|
+
classNames: we(
|
|
430
|
+
cn,
|
|
431
431
|
void 0
|
|
432
432
|
),
|
|
433
433
|
size: e,
|
|
@@ -435,8 +435,8 @@ const tn = {
|
|
|
435
435
|
firstDayOfWeek: 0,
|
|
436
436
|
monthLabelFormat: "YYYY년 MM월",
|
|
437
437
|
valueFormat: "YYYY-MM-DD | a hh:mm",
|
|
438
|
-
rightSection:
|
|
439
|
-
rightSectionWidth: a ??
|
|
438
|
+
rightSection: N,
|
|
439
|
+
rightSectionWidth: a ?? k,
|
|
440
440
|
popoverProps: {
|
|
441
441
|
offset: 8,
|
|
442
442
|
position: "bottom-start",
|
|
@@ -444,90 +444,90 @@ const tn = {
|
|
|
444
444
|
arrowSize: 10,
|
|
445
445
|
arrowOffset: 20,
|
|
446
446
|
...o,
|
|
447
|
-
classNames:
|
|
447
|
+
classNames: L
|
|
448
448
|
},
|
|
449
|
-
value:
|
|
450
|
-
defaultValue:
|
|
451
|
-
onChange: (
|
|
452
|
-
|
|
449
|
+
value: O ? U : void 0,
|
|
450
|
+
defaultValue: O ? void 0 : T,
|
|
451
|
+
onChange: (D) => {
|
|
452
|
+
p?.(D ? z(D).format(M) : null);
|
|
453
453
|
},
|
|
454
454
|
placeholder: d,
|
|
455
455
|
disabled: _,
|
|
456
|
-
minDate:
|
|
457
|
-
maxDate:
|
|
456
|
+
minDate: u,
|
|
457
|
+
maxDate: m
|
|
458
458
|
}
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const S = i != null ? Ne(i, r, M) : void 0, v = st({
|
|
462
462
|
type: r,
|
|
463
|
-
externalValue:
|
|
464
|
-
internalValue:
|
|
465
|
-
}),
|
|
466
|
-
|
|
463
|
+
externalValue: S,
|
|
464
|
+
internalValue: Y
|
|
465
|
+
}), $ = At(
|
|
466
|
+
v,
|
|
467
467
|
r,
|
|
468
468
|
f
|
|
469
|
-
),
|
|
470
|
-
let
|
|
471
|
-
if (r === "range" && Array.isArray(
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
} else r === "multiple" && Array.isArray(
|
|
475
|
-
|
|
469
|
+
), j = (B) => {
|
|
470
|
+
let O;
|
|
471
|
+
if (r === "range" && Array.isArray(B)) {
|
|
472
|
+
const U = B;
|
|
473
|
+
O = [_e(U[0] ?? null), _e(U[1] ?? null)];
|
|
474
|
+
} else r === "multiple" && Array.isArray(B) ? O = B.map((U) => _e(U)).filter((U) => U !== null) : O = _e(B);
|
|
475
|
+
R(O), p?.(Ft(O, r, M)), r === "default" && O != null && E(!1), r === "range" && Array.isArray(O) && O[0] && O[1] && E(!1);
|
|
476
476
|
};
|
|
477
477
|
return /* @__PURE__ */ l(
|
|
478
478
|
"div",
|
|
479
479
|
{
|
|
480
|
-
className:
|
|
481
|
-
children: /* @__PURE__ */
|
|
482
|
-
|
|
480
|
+
className: Oe(b.DatePickerBase, b.DatePickerRoot, w, t),
|
|
481
|
+
children: /* @__PURE__ */ x(
|
|
482
|
+
ke,
|
|
483
483
|
{
|
|
484
|
-
opened:
|
|
485
|
-
onClose: () =>
|
|
484
|
+
opened: F,
|
|
485
|
+
onClose: () => E(!1),
|
|
486
486
|
offset: 8,
|
|
487
487
|
position: "bottom-start",
|
|
488
488
|
withArrow: !0,
|
|
489
489
|
arrowSize: 10,
|
|
490
490
|
arrowOffset: 20,
|
|
491
491
|
...o,
|
|
492
|
-
classNames:
|
|
492
|
+
classNames: L,
|
|
493
493
|
children: [
|
|
494
|
-
/* @__PURE__ */ l(
|
|
494
|
+
/* @__PURE__ */ l(ke.Target, { children: /* @__PURE__ */ l(
|
|
495
495
|
"div",
|
|
496
496
|
{
|
|
497
|
-
className:
|
|
498
|
-
"data-expanded":
|
|
497
|
+
className: b.DatePicker__Wrapper,
|
|
498
|
+
"data-expanded": F ? !0 : void 0,
|
|
499
499
|
"data-disabled": _ ? !0 : void 0,
|
|
500
500
|
children: /* @__PURE__ */ l(
|
|
501
|
-
|
|
501
|
+
J,
|
|
502
502
|
{
|
|
503
503
|
component: "button",
|
|
504
504
|
type: "button",
|
|
505
505
|
classNames: {
|
|
506
|
-
input:
|
|
507
|
-
section:
|
|
506
|
+
input: b.DatePicker__Input,
|
|
507
|
+
section: b.DatePicker__Section
|
|
508
508
|
},
|
|
509
|
-
onClick: () => !_ &&
|
|
509
|
+
onClick: () => !_ && E((B) => !B),
|
|
510
510
|
disabled: _,
|
|
511
|
-
rightSection:
|
|
512
|
-
rightSectionWidth: a ??
|
|
513
|
-
"data-expanded":
|
|
511
|
+
rightSection: N,
|
|
512
|
+
rightSectionWidth: a ?? k,
|
|
513
|
+
"data-expanded": F ? !0 : void 0,
|
|
514
514
|
"data-disabled": _ ? !0 : void 0,
|
|
515
|
-
children:
|
|
515
|
+
children: $ ? /* @__PURE__ */ l("span", { children: $ }) : /* @__PURE__ */ l("span", { className: b.DatePicker__Placeholder, children: d })
|
|
516
516
|
}
|
|
517
517
|
)
|
|
518
518
|
}
|
|
519
519
|
) }),
|
|
520
|
-
/* @__PURE__ */ l(
|
|
521
|
-
|
|
520
|
+
/* @__PURE__ */ l(ke.Dropdown, { children: /* @__PURE__ */ l(
|
|
521
|
+
Rr,
|
|
522
522
|
{
|
|
523
523
|
type: r,
|
|
524
|
-
value:
|
|
525
|
-
onChange:
|
|
526
|
-
excludedDates:
|
|
527
|
-
excludedDays:
|
|
528
|
-
highlightToday:
|
|
529
|
-
minDate:
|
|
530
|
-
maxDate:
|
|
524
|
+
value: v,
|
|
525
|
+
onChange: j,
|
|
526
|
+
excludedDates: g,
|
|
527
|
+
excludedDays: y,
|
|
528
|
+
highlightToday: C,
|
|
529
|
+
minDate: u,
|
|
530
|
+
maxDate: m
|
|
531
531
|
}
|
|
532
532
|
) })
|
|
533
533
|
]
|
|
@@ -535,7 +535,7 @@ const tn = {
|
|
|
535
535
|
)
|
|
536
536
|
}
|
|
537
537
|
);
|
|
538
|
-
},
|
|
538
|
+
}, dn = "styles-module__Dropdown__Description___OQ8bF", un = "styles-module__Dropdown__ErrorMsg___xTP0Y", K = {
|
|
539
539
|
"Dropdown--LeftLabel": "styles-module__Dropdown--LeftLabel___SFObq",
|
|
540
540
|
"Dropdown--TopLabel": "styles-module__Dropdown--TopLabel___-lPhr",
|
|
541
541
|
"Dropdown__Label--Small": "styles-module__Dropdown__Label--Small___xbzOR",
|
|
@@ -547,9 +547,9 @@ const tn = {
|
|
|
547
547
|
"Dropdown--Small": "styles-module__Dropdown--Small___dRIK7",
|
|
548
548
|
"Dropdown--Medium": "styles-module__Dropdown--Medium___-HZoU",
|
|
549
549
|
"Dropdown--Large": "styles-module__Dropdown--Large___BvV3M",
|
|
550
|
-
Dropdown__Description:
|
|
551
|
-
Dropdown__ErrorMsg:
|
|
552
|
-
},
|
|
550
|
+
Dropdown__Description: dn,
|
|
551
|
+
Dropdown__ErrorMsg: un
|
|
552
|
+
}, la = ({
|
|
553
553
|
label: e,
|
|
554
554
|
labelPosition: r = "top",
|
|
555
555
|
size: n = "md",
|
|
@@ -560,26 +560,26 @@ const tn = {
|
|
|
560
560
|
description: i,
|
|
561
561
|
...c
|
|
562
562
|
}) => {
|
|
563
|
-
const [
|
|
564
|
-
let _ =
|
|
565
|
-
return n === "sm" ? (_ =
|
|
563
|
+
const [p, d] = I(!1);
|
|
564
|
+
let _ = K["Dropdown__Label--Medium"], u = K["Dropdown--Medium"], m = K["Dropdown__Tooltip--Medium"], f = 18;
|
|
565
|
+
return n === "sm" ? (_ = K["Dropdown__Label--Small"], u = K["Dropdown--Small"], m = K["Dropdown__Tooltip--Small"], f = 14) : n === "lg" && (_ = K["Dropdown__Label--Large"], u = K["Dropdown--Large"], m = K["Dropdown__Tooltip--Large"], f = 24), /* @__PURE__ */ x(
|
|
566
566
|
"div",
|
|
567
567
|
{
|
|
568
|
-
className: r === "top" ?
|
|
568
|
+
className: r === "top" ? K["Dropdown--TopLabel"] : K["Dropdown--LeftLabel"],
|
|
569
569
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
e && /* @__PURE__ */ l(
|
|
572
|
-
o && /* @__PURE__ */ l(
|
|
570
|
+
/* @__PURE__ */ x("div", { children: [
|
|
571
|
+
e && /* @__PURE__ */ l(J.Label, { required: t, className: _, children: e }),
|
|
572
|
+
o && /* @__PURE__ */ l(fe, { label: o, position: s, children: /* @__PURE__ */ l("div", { className: m, children: /* @__PURE__ */ l(Ee, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16 }) }) })
|
|
573
573
|
] }),
|
|
574
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ x("div", { children: [
|
|
575
575
|
/* @__PURE__ */ l(
|
|
576
|
-
|
|
576
|
+
Dt,
|
|
577
577
|
{
|
|
578
578
|
...c,
|
|
579
579
|
size: n,
|
|
580
580
|
error: a,
|
|
581
|
-
className:
|
|
582
|
-
rightSection:
|
|
581
|
+
className: u,
|
|
582
|
+
rightSection: p ? /* @__PURE__ */ l(Rt, { size: f }) : /* @__PURE__ */ l($t, { size: f }),
|
|
583
583
|
onDropdownOpen: () => d(!0),
|
|
584
584
|
onDropdownClose: () => d(!1),
|
|
585
585
|
styles: {
|
|
@@ -594,49 +594,64 @@ const tn = {
|
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
),
|
|
597
|
-
i && /* @__PURE__ */ l(
|
|
598
|
-
a && /* @__PURE__ */ l(
|
|
597
|
+
i && /* @__PURE__ */ l(J.Description, { className: K.Dropdown__Description, children: i }),
|
|
598
|
+
a && /* @__PURE__ */ l(J.Error, { className: K.Dropdown__ErrorMsg, children: a })
|
|
599
599
|
] })
|
|
600
600
|
]
|
|
601
601
|
}
|
|
602
602
|
);
|
|
603
603
|
};
|
|
604
|
-
function
|
|
604
|
+
function ge() {
|
|
605
605
|
return crypto.randomUUID();
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function mn(e, r, n) {
|
|
608
608
|
const t = [...e], [o] = t.splice(r, 1);
|
|
609
609
|
return t.splice(n, 0, o), t;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function pn(e, r, n) {
|
|
612
612
|
return n != null && e.length >= n ? 0 : r != null && e.length < r ? r - e.length : 1;
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function fn(e, r, n) {
|
|
615
|
+
return e.map((t) => {
|
|
616
|
+
const o = t.position;
|
|
617
|
+
return o == null ? t : o === r ? { ...t, position: n } : r < n && o > r && o <= n ? { ...t, position: o - 1 } : r > n && o >= n && o < r ? { ...t, position: o + 1 } : t;
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
function hn(e, r, n) {
|
|
615
621
|
const t = [...r].sort((i, c) => i.name.localeCompare(c.name)), o = n != null ? n - e.length : 1 / 0, a = t.slice(0, o).map((i) => ({
|
|
616
|
-
id:
|
|
622
|
+
id: ge(),
|
|
617
623
|
file: i,
|
|
618
624
|
url: URL.createObjectURL(i)
|
|
619
625
|
}));
|
|
620
626
|
return [...e, ...a];
|
|
621
627
|
}
|
|
622
|
-
function
|
|
628
|
+
function gn(e, r) {
|
|
623
629
|
const n = e.find((t) => t.id === r);
|
|
624
630
|
return n?.url?.startsWith("blob:") && URL.revokeObjectURL(n.url), e.filter((t) => t.id !== r);
|
|
625
631
|
}
|
|
626
|
-
function
|
|
632
|
+
function it(e, r, n) {
|
|
627
633
|
return e.map((t) => t.id !== r ? t : (t.url?.startsWith("blob:") && URL.revokeObjectURL(t.url), { ...t, file: n, url: URL.createObjectURL(n) }));
|
|
628
634
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
635
|
+
function yn(e, r, n) {
|
|
636
|
+
return it(e, r, n);
|
|
631
637
|
}
|
|
632
|
-
function
|
|
638
|
+
function kn(e, r, n) {
|
|
639
|
+
const t = {
|
|
640
|
+
id: ge(),
|
|
641
|
+
file: r,
|
|
642
|
+
url: URL.createObjectURL(r),
|
|
643
|
+
position: n
|
|
644
|
+
};
|
|
645
|
+
return [...e, t];
|
|
646
|
+
}
|
|
647
|
+
function Cn(e) {
|
|
633
648
|
for (const r of e)
|
|
634
649
|
r.url?.startsWith("blob:") && URL.revokeObjectURL(r.url);
|
|
635
650
|
}
|
|
636
|
-
const
|
|
651
|
+
const Dn = ({ size: e = "md", width: r, withCloseButton: n = !1, ...t }) => {
|
|
637
652
|
let o = 768;
|
|
638
653
|
return e === "xs" ? o = 360 : e === "sm" ? o = 544 : e === "lg" ? o = 1e3 : e === "xl" && (o = 1200), /* @__PURE__ */ l(
|
|
639
|
-
|
|
654
|
+
xt,
|
|
640
655
|
{
|
|
641
656
|
size: r || o,
|
|
642
657
|
styles: {
|
|
@@ -647,7 +662,7 @@ const _n = ({ size: e = "md", width: r, withCloseButton: n = !1, ...t }) => {
|
|
|
647
662
|
fontSize: "16px",
|
|
648
663
|
fontWeight: "700",
|
|
649
664
|
lineHeight: "150%",
|
|
650
|
-
color:
|
|
665
|
+
color: Ot
|
|
651
666
|
},
|
|
652
667
|
header: {
|
|
653
668
|
padding: "16px"
|
|
@@ -659,18 +674,18 @@ const _n = ({ size: e = "md", width: r, withCloseButton: n = !1, ...t }) => {
|
|
|
659
674
|
},
|
|
660
675
|
withCloseButton: n,
|
|
661
676
|
closeButtonProps: {
|
|
662
|
-
icon: /* @__PURE__ */ l(
|
|
677
|
+
icon: /* @__PURE__ */ l(Ae, { size: 18, color: zt })
|
|
663
678
|
},
|
|
664
679
|
...t
|
|
665
680
|
}
|
|
666
681
|
);
|
|
667
682
|
};
|
|
668
|
-
async function
|
|
683
|
+
async function xn(e, r) {
|
|
669
684
|
const n = e.url ?? "";
|
|
670
685
|
if (!n) return null;
|
|
671
686
|
const t = await new Promise((i, c) => {
|
|
672
|
-
const
|
|
673
|
-
|
|
687
|
+
const p = new Image();
|
|
688
|
+
p.crossOrigin = "anonymous", p.onload = () => i(p), p.onerror = c, p.src = n;
|
|
674
689
|
}), o = document.createElement("canvas");
|
|
675
690
|
o.width = r.width, o.height = r.height;
|
|
676
691
|
const s = o.getContext("2d");
|
|
@@ -688,40 +703,40 @@ async function dn(e, r) {
|
|
|
688
703
|
);
|
|
689
704
|
const a = e.file?.name ?? e.url?.split("/").pop() ?? "image";
|
|
690
705
|
return new Promise((i, c) => {
|
|
691
|
-
o.toBlob((
|
|
692
|
-
|
|
706
|
+
o.toBlob((p) => {
|
|
707
|
+
p ? i(new File([p], `cropped_${a}`, { type: "image/jpeg" })) : c(new Error("Failed to create blob"));
|
|
693
708
|
}, "image/jpeg");
|
|
694
709
|
});
|
|
695
710
|
}
|
|
696
|
-
function
|
|
711
|
+
function Pn({
|
|
697
712
|
item: e,
|
|
698
713
|
isOpen: r,
|
|
699
714
|
aspect: n = 1,
|
|
700
715
|
onClose: t,
|
|
701
716
|
onSubmit: o
|
|
702
717
|
}) {
|
|
703
|
-
const [s, a] =
|
|
704
|
-
if (!(!
|
|
705
|
-
|
|
718
|
+
const [s, a] = I({ x: 0, y: 0 }), [i, c] = I(1), [p, d] = I(null), [_, u] = I(!1), m = async () => {
|
|
719
|
+
if (!(!p || !e)) {
|
|
720
|
+
u(!0);
|
|
706
721
|
try {
|
|
707
|
-
const f = await
|
|
722
|
+
const f = await xn(e, p);
|
|
708
723
|
f && o(f);
|
|
709
724
|
} finally {
|
|
710
|
-
|
|
725
|
+
u(!1);
|
|
711
726
|
}
|
|
712
727
|
}
|
|
713
728
|
};
|
|
714
729
|
return /* @__PURE__ */ l(
|
|
715
|
-
|
|
730
|
+
Dn,
|
|
716
731
|
{
|
|
717
732
|
opened: r && !!e,
|
|
718
733
|
onClose: t,
|
|
719
734
|
size: "md",
|
|
720
735
|
title: "이미지 수정",
|
|
721
736
|
withCloseButton: !0,
|
|
722
|
-
children: /* @__PURE__ */
|
|
737
|
+
children: /* @__PURE__ */ x(Pt, { children: [
|
|
723
738
|
/* @__PURE__ */ l("div", { style: { position: "relative", height: 320, background: "#fff" }, children: /* @__PURE__ */ l(
|
|
724
|
-
|
|
739
|
+
or,
|
|
725
740
|
{
|
|
726
741
|
image: e?.url ?? "",
|
|
727
742
|
crop: s,
|
|
@@ -736,34 +751,34 @@ function un({
|
|
|
736
751
|
style: { containerStyle: { backgroundColor: "#ffffff" } }
|
|
737
752
|
}
|
|
738
753
|
) }),
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
/* @__PURE__ */ l(
|
|
741
|
-
/* @__PURE__ */ l(
|
|
754
|
+
/* @__PURE__ */ x(Mt, { justify: "flex-end", style: { padding: "0 16px" }, children: [
|
|
755
|
+
/* @__PURE__ */ l(me, { variant: "basic", onClick: t, children: "취소" }),
|
|
756
|
+
/* @__PURE__ */ l(me, { variant: "primary", isLoading: _, onClick: m, children: "적용하기" })
|
|
742
757
|
] })
|
|
743
758
|
] })
|
|
744
759
|
},
|
|
745
760
|
e?.id
|
|
746
761
|
);
|
|
747
762
|
}
|
|
748
|
-
const
|
|
749
|
-
Container:
|
|
750
|
-
TileImage:
|
|
751
|
-
EditButton:
|
|
752
|
-
PlaceholderText:
|
|
753
|
-
PlaceholderTextError:
|
|
754
|
-
},
|
|
755
|
-
TileContainer:
|
|
756
|
-
DeleteButton:
|
|
757
|
-
Tile:
|
|
758
|
-
LoadingOverlay:
|
|
759
|
-
ActionBar:
|
|
760
|
-
DragHandle:
|
|
761
|
-
LinkButton:
|
|
762
|
-
DropzoneOuter:
|
|
763
|
-
Placeholder:
|
|
764
|
-
PlaceholderError:
|
|
763
|
+
const Mn = "styles-module__Container___ZyeJM", bn = "styles-module__TileImage___6aKmW", Sn = "styles-module__EditButton___1Xyg9", Tn = "styles-module__PlaceholderText___nhLhy", wn = "styles-module__PlaceholderTextError___jYZ8j", ae = {
|
|
764
|
+
Container: Mn,
|
|
765
|
+
TileImage: bn,
|
|
766
|
+
EditButton: Sn,
|
|
767
|
+
PlaceholderText: Tn,
|
|
768
|
+
PlaceholderTextError: wn
|
|
769
|
+
}, In = "styles-module__TileContainer___5-y01", Ln = "styles-module__DeleteButton___0zsXm", Bn = "styles-module__Tile___3Cezo", vn = "styles-module__LoadingOverlay___4CyDQ", En = "styles-module__ActionBar___mJYpe", An = "styles-module__DragHandle___lzKhb", Nn = "styles-module__LinkButton___bISyz", Fn = "styles-module__DropzoneOuter___BIO2N", Rn = "styles-module__Placeholder___q30Yw", $n = "styles-module__PlaceholderError___fCOYe", te = {
|
|
770
|
+
TileContainer: In,
|
|
771
|
+
DeleteButton: Ln,
|
|
772
|
+
Tile: Bn,
|
|
773
|
+
LoadingOverlay: vn,
|
|
774
|
+
ActionBar: En,
|
|
775
|
+
DragHandle: An,
|
|
776
|
+
LinkButton: Nn,
|
|
777
|
+
DropzoneOuter: Fn,
|
|
778
|
+
Placeholder: Rn,
|
|
779
|
+
PlaceholderError: $n
|
|
765
780
|
};
|
|
766
|
-
function
|
|
781
|
+
function pe({
|
|
767
782
|
width: e,
|
|
768
783
|
height: r,
|
|
769
784
|
isError: n,
|
|
@@ -773,20 +788,42 @@ function Ke({
|
|
|
773
788
|
onDrop: a,
|
|
774
789
|
children: i
|
|
775
790
|
}) {
|
|
776
|
-
return /* @__PURE__ */ l("div", { className:
|
|
777
|
-
|
|
791
|
+
return /* @__PURE__ */ l("div", { className: te.DropzoneOuter, children: /* @__PURE__ */ l(
|
|
792
|
+
nr,
|
|
778
793
|
{
|
|
779
794
|
onDrop: a,
|
|
780
795
|
accept: o,
|
|
781
796
|
multiple: s,
|
|
782
797
|
disabled: t,
|
|
783
|
-
className: n ?
|
|
798
|
+
className: n ? te.PlaceholderError : te.Placeholder,
|
|
784
799
|
style: { width: e, height: r },
|
|
785
800
|
children: i
|
|
786
801
|
}
|
|
787
802
|
) });
|
|
788
803
|
}
|
|
789
|
-
|
|
804
|
+
const On = (e) => {
|
|
805
|
+
const { isSorting: r, wasDragging: n } = e;
|
|
806
|
+
return r || n ? !1 : rt(e);
|
|
807
|
+
};
|
|
808
|
+
function lt({ id: e, children: r }) {
|
|
809
|
+
const { setNodeRef: n, transform: t, transition: o, isOver: s } = tt({
|
|
810
|
+
id: e,
|
|
811
|
+
animateLayoutChanges: On
|
|
812
|
+
});
|
|
813
|
+
return /* @__PURE__ */ l(
|
|
814
|
+
"div",
|
|
815
|
+
{
|
|
816
|
+
ref: n,
|
|
817
|
+
style: {
|
|
818
|
+
transform: at.Transform.toString(t),
|
|
819
|
+
transition: o,
|
|
820
|
+
opacity: s ? 0.7 : 1
|
|
821
|
+
},
|
|
822
|
+
children: r
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
function ct({
|
|
790
827
|
id: e,
|
|
791
828
|
totalCount: r,
|
|
792
829
|
width: n,
|
|
@@ -796,126 +833,178 @@ function Je({
|
|
|
796
833
|
itemIsLoading: a,
|
|
797
834
|
canDelete: i,
|
|
798
835
|
hasLink: c,
|
|
799
|
-
linkUrl:
|
|
836
|
+
linkUrl: p,
|
|
800
837
|
onLinkClick: d,
|
|
801
838
|
onDelete: _,
|
|
802
|
-
deleteAriaLabel:
|
|
803
|
-
actionBarExtra:
|
|
839
|
+
deleteAriaLabel: u = "삭제",
|
|
840
|
+
actionBarExtra: m,
|
|
804
841
|
onTileClick: f,
|
|
805
842
|
children: h
|
|
806
843
|
}) {
|
|
807
|
-
const
|
|
844
|
+
const g = (P) => {
|
|
845
|
+
const { isSorting: k, wasDragging: L } = P;
|
|
846
|
+
return k || L ? !1 : rt(P);
|
|
847
|
+
}, { attributes: y, listeners: C, setNodeRef: M, transform: F, transition: E, isDragging: Y } = tt({
|
|
808
848
|
id: e,
|
|
809
|
-
disabled: o
|
|
810
|
-
|
|
811
|
-
|
|
849
|
+
disabled: o,
|
|
850
|
+
animateLayoutChanges: g
|
|
851
|
+
}), R = !o && r > 1 || c && !!p && !!d || !!m, w = o || s || a || !f ? "default" : "pointer";
|
|
852
|
+
return /* @__PURE__ */ x(
|
|
812
853
|
"div",
|
|
813
854
|
{
|
|
814
|
-
ref:
|
|
815
|
-
className:
|
|
855
|
+
ref: M,
|
|
856
|
+
className: te.TileContainer,
|
|
816
857
|
style: {
|
|
817
|
-
transform:
|
|
818
|
-
transition:
|
|
819
|
-
opacity:
|
|
858
|
+
transform: at.Transform.toString(F),
|
|
859
|
+
transition: E,
|
|
860
|
+
opacity: Y ? 0.4 : 1
|
|
820
861
|
},
|
|
821
862
|
children: [
|
|
822
863
|
!o && i && !s && /* @__PURE__ */ l(
|
|
823
864
|
"button",
|
|
824
865
|
{
|
|
825
866
|
type: "button",
|
|
826
|
-
className:
|
|
867
|
+
className: te.DeleteButton,
|
|
827
868
|
onClick: _,
|
|
828
|
-
"aria-label":
|
|
829
|
-
children: /* @__PURE__ */ l(
|
|
869
|
+
"aria-label": u,
|
|
870
|
+
children: /* @__PURE__ */ l(Ht, { size: 24 })
|
|
830
871
|
}
|
|
831
872
|
),
|
|
832
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ x(
|
|
833
874
|
"div",
|
|
834
875
|
{
|
|
835
|
-
className:
|
|
836
|
-
style: { width: n, height: t, cursor:
|
|
876
|
+
className: te.Tile,
|
|
877
|
+
style: { width: n, height: t, cursor: w },
|
|
837
878
|
onClick: () => !o && !s && !a && f?.(),
|
|
838
879
|
children: [
|
|
839
880
|
h,
|
|
840
|
-
(s || a) && /* @__PURE__ */ l("div", { className:
|
|
881
|
+
(s || a) && /* @__PURE__ */ l("div", { className: te.LoadingOverlay, children: /* @__PURE__ */ l(Ge, { size: n / 6, color: Xe }) })
|
|
841
882
|
]
|
|
842
883
|
}
|
|
843
884
|
),
|
|
844
|
-
|
|
885
|
+
R && /* @__PURE__ */ x("div", { className: te.ActionBar, children: [
|
|
845
886
|
!o && r > 1 && /* @__PURE__ */ l(
|
|
846
887
|
"button",
|
|
847
888
|
{
|
|
848
889
|
type: "button",
|
|
849
|
-
className:
|
|
850
|
-
...
|
|
851
|
-
...
|
|
890
|
+
className: te.DragHandle,
|
|
891
|
+
...y,
|
|
892
|
+
...C,
|
|
852
893
|
"aria-label": "드래그로 순서 변경",
|
|
853
|
-
children: /* @__PURE__ */ l(
|
|
894
|
+
children: /* @__PURE__ */ l(Yt, { size: 20, color: "#808080" })
|
|
854
895
|
}
|
|
855
896
|
),
|
|
856
|
-
c &&
|
|
857
|
-
|
|
897
|
+
c && p && d && /* @__PURE__ */ l("button", { type: "button", className: te.LinkButton, onClick: d, children: "링크" }),
|
|
898
|
+
m
|
|
858
899
|
] })
|
|
859
900
|
]
|
|
860
901
|
}
|
|
861
902
|
);
|
|
862
903
|
}
|
|
863
|
-
function
|
|
904
|
+
function zn({
|
|
864
905
|
items: e,
|
|
865
906
|
onReorder: r
|
|
866
907
|
}) {
|
|
867
|
-
return { sensors:
|
|
868
|
-
|
|
869
|
-
|
|
908
|
+
return { sensors: Qt(
|
|
909
|
+
Fe(er, { activationConstraint: { distance: 8 } }),
|
|
910
|
+
Fe(tr, { coordinateGetter: rr })
|
|
870
911
|
), handleDragEnd: (o) => {
|
|
871
912
|
const { active: s, over: a } = o;
|
|
872
913
|
if (!a || s.id === a.id) return;
|
|
873
|
-
const i = e.findIndex((
|
|
914
|
+
const i = e.findIndex((p) => p.id === s.id), c = e.findIndex((p) => p.id === a.id);
|
|
874
915
|
i !== -1 && c !== -1 && r(i, c);
|
|
875
916
|
} };
|
|
876
917
|
}
|
|
877
|
-
|
|
918
|
+
const xe = "__slot-";
|
|
919
|
+
function _t({ value: e, length: r, minLength: n, maxLength: t, onChange: o }) {
|
|
920
|
+
const s = r ?? n, a = r ?? t, i = s != null && a != null && s === a, c = i ? 0 : pn(e, s, a), p = i ? Array.from({ length: a }, (g, y) => `${xe}${y}`) : [], d = i ? p : e.map((g) => g.id), { sensors: _, handleDragEnd: u } = zn({
|
|
921
|
+
items: e,
|
|
922
|
+
onReorder: (g, y) => {
|
|
923
|
+
const C = mn(e, g, y), M = e[g];
|
|
924
|
+
o?.(C, {
|
|
925
|
+
action: "reorder",
|
|
926
|
+
itemId: M.id,
|
|
927
|
+
index: y,
|
|
928
|
+
previousIndex: g,
|
|
929
|
+
nextIndex: y
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
return {
|
|
934
|
+
isPositionMode: i,
|
|
935
|
+
resolvedMinLength: s,
|
|
936
|
+
resolvedMaxLength: a,
|
|
937
|
+
placeholderCount: c,
|
|
938
|
+
slotIds: p,
|
|
939
|
+
sortableItems: d,
|
|
940
|
+
sensors: _,
|
|
941
|
+
handleDragEnd: i ? (g) => {
|
|
942
|
+
const { active: y, over: C } = g;
|
|
943
|
+
if (!C || y.id === C.id) return;
|
|
944
|
+
const M = Number(String(y.id).replace(xe, "")), F = Number(String(C.id).replace(xe, "")), E = e.find((R) => R.position === M);
|
|
945
|
+
if (!E) return;
|
|
946
|
+
const Y = fn(e, M, F);
|
|
947
|
+
o?.(Y, {
|
|
948
|
+
action: "reorder",
|
|
949
|
+
itemId: E.id,
|
|
950
|
+
index: F,
|
|
951
|
+
previousIndex: M,
|
|
952
|
+
nextIndex: F
|
|
953
|
+
});
|
|
954
|
+
} : u,
|
|
955
|
+
getMetaIndex: (g) => {
|
|
956
|
+
const y = e.find((C) => C.id === g);
|
|
957
|
+
return i && y ? y.position ?? 0 : e.findIndex((C) => C.id === g);
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
function Hn(e) {
|
|
962
|
+
return e ? e.join(",") : "image/*";
|
|
963
|
+
}
|
|
964
|
+
function ze({
|
|
878
965
|
item: e,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
966
|
+
sortableId: r,
|
|
967
|
+
index: n,
|
|
968
|
+
totalCount: t,
|
|
969
|
+
width: o,
|
|
970
|
+
height: s,
|
|
971
|
+
accept: a,
|
|
972
|
+
canDelete: i,
|
|
973
|
+
hasLink: c,
|
|
974
|
+
hasEdit: p,
|
|
975
|
+
readOnly: d,
|
|
976
|
+
isLoading: _,
|
|
977
|
+
onLinkClick: u,
|
|
978
|
+
onDelete: m,
|
|
979
|
+
onReplace: f,
|
|
980
|
+
onEdit: h
|
|
892
981
|
}) {
|
|
893
|
-
const
|
|
894
|
-
return /* @__PURE__ */
|
|
895
|
-
|
|
982
|
+
const g = oe(null);
|
|
983
|
+
return /* @__PURE__ */ x(
|
|
984
|
+
ct,
|
|
896
985
|
{
|
|
897
|
-
id: e.id,
|
|
898
|
-
totalCount:
|
|
899
|
-
width:
|
|
900
|
-
height:
|
|
901
|
-
readOnly:
|
|
902
|
-
isLoading:
|
|
986
|
+
id: r ?? e.id,
|
|
987
|
+
totalCount: t,
|
|
988
|
+
width: o,
|
|
989
|
+
height: s,
|
|
990
|
+
readOnly: d,
|
|
991
|
+
isLoading: _,
|
|
903
992
|
itemIsLoading: e.isLoading,
|
|
904
|
-
canDelete:
|
|
905
|
-
hasLink:
|
|
993
|
+
canDelete: i,
|
|
994
|
+
hasLink: c,
|
|
906
995
|
linkUrl: e.url,
|
|
907
|
-
onLinkClick:
|
|
908
|
-
onDelete: () =>
|
|
996
|
+
onLinkClick: u ? () => u(e) : void 0,
|
|
997
|
+
onDelete: () => m(e.id),
|
|
909
998
|
deleteAriaLabel: "이미지 삭제",
|
|
910
|
-
onTileClick: () =>
|
|
911
|
-
actionBarExtra: !
|
|
912
|
-
|
|
999
|
+
onTileClick: () => g.current?.click(),
|
|
1000
|
+
actionBarExtra: !d && p ? /* @__PURE__ */ l(
|
|
1001
|
+
me,
|
|
913
1002
|
{
|
|
914
1003
|
variant: "basic",
|
|
915
1004
|
size: "sm",
|
|
916
1005
|
"aria-label": "이미지 편집",
|
|
917
|
-
className:
|
|
918
|
-
onClick: () =>
|
|
1006
|
+
className: ae.EditButton,
|
|
1007
|
+
onClick: () => h(e),
|
|
919
1008
|
children: "편집"
|
|
920
1009
|
}
|
|
921
1010
|
) : void 0,
|
|
@@ -923,13 +1012,13 @@ function wn({
|
|
|
923
1012
|
/* @__PURE__ */ l(
|
|
924
1013
|
"input",
|
|
925
1014
|
{
|
|
926
|
-
ref:
|
|
1015
|
+
ref: g,
|
|
927
1016
|
type: "file",
|
|
928
|
-
accept:
|
|
1017
|
+
accept: Hn(a),
|
|
929
1018
|
style: { display: "none" },
|
|
930
|
-
onChange: (
|
|
931
|
-
const
|
|
932
|
-
|
|
1019
|
+
onChange: (y) => {
|
|
1020
|
+
const C = y.target.files?.[0];
|
|
1021
|
+
C && f(e.id, C), y.target.value = "";
|
|
933
1022
|
}
|
|
934
1023
|
}
|
|
935
1024
|
),
|
|
@@ -937,251 +1026,319 @@ function wn({
|
|
|
937
1026
|
"img",
|
|
938
1027
|
{
|
|
939
1028
|
src: e.url,
|
|
940
|
-
alt: e.file?.name ?? `이미지 ${
|
|
941
|
-
className:
|
|
1029
|
+
alt: e.file?.name ?? `이미지 ${n + 1}`,
|
|
1030
|
+
className: ae.TileImage
|
|
942
1031
|
}
|
|
943
1032
|
)
|
|
944
1033
|
]
|
|
945
1034
|
}
|
|
946
1035
|
);
|
|
947
1036
|
}
|
|
948
|
-
const
|
|
1037
|
+
const ca = ({
|
|
949
1038
|
value: e = [],
|
|
950
1039
|
onChange: r,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1040
|
+
accept: n,
|
|
1041
|
+
length: t,
|
|
1042
|
+
width: o = 160,
|
|
1043
|
+
height: s = 200,
|
|
1044
|
+
placeholder: a = "이미지를 넣어주세요",
|
|
1045
|
+
hasIcon: i = !0,
|
|
1046
|
+
hasLink: c = !1,
|
|
1047
|
+
onLinkClick: p,
|
|
1048
|
+
hasEdit: d = !1,
|
|
1049
|
+
canDelete: _ = !0,
|
|
1050
|
+
minLength: u,
|
|
1051
|
+
maxLength: m,
|
|
1052
|
+
errorMsg: f,
|
|
1053
|
+
isLoading: h,
|
|
1054
|
+
readOnly: g,
|
|
1055
|
+
gap: y = 8
|
|
965
1056
|
}) => {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1057
|
+
process.env.NODE_ENV !== "production" && t != null && (u != null || m != null) && console.warn(
|
|
1058
|
+
"ImageInput: length와 minLength/maxLength가 동시에 지정되었습니다. length가 우선 적용됩니다."
|
|
1059
|
+
);
|
|
1060
|
+
const {
|
|
1061
|
+
isPositionMode: C,
|
|
1062
|
+
resolvedMaxLength: M,
|
|
1063
|
+
placeholderCount: F,
|
|
1064
|
+
slotIds: E,
|
|
1065
|
+
sortableItems: Y,
|
|
1066
|
+
sensors: R,
|
|
1067
|
+
handleDragEnd: w,
|
|
1068
|
+
getMetaIndex: P
|
|
1069
|
+
} = _t({ value: e, length: t, minLength: u, maxLength: m, onChange: r }), k = !!f, [L, N] = I(null), S = oe(e);
|
|
1070
|
+
X(() => {
|
|
1071
|
+
S.current = e;
|
|
1072
|
+
}, [e]), X(() => () => Cn(S.current), []);
|
|
1073
|
+
const v = (T) => {
|
|
1074
|
+
if (g) return;
|
|
1075
|
+
const D = e.length, A = hn(e, T, M);
|
|
1076
|
+
A.length !== D && r?.(A, {
|
|
1077
|
+
action: "create",
|
|
1078
|
+
itemId: A[D].id,
|
|
1079
|
+
index: D
|
|
1080
|
+
});
|
|
1081
|
+
}, $ = (T, D) => {
|
|
1082
|
+
if (g) return;
|
|
1083
|
+
const A = D[0];
|
|
1084
|
+
if (!A) return;
|
|
1085
|
+
const q = kn(e, A, T);
|
|
1086
|
+
r?.(q, {
|
|
984
1087
|
action: "create",
|
|
985
|
-
itemId:
|
|
986
|
-
index:
|
|
1088
|
+
itemId: q[q.length - 1].id,
|
|
1089
|
+
index: T
|
|
987
1090
|
});
|
|
988
|
-
},
|
|
989
|
-
if (
|
|
990
|
-
const
|
|
991
|
-
r?.(
|
|
992
|
-
}, B = (
|
|
993
|
-
if (
|
|
994
|
-
const
|
|
995
|
-
r?.(
|
|
996
|
-
},
|
|
997
|
-
if (!
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
},
|
|
1001
|
-
const
|
|
1002
|
-
return typeof
|
|
1003
|
-
`).map((
|
|
1091
|
+
}, j = (T) => {
|
|
1092
|
+
if (g) return;
|
|
1093
|
+
const D = P(T), A = gn(e, T);
|
|
1094
|
+
r?.(A, { action: "delete", itemId: T, index: D });
|
|
1095
|
+
}, B = (T, D) => {
|
|
1096
|
+
if (g) return;
|
|
1097
|
+
const A = P(T), q = it(e, T, D);
|
|
1098
|
+
r?.(q, { action: "replace", itemId: T, index: A });
|
|
1099
|
+
}, O = (T) => {
|
|
1100
|
+
if (!L) return;
|
|
1101
|
+
const D = L.id, A = P(D), q = yn(e, D, T);
|
|
1102
|
+
N(null), r?.(q, { action: "crop", itemId: D, index: A });
|
|
1103
|
+
}, U = (T) => {
|
|
1104
|
+
const D = typeof a == "function" ? a(T) : a;
|
|
1105
|
+
return typeof D != "string" ? D : D.split(`
|
|
1106
|
+
`).map((A, q) => /* @__PURE__ */ l("span", { children: A }, q));
|
|
1004
1107
|
};
|
|
1005
|
-
return /* @__PURE__ */
|
|
1006
|
-
/* @__PURE__ */ l(
|
|
1007
|
-
e.
|
|
1008
|
-
|
|
1108
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
1109
|
+
/* @__PURE__ */ l(Qe, { sensors: R, collisionDetection: et, onDragEnd: w, children: /* @__PURE__ */ l(nt, { items: Y, strategy: ot, children: /* @__PURE__ */ l("div", { className: ae.Container, style: { gap: y }, children: C ? Array.from({ length: M }, (T, D) => {
|
|
1110
|
+
const A = E[D], q = e.find((ye) => ye.position === D);
|
|
1111
|
+
return q ? /* @__PURE__ */ l(
|
|
1112
|
+
ze,
|
|
1113
|
+
{
|
|
1114
|
+
item: q,
|
|
1115
|
+
sortableId: A,
|
|
1116
|
+
index: D,
|
|
1117
|
+
totalCount: M,
|
|
1118
|
+
width: o,
|
|
1119
|
+
height: s,
|
|
1120
|
+
accept: n,
|
|
1121
|
+
canDelete: _,
|
|
1122
|
+
hasLink: c,
|
|
1123
|
+
hasEdit: d,
|
|
1124
|
+
readOnly: g ?? !1,
|
|
1125
|
+
isLoading: h,
|
|
1126
|
+
onLinkClick: p,
|
|
1127
|
+
onDelete: j,
|
|
1128
|
+
onReplace: B,
|
|
1129
|
+
onEdit: N
|
|
1130
|
+
},
|
|
1131
|
+
A
|
|
1132
|
+
) : !g && /* @__PURE__ */ l(lt, { id: A, children: /* @__PURE__ */ x(
|
|
1133
|
+
pe,
|
|
1134
|
+
{
|
|
1135
|
+
onDrop: (ye) => $(D, ye),
|
|
1136
|
+
accept: n ?? Re,
|
|
1137
|
+
multiple: !1,
|
|
1138
|
+
isLoading: h,
|
|
1139
|
+
isError: k,
|
|
1140
|
+
width: o,
|
|
1141
|
+
height: s,
|
|
1142
|
+
children: [
|
|
1143
|
+
i && /* @__PURE__ */ l(ue, { size: 36, color: k ? "#e03131" : "#07a3c6" }),
|
|
1144
|
+
a && /* @__PURE__ */ l(
|
|
1145
|
+
"div",
|
|
1146
|
+
{
|
|
1147
|
+
className: `${ae.PlaceholderText}${k ? ` ${ae.PlaceholderTextError}` : ""}`,
|
|
1148
|
+
children: U(D)
|
|
1149
|
+
}
|
|
1150
|
+
)
|
|
1151
|
+
]
|
|
1152
|
+
}
|
|
1153
|
+
) }, A);
|
|
1154
|
+
}) : /* @__PURE__ */ x(Ve, { children: [
|
|
1155
|
+
e.map((T, D) => /* @__PURE__ */ l(
|
|
1156
|
+
ze,
|
|
1009
1157
|
{
|
|
1010
|
-
item:
|
|
1011
|
-
index:
|
|
1158
|
+
item: T,
|
|
1159
|
+
index: D,
|
|
1012
1160
|
totalCount: e.length,
|
|
1013
|
-
width:
|
|
1014
|
-
height:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1161
|
+
width: o,
|
|
1162
|
+
height: s,
|
|
1163
|
+
accept: n,
|
|
1164
|
+
canDelete: _,
|
|
1165
|
+
hasLink: c,
|
|
1166
|
+
hasEdit: d,
|
|
1167
|
+
readOnly: g ?? !1,
|
|
1168
|
+
isLoading: h,
|
|
1169
|
+
onLinkClick: p,
|
|
1170
|
+
onDelete: j,
|
|
1022
1171
|
onReplace: B,
|
|
1023
|
-
onEdit:
|
|
1172
|
+
onEdit: N
|
|
1024
1173
|
},
|
|
1025
|
-
|
|
1174
|
+
T.id
|
|
1026
1175
|
)),
|
|
1027
|
-
!
|
|
1028
|
-
|
|
1176
|
+
!g && Array.from({ length: F }, (T, D) => /* @__PURE__ */ x(
|
|
1177
|
+
pe,
|
|
1029
1178
|
{
|
|
1030
|
-
onDrop:
|
|
1031
|
-
accept:
|
|
1032
|
-
multiple:
|
|
1033
|
-
isLoading:
|
|
1034
|
-
isError:
|
|
1035
|
-
width:
|
|
1036
|
-
height:
|
|
1179
|
+
onDrop: v,
|
|
1180
|
+
accept: n ?? Re,
|
|
1181
|
+
multiple: M !== 1,
|
|
1182
|
+
isLoading: h,
|
|
1183
|
+
isError: k,
|
|
1184
|
+
width: o,
|
|
1185
|
+
height: s,
|
|
1037
1186
|
children: [
|
|
1038
|
-
|
|
1039
|
-
|
|
1187
|
+
i && /* @__PURE__ */ l(ue, { size: 36, color: k ? "#e03131" : "#07a3c6" }),
|
|
1188
|
+
a && /* @__PURE__ */ l(
|
|
1040
1189
|
"div",
|
|
1041
1190
|
{
|
|
1042
|
-
className: `${
|
|
1043
|
-
children:
|
|
1191
|
+
className: `${ae.PlaceholderText}${k ? ` ${ae.PlaceholderTextError}` : ""}`,
|
|
1192
|
+
children: U(D)
|
|
1044
1193
|
}
|
|
1045
1194
|
)
|
|
1046
1195
|
]
|
|
1047
1196
|
},
|
|
1048
|
-
`placeholder-${
|
|
1197
|
+
`placeholder-${D}`
|
|
1049
1198
|
))
|
|
1050
|
-
] }) }) }),
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1199
|
+
] }) }) }) }),
|
|
1200
|
+
k && /* @__PURE__ */ l(J.Error, { mt: 8, children: f }),
|
|
1201
|
+
d && /* @__PURE__ */ l(
|
|
1202
|
+
Pn,
|
|
1054
1203
|
{
|
|
1055
|
-
item:
|
|
1056
|
-
isOpen: !!
|
|
1057
|
-
onClose: () =>
|
|
1058
|
-
onSubmit:
|
|
1204
|
+
item: L,
|
|
1205
|
+
isOpen: !!L,
|
|
1206
|
+
onClose: () => N(null),
|
|
1207
|
+
onSubmit: O
|
|
1059
1208
|
}
|
|
1060
1209
|
)
|
|
1061
1210
|
] });
|
|
1062
|
-
}, Ln = "styles-module__Toast___ZqZzU", Bn = "styles-module__Toast__Icon___PWXSy", In = "styles-module__Toast__Body___wezPs", vn = "styles-module__Toast__Message___NFsgm", se = {
|
|
1063
|
-
Toast: Ln,
|
|
1064
|
-
Toast__Icon: Bn,
|
|
1065
|
-
Toast__Body: In,
|
|
1066
|
-
Toast__Message: vn
|
|
1067
|
-
}, Xe = (e) => typeof e == "string" ? { message: e } : e, Qe = (e, r) => {
|
|
1068
|
-
const { autoClose: n, icon: t, message: o } = Xe(e);
|
|
1069
|
-
return {
|
|
1070
|
-
id: r,
|
|
1071
|
-
message: /* @__PURE__ */ l("div", { className: se.Toast__Message, children: o }),
|
|
1072
|
-
icon: t,
|
|
1073
|
-
autoClose: n,
|
|
1074
|
-
classNames: {
|
|
1075
|
-
root: se.Toast,
|
|
1076
|
-
body: se.Toast__Body,
|
|
1077
|
-
icon: se.Toast__Icon
|
|
1078
|
-
},
|
|
1079
|
-
withCloseButton: !1,
|
|
1080
|
-
withBorder: !1
|
|
1081
|
-
};
|
|
1082
|
-
}, ee = (e) => {
|
|
1083
|
-
const r = Xe(e);
|
|
1084
|
-
_e.show(Qe(e, r.id));
|
|
1085
|
-
};
|
|
1086
|
-
ee.update = (e, r) => {
|
|
1087
|
-
_e.update(Qe(r, e));
|
|
1088
|
-
};
|
|
1089
|
-
ee.hide = (e) => {
|
|
1090
|
-
_e.hide(e);
|
|
1091
1211
|
};
|
|
1092
|
-
|
|
1093
|
-
_e.clean();
|
|
1094
|
-
};
|
|
1095
|
-
function et(e) {
|
|
1212
|
+
function dt(e) {
|
|
1096
1213
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
1097
1214
|
const r = e;
|
|
1098
1215
|
return "v" in r && "fr" in r && "ip" in r && "op" in r && "w" in r && "h" in r && "layers" in r && Array.isArray(r.layers);
|
|
1099
1216
|
}
|
|
1100
|
-
function
|
|
1217
|
+
function Ie(e) {
|
|
1101
1218
|
return new Promise((r) => {
|
|
1102
1219
|
const n = new FileReader();
|
|
1103
1220
|
n.onload = (t) => {
|
|
1104
1221
|
try {
|
|
1105
1222
|
const o = JSON.parse(t.target?.result);
|
|
1106
|
-
r(
|
|
1223
|
+
r(dt(o) ? o : null);
|
|
1107
1224
|
} catch {
|
|
1108
1225
|
r(null);
|
|
1109
1226
|
}
|
|
1110
1227
|
}, n.onerror = () => r(null), n.readAsText(e);
|
|
1111
1228
|
});
|
|
1112
1229
|
}
|
|
1113
|
-
function
|
|
1230
|
+
function Yn(e, r, n) {
|
|
1114
1231
|
const t = [...r].sort((i, c) => i.name.localeCompare(c.name)), o = n != null ? n - e.length : 1 / 0, a = t.slice(0, o).map((i) => ({
|
|
1115
|
-
id:
|
|
1232
|
+
id: ge(),
|
|
1116
1233
|
file: i
|
|
1117
1234
|
}));
|
|
1118
1235
|
return [...e, ...a];
|
|
1119
1236
|
}
|
|
1120
|
-
function
|
|
1237
|
+
function Wn(e, r) {
|
|
1121
1238
|
return e.filter((n) => n.id !== r);
|
|
1122
1239
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1240
|
+
function Zn(e, r, n) {
|
|
1241
|
+
const t = {
|
|
1242
|
+
id: ge(),
|
|
1243
|
+
file: r,
|
|
1244
|
+
position: n
|
|
1245
|
+
};
|
|
1246
|
+
return [...e, t];
|
|
1247
|
+
}
|
|
1248
|
+
const jn = "styles-module__Container___cJqG-", Un = "styles-module__Empty___gexrS", Vn = "styles-module__PlaceholderText___x2ya0", Gn = "styles-module__PlaceholderTextError___i8VXv", ie = {
|
|
1249
|
+
Container: jn,
|
|
1250
|
+
Empty: Un,
|
|
1251
|
+
PlaceholderText: Vn,
|
|
1252
|
+
PlaceholderTextError: Gn
|
|
1253
|
+
}, Kn = "styles-module__Toast___ZqZzU", Jn = "styles-module__Toast__Icon___PWXSy", Xn = "styles-module__Toast__Body___wezPs", qn = "styles-module__Toast__Message___NFsgm", de = {
|
|
1254
|
+
Toast: Kn,
|
|
1255
|
+
Toast__Icon: Jn,
|
|
1256
|
+
Toast__Body: Xn,
|
|
1257
|
+
Toast__Message: qn
|
|
1258
|
+
}, ut = (e) => typeof e == "string" ? { message: e } : e, mt = (e, r) => {
|
|
1259
|
+
const { autoClose: n, icon: t, message: o } = ut(e);
|
|
1260
|
+
return {
|
|
1261
|
+
id: r,
|
|
1262
|
+
message: /* @__PURE__ */ l("div", { className: de.Toast__Message, children: o }),
|
|
1263
|
+
icon: t,
|
|
1264
|
+
autoClose: n,
|
|
1265
|
+
classNames: {
|
|
1266
|
+
root: de.Toast,
|
|
1267
|
+
body: de.Toast__Body,
|
|
1268
|
+
icon: de.Toast__Icon
|
|
1269
|
+
},
|
|
1270
|
+
withCloseButton: !1,
|
|
1271
|
+
withBorder: !1
|
|
1272
|
+
};
|
|
1273
|
+
}, se = (e) => {
|
|
1274
|
+
const r = ut(e);
|
|
1275
|
+
he.show(mt(e, r.id));
|
|
1276
|
+
};
|
|
1277
|
+
se.update = (e, r) => {
|
|
1278
|
+
he.update(mt(r, e));
|
|
1279
|
+
};
|
|
1280
|
+
se.hide = (e) => {
|
|
1281
|
+
he.hide(e);
|
|
1282
|
+
};
|
|
1283
|
+
se.clean = () => {
|
|
1284
|
+
he.clean();
|
|
1285
|
+
};
|
|
1286
|
+
const He = { "application/json": [".json"] };
|
|
1287
|
+
function Ye({
|
|
1130
1288
|
item: e,
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1289
|
+
sortableId: r,
|
|
1290
|
+
totalCount: n,
|
|
1291
|
+
width: t,
|
|
1292
|
+
height: o,
|
|
1293
|
+
readOnly: s,
|
|
1294
|
+
isLoading: a,
|
|
1295
|
+
canDelete: i,
|
|
1296
|
+
hasLink: c,
|
|
1297
|
+
onLinkClick: p,
|
|
1298
|
+
onDelete: d
|
|
1140
1299
|
}) {
|
|
1141
|
-
const [
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
!e.file && !e.url || (u(!0), e.file ? tt(e.file).then((f) => {
|
|
1150
|
-
_(f), u(!1);
|
|
1151
|
-
}) : e.url && fetch(e.url).then((f) => f.json()).then((f) => {
|
|
1152
|
-
_(et(f) ? f : null), u(!1);
|
|
1300
|
+
const u = !e.animationData && !!(e.file || e.url) ? `${e.id}|${e.file ? `${e.file.name}:${e.file.size}` : e.url ?? ""}` : "", [m, f] = I({ key: "", data: null }), h = e.animationData ?? (m.key === u ? m.data : null), g = !!u && m.key !== u;
|
|
1301
|
+
return X(() => {
|
|
1302
|
+
if (!u) return;
|
|
1303
|
+
let y = !1;
|
|
1304
|
+
return (e.file ? Ie(e.file) : fetch(e.url).then((M) => M.json()).then(
|
|
1305
|
+
(M) => dt(M) ? M : null
|
|
1306
|
+
)).then((M) => {
|
|
1307
|
+
y || f({ key: u, data: M });
|
|
1153
1308
|
}).catch(() => {
|
|
1154
|
-
|
|
1155
|
-
}))
|
|
1156
|
-
|
|
1157
|
-
|
|
1309
|
+
y || f({ key: u, data: null });
|
|
1310
|
+
}), () => {
|
|
1311
|
+
y = !0;
|
|
1312
|
+
};
|
|
1313
|
+
}, [u, e.file]), /* @__PURE__ */ l(
|
|
1314
|
+
ct,
|
|
1158
1315
|
{
|
|
1159
|
-
id: e.id,
|
|
1160
|
-
totalCount:
|
|
1161
|
-
width:
|
|
1162
|
-
height:
|
|
1163
|
-
readOnly:
|
|
1164
|
-
isLoading:
|
|
1165
|
-
itemIsLoading: e.isLoading ||
|
|
1166
|
-
canDelete:
|
|
1167
|
-
hasLink:
|
|
1316
|
+
id: r ?? e.id,
|
|
1317
|
+
totalCount: n,
|
|
1318
|
+
width: t,
|
|
1319
|
+
height: o,
|
|
1320
|
+
readOnly: s,
|
|
1321
|
+
isLoading: a,
|
|
1322
|
+
itemIsLoading: e.isLoading || g,
|
|
1323
|
+
canDelete: i,
|
|
1324
|
+
hasLink: c,
|
|
1168
1325
|
linkUrl: e.url,
|
|
1169
|
-
onLinkClick:
|
|
1170
|
-
onDelete: () =>
|
|
1326
|
+
onLinkClick: p ? () => p(e) : void 0,
|
|
1327
|
+
onDelete: () => d(e.id),
|
|
1171
1328
|
deleteAriaLabel: "Lottie 삭제",
|
|
1172
|
-
children:
|
|
1173
|
-
|
|
1329
|
+
children: h ? /* @__PURE__ */ l(
|
|
1330
|
+
ar,
|
|
1174
1331
|
{
|
|
1175
|
-
animationData:
|
|
1332
|
+
animationData: h,
|
|
1176
1333
|
loop: !0,
|
|
1177
1334
|
autoplay: !0,
|
|
1178
|
-
style: { width:
|
|
1335
|
+
style: { width: t, height: o, display: "block" }
|
|
1179
1336
|
}
|
|
1180
|
-
) : /* @__PURE__ */ l("div", { className: ie.Empty, style: { width:
|
|
1337
|
+
) : /* @__PURE__ */ l("div", { className: ie.Empty, style: { width: t, height: o } })
|
|
1181
1338
|
}
|
|
1182
1339
|
);
|
|
1183
1340
|
}
|
|
1184
|
-
const
|
|
1341
|
+
const _a = ({
|
|
1185
1342
|
value: e = [],
|
|
1186
1343
|
onChange: r,
|
|
1187
1344
|
width: n = 160,
|
|
@@ -1190,100 +1347,158 @@ const Xo = ({
|
|
|
1190
1347
|
hasIcon: s = !0,
|
|
1191
1348
|
hasLink: a = !1,
|
|
1192
1349
|
onLinkClick: i,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1350
|
+
length: c,
|
|
1351
|
+
minLength: p,
|
|
1352
|
+
maxLength: d,
|
|
1353
|
+
errorMsg: _,
|
|
1354
|
+
isLoading: u,
|
|
1355
|
+
readOnly: m,
|
|
1356
|
+
gap: f = 8,
|
|
1357
|
+
canDelete: h = !0
|
|
1200
1358
|
}) => {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1359
|
+
process.env.NODE_ENV !== "production" && c != null && (p != null || d != null) && console.warn(
|
|
1360
|
+
"LottieInput: length와 minLength/maxLength가 동시에 지정되었습니다. length가 우선 적용됩니다."
|
|
1361
|
+
);
|
|
1362
|
+
const {
|
|
1363
|
+
isPositionMode: g,
|
|
1364
|
+
resolvedMaxLength: y,
|
|
1365
|
+
placeholderCount: C,
|
|
1366
|
+
slotIds: M,
|
|
1367
|
+
sortableItems: F,
|
|
1368
|
+
sensors: E,
|
|
1369
|
+
handleDragEnd: Y,
|
|
1370
|
+
getMetaIndex: R
|
|
1371
|
+
} = _t({ value: e, length: c, minLength: p, maxLength: d, onChange: r }), w = !!_, P = async (S) => {
|
|
1372
|
+
if (m) return;
|
|
1373
|
+
const v = [...S].sort((T, D) => T.name.localeCompare(D.name)), $ = await Promise.all(v.map(Ie));
|
|
1374
|
+
let j = 0;
|
|
1375
|
+
const B = v.filter((T, D) => $[D] !== null ? !0 : (j++, !1));
|
|
1376
|
+
if (j > 0 && se({
|
|
1377
|
+
id: "invalid-lottie-files",
|
|
1378
|
+
message: j === 1 ? "유효하지 않은 Lottie JSON 파일입니다" : `${j}개의 파일이 유효하지 않은 Lottie JSON입니다`
|
|
1379
|
+
}), B.length === 0) return;
|
|
1380
|
+
const O = e.length, U = Yn(e, B, y);
|
|
1381
|
+
U.length !== O && r?.(U, {
|
|
1382
|
+
action: "create",
|
|
1383
|
+
itemId: U[O].id,
|
|
1384
|
+
index: O
|
|
1385
|
+
});
|
|
1386
|
+
}, k = async (S, v) => {
|
|
1387
|
+
if (m) return;
|
|
1388
|
+
const $ = v[0];
|
|
1389
|
+
if (!$) return;
|
|
1390
|
+
if (!await Ie($)) {
|
|
1391
|
+
se({
|
|
1392
|
+
id: "invalid-lottie-files",
|
|
1393
|
+
message: "유효하지 않은 Lottie JSON 파일입니다"
|
|
1211
1394
|
});
|
|
1395
|
+
return;
|
|
1212
1396
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
const b = [...M].sort((T, O) => T.name.localeCompare(O.name)), B = await Promise.all(b.map(tt));
|
|
1216
|
-
let k = 0;
|
|
1217
|
-
const x = b.filter((T, O) => B[O] !== null ? !0 : (k++, !1));
|
|
1218
|
-
if (k > 0 && ee({
|
|
1219
|
-
id: "invalid-lottie-files",
|
|
1220
|
-
message: k === 1 ? "유효하지 않은 Lottie JSON 파일입니다" : `${k}개의 파일이 유효하지 않은 Lottie JSON입니다`
|
|
1221
|
-
}), x.length === 0) return;
|
|
1222
|
-
const g = e.length, y = En(e, x, m);
|
|
1223
|
-
y.length !== g && r?.(y, {
|
|
1397
|
+
const B = Zn(e, $, S);
|
|
1398
|
+
r?.(B, {
|
|
1224
1399
|
action: "create",
|
|
1225
|
-
itemId:
|
|
1226
|
-
index:
|
|
1400
|
+
itemId: B[B.length - 1].id,
|
|
1401
|
+
index: S
|
|
1227
1402
|
});
|
|
1228
|
-
},
|
|
1229
|
-
if (
|
|
1230
|
-
const
|
|
1231
|
-
r?.(
|
|
1232
|
-
},
|
|
1233
|
-
const
|
|
1234
|
-
return typeof
|
|
1235
|
-
`).map((
|
|
1403
|
+
}, L = (S) => {
|
|
1404
|
+
if (m) return;
|
|
1405
|
+
const v = R(S), $ = Wn(e, S);
|
|
1406
|
+
r?.($, { action: "delete", itemId: S, index: v });
|
|
1407
|
+
}, N = (S) => {
|
|
1408
|
+
const v = typeof o == "function" ? o(S) : o;
|
|
1409
|
+
return typeof v != "string" ? v : v.split(`
|
|
1410
|
+
`).map(($, j) => /* @__PURE__ */ l("span", { children: $ }, j));
|
|
1236
1411
|
};
|
|
1237
|
-
return /* @__PURE__ */
|
|
1238
|
-
/* @__PURE__ */ l(
|
|
1239
|
-
e.
|
|
1240
|
-
|
|
1412
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
1413
|
+
/* @__PURE__ */ l(Qe, { sensors: E, collisionDetection: et, onDragEnd: Y, children: /* @__PURE__ */ l(nt, { items: F, strategy: ot, children: /* @__PURE__ */ l("div", { className: ie.Container, style: { gap: f }, children: g ? Array.from({ length: y }, (S, v) => {
|
|
1414
|
+
const $ = M[v], j = e.find((B) => B.position === v);
|
|
1415
|
+
return j ? /* @__PURE__ */ l(
|
|
1416
|
+
Ye,
|
|
1241
1417
|
{
|
|
1242
|
-
item:
|
|
1418
|
+
item: j,
|
|
1419
|
+
sortableId: $,
|
|
1420
|
+
totalCount: y,
|
|
1421
|
+
width: n,
|
|
1422
|
+
height: t,
|
|
1423
|
+
readOnly: m ?? !1,
|
|
1424
|
+
isLoading: u,
|
|
1425
|
+
canDelete: h,
|
|
1426
|
+
hasLink: a,
|
|
1427
|
+
onLinkClick: i,
|
|
1428
|
+
onDelete: L
|
|
1429
|
+
},
|
|
1430
|
+
$
|
|
1431
|
+
) : !m && /* @__PURE__ */ l(lt, { id: $, children: /* @__PURE__ */ x(
|
|
1432
|
+
pe,
|
|
1433
|
+
{
|
|
1434
|
+
onDrop: (B) => k(v, B),
|
|
1435
|
+
accept: He,
|
|
1436
|
+
multiple: !1,
|
|
1437
|
+
isLoading: u,
|
|
1438
|
+
isError: w,
|
|
1439
|
+
width: n,
|
|
1440
|
+
height: t,
|
|
1441
|
+
children: [
|
|
1442
|
+
s && /* @__PURE__ */ l(ue, { size: 36, color: w ? "#e03131" : "#07a3c6" }),
|
|
1443
|
+
o && /* @__PURE__ */ l(
|
|
1444
|
+
"div",
|
|
1445
|
+
{
|
|
1446
|
+
className: `${ie.PlaceholderText}${w ? ` ${ie.PlaceholderTextError}` : ""}`,
|
|
1447
|
+
children: N(v)
|
|
1448
|
+
}
|
|
1449
|
+
)
|
|
1450
|
+
]
|
|
1451
|
+
}
|
|
1452
|
+
) }, $);
|
|
1453
|
+
}) : /* @__PURE__ */ x(Ve, { children: [
|
|
1454
|
+
e.map((S) => /* @__PURE__ */ l(
|
|
1455
|
+
Ye,
|
|
1456
|
+
{
|
|
1457
|
+
item: S,
|
|
1243
1458
|
totalCount: e.length,
|
|
1244
1459
|
width: n,
|
|
1245
1460
|
height: t,
|
|
1246
|
-
readOnly:
|
|
1247
|
-
isLoading:
|
|
1248
|
-
canDelete:
|
|
1461
|
+
readOnly: m ?? !1,
|
|
1462
|
+
isLoading: u,
|
|
1463
|
+
canDelete: h,
|
|
1249
1464
|
hasLink: a,
|
|
1250
1465
|
onLinkClick: i,
|
|
1251
|
-
onDelete:
|
|
1466
|
+
onDelete: L
|
|
1252
1467
|
},
|
|
1253
|
-
|
|
1468
|
+
S.id
|
|
1254
1469
|
)),
|
|
1255
|
-
!
|
|
1256
|
-
|
|
1470
|
+
!m && Array.from({ length: C }, (S, v) => /* @__PURE__ */ x(
|
|
1471
|
+
pe,
|
|
1257
1472
|
{
|
|
1258
|
-
onDrop:
|
|
1259
|
-
accept:
|
|
1260
|
-
multiple:
|
|
1261
|
-
isLoading:
|
|
1262
|
-
isError:
|
|
1473
|
+
onDrop: P,
|
|
1474
|
+
accept: He,
|
|
1475
|
+
multiple: y !== 1,
|
|
1476
|
+
isLoading: u,
|
|
1477
|
+
isError: w,
|
|
1263
1478
|
width: n,
|
|
1264
1479
|
height: t,
|
|
1265
1480
|
children: [
|
|
1266
|
-
s && /* @__PURE__ */ l(
|
|
1481
|
+
s && /* @__PURE__ */ l(ue, { size: 36, color: w ? "#e03131" : "#07a3c6" }),
|
|
1267
1482
|
o && /* @__PURE__ */ l(
|
|
1268
1483
|
"div",
|
|
1269
1484
|
{
|
|
1270
|
-
className: `${ie.PlaceholderText}${
|
|
1271
|
-
children: v
|
|
1485
|
+
className: `${ie.PlaceholderText}${w ? ` ${ie.PlaceholderTextError}` : ""}`,
|
|
1486
|
+
children: N(v)
|
|
1272
1487
|
}
|
|
1273
1488
|
)
|
|
1274
1489
|
]
|
|
1275
1490
|
},
|
|
1276
|
-
`placeholder-${
|
|
1491
|
+
`placeholder-${v}`
|
|
1277
1492
|
))
|
|
1278
|
-
] }) }) }),
|
|
1279
|
-
|
|
1493
|
+
] }) }) }) }),
|
|
1494
|
+
w && /* @__PURE__ */ l(J.Error, { mt: 8, children: _ })
|
|
1280
1495
|
] });
|
|
1281
|
-
},
|
|
1282
|
-
Pagination:
|
|
1283
|
-
Pagination__PageIndex:
|
|
1496
|
+
}, Qn = "style-module__Pagination___xcR-Q", eo = "style-module__Pagination__PageIndex___50SZJ", to = "style-module__Pagination__Arrow___74vp3", le = {
|
|
1497
|
+
Pagination: Qn,
|
|
1498
|
+
Pagination__PageIndex: eo,
|
|
1284
1499
|
"Pagination__PageIndex--Active": "style-module__Pagination__PageIndex--Active___mSIwS",
|
|
1285
|
-
Pagination__Arrow:
|
|
1286
|
-
},
|
|
1500
|
+
Pagination__Arrow: to
|
|
1501
|
+
}, da = ({
|
|
1287
1502
|
currentPageIdx: e,
|
|
1288
1503
|
rowsPerPage: r,
|
|
1289
1504
|
totalLength: n,
|
|
@@ -1291,24 +1506,24 @@ const Xo = ({
|
|
|
1291
1506
|
onPageChange: o,
|
|
1292
1507
|
...s
|
|
1293
1508
|
}) => {
|
|
1294
|
-
const [a, i] =
|
|
1295
|
-
|
|
1509
|
+
const [a, i] = I(e), c = r || 50, p = n || 1, d = t || 5;
|
|
1510
|
+
X(() => {
|
|
1296
1511
|
i(e);
|
|
1297
1512
|
}, [e]);
|
|
1298
1513
|
const _ = () => {
|
|
1299
|
-
o && o(a - (a % d + 1)), i((
|
|
1300
|
-
},
|
|
1301
|
-
o && o(a + d - a % d), i((
|
|
1514
|
+
o && o(a - (a % d + 1)), i((m) => m - (m % d + 1));
|
|
1515
|
+
}, u = () => {
|
|
1516
|
+
o && o(a + d - a % d), i((m) => m + d - m % d);
|
|
1302
1517
|
};
|
|
1303
|
-
return /* @__PURE__ */
|
|
1304
|
-
a >= d ? /* @__PURE__ */ l("button", { className:
|
|
1305
|
-
new Array(d).fill(0).map((
|
|
1518
|
+
return /* @__PURE__ */ x("div", { ...s, className: le.Pagination, children: [
|
|
1519
|
+
a >= d ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: _, children: /* @__PURE__ */ l(Je, { size: 20 }) }) : null,
|
|
1520
|
+
new Array(d).fill(0).map((m, f) => {
|
|
1306
1521
|
const h = Math.floor(a / d) * d + f + 1;
|
|
1307
|
-
if (!(h > Math.ceil(
|
|
1522
|
+
if (!(h > Math.ceil(p / c)))
|
|
1308
1523
|
return /* @__PURE__ */ l(
|
|
1309
1524
|
"button",
|
|
1310
1525
|
{
|
|
1311
|
-
className: a === h - 1 ?
|
|
1526
|
+
className: a === h - 1 ? le["Pagination__PageIndex--Active"] : le.Pagination__PageIndex,
|
|
1312
1527
|
onClick: () => {
|
|
1313
1528
|
i(h - 1), o && o(h - 1);
|
|
1314
1529
|
},
|
|
@@ -1317,24 +1532,24 @@ const Xo = ({
|
|
|
1317
1532
|
`pagination_${f}`
|
|
1318
1533
|
);
|
|
1319
1534
|
}),
|
|
1320
|
-
Math.floor(a / d) * d + d < Math.ceil(
|
|
1535
|
+
Math.floor(a / d) * d + d < Math.ceil(p / c) ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: u, children: /* @__PURE__ */ l(Ke, { size: 20 }) }) : null
|
|
1321
1536
|
] });
|
|
1322
|
-
},
|
|
1537
|
+
}, Pe = {
|
|
1323
1538
|
"Radio--Small": "styles-module__Radio--Small___izWI2",
|
|
1324
1539
|
"Radio--Medium": "styles-module__Radio--Medium___dwZfV",
|
|
1325
1540
|
"Radio--Large": "styles-module__Radio--Large___1gLra"
|
|
1326
|
-
},
|
|
1327
|
-
sm:
|
|
1328
|
-
md:
|
|
1329
|
-
lg:
|
|
1330
|
-
},
|
|
1541
|
+
}, ro = {
|
|
1542
|
+
sm: Pe["Radio--Small"],
|
|
1543
|
+
md: Pe["Radio--Medium"],
|
|
1544
|
+
lg: Pe["Radio--Large"]
|
|
1545
|
+
}, no = {
|
|
1331
1546
|
sm: 18,
|
|
1332
1547
|
md: 24,
|
|
1333
1548
|
lg: 32
|
|
1334
|
-
},
|
|
1335
|
-
const n =
|
|
1549
|
+
}, ua = ({ size: e = "md", ...r }) => {
|
|
1550
|
+
const n = ro[e], t = no[e];
|
|
1336
1551
|
return /* @__PURE__ */ l(
|
|
1337
|
-
|
|
1552
|
+
bt,
|
|
1338
1553
|
{
|
|
1339
1554
|
className: n,
|
|
1340
1555
|
size: e,
|
|
@@ -1344,7 +1559,7 @@ const Xo = ({
|
|
|
1344
1559
|
...r
|
|
1345
1560
|
}
|
|
1346
1561
|
);
|
|
1347
|
-
},
|
|
1562
|
+
}, oo = "styles-module__SearchBar__Wrapper___oq49s", ao = "styles-module__SearchBar__Description___vucS-", so = "styles-module__SearchBar__ErrorMsg___TOeoy", io = "styles-module__SearchBar__ClearButton___S-y4P", V = {
|
|
1348
1563
|
"SearchBar--LeftLabel": "styles-module__SearchBar--LeftLabel___CeYTM",
|
|
1349
1564
|
"SearchBar--TopLabel": "styles-module__SearchBar--TopLabel___spN3I",
|
|
1350
1565
|
"SearchBar__Label--Small": "styles-module__SearchBar__Label--Small___zS1L2",
|
|
@@ -1353,14 +1568,14 @@ const Xo = ({
|
|
|
1353
1568
|
"SearchBar__Tooltip--Small": "styles-module__SearchBar__Tooltip--Small___YhmEr",
|
|
1354
1569
|
"SearchBar__Tooltip--Medium": "styles-module__SearchBar__Tooltip--Medium___4JhOv",
|
|
1355
1570
|
"SearchBar__Tooltip--Large": "styles-module__SearchBar__Tooltip--Large___IEoPv",
|
|
1356
|
-
SearchBar__Wrapper:
|
|
1571
|
+
SearchBar__Wrapper: oo,
|
|
1357
1572
|
"SearchBar--Small": "styles-module__SearchBar--Small___SY9CN",
|
|
1358
1573
|
"SearchBar--Medium": "styles-module__SearchBar--Medium___vLP08",
|
|
1359
1574
|
"SearchBar--Large": "styles-module__SearchBar--Large___JHfHP",
|
|
1360
|
-
SearchBar__Description:
|
|
1361
|
-
SearchBar__ErrorMsg:
|
|
1362
|
-
SearchBar__ClearButton:
|
|
1363
|
-
},
|
|
1575
|
+
SearchBar__Description: ao,
|
|
1576
|
+
SearchBar__ErrorMsg: so,
|
|
1577
|
+
SearchBar__ClearButton: io
|
|
1578
|
+
}, ma = ({
|
|
1364
1579
|
label: e,
|
|
1365
1580
|
labelPosition: r = "top",
|
|
1366
1581
|
size: n = "md",
|
|
@@ -1370,54 +1585,54 @@ const Xo = ({
|
|
|
1370
1585
|
errorMsg: a,
|
|
1371
1586
|
description: i,
|
|
1372
1587
|
onChange: c,
|
|
1373
|
-
onClear:
|
|
1588
|
+
onClear: p,
|
|
1374
1589
|
...d
|
|
1375
1590
|
}) => {
|
|
1376
|
-
const [_,
|
|
1377
|
-
let
|
|
1378
|
-
n === "sm" ? (
|
|
1379
|
-
const
|
|
1380
|
-
(
|
|
1381
|
-
c && (
|
|
1591
|
+
const [_, u] = I(0);
|
|
1592
|
+
let m = V["SearchBar__Label--Medium"], f = V["SearchBar--Medium"], h = V["SearchBar__Tooltip--Medium"];
|
|
1593
|
+
n === "sm" ? (m = V["SearchBar__Label--Small"], f = V["SearchBar--Small"], h = V["SearchBar__Tooltip--Small"]) : n === "lg" && (m = V["SearchBar__Label--Large"], f = V["SearchBar--Large"], h = V["SearchBar__Tooltip--Large"]);
|
|
1594
|
+
const g = H(
|
|
1595
|
+
(y) => {
|
|
1596
|
+
c && (u(y?.length), c(y));
|
|
1382
1597
|
},
|
|
1383
1598
|
[c]
|
|
1384
1599
|
);
|
|
1385
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ x(
|
|
1386
1601
|
"div",
|
|
1387
1602
|
{
|
|
1388
|
-
className: r === "top" ?
|
|
1603
|
+
className: r === "top" ? V["SearchBar--TopLabel"] : V["SearchBar--LeftLabel"],
|
|
1389
1604
|
children: [
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
e && /* @__PURE__ */ l(
|
|
1392
|
-
o && /* @__PURE__ */ l(
|
|
1605
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1606
|
+
e && /* @__PURE__ */ l(J.Label, { required: t, className: m, children: e }),
|
|
1607
|
+
o && /* @__PURE__ */ l(fe, { label: o, position: s, children: /* @__PURE__ */ l("div", { className: h, children: /* @__PURE__ */ l(Ee, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16 }) }) })
|
|
1393
1608
|
] }),
|
|
1394
|
-
/* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */ l("div", { className:
|
|
1396
|
-
|
|
1609
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1610
|
+
/* @__PURE__ */ l("div", { className: V.SearchBar__Wrapper, children: /* @__PURE__ */ l(
|
|
1611
|
+
St,
|
|
1397
1612
|
{
|
|
1398
1613
|
...d,
|
|
1399
1614
|
size: n,
|
|
1400
1615
|
error: a,
|
|
1401
1616
|
className: f,
|
|
1402
|
-
onChange:
|
|
1403
|
-
leftSection: /* @__PURE__ */ l(
|
|
1404
|
-
rightSection:
|
|
1617
|
+
onChange: g,
|
|
1618
|
+
leftSection: /* @__PURE__ */ l(Wt, { size: n === "sm" ? 16 : n === "lg" ? 24 : 20 }),
|
|
1619
|
+
rightSection: p && _ > 0 ? /* @__PURE__ */ l("div", { className: V.SearchBar__ClearButton, onClick: p, children: /* @__PURE__ */ l(Ae, { size: n === "sm" ? 16 : n === "lg" ? 24 : 20 }) }) : void 0
|
|
1405
1620
|
}
|
|
1406
1621
|
) }),
|
|
1407
|
-
i && /* @__PURE__ */ l(
|
|
1408
|
-
a && /* @__PURE__ */ l(
|
|
1622
|
+
i && /* @__PURE__ */ l(J.Description, { className: V.SearchBar__Description, children: i }),
|
|
1623
|
+
a && /* @__PURE__ */ l(J.Error, { className: V.SearchBar__ErrorMsg, children: a })
|
|
1409
1624
|
] })
|
|
1410
1625
|
]
|
|
1411
1626
|
}
|
|
1412
1627
|
);
|
|
1413
|
-
},
|
|
1628
|
+
}, Me = {
|
|
1414
1629
|
"SegmentButton--Small": "styles-module__SegmentButton--Small___o0Y3t",
|
|
1415
1630
|
"SegmentButton--Medium": "styles-module__SegmentButton--Medium___EgCJm",
|
|
1416
1631
|
"SegmentButton--Large": "styles-module__SegmentButton--Large___Ym86C"
|
|
1417
|
-
},
|
|
1418
|
-
let t =
|
|
1419
|
-
return e === "sm" ? t =
|
|
1420
|
-
|
|
1632
|
+
}, pa = ({ size: e = "md", radius: r = 6, ...n }) => {
|
|
1633
|
+
let t = Me["SegmentButton--Medium"];
|
|
1634
|
+
return e === "sm" ? t = Me["SegmentButton--Small"] : e === "lg" && (t = Me["SegmentButton--Large"]), /* @__PURE__ */ l(
|
|
1635
|
+
Tt,
|
|
1421
1636
|
{
|
|
1422
1637
|
className: t,
|
|
1423
1638
|
size: e,
|
|
@@ -1426,16 +1641,16 @@ const Xo = ({
|
|
|
1426
1641
|
...n
|
|
1427
1642
|
}
|
|
1428
1643
|
);
|
|
1429
|
-
},
|
|
1430
|
-
Tab__TitleList:
|
|
1431
|
-
Tab__BorderBottom:
|
|
1432
|
-
},
|
|
1433
|
-
/* @__PURE__ */ l(
|
|
1644
|
+
}, lo = "styles-module__Tab__TitleList___urHWH", co = "styles-module__Tab__BorderBottom___eMTpl", We = {
|
|
1645
|
+
Tab__TitleList: lo,
|
|
1646
|
+
Tab__BorderBottom: co
|
|
1647
|
+
}, fa = ({ tabList: e = [], containerPaddingTop: r, ...n }) => /* @__PURE__ */ x(ce, { ...n, children: [
|
|
1648
|
+
/* @__PURE__ */ l(ce.List, { className: We.Tab__TitleList, children: e?.map((t, o) => /* @__PURE__ */ x(ce.Tab, { value: t.value, leftSection: t.icon, children: [
|
|
1434
1649
|
t.title,
|
|
1435
|
-
/* @__PURE__ */ l("div", { className:
|
|
1650
|
+
/* @__PURE__ */ l("div", { className: We.Tab__BorderBottom })
|
|
1436
1651
|
] }, `tab_${o}`)) }),
|
|
1437
|
-
e?.map((t, o) => /* @__PURE__ */ l(
|
|
1438
|
-
] }),
|
|
1652
|
+
e?.map((t, o) => /* @__PURE__ */ l(ce.Panel, { value: t.value, pt: r, children: t.body }, `tab_panel_${o}`))
|
|
1653
|
+
] }), _o = "styles-module__TextField__Wrapper___u6p5Z", uo = "styles-module__TextField__TextCounter___u1jM5", mo = "styles-module__TextField__Description___J-kXP", po = "styles-module__TextField__ErrorMsg___fa6f6", fo = "styles-module__TextField__ClearButton___bB5Ew", W = {
|
|
1439
1654
|
"TextField--LeftLabel": "styles-module__TextField--LeftLabel___hiNn3",
|
|
1440
1655
|
"TextField--TopLabel": "styles-module__TextField--TopLabel___V2otc",
|
|
1441
1656
|
"TextField__Label--Small": "styles-module__TextField__Label--Small___NkKKA",
|
|
@@ -1444,16 +1659,16 @@ const Xo = ({
|
|
|
1444
1659
|
"TextField__Tooltip--Small": "styles-module__TextField__Tooltip--Small___GmQHE",
|
|
1445
1660
|
"TextField__Tooltip--Medium": "styles-module__TextField__Tooltip--Medium___5P3nA",
|
|
1446
1661
|
"TextField__Tooltip--Large": "styles-module__TextField__Tooltip--Large___YSCfu",
|
|
1447
|
-
TextField__Wrapper:
|
|
1448
|
-
TextField__TextCounter:
|
|
1662
|
+
TextField__Wrapper: _o,
|
|
1663
|
+
TextField__TextCounter: uo,
|
|
1449
1664
|
"TextField--Textarea": "styles-module__TextField--Textarea___C2DL5",
|
|
1450
1665
|
"TextField--Small": "styles-module__TextField--Small___iuH4t",
|
|
1451
1666
|
"TextField--Medium": "styles-module__TextField--Medium___snYod",
|
|
1452
1667
|
"TextField--Large": "styles-module__TextField--Large___JoSYk",
|
|
1453
|
-
TextField__Description:
|
|
1454
|
-
TextField__ErrorMsg:
|
|
1455
|
-
TextField__ClearButton:
|
|
1456
|
-
},
|
|
1668
|
+
TextField__Description: mo,
|
|
1669
|
+
TextField__ErrorMsg: po,
|
|
1670
|
+
TextField__ClearButton: fo
|
|
1671
|
+
}, ho = (e) => typeof e == "string" ? e.length : typeof e == "number" ? String(e).length : Array.isArray(e) ? e.join("").length : 0, ha = (e) => {
|
|
1457
1672
|
const {
|
|
1458
1673
|
label: r,
|
|
1459
1674
|
labelPosition: n = "top",
|
|
@@ -1463,139 +1678,139 @@ const Xo = ({
|
|
|
1463
1678
|
tooltipPosition: a = "top",
|
|
1464
1679
|
errorMsg: i,
|
|
1465
1680
|
description: c,
|
|
1466
|
-
textarea:
|
|
1681
|
+
textarea: p = !1,
|
|
1467
1682
|
maxTextCount: d,
|
|
1468
1683
|
onChange: _,
|
|
1469
|
-
onClear:
|
|
1470
|
-
...
|
|
1684
|
+
onClear: u,
|
|
1685
|
+
...m
|
|
1471
1686
|
} = e, f = "minRows" in e ? e.minRows : void 0, {
|
|
1472
1687
|
value: h,
|
|
1473
|
-
defaultValue:
|
|
1474
|
-
...
|
|
1475
|
-
} =
|
|
1476
|
-
String(h ??
|
|
1477
|
-
),
|
|
1478
|
-
let
|
|
1479
|
-
t === "sm" ? (
|
|
1480
|
-
const
|
|
1481
|
-
(
|
|
1482
|
-
const
|
|
1483
|
-
d &&
|
|
1688
|
+
defaultValue: g,
|
|
1689
|
+
...y
|
|
1690
|
+
} = m, C = h !== void 0, [M, F] = I(
|
|
1691
|
+
String(h ?? g ?? "")
|
|
1692
|
+
), E = C ? h : M, Y = ho(E);
|
|
1693
|
+
let R = W["TextField__Label--Medium"], w = W["TextField--Medium"], P = W["TextField__Tooltip--Medium"];
|
|
1694
|
+
t === "sm" ? (R = W["TextField__Label--Small"], w = W["TextField--Small"], P = W["TextField__Tooltip--Small"]) : t === "lg" && (R = W["TextField__Label--Large"], w = W["TextField--Large"], P = W["TextField__Tooltip--Large"]);
|
|
1695
|
+
const k = H(
|
|
1696
|
+
(N) => {
|
|
1697
|
+
const S = N.currentTarget.value;
|
|
1698
|
+
d && S.length > d || (C || F(S), _ && _(N));
|
|
1484
1699
|
},
|
|
1485
|
-
[
|
|
1486
|
-
),
|
|
1487
|
-
|
|
1488
|
-
}, [
|
|
1489
|
-
return /* @__PURE__ */
|
|
1700
|
+
[C, d, _]
|
|
1701
|
+
), L = H(() => {
|
|
1702
|
+
C || F(""), u?.();
|
|
1703
|
+
}, [C, u]);
|
|
1704
|
+
return /* @__PURE__ */ x(
|
|
1490
1705
|
"div",
|
|
1491
1706
|
{
|
|
1492
|
-
className: n === "top" ?
|
|
1707
|
+
className: n === "top" ? W["TextField--TopLabel"] : W["TextField--LeftLabel"],
|
|
1493
1708
|
children: [
|
|
1494
|
-
/* @__PURE__ */
|
|
1495
|
-
r && /* @__PURE__ */ l(
|
|
1496
|
-
s && /* @__PURE__ */ l(
|
|
1709
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1710
|
+
r && /* @__PURE__ */ l(J.Label, { required: o, className: R, children: r }),
|
|
1711
|
+
s && /* @__PURE__ */ l(fe, { label: s, position: a, children: /* @__PURE__ */ l("div", { className: P, children: /* @__PURE__ */ l(Ee, { size: t === "sm" ? 14 : t === "lg" ? 20 : 16 }) }) })
|
|
1497
1712
|
] }),
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
|
|
1501
|
-
|
|
1713
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1714
|
+
/* @__PURE__ */ x("div", { className: W.TextField__Wrapper, children: [
|
|
1715
|
+
p ? /* @__PURE__ */ l(
|
|
1716
|
+
wt,
|
|
1502
1717
|
{
|
|
1503
|
-
className:
|
|
1718
|
+
className: W["TextField--Textarea"],
|
|
1504
1719
|
size: t,
|
|
1505
1720
|
minRows: f,
|
|
1506
1721
|
error: i,
|
|
1507
|
-
onChange:
|
|
1508
|
-
value:
|
|
1509
|
-
...
|
|
1722
|
+
onChange: k,
|
|
1723
|
+
value: E,
|
|
1724
|
+
...y
|
|
1510
1725
|
}
|
|
1511
1726
|
) : /* @__PURE__ */ l(
|
|
1512
|
-
|
|
1727
|
+
J,
|
|
1513
1728
|
{
|
|
1514
|
-
className:
|
|
1729
|
+
className: w,
|
|
1515
1730
|
error: i,
|
|
1516
|
-
onChange:
|
|
1517
|
-
value:
|
|
1518
|
-
rightSection:
|
|
1731
|
+
onChange: k,
|
|
1732
|
+
value: E,
|
|
1733
|
+
rightSection: u && Y > 0 ? /* @__PURE__ */ l(
|
|
1519
1734
|
"button",
|
|
1520
1735
|
{
|
|
1521
1736
|
type: "button",
|
|
1522
|
-
className:
|
|
1737
|
+
className: W.TextField__ClearButton,
|
|
1523
1738
|
"aria-label": "입력 내용 지우기",
|
|
1524
|
-
onClick:
|
|
1525
|
-
children: /* @__PURE__ */ l(
|
|
1739
|
+
onClick: L,
|
|
1740
|
+
children: /* @__PURE__ */ l(Ae, { size: t === "sm" ? 16 : t === "lg" ? 24 : 20 })
|
|
1526
1741
|
}
|
|
1527
1742
|
) : void 0,
|
|
1528
|
-
...
|
|
1743
|
+
...y
|
|
1529
1744
|
}
|
|
1530
1745
|
),
|
|
1531
1746
|
d && d > 0 && /* @__PURE__ */ l(
|
|
1532
1747
|
"span",
|
|
1533
1748
|
{
|
|
1534
|
-
className:
|
|
1535
|
-
children: `${
|
|
1749
|
+
className: W.TextField__TextCounter,
|
|
1750
|
+
children: `${Y}/${d}`
|
|
1536
1751
|
}
|
|
1537
1752
|
)
|
|
1538
1753
|
] }),
|
|
1539
|
-
c && /* @__PURE__ */ l(
|
|
1540
|
-
i && /* @__PURE__ */ l(
|
|
1754
|
+
c && /* @__PURE__ */ l(J.Description, { className: W.TextField__Description, children: c }),
|
|
1755
|
+
i && /* @__PURE__ */ l(J.Error, { className: W.TextField__ErrorMsg, children: i })
|
|
1541
1756
|
] })
|
|
1542
1757
|
]
|
|
1543
1758
|
}
|
|
1544
1759
|
);
|
|
1545
|
-
},
|
|
1760
|
+
}, be = {
|
|
1546
1761
|
"TimePicker--Small": "styles-module__TimePicker--Small___nHQa1",
|
|
1547
1762
|
"TimePicker--Medium": "styles-module__TimePicker--Medium___E9-rF",
|
|
1548
1763
|
"TimePicker--Large": "styles-module__TimePicker--Large___I0M7V"
|
|
1549
|
-
},
|
|
1550
|
-
const n =
|
|
1551
|
-
let t =
|
|
1552
|
-
return e === "sm" ? (t =
|
|
1553
|
-
|
|
1764
|
+
}, ga = ({ size: e = "md", ...r }) => {
|
|
1765
|
+
const n = oe(null);
|
|
1766
|
+
let t = be["TimePicker--Medium"], o = 18;
|
|
1767
|
+
return e === "sm" ? (t = be["TimePicker--Small"], o = 14) : e === "lg" && (t = be["TimePicker--Large"], o = 24), /* @__PURE__ */ l(
|
|
1768
|
+
Xt,
|
|
1554
1769
|
{
|
|
1555
1770
|
ref: n,
|
|
1556
1771
|
className: t,
|
|
1557
1772
|
size: e,
|
|
1558
1773
|
...r,
|
|
1559
1774
|
rightSection: /* @__PURE__ */ l(
|
|
1560
|
-
|
|
1775
|
+
It,
|
|
1561
1776
|
{
|
|
1562
1777
|
bg: "transparent",
|
|
1563
1778
|
onClick: () => {
|
|
1564
1779
|
n.current?.showPicker?.();
|
|
1565
1780
|
},
|
|
1566
|
-
children: /* @__PURE__ */ l(
|
|
1781
|
+
children: /* @__PURE__ */ l(Zt, { size: o })
|
|
1567
1782
|
}
|
|
1568
1783
|
)
|
|
1569
1784
|
}
|
|
1570
1785
|
);
|
|
1571
|
-
},
|
|
1786
|
+
}, Se = {
|
|
1572
1787
|
"Toggle--Small": "styles-module__Toggle--Small___sOjUd",
|
|
1573
1788
|
"Toggle--Medium": "styles-module__Toggle--Medium___yIb8v",
|
|
1574
1789
|
"Toggle--Large": "styles-module__Toggle--Large___ZOJj1"
|
|
1575
|
-
},
|
|
1790
|
+
}, ya = ({
|
|
1576
1791
|
size: e = "md",
|
|
1577
1792
|
labelPosition: r = "right",
|
|
1578
1793
|
disabled: n,
|
|
1579
1794
|
onChange: t,
|
|
1580
1795
|
...o
|
|
1581
1796
|
}) => {
|
|
1582
|
-
const [s, a] =
|
|
1583
|
-
let i =
|
|
1584
|
-
e === "sm" ? (i =
|
|
1585
|
-
const
|
|
1797
|
+
const [s, a] = I(o?.checked || !1);
|
|
1798
|
+
let i = Se["Toggle--Medium"], c = 50;
|
|
1799
|
+
e === "sm" ? (i = Se["Toggle--Small"], c = 38) : e === "lg" && (i = Se["Toggle--Large"], c = 67);
|
|
1800
|
+
const p = H(
|
|
1586
1801
|
(d) => {
|
|
1587
1802
|
t && t(d), a(d?.target?.checked);
|
|
1588
1803
|
},
|
|
1589
1804
|
[t]
|
|
1590
1805
|
);
|
|
1591
1806
|
return /* @__PURE__ */ l(
|
|
1592
|
-
|
|
1807
|
+
Lt,
|
|
1593
1808
|
{
|
|
1594
1809
|
className: i,
|
|
1595
1810
|
size: e,
|
|
1596
1811
|
labelPosition: r,
|
|
1597
1812
|
disabled: n,
|
|
1598
|
-
onChange:
|
|
1813
|
+
onChange: p,
|
|
1599
1814
|
styles: () => ({
|
|
1600
1815
|
track: {
|
|
1601
1816
|
backgroundColor: !n && s ? "#0fd3d8 !important" : void 0,
|
|
@@ -1606,28 +1821,28 @@ const Xo = ({
|
|
|
1606
1821
|
...o
|
|
1607
1822
|
}
|
|
1608
1823
|
);
|
|
1609
|
-
},
|
|
1610
|
-
Tooltip__Body:
|
|
1611
|
-
Tooltip__Title:
|
|
1612
|
-
Tooltip__Content:
|
|
1613
|
-
},
|
|
1824
|
+
}, go = "styles-module__Tooltip__Body___i1OTG", yo = "styles-module__Tooltip__Title___E0LoV", ko = "styles-module__Tooltip__Content___lU5gr", Te = {
|
|
1825
|
+
Tooltip__Body: go,
|
|
1826
|
+
Tooltip__Title: yo,
|
|
1827
|
+
Tooltip__Content: ko
|
|
1828
|
+
}, ka = ({
|
|
1614
1829
|
title: e,
|
|
1615
1830
|
content: r,
|
|
1616
1831
|
maw: n = 280,
|
|
1617
1832
|
multiline: t = !0,
|
|
1618
1833
|
...o
|
|
1619
1834
|
}) => /* @__PURE__ */ l(
|
|
1620
|
-
|
|
1835
|
+
fe,
|
|
1621
1836
|
{
|
|
1622
1837
|
...o,
|
|
1623
1838
|
maw: n,
|
|
1624
1839
|
multiline: t,
|
|
1625
|
-
label: /* @__PURE__ */
|
|
1626
|
-
e && /* @__PURE__ */ l("span", { className:
|
|
1627
|
-
/* @__PURE__ */ l("span", { className:
|
|
1840
|
+
label: /* @__PURE__ */ x("div", { className: Te.Tooltip__Body, children: [
|
|
1841
|
+
e && /* @__PURE__ */ l("span", { className: Te.Tooltip__Title, children: e }),
|
|
1842
|
+
/* @__PURE__ */ l("span", { className: Te.Tooltip__Content, children: r })
|
|
1628
1843
|
] })
|
|
1629
1844
|
}
|
|
1630
|
-
),
|
|
1845
|
+
), Co = (e) => {
|
|
1631
1846
|
const { name: r, icon: n } = e;
|
|
1632
1847
|
return `
|
|
1633
1848
|
<div class="pin-marker">
|
|
@@ -1642,7 +1857,7 @@ const Xo = ({
|
|
|
1642
1857
|
<div class="pin-marker-name">${r}</div>
|
|
1643
1858
|
</div>
|
|
1644
1859
|
`;
|
|
1645
|
-
},
|
|
1860
|
+
}, Do = (e) => {
|
|
1646
1861
|
const { discountRate: r, price: n, originalPrice: t, category: o, active: s, title: a } = e;
|
|
1647
1862
|
return `
|
|
1648
1863
|
<div class="popdeal-marker" active="${!!s}">
|
|
@@ -1659,7 +1874,7 @@ const Xo = ({
|
|
|
1659
1874
|
</div>
|
|
1660
1875
|
</div>
|
|
1661
1876
|
`;
|
|
1662
|
-
},
|
|
1877
|
+
}, xo = (e) => {
|
|
1663
1878
|
const { title: r, icon: n } = e;
|
|
1664
1879
|
return `
|
|
1665
1880
|
<div class="pi-marker">
|
|
@@ -1667,7 +1882,7 @@ const Xo = ({
|
|
|
1667
1882
|
<span class="pi-marker-text">${r}</span>
|
|
1668
1883
|
</div>
|
|
1669
1884
|
`;
|
|
1670
|
-
},
|
|
1885
|
+
}, Po = (e) => {
|
|
1671
1886
|
const { title: r, icon: n, address: t } = e;
|
|
1672
1887
|
return `
|
|
1673
1888
|
<div class="pi-expanded-marker">
|
|
@@ -1678,26 +1893,26 @@ const Xo = ({
|
|
|
1678
1893
|
</div>
|
|
1679
1894
|
</div>
|
|
1680
1895
|
`;
|
|
1681
|
-
},
|
|
1896
|
+
}, Mo = (e) => `
|
|
1682
1897
|
<div class="cluster-marker">
|
|
1683
1898
|
<span class="cluster-marker-text">${e.count}</span>
|
|
1684
1899
|
</div>
|
|
1685
|
-
`,
|
|
1900
|
+
`, Ze = (e) => {
|
|
1686
1901
|
switch (e.type) {
|
|
1687
1902
|
case "pin":
|
|
1688
|
-
return
|
|
1903
|
+
return Co(e);
|
|
1689
1904
|
case "popdeal":
|
|
1690
|
-
return
|
|
1905
|
+
return Do(e);
|
|
1691
1906
|
case "pi":
|
|
1692
|
-
return
|
|
1907
|
+
return xo(e);
|
|
1693
1908
|
case "pi-expanded":
|
|
1694
|
-
return
|
|
1909
|
+
return Po(e);
|
|
1695
1910
|
case "cluster":
|
|
1696
|
-
return
|
|
1911
|
+
return Mo(e);
|
|
1697
1912
|
default:
|
|
1698
1913
|
return "";
|
|
1699
1914
|
}
|
|
1700
|
-
},
|
|
1915
|
+
}, bo = `
|
|
1701
1916
|
/* Common marker styles */
|
|
1702
1917
|
[class$="marker"] {
|
|
1703
1918
|
user-select: none;
|
|
@@ -1972,12 +2187,12 @@ const Xo = ({
|
|
|
1972
2187
|
background: #00C4C4;
|
|
1973
2188
|
transform: translate(-50%) rotate(45deg);
|
|
1974
2189
|
}
|
|
1975
|
-
`,
|
|
2190
|
+
`, pt = Be(null), je = "naver-map-script", So = (e, r) => new Promise((n, t) => {
|
|
1976
2191
|
if (typeof window < "u" && window.naver?.maps) {
|
|
1977
2192
|
n();
|
|
1978
2193
|
return;
|
|
1979
2194
|
}
|
|
1980
|
-
const o = document.getElementById(
|
|
2195
|
+
const o = document.getElementById(je);
|
|
1981
2196
|
if (o) {
|
|
1982
2197
|
o.addEventListener("load", () => n()), o.addEventListener(
|
|
1983
2198
|
"error",
|
|
@@ -1986,35 +2201,35 @@ const Xo = ({
|
|
|
1986
2201
|
return;
|
|
1987
2202
|
}
|
|
1988
2203
|
const s = document.createElement("script");
|
|
1989
|
-
s.id =
|
|
2204
|
+
s.id = je, s.src = `https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${e}&language=${r}`, s.async = !0, s.onload = () => {
|
|
1990
2205
|
n();
|
|
1991
2206
|
}, s.onerror = () => {
|
|
1992
2207
|
t(new Error("Failed to load Naver Map script"));
|
|
1993
2208
|
}, document.head.appendChild(s);
|
|
1994
|
-
}),
|
|
2209
|
+
}), To = ({
|
|
1995
2210
|
clientId: e,
|
|
1996
2211
|
language: r = "ko",
|
|
1997
2212
|
children: n
|
|
1998
2213
|
}) => {
|
|
1999
|
-
const [t, o] =
|
|
2000
|
-
|
|
2001
|
-
typeof window > "u" ||
|
|
2214
|
+
const [t, o] = I(null), [s, a] = I({}), [i, c] = I(null);
|
|
2215
|
+
X(() => {
|
|
2216
|
+
typeof window > "u" || So(e, r).then(() => {
|
|
2002
2217
|
window.naver && o(window.naver);
|
|
2003
2218
|
}).catch((d) => {
|
|
2004
2219
|
console.error("Naver Map script loading failed:", d), c(d);
|
|
2005
2220
|
});
|
|
2006
2221
|
}, [e, r]);
|
|
2007
|
-
const
|
|
2222
|
+
const p = H(
|
|
2008
2223
|
(d, _) => {
|
|
2009
|
-
const
|
|
2010
|
-
if (!
|
|
2224
|
+
const u = t || (typeof window < "u" ? window.naver : null);
|
|
2225
|
+
if (!u || (!t && window.naver && o(window.naver), !d.current))
|
|
2011
2226
|
return null;
|
|
2012
|
-
const
|
|
2013
|
-
if (!
|
|
2227
|
+
const m = d.current;
|
|
2228
|
+
if (!m.isConnected)
|
|
2014
2229
|
return null;
|
|
2015
2230
|
try {
|
|
2016
2231
|
const f = {
|
|
2017
|
-
center: new
|
|
2232
|
+
center: new u.maps.LatLng(37.5665, 126.978),
|
|
2018
2233
|
// 서울 시청 기본 좌표
|
|
2019
2234
|
zoom: 11,
|
|
2020
2235
|
maxZoom: 20,
|
|
@@ -2025,10 +2240,10 @@ const Xo = ({
|
|
|
2025
2240
|
mapDataControl: !1,
|
|
2026
2241
|
zoomControl: !1,
|
|
2027
2242
|
..._
|
|
2028
|
-
}, h = new
|
|
2029
|
-
return a((
|
|
2030
|
-
const
|
|
2031
|
-
return { ...
|
|
2243
|
+
}, h = new u.maps.Map(m, f);
|
|
2244
|
+
return a((g) => {
|
|
2245
|
+
const y = m.getAttribute("id") || "default";
|
|
2246
|
+
return { ...g, [y]: h };
|
|
2032
2247
|
}), h;
|
|
2033
2248
|
} catch (f) {
|
|
2034
2249
|
return console.error("Map creation error:", f), null;
|
|
@@ -2036,14 +2251,14 @@ const Xo = ({
|
|
|
2036
2251
|
},
|
|
2037
2252
|
[t]
|
|
2038
2253
|
);
|
|
2039
|
-
return i && console.error("NaverMapProvider error:", i), /* @__PURE__ */ l(
|
|
2040
|
-
},
|
|
2041
|
-
const e =
|
|
2254
|
+
return i && console.error("NaverMapProvider error:", i), /* @__PURE__ */ l(pt.Provider, { value: { naver: t, createMap: p, maps: s }, children: n });
|
|
2255
|
+
}, ft = () => {
|
|
2256
|
+
const e = ve(pt);
|
|
2042
2257
|
if (!e)
|
|
2043
2258
|
throw new Error("useNaverMap must be used within NaverMapProvider");
|
|
2044
2259
|
return e;
|
|
2045
2260
|
};
|
|
2046
|
-
function
|
|
2261
|
+
function wo(e) {
|
|
2047
2262
|
const r = function(t) {
|
|
2048
2263
|
this.DEFAULT_OPTIONS = {
|
|
2049
2264
|
map: null,
|
|
@@ -2182,9 +2397,9 @@ function ho(e) {
|
|
|
2182
2397
|
if (!t) return;
|
|
2183
2398
|
const o = t.getBounds(), s = this.getMarkers();
|
|
2184
2399
|
for (let a = 0, i = s.length; a < i; a++) {
|
|
2185
|
-
const c = s[a],
|
|
2186
|
-
if (!o.hasLatLng(
|
|
2187
|
-
this._getClosestCluster(
|
|
2400
|
+
const c = s[a], p = c.getPosition();
|
|
2401
|
+
if (!o.hasLatLng(p)) continue;
|
|
2402
|
+
this._getClosestCluster(p).addMarker(c), this._markerRelations.push(
|
|
2188
2403
|
e.maps.Event.addListener(
|
|
2189
2404
|
c,
|
|
2190
2405
|
"dragend",
|
|
@@ -2210,11 +2425,11 @@ function ho(e) {
|
|
|
2210
2425
|
_getClosestCluster: function(t) {
|
|
2211
2426
|
const o = this.getProjection(), s = this._clusters;
|
|
2212
2427
|
let a = null, i = 1 / 0;
|
|
2213
|
-
for (let c = 0,
|
|
2428
|
+
for (let c = 0, p = s.length; c < p; c++) {
|
|
2214
2429
|
const d = s[c], _ = d.getCenter();
|
|
2215
2430
|
if (d.isInBounds(t)) {
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2431
|
+
const u = o.getDistance(_, t);
|
|
2432
|
+
u < i && (i = u, a = d);
|
|
2218
2433
|
}
|
|
2219
2434
|
}
|
|
2220
2435
|
return a || (a = new n(this), this._clusters.push(a)), a;
|
|
@@ -2313,10 +2528,10 @@ function ho(e) {
|
|
|
2313
2528
|
o && !o.getMap() && o.setMap(t);
|
|
2314
2529
|
},
|
|
2315
2530
|
_calcBounds: function(t) {
|
|
2316
|
-
const o = this._markerClusters.getMap(), s = new e.maps.LatLngBounds(t.clone(), t.clone()), a = o.getBounds(), i = o.getProjection(), c = i.fromCoordToOffset(a.getNE()),
|
|
2317
|
-
d.add(
|
|
2318
|
-
const
|
|
2319
|
-
return new e.maps.LatLngBounds(
|
|
2531
|
+
const o = this._markerClusters.getMap(), s = new e.maps.LatLngBounds(t.clone(), t.clone()), a = o.getBounds(), i = o.getProjection(), c = i.fromCoordToOffset(a.getNE()), p = i.fromCoordToOffset(a.getSW()), d = i.fromCoordToOffset(s.getNE()), _ = i.fromCoordToOffset(s.getSW()), u = this._markerClusters.getGridSize() / 2;
|
|
2532
|
+
d.add(u, -u), _.add(-u, u);
|
|
2533
|
+
const m = Math.min(c.x, d.x), f = Math.max(c.y, d.y), h = Math.max(p.x, _.x), g = Math.min(p.y, _.y), y = i.fromOffsetToCoord(new e.maps.Point(m, f)), C = i.fromOffsetToCoord(new e.maps.Point(h, g));
|
|
2534
|
+
return new e.maps.LatLngBounds(C, y);
|
|
2320
2535
|
},
|
|
2321
2536
|
_getIndex: function(t) {
|
|
2322
2537
|
const o = this._markerClusters.getIndexGenerator();
|
|
@@ -2344,64 +2559,64 @@ function ho(e) {
|
|
|
2344
2559
|
}
|
|
2345
2560
|
}, r;
|
|
2346
2561
|
}
|
|
2347
|
-
const
|
|
2348
|
-
const { naver: r } =
|
|
2562
|
+
const Io = (e) => {
|
|
2563
|
+
const { naver: r } = ft(), [n, t] = I([]), o = oe(
|
|
2349
2564
|
/* @__PURE__ */ new Map()
|
|
2350
|
-
), s =
|
|
2565
|
+
), s = oe(null), a = H(
|
|
2351
2566
|
(_) => {
|
|
2352
2567
|
if (!e || !r) return null;
|
|
2353
|
-
const
|
|
2568
|
+
const u = Ze(_), m = new r.maps.Marker({
|
|
2354
2569
|
..._,
|
|
2355
2570
|
position: new r.maps.LatLng(_.position.latitude, _.position.longitude),
|
|
2356
2571
|
map: e,
|
|
2357
2572
|
icon: {
|
|
2358
|
-
content:
|
|
2573
|
+
content: u
|
|
2359
2574
|
}
|
|
2360
2575
|
});
|
|
2361
|
-
return _.onClick && r.maps.Event.addListener(
|
|
2576
|
+
return _.onClick && r.maps.Event.addListener(m, "click", () => {
|
|
2362
2577
|
_.onClick(_.id);
|
|
2363
|
-
}), t((f) => [...f,
|
|
2578
|
+
}), t((f) => [...f, m]), o.current.set(_.id, { marker: m, data: _ }), m;
|
|
2364
2579
|
},
|
|
2365
2580
|
[e, r]
|
|
2366
|
-
), i =
|
|
2367
|
-
(_,
|
|
2368
|
-
const
|
|
2369
|
-
if (!
|
|
2581
|
+
), i = H(
|
|
2582
|
+
(_, u) => {
|
|
2583
|
+
const m = o.current.get(_);
|
|
2584
|
+
if (!m || !r)
|
|
2370
2585
|
return;
|
|
2371
|
-
const { marker: f, data: h } =
|
|
2372
|
-
if (
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2586
|
+
const { marker: f, data: h } = m, g = { ...h, ...u }, y = f.getElement();
|
|
2587
|
+
if (y) {
|
|
2588
|
+
const C = y.querySelector(".popdeal-marker");
|
|
2589
|
+
C && "active" in u && C.setAttribute("active", String(!!u.active));
|
|
2375
2590
|
}
|
|
2376
|
-
o.current.set(_, { marker: f, data:
|
|
2591
|
+
o.current.set(_, { marker: f, data: g });
|
|
2377
2592
|
},
|
|
2378
2593
|
[r]
|
|
2379
|
-
), c =
|
|
2594
|
+
), c = H(() => {
|
|
2380
2595
|
n.forEach((_) => {
|
|
2381
2596
|
_ && _.setMap(null);
|
|
2382
2597
|
}), t([]), o.current.clear(), s.current && (s.current.setMap(null), s.current = null);
|
|
2383
|
-
}, [n]),
|
|
2598
|
+
}, [n]), p = H(
|
|
2384
2599
|
(_) => {
|
|
2385
2600
|
!e || !r || e.panTo(new r.maps.LatLng(_.latitude, _.longitude));
|
|
2386
2601
|
},
|
|
2387
2602
|
[e, r]
|
|
2388
|
-
), d =
|
|
2603
|
+
), d = H(
|
|
2389
2604
|
(_) => {
|
|
2390
2605
|
if (!e || !r || _.length === 0) return;
|
|
2391
|
-
const
|
|
2606
|
+
const u = new r.maps.LatLngBounds(
|
|
2392
2607
|
new r.maps.LatLng(_[0].latitude, _[0].longitude),
|
|
2393
2608
|
new r.maps.LatLng(_[0].latitude, _[0].longitude)
|
|
2394
2609
|
);
|
|
2395
|
-
_.forEach((
|
|
2396
|
-
|
|
2397
|
-
}), e.fitBounds(
|
|
2610
|
+
_.forEach((m) => {
|
|
2611
|
+
u.extend(new r.maps.LatLng(m.latitude, m.longitude));
|
|
2612
|
+
}), e.fitBounds(u);
|
|
2398
2613
|
},
|
|
2399
2614
|
[e, r]
|
|
2400
2615
|
);
|
|
2401
|
-
return
|
|
2616
|
+
return X(() => {
|
|
2402
2617
|
if (!r || !e || n.length === 0) return;
|
|
2403
|
-
const _ =
|
|
2404
|
-
content:
|
|
2618
|
+
const _ = wo(r), m = {
|
|
2619
|
+
content: Ze({
|
|
2405
2620
|
type: "cluster",
|
|
2406
2621
|
count: 0
|
|
2407
2622
|
}),
|
|
@@ -2414,48 +2629,48 @@ const go = (e) => {
|
|
|
2414
2629
|
markers: n,
|
|
2415
2630
|
disableClickZoom: !1,
|
|
2416
2631
|
gridSize: 120,
|
|
2417
|
-
icons: [
|
|
2632
|
+
icons: [m],
|
|
2418
2633
|
indexGenerator: [10, 100, 200, 500, 1e3],
|
|
2419
2634
|
averageCenter: !1,
|
|
2420
2635
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2421
2636
|
// @ts-ignore
|
|
2422
|
-
stylingFunction: (h,
|
|
2637
|
+
stylingFunction: (h, g) => {
|
|
2423
2638
|
if (h && typeof h.getElement == "function") {
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2639
|
+
const y = h.getElement().querySelector(".cluster-marker-text");
|
|
2640
|
+
y && (y.textContent = String(g));
|
|
2426
2641
|
}
|
|
2427
2642
|
}
|
|
2428
2643
|
});
|
|
2429
2644
|
return s.current = f, () => {
|
|
2430
2645
|
f.setMap(null);
|
|
2431
2646
|
};
|
|
2432
|
-
}, [r, e, n]), { addMarker: a, updateMarker: i, clearMarkers: c, panTo:
|
|
2433
|
-
},
|
|
2434
|
-
const n =
|
|
2435
|
-
return
|
|
2647
|
+
}, [r, e, n]), { addMarker: a, updateMarker: i, clearMarkers: c, panTo: p, fitBounds: d };
|
|
2648
|
+
}, ht = ({ options: e, onLoad: r }) => {
|
|
2649
|
+
const n = oe(null), t = oe(null), { createMap: o } = ft(), [s, a] = I(null), i = Io(s), { width: c = "100%", height: p = "100%", ...d } = e || {}, _ = Le(() => d, [JSON.stringify(d)]);
|
|
2650
|
+
return X(() => {
|
|
2436
2651
|
if (typeof document > "u" || document.getElementById("pop-ui-map-marker-styles")) return;
|
|
2437
|
-
const
|
|
2438
|
-
return
|
|
2652
|
+
const m = document.createElement("style");
|
|
2653
|
+
return m.id = "pop-ui-map-marker-styles", m.textContent = bo, document.head.appendChild(m), t.current = m, () => {
|
|
2439
2654
|
};
|
|
2440
|
-
}, []),
|
|
2441
|
-
let
|
|
2655
|
+
}, []), X(() => {
|
|
2656
|
+
let u = null, m = null;
|
|
2442
2657
|
if (s && (s.destroy(), a(null)), n.current && n.current.isConnected) {
|
|
2443
|
-
const f = () => n.current && n.current.isConnected && (
|
|
2658
|
+
const f = () => n.current && n.current.isConnected && (u = o(n, _), u) ? (a(u), !0) : !1;
|
|
2444
2659
|
if (!f()) {
|
|
2445
2660
|
let h = 0;
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2448
|
-
h++, (f() || h >=
|
|
2661
|
+
const g = 50;
|
|
2662
|
+
m = setInterval(() => {
|
|
2663
|
+
h++, (f() || h >= g) && m && (clearInterval(m), m = null);
|
|
2449
2664
|
}, 100);
|
|
2450
2665
|
}
|
|
2451
2666
|
return () => {
|
|
2452
|
-
|
|
2667
|
+
m && clearInterval(m), u && (u.destroy(), u = null);
|
|
2453
2668
|
};
|
|
2454
2669
|
}
|
|
2455
2670
|
return () => {
|
|
2456
|
-
|
|
2671
|
+
m && clearInterval(m), u && (u.destroy(), u = null);
|
|
2457
2672
|
};
|
|
2458
|
-
}, [o, _]),
|
|
2673
|
+
}, [o, _]), X(() => {
|
|
2459
2674
|
s && r && r({ map: s, ...i });
|
|
2460
2675
|
}, [s, r, i]), /* @__PURE__ */ l(
|
|
2461
2676
|
"div",
|
|
@@ -2463,22 +2678,22 @@ const go = (e) => {
|
|
|
2463
2678
|
ref: n,
|
|
2464
2679
|
style: {
|
|
2465
2680
|
width: typeof c == "number" ? `${c}px` : c,
|
|
2466
|
-
height: typeof
|
|
2681
|
+
height: typeof p == "number" ? `${p}px` : p
|
|
2467
2682
|
}
|
|
2468
2683
|
}
|
|
2469
2684
|
);
|
|
2470
2685
|
};
|
|
2471
|
-
|
|
2472
|
-
const
|
|
2686
|
+
ht.displayName = "Map";
|
|
2687
|
+
const Lo = "위치 정보를 불러오는 데 실패했어요.", Bo = "위치 서비스 권한과 네트워크 상태를 확인해주세요.", Ca = ({
|
|
2473
2688
|
isActive: e = !1,
|
|
2474
|
-
errorMessage: r =
|
|
2475
|
-
errorDescription: n =
|
|
2689
|
+
errorMessage: r = Lo,
|
|
2690
|
+
errorDescription: n = Bo
|
|
2476
2691
|
}) => {
|
|
2477
|
-
const [t, o] =
|
|
2478
|
-
return
|
|
2692
|
+
const [t, o] = I(!1), [s, a] = I(!1), [i, c] = I(null), p = oe(!1);
|
|
2693
|
+
return X(() => {
|
|
2479
2694
|
if (e && typeof navigator < "u" && "geolocation" in navigator) {
|
|
2480
|
-
if (
|
|
2481
|
-
|
|
2695
|
+
if (p.current) return;
|
|
2696
|
+
p.current = !0, requestAnimationFrame(() => {
|
|
2482
2697
|
o(!0);
|
|
2483
2698
|
});
|
|
2484
2699
|
const d = {
|
|
@@ -2491,69 +2706,69 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2491
2706
|
c({
|
|
2492
2707
|
latitude: _.coords.latitude,
|
|
2493
2708
|
longitude: _.coords.longitude
|
|
2494
|
-
}), o(!1), a(!1),
|
|
2709
|
+
}), o(!1), a(!1), p.current = !1;
|
|
2495
2710
|
},
|
|
2496
2711
|
(_) => {
|
|
2497
|
-
c(null), console.error("Geolocation error:", _),
|
|
2712
|
+
c(null), console.error("Geolocation error:", _), se({
|
|
2498
2713
|
message: `${r} ${n}`
|
|
2499
|
-
}), o(!1), a(!0),
|
|
2714
|
+
}), o(!1), a(!0), p.current = !1;
|
|
2500
2715
|
},
|
|
2501
2716
|
d
|
|
2502
2717
|
);
|
|
2503
2718
|
}
|
|
2504
2719
|
}, [e, r, n]), { position: i, isLoading: t, isError: s };
|
|
2505
|
-
},
|
|
2720
|
+
}, Ue = (e = "light") => {
|
|
2506
2721
|
const r = [];
|
|
2507
|
-
return Object.entries(
|
|
2722
|
+
return Object.entries(qe).forEach(([n, t]) => {
|
|
2508
2723
|
Object.entries(t).forEach(([o, s]) => {
|
|
2509
|
-
const a =
|
|
2724
|
+
const a = jt(n, o);
|
|
2510
2725
|
r.push(`${a}: ${s};`);
|
|
2511
2726
|
});
|
|
2512
2727
|
}), r.join(`
|
|
2513
2728
|
`);
|
|
2514
|
-
},
|
|
2729
|
+
}, vo = (e = "light") => {
|
|
2515
2730
|
const r = document.getElementById("pop-ui-theme-vars");
|
|
2516
2731
|
r && r.remove();
|
|
2517
2732
|
const n = document.createElement("style");
|
|
2518
2733
|
n.id = "pop-ui-theme-vars", n.textContent = `
|
|
2519
2734
|
:root {
|
|
2520
|
-
${
|
|
2735
|
+
${Ue("light")}
|
|
2521
2736
|
}
|
|
2522
2737
|
|
|
2523
2738
|
[data-theme="dark"] {
|
|
2524
|
-
${
|
|
2739
|
+
${Ue("dark")}
|
|
2525
2740
|
}
|
|
2526
2741
|
`, document.head.appendChild(n);
|
|
2527
|
-
},
|
|
2528
|
-
const r =
|
|
2742
|
+
}, re = (e) => {
|
|
2743
|
+
const r = qe[e], n = Object.keys(r).sort((o, s) => Number(o) - Number(s));
|
|
2529
2744
|
return [
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2745
|
+
Q(e, n[0] || n[n.length - 1]),
|
|
2746
|
+
Q(e, n[1] || n[n.length - 1]),
|
|
2747
|
+
Q(e, n[2] || n[n.length - 1]),
|
|
2748
|
+
Q(e, n[3] || n[n.length - 1]),
|
|
2749
|
+
Q(e, n[4] || n[n.length - 1]),
|
|
2750
|
+
Q(e, n[5] || n[n.length - 1]),
|
|
2751
|
+
Q(e, n[6] || n[n.length - 1]),
|
|
2752
|
+
Q(e, n[7] || n[n.length - 1]),
|
|
2753
|
+
Q(e, n[8] || n[n.length - 1]),
|
|
2754
|
+
Q(e, n[9] || n[n.length - 1])
|
|
2540
2755
|
];
|
|
2541
|
-
},
|
|
2756
|
+
}, Eo = Bt({
|
|
2542
2757
|
colors: {
|
|
2543
|
-
gray:
|
|
2544
|
-
aqua:
|
|
2545
|
-
red:
|
|
2546
|
-
orange:
|
|
2547
|
-
yellow:
|
|
2548
|
-
green:
|
|
2549
|
-
blue:
|
|
2550
|
-
purple:
|
|
2551
|
-
grape:
|
|
2758
|
+
gray: re("gray"),
|
|
2759
|
+
aqua: re("aqua"),
|
|
2760
|
+
red: re("red"),
|
|
2761
|
+
orange: re("orange"),
|
|
2762
|
+
yellow: re("yellow"),
|
|
2763
|
+
green: re("green"),
|
|
2764
|
+
blue: re("blue"),
|
|
2765
|
+
purple: re("purple"),
|
|
2766
|
+
grape: re("grape")
|
|
2552
2767
|
},
|
|
2553
2768
|
primaryColor: "aqua",
|
|
2554
2769
|
primaryShade: 5,
|
|
2555
2770
|
fontFamily: 'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
2556
|
-
}),
|
|
2771
|
+
}), gt = Be(void 0), yt = Be({}), Da = ({
|
|
2557
2772
|
children: e,
|
|
2558
2773
|
defaultTheme: r = "light",
|
|
2559
2774
|
naverClientId: n,
|
|
@@ -2562,16 +2777,16 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2562
2777
|
notificationAutoClose: s,
|
|
2563
2778
|
notificationZIndex: a
|
|
2564
2779
|
}) => {
|
|
2565
|
-
const [i, c] =
|
|
2566
|
-
|
|
2567
|
-
|
|
2780
|
+
const [i, c] = I(r);
|
|
2781
|
+
X(() => {
|
|
2782
|
+
vo(i), document.documentElement.setAttribute("data-theme", i);
|
|
2568
2783
|
}, [i]);
|
|
2569
|
-
const
|
|
2784
|
+
const p = () => {
|
|
2570
2785
|
c((d) => d === "light" ? "dark" : "light");
|
|
2571
2786
|
};
|
|
2572
|
-
return /* @__PURE__ */ l(
|
|
2787
|
+
return /* @__PURE__ */ l(gt.Provider, { value: { theme: i, setTheme: c, toggleTheme: p }, children: /* @__PURE__ */ l(yt.Provider, { value: { naverClientId: n }, children: /* @__PURE__ */ x(vt, { theme: Eo, children: [
|
|
2573
2788
|
/* @__PURE__ */ l(
|
|
2574
|
-
|
|
2789
|
+
Et,
|
|
2575
2790
|
{
|
|
2576
2791
|
position: t,
|
|
2577
2792
|
limit: o,
|
|
@@ -2581,22 +2796,22 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2581
2796
|
),
|
|
2582
2797
|
e
|
|
2583
2798
|
] }) }) });
|
|
2584
|
-
},
|
|
2585
|
-
const e =
|
|
2799
|
+
}, xa = () => {
|
|
2800
|
+
const e = ve(gt);
|
|
2586
2801
|
if (!e)
|
|
2587
2802
|
throw new Error("useTheme must be used within ThemeProvider");
|
|
2588
2803
|
return e;
|
|
2589
|
-
},
|
|
2590
|
-
MapInfo:
|
|
2591
|
-
MapInfo__NoClientId:
|
|
2592
|
-
MapInfo__Preview:
|
|
2593
|
-
MapInfo__ExpandButton:
|
|
2594
|
-
MapInfo__AddressBar:
|
|
2595
|
-
MapInfo__AddressContent:
|
|
2596
|
-
MapInfo__Address:
|
|
2597
|
-
MapInfo__DirectionLink:
|
|
2598
|
-
MapInfo__DirectionButton:
|
|
2599
|
-
},
|
|
2804
|
+
}, Ao = () => ve(yt), No = "styles-module__MapInfo___scB-5", Fo = "styles-module__MapInfo__NoClientId___YBM4o", Ro = "styles-module__MapInfo__Preview___FJbQN", $o = "styles-module__MapInfo__ExpandButton___8KySg", Oo = "styles-module__MapInfo__AddressBar___mKkK6", zo = "styles-module__MapInfo__AddressContent___XG1Uz", Ho = "styles-module__MapInfo__Address___iXO6N", Yo = "styles-module__MapInfo__DirectionLink___eGnf-", Wo = "styles-module__MapInfo__DirectionButton___gTWpj", ee = {
|
|
2805
|
+
MapInfo: No,
|
|
2806
|
+
MapInfo__NoClientId: Fo,
|
|
2807
|
+
MapInfo__Preview: Ro,
|
|
2808
|
+
MapInfo__ExpandButton: $o,
|
|
2809
|
+
MapInfo__AddressBar: Oo,
|
|
2810
|
+
MapInfo__AddressContent: zo,
|
|
2811
|
+
MapInfo__Address: Ho,
|
|
2812
|
+
MapInfo__DirectionLink: Yo,
|
|
2813
|
+
MapInfo__DirectionButton: Wo
|
|
2814
|
+
}, Zo = 60, Pa = ({
|
|
2600
2815
|
location: e,
|
|
2601
2816
|
marker: r,
|
|
2602
2817
|
direction: n,
|
|
@@ -2606,59 +2821,59 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2606
2821
|
onClick: a,
|
|
2607
2822
|
height: i = 200
|
|
2608
2823
|
}) => {
|
|
2609
|
-
const c =
|
|
2610
|
-
|
|
2611
|
-
}, []),
|
|
2824
|
+
const c = Ao(), p = o || c.naverClientId, { title: d, address: _, latitude: u, longitude: m } = e, f = n?.label ?? "길찾기", h = t?.addressCopied ?? "주소 복사 완료", [g, y] = I(null), C = i - Zo, M = H((P) => {
|
|
2825
|
+
P && P.map && y(P);
|
|
2826
|
+
}, []), F = H(() => {
|
|
2612
2827
|
s?.();
|
|
2613
|
-
}, [s]),
|
|
2614
|
-
(
|
|
2615
|
-
if (
|
|
2828
|
+
}, [s]), E = H(
|
|
2829
|
+
(P, k, L) => {
|
|
2830
|
+
if (P && P.map && u && m)
|
|
2616
2831
|
try {
|
|
2617
|
-
|
|
2618
|
-
} catch (
|
|
2619
|
-
console.error("Error creating map marker:",
|
|
2832
|
+
P.addMarker(k), L?.();
|
|
2833
|
+
} catch (N) {
|
|
2834
|
+
console.error("Error creating map marker:", N);
|
|
2620
2835
|
}
|
|
2621
2836
|
},
|
|
2622
|
-
[
|
|
2623
|
-
),
|
|
2624
|
-
(
|
|
2625
|
-
|
|
2626
|
-
|
|
2837
|
+
[u, m]
|
|
2838
|
+
), Y = H(
|
|
2839
|
+
(P, k) => {
|
|
2840
|
+
P && P.map && u && m && (P.clearMarkers(), E(
|
|
2841
|
+
P,
|
|
2627
2842
|
{
|
|
2628
2843
|
id: `location-marker-${d}`,
|
|
2629
|
-
type:
|
|
2630
|
-
position: { latitude:
|
|
2844
|
+
type: k,
|
|
2845
|
+
position: { latitude: u, longitude: m },
|
|
2631
2846
|
title: d,
|
|
2632
2847
|
icon: r?.imageUrl,
|
|
2633
2848
|
address: _
|
|
2634
2849
|
},
|
|
2635
2850
|
() => {
|
|
2636
|
-
|
|
2851
|
+
P.panTo({ latitude: u, longitude: m });
|
|
2637
2852
|
}
|
|
2638
2853
|
));
|
|
2639
2854
|
},
|
|
2640
|
-
[
|
|
2855
|
+
[u, m, d, r?.imageUrl, _, E]
|
|
2641
2856
|
);
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
}, [
|
|
2645
|
-
|
|
2857
|
+
X(() => {
|
|
2858
|
+
u && m && g && Y(g, "pi");
|
|
2859
|
+
}, [g, u, m, Y]), X(() => () => {
|
|
2860
|
+
y(null);
|
|
2646
2861
|
}, []);
|
|
2647
|
-
const
|
|
2648
|
-
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(_),
|
|
2649
|
-
}, [_, h]),
|
|
2650
|
-
return
|
|
2651
|
-
/* @__PURE__ */ l(
|
|
2862
|
+
const R = H(() => {
|
|
2863
|
+
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(_), se(h));
|
|
2864
|
+
}, [_, h]), w = Le(() => n?.url ? n.url : `https://map.naver.com/p/search/${encodeURIComponent(d)}`, [n?.url, d]);
|
|
2865
|
+
return p ? /* @__PURE__ */ x("div", { className: ee.MapInfo, style: { height: i }, onClick: a, children: [
|
|
2866
|
+
/* @__PURE__ */ l(To, { clientId: p, children: /* @__PURE__ */ x("div", { className: ee.MapInfo__Preview, onClick: F, children: [
|
|
2652
2867
|
/* @__PURE__ */ l(
|
|
2653
|
-
|
|
2868
|
+
ht,
|
|
2654
2869
|
{
|
|
2655
|
-
onLoad:
|
|
2870
|
+
onLoad: M,
|
|
2656
2871
|
options: {
|
|
2657
2872
|
width: "100%",
|
|
2658
|
-
height: `${
|
|
2873
|
+
height: `${C}px`,
|
|
2659
2874
|
center: {
|
|
2660
|
-
lat:
|
|
2661
|
-
lng:
|
|
2875
|
+
lat: u,
|
|
2876
|
+
lng: m
|
|
2662
2877
|
},
|
|
2663
2878
|
zoom: 15,
|
|
2664
2879
|
minZoom: 15,
|
|
@@ -2673,19 +2888,19 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2673
2888
|
}
|
|
2674
2889
|
}
|
|
2675
2890
|
),
|
|
2676
|
-
s && /* @__PURE__ */ l("div", { className:
|
|
2891
|
+
s && /* @__PURE__ */ l("div", { className: ee.MapInfo__ExpandButton, children: /* @__PURE__ */ l(Ut, { color: Vt, size: 18 }) })
|
|
2677
2892
|
] }) }),
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */ l(
|
|
2893
|
+
/* @__PURE__ */ x("div", { className: ee.MapInfo__AddressBar, children: [
|
|
2894
|
+
/* @__PURE__ */ x("div", { className: ee.MapInfo__AddressContent, children: [
|
|
2895
|
+
/* @__PURE__ */ l(Gt, { color: Xe, size: 24, variant: "filled" }),
|
|
2681
2896
|
/* @__PURE__ */ l(
|
|
2682
2897
|
"span",
|
|
2683
2898
|
{
|
|
2684
|
-
className:
|
|
2685
|
-
onClick:
|
|
2899
|
+
className: ee.MapInfo__Address,
|
|
2900
|
+
onClick: R,
|
|
2686
2901
|
role: "button",
|
|
2687
2902
|
tabIndex: 0,
|
|
2688
|
-
onKeyDown: (
|
|
2903
|
+
onKeyDown: (P) => P.key === "Enter" && R(),
|
|
2689
2904
|
children: _
|
|
2690
2905
|
}
|
|
2691
2906
|
)
|
|
@@ -2693,44 +2908,44 @@ const yo = "위치 정보를 불러오는 데 실패했어요.", ko = "위치
|
|
|
2693
2908
|
/* @__PURE__ */ l(
|
|
2694
2909
|
"a",
|
|
2695
2910
|
{
|
|
2696
|
-
className:
|
|
2697
|
-
href:
|
|
2911
|
+
className: ee.MapInfo__DirectionLink,
|
|
2912
|
+
href: w,
|
|
2698
2913
|
target: "_blank",
|
|
2699
2914
|
rel: "noreferrer",
|
|
2700
|
-
children: /* @__PURE__ */ l(
|
|
2915
|
+
children: /* @__PURE__ */ l(me, { variant: "basic", size: "sm", className: ee.MapInfo__DirectionButton, children: f })
|
|
2701
2916
|
}
|
|
2702
2917
|
)
|
|
2703
2918
|
] })
|
|
2704
|
-
] }) : /* @__PURE__ */ l("div", { className:
|
|
2919
|
+
] }) : /* @__PURE__ */ l("div", { className: ee.MapInfo, style: { height: i }, children: /* @__PURE__ */ l("div", { className: ee.MapInfo__NoClientId, children: "naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요." }) });
|
|
2705
2920
|
};
|
|
2706
2921
|
export {
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2922
|
+
me as Button,
|
|
2923
|
+
Rr as CalendarDatePicker,
|
|
2924
|
+
sa as Checkbox,
|
|
2925
|
+
ia as DatePicker,
|
|
2926
|
+
la as Dropdown,
|
|
2927
|
+
ca as ImageInput,
|
|
2928
|
+
_a as LottieInput,
|
|
2929
|
+
ht as Map,
|
|
2930
|
+
Pa as MapInfo,
|
|
2931
|
+
Dn as Modal,
|
|
2932
|
+
To as NaverMapProvider,
|
|
2933
|
+
da as Pagination,
|
|
2934
|
+
Da as PopUiProvider,
|
|
2935
|
+
ua as Radio,
|
|
2936
|
+
ma as SearchBar,
|
|
2937
|
+
pa as SegmentButton,
|
|
2938
|
+
fa as Tab,
|
|
2939
|
+
ha as TextField,
|
|
2940
|
+
ga as TimePicker,
|
|
2941
|
+
ya as Toggle,
|
|
2942
|
+
ka as Tooltip,
|
|
2943
|
+
Ze as getMarkerHTML,
|
|
2944
|
+
wo as makeMarkerClustering,
|
|
2945
|
+
bo as markerStyles,
|
|
2946
|
+
se as toast,
|
|
2947
|
+
Ca as useLocation,
|
|
2948
|
+
Io as useMap,
|
|
2949
|
+
ft as useNaverMap,
|
|
2950
|
+
xa as useTheme
|
|
2736
2951
|
};
|