@coolms/ui-react 0.1.0-alpha.42 → 0.1.0-alpha.44
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/CHANGELOG.md +14 -0
- package/dist/components/Icon.d.ts +5 -2
- package/dist/index.js +1560 -1775
- package/package.json +4 -2
- package/src/components/icons.json +714 -0
- package/src/kit.css +5 -1
package/dist/index.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
function qe(
|
|
5
|
-
const l = { ...
|
|
1
|
+
import { jsx as n, jsxs as f, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as $n, useId as he, useState as D, useRef as O, useEffect as Q, useCallback as Ie, useMemo as Bn, useContext as Fn, createContext as Rn, useLayoutEffect as $e, Fragment as Hn } from "react";
|
|
3
|
+
import { createPortal as an } from "react-dom";
|
|
4
|
+
function qe(e, t) {
|
|
5
|
+
const l = { ...e };
|
|
6
6
|
for (const s of Object.keys(t ?? {})) {
|
|
7
7
|
const a = t == null ? void 0 : t[s];
|
|
8
8
|
a !== void 0 && (l[s] = a);
|
|
9
9
|
}
|
|
10
10
|
return l;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
12
|
+
function F(...e) {
|
|
13
|
+
return e.filter(Boolean).join(" ");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function se({ name: e }) {
|
|
16
16
|
const t = { width: 16, height: 16, viewBox: "0 0 16 16", "aria-hidden": !0, focusable: !1 };
|
|
17
|
-
switch (
|
|
17
|
+
switch (e) {
|
|
18
18
|
case "lock":
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M5 7V5a3 3 0 1 1 6 0v2h.5A1.5 1.5 0 0 1 13 8.5v5A1.5 1.5 0 0 1 11.5 15h-7A1.5 1.5 0 0 1 3 13.5v-5A1.5 1.5 0 0 1 4.5 7H5Zm1.5 0h3V5a1.5 1.5 0 0 0-3 0v2Z" }) });
|
|
20
20
|
case "spinner":
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph cms-spinner", children: /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeDasharray: "28", strokeDashoffset: "10" }) });
|
|
22
22
|
case "back":
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M10.7 2.3a1 1 0 0 1 0 1.4L6.4 8l4.3 4.3a1 1 0 0 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 0Z" }) });
|
|
24
24
|
case "close":
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M3.3 3.3a1 1 0 0 1 1.4 0L8 6.6l3.3-3.3a1 1 0 1 1 1.4 1.4L9.4 8l3.3 3.3a1 1 0 0 1-1.4 1.4L8 9.4l-3.3 3.3a1 1 0 0 1-1.4-1.4L6.6 8 3.3 4.7a1 1 0 0 1 0-1.4Z" }) });
|
|
26
26
|
case "warning":
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M8.9 1.5a1 1 0 0 0-1.8 0l-6 11A1 1 0 0 0 2 14h12a1 1 0 0 0 .9-1.5l-6-11ZM8 5a1 1 0 0 1 1 1v3a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Zm0 7.5A1 1 0 1 1 8 10.5a1 1 0 0 1 0 2Z" }) });
|
|
28
28
|
case "check":
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M13.7 4.3a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0l-3-3a1 1 0 1 1 1.4-1.4L7 9.6l5.3-5.3a1 1 0 0 1 1.4 0Z" }) });
|
|
30
30
|
case "info":
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ n("svg", { ...t, className: "cms-glyph", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1Zm0 5.5a1 1 0 0 0-1 1V11a1 1 0 1 0 2 0V7.5a1 1 0 0 0-1-1ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }) });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function De({
|
|
35
|
-
variant:
|
|
35
|
+
variant: e = "secondary",
|
|
36
36
|
busy: t = !1,
|
|
37
37
|
busyLabel: l,
|
|
38
38
|
locked: s = !1,
|
|
39
39
|
lockedReason: a,
|
|
40
|
-
icon:
|
|
41
|
-
disabled:
|
|
42
|
-
className:
|
|
43
|
-
children:
|
|
44
|
-
type:
|
|
45
|
-
title:
|
|
40
|
+
icon: i,
|
|
41
|
+
disabled: h,
|
|
42
|
+
className: d,
|
|
43
|
+
children: u,
|
|
44
|
+
type: b = "button",
|
|
45
|
+
title: c,
|
|
46
46
|
...v
|
|
47
47
|
}) {
|
|
48
|
-
const
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
const m = !!h || t;
|
|
49
|
+
return /* @__PURE__ */ f(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
52
|
...v,
|
|
53
|
-
type:
|
|
54
|
-
className:
|
|
55
|
-
disabled:
|
|
53
|
+
type: b,
|
|
54
|
+
className: F("cms-button", `cms-button--${e}`, t && "is-busy", s && "is-locked", d),
|
|
55
|
+
disabled: m,
|
|
56
56
|
"aria-busy": t || void 0,
|
|
57
|
-
title: s ? a ??
|
|
57
|
+
title: s ? a ?? c : c,
|
|
58
58
|
children: [
|
|
59
|
-
t ? /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
s && a ? /* @__PURE__ */
|
|
59
|
+
t ? /* @__PURE__ */ n(se, { name: "spinner" }) : s ? /* @__PURE__ */ n(se, { name: "lock" }) : i,
|
|
60
|
+
/* @__PURE__ */ n("span", { className: "cms-button__label", children: t && l !== void 0 ? l : u }),
|
|
61
|
+
s && a ? /* @__PURE__ */ f("span", { className: "cms-visually-hidden", children: [
|
|
62
62
|
", ",
|
|
63
63
|
a
|
|
64
64
|
] }) : null
|
|
@@ -66,185 +66,13 @@ function De({
|
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
|
|
77
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "7" }),
|
|
78
|
-
/* @__PURE__ */ e("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
|
|
79
|
-
] }),
|
|
80
|
-
// The envelope with its flap open above it: a message read, or the message itself again.
|
|
81
|
-
"mail-open": /* @__PURE__ */ o($, { children: [
|
|
82
|
-
/* @__PURE__ */ e("path", { d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }),
|
|
83
|
-
/* @__PURE__ */ e("path", { d: "m3 10 9-6 9 6" }),
|
|
84
|
-
/* @__PURE__ */ e("path", { d: "m3 10 9 6 9-6" })
|
|
85
|
-
] }),
|
|
86
|
-
// A clipboard: copy what is shown.
|
|
87
|
-
copy: /* @__PURE__ */ o($, { children: [
|
|
88
|
-
/* @__PURE__ */ e("rect", { x: "6", y: "4", width: "12", height: "17", rx: "2" }),
|
|
89
|
-
/* @__PURE__ */ e("path", { d: "M9 4V3h6v1" }),
|
|
90
|
-
/* @__PURE__ */ e("path", { d: "M9 10h6M9 14h6M9 18h3" })
|
|
91
|
-
] }),
|
|
92
|
-
chat: /* @__PURE__ */ e("path", { d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }),
|
|
93
|
-
phone: /* @__PURE__ */ e("path", { d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }),
|
|
94
|
-
calendar: /* @__PURE__ */ o($, { children: [
|
|
95
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
96
|
-
/* @__PURE__ */ e("path", { d: "M3 10h18M8 3v4M16 3v4" })
|
|
97
|
-
] }),
|
|
98
|
-
file: /* @__PURE__ */ o($, { children: [
|
|
99
|
-
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
100
|
-
/* @__PURE__ */ e("path", { d: "M14 3v6h6M8 13h8M8 17h6" })
|
|
101
|
-
] }),
|
|
102
|
-
// The file, with code's angle brackets in place of its lines: a message's source.
|
|
103
|
-
"file-code": /* @__PURE__ */ o($, { children: [
|
|
104
|
-
/* @__PURE__ */ e("path", { d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }),
|
|
105
|
-
/* @__PURE__ */ e("path", { d: "M14 3v6h6" }),
|
|
106
|
-
/* @__PURE__ */ e("path", { d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" })
|
|
107
|
-
] }),
|
|
108
|
-
image: /* @__PURE__ */ o($, { children: [
|
|
109
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
110
|
-
/* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "2" }),
|
|
111
|
-
/* @__PURE__ */ e("path", { d: "m21 17-5-5-9 8" })
|
|
112
|
-
] }),
|
|
113
|
-
search: /* @__PURE__ */ o($, { children: [
|
|
114
|
-
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7" }),
|
|
115
|
-
/* @__PURE__ */ e("path", { d: "m20 20-4-4" })
|
|
116
|
-
] }),
|
|
117
|
-
bell: /* @__PURE__ */ o($, { children: [
|
|
118
|
-
/* @__PURE__ */ e("path", { d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }),
|
|
119
|
-
/* @__PURE__ */ e("path", { d: "M10 20a2 2 0 0 0 4 0" })
|
|
120
|
-
] }),
|
|
121
|
-
pencil: /* @__PURE__ */ o($, { children: [
|
|
122
|
-
/* @__PURE__ */ e("path", { d: "M4 20h4L19 9l-4-4L4 16Z" }),
|
|
123
|
-
/* @__PURE__ */ e("path", { d: "m13 7 4 4" })
|
|
124
|
-
] }),
|
|
125
|
-
download: /* @__PURE__ */ o($, { children: [
|
|
126
|
-
/* @__PURE__ */ e("path", { d: "M12 4v11" }),
|
|
127
|
-
/* @__PURE__ */ e("path", { d: "m7 11 5 5 5-5" }),
|
|
128
|
-
/* @__PURE__ */ e("path", { d: "M4 20h16" })
|
|
129
|
-
] }),
|
|
130
|
-
// Download's arrow turned up, from the line: a file sent up.
|
|
131
|
-
upload: /* @__PURE__ */ o($, { children: [
|
|
132
|
-
/* @__PURE__ */ e("path", { d: "M12 20V9" }),
|
|
133
|
-
/* @__PURE__ */ e("path", { d: "m7 13 5-5 5 5" }),
|
|
134
|
-
/* @__PURE__ */ e("path", { d: "M4 4h16" })
|
|
135
|
-
] }),
|
|
136
|
-
print: /* @__PURE__ */ o($, { children: [
|
|
137
|
-
/* @__PURE__ */ e("path", { d: "M7 8V4h10v4" }),
|
|
138
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "8", width: "18", height: "8", rx: "2" }),
|
|
139
|
-
/* @__PURE__ */ e("path", { d: "M7 14h10v6H7Z" })
|
|
140
|
-
] }),
|
|
141
|
-
"open-separately": /* @__PURE__ */ o($, { children: [
|
|
142
|
-
/* @__PURE__ */ e("path", { d: "M14 4h6v6" }),
|
|
143
|
-
/* @__PURE__ */ e("path", { d: "m20 4-9 9" }),
|
|
144
|
-
/* @__PURE__ */ e("path", { d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" })
|
|
145
|
-
] }),
|
|
146
|
-
star: /* @__PURE__ */ e("path", { d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }),
|
|
147
|
-
send: /* @__PURE__ */ o($, { children: [
|
|
148
|
-
/* @__PURE__ */ e("path", { d: "M21 3 10 14" }),
|
|
149
|
-
/* @__PURE__ */ e("path", { d: "M21 3 14 21l-4-7-7-4Z" })
|
|
150
|
-
] }),
|
|
151
|
-
inbox: /* @__PURE__ */ o($, { children: [
|
|
152
|
-
/* @__PURE__ */ e("path", { d: "M3 13h5l1 3h6l1-3h5" }),
|
|
153
|
-
/* @__PURE__ */ e("path", { d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" })
|
|
154
|
-
] }),
|
|
155
|
-
archive: /* @__PURE__ */ o($, { children: [
|
|
156
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
|
|
157
|
-
/* @__PURE__ */ e("path", { d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" })
|
|
158
|
-
] }),
|
|
159
|
-
trash: /* @__PURE__ */ o($, { children: [
|
|
160
|
-
/* @__PURE__ */ e("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
|
161
|
-
/* @__PURE__ */ e("path", { d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" })
|
|
162
|
-
] }),
|
|
163
|
-
paperclip: /* @__PURE__ */ e("path", { d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }),
|
|
164
|
-
mic: /* @__PURE__ */ o($, { children: [
|
|
165
|
-
/* @__PURE__ */ e("rect", { x: "9", y: "3", width: "6", height: "11", rx: "3" }),
|
|
166
|
-
/* @__PURE__ */ e("path", { d: "M5 11a7 7 0 0 0 14 0M12 18v3" })
|
|
167
|
-
] }),
|
|
168
|
-
speaker: /* @__PURE__ */ o($, { children: [
|
|
169
|
-
/* @__PURE__ */ e("path", { d: "M4 9h4l5-4v14l-5-4H4Z" }),
|
|
170
|
-
/* @__PURE__ */ e("path", { d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" })
|
|
171
|
-
] }),
|
|
172
|
-
"user-plus": /* @__PURE__ */ o($, { children: [
|
|
173
|
-
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
174
|
-
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" })
|
|
175
|
-
] }),
|
|
176
|
-
// A person, nothing more: one whose account is gone.
|
|
177
|
-
user: /* @__PURE__ */ o($, { children: [
|
|
178
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4" }),
|
|
179
|
-
/* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0" })
|
|
180
|
-
] }),
|
|
181
|
-
// A person with a tick: someone allowed.
|
|
182
|
-
"user-check": /* @__PURE__ */ o($, { children: [
|
|
183
|
-
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
184
|
-
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" })
|
|
185
|
-
] }),
|
|
186
|
-
// A person with a cross: someone no longer allowed.
|
|
187
|
-
"user-x": /* @__PURE__ */ o($, { children: [
|
|
188
|
-
/* @__PURE__ */ e("circle", { cx: "10", cy: "8", r: "4" }),
|
|
189
|
-
/* @__PURE__ */ e("path", { d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" })
|
|
190
|
-
] }),
|
|
191
|
-
// Two people: the members of a group.
|
|
192
|
-
users: /* @__PURE__ */ o($, { children: [
|
|
193
|
-
/* @__PURE__ */ e("circle", { cx: "9", cy: "8", r: "3.5" }),
|
|
194
|
-
/* @__PURE__ */ e("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" })
|
|
195
|
-
] }),
|
|
196
|
-
"phone-off": /* @__PURE__ */ e("path", { d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }),
|
|
197
|
-
video: /* @__PURE__ */ o($, { children: [
|
|
198
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "6", width: "13", height: "12", rx: "2" }),
|
|
199
|
-
/* @__PURE__ */ e("path", { d: "m16 10 5-3v10l-5-3" })
|
|
200
|
-
] }),
|
|
201
|
-
info: /* @__PURE__ */ o($, { children: [
|
|
202
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
|
|
203
|
-
/* @__PURE__ */ e("path", { d: "M12 11v6M12 7.5v.5" })
|
|
204
|
-
] }),
|
|
205
|
-
"chevron-down": /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }),
|
|
206
|
-
"chevron-left": /* @__PURE__ */ e("path", { d: "m15 18-6-6 6-6" }),
|
|
207
|
-
plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
|
|
208
|
-
folder: /* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
209
|
-
// The folder with a plus inside: a new folder.
|
|
210
|
-
"folder-plus": /* @__PURE__ */ o($, { children: [
|
|
211
|
-
/* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
212
|
-
/* @__PURE__ */ e("path", { d: "M12 10.5v6M9 13.5h6" })
|
|
213
|
-
] }),
|
|
214
|
-
// The folder with a cross inside: a folder removed.
|
|
215
|
-
"folder-x": /* @__PURE__ */ o($, { children: [
|
|
216
|
-
/* @__PURE__ */ e("path", { d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }),
|
|
217
|
-
/* @__PURE__ */ e("path", { d: "m9.5 11 5 5M14.5 11l-5 5" })
|
|
218
|
-
] }),
|
|
219
|
-
check: /* @__PURE__ */ e("path", { d: "m5 12 5 5 9-10" }),
|
|
220
|
-
server: /* @__PURE__ */ o($, { children: [
|
|
221
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "4", width: "18", height: "7", rx: "2" }),
|
|
222
|
-
/* @__PURE__ */ e("rect", { x: "3", y: "13", width: "18", height: "7", rx: "2" }),
|
|
223
|
-
/* @__PURE__ */ e("path", { d: "M7 7.5h.5M7 16.5h.5" })
|
|
224
|
-
] }),
|
|
225
|
-
reply: /* @__PURE__ */ e("path", { d: "M10 8 4 13l6 5M4 13h11a5 5 0 0 1 5 5" }),
|
|
226
|
-
// Reply's mirror: the arrow leaves to the right.
|
|
227
|
-
forward: /* @__PURE__ */ e("path", { d: "m14 8 6 5-6 5M20 13H9a5 5 0 0 0-5 5" }),
|
|
228
|
-
refresh: /* @__PURE__ */ e("path", { d: "M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6" }),
|
|
229
|
-
more: /* @__PURE__ */ e("path", { d: "M5 12h.5M12 12h.5M19 12h.5" }),
|
|
230
|
-
// A number sign: a channel, by its name.
|
|
231
|
-
hash: /* @__PURE__ */ e("path", { d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }),
|
|
232
|
-
// A funnel: a list's filter.
|
|
233
|
-
funnel: /* @__PURE__ */ e("path", { d: "M4 5h16l-6 8v6l-4-2v-4Z" }),
|
|
234
|
-
// An eye: what is hidden is shown. Struck through: it is hidden again.
|
|
235
|
-
eye: /* @__PURE__ */ o($, { children: [
|
|
236
|
-
/* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
|
|
237
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
238
|
-
] }),
|
|
239
|
-
"eye-off": /* @__PURE__ */ o($, { children: [
|
|
240
|
-
/* @__PURE__ */ e("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }),
|
|
241
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" }),
|
|
242
|
-
/* @__PURE__ */ e("path", { d: "m4 4 16 16" })
|
|
243
|
-
] }),
|
|
244
|
-
important: /* @__PURE__ */ e("path", { d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" })
|
|
245
|
-
};
|
|
246
|
-
function B({ name: n, size: t = 20, label: l }) {
|
|
247
|
-
return /* @__PURE__ */ e(
|
|
69
|
+
const On = { width: 1.75, linecap: "round", linejoin: "round" }, Pn = { mail: { parts: [{ tag: "rect", x: "3", y: "5", width: "18", height: "14", rx: "2" }, { tag: "path", d: "m3 7 9 6 9-6" }] }, settings: { note: "A gear: a ring with eight short teeth, the hole in its middle.", parts: [{ tag: "circle", cx: "12", cy: "12", r: "3" }, { tag: "circle", cx: "12", cy: "12", r: "7" }, { tag: "path", d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" }] }, "mail-open": { note: "The envelope with its flap open above it: a message read, or the message itself again.", parts: [{ tag: "path", d: "M3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9" }, { tag: "path", d: "m3 10 9-6 9 6" }, { tag: "path", d: "m3 10 9 6 9-6" }] }, copy: { note: "A clipboard: copy what is shown.", parts: [{ tag: "rect", x: "6", y: "4", width: "12", height: "17", rx: "2" }, { tag: "path", d: "M9 4V3h6v1" }, { tag: "path", d: "M9 10h6M9 14h6M9 18h3" }] }, chat: { parts: [{ tag: "path", d: "M4 12a8 8 0 1 1 4 6.9L4 20l1.1-4A8 8 0 0 1 4 12Z" }] }, phone: { parts: [{ tag: "path", d: "M5 3h3l2 5-2.5 1.5a11 11 0 0 0 7 7L16 14l5 2v3a2 2 0 0 1-2 2A16 16 0 0 1 3 5a2 2 0 0 1 2-2Z" }] }, calendar: { parts: [{ tag: "rect", x: "3", y: "5", width: "18", height: "16", rx: "2" }, { tag: "path", d: "M3 10h18M8 3v4M16 3v4" }] }, file: { parts: [{ tag: "path", d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }, { tag: "path", d: "M14 3v6h6M8 13h8M8 17h6" }] }, "file-code": { note: "The file, with code's angle brackets in place of its lines: a message's source.", parts: [{ tag: "path", d: "M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z" }, { tag: "path", d: "M14 3v6h6" }, { tag: "path", d: "m10 12-2 2.5 2 2.5M14 12l2 2.5-2 2.5" }] }, image: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "16", rx: "2" }, { tag: "circle", cx: "9", cy: "10", r: "2" }, { tag: "path", d: "m21 17-5-5-9 8" }] }, search: { parts: [{ tag: "circle", cx: "11", cy: "11", r: "7" }, { tag: "path", d: "m20 20-4-4" }] }, bell: { parts: [{ tag: "path", d: "M6 9a6 6 0 1 1 12 0c0 6 2 8 2 8H4s2-2 2-8Z" }, { tag: "path", d: "M10 20a2 2 0 0 0 4 0" }] }, pencil: { parts: [{ tag: "path", d: "M4 20h4L19 9l-4-4L4 16Z" }, { tag: "path", d: "m13 7 4 4" }] }, download: { parts: [{ tag: "path", d: "M12 4v11" }, { tag: "path", d: "m7 11 5 5 5-5" }, { tag: "path", d: "M4 20h16" }] }, upload: { note: "Download's arrow turned up, from the line: a file sent up.", parts: [{ tag: "path", d: "M12 20V9" }, { tag: "path", d: "m7 13 5-5 5 5" }, { tag: "path", d: "M4 4h16" }] }, print: { parts: [{ tag: "path", d: "M7 8V4h10v4" }, { tag: "rect", x: "3", y: "8", width: "18", height: "8", rx: "2" }, { tag: "path", d: "M7 14h10v6H7Z" }] }, "open-separately": { parts: [{ tag: "path", d: "M14 4h6v6" }, { tag: "path", d: "m20 4-9 9" }, { tag: "path", d: "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5" }] }, star: { parts: [{ tag: "path", d: "m12 3 2.8 5.8 6.2.9-4.5 4.4 1 6.2L12 17.4l-5.5 2.9 1-6.2L3 9.7l6.2-.9Z" }] }, send: { parts: [{ tag: "path", d: "M21 3 10 14" }, { tag: "path", d: "M21 3 14 21l-4-7-7-4Z" }] }, inbox: { parts: [{ tag: "path", d: "M3 13h5l1 3h6l1-3h5" }, { tag: "path", d: "M5 5h14l2 8v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" }] }, archive: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "5", rx: "1" }, { tag: "path", d: "M5 9v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9M10 13h4" }] }, trash: { parts: [{ tag: "path", d: "M4 7h16M10 11v6M14 11v6" }, { tag: "path", d: "M6 7l1 13a2 2 0 0 0 2 1h6a2 2 0 0 0 2-1l1-13M9 7V4h6v3" }] }, paperclip: { parts: [{ tag: "path", d: "m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7" }] }, mic: { parts: [{ tag: "rect", x: "9", y: "3", width: "6", height: "11", rx: "3" }, { tag: "path", d: "M5 11a7 7 0 0 0 14 0M12 18v3" }] }, speaker: { parts: [{ tag: "path", d: "M4 9h4l5-4v14l-5-4H4Z" }, { tag: "path", d: "M16 9a4 4 0 0 1 0 6M19 6a8 8 0 0 1 0 12" }] }, "user-plus": { parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M19 8v6M16 11h6" }] }, user: { note: "A person, nothing more: one whose account is gone.", parts: [{ tag: "circle", cx: "12", cy: "8", r: "4" }, { tag: "path", d: "M4 21a8 8 0 0 1 16 0" }] }, "user-check": { note: "A person with a tick: someone allowed.", parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M16 11l2 2 4-4" }] }, "user-x": { note: "A person with a cross: someone no longer allowed.", parts: [{ tag: "circle", cx: "10", cy: "8", r: "4" }, { tag: "path", d: "M3 21a7 7 0 0 1 14 0M17 8l4 4M21 8l-4 4" }] }, users: { note: "Two people: the members of a group.", parts: [{ tag: "circle", cx: "9", cy: "8", r: "3.5" }, { tag: "path", d: "M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6" }] }, "phone-off": { parts: [{ tag: "path", d: "M3 14c5-5 13-5 18 0l-2 3-4-1v-3a10 10 0 0 0-6 0v3l-4 1Z" }] }, video: { parts: [{ tag: "rect", x: "3", y: "6", width: "13", height: "12", rx: "2" }, { tag: "path", d: "m16 10 5-3v10l-5-3" }] }, info: { parts: [{ tag: "circle", cx: "12", cy: "12", r: "9" }, { tag: "path", d: "M12 11v6M12 7.5v.5" }] }, "chevron-down": { parts: [{ tag: "path", d: "m6 9 6 6 6-6" }] }, "chevron-left": { parts: [{ tag: "path", d: "m15 18-6-6 6-6" }] }, plus: { parts: [{ tag: "path", d: "M12 5v14M5 12h14" }] }, folder: { parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }] }, "folder-plus": { note: "The folder with a plus inside: a new folder.", parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }, { tag: "path", d: "M12 10.5v6M9 13.5h6" }] }, "folder-x": { note: "The folder with a cross inside: a folder removed.", parts: [{ tag: "path", d: "M3 6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }, { tag: "path", d: "m9.5 11 5 5M14.5 11l-5 5" }] }, check: { parts: [{ tag: "path", d: "m5 12 5 5 9-10" }] }, server: { parts: [{ tag: "rect", x: "3", y: "4", width: "18", height: "7", rx: "2" }, { tag: "rect", x: "3", y: "13", width: "18", height: "7", rx: "2" }, { tag: "path", d: "M7 7.5h.5M7 16.5h.5" }] }, reply: { parts: [{ tag: "path", d: "M10 8 4 13l6 5M4 13h11a5 5 0 0 1 5 5" }] }, forward: { note: "Reply's mirror: the arrow leaves to the right.", parts: [{ tag: "path", d: "m14 8 6 5-6 5M20 13H9a5 5 0 0 0-5 5" }] }, refresh: { parts: [{ tag: "path", d: "M20 11a8 8 0 1 0-2.3 5.7M20 5v6h-6" }] }, more: { parts: [{ tag: "path", d: "M5 12h.5M12 12h.5M19 12h.5" }], strokeWidth: 3 }, hash: { note: "A number sign: a channel, by its name.", parts: [{ tag: "path", d: "M10 4 8 20M16 4l-2 16M5 9h15M4 15h15" }] }, funnel: { note: "A funnel: a list's filter.", parts: [{ tag: "path", d: "M4 5h16l-6 8v6l-4-2v-4Z" }] }, eye: { note: "An eye: what is hidden is shown. Struck through: it is hidden again.", parts: [{ tag: "path", d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }, { tag: "circle", cx: "12", cy: "12", r: "3" }] }, "eye-off": { parts: [{ tag: "path", d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" }, { tag: "circle", cx: "12", cy: "12", r: "3" }, { tag: "path", d: "m4 4 16 16" }] }, important: { parts: [{ tag: "path", d: "M4 6h11l5 6-5 6H4l4-6-4-6Z" }] } }, zn = { reply: "reply", "reply-all": "reply", forward: "forward", envelope: "mail", "envelope-open": "mail-open", star: "star", "star-fill": "star", "folder-symlink": "folder", folder: "folder", trash: "trash", archive: "archive", "arrow-clockwise": "refresh", download: "download", printer: "print", "file-earmark-code": "file-code", clipboard: "copy", "three-dots": "more", pencil: "pencil", trash3: "trash", "folder-plus": "folder-plus", "folder-x": "folder-x", image: "image", "person-check": "user-check", "person-x": "user-x", "arrow-left": "chevron-left", "pencil-square": "pencil", "plus-lg": "plus", gear: "settings", upload: "upload", "cloud-upload": "upload", people: "users", "file-earmark-word": "file", "file-earmark-spreadsheet": "file", "file-earmark-text": "file", folder2: "folder", "folder2-open": "folder", "chat-dots": "chat", images: "image", paperclip: "paperclip", hash: "hash", funnel: "funnel", eye: "eye", "eye-slash": "eye-off", inbox: "inbox", bell: "bell" }, rn = {
|
|
70
|
+
stroke: On,
|
|
71
|
+
icons: Pn,
|
|
72
|
+
bootstrap: zn
|
|
73
|
+
}, Qe = rn.icons, Xe = rn.stroke;
|
|
74
|
+
function $({ name: e, size: t = 20, label: l }) {
|
|
75
|
+
return /* @__PURE__ */ n(
|
|
248
76
|
"svg",
|
|
249
77
|
{
|
|
250
78
|
className: "cms-icon",
|
|
@@ -253,478 +81,434 @@ function B({ name: n, size: t = 20, label: l }) {
|
|
|
253
81
|
viewBox: "0 0 24 24",
|
|
254
82
|
fill: "none",
|
|
255
83
|
stroke: "currentColor",
|
|
256
|
-
strokeWidth:
|
|
257
|
-
strokeLinecap:
|
|
258
|
-
strokeLinejoin:
|
|
84
|
+
strokeWidth: Qe[e].strokeWidth ?? Xe.width,
|
|
85
|
+
strokeLinecap: Xe.linecap,
|
|
86
|
+
strokeLinejoin: Xe.linejoin,
|
|
259
87
|
focusable: !1,
|
|
260
88
|
...l ? { role: "img", "aria-label": l } : { "aria-hidden": !0 },
|
|
261
|
-
children:
|
|
89
|
+
children: Qe[e].parts.map(({ tag: s, ...a }, i) => $n(s, { key: i, ...a }))
|
|
262
90
|
}
|
|
263
91
|
);
|
|
264
92
|
}
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
forward: "forward",
|
|
269
|
-
envelope: "mail",
|
|
270
|
-
"envelope-open": "mail-open",
|
|
271
|
-
star: "star",
|
|
272
|
-
"star-fill": "star",
|
|
273
|
-
"folder-symlink": "folder",
|
|
274
|
-
folder: "folder",
|
|
275
|
-
trash: "trash",
|
|
276
|
-
archive: "archive",
|
|
277
|
-
"arrow-clockwise": "refresh",
|
|
278
|
-
download: "download",
|
|
279
|
-
printer: "print",
|
|
280
|
-
"file-earmark-code": "file-code",
|
|
281
|
-
clipboard: "copy",
|
|
282
|
-
"three-dots": "more",
|
|
283
|
-
pencil: "pencil",
|
|
284
|
-
trash3: "trash",
|
|
285
|
-
"folder-plus": "folder-plus",
|
|
286
|
-
"folder-x": "folder-x",
|
|
287
|
-
image: "image",
|
|
288
|
-
"person-check": "user-check",
|
|
289
|
-
"person-x": "user-x",
|
|
290
|
-
"arrow-left": "chevron-left",
|
|
291
|
-
"pencil-square": "pencil",
|
|
292
|
-
"plus-lg": "plus",
|
|
293
|
-
gear: "settings",
|
|
294
|
-
upload: "upload",
|
|
295
|
-
"cloud-upload": "upload",
|
|
296
|
-
people: "users",
|
|
297
|
-
"file-earmark-word": "file",
|
|
298
|
-
"file-earmark-spreadsheet": "file",
|
|
299
|
-
"file-earmark-text": "file",
|
|
300
|
-
folder2: "folder",
|
|
301
|
-
"folder2-open": "folder",
|
|
302
|
-
"chat-dots": "chat",
|
|
303
|
-
images: "image",
|
|
304
|
-
paperclip: "paperclip",
|
|
305
|
-
hash: "hash",
|
|
306
|
-
funnel: "funnel",
|
|
307
|
-
eye: "eye",
|
|
308
|
-
"eye-slash": "eye-off"
|
|
309
|
-
};
|
|
310
|
-
function Be(n) {
|
|
311
|
-
return Object.prototype.hasOwnProperty.call(pn, n) ? pn[n] : null;
|
|
93
|
+
const qt = Object.keys(Qe), vn = rn.bootstrap;
|
|
94
|
+
function Be(e) {
|
|
95
|
+
return Object.prototype.hasOwnProperty.call(vn, e) ? vn[e] : null;
|
|
312
96
|
}
|
|
313
|
-
function
|
|
97
|
+
function Un() {
|
|
314
98
|
try {
|
|
315
99
|
return process.env.NODE_ENV !== "production";
|
|
316
100
|
} catch {
|
|
317
101
|
return !1;
|
|
318
102
|
}
|
|
319
103
|
}
|
|
320
|
-
const
|
|
321
|
-
function
|
|
322
|
-
if (
|
|
323
|
-
const l = Be(
|
|
324
|
-
return l !== null ? /* @__PURE__ */
|
|
325
|
-
}
|
|
326
|
-
function
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
|
|
330
|
-
a != null ? /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
104
|
+
const gn = /* @__PURE__ */ new Set();
|
|
105
|
+
function Cn({ name: e, size: t = 18 }) {
|
|
106
|
+
if (e === "") return null;
|
|
107
|
+
const l = Be(e);
|
|
108
|
+
return l !== null ? /* @__PURE__ */ n($, { name: l, size: t }) : (!gn.has(e) && Un() && (gn.add(e), console.warn(`@coolms/ui-react: no icon for the server's icon name "${e}"; its space is kept empty`)), /* @__PURE__ */ n("span", { className: "cms-icon cms-icon--blank", style: { width: t, height: t }, "aria-hidden": "true", "data-icon-name": e }));
|
|
109
|
+
}
|
|
110
|
+
function cn({ id: e, label: t, help: l, error: s, pinned: a, children: i }) {
|
|
111
|
+
return /* @__PURE__ */ f("div", { className: F("cms-field", s != null && "is-invalid"), children: [
|
|
112
|
+
/* @__PURE__ */ n("label", { className: "cms-field__label", htmlFor: e, children: t }),
|
|
113
|
+
i,
|
|
114
|
+
a != null ? /* @__PURE__ */ f("p", { className: "cms-field__pinned", id: `${e}-pinned`, children: [
|
|
115
|
+
/* @__PURE__ */ n(se, { name: "lock" }),
|
|
332
116
|
" ",
|
|
333
117
|
a
|
|
334
118
|
] }) : null,
|
|
335
|
-
s != null ? /* @__PURE__ */
|
|
336
|
-
l != null ? /* @__PURE__ */
|
|
119
|
+
s != null ? /* @__PURE__ */ n("p", { className: "cms-field__error", id: `${e}-error`, role: "alert", children: s }) : null,
|
|
120
|
+
l != null ? /* @__PURE__ */ n("p", { className: "cms-field__help", id: `${e}-help`, children: l }) : null
|
|
337
121
|
] });
|
|
338
122
|
}
|
|
339
|
-
function
|
|
340
|
-
const l = [t.error != null && `${
|
|
123
|
+
function on(e, t) {
|
|
124
|
+
const l = [t.error != null && `${e}-error`, t.pinned != null && `${e}-pinned`, t.help != null && `${e}-help`].filter(Boolean).join(" ");
|
|
341
125
|
return l === "" ? void 0 : l;
|
|
342
126
|
}
|
|
343
|
-
const
|
|
344
|
-
function
|
|
345
|
-
const s = (
|
|
346
|
-
const v = new Date(Date.UTC(
|
|
347
|
-
return v.setUTCFullYear(
|
|
348
|
-
}, a = (
|
|
127
|
+
const Kn = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?$/, Wn = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
|
|
128
|
+
function Zn(e, t, l) {
|
|
129
|
+
const s = (i, h, d, u = 0, b = 0, c = 0) => {
|
|
130
|
+
const v = new Date(Date.UTC(i, h - 1, d, u, b, c));
|
|
131
|
+
return v.setUTCFullYear(i), v.getUTCFullYear() === i && v.getUTCMonth() === h - 1 && v.getUTCDate() === d && v.getUTCHours() === u && v.getUTCMinutes() === b && v.getUTCSeconds() === c ? v : null;
|
|
132
|
+
}, a = (i) => ({ hour: Number(i[1]), minute: Number(i[2]), second: Number(i[3] ?? 0) });
|
|
349
133
|
try {
|
|
350
|
-
if (
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
353
|
-
const
|
|
354
|
-
return
|
|
134
|
+
if (e === "time") {
|
|
135
|
+
const h = t.match(Wn);
|
|
136
|
+
if (h === null) return t;
|
|
137
|
+
const d = a(h), u = s(2e3, 1, 1, d.hour, d.minute, d.second);
|
|
138
|
+
return u === null ? t : new Intl.DateTimeFormat(l, { timeStyle: h[3] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(u);
|
|
355
139
|
}
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
358
|
-
if (
|
|
359
|
-
const
|
|
360
|
-
return
|
|
140
|
+
const i = t.match(Kn);
|
|
141
|
+
if (i === null) return t;
|
|
142
|
+
if (e === "date" && i[4] === void 0) {
|
|
143
|
+
const h = s(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
144
|
+
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeZone: "UTC" }).format(h);
|
|
361
145
|
}
|
|
362
|
-
if (
|
|
363
|
-
const
|
|
364
|
-
return
|
|
146
|
+
if (e === "datetime-local" && i[4] !== void 0) {
|
|
147
|
+
const h = s(Number(i[1]), Number(i[2]), Number(i[3]), Number(i[4]), Number(i[5]), Number(i[6] ?? 0));
|
|
148
|
+
return h === null ? t : new Intl.DateTimeFormat(l, { dateStyle: "medium", timeStyle: i[6] === void 0 ? "short" : "medium", timeZone: "UTC" }).format(h);
|
|
365
149
|
}
|
|
366
150
|
} catch {
|
|
367
151
|
return t;
|
|
368
152
|
}
|
|
369
153
|
return t;
|
|
370
154
|
}
|
|
371
|
-
const
|
|
372
|
-
function
|
|
373
|
-
const
|
|
155
|
+
const Vn = /* @__PURE__ */ new Set(["date", "time", "datetime-local"]);
|
|
156
|
+
function Gt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: i, value: h, onChange: d, placeholder: u, type: b = "text", name: c, locale: v, min: m, max: N, step: r, minLength: g, maxLength: T, required: C, autoComplete: S, reveal: x }) {
|
|
157
|
+
const _ = he(), [y, I] = D(!1), U = a === !0 || i != null, P = U && Vn.has(b), k = b === "number" && (r === "any" || typeof r == "number" && !Number.isInteger(r)), B = b === "password" && x !== void 0 && !U, z = /* @__PURE__ */ n(
|
|
374
158
|
"input",
|
|
375
159
|
{
|
|
376
|
-
id:
|
|
377
|
-
name:
|
|
378
|
-
type:
|
|
379
|
-
autoComplete:
|
|
160
|
+
id: _,
|
|
161
|
+
name: c,
|
|
162
|
+
type: P || B && y ? "text" : b,
|
|
163
|
+
autoComplete: S,
|
|
380
164
|
className: "cms-input",
|
|
381
|
-
value:
|
|
382
|
-
...
|
|
165
|
+
value: P ? Zn(b, h, v) : h,
|
|
166
|
+
...P ? { "data-value": h } : {},
|
|
383
167
|
lang: v,
|
|
384
|
-
placeholder:
|
|
168
|
+
placeholder: u,
|
|
385
169
|
disabled: s,
|
|
386
|
-
readOnly:
|
|
387
|
-
required:
|
|
388
|
-
"aria-required":
|
|
389
|
-
min:
|
|
390
|
-
max:
|
|
391
|
-
step:
|
|
170
|
+
readOnly: U,
|
|
171
|
+
required: C,
|
|
172
|
+
"aria-required": C || void 0,
|
|
173
|
+
min: P ? void 0 : m,
|
|
174
|
+
max: P ? void 0 : N,
|
|
175
|
+
step: P ? void 0 : r,
|
|
392
176
|
minLength: g,
|
|
393
177
|
maxLength: T,
|
|
394
|
-
inputMode:
|
|
178
|
+
inputMode: b === "number" ? k ? "decimal" : "numeric" : void 0,
|
|
395
179
|
"aria-invalid": l != null || void 0,
|
|
396
|
-
"aria-describedby":
|
|
397
|
-
onChange: (
|
|
180
|
+
"aria-describedby": on(_, { help: t, error: l, pinned: i }),
|
|
181
|
+
onChange: (j) => d == null ? void 0 : d(j.target.value)
|
|
398
182
|
}
|
|
399
183
|
);
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
-
|
|
402
|
-
/* @__PURE__ */
|
|
184
|
+
return /* @__PURE__ */ n(cn, { id: _, label: e, help: t, error: l, pinned: i, children: B ? /* @__PURE__ */ f("span", { className: "cms-input-reveal", children: [
|
|
185
|
+
z,
|
|
186
|
+
/* @__PURE__ */ n(
|
|
403
187
|
"button",
|
|
404
188
|
{
|
|
405
189
|
type: "button",
|
|
406
190
|
className: "cms-input-reveal__button",
|
|
407
|
-
"aria-controls":
|
|
408
|
-
"aria-label":
|
|
409
|
-
title:
|
|
191
|
+
"aria-controls": _,
|
|
192
|
+
"aria-label": y ? x.hide : x.show,
|
|
193
|
+
title: y ? x.hide : x.show,
|
|
410
194
|
disabled: s,
|
|
411
|
-
onClick: () => I((
|
|
412
|
-
children: /* @__PURE__ */
|
|
195
|
+
onClick: () => I((j) => !j),
|
|
196
|
+
children: /* @__PURE__ */ n($, { name: y ? "eye-off" : "eye", size: 18 })
|
|
413
197
|
}
|
|
414
198
|
)
|
|
415
|
-
] }) :
|
|
199
|
+
] }) : z });
|
|
416
200
|
}
|
|
417
|
-
function
|
|
418
|
-
const g =
|
|
419
|
-
return /* @__PURE__ */
|
|
201
|
+
function jt({ label: e, help: t, error: l, disabled: s, readOnly: a, pinned: i, value: h, onChange: d, placeholder: u, rows: b = 4, name: c, locale: v, minLength: m, maxLength: N, required: r }) {
|
|
202
|
+
const g = he();
|
|
203
|
+
return /* @__PURE__ */ n(cn, { id: g, label: e, help: t, error: l, pinned: i, children: /* @__PURE__ */ n(
|
|
420
204
|
"textarea",
|
|
421
205
|
{
|
|
422
206
|
id: g,
|
|
423
|
-
name:
|
|
207
|
+
name: c,
|
|
424
208
|
className: "cms-input cms-textarea",
|
|
425
|
-
rows:
|
|
426
|
-
value:
|
|
209
|
+
rows: b,
|
|
210
|
+
value: h,
|
|
427
211
|
lang: v,
|
|
428
|
-
placeholder:
|
|
212
|
+
placeholder: u,
|
|
429
213
|
disabled: s,
|
|
430
|
-
readOnly: a === !0 ||
|
|
214
|
+
readOnly: a === !0 || i != null,
|
|
431
215
|
required: r,
|
|
432
216
|
"aria-required": r || void 0,
|
|
433
|
-
minLength:
|
|
434
|
-
maxLength:
|
|
217
|
+
minLength: m,
|
|
218
|
+
maxLength: N,
|
|
435
219
|
"aria-invalid": l != null || void 0,
|
|
436
|
-
"aria-describedby":
|
|
437
|
-
onChange: (T) =>
|
|
220
|
+
"aria-describedby": on(g, { help: t, error: l, pinned: i }),
|
|
221
|
+
onChange: (T) => d == null ? void 0 : d(T.target.value)
|
|
438
222
|
}
|
|
439
223
|
) });
|
|
440
224
|
}
|
|
441
|
-
function
|
|
442
|
-
const
|
|
443
|
-
return /* @__PURE__ */
|
|
225
|
+
function Yt({ label: e, help: t, error: l, disabled: s, readOnly: a, value: i, options: h, onChange: d, emptyText: u = "Nothing to choose from yet.", name: b }) {
|
|
226
|
+
const c = he(), v = h.length === 0;
|
|
227
|
+
return /* @__PURE__ */ n(cn, { id: c, label: e, help: v ? u : t, error: l, children: /* @__PURE__ */ n(
|
|
444
228
|
"select",
|
|
445
229
|
{
|
|
446
|
-
id:
|
|
447
|
-
name:
|
|
230
|
+
id: c,
|
|
231
|
+
name: b,
|
|
448
232
|
className: "cms-input cms-select",
|
|
449
|
-
value:
|
|
233
|
+
value: i,
|
|
450
234
|
disabled: s || v,
|
|
451
235
|
"aria-readonly": a || void 0,
|
|
452
236
|
"aria-invalid": l != null || void 0,
|
|
453
|
-
"aria-describedby":
|
|
454
|
-
onChange: (
|
|
455
|
-
a ||
|
|
237
|
+
"aria-describedby": on(c, { help: v ? u : t, error: l }),
|
|
238
|
+
onChange: (m) => {
|
|
239
|
+
a || d == null || d(m.target.value);
|
|
456
240
|
},
|
|
457
|
-
children:
|
|
241
|
+
children: h.map((m) => /* @__PURE__ */ n("option", { value: m.value, disabled: a && m.value !== i, children: m.label }, m.value))
|
|
458
242
|
}
|
|
459
243
|
) });
|
|
460
244
|
}
|
|
461
|
-
function
|
|
462
|
-
const
|
|
463
|
-
return /* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
245
|
+
function Xt({ label: e, checked: t, onChange: l, disabled: s, readOnly: a, help: i }) {
|
|
246
|
+
const h = he();
|
|
247
|
+
return /* @__PURE__ */ f("div", { className: "cms-toggle-row", children: [
|
|
248
|
+
/* @__PURE__ */ n(
|
|
465
249
|
"button",
|
|
466
250
|
{
|
|
467
|
-
id:
|
|
251
|
+
id: h,
|
|
468
252
|
type: "button",
|
|
469
253
|
role: "switch",
|
|
470
|
-
className:
|
|
254
|
+
className: F("cms-toggle", t && "is-on"),
|
|
471
255
|
"aria-checked": t,
|
|
472
256
|
"aria-readonly": a || void 0,
|
|
473
|
-
"aria-describedby":
|
|
257
|
+
"aria-describedby": i != null ? `${h}-help` : void 0,
|
|
474
258
|
disabled: s,
|
|
475
259
|
onClick: () => {
|
|
476
260
|
a || l == null || l(!t);
|
|
477
261
|
},
|
|
478
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ n("span", { className: "cms-toggle__thumb" })
|
|
479
263
|
}
|
|
480
264
|
),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
|
|
265
|
+
/* @__PURE__ */ n("label", { className: "cms-toggle__label", htmlFor: h, children: e }),
|
|
266
|
+
i != null ? /* @__PURE__ */ n("p", { className: "cms-field__help", id: `${h}-help`, children: i }) : null
|
|
483
267
|
] });
|
|
484
268
|
}
|
|
485
|
-
const
|
|
486
|
-
function
|
|
487
|
-
const [
|
|
488
|
-
if (
|
|
489
|
-
if (
|
|
490
|
-
g.current = document.activeElement, v(!0),
|
|
269
|
+
const qn = 150;
|
|
270
|
+
function Sn({ open: e, title: t, onClose: l, dirty: s = !1, onDirtyClose: a, children: i, footer: h, closeLabel: d = "Close", initialFocus: u, className: b }) {
|
|
271
|
+
const [c, v] = D(e), [m, N] = D(!1), r = O(null), g = O(null), T = he();
|
|
272
|
+
if (Q(() => {
|
|
273
|
+
if (e) {
|
|
274
|
+
g.current = document.activeElement, v(!0), N(!1);
|
|
491
275
|
return;
|
|
492
276
|
}
|
|
493
|
-
if (!
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
var
|
|
497
|
-
v(!1),
|
|
498
|
-
},
|
|
499
|
-
return () => window.clearTimeout(
|
|
500
|
-
}, [
|
|
501
|
-
var
|
|
502
|
-
if (
|
|
503
|
-
const
|
|
504
|
-
(
|
|
277
|
+
if (!c) return;
|
|
278
|
+
N(!0);
|
|
279
|
+
const S = window.setTimeout(() => {
|
|
280
|
+
var x, _;
|
|
281
|
+
v(!1), N(!1), (_ = (x = g.current) == null ? void 0 : x.focus) == null || _.call(x);
|
|
282
|
+
}, qn);
|
|
283
|
+
return () => window.clearTimeout(S);
|
|
284
|
+
}, [e, c]), Q(() => {
|
|
285
|
+
var S, x;
|
|
286
|
+
if (e && c) {
|
|
287
|
+
const _ = 'input, select, textarea, button, [href], [tabindex]:not([tabindex="-1"])';
|
|
288
|
+
(x = (u == null ? void 0 : u.current) ?? ((S = r.current) == null ? void 0 : S.querySelector(`.cms-modal__body :is(${_}), .cms-modal__foot :is(${_})`)) ?? r.current) == null || x.focus();
|
|
505
289
|
}
|
|
506
|
-
}, [
|
|
507
|
-
const
|
|
290
|
+
}, [e, c, u]), !c) return null;
|
|
291
|
+
const C = () => {
|
|
508
292
|
s ? a == null || a() : l();
|
|
509
293
|
};
|
|
510
|
-
return
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
|
|
513
|
-
}, children: /* @__PURE__ */
|
|
294
|
+
return an(
|
|
295
|
+
/* @__PURE__ */ n("div", { className: F("cms-modal-scrim", m && "is-closing"), onMouseDown: (S) => {
|
|
296
|
+
S.target === S.currentTarget && C();
|
|
297
|
+
}, children: /* @__PURE__ */ f(
|
|
514
298
|
"div",
|
|
515
299
|
{
|
|
516
300
|
ref: r,
|
|
517
|
-
className:
|
|
301
|
+
className: F("cms-modal", b, m && "is-closing", s && "is-dirty"),
|
|
518
302
|
role: "dialog",
|
|
519
303
|
"aria-modal": "true",
|
|
520
304
|
"aria-labelledby": T,
|
|
521
305
|
tabIndex: -1,
|
|
522
|
-
onKeyDown: (
|
|
523
|
-
var
|
|
524
|
-
if (
|
|
525
|
-
|
|
526
|
-
else if (
|
|
527
|
-
const
|
|
528
|
-
if (!
|
|
529
|
-
const
|
|
530
|
-
|
|
306
|
+
onKeyDown: (S) => {
|
|
307
|
+
var x;
|
|
308
|
+
if (S.key === "Escape")
|
|
309
|
+
S.stopPropagation(), C();
|
|
310
|
+
else if (S.key === "Tab") {
|
|
311
|
+
const _ = (x = r.current) == null ? void 0 : x.querySelectorAll('input, select, textarea, button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])');
|
|
312
|
+
if (!_ || _.length === 0) return;
|
|
313
|
+
const y = _[0], I = _[_.length - 1];
|
|
314
|
+
S.shiftKey && document.activeElement === y ? (S.preventDefault(), I.focus()) : !S.shiftKey && document.activeElement === I && (S.preventDefault(), y.focus());
|
|
531
315
|
}
|
|
532
316
|
},
|
|
533
317
|
children: [
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ f("header", { className: "cms-modal__head", children: [
|
|
319
|
+
/* @__PURE__ */ n("h2", { className: "cms-modal__title", id: T, children: t }),
|
|
320
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d, onClick: C, children: /* @__PURE__ */ n(se, { name: "close" }) })
|
|
537
321
|
] }),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
|
|
322
|
+
/* @__PURE__ */ n("div", { className: "cms-modal__body", children: i }),
|
|
323
|
+
h != null ? /* @__PURE__ */ n("footer", { className: "cms-modal__foot", children: h }) : null
|
|
540
324
|
]
|
|
541
325
|
}
|
|
542
326
|
) }),
|
|
543
327
|
document.body
|
|
544
328
|
);
|
|
545
329
|
}
|
|
546
|
-
function
|
|
547
|
-
const
|
|
548
|
-
return /* @__PURE__ */
|
|
549
|
-
|
|
330
|
+
function Jt({ open: e, title: t, message: l, kind: s = "default", confirmLabel: a, cancelLabel: i, closeLabel: h, onConfirm: d, onCancel: u }) {
|
|
331
|
+
const b = s === "discard-changes";
|
|
332
|
+
return /* @__PURE__ */ n(
|
|
333
|
+
Sn,
|
|
550
334
|
{
|
|
551
|
-
open:
|
|
335
|
+
open: e,
|
|
552
336
|
title: t,
|
|
553
|
-
onClose:
|
|
554
|
-
...
|
|
555
|
-
footer: /* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
337
|
+
onClose: u,
|
|
338
|
+
...h === void 0 ? {} : { closeLabel: h },
|
|
339
|
+
footer: /* @__PURE__ */ f(ge, { children: [
|
|
340
|
+
/* @__PURE__ */ n(De, { onClick: u, children: i ?? (b ? "Keep editing" : "Cancel") }),
|
|
341
|
+
/* @__PURE__ */ n(De, { variant: s === "default" ? "primary" : "danger", onClick: d, children: a ?? (b ? "Discard changes" : "Confirm") })
|
|
558
342
|
] }),
|
|
559
|
-
children: s !== "default" ? /* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */
|
|
343
|
+
children: s !== "default" ? /* @__PURE__ */ f("p", { className: "cms-confirm__warning", children: [
|
|
344
|
+
/* @__PURE__ */ n(se, { name: "warning" }),
|
|
561
345
|
" ",
|
|
562
346
|
l
|
|
563
|
-
] }) : /* @__PURE__ */
|
|
347
|
+
] }) : /* @__PURE__ */ n("p", { children: l })
|
|
564
348
|
}
|
|
565
349
|
);
|
|
566
350
|
}
|
|
567
|
-
function
|
|
568
|
-
return /* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
l ? /* @__PURE__ */
|
|
572
|
-
s ? /* @__PURE__ */
|
|
351
|
+
function Qt({ kind: e, message: t, action: l, onDismiss: s, dismissLabel: a = "Dismiss" }) {
|
|
352
|
+
return /* @__PURE__ */ f("div", { className: F("cms-toast", `cms-toast--${e}`), role: e === "error" ? "alert" : "status", children: [
|
|
353
|
+
/* @__PURE__ */ n(se, { name: e === "success" ? "check" : e === "error" ? "warning" : "info" }),
|
|
354
|
+
/* @__PURE__ */ n("span", { className: "cms-toast__message", children: t }),
|
|
355
|
+
l ? /* @__PURE__ */ n(De, { className: "cms-toast__action", onClick: l.onAction, children: l.label }) : null,
|
|
356
|
+
s ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": a, onClick: s, children: /* @__PURE__ */ n(se, { name: "close" }) }) : null
|
|
573
357
|
] });
|
|
574
358
|
}
|
|
575
|
-
function
|
|
576
|
-
return /* @__PURE__ */
|
|
359
|
+
function el({ children: e }) {
|
|
360
|
+
return /* @__PURE__ */ n("div", { className: "cms-toast-region", children: e });
|
|
577
361
|
}
|
|
578
|
-
function
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
362
|
+
function Gn({ what: e, layout: t = "inline" }) {
|
|
363
|
+
return /* @__PURE__ */ f("div", { className: F("cms-loading", `cms-loading--${t}`), role: "status", "aria-live": "polite", children: [
|
|
364
|
+
/* @__PURE__ */ n(se, { name: "spinner" }),
|
|
365
|
+
/* @__PURE__ */ n("span", { children: e })
|
|
582
366
|
] });
|
|
583
367
|
}
|
|
584
|
-
function
|
|
585
|
-
return /* @__PURE__ */
|
|
586
|
-
s !== void 0 && Be(s) !== null ? /* @__PURE__ */
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
t != null ? /* @__PURE__ */
|
|
368
|
+
function jn({ title: e, hint: t, action: l, icon: s }) {
|
|
369
|
+
return /* @__PURE__ */ f("div", { className: "cms-state cms-state--empty cms-state--page", role: "status", "aria-live": "polite", "data-kind": "empty", children: [
|
|
370
|
+
s !== void 0 && Be(s) !== null ? /* @__PURE__ */ n("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ n(Cn, { name: s, size: 32 }) }) : null,
|
|
371
|
+
/* @__PURE__ */ f("span", { className: "cms-state__text", children: [
|
|
372
|
+
/* @__PURE__ */ n("span", { className: "cms-state__title", children: e }),
|
|
373
|
+
t != null ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: t }) : null
|
|
590
374
|
] }),
|
|
591
|
-
l != null ? /* @__PURE__ */
|
|
375
|
+
l != null ? /* @__PURE__ */ n("div", { className: "cms-state__action", children: l }) : null
|
|
592
376
|
] });
|
|
593
377
|
}
|
|
594
|
-
function
|
|
595
|
-
return /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
t ? /* @__PURE__ */
|
|
378
|
+
function Yn({ message: e, onRetry: t, retryLabel: l = "Try again" }) {
|
|
379
|
+
return /* @__PURE__ */ f("div", { className: "cms-error-banner", role: "alert", children: [
|
|
380
|
+
/* @__PURE__ */ n(se, { name: "warning" }),
|
|
381
|
+
/* @__PURE__ */ n("span", { className: "cms-error-banner__message", children: e }),
|
|
382
|
+
t ? /* @__PURE__ */ n(De, { onClick: t, children: l }) : null
|
|
599
383
|
] });
|
|
600
384
|
}
|
|
601
|
-
const
|
|
602
|
-
function
|
|
603
|
-
if (typeof window > "u" || typeof getComputedStyle != "function") return
|
|
604
|
-
const
|
|
605
|
-
return Number.isFinite(t) && t >= 0 ? t :
|
|
385
|
+
const en = 300;
|
|
386
|
+
function Xn() {
|
|
387
|
+
if (typeof window > "u" || typeof getComputedStyle != "function") return en;
|
|
388
|
+
const e = getComputedStyle(document.documentElement).getPropertyValue("--cms-state-delay").trim(), t = e.endsWith("ms") ? Number.parseFloat(e) : e.endsWith("s") ? Number.parseFloat(e) * 1e3 : Number.NaN;
|
|
389
|
+
return Number.isFinite(t) && t >= 0 ? t : en;
|
|
606
390
|
}
|
|
607
|
-
function
|
|
608
|
-
return /* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
391
|
+
function Jn() {
|
|
392
|
+
return /* @__PURE__ */ f("svg", { className: "cms-state__spinner", viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: [
|
|
393
|
+
/* @__PURE__ */ n("circle", { className: "cms-state__track", cx: "12", cy: "12", r: "10", fill: "none" }),
|
|
394
|
+
/* @__PURE__ */ n("circle", { className: "cms-state__arc", cx: "12", cy: "12", r: "10", fill: "none", pathLength: "100", strokeDasharray: "28 72" })
|
|
611
395
|
] });
|
|
612
396
|
}
|
|
613
|
-
function Le({ kind:
|
|
614
|
-
const [
|
|
615
|
-
|
|
616
|
-
if (
|
|
617
|
-
|
|
397
|
+
function Le({ kind: e, title: t, description: l, action: s, placement: a = "page", icon: i }) {
|
|
398
|
+
const [h, d] = D(e !== "loading");
|
|
399
|
+
Q(() => {
|
|
400
|
+
if (e !== "loading") {
|
|
401
|
+
d(!0);
|
|
618
402
|
return;
|
|
619
403
|
}
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
return () => window.clearTimeout(
|
|
623
|
-
}, [
|
|
624
|
-
const
|
|
625
|
-
return /* @__PURE__ */
|
|
404
|
+
d(!1);
|
|
405
|
+
const b = window.setTimeout(() => d(!0), Xn());
|
|
406
|
+
return () => window.clearTimeout(b);
|
|
407
|
+
}, [e]);
|
|
408
|
+
const u = a === "block";
|
|
409
|
+
return /* @__PURE__ */ f(
|
|
626
410
|
"div",
|
|
627
411
|
{
|
|
628
|
-
className:
|
|
412
|
+
className: F("cms-state", `cms-state--${e}`, `cms-state--${a}`, !h && "is-waiting"),
|
|
629
413
|
role: "status",
|
|
630
414
|
"aria-live": "polite",
|
|
631
|
-
"data-kind":
|
|
415
|
+
"data-kind": e,
|
|
632
416
|
children: [
|
|
633
|
-
|
|
634
|
-
(
|
|
635
|
-
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
l !== void 0 && !
|
|
417
|
+
e === "loading" ? /* @__PURE__ */ n(Jn, {}) : null,
|
|
418
|
+
(e === "error" || e === "denied") && !u ? /* @__PURE__ */ n(se, { name: e === "error" ? "warning" : "lock" }) : null,
|
|
419
|
+
e === "empty" && !u && i !== void 0 && Be(i) !== null ? /* @__PURE__ */ n("span", { className: "cms-state__icon", "aria-hidden": "true", children: /* @__PURE__ */ n(Cn, { name: i, size: a === "page" ? 32 : 24 }) }) : null,
|
|
420
|
+
/* @__PURE__ */ f("span", { className: "cms-state__text", children: [
|
|
421
|
+
/* @__PURE__ */ n("span", { className: "cms-state__title", children: t }),
|
|
422
|
+
l !== void 0 && !u ? /* @__PURE__ */ n("span", { className: "cms-state__description", children: l }) : null
|
|
639
423
|
] }),
|
|
640
|
-
s !== void 0 &&
|
|
424
|
+
s !== void 0 && e !== "denied" ? /* @__PURE__ */ n(De, { className: "cms-state__action", variant: u ? "quiet" : "secondary", onClick: s.onAction, children: s.label }) : null
|
|
641
425
|
]
|
|
642
426
|
}
|
|
643
427
|
);
|
|
644
428
|
}
|
|
645
|
-
const
|
|
646
|
-
function
|
|
647
|
-
return
|
|
429
|
+
const Qn = 'input, select, textarea, button:not([disabled]), iframe, [href], [tabindex]:not([tabindex="-1"])', et = 60;
|
|
430
|
+
function nt(e) {
|
|
431
|
+
return e instanceof Element && e.closest('input, select, textarea, [contenteditable="true"], [data-viewer-keys]') !== null;
|
|
648
432
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
433
|
+
function tt(e) {
|
|
434
|
+
return e instanceof Element && e.closest("[data-viewer-gestures]") !== null;
|
|
651
435
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
436
|
+
function lt(e) {
|
|
437
|
+
return e.getClientRects().length > 0;
|
|
654
438
|
}
|
|
655
|
-
function
|
|
656
|
-
const { name: t, badge: l, closeLabel: s, onClose: a, actions:
|
|
657
|
-
|
|
658
|
-
var
|
|
659
|
-
const k = document.activeElement,
|
|
660
|
-
return document.body.style.overflow = "hidden", (
|
|
661
|
-
var
|
|
662
|
-
document.body.style.overflow =
|
|
439
|
+
function nl(e) {
|
|
440
|
+
const { name: t, badge: l, closeLabel: s, onClose: a, actions: i = [], moreLabel: h = "More", edit: d, editing: u, state: b, siblings: c, bar: v, thumbnails: m, strip: N, onZoom: r, children: g } = e, T = O(null), C = O(null), S = he(), [x, _] = D(!1), y = O(null);
|
|
441
|
+
Q(() => {
|
|
442
|
+
var z;
|
|
443
|
+
const k = document.activeElement, B = document.body.style.overflow;
|
|
444
|
+
return document.body.style.overflow = "hidden", (z = C.current) == null || z.focus(), () => {
|
|
445
|
+
var j;
|
|
446
|
+
document.body.style.overflow = B, (j = k == null ? void 0 : k.focus) == null || j.call(k);
|
|
663
447
|
};
|
|
664
448
|
}, []);
|
|
665
449
|
const I = () => {
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
},
|
|
671
|
-
var
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
Math.abs(
|
|
450
|
+
u != null && u.dirty ? u.onDirtyClose() : a();
|
|
451
|
+
}, U = (k) => {
|
|
452
|
+
const B = k.touches.length === 1 ? k.touches[0] : void 0;
|
|
453
|
+
y.current = B === void 0 || u !== void 0 || tt(k.target) ? null : { x: B.clientX, y: B.clientY };
|
|
454
|
+
}, P = (k) => {
|
|
455
|
+
var K, G;
|
|
456
|
+
const B = y.current, z = k.changedTouches[0];
|
|
457
|
+
if (y.current = null, B === null || z === void 0) return;
|
|
458
|
+
const j = z.clientX - B.x;
|
|
459
|
+
Math.abs(j) < et || Math.abs(j) < Math.abs(z.clientY - B.y) || (j > 0 ? (K = c == null ? void 0 : c.onPrevious) == null || K.call(c) : (G = c == null ? void 0 : c.onNext) == null || G.call(c));
|
|
676
460
|
};
|
|
677
|
-
return
|
|
678
|
-
/* @__PURE__ */
|
|
461
|
+
return an(
|
|
462
|
+
/* @__PURE__ */ f(
|
|
679
463
|
"div",
|
|
680
464
|
{
|
|
681
465
|
ref: T,
|
|
682
|
-
className:
|
|
466
|
+
className: F("cms-viewer", u !== void 0 && "is-editing"),
|
|
683
467
|
role: "dialog",
|
|
684
468
|
"aria-modal": "true",
|
|
685
|
-
"aria-labelledby":
|
|
469
|
+
"aria-labelledby": S,
|
|
686
470
|
tabIndex: -1,
|
|
687
471
|
onKeyDown: (k) => {
|
|
688
|
-
var
|
|
472
|
+
var B, z, j;
|
|
689
473
|
if (k.key === "Escape") {
|
|
690
|
-
if (
|
|
691
|
-
k.stopPropagation(),
|
|
474
|
+
if (u !== void 0) return;
|
|
475
|
+
k.stopPropagation(), x ? _(!1) : a();
|
|
692
476
|
} else if (k.key === "Tab") {
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
k.shiftKey && document.activeElement ===
|
|
697
|
-
} else
|
|
477
|
+
const K = Array.from(((B = T.current) == null ? void 0 : B.querySelectorAll(Qn)) ?? []).filter(lt);
|
|
478
|
+
if (K.length === 0) return;
|
|
479
|
+
const G = K[0], Y = K[K.length - 1];
|
|
480
|
+
k.shiftKey && document.activeElement === G ? (k.preventDefault(), Y.focus()) : !k.shiftKey && document.activeElement === Y && (k.preventDefault(), G.focus());
|
|
481
|
+
} else u === void 0 && !nt(k.target) && !k.ctrlKey && !k.metaKey && !k.altKey && (k.key === "ArrowLeft" ? (z = c == null ? void 0 : c.onPrevious) == null || z.call(c) : k.key === "ArrowRight" ? (j = c == null ? void 0 : c.onNext) == null || j.call(c) : k.key === "+" || k.key === "=" ? r == null || r("in") : k.key === "-" ? r == null || r("out") : k.key === "0" && (r == null || r("reset")));
|
|
698
482
|
},
|
|
699
483
|
children: [
|
|
700
|
-
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
] }) : /* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
484
|
+
c !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-visually-hidden", role: "status", children: `${t}, ${c.position}` }) : null,
|
|
485
|
+
/* @__PURE__ */ f("header", { className: "cms-viewer__top", children: [
|
|
486
|
+
/* @__PURE__ */ n("button", { ref: C, type: "button", className: "cms-viewer__icon", "aria-label": s, onClick: I, children: /* @__PURE__ */ n(se, { name: "close" }) }),
|
|
487
|
+
/* @__PURE__ */ n("span", { className: "cms-viewer__badge", children: l }),
|
|
488
|
+
/* @__PURE__ */ n("h2", { className: "cms-viewer__name", id: S, title: t, children: t }),
|
|
489
|
+
c !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-viewer__position", children: c.position }) : null,
|
|
490
|
+
/* @__PURE__ */ n("span", { className: "cms-viewer__space" }),
|
|
491
|
+
u !== void 0 ? /* @__PURE__ */ f(ge, { children: [
|
|
492
|
+
/* @__PURE__ */ n("span", { className: "cms-viewer__status", role: "status", children: u.status }),
|
|
493
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.onDone, children: u.doneLabel })
|
|
494
|
+
] }) : /* @__PURE__ */ f(ge, { children: [
|
|
495
|
+
/* @__PURE__ */ n("span", { className: "cms-viewer__actions", children: i.map((k) => /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button", onClick: k.onSelect, children: [
|
|
712
496
|
k.icon,
|
|
713
497
|
k.label
|
|
714
498
|
] }, k.label)) }),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
/* @__PURE__ */
|
|
499
|
+
d !== void 0 ? /* @__PURE__ */ f("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", "aria-label": d.label, onClick: d.onEdit, children: [
|
|
500
|
+
d.icon,
|
|
501
|
+
/* @__PURE__ */ n("span", { className: "cms-viewer__wide", children: d.label })
|
|
718
502
|
] }) : null,
|
|
719
|
-
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
|
|
503
|
+
i.length > 0 ? /* @__PURE__ */ f("span", { className: "cms-viewer__more", children: [
|
|
504
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__icon", "aria-label": h, "aria-expanded": x, onClick: () => _((k) => !k), children: /* @__PURE__ */ n($, { name: "more" }) }),
|
|
505
|
+
x ? /* @__PURE__ */ n("span", { className: "cms-viewer__menu", children: i.map((k) => /* @__PURE__ */ f(
|
|
722
506
|
"button",
|
|
723
507
|
{
|
|
724
508
|
type: "button",
|
|
725
509
|
className: "cms-viewer__button",
|
|
726
510
|
onClick: () => {
|
|
727
|
-
|
|
511
|
+
_(!1), k.onSelect();
|
|
728
512
|
},
|
|
729
513
|
children: [
|
|
730
514
|
k.icon,
|
|
@@ -736,229 +520,229 @@ function jt(n) {
|
|
|
736
520
|
] }) : null
|
|
737
521
|
] })
|
|
738
522
|
] }),
|
|
739
|
-
/* @__PURE__ */
|
|
740
|
-
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
(
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ f("div", { className: "cms-viewer__body", children: [
|
|
524
|
+
m != null && u === void 0 ? /* @__PURE__ */ n("nav", { className: "cms-viewer__thumbnails", children: m }) : null,
|
|
525
|
+
/* @__PURE__ */ f("div", { className: "cms-viewer__content", onTouchStart: U, onTouchEnd: P, children: [
|
|
526
|
+
(u == null ? void 0 : u.conflict) !== void 0 ? /* @__PURE__ */ f("div", { className: "cms-viewer__conflict", role: "alert", children: [
|
|
527
|
+
/* @__PURE__ */ n("p", { className: "cms-viewer__conflict-text", children: u.conflict.message }),
|
|
528
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button", onClick: u.conflict.onOverwrite, children: u.conflict.overwriteLabel }),
|
|
529
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__button cms-viewer__button--edit", onClick: u.conflict.onKeepBoth, children: u.conflict.keepBothLabel })
|
|
746
530
|
] }) : null,
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
531
|
+
b === void 0 ? g : /* @__PURE__ */ n(st, { state: b }),
|
|
532
|
+
u === void 0 && (c != null && c.onPrevious) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--previous", "aria-label": c.previousLabel, title: c.previousLabel, onClick: c.onPrevious, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
|
|
533
|
+
u === void 0 && (c != null && c.onNext) ? /* @__PURE__ */ n("button", { type: "button", className: "cms-viewer__side cms-viewer__side--next", "aria-label": c.nextLabel, title: c.nextLabel, onClick: c.onNext, children: /* @__PURE__ */ n(se, { name: "back" }) }) : null,
|
|
534
|
+
u === void 0 && c !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-viewer__dots", "aria-hidden": "true", children: Array.from({ length: Math.min(c.total, 7) }, (k, B) => /* @__PURE__ */ n("i", { className: B === Math.min(c.index, 6) ? "is-current" : void 0 }, B)) }) : null
|
|
751
535
|
] })
|
|
752
536
|
] }),
|
|
753
|
-
|
|
754
|
-
v != null ? /* @__PURE__ */
|
|
537
|
+
u === void 0 && N != null ? /* @__PURE__ */ n("div", { className: "cms-viewer__strip", children: N }) : null,
|
|
538
|
+
v != null ? /* @__PURE__ */ n("footer", { className: "cms-viewer__bar", children: v }) : null
|
|
755
539
|
]
|
|
756
540
|
}
|
|
757
541
|
),
|
|
758
542
|
document.body
|
|
759
543
|
);
|
|
760
544
|
}
|
|
761
|
-
function
|
|
762
|
-
switch (
|
|
545
|
+
function st({ state: e }) {
|
|
546
|
+
switch (e.kind) {
|
|
763
547
|
case "loading":
|
|
764
|
-
return /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ n(Le, { kind: "loading", title: e.title, placement: "page" });
|
|
765
549
|
case "error":
|
|
766
|
-
return /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ n(
|
|
767
551
|
Le,
|
|
768
552
|
{
|
|
769
553
|
kind: "error",
|
|
770
|
-
title:
|
|
771
|
-
...
|
|
772
|
-
...
|
|
554
|
+
title: e.title,
|
|
555
|
+
...e.description === void 0 ? {} : { description: e.description },
|
|
556
|
+
...e.retry === void 0 ? {} : { action: { label: e.retry.label, onAction: e.retry.onRetry } },
|
|
773
557
|
placement: "page"
|
|
774
558
|
}
|
|
775
559
|
);
|
|
776
560
|
case "no-preview":
|
|
777
|
-
return /* @__PURE__ */
|
|
561
|
+
return /* @__PURE__ */ n(
|
|
778
562
|
Le,
|
|
779
563
|
{
|
|
780
564
|
kind: "empty",
|
|
781
|
-
title:
|
|
782
|
-
...
|
|
783
|
-
action: { label:
|
|
565
|
+
title: e.title,
|
|
566
|
+
...e.description === void 0 ? {} : { description: e.description },
|
|
567
|
+
action: { label: e.download.label, onAction: e.download.onDownload },
|
|
784
568
|
placement: "page"
|
|
785
569
|
}
|
|
786
570
|
);
|
|
787
571
|
}
|
|
788
572
|
}
|
|
789
|
-
class
|
|
573
|
+
class at extends Error {
|
|
790
574
|
constructor(t = "denied") {
|
|
791
575
|
super(t), this.name = "FilePickerDenied";
|
|
792
576
|
}
|
|
793
577
|
}
|
|
794
|
-
class
|
|
578
|
+
class rt extends Error {
|
|
795
579
|
constructor(t = "restart") {
|
|
796
580
|
super(t), this.name = "FilePickerRestart";
|
|
797
581
|
}
|
|
798
582
|
}
|
|
799
|
-
const
|
|
800
|
-
${t}`,
|
|
801
|
-
function
|
|
802
|
-
var
|
|
803
|
-
const { open: t, spaces: l, list: s, disabledReason: a, budget:
|
|
804
|
-
|
|
583
|
+
const Je = (e, t) => `${e}
|
|
584
|
+
${t}`, it = (e, t) => e === "" ? t : `${e}/${t}`, ct = 48;
|
|
585
|
+
function tl(e) {
|
|
586
|
+
var ne, ye;
|
|
587
|
+
const { open: t, spaces: l, list: s, disabledReason: a, budget: i, formatSize: h, labels: d, onConfirm: u, onCancel: b } = e, [c, v] = D(((ne = l[0]) == null ? void 0 : ne.id) ?? ""), [m, N] = D(""), [r, g] = D({ status: "loading" }), [T, C] = D(0), [S, x] = D(/* @__PURE__ */ new Map()), [_, y] = D(0), [I, U] = D(!1), P = O(null), k = O(!1);
|
|
588
|
+
Q(() => {
|
|
805
589
|
k.current = !1;
|
|
806
|
-
}, [t,
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
var
|
|
810
|
-
t && (v(((
|
|
811
|
-
}, [t]),
|
|
812
|
-
if (!t ||
|
|
813
|
-
let
|
|
814
|
-
return g({ status: "loading" }),
|
|
815
|
-
(
|
|
816
|
-
(
|
|
590
|
+
}, [t, c, m]);
|
|
591
|
+
const B = he();
|
|
592
|
+
Q(() => {
|
|
593
|
+
var w;
|
|
594
|
+
t && (v(((w = l[0]) == null ? void 0 : w.id) ?? ""), N(""), x(/* @__PURE__ */ new Map()), U(!1));
|
|
595
|
+
}, [t]), Q(() => {
|
|
596
|
+
if (!t || c === "") return;
|
|
597
|
+
let w = !0;
|
|
598
|
+
return g({ status: "loading" }), y(0), s(c, m).then(
|
|
599
|
+
(E) => w && g({ status: "ready", entries: E.entries, next: E.next ?? null, paging: !1 }),
|
|
600
|
+
(E) => w && g({ status: E instanceof at ? "denied" : "error" })
|
|
817
601
|
), () => {
|
|
818
|
-
|
|
602
|
+
w = !1;
|
|
819
603
|
};
|
|
820
|
-
}, [t,
|
|
821
|
-
const
|
|
604
|
+
}, [t, c, m, s, T]);
|
|
605
|
+
const z = Ie(() => {
|
|
822
606
|
if (r.status !== "ready" || r.next === null || r.paging) return;
|
|
823
|
-
const
|
|
824
|
-
g({ ...r, paging: !0 }), s(
|
|
825
|
-
(
|
|
826
|
-
k.current = !1, g({ status: "ready", entries: [...
|
|
607
|
+
const w = r.next, E = r.entries;
|
|
608
|
+
g({ ...r, paging: !0 }), s(c, m, w).then(
|
|
609
|
+
(W) => {
|
|
610
|
+
k.current = !1, g({ status: "ready", entries: [...E, ...W.entries], next: W.next ?? null, paging: !1 });
|
|
827
611
|
},
|
|
828
|
-
(
|
|
829
|
-
if (!(
|
|
830
|
-
g({ status: "ready", entries:
|
|
612
|
+
(W) => {
|
|
613
|
+
if (!(W instanceof rt)) {
|
|
614
|
+
g({ status: "ready", entries: E, next: w, paging: !1 });
|
|
831
615
|
return;
|
|
832
616
|
}
|
|
833
617
|
if (k.current) {
|
|
834
618
|
g({ status: "error" });
|
|
835
619
|
return;
|
|
836
620
|
}
|
|
837
|
-
k.current = !0,
|
|
621
|
+
k.current = !0, C((q) => q + 1);
|
|
838
622
|
}
|
|
839
623
|
);
|
|
840
|
-
}, [r, s,
|
|
841
|
-
var
|
|
842
|
-
return ((
|
|
843
|
-
}, [
|
|
844
|
-
if (
|
|
845
|
-
const
|
|
846
|
-
return
|
|
847
|
-
}, be = (
|
|
848
|
-
const
|
|
849
|
-
!
|
|
850
|
-
const
|
|
851
|
-
return
|
|
624
|
+
}, [r, s, c, m]), j = Ie((w) => {
|
|
625
|
+
var E;
|
|
626
|
+
return ((E = i == null ? void 0 : i.cost) == null ? void 0 : E.call(i, w)) ?? w.size ?? 0;
|
|
627
|
+
}, [i]), K = Bn(() => [...S.values()], [S]), G = K.reduce((w, E) => w + (E.size ?? 0), 0), Y = i === void 0 ? null : i.limitBytes - i.usedBytes - K.reduce((w, E) => w + j(E), 0), ee = Y !== null && Y < 0, ie = (w) => {
|
|
628
|
+
if (w.kind !== "file") return null;
|
|
629
|
+
const E = a == null ? void 0 : a(w);
|
|
630
|
+
return E || (Y !== null && !S.has(Je(c, w.id)) && j(w) > Y ? d.overBudget : null);
|
|
631
|
+
}, be = (w) => {
|
|
632
|
+
const E = Je(c, w.id);
|
|
633
|
+
!S.has(E) && ie(w) !== null || x((W) => {
|
|
634
|
+
const q = new Map(W);
|
|
635
|
+
return q.has(E) ? q.delete(E) : q.set(E, { ...w, space: c, path: m }), q;
|
|
852
636
|
});
|
|
853
|
-
},
|
|
854
|
-
const
|
|
855
|
-
return
|
|
856
|
-
}),
|
|
857
|
-
const
|
|
858
|
-
if (
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
} else
|
|
863
|
-
},
|
|
864
|
-
return /* @__PURE__ */
|
|
865
|
-
|
|
637
|
+
}, ce = (w) => N(it(m, w.name)), de = () => N(m.includes("/") ? m.slice(0, m.lastIndexOf("/")) : ""), Ce = (w) => x((E) => {
|
|
638
|
+
const W = new Map(E);
|
|
639
|
+
return W.delete(w), W;
|
|
640
|
+
}), fe = r.status === "ready" ? r.entries : [], te = (w) => {
|
|
641
|
+
const E = fe[_];
|
|
642
|
+
if (w.key === "ArrowDown" || w.key === "ArrowUp" || w.key === "Home" || w.key === "End") {
|
|
643
|
+
w.preventDefault();
|
|
644
|
+
const W = fe.length - 1, q = w.key === "Home" ? 0 : w.key === "End" ? W : Math.min(W, Math.max(0, _ + (w.key === "ArrowDown" ? 1 : -1)));
|
|
645
|
+
y(q), q >= W - 1 && z();
|
|
646
|
+
} else w.key === "Enter" && (E == null ? void 0 : E.kind) === "folder" ? (w.preventDefault(), ce(E)) : w.key === " " && (E == null ? void 0 : E.kind) === "file" ? (w.preventDefault(), be(E)) : w.key === "Backspace" && m !== "" && (w.preventDefault(), de());
|
|
647
|
+
}, pe = m === "" ? [] : m.split("/"), _e = ((ye = l.find((w) => w.id === c)) == null ? void 0 : ye.name) ?? "", we = (w) => `${B}-entry-${String(w)}`;
|
|
648
|
+
return /* @__PURE__ */ f(
|
|
649
|
+
Sn,
|
|
866
650
|
{
|
|
867
651
|
open: t,
|
|
868
|
-
title:
|
|
869
|
-
onClose:
|
|
870
|
-
closeLabel:
|
|
871
|
-
initialFocus:
|
|
652
|
+
title: d.title,
|
|
653
|
+
onClose: b,
|
|
654
|
+
closeLabel: d.close,
|
|
655
|
+
initialFocus: P,
|
|
872
656
|
className: "cms-file-picker",
|
|
873
|
-
footer: /* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
|
|
876
|
-
|
|
657
|
+
footer: /* @__PURE__ */ f("div", { className: "cms-file-picker__foot", children: [
|
|
658
|
+
/* @__PURE__ */ f("div", { className: "cms-file-picker__summary", "aria-live": "polite", children: [
|
|
659
|
+
K.length > 0 ? /* @__PURE__ */ n("span", { children: d.total(K.length, h(G)) }) : null,
|
|
660
|
+
i !== void 0 && Y !== null ? /* @__PURE__ */ n("span", { className: F(ee && "is-over"), children: ee ? d.overBudget : d.left(h(Math.max(0, Y)), h(i.limitBytes)) }) : null
|
|
877
661
|
] }),
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ f("div", { className: "cms-file-picker__actions", children: [
|
|
663
|
+
/* @__PURE__ */ n(De, { variant: "secondary", onClick: b, children: d.cancel }),
|
|
664
|
+
/* @__PURE__ */ n(De, { variant: "primary", disabled: K.length === 0 || ee, onClick: () => u(K), children: d.confirm(K.length) })
|
|
881
665
|
] })
|
|
882
666
|
] }),
|
|
883
667
|
children: [
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
l.length > 1 ? /* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
v(
|
|
889
|
-
}, children: l.map((
|
|
668
|
+
/* @__PURE__ */ f("div", { className: "cms-file-picker__top", children: [
|
|
669
|
+
l.length > 1 ? /* @__PURE__ */ f("label", { className: "cms-file-picker__space", children: [
|
|
670
|
+
/* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: d.space }),
|
|
671
|
+
/* @__PURE__ */ n("select", { className: "cms-input cms-select", value: c, onChange: (w) => {
|
|
672
|
+
v(w.target.value), N("");
|
|
673
|
+
}, children: l.map((w) => /* @__PURE__ */ n("option", { value: w.id, children: w.name }, w.id)) })
|
|
890
674
|
] }) : null,
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
|
|
896
|
-
const
|
|
897
|
-
return /* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ f("nav", { className: "cms-file-picker__path", "aria-label": d.path, children: [
|
|
676
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d.up, disabled: m === "", onClick: de, children: /* @__PURE__ */ n($, { name: "chevron-left" }) }),
|
|
677
|
+
/* @__PURE__ */ f("ol", { children: [
|
|
678
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": m === "" ? "location" : void 0, onClick: () => N(""), children: _e }) }),
|
|
679
|
+
pe.map((w, E) => {
|
|
680
|
+
const W = pe.slice(0, E + 1).join("/");
|
|
681
|
+
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__crumb", "aria-current": W === m ? "location" : void 0, onClick: () => N(W), children: w }) }, W);
|
|
898
682
|
})
|
|
899
683
|
] })
|
|
900
684
|
] }),
|
|
901
|
-
|
|
685
|
+
K.length > 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-file-picker__chip", "aria-expanded": I, onClick: () => U((w) => !w), children: d.selected(K.length) }) : null
|
|
902
686
|
] }),
|
|
903
|
-
I &&
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
] },
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
|
|
910
|
-
}, children:
|
|
687
|
+
I && K.length > 0 ? /* @__PURE__ */ f("div", { className: "cms-file-picker__chosen", children: [
|
|
688
|
+
/* @__PURE__ */ n("ul", { children: [...S.entries()].map(([w, E]) => /* @__PURE__ */ f("li", { children: [
|
|
689
|
+
/* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: E.name }),
|
|
690
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button", "aria-label": d.remove(E.name), onClick: () => Ce(w), children: /* @__PURE__ */ n(se, { name: "close" }) })
|
|
691
|
+
] }, w)) }),
|
|
692
|
+
/* @__PURE__ */ n(De, { variant: "secondary", onClick: () => {
|
|
693
|
+
x(/* @__PURE__ */ new Map()), U(!1);
|
|
694
|
+
}, children: d.clear })
|
|
911
695
|
] }) : null,
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
const
|
|
914
|
-
|
|
696
|
+
/* @__PURE__ */ f("div", { className: "cms-file-picker__list", onScroll: (w) => {
|
|
697
|
+
const E = w.currentTarget;
|
|
698
|
+
E.scrollTop + E.clientHeight >= E.scrollHeight - ct && z();
|
|
915
699
|
}, children: [
|
|
916
|
-
r.status === "loading" ? /* @__PURE__ */
|
|
917
|
-
r.status === "error" ? /* @__PURE__ */
|
|
918
|
-
k.current = !1,
|
|
700
|
+
r.status === "loading" ? /* @__PURE__ */ n(Le, { kind: "loading", title: d.loading, placement: "page" }) : null,
|
|
701
|
+
r.status === "error" ? /* @__PURE__ */ n(Le, { kind: "error", title: d.error, placement: "page", action: { label: d.retry, onAction: () => {
|
|
702
|
+
k.current = !1, C((w) => w + 1);
|
|
919
703
|
} } }) : null,
|
|
920
|
-
r.status === "denied" ? /* @__PURE__ */
|
|
921
|
-
r.status === "ready" &&
|
|
922
|
-
/* @__PURE__ */
|
|
704
|
+
r.status === "denied" ? /* @__PURE__ */ n(Le, { kind: "denied", title: d.denied, placement: "page" }) : null,
|
|
705
|
+
r.status === "ready" && fe.length === 0 ? /* @__PURE__ */ n(Le, { kind: "empty", title: d.empty, placement: "page" }) : null,
|
|
706
|
+
/* @__PURE__ */ f(
|
|
923
707
|
"div",
|
|
924
708
|
{
|
|
925
|
-
ref:
|
|
709
|
+
ref: P,
|
|
926
710
|
role: "listbox",
|
|
927
711
|
"aria-multiselectable": "true",
|
|
928
|
-
"aria-label":
|
|
929
|
-
"aria-activedescendant":
|
|
712
|
+
"aria-label": d.files,
|
|
713
|
+
"aria-activedescendant": fe.length > 0 ? we(_) : void 0,
|
|
930
714
|
tabIndex: 0,
|
|
931
715
|
className: "cms-file-picker__entries",
|
|
932
|
-
hidden: r.status !== "ready" ||
|
|
933
|
-
onKeyDown:
|
|
716
|
+
hidden: r.status !== "ready" || fe.length === 0,
|
|
717
|
+
onKeyDown: te,
|
|
934
718
|
children: [
|
|
935
|
-
|
|
936
|
-
const
|
|
937
|
-
return /* @__PURE__ */
|
|
719
|
+
fe.map((w, E) => {
|
|
720
|
+
const W = w.kind === "file" && S.has(Je(c, w.id)), q = ie(w);
|
|
721
|
+
return /* @__PURE__ */ f(
|
|
938
722
|
"div",
|
|
939
723
|
{
|
|
940
|
-
id:
|
|
724
|
+
id: we(E),
|
|
941
725
|
role: "option",
|
|
942
|
-
"aria-selected":
|
|
943
|
-
"aria-disabled":
|
|
944
|
-
className:
|
|
726
|
+
"aria-selected": w.kind === "file" ? W : void 0,
|
|
727
|
+
"aria-disabled": q !== null || void 0,
|
|
728
|
+
className: F("cms-file-picker__entry", E === _ && "is-active", W && "is-ticked", q !== null && "is-disabled"),
|
|
945
729
|
onClick: () => {
|
|
946
|
-
|
|
730
|
+
y(E), w.kind === "folder" ? ce(w) : be(w);
|
|
947
731
|
},
|
|
948
732
|
children: [
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
|
|
733
|
+
/* @__PURE__ */ n("span", { className: "cms-file-picker__tick", "aria-hidden": "true", children: W ? /* @__PURE__ */ n($, { name: "check" }) : null }),
|
|
734
|
+
/* @__PURE__ */ n($, { name: w.kind === "folder" ? "folder" : "file" }),
|
|
735
|
+
/* @__PURE__ */ f("span", { className: "cms-file-picker__text", children: [
|
|
736
|
+
/* @__PURE__ */ n("span", { className: "cms-file-picker__name", children: w.name }),
|
|
737
|
+
q !== null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__reason", children: q }) : null
|
|
954
738
|
] }),
|
|
955
|
-
|
|
739
|
+
w.kind === "file" && w.size != null ? /* @__PURE__ */ n("span", { className: "cms-file-picker__size", children: h(w.size) }) : null
|
|
956
740
|
]
|
|
957
741
|
},
|
|
958
|
-
|
|
742
|
+
w.id
|
|
959
743
|
);
|
|
960
744
|
}),
|
|
961
|
-
r.status === "ready" && r.paging ? /* @__PURE__ */
|
|
745
|
+
r.status === "ready" && r.paging ? /* @__PURE__ */ n("div", { className: "cms-file-picker__paging", children: /* @__PURE__ */ n(Le, { kind: "loading", title: d.loading, placement: "inline" }) }) : null
|
|
962
746
|
]
|
|
963
747
|
}
|
|
964
748
|
)
|
|
@@ -967,91 +751,91 @@ function Yt(n) {
|
|
|
967
751
|
}
|
|
968
752
|
);
|
|
969
753
|
}
|
|
970
|
-
const
|
|
971
|
-
function
|
|
972
|
-
for (let l =
|
|
754
|
+
const nn = 64;
|
|
755
|
+
function ot(e, t) {
|
|
756
|
+
for (let l = e instanceof Element ? e : null; l !== null; l = l.parentElement) {
|
|
973
757
|
if (l instanceof HTMLElement && l.scrollTop > 0) return !1;
|
|
974
758
|
if (l === t) return !0;
|
|
975
759
|
}
|
|
976
760
|
return t.scrollTop <= 0;
|
|
977
761
|
}
|
|
978
|
-
function
|
|
979
|
-
const [l, s] = D(0), a =
|
|
980
|
-
return a.current = t,
|
|
981
|
-
const
|
|
982
|
-
if (
|
|
983
|
-
let
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
},
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
|
|
762
|
+
function dt(e, t) {
|
|
763
|
+
const [l, s] = D(0), a = O(t);
|
|
764
|
+
return a.current = t, Q(() => {
|
|
765
|
+
const i = e.current;
|
|
766
|
+
if (i === null) return;
|
|
767
|
+
let h = null, d = 0;
|
|
768
|
+
const u = (v) => {
|
|
769
|
+
h = ot(v.target, i) && v.touches.length === 1 ? v.touches[0].clientY : null, d = 0;
|
|
770
|
+
}, b = (v) => {
|
|
771
|
+
if (h === null || a.current === null) return;
|
|
772
|
+
const m = v.touches[0].clientY - h;
|
|
773
|
+
if (m <= 0) {
|
|
774
|
+
h = null, s(0);
|
|
991
775
|
return;
|
|
992
776
|
}
|
|
993
|
-
v.cancelable && v.preventDefault(),
|
|
994
|
-
},
|
|
777
|
+
v.cancelable && v.preventDefault(), d = Math.min(m * 0.6, nn * 1.5), s(d);
|
|
778
|
+
}, c = () => {
|
|
995
779
|
var v;
|
|
996
|
-
|
|
780
|
+
h !== null && d >= nn && ((v = a.current) == null || v.call(a)), h = null, d = 0, s(0);
|
|
997
781
|
};
|
|
998
|
-
return
|
|
999
|
-
|
|
782
|
+
return i.addEventListener("touchstart", u, { passive: !0 }), i.addEventListener("touchmove", b, { passive: !1 }), i.addEventListener("touchend", c), i.addEventListener("touchcancel", c), () => {
|
|
783
|
+
i.removeEventListener("touchstart", u), i.removeEventListener("touchmove", b), i.removeEventListener("touchend", c), i.removeEventListener("touchcancel", c);
|
|
1000
784
|
};
|
|
1001
|
-
}, [
|
|
1002
|
-
}
|
|
1003
|
-
const
|
|
1004
|
-
function
|
|
1005
|
-
return
|
|
1006
|
-
}
|
|
1007
|
-
function
|
|
1008
|
-
const v =
|
|
1009
|
-
if (l != null) return /* @__PURE__ */
|
|
1010
|
-
if (t === null) return /* @__PURE__ */
|
|
1011
|
-
if (t.length === 0) return /* @__PURE__ */
|
|
1012
|
-
const
|
|
1013
|
-
var
|
|
785
|
+
}, [e]), l;
|
|
786
|
+
}
|
|
787
|
+
const En = Rn(null);
|
|
788
|
+
function ut() {
|
|
789
|
+
return Fn(En);
|
|
790
|
+
}
|
|
791
|
+
function ll({ label: e, rows: t, error: l, onRetry: s, loadingText: a = "Loading", emptyTitle: i = "Nothing here yet", emptyHint: h, emptyIcon: d, selected: u, onOpen: b, onRowMenu: c }) {
|
|
792
|
+
const v = O([]), m = ut();
|
|
793
|
+
if (l != null) return /* @__PURE__ */ n(Yn, { message: l, onRetry: s });
|
|
794
|
+
if (t === null) return /* @__PURE__ */ n(Gn, { what: a, layout: "block" });
|
|
795
|
+
if (t.length === 0) return /* @__PURE__ */ n(jn, { title: i, hint: h, ...d === void 0 ? {} : { icon: d } });
|
|
796
|
+
const N = (r, g, T) => {
|
|
797
|
+
var C;
|
|
1014
798
|
if (r.key === "ArrowDown" || r.key === "ArrowUp")
|
|
1015
|
-
r.preventDefault(), (
|
|
799
|
+
r.preventDefault(), (C = v.current[Math.min(t.length - 1, Math.max(0, g + (r.key === "ArrowDown" ? 1 : -1)))]) == null || C.focus();
|
|
1016
800
|
else if (r.key === "Enter")
|
|
1017
|
-
|
|
1018
|
-
else if ((r.key === "ContextMenu" || r.shiftKey && r.key === "F10") &&
|
|
801
|
+
b == null || b(T);
|
|
802
|
+
else if ((r.key === "ContextMenu" || r.shiftKey && r.key === "F10") && c) {
|
|
1019
803
|
r.preventDefault();
|
|
1020
|
-
const
|
|
1021
|
-
|
|
804
|
+
const S = r.currentTarget.getBoundingClientRect();
|
|
805
|
+
c(T, { x: S.left + 16, y: S.bottom });
|
|
1022
806
|
}
|
|
1023
807
|
};
|
|
1024
|
-
return /* @__PURE__ */
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
808
|
+
return /* @__PURE__ */ f(ge, { children: [
|
|
809
|
+
m !== null && (m.distance > 0 || m.refreshing) ? /* @__PURE__ */ f("div", { className: "cms-list__pull", role: "status", style: { height: m.refreshing ? void 0 : m.distance }, "data-ready": m.distance >= nn ? "" : void 0, children: [
|
|
810
|
+
m.refreshing ? /* @__PURE__ */ n(se, { name: "spinner" }) : null,
|
|
811
|
+
m.text != null ? /* @__PURE__ */ n("span", { className: "cms-list__pull-text", children: m.text }) : null
|
|
1028
812
|
] }) : null,
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
const T = r.id ===
|
|
1031
|
-
return /* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ n("ul", { className: "cms-list", role: "listbox", "aria-label": e, children: t.map((r, g) => {
|
|
814
|
+
const T = r.id === u;
|
|
815
|
+
return /* @__PURE__ */ f(
|
|
1032
816
|
"li",
|
|
1033
817
|
{
|
|
1034
|
-
ref: (
|
|
1035
|
-
v.current[g] =
|
|
818
|
+
ref: (C) => {
|
|
819
|
+
v.current[g] = C;
|
|
1036
820
|
},
|
|
1037
821
|
role: "option",
|
|
1038
822
|
"aria-selected": T,
|
|
1039
|
-
tabIndex: T ||
|
|
1040
|
-
className:
|
|
1041
|
-
onClick: () =>
|
|
1042
|
-
onKeyDown: (
|
|
1043
|
-
onContextMenu:
|
|
1044
|
-
|
|
823
|
+
tabIndex: T || u == null && g === 0 ? 0 : -1,
|
|
824
|
+
className: F("cms-list__row", T && "is-selected"),
|
|
825
|
+
onClick: () => b == null ? void 0 : b(r.id),
|
|
826
|
+
onKeyDown: (C) => N(C, g, r.id),
|
|
827
|
+
onContextMenu: c ? (C) => {
|
|
828
|
+
C.preventDefault(), c(r.id, { x: C.clientX, y: C.clientY });
|
|
1045
829
|
} : void 0,
|
|
1046
830
|
children: [
|
|
1047
|
-
r.lead != null ? /* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
r.secondary != null ? /* @__PURE__ */
|
|
831
|
+
r.lead != null ? /* @__PURE__ */ n("span", { className: "cms-list__lead", children: r.lead }) : null,
|
|
832
|
+
/* @__PURE__ */ f("span", { className: "cms-list__text", children: [
|
|
833
|
+
/* @__PURE__ */ n("span", { className: F("cms-list__primary", r.unread === !0 && "is-unread"), children: r.primary }),
|
|
834
|
+
r.secondary != null ? /* @__PURE__ */ n("span", { className: "cms-list__secondary", children: r.secondary }) : null
|
|
1051
835
|
] }),
|
|
1052
|
-
r.meta != null || r.count !== void 0 ? /* @__PURE__ */
|
|
1053
|
-
r.meta != null ? /* @__PURE__ */
|
|
1054
|
-
r.count !== void 0 && r.count > 0 ? /* @__PURE__ */
|
|
836
|
+
r.meta != null || r.count !== void 0 ? /* @__PURE__ */ f("span", { className: "cms-list__end", children: [
|
|
837
|
+
r.meta != null ? /* @__PURE__ */ n("span", { className: "cms-list__meta", children: r.meta }) : null,
|
|
838
|
+
r.count !== void 0 && r.count > 0 ? /* @__PURE__ */ n("span", { className: "cms-badge cms-list__count", children: r.count }) : null
|
|
1055
839
|
] }) : null
|
|
1056
840
|
]
|
|
1057
841
|
},
|
|
@@ -1060,49 +844,49 @@ function Xt({ label: n, rows: t, error: l, onRetry: s, loadingText: a = "Loading
|
|
|
1060
844
|
}) })
|
|
1061
845
|
] });
|
|
1062
846
|
}
|
|
1063
|
-
function Ke({ at:
|
|
1064
|
-
const
|
|
847
|
+
function Ke({ at: e, items: t, onClose: l, label: s = "Actions", focus: a = "current" }) {
|
|
848
|
+
const i = O(null), h = O(null), d = he(), [u, b] = D(e), c = t.filter((r) => r.offer.offered);
|
|
1065
849
|
if ($e(() => {
|
|
1066
|
-
if (!
|
|
1067
|
-
const r =
|
|
1068
|
-
|
|
1069
|
-
}, [
|
|
1070
|
-
var
|
|
1071
|
-
if (!
|
|
1072
|
-
|
|
1073
|
-
const r = Array.from(((
|
|
1074
|
-
(
|
|
1075
|
-
const T = (
|
|
1076
|
-
var
|
|
1077
|
-
(
|
|
850
|
+
if (!e) return;
|
|
851
|
+
const r = i.current, g = (r == null ? void 0 : r.offsetWidth) ?? 0, T = (r == null ? void 0 : r.offsetHeight) ?? 0;
|
|
852
|
+
b({ x: Math.max(0, Math.min(e.x, window.innerWidth - g)), y: Math.max(0, Math.min(e.y, window.innerHeight - T)) });
|
|
853
|
+
}, [e]), Q(() => {
|
|
854
|
+
var C, S;
|
|
855
|
+
if (!e) return;
|
|
856
|
+
h.current = document.activeElement;
|
|
857
|
+
const r = Array.from(((C = i.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]:not([aria-disabled="true"])')) ?? []), g = a === "current" ? r.find((x) => x.getAttribute("aria-checked") === "true") : void 0;
|
|
858
|
+
(S = a === "last" ? r[r.length - 1] : g ?? r[0]) == null || S.focus();
|
|
859
|
+
const T = (x) => {
|
|
860
|
+
var _;
|
|
861
|
+
(_ = i.current) != null && _.contains(x.target) || l();
|
|
1078
862
|
};
|
|
1079
863
|
return document.addEventListener("mousedown", T), () => {
|
|
1080
|
-
var
|
|
1081
|
-
document.removeEventListener("mousedown", T), (
|
|
864
|
+
var x, _;
|
|
865
|
+
document.removeEventListener("mousedown", T), (_ = (x = h.current) == null ? void 0 : x.focus) == null || _.call(x);
|
|
1082
866
|
};
|
|
1083
|
-
}, [
|
|
867
|
+
}, [e, l, a]), !e || c.length === 0) return null;
|
|
1084
868
|
const v = (r) => {
|
|
1085
|
-
var
|
|
1086
|
-
const g = Array.from(((
|
|
869
|
+
var C, S;
|
|
870
|
+
const g = Array.from(((C = i.current) == null ? void 0 : C.querySelectorAll('[role^="menuitem"]')) ?? []), T = g.indexOf(document.activeElement);
|
|
1087
871
|
if (r.key === "Escape" || r.key === "Tab")
|
|
1088
872
|
r.preventDefault(), l();
|
|
1089
873
|
else if (r.key === "ArrowDown" || r.key === "ArrowUp") {
|
|
1090
874
|
r.preventDefault();
|
|
1091
|
-
const
|
|
1092
|
-
(
|
|
875
|
+
const x = r.key === "ArrowDown" ? 1 : -1;
|
|
876
|
+
(S = g[(T + x + g.length) % g.length]) == null || S.focus();
|
|
1093
877
|
}
|
|
1094
|
-
},
|
|
878
|
+
}, m = (r) => {
|
|
1095
879
|
const g = r.offer.refusal !== void 0;
|
|
1096
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ f(
|
|
1097
881
|
"div",
|
|
1098
882
|
{
|
|
1099
883
|
role: r.checked === void 0 ? "menuitem" : "menuitemradio",
|
|
1100
884
|
"aria-checked": r.checked,
|
|
1101
885
|
tabIndex: -1,
|
|
1102
886
|
"aria-disabled": g || void 0,
|
|
1103
|
-
"aria-describedby": g ? `${
|
|
887
|
+
"aria-describedby": g ? `${d}-${r.id}` : void 0,
|
|
1104
888
|
title: g ? r.offer.refusal : void 0,
|
|
1105
|
-
className:
|
|
889
|
+
className: F("cms-menu__item", r.danger && "is-danger", r.offer.locked && "is-locked", g && "is-refused"),
|
|
1106
890
|
onClick: () => {
|
|
1107
891
|
g || (l(), r.onSelect());
|
|
1108
892
|
},
|
|
@@ -1110,35 +894,35 @@ function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "cur
|
|
|
1110
894
|
(T.key === "Enter" || T.key === " ") && !g && (T.preventDefault(), l(), r.onSelect());
|
|
1111
895
|
},
|
|
1112
896
|
children: [
|
|
1113
|
-
r.checked !== void 0 ? /* @__PURE__ */
|
|
1114
|
-
r.offer.locked ? /* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
g ? /* @__PURE__ */
|
|
897
|
+
r.checked !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-menu__check", children: r.checked ? /* @__PURE__ */ n(se, { name: "check" }) : null }) : null,
|
|
898
|
+
r.offer.locked ? /* @__PURE__ */ n(se, { name: "lock" }) : null,
|
|
899
|
+
/* @__PURE__ */ n("span", { className: "cms-menu__label", children: r.label }),
|
|
900
|
+
g ? /* @__PURE__ */ n("span", { id: `${d}-${r.id}`, className: "cms-menu__refusal", children: r.offer.refusal }) : null
|
|
1117
901
|
]
|
|
1118
902
|
},
|
|
1119
903
|
r.id
|
|
1120
904
|
);
|
|
1121
|
-
},
|
|
1122
|
-
for (const r of
|
|
1123
|
-
const g =
|
|
1124
|
-
g !== void 0 && g.group === r.group ? g.items.push(r) :
|
|
905
|
+
}, N = [];
|
|
906
|
+
for (const r of c) {
|
|
907
|
+
const g = N[N.length - 1];
|
|
908
|
+
g !== void 0 && g.group === r.group ? g.items.push(r) : N.push({ group: r.group, items: [r] });
|
|
1125
909
|
}
|
|
1126
|
-
return
|
|
1127
|
-
/* @__PURE__ */
|
|
910
|
+
return an(
|
|
911
|
+
/* @__PURE__ */ n(
|
|
1128
912
|
"div",
|
|
1129
913
|
{
|
|
1130
|
-
ref:
|
|
914
|
+
ref: i,
|
|
1131
915
|
className: "cms-menu",
|
|
1132
916
|
role: "menu",
|
|
1133
917
|
"aria-label": s,
|
|
1134
|
-
style: { left: (
|
|
918
|
+
style: { left: (u ?? e).x, top: (u ?? e).y },
|
|
1135
919
|
onKeyDown: v,
|
|
1136
920
|
onContextMenu: (r) => r.preventDefault(),
|
|
1137
|
-
children:
|
|
1138
|
-
g > 0 ? /* @__PURE__ */
|
|
1139
|
-
r.group === void 0 ? r.items.map(
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
r.items.map(
|
|
921
|
+
children: N.map((r, g) => /* @__PURE__ */ f(Hn, { children: [
|
|
922
|
+
g > 0 ? /* @__PURE__ */ n("div", { className: "cms-menu__separator", role: "separator" }) : null,
|
|
923
|
+
r.group === void 0 ? r.items.map(m) : /* @__PURE__ */ f("div", { role: "group", "aria-label": r.group, children: [
|
|
924
|
+
/* @__PURE__ */ n("div", { className: "cms-menu__group", "aria-hidden": "true", children: r.group }),
|
|
925
|
+
r.items.map(m)
|
|
1142
926
|
] })
|
|
1143
927
|
] }, g))
|
|
1144
928
|
}
|
|
@@ -1146,349 +930,349 @@ function Ke({ at: n, items: t, onClose: l, label: s = "Actions", focus: a = "cur
|
|
|
1146
930
|
document.body
|
|
1147
931
|
);
|
|
1148
932
|
}
|
|
1149
|
-
function
|
|
1150
|
-
const [
|
|
1151
|
-
if (!
|
|
1152
|
-
const
|
|
1153
|
-
return
|
|
933
|
+
function dn() {
|
|
934
|
+
const [e, t] = D(/* @__PURE__ */ new Set()), [l, s] = D(null), a = O(null), i = O(null), h = (u) => t((b) => b.has(u) ? b : /* @__PURE__ */ new Set([...b, u])), d = (u) => t((b) => {
|
|
935
|
+
if (!b.has(u)) return b;
|
|
936
|
+
const c = new Set(b);
|
|
937
|
+
return c.delete(u), c;
|
|
1154
938
|
});
|
|
1155
|
-
return
|
|
939
|
+
return Q(() => {
|
|
1156
940
|
if (l === null) return;
|
|
1157
|
-
const
|
|
1158
|
-
|
|
941
|
+
const u = (b) => {
|
|
942
|
+
b.key === "Escape" && h(l);
|
|
1159
943
|
};
|
|
1160
|
-
return window.addEventListener("keydown",
|
|
944
|
+
return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
|
|
1161
945
|
}, [l]), {
|
|
1162
|
-
dismissed: (
|
|
1163
|
-
dismiss:
|
|
1164
|
-
show:
|
|
1165
|
-
pointerIn: (
|
|
1166
|
-
|
|
946
|
+
dismissed: (u) => e.has(u),
|
|
947
|
+
dismiss: h,
|
|
948
|
+
show: d,
|
|
949
|
+
pointerIn: (u) => {
|
|
950
|
+
i.current = u, s(u);
|
|
1167
951
|
},
|
|
1168
|
-
pointerOut: (
|
|
1169
|
-
|
|
952
|
+
pointerOut: (u) => {
|
|
953
|
+
i.current === u && (i.current = null), s((b) => b === u ? null : b), a.current !== u && d(u);
|
|
1170
954
|
},
|
|
1171
|
-
focusIn: (
|
|
1172
|
-
a.current =
|
|
955
|
+
focusIn: (u) => {
|
|
956
|
+
a.current = u;
|
|
1173
957
|
},
|
|
1174
|
-
focusOut: (
|
|
1175
|
-
a.current ===
|
|
958
|
+
focusOut: (u) => {
|
|
959
|
+
a.current === u && (a.current = null), i.current !== u && d(u);
|
|
1176
960
|
}
|
|
1177
961
|
};
|
|
1178
962
|
}
|
|
1179
|
-
function
|
|
1180
|
-
return Math.min(Math.max(
|
|
1181
|
-
}
|
|
1182
|
-
const
|
|
1183
|
-
function
|
|
1184
|
-
var
|
|
1185
|
-
const [
|
|
1186
|
-
...(
|
|
1187
|
-
id:
|
|
1188
|
-
label:
|
|
1189
|
-
name:
|
|
1190
|
-
icon:
|
|
1191
|
-
overflow:
|
|
1192
|
-
danger:
|
|
1193
|
-
offer:
|
|
1194
|
-
run:
|
|
963
|
+
function mt(e, t, l) {
|
|
964
|
+
return Math.min(Math.max(e - l / 2, 0), Math.max(0, t - l));
|
|
965
|
+
}
|
|
966
|
+
const wn = /* @__PURE__ */ new Set(), yn = { descriptionHidden: !1, elsewhereHidden: !1, titleCut: !1, titleFloor: 0, bare: wn, primaryBare: !1, hidden: wn, primaryHidden: !1, chipsCut: !1 }, Nn = (e, t) => e.size === t.size && [...e].every((l) => t.has(l)), ht = (e, t) => e.descriptionHidden === t.descriptionHidden && e.elsewhereHidden === t.elsewhereHidden && e.titleCut === t.titleCut && e.titleFloor === t.titleFloor && Nn(e.bare, t.bare) && e.primaryBare === t.primaryBare && Nn(e.hidden, t.hidden) && e.primaryHidden === t.primaryHidden && e.chipsCut === t.chipsCut, ft = 64, Ae = "primary";
|
|
967
|
+
function sl({ title: e, icon: t, description: l, meta: s = [], primary: a, secondary: i, more: h = [], moreLabel: d, context: u, fullWidth: b = !1 }) {
|
|
968
|
+
var X, Ne, oe;
|
|
969
|
+
const [c, v] = D(null), [m, N] = D(yn), [r, g] = D(null), [T, C] = D(null), S = dn(), x = O(null), _ = O(null), y = O(null), I = he(), U = he(), P = [
|
|
970
|
+
...(i ?? []).map((o) => ({
|
|
971
|
+
id: o.id,
|
|
972
|
+
label: o.label,
|
|
973
|
+
name: o.label,
|
|
974
|
+
icon: o.icon === void 0 ? null : Be(o.icon),
|
|
975
|
+
overflow: o.overflow,
|
|
976
|
+
danger: o.danger === !0,
|
|
977
|
+
offer: o.offer ?? { offered: !0, locked: !1 },
|
|
978
|
+
run: o.onPress
|
|
1195
979
|
})),
|
|
1196
|
-
...
|
|
1197
|
-
id:
|
|
1198
|
-
label:
|
|
1199
|
-
name: typeof
|
|
980
|
+
...h.map((o) => ({
|
|
981
|
+
id: o.id,
|
|
982
|
+
label: o.label,
|
|
983
|
+
name: typeof o.label == "string" ? o.label : o.id,
|
|
1200
984
|
icon: null,
|
|
1201
985
|
overflow: void 0,
|
|
1202
|
-
danger:
|
|
1203
|
-
offer:
|
|
1204
|
-
run:
|
|
986
|
+
danger: o.danger === !0,
|
|
987
|
+
offer: o.offer,
|
|
988
|
+
run: o.onSelect
|
|
1205
989
|
}))
|
|
1206
|
-
].filter((
|
|
1207
|
-
|
|
990
|
+
].filter((o) => o.offer.offered), k = P.filter((o) => o.overflow === 0), B = P.filter((o) => o.overflow !== 0), z = k.length === 1 ? k[0] ?? null : null, j = pt(B), K = B.filter((o) => o.overflow === void 0).map((o) => o.id).reverse(), G = [...j, ...K.map((o) => [o])], Y = [...z !== null ? [[z.id]] : [], ...G], ee = a !== void 0 && ((X = a.offer) == null ? void 0 : X.offered) !== !1, ie = (Ne = a == null ? void 0 : a.offer) == null ? void 0 : Ne.refusal, be = a !== void 0 && (((oe = a.offer) == null ? void 0 : oe.offered) === !1 || ie !== void 0), ce = a !== void 0 && "menu" in a ? a.menu.filter((o) => o.offer.offered) : [], de = a !== void 0 && "menu" in a && ce.length > 0 ? a : null, Ce = s.filter((o) => o.elsewhere === !0), fe = JSON.stringify([
|
|
991
|
+
e,
|
|
1208
992
|
t ?? null,
|
|
1209
993
|
l ?? null,
|
|
1210
|
-
s.map((
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
]),
|
|
1214
|
-
const
|
|
1215
|
-
if (
|
|
1216
|
-
const
|
|
994
|
+
s.map((o) => [o.id, o.text, o.elsewhere === !0]),
|
|
995
|
+
ee ? [a.label, a.icon, de !== null] : null,
|
|
996
|
+
P.map((o) => [o.id, o.name, o.icon, o.overflow ?? null])
|
|
997
|
+
]), te = Ie(() => {
|
|
998
|
+
const o = x.current, A = _.current;
|
|
999
|
+
if (o === null || A === null) return;
|
|
1000
|
+
const M = getComputedStyle(o), H = parseFloat(M.columnGap || "0") || 0, le = o.clientWidth - (parseFloat(M.paddingLeft) || 0) - (parseFloat(M.paddingRight) || 0), J = (re) => {
|
|
1217
1001
|
var Me;
|
|
1218
|
-
return ((Me = A.querySelector(
|
|
1219
|
-
}, ke =
|
|
1220
|
-
const Me =
|
|
1221
|
-
t !== void 0 && xe.push(
|
|
1222
|
-
for (const
|
|
1223
|
-
for (const
|
|
1224
|
-
if (Me.has(
|
|
1225
|
-
const Ze =
|
|
1226
|
-
xe.push(
|
|
1002
|
+
return ((Me = A.querySelector(re)) == null ? void 0 : Me.getBoundingClientRect().width) ?? 0;
|
|
1003
|
+
}, ke = J('[data-measure="title"]'), Re = Math.min(ke, ft), He = (re) => {
|
|
1004
|
+
const Me = pe(re), xe = [];
|
|
1005
|
+
t !== void 0 && xe.push(J('[data-measure="lead"]')), xe.push(re.titleCut ? Re : ke), l !== void 0 && !re.descriptionHidden && xe.push(J('[data-measure="description"]'));
|
|
1006
|
+
for (const ve of s) ve.elsewhere === !0 && re.elsewhereHidden || xe.push(J(`[data-measure="meta"][data-measure-id="${CSS.escape(ve.id)}"]`));
|
|
1007
|
+
for (const ve of P) {
|
|
1008
|
+
if (Me.has(ve.id)) continue;
|
|
1009
|
+
const Ze = re.bare.has(ve.id) && ve.icon !== null;
|
|
1010
|
+
xe.push(J(`[data-measure="${Ze ? "icon" : "full"}"][data-measure-id="${CSS.escape(ve.id)}"]`));
|
|
1227
1011
|
}
|
|
1228
|
-
return
|
|
1012
|
+
return ee && !re.primaryHidden && xe.push(J(`[data-measure="${re.primaryBare ? "primary-icon" : "primary"}"]`)), Me.size > 0 && xe.push(J('[data-measure="more"]')), xe.reduce((ve, Ze) => ve + Ze, 0) + H * Math.max(0, xe.length - 1);
|
|
1229
1013
|
};
|
|
1230
|
-
let
|
|
1231
|
-
const Oe = (
|
|
1232
|
-
if (Oe(
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
for (const Ve of
|
|
1236
|
-
for (const Ge of Ve)
|
|
1237
|
-
if (Oe({ ...
|
|
1014
|
+
let V = { ...yn, titleFloor: Re };
|
|
1015
|
+
const Oe = (re) => (V = re, He(re) <= le), pn = (() => {
|
|
1016
|
+
if (Oe(V) || l !== void 0 && Oe({ ...V, descriptionHidden: !0 }) || (V = { ...V, descriptionHidden: !0 }, Ce.length > 0 && Oe({ ...V, elsewhereHidden: !0 }))) return V;
|
|
1017
|
+
V = { ...V, elsewhereHidden: !0 };
|
|
1018
|
+
const re = /* @__PURE__ */ new Set();
|
|
1019
|
+
for (const Ve of Y) {
|
|
1020
|
+
for (const Ge of Ve) re.add(Ge);
|
|
1021
|
+
if (Oe({ ...V, bare: new Set(re) })) return V;
|
|
1238
1022
|
}
|
|
1239
|
-
if (
|
|
1240
|
-
|
|
1241
|
-
const Me = /* @__PURE__ */ new Set(), xe = [...
|
|
1023
|
+
if (ee && Oe({ ...V, primaryBare: !0 })) return V;
|
|
1024
|
+
V = { ...V, primaryBare: ee };
|
|
1025
|
+
const Me = /* @__PURE__ */ new Set(), xe = [...G, ...ee ? [[Ae]] : []], ve = () => Me.size + k.length >= 2, Ze = (Ve) => ({ ...V, hidden: new Set([...Ve].filter((Ge) => Ge !== Ae)), primaryHidden: Ve.has(Ae) }), bn = V;
|
|
1242
1026
|
for (const Ve of xe) {
|
|
1243
1027
|
for (const Ge of Ve) Me.add(Ge);
|
|
1244
|
-
if (
|
|
1245
|
-
|
|
1028
|
+
if (ve() && Oe(Ze(Me))) return V;
|
|
1029
|
+
V = bn;
|
|
1246
1030
|
}
|
|
1247
|
-
const
|
|
1248
|
-
return Oe({ ...
|
|
1031
|
+
const _n = ve() ? Ze(Me) : bn;
|
|
1032
|
+
return Oe({ ..._n, titleCut: !0 }) ? V : { ..._n, titleCut: !0, chipsCut: !0 };
|
|
1249
1033
|
})();
|
|
1250
|
-
|
|
1251
|
-
}, [
|
|
1252
|
-
$e(
|
|
1253
|
-
const
|
|
1254
|
-
if (
|
|
1255
|
-
const A = new ResizeObserver(() =>
|
|
1256
|
-
return A.observe(
|
|
1257
|
-
}, [
|
|
1258
|
-
const
|
|
1259
|
-
if (
|
|
1034
|
+
N((re) => ht(re, pn) ? re : pn);
|
|
1035
|
+
}, [fe]);
|
|
1036
|
+
$e(te, [te]), Q(() => {
|
|
1037
|
+
const o = x.current;
|
|
1038
|
+
if (o === null || typeof ResizeObserver > "u") return;
|
|
1039
|
+
const A = new ResizeObserver(() => te());
|
|
1040
|
+
return A.observe(o), () => A.disconnect();
|
|
1041
|
+
}, [te]), Q(() => {
|
|
1042
|
+
const o = typeof document > "u" ? void 0 : document.fonts;
|
|
1043
|
+
if (o === void 0) return;
|
|
1260
1044
|
let A = !0;
|
|
1261
|
-
const
|
|
1262
|
-
A &&
|
|
1045
|
+
const M = () => {
|
|
1046
|
+
A && te();
|
|
1263
1047
|
};
|
|
1264
|
-
return
|
|
1265
|
-
A = !1,
|
|
1048
|
+
return o.ready.then(M), o.addEventListener("loadingdone", M), () => {
|
|
1049
|
+
A = !1, o.removeEventListener("loadingdone", M);
|
|
1266
1050
|
};
|
|
1267
|
-
}, [
|
|
1268
|
-
function
|
|
1269
|
-
const A =
|
|
1270
|
-
return /* @__PURE__ */ new Set([...k.filter((
|
|
1051
|
+
}, [te]);
|
|
1052
|
+
function pe(o) {
|
|
1053
|
+
const A = o.hidden.size + (o.primaryHidden ? 1 : 0);
|
|
1054
|
+
return /* @__PURE__ */ new Set([...k.filter((M) => M !== z || A > 0).map((M) => M.id), ...o.hidden, ...o.primaryHidden ? [Ae] : []]);
|
|
1271
1055
|
}
|
|
1272
|
-
const
|
|
1273
|
-
...
|
|
1056
|
+
const _e = pe(m), we = P.filter((o) => !_e.has(o.id) && o !== z), ne = z !== null && !_e.has(z.id) ? z : null, ye = ee && !m.primaryHidden, w = (o) => P.find((A) => A.id === o), E = G.flat().filter((o) => m.hidden.has(o)).map(w).filter((o) => o !== void 0), W = (o) => ({ id: o.id, label: o.label, offer: o.offer, ...o.danger ? { danger: !0 } : {}, onSelect: o.run }), q = [
|
|
1057
|
+
...ee && m.primaryHidden ? [{ id: Ae, label: a.label, offer: a.offer ?? { offered: !0, locked: !1 }, onSelect: () => {
|
|
1274
1058
|
be || a.onPress();
|
|
1275
|
-
} }, ...
|
|
1276
|
-
...
|
|
1277
|
-
...
|
|
1278
|
-
], p =
|
|
1279
|
-
...
|
|
1280
|
-
...
|
|
1281
|
-
...
|
|
1059
|
+
} }, ...ce] : [],
|
|
1060
|
+
...E.map(W),
|
|
1061
|
+
..._e.size > 0 ? k.map(W) : []
|
|
1062
|
+
], p = q.length > 0, L = [
|
|
1063
|
+
...we.map((o) => o.id),
|
|
1064
|
+
...ne !== null ? [ne.id] : [],
|
|
1065
|
+
...ye ? [Ae, ...de !== null ? ["primary-menu"] : []] : [],
|
|
1282
1066
|
...p ? ["more"] : []
|
|
1283
|
-
],
|
|
1284
|
-
|
|
1285
|
-
var
|
|
1286
|
-
r === null || L.includes(r) || !p || ((
|
|
1287
|
-
}, [
|
|
1288
|
-
const
|
|
1289
|
-
var
|
|
1290
|
-
const A = L.indexOf(
|
|
1291
|
-
let
|
|
1292
|
-
if (
|
|
1293
|
-
|
|
1294
|
-
const
|
|
1295
|
-
g(
|
|
1296
|
-
},
|
|
1297
|
-
const
|
|
1298
|
-
v((
|
|
1299
|
-
}, Se = (
|
|
1300
|
-
...T ===
|
|
1301
|
-
...
|
|
1302
|
-
onFocus: (
|
|
1303
|
-
g(
|
|
1067
|
+
], Z = r !== null && L.includes(r) ? r : L[0] ?? null;
|
|
1068
|
+
Q(() => {
|
|
1069
|
+
var o, A;
|
|
1070
|
+
r === null || L.includes(r) || !p || ((o = x.current) != null && o.contains(document.activeElement) || document.activeElement === document.body) && (g("more"), (A = y.current) == null || A.focus());
|
|
1071
|
+
}, [m]);
|
|
1072
|
+
const ue = (o) => `${U}-${o}`, ae = (o) => {
|
|
1073
|
+
var le;
|
|
1074
|
+
const A = L.indexOf(Z ?? "");
|
|
1075
|
+
let M = null;
|
|
1076
|
+
if (o.key === "ArrowRight" ? M = Math.min(L.length - 1, A + 1) : o.key === "ArrowLeft" ? M = Math.max(0, A - 1) : o.key === "Home" ? M = 0 : o.key === "End" && (M = L.length - 1), M === null) return;
|
|
1077
|
+
o.preventDefault();
|
|
1078
|
+
const H = L[M] ?? null;
|
|
1079
|
+
g(H), H !== null && ((le = document.getElementById(ue(H))) == null || le.focus());
|
|
1080
|
+
}, me = (o, A) => {
|
|
1081
|
+
const M = A.getBoundingClientRect();
|
|
1082
|
+
v((c == null ? void 0 : c.which) === o ? null : { which: o, x: M.left, y: M.bottom + 4 });
|
|
1083
|
+
}, Se = (o) => ({ id: ue(o), tabIndex: Z === o ? 0 : -1, onFocus: () => g(o) }), We = (o, A, M) => A ? {
|
|
1084
|
+
...T === o ? { "data-reason-shown": "" } : {},
|
|
1085
|
+
...S.dismissed(o) ? { "data-tip-dismissed": "" } : {},
|
|
1086
|
+
onFocus: (H) => {
|
|
1087
|
+
g(o), S.focusIn(o), Te(H.currentTarget, M);
|
|
1304
1088
|
},
|
|
1305
1089
|
onBlur: () => {
|
|
1306
|
-
|
|
1090
|
+
C((H) => H === o ? null : H), S.focusOut(o);
|
|
1307
1091
|
},
|
|
1308
|
-
onMouseEnter: (
|
|
1309
|
-
|
|
1092
|
+
onMouseEnter: (H) => {
|
|
1093
|
+
S.pointerIn(o), Te(H.currentTarget, M);
|
|
1310
1094
|
},
|
|
1311
|
-
onMouseLeave: () =>
|
|
1312
|
-
onKeyDown: (
|
|
1313
|
-
|
|
1095
|
+
onMouseLeave: () => S.pointerOut(o),
|
|
1096
|
+
onKeyDown: (H) => {
|
|
1097
|
+
H.key === "Escape" && (C((le) => le === o ? null : le), S.dismiss(o));
|
|
1314
1098
|
}
|
|
1315
|
-
} : {}, Fe = (
|
|
1316
|
-
|
|
1317
|
-
}, Te = (
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
const ke =
|
|
1325
|
-
|
|
1326
|
-
}, Ee = (
|
|
1327
|
-
|
|
1328
|
-
|
|
1099
|
+
} : {}, Fe = (o, A, M) => {
|
|
1100
|
+
C(o), S.show(o), Te(A, M);
|
|
1101
|
+
}, Te = (o, A) => {
|
|
1102
|
+
const M = document.getElementById(A), H = x.current;
|
|
1103
|
+
if (M === null || H === null) return;
|
|
1104
|
+
const le = M.style.display;
|
|
1105
|
+
M.style.display = "block";
|
|
1106
|
+
const J = M.offsetWidth;
|
|
1107
|
+
M.style.display = le;
|
|
1108
|
+
const ke = H.getBoundingClientRect(), Re = o.getBoundingClientRect();
|
|
1109
|
+
M.style.left = `${String(mt(Re.left + Re.width / 2 - ke.left, ke.width, J))}px`, M.style.right = "auto";
|
|
1110
|
+
}, Ee = (o, A, M) => /* @__PURE__ */ f("span", { id: o, className: "cms-section-header__tip", role: "tooltip", children: [
|
|
1111
|
+
M !== null ? /* @__PURE__ */ f("span", { "aria-hidden": "true", children: [
|
|
1112
|
+
M,
|
|
1329
1113
|
": "
|
|
1330
1114
|
] }) : null,
|
|
1331
1115
|
A
|
|
1332
|
-
] }), R = (
|
|
1333
|
-
const A =
|
|
1334
|
-
return /* @__PURE__ */
|
|
1116
|
+
] }), R = (o) => {
|
|
1117
|
+
const A = m.bare.has(o.id) && o.icon !== null, M = o.offer.refusal, H = `${U}-reason-${o.id}`;
|
|
1118
|
+
return /* @__PURE__ */ f(
|
|
1335
1119
|
"button",
|
|
1336
1120
|
{
|
|
1337
1121
|
type: "button",
|
|
1338
|
-
className:
|
|
1339
|
-
"data-action":
|
|
1340
|
-
"aria-label": A ||
|
|
1341
|
-
"aria-disabled":
|
|
1342
|
-
"aria-describedby":
|
|
1343
|
-
title:
|
|
1344
|
-
...Se(
|
|
1345
|
-
...We(
|
|
1346
|
-
onClick: (
|
|
1347
|
-
|
|
1122
|
+
className: F("cms-button", "cms-button--quiet", "cms-section-header__secondary", A && "cms-section-header__secondary--bare", o.danger && "is-danger"),
|
|
1123
|
+
"data-action": o.id,
|
|
1124
|
+
"aria-label": A || M !== void 0 ? o.name : void 0,
|
|
1125
|
+
"aria-disabled": M !== void 0 ? "true" : void 0,
|
|
1126
|
+
"aria-describedby": M !== void 0 ? H : void 0,
|
|
1127
|
+
title: M === void 0 && A ? o.name : void 0,
|
|
1128
|
+
...Se(o.id),
|
|
1129
|
+
...We(o.id, M !== void 0, H),
|
|
1130
|
+
onClick: (le) => {
|
|
1131
|
+
M === void 0 ? o.run() : Fe(o.id, le.currentTarget, H);
|
|
1348
1132
|
},
|
|
1349
1133
|
children: [
|
|
1350
|
-
|
|
1351
|
-
A ? null : /* @__PURE__ */
|
|
1352
|
-
|
|
1134
|
+
o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
|
|
1135
|
+
A ? null : /* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label }),
|
|
1136
|
+
M !== void 0 ? Ee(H, M, A ? o.name : null) : null
|
|
1353
1137
|
]
|
|
1354
1138
|
},
|
|
1355
|
-
|
|
1139
|
+
o.id
|
|
1356
1140
|
);
|
|
1357
1141
|
};
|
|
1358
|
-
return /* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
t !== void 0 ? /* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1142
|
+
return /* @__PURE__ */ f("header", { className: F("cms-section-header", b && "cms-section-header--full"), children: [
|
|
1143
|
+
/* @__PURE__ */ f("div", { ref: x, className: F("cms-section-header__row", m.chipsCut && "cms-section-header__row--chips-cut"), "data-row": "1", children: [
|
|
1144
|
+
t !== void 0 ? /* @__PURE__ */ n($, { name: t }) : null,
|
|
1145
|
+
/* @__PURE__ */ n(
|
|
1362
1146
|
"h1",
|
|
1363
1147
|
{
|
|
1364
1148
|
className: "cms-section-header__title",
|
|
1365
|
-
title:
|
|
1366
|
-
style: { minWidth:
|
|
1367
|
-
children:
|
|
1149
|
+
title: e,
|
|
1150
|
+
style: { minWidth: m.titleCut ? `${m.titleFloor}px` : "max-content" },
|
|
1151
|
+
children: e
|
|
1368
1152
|
}
|
|
1369
1153
|
),
|
|
1370
|
-
l !== void 0 ? /* @__PURE__ */
|
|
1371
|
-
s.map((
|
|
1154
|
+
l !== void 0 ? /* @__PURE__ */ n("span", { className: F("cms-section-header__description", m.descriptionHidden && "cms-visually-hidden"), children: l }) : null,
|
|
1155
|
+
s.map((o, A) => /* @__PURE__ */ n(
|
|
1372
1156
|
"span",
|
|
1373
1157
|
{
|
|
1374
1158
|
className: "cms-section-header__meta",
|
|
1375
|
-
"data-meta":
|
|
1376
|
-
hidden:
|
|
1377
|
-
style:
|
|
1378
|
-
...
|
|
1379
|
-
children:
|
|
1159
|
+
"data-meta": o.id,
|
|
1160
|
+
hidden: o.elsewhere === !0 && m.elsewhereHidden,
|
|
1161
|
+
style: m.chipsCut && o.elsewhere !== !0 ? { flexShrink: A + 1 } : void 0,
|
|
1162
|
+
...m.chipsCut && o.elsewhere !== !0 ? { title: o.text, "aria-label": o.text } : {},
|
|
1163
|
+
children: o.content
|
|
1380
1164
|
},
|
|
1381
|
-
|
|
1165
|
+
o.id
|
|
1382
1166
|
)),
|
|
1383
|
-
/* @__PURE__ */
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
/* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ f("div", { className: "cms-section-header__actions", role: "toolbar", "aria-label": e, onKeyDown: ae, children: [
|
|
1168
|
+
we.map(R),
|
|
1169
|
+
ne !== null ? R(ne) : null,
|
|
1170
|
+
ye ? /* @__PURE__ */ f("span", { className: F("cms-section-header__primary", de !== null && "cms-section-header__primary--split"), children: [
|
|
1171
|
+
/* @__PURE__ */ f(
|
|
1388
1172
|
"button",
|
|
1389
1173
|
{
|
|
1390
1174
|
type: "button",
|
|
1391
|
-
className:
|
|
1175
|
+
className: F("cms-button", "cms-button--primary", m.primaryBare && "cms-section-header__primary--bare"),
|
|
1392
1176
|
"data-action": "primary",
|
|
1393
|
-
"aria-label":
|
|
1177
|
+
"aria-label": m.primaryBare ? a.label : void 0,
|
|
1394
1178
|
"aria-disabled": be ? "true" : void 0,
|
|
1395
|
-
"aria-describedby":
|
|
1396
|
-
title:
|
|
1179
|
+
"aria-describedby": ie !== void 0 ? I : void 0,
|
|
1180
|
+
title: m.primaryBare && ie === void 0 ? a.label : void 0,
|
|
1397
1181
|
...Se(Ae),
|
|
1398
|
-
...We(Ae,
|
|
1399
|
-
onClick: (
|
|
1400
|
-
be ?
|
|
1182
|
+
...We(Ae, ie !== void 0, I),
|
|
1183
|
+
onClick: (o) => {
|
|
1184
|
+
be ? ie !== void 0 && Fe(Ae, o.currentTarget, I) : a.onPress();
|
|
1401
1185
|
},
|
|
1402
1186
|
children: [
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
|
|
1187
|
+
/* @__PURE__ */ n($, { name: a.icon }),
|
|
1188
|
+
m.primaryBare ? null : /* @__PURE__ */ f(ge, { children: [
|
|
1405
1189
|
" ",
|
|
1406
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ n("span", { children: a.label })
|
|
1407
1191
|
] })
|
|
1408
1192
|
]
|
|
1409
1193
|
}
|
|
1410
1194
|
),
|
|
1411
|
-
|
|
1195
|
+
de !== null ? /* @__PURE__ */ n(
|
|
1412
1196
|
"button",
|
|
1413
1197
|
{
|
|
1414
1198
|
type: "button",
|
|
1415
1199
|
className: "cms-button cms-button--primary cms-section-header__split",
|
|
1416
1200
|
"data-action": "primary-menu",
|
|
1417
1201
|
"aria-haspopup": "menu",
|
|
1418
|
-
"aria-expanded": (
|
|
1419
|
-
"aria-label":
|
|
1202
|
+
"aria-expanded": (c == null ? void 0 : c.which) === "primary",
|
|
1203
|
+
"aria-label": de.menuLabel,
|
|
1420
1204
|
...Se("primary-menu"),
|
|
1421
|
-
onClick: (
|
|
1422
|
-
children: /* @__PURE__ */
|
|
1205
|
+
onClick: (o) => me("primary", o.currentTarget),
|
|
1206
|
+
children: /* @__PURE__ */ n($, { name: "chevron-down" })
|
|
1423
1207
|
}
|
|
1424
1208
|
) : null,
|
|
1425
|
-
|
|
1209
|
+
ie !== void 0 ? Ee(I, ie, m.primaryBare ? a.label : null) : null
|
|
1426
1210
|
] }) : null,
|
|
1427
|
-
p ? /* @__PURE__ */
|
|
1211
|
+
p ? /* @__PURE__ */ n(
|
|
1428
1212
|
"button",
|
|
1429
1213
|
{
|
|
1430
|
-
ref:
|
|
1214
|
+
ref: y,
|
|
1431
1215
|
type: "button",
|
|
1432
1216
|
className: "cms-section-header__more",
|
|
1433
1217
|
"data-action": "more",
|
|
1434
1218
|
"aria-haspopup": "menu",
|
|
1435
|
-
"aria-expanded": (
|
|
1436
|
-
"aria-label":
|
|
1437
|
-
title:
|
|
1219
|
+
"aria-expanded": (c == null ? void 0 : c.which) === "more",
|
|
1220
|
+
"aria-label": d,
|
|
1221
|
+
title: d,
|
|
1438
1222
|
...Se("more"),
|
|
1439
|
-
onClick: (
|
|
1440
|
-
children: /* @__PURE__ */
|
|
1223
|
+
onClick: (o) => me("more", o.currentTarget),
|
|
1224
|
+
children: /* @__PURE__ */ n($, { name: "more" })
|
|
1441
1225
|
}
|
|
1442
1226
|
) : null
|
|
1443
1227
|
] }),
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
t !== void 0 ? /* @__PURE__ */
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
l !== void 0 ? /* @__PURE__ */
|
|
1448
|
-
s.map((
|
|
1449
|
-
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
|
|
1452
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ f("div", { ref: _, className: "cms-section-header__measure", "aria-hidden": "true", children: [
|
|
1229
|
+
t !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "lead", children: /* @__PURE__ */ n($, { name: t }) }) : null,
|
|
1230
|
+
/* @__PURE__ */ n("span", { "data-measure": "title", className: "cms-section-header__title", children: e }),
|
|
1231
|
+
l !== void 0 ? /* @__PURE__ */ n("span", { "data-measure": "description", className: "cms-section-header__description", children: l }) : null,
|
|
1232
|
+
s.map((o) => /* @__PURE__ */ n("span", { "data-measure": "meta", "data-measure-id": o.id, className: "cms-section-header__meta", children: o.content }, o.id)),
|
|
1233
|
+
P.map((o) => /* @__PURE__ */ f("span", { children: [
|
|
1234
|
+
/* @__PURE__ */ f("span", { "data-measure": "full", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary", children: [
|
|
1235
|
+
o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null,
|
|
1236
|
+
/* @__PURE__ */ n("span", { className: "cms-section-header__label", children: o.label })
|
|
1453
1237
|
] }),
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
] },
|
|
1456
|
-
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ n("span", { "data-measure": "icon", "data-measure-id": o.id, className: "cms-button cms-button--quiet cms-section-header__secondary cms-section-header__secondary--bare", children: o.icon !== null ? /* @__PURE__ */ n($, { name: o.icon, size: 18 }) : null })
|
|
1239
|
+
] }, o.id)),
|
|
1240
|
+
ee ? /* @__PURE__ */ f(ge, { children: [
|
|
1241
|
+
/* @__PURE__ */ f("span", { "data-measure": "primary", className: "cms-section-header__primary", children: [
|
|
1242
|
+
/* @__PURE__ */ f("span", { className: "cms-button cms-button--primary", children: [
|
|
1243
|
+
/* @__PURE__ */ n($, { name: a.icon }),
|
|
1460
1244
|
" ",
|
|
1461
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ n("span", { children: a.label })
|
|
1462
1246
|
] }),
|
|
1463
|
-
|
|
1247
|
+
de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
|
|
1464
1248
|
] }),
|
|
1465
|
-
/* @__PURE__ */
|
|
1466
|
-
/* @__PURE__ */
|
|
1467
|
-
|
|
1249
|
+
/* @__PURE__ */ f("span", { "data-measure": "primary-icon", className: "cms-section-header__primary", children: [
|
|
1250
|
+
/* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__primary--bare", children: /* @__PURE__ */ n($, { name: a.icon }) }),
|
|
1251
|
+
de !== null ? /* @__PURE__ */ n("span", { className: "cms-button cms-button--primary cms-section-header__split", children: /* @__PURE__ */ n($, { name: "chevron-down" }) }) : null
|
|
1468
1252
|
] })
|
|
1469
1253
|
] }) : null,
|
|
1470
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ n("span", { "data-measure": "more", className: "cms-section-header__more", children: /* @__PURE__ */ n($, { name: "more" }) })
|
|
1471
1255
|
] })
|
|
1472
1256
|
] }),
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
/* @__PURE__ */
|
|
1257
|
+
u != null ? /* @__PURE__ */ n("div", { className: "cms-section-header__context", "data-row": "2", children: u }) : null,
|
|
1258
|
+
de !== null ? /* @__PURE__ */ n(Ke, { at: (c == null ? void 0 : c.which) === "primary" ? c : null, items: ce, onClose: () => v(null), label: de.menuLabel }) : null,
|
|
1259
|
+
/* @__PURE__ */ n(Ke, { at: (c == null ? void 0 : c.which) === "more" ? c : null, items: q, onClose: () => v(null), label: d })
|
|
1476
1260
|
] });
|
|
1477
1261
|
}
|
|
1478
|
-
function
|
|
1262
|
+
function pt(e) {
|
|
1479
1263
|
const t = /* @__PURE__ */ new Map();
|
|
1480
|
-
for (const l of
|
|
1264
|
+
for (const l of e) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
|
|
1481
1265
|
return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
|
|
1482
1266
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return /* @__PURE__ */
|
|
1485
|
-
|
|
1486
|
-
/* @__PURE__ */
|
|
1267
|
+
function al({ head: e, children: t, className: l, scrollRef: s, onScroll: a, bodyProps: i }) {
|
|
1268
|
+
return /* @__PURE__ */ f("div", { className: F("cms-column", l), children: [
|
|
1269
|
+
e == null ? null : /* @__PURE__ */ n("div", { className: "cms-column__head", children: e }),
|
|
1270
|
+
/* @__PURE__ */ n("div", { ...i, className: F("cms-column__body", i == null ? void 0 : i.className), ref: s, onScroll: a, children: t })
|
|
1487
1271
|
] });
|
|
1488
1272
|
}
|
|
1489
|
-
function
|
|
1490
|
-
return /* @__PURE__ */
|
|
1491
|
-
s ? /* @__PURE__ */
|
|
1273
|
+
function rl({ title: e, scope: t, actions: l, backLink: s }) {
|
|
1274
|
+
return /* @__PURE__ */ f("header", { className: "cms-page-header", children: [
|
|
1275
|
+
s ? /* @__PURE__ */ f(
|
|
1492
1276
|
"a",
|
|
1493
1277
|
{
|
|
1494
1278
|
className: "cms-page-header__back",
|
|
@@ -1497,88 +1281,88 @@ function el({ title: n, scope: t, actions: l, backLink: s }) {
|
|
|
1497
1281
|
s.onBack && (a.preventDefault(), s.onBack());
|
|
1498
1282
|
},
|
|
1499
1283
|
children: [
|
|
1500
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ n(se, { name: "back" }),
|
|
1501
1285
|
" ",
|
|
1502
1286
|
s.label
|
|
1503
1287
|
]
|
|
1504
1288
|
}
|
|
1505
1289
|
) : null,
|
|
1506
|
-
/* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
t != null ? /* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ f("div", { className: "cms-page-header__row", children: [
|
|
1291
|
+
/* @__PURE__ */ f("div", { className: "cms-page-header__titles", children: [
|
|
1292
|
+
/* @__PURE__ */ n("h1", { className: "cms-page-header__title", children: e }),
|
|
1293
|
+
t != null ? /* @__PURE__ */ n("p", { className: "cms-page-header__scope", children: t }) : null
|
|
1510
1294
|
] }),
|
|
1511
|
-
l != null ? /* @__PURE__ */
|
|
1295
|
+
l != null ? /* @__PURE__ */ n("div", { className: "cms-page-header__actions", children: l }) : null
|
|
1512
1296
|
] })
|
|
1513
1297
|
] });
|
|
1514
1298
|
}
|
|
1515
|
-
function
|
|
1516
|
-
const a =
|
|
1299
|
+
function il({ tabs: e, active: t, onSelect: l, label: s }) {
|
|
1300
|
+
const a = O([]), i = (h, d) => {
|
|
1517
1301
|
var v;
|
|
1518
|
-
const
|
|
1519
|
-
if (
|
|
1520
|
-
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1302
|
+
const u = e.length - 1, b = h.key === "ArrowRight" ? d === u ? 0 : d + 1 : h.key === "ArrowLeft" ? d === 0 ? u : d - 1 : h.key === "Home" ? 0 : h.key === "End" ? u : null;
|
|
1303
|
+
if (b === null) return;
|
|
1304
|
+
h.preventDefault();
|
|
1305
|
+
const c = e[b];
|
|
1306
|
+
c && (l(c.id), (v = a.current[b]) == null || v.focus());
|
|
1523
1307
|
};
|
|
1524
|
-
return /* @__PURE__ */
|
|
1525
|
-
const
|
|
1526
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ n("div", { className: "cms-tabs", role: "tablist", "aria-label": s, children: e.map((h, d) => {
|
|
1309
|
+
const u = h.id === t;
|
|
1310
|
+
return /* @__PURE__ */ f(
|
|
1527
1311
|
"button",
|
|
1528
1312
|
{
|
|
1529
|
-
ref: (
|
|
1530
|
-
a.current[
|
|
1313
|
+
ref: (b) => {
|
|
1314
|
+
a.current[d] = b;
|
|
1531
1315
|
},
|
|
1532
1316
|
type: "button",
|
|
1533
1317
|
role: "tab",
|
|
1534
|
-
className:
|
|
1535
|
-
"aria-selected":
|
|
1536
|
-
tabIndex:
|
|
1537
|
-
onClick: () => l(
|
|
1538
|
-
onKeyDown: (
|
|
1318
|
+
className: F("cms-tab", u && "is-active"),
|
|
1319
|
+
"aria-selected": u,
|
|
1320
|
+
tabIndex: u ? 0 : -1,
|
|
1321
|
+
onClick: () => l(h.id),
|
|
1322
|
+
onKeyDown: (b) => i(b, d),
|
|
1539
1323
|
children: [
|
|
1540
|
-
|
|
1541
|
-
|
|
1324
|
+
h.label,
|
|
1325
|
+
h.count !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-tab__count", children: h.count }) : null
|
|
1542
1326
|
]
|
|
1543
1327
|
},
|
|
1544
|
-
|
|
1328
|
+
h.id
|
|
1545
1329
|
);
|
|
1546
1330
|
}) });
|
|
1547
1331
|
}
|
|
1548
|
-
function
|
|
1549
|
-
const t =
|
|
1550
|
-
var
|
|
1551
|
-
return (
|
|
1332
|
+
function bt(e) {
|
|
1333
|
+
const t = e.trim().replace(/\s+via\s+\S.*$/, "").split(/\s+/).filter(Boolean), l = (a) => {
|
|
1334
|
+
var i;
|
|
1335
|
+
return (i = a == null ? void 0 : a.match(/[\p{L}\p{N}]/u)) == null ? void 0 : i[0];
|
|
1552
1336
|
};
|
|
1553
1337
|
return (t.length > 1 ? [l(t[0]), l(t[t.length - 1])] : [l(t[0])]).filter(Boolean).join("").toUpperCase();
|
|
1554
1338
|
}
|
|
1555
|
-
function
|
|
1339
|
+
function _t(e) {
|
|
1556
1340
|
let t = 0;
|
|
1557
|
-
for (const l of
|
|
1341
|
+
for (const l of e.trim().toLowerCase())
|
|
1558
1342
|
t = t * 31 + (l.codePointAt(0) ?? 0) >>> 0;
|
|
1559
1343
|
return t % 6 + 1;
|
|
1560
1344
|
}
|
|
1561
|
-
function Ye({ name:
|
|
1562
|
-
const
|
|
1563
|
-
return /* @__PURE__ */
|
|
1345
|
+
function Ye({ name: e, pictureUrl: t, presence: l, connection: s, deleted: a = !1, placeholder: i = !1, size: h = 32, tintSeed: d, unnamedLabel: u }) {
|
|
1346
|
+
const b = a || i, c = bt(e) || "?", v = e.trim() === "" ? (u == null ? void 0 : u.trim()) || "?" : e, m = s !== void 0 ? `is-${s.state === "offline" ? "disconnected" : s.state}` : l === void 0 ? null : `is-${l === "busy" ? "away" : l}`, N = s !== void 0 ? `${v}, ${s.label}` : l ? `${v}, ${l}` : v;
|
|
1347
|
+
return /* @__PURE__ */ f(
|
|
1564
1348
|
"span",
|
|
1565
1349
|
{
|
|
1566
|
-
className:
|
|
1567
|
-
style: { width:
|
|
1350
|
+
className: F("cms-avatar", b ? "cms-avatar--deleted" : `cms-avatar--tint-${_t(d ?? e)}`),
|
|
1351
|
+
style: { width: h, height: h, fontSize: Math.round(h * 0.4) },
|
|
1568
1352
|
role: "img",
|
|
1569
|
-
"aria-label":
|
|
1353
|
+
"aria-label": N,
|
|
1570
1354
|
...s === void 0 ? {} : { title: s.label },
|
|
1571
1355
|
children: [
|
|
1572
|
-
|
|
1573
|
-
|
|
1356
|
+
b ? /* @__PURE__ */ n($, { name: "user", size: Math.round(h * 0.6) }) : t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "cms-avatar__picture" }) : /* @__PURE__ */ n("span", { "aria-hidden": "true", children: c }),
|
|
1357
|
+
m === null ? null : /* @__PURE__ */ n("span", { className: F("cms-avatar__presence", m), "aria-hidden": "true" })
|
|
1574
1358
|
]
|
|
1575
1359
|
}
|
|
1576
1360
|
);
|
|
1577
1361
|
}
|
|
1578
|
-
const
|
|
1579
|
-
function
|
|
1362
|
+
const vt = 64, un = "cms-splitter:";
|
|
1363
|
+
function tn(e) {
|
|
1580
1364
|
try {
|
|
1581
|
-
const t = window.localStorage.getItem(
|
|
1365
|
+
const t = window.localStorage.getItem(un + e);
|
|
1582
1366
|
if (t === null) return null;
|
|
1583
1367
|
const l = Number(t);
|
|
1584
1368
|
return Number.isFinite(l) ? l : null;
|
|
@@ -1586,315 +1370,315 @@ function en(n) {
|
|
|
1586
1370
|
return null;
|
|
1587
1371
|
}
|
|
1588
1372
|
}
|
|
1589
|
-
function
|
|
1590
|
-
if (
|
|
1373
|
+
function gt(e, t) {
|
|
1374
|
+
if (e !== void 0)
|
|
1591
1375
|
try {
|
|
1592
|
-
window.localStorage.setItem(
|
|
1376
|
+
window.localStorage.setItem(un + e, String(t));
|
|
1593
1377
|
} catch {
|
|
1594
1378
|
}
|
|
1595
1379
|
}
|
|
1596
|
-
function
|
|
1597
|
-
if (
|
|
1380
|
+
function wt(e) {
|
|
1381
|
+
if (e !== void 0)
|
|
1598
1382
|
try {
|
|
1599
|
-
window.localStorage.removeItem(
|
|
1383
|
+
window.localStorage.removeItem(un + e);
|
|
1600
1384
|
} catch {
|
|
1601
1385
|
}
|
|
1602
1386
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const
|
|
1605
|
-
const
|
|
1606
|
-
return v(
|
|
1607
|
-
}), r = v(t ??
|
|
1387
|
+
function yt({ storageKey: e, value: t, default: l, min: s, max: a, step: i = 16, label: h, onChange: d, className: u, style: b }) {
|
|
1388
|
+
const c = Math.max(s, a), v = (_) => Math.round(Math.min(Math.max(_, s), c)), [m, N] = D(() => {
|
|
1389
|
+
const _ = e === void 0 ? null : tn(e);
|
|
1390
|
+
return v(_ ?? l);
|
|
1391
|
+
}), r = v(t ?? m), g = O(null), [T, C] = D(!1);
|
|
1608
1392
|
$e(() => {
|
|
1609
|
-
if (
|
|
1610
|
-
const
|
|
1611
|
-
if (
|
|
1612
|
-
const
|
|
1613
|
-
(t === void 0 ||
|
|
1393
|
+
if (e === void 0) return;
|
|
1394
|
+
const _ = tn(e);
|
|
1395
|
+
if (_ === null) return;
|
|
1396
|
+
const y = v(_);
|
|
1397
|
+
(t === void 0 || y !== v(t)) && (N(y), d(y, !0));
|
|
1614
1398
|
}, []), $e(() => {
|
|
1615
|
-
t !== void 0 && v(t) !== t &&
|
|
1616
|
-
}, [t, s,
|
|
1617
|
-
const
|
|
1618
|
-
const I = v(
|
|
1619
|
-
|
|
1620
|
-
},
|
|
1621
|
-
const
|
|
1622
|
-
g.current = null,
|
|
1399
|
+
t !== void 0 && v(t) !== t && d(v(t), !0);
|
|
1400
|
+
}, [t, s, c]);
|
|
1401
|
+
const S = (_, y) => {
|
|
1402
|
+
const I = v(_);
|
|
1403
|
+
N(I), y && gt(e, I), d(I, y);
|
|
1404
|
+
}, x = () => {
|
|
1405
|
+
const _ = g.current;
|
|
1406
|
+
g.current = null, C(!1), _ !== null && _.last !== _.from && S(_.last, !0);
|
|
1623
1407
|
};
|
|
1624
|
-
return /* @__PURE__ */
|
|
1408
|
+
return /* @__PURE__ */ n(
|
|
1625
1409
|
"div",
|
|
1626
1410
|
{
|
|
1627
1411
|
role: "separator",
|
|
1628
1412
|
tabIndex: 0,
|
|
1629
1413
|
"aria-orientation": "vertical",
|
|
1630
|
-
"aria-label":
|
|
1414
|
+
"aria-label": h,
|
|
1631
1415
|
"aria-valuenow": r,
|
|
1632
1416
|
"aria-valuemin": s,
|
|
1633
|
-
"aria-valuemax":
|
|
1634
|
-
className:
|
|
1635
|
-
style:
|
|
1636
|
-
onPointerDown: (
|
|
1637
|
-
var I,
|
|
1638
|
-
if (
|
|
1639
|
-
|
|
1640
|
-
const
|
|
1641
|
-
g.current = { x:
|
|
1417
|
+
"aria-valuemax": c,
|
|
1418
|
+
className: F("cms-splitter", T && "is-dragging", r <= s && "is-at-min", r >= c && "is-at-max", u),
|
|
1419
|
+
style: b,
|
|
1420
|
+
onPointerDown: (_) => {
|
|
1421
|
+
var I, U;
|
|
1422
|
+
if (_.button > 0) return;
|
|
1423
|
+
_.preventDefault(), (U = (I = _.currentTarget).setPointerCapture) == null || U.call(I, _.pointerId);
|
|
1424
|
+
const y = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1;
|
|
1425
|
+
g.current = { x: _.clientX, from: r, last: r, sign: y }, C(!0);
|
|
1642
1426
|
},
|
|
1643
|
-
onPointerMove: (
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1427
|
+
onPointerMove: (_) => {
|
|
1428
|
+
const y = g.current;
|
|
1429
|
+
y === null || !Number.isFinite(_.clientX) || (y.last = v(y.from + y.sign * (_.clientX - y.x)), S(y.last, !1));
|
|
1646
1430
|
},
|
|
1647
|
-
onPointerUp:
|
|
1648
|
-
onPointerCancel:
|
|
1431
|
+
onPointerUp: x,
|
|
1432
|
+
onPointerCancel: x,
|
|
1649
1433
|
onDoubleClick: () => {
|
|
1650
|
-
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1434
|
+
wt(e);
|
|
1435
|
+
const _ = v(l);
|
|
1436
|
+
N(_), d(_, !0);
|
|
1653
1437
|
},
|
|
1654
|
-
onKeyDown: (
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1438
|
+
onKeyDown: (_) => {
|
|
1439
|
+
const y = _.shiftKey ? vt : i, I = getComputedStyle(_.currentTarget).direction === "rtl" ? -1 : 1, U = _.key === "ArrowLeft" ? r - I * y : _.key === "ArrowRight" ? r + I * y : _.key === "Home" ? s : _.key === "End" ? c : null;
|
|
1440
|
+
U !== null && (_.preventDefault(), S(U, !0));
|
|
1657
1441
|
}
|
|
1658
1442
|
}
|
|
1659
1443
|
);
|
|
1660
1444
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
/* @__PURE__ */
|
|
1445
|
+
function Nt({ count: e, label: t, max: l = 99 }) {
|
|
1446
|
+
return e <= 0 ? null : /* @__PURE__ */ f("span", { className: "cms-badge", children: [
|
|
1447
|
+
/* @__PURE__ */ n("span", { "aria-hidden": "true", children: e > l ? `${l}+` : e }),
|
|
1448
|
+
/* @__PURE__ */ n("span", { className: "cms-visually-hidden", children: t })
|
|
1665
1449
|
] });
|
|
1666
1450
|
}
|
|
1667
|
-
function
|
|
1668
|
-
return /* @__PURE__ */
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
-
/* @__PURE__ */
|
|
1671
|
-
/* @__PURE__ */
|
|
1672
|
-
const v =
|
|
1673
|
-
return /* @__PURE__ */
|
|
1451
|
+
function cl({ product: e, mark: t, rail: l, active: s, onNavigate: a, server: i, search: h, account: d, children: u, railLabel: b = "Sections" }) {
|
|
1452
|
+
return /* @__PURE__ */ f("div", { className: "cms-shell", children: [
|
|
1453
|
+
/* @__PURE__ */ f("nav", { className: "cms-shell__rail", "aria-label": b, children: [
|
|
1454
|
+
/* @__PURE__ */ n("span", { className: "cms-shell__mark", "aria-hidden": "true", children: t }),
|
|
1455
|
+
/* @__PURE__ */ n("ul", { className: "cms-shell__items", children: l.map((c) => {
|
|
1456
|
+
const v = c.id === s;
|
|
1457
|
+
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(
|
|
1674
1458
|
"a",
|
|
1675
1459
|
{
|
|
1676
|
-
href:
|
|
1677
|
-
className:
|
|
1460
|
+
href: c.href,
|
|
1461
|
+
className: F("cms-shell__item", v && "is-active"),
|
|
1678
1462
|
"aria-current": v ? "page" : void 0,
|
|
1679
|
-
title:
|
|
1680
|
-
onClick: (
|
|
1681
|
-
a && (
|
|
1463
|
+
title: c.label,
|
|
1464
|
+
onClick: (m) => {
|
|
1465
|
+
a && (m.preventDefault(), a(c.id));
|
|
1682
1466
|
},
|
|
1683
1467
|
children: [
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
|
|
1468
|
+
/* @__PURE__ */ f("span", { className: "cms-shell__icon", children: [
|
|
1469
|
+
/* @__PURE__ */ n($, { name: c.icon, size: 22 }),
|
|
1470
|
+
c.badge ? /* @__PURE__ */ n(Nt, { count: c.badge.count, label: c.badge.label }) : null
|
|
1687
1471
|
] }),
|
|
1688
|
-
/* @__PURE__ */
|
|
1472
|
+
/* @__PURE__ */ n("span", { className: "cms-shell__label", children: c.label })
|
|
1689
1473
|
]
|
|
1690
1474
|
}
|
|
1691
|
-
) },
|
|
1475
|
+
) }, c.id);
|
|
1692
1476
|
}) })
|
|
1693
1477
|
] }),
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1478
|
+
/* @__PURE__ */ f("header", { className: "cms-shell__top", children: [
|
|
1479
|
+
/* @__PURE__ */ n("span", { className: "cms-shell__product", children: e }),
|
|
1480
|
+
i != null ? /* @__PURE__ */ n("div", { className: "cms-shell__server", children: i }) : null,
|
|
1481
|
+
h != null ? /* @__PURE__ */ n("div", { className: "cms-shell__search", children: h }) : null,
|
|
1482
|
+
d != null ? /* @__PURE__ */ n("div", { className: "cms-shell__account", children: d }) : null
|
|
1699
1483
|
] }),
|
|
1700
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ n("main", { className: "cms-shell__main", children: u })
|
|
1701
1485
|
] });
|
|
1702
1486
|
}
|
|
1703
|
-
function
|
|
1704
|
-
return /* @__PURE__ */
|
|
1487
|
+
function ol({ label: e, placeholder: t, value: l, onChange: s, onSearch: a }) {
|
|
1488
|
+
return /* @__PURE__ */ f(
|
|
1705
1489
|
"form",
|
|
1706
1490
|
{
|
|
1707
1491
|
role: "search",
|
|
1708
1492
|
className: "cms-search",
|
|
1709
|
-
onSubmit: (
|
|
1710
|
-
|
|
1493
|
+
onSubmit: (i) => {
|
|
1494
|
+
i.preventDefault(), a == null || a(l);
|
|
1711
1495
|
},
|
|
1712
1496
|
children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ n($, { name: "search", size: 18 }),
|
|
1498
|
+
/* @__PURE__ */ n(
|
|
1715
1499
|
"input",
|
|
1716
1500
|
{
|
|
1717
1501
|
className: "cms-search__input",
|
|
1718
1502
|
type: "search",
|
|
1719
|
-
"aria-label":
|
|
1503
|
+
"aria-label": e,
|
|
1720
1504
|
placeholder: t,
|
|
1721
1505
|
value: l,
|
|
1722
|
-
onChange: (
|
|
1506
|
+
onChange: (i) => s(i.target.value)
|
|
1723
1507
|
}
|
|
1724
1508
|
)
|
|
1725
1509
|
]
|
|
1726
1510
|
}
|
|
1727
1511
|
);
|
|
1728
1512
|
}
|
|
1729
|
-
function
|
|
1730
|
-
const s =
|
|
1731
|
-
let a = s.reduce((
|
|
1732
|
-
for (let
|
|
1733
|
-
const
|
|
1734
|
-
s[
|
|
1513
|
+
function kt(e, t, l) {
|
|
1514
|
+
const s = e.map((i) => Math.min(Math.max(i.width, i.min), i.max));
|
|
1515
|
+
let a = s.reduce((i, h) => i + h, 0) + l - t;
|
|
1516
|
+
for (let i = s.length - 1; i >= 0 && a > 0; i -= 1) {
|
|
1517
|
+
const h = Math.min(a, s[i] - e[i].min);
|
|
1518
|
+
s[i] = s[i] - h, a -= h;
|
|
1735
1519
|
}
|
|
1736
1520
|
return s;
|
|
1737
1521
|
}
|
|
1738
|
-
function
|
|
1739
|
-
const
|
|
1522
|
+
function dl({ panes: e, active: t, back: l, sizes: s, lastMin: a = 360, onResize: i, storageKey: h }) {
|
|
1523
|
+
const d = Math.min(Math.max(t ?? e.length - 1, 0), e.length - 1), u = O(null), [b, c] = D(0), v = (s ?? []).slice(0, e.length - 1), [m, N] = D(() => h === void 0 ? [] : v.map((_, y) => tn(`${h}:${String(y)}`) ?? void 0)), [r, g] = D(!1), T = v.map((_, y) => _ !== void 0 && m[y] !== void 0 ? { ..._, width: m[y] } : _), C = T.length === e.length - 1 && T.every((_) => _ !== void 0);
|
|
1740
1524
|
$e(() => {
|
|
1741
|
-
const
|
|
1742
|
-
if (
|
|
1743
|
-
const
|
|
1744
|
-
if (
|
|
1745
|
-
const I = new ResizeObserver(
|
|
1746
|
-
return I.observe(
|
|
1747
|
-
}, [
|
|
1748
|
-
const
|
|
1749
|
-
[`--split-pane-${String(
|
|
1750
|
-
[`--split-pane-end-${String(
|
|
1525
|
+
const _ = u.current;
|
|
1526
|
+
if (_ === null || !C) return;
|
|
1527
|
+
const y = () => c(_.clientWidth);
|
|
1528
|
+
if (y(), typeof ResizeObserver > "u") return;
|
|
1529
|
+
const I = new ResizeObserver(y);
|
|
1530
|
+
return I.observe(_), () => I.disconnect();
|
|
1531
|
+
}, [C]);
|
|
1532
|
+
const S = C ? kt(T, b > 0 ? b : Number.POSITIVE_INFINITY, a) : [], x = C ? Object.fromEntries(S.flatMap((_, y) => [
|
|
1533
|
+
[`--split-pane-${String(y)}`, `${String(_)}px`],
|
|
1534
|
+
[`--split-pane-end-${String(y)}`, `${String(S.slice(0, y + 1).reduce((I, U) => I + U, 0))}px`]
|
|
1751
1535
|
])) : void 0;
|
|
1752
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ f(
|
|
1753
1537
|
"div",
|
|
1754
1538
|
{
|
|
1755
|
-
ref:
|
|
1756
|
-
className:
|
|
1757
|
-
"data-active":
|
|
1758
|
-
style:
|
|
1539
|
+
ref: u,
|
|
1540
|
+
className: F("cms-panes", e.length === 3 ? "cms-panes--three" : "cms-panes--two", C && "cms-panes--sized", r && "is-resizing"),
|
|
1541
|
+
"data-active": d,
|
|
1542
|
+
style: x,
|
|
1759
1543
|
children: [
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
/* @__PURE__ */
|
|
1544
|
+
e.map((_, y) => /* @__PURE__ */ f("section", { className: "cms-panes__pane", "aria-label": _.label, "data-offset": d - y, children: [
|
|
1545
|
+
y === d && l ? /* @__PURE__ */ f("a", { className: "cms-panes__back", href: l.href, children: [
|
|
1546
|
+
/* @__PURE__ */ n($, { name: "chevron-left", size: 18 }),
|
|
1763
1547
|
l.label
|
|
1764
1548
|
] }) : null,
|
|
1765
|
-
|
|
1766
|
-
] },
|
|
1767
|
-
|
|
1768
|
-
const I =
|
|
1769
|
-
return /* @__PURE__ */
|
|
1770
|
-
|
|
1549
|
+
_.content
|
|
1550
|
+
] }, _.label)),
|
|
1551
|
+
C ? T.map((_, y) => {
|
|
1552
|
+
const I = S.reduce((P, k, B) => B === y ? P : P + k, 0), U = Math.max(_.min, Math.min(_.max, b > 0 ? b - I - a : _.max));
|
|
1553
|
+
return /* @__PURE__ */ n(
|
|
1554
|
+
yt,
|
|
1771
1555
|
{
|
|
1772
|
-
...
|
|
1773
|
-
value:
|
|
1774
|
-
default:
|
|
1775
|
-
min:
|
|
1776
|
-
max:
|
|
1777
|
-
label:
|
|
1556
|
+
...h === void 0 ? {} : { storageKey: `${h}:${String(y)}` },
|
|
1557
|
+
value: S[y],
|
|
1558
|
+
default: _.reset,
|
|
1559
|
+
min: _.min,
|
|
1560
|
+
max: U,
|
|
1561
|
+
label: _.label,
|
|
1778
1562
|
className: "cms-panes__splitter",
|
|
1779
|
-
style: { "--split-at": `var(--split-pane-end-${String(
|
|
1780
|
-
onChange: (
|
|
1781
|
-
|
|
1782
|
-
const
|
|
1783
|
-
return
|
|
1784
|
-
}), g(!k),
|
|
1563
|
+
style: { "--split-at": `var(--split-pane-end-${String(y)})` },
|
|
1564
|
+
onChange: (P, k) => {
|
|
1565
|
+
h !== void 0 && N((B) => {
|
|
1566
|
+
const z = [...B];
|
|
1567
|
+
return z[y] = P, z;
|
|
1568
|
+
}), g(!k), i == null || i(y, P, k);
|
|
1785
1569
|
}
|
|
1786
1570
|
},
|
|
1787
|
-
|
|
1571
|
+
_.label
|
|
1788
1572
|
);
|
|
1789
1573
|
}) : null
|
|
1790
1574
|
]
|
|
1791
1575
|
}
|
|
1792
1576
|
);
|
|
1793
1577
|
}
|
|
1794
|
-
const
|
|
1795
|
-
function
|
|
1796
|
-
const
|
|
1797
|
-
return /* @__PURE__ */
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
/* @__PURE__ */
|
|
1578
|
+
const xt = { attachment: "Has an attachment", unread: "Unread" };
|
|
1579
|
+
function ul({ from: e, fromPlaceholder: t = !1, subject: l, preview: s, time: a, unread: i, hasAttachment: h, selected: d, onOpen: u, check: b, selecting: c, labels: v }) {
|
|
1580
|
+
const m = qe(xt, v), N = /* @__PURE__ */ n(Ye, { name: e, size: 40, placeholder: t });
|
|
1581
|
+
return /* @__PURE__ */ f("div", { className: F("cms-mail-row", i && "is-unread", d && "is-selected", c && "is-selecting", (b == null ? void 0 : b.checked) && "is-checked"), children: [
|
|
1582
|
+
b !== void 0 ? /* @__PURE__ */ f("span", { className: "cms-mail-row__lead", children: [
|
|
1583
|
+
N,
|
|
1584
|
+
/* @__PURE__ */ n(
|
|
1801
1585
|
"input",
|
|
1802
1586
|
{
|
|
1803
1587
|
type: "checkbox",
|
|
1804
1588
|
className: "cms-mail-row__check",
|
|
1805
|
-
checked:
|
|
1806
|
-
disabled:
|
|
1807
|
-
"aria-disabled":
|
|
1808
|
-
"aria-busy":
|
|
1809
|
-
"aria-label":
|
|
1589
|
+
checked: b.checked,
|
|
1590
|
+
disabled: b.disabled,
|
|
1591
|
+
"aria-disabled": b.pending ? "true" : void 0,
|
|
1592
|
+
"aria-busy": b.pending ? "true" : void 0,
|
|
1593
|
+
"aria-label": b.label,
|
|
1810
1594
|
onChange: () => {
|
|
1811
1595
|
},
|
|
1812
1596
|
onClick: (r) => {
|
|
1813
|
-
if (r.stopPropagation(),
|
|
1597
|
+
if (r.stopPropagation(), b.pending) {
|
|
1814
1598
|
r.preventDefault();
|
|
1815
1599
|
return;
|
|
1816
1600
|
}
|
|
1817
|
-
|
|
1601
|
+
b.onCheck({ shift: r.shiftKey, toggle: r.ctrlKey || r.metaKey });
|
|
1818
1602
|
}
|
|
1819
1603
|
}
|
|
1820
1604
|
)
|
|
1821
1605
|
] }) : null,
|
|
1822
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ f(
|
|
1823
1607
|
"button",
|
|
1824
1608
|
{
|
|
1825
1609
|
type: "button",
|
|
1826
1610
|
className: "cms-mail-row__open",
|
|
1827
|
-
"aria-current":
|
|
1828
|
-
onClick:
|
|
1611
|
+
"aria-current": d ? "true" : void 0,
|
|
1612
|
+
onClick: u,
|
|
1829
1613
|
children: [
|
|
1830
|
-
|
|
1831
|
-
/* @__PURE__ */
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
|
|
1835
|
-
/* @__PURE__ */
|
|
1614
|
+
b === void 0 ? N : null,
|
|
1615
|
+
/* @__PURE__ */ f("span", { className: "cms-mail-row__body", children: [
|
|
1616
|
+
/* @__PURE__ */ f("span", { className: "cms-mail-row__line", children: [
|
|
1617
|
+
/* @__PURE__ */ n("span", { className: "cms-mail-row__from", children: e }),
|
|
1618
|
+
h ? /* @__PURE__ */ n($, { name: "paperclip", size: 16, label: m.attachment }) : null,
|
|
1619
|
+
/* @__PURE__ */ n("span", { className: "cms-mail-row__time", children: a })
|
|
1836
1620
|
] }),
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
|
|
1621
|
+
/* @__PURE__ */ f("span", { className: "cms-mail-row__line", children: [
|
|
1622
|
+
/* @__PURE__ */ n("span", { className: "cms-mail-row__subject", children: l }),
|
|
1623
|
+
i ? /* @__PURE__ */ n("span", { className: "cms-mail-row__dot", role: "img", "aria-label": m.unread }) : null
|
|
1840
1624
|
] }),
|
|
1841
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ n("span", { className: "cms-mail-row__preview", children: s })
|
|
1842
1626
|
] })
|
|
1843
1627
|
]
|
|
1844
1628
|
}
|
|
1845
1629
|
)
|
|
1846
1630
|
] });
|
|
1847
1631
|
}
|
|
1848
|
-
function
|
|
1849
|
-
return /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1632
|
+
function ml({ direction: e, children: t, time: l, read: s, readLabel: a = "Read" }) {
|
|
1633
|
+
return /* @__PURE__ */ f("div", { className: F("cms-bubble", `cms-bubble--${e}`), children: [
|
|
1634
|
+
/* @__PURE__ */ n("div", { className: "cms-bubble__text", children: t }),
|
|
1635
|
+
/* @__PURE__ */ f("div", { className: "cms-bubble__meta", children: [
|
|
1852
1636
|
l,
|
|
1853
|
-
|
|
1637
|
+
e === "out" && s ? /* @__PURE__ */ f(ge, { children: [
|
|
1854
1638
|
" · ",
|
|
1855
1639
|
a
|
|
1856
1640
|
] }) : null
|
|
1857
1641
|
] })
|
|
1858
1642
|
] });
|
|
1859
1643
|
}
|
|
1860
|
-
function
|
|
1861
|
-
const v =
|
|
1862
|
-
g.preventDefault(),
|
|
1863
|
-
}, r = a ? /* @__PURE__ */
|
|
1864
|
-
return /* @__PURE__ */
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
|
|
1867
|
-
/* @__PURE__ */
|
|
1644
|
+
function hl({ label: e, value: t, onChange: l, onSend: s, onAttach: a, placeholder: i, variant: h = "chat", sendLabel: d = "Send", attachLabel: u = "Attach a file", leading: b, canSend: c }) {
|
|
1645
|
+
const v = he(), m = c ?? t.trim() !== "", N = (g) => {
|
|
1646
|
+
g.preventDefault(), m && s();
|
|
1647
|
+
}, r = a ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-composer__attach", "aria-label": u, onClick: a, children: /* @__PURE__ */ n($, { name: "paperclip" }) }) : null;
|
|
1648
|
+
return /* @__PURE__ */ f("form", { className: F("cms-composer", `cms-composer--${h}`), onSubmit: N, children: [
|
|
1649
|
+
/* @__PURE__ */ n("label", { htmlFor: v, className: h === "reply" ? "cms-composer__title" : "cms-visually-hidden", children: e }),
|
|
1650
|
+
h === "chat" ? r : null,
|
|
1651
|
+
/* @__PURE__ */ n(
|
|
1868
1652
|
"textarea",
|
|
1869
1653
|
{
|
|
1870
1654
|
id: v,
|
|
1871
1655
|
className: "cms-composer__input",
|
|
1872
|
-
rows:
|
|
1873
|
-
placeholder:
|
|
1656
|
+
rows: h === "reply" ? 3 : 1,
|
|
1657
|
+
placeholder: i,
|
|
1874
1658
|
value: t,
|
|
1875
1659
|
onChange: (g) => l(g.target.value),
|
|
1876
1660
|
onKeyDown: (g) => {
|
|
1877
|
-
g.nativeEvent.isComposing || g.keyCode === 229 ||
|
|
1661
|
+
g.nativeEvent.isComposing || g.keyCode === 229 || h === "chat" && g.key === "Enter" && !g.shiftKey && (g.preventDefault(), m && s());
|
|
1878
1662
|
}
|
|
1879
1663
|
}
|
|
1880
1664
|
),
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1665
|
+
h === "reply" && b !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-composer__leading", children: b }) : null,
|
|
1666
|
+
h === "reply" ? r : null,
|
|
1667
|
+
h === "chat" ? /* @__PURE__ */ n("button", { type: "submit", className: "cms-composer__send-round", "aria-label": d, disabled: !m, children: /* @__PURE__ */ n($, { name: "send" }) }) : /* @__PURE__ */ f("button", { type: "submit", className: "cms-button cms-button--chrome cms-composer__send", disabled: !m, children: [
|
|
1668
|
+
d,
|
|
1885
1669
|
" ",
|
|
1886
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ n($, { name: "send", size: 18 })
|
|
1887
1671
|
] })
|
|
1888
1672
|
] });
|
|
1889
1673
|
}
|
|
1890
|
-
const
|
|
1674
|
+
const mn = {
|
|
1891
1675
|
incomingAudio: "Incoming audio call",
|
|
1892
1676
|
incomingVideo: "Incoming video call",
|
|
1893
|
-
incomingFrom: (
|
|
1677
|
+
incomingFrom: (e, t) => `${e} from ${t}`,
|
|
1894
1678
|
accept: "Accept",
|
|
1895
1679
|
decline: "Decline",
|
|
1896
|
-
callWith: (
|
|
1897
|
-
callTime: (
|
|
1680
|
+
callWith: (e) => `Call with ${e}`,
|
|
1681
|
+
callTime: (e) => `Call time ${e}`,
|
|
1898
1682
|
goodConnection: "Good connection",
|
|
1899
1683
|
poorConnection: "Poor connection",
|
|
1900
1684
|
you: "You",
|
|
@@ -1905,94 +1689,94 @@ const on = {
|
|
|
1905
1689
|
addPerson: "Add person",
|
|
1906
1690
|
chat: "Chat",
|
|
1907
1691
|
hangUp: "Hang up",
|
|
1908
|
-
onCallWith: (
|
|
1692
|
+
onCallWith: (e) => `On a call with ${e}`,
|
|
1909
1693
|
returnToCall: "Return to call"
|
|
1910
1694
|
};
|
|
1911
|
-
function
|
|
1912
|
-
const
|
|
1913
|
-
return /* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
/* @__PURE__ */
|
|
1695
|
+
function fl({ name: e, namePlaceholder: t = !1, media: l, onAccept: s, onDecline: a, labels: i }) {
|
|
1696
|
+
const h = qe(mn, i), d = l === "video" ? h.incomingVideo : h.incomingAudio;
|
|
1697
|
+
return /* @__PURE__ */ f("div", { className: "cms-call-incoming", role: "alertdialog", "aria-label": h.incomingFrom(d, e), children: [
|
|
1698
|
+
/* @__PURE__ */ n("span", { className: "cms-call-incoming__ring", "aria-hidden": "true", children: /* @__PURE__ */ n(Ye, { name: e, size: 112, placeholder: t }) }),
|
|
1699
|
+
/* @__PURE__ */ n("p", { className: "cms-call-incoming__name", children: e }),
|
|
1700
|
+
/* @__PURE__ */ n("p", { className: "cms-call-incoming__what", children: d }),
|
|
1701
|
+
/* @__PURE__ */ f("div", { className: "cms-call-incoming__actions", children: [
|
|
1702
|
+
/* @__PURE__ */ n(Ue, { icon: "phone-off", label: h.decline, tone: "hang-up", onClick: a }),
|
|
1703
|
+
/* @__PURE__ */ n(Ue, { icon: "phone", label: h.accept, tone: "accept", onClick: s })
|
|
1920
1704
|
] })
|
|
1921
1705
|
] });
|
|
1922
1706
|
}
|
|
1923
|
-
function Ue({ icon:
|
|
1924
|
-
return /* @__PURE__ */
|
|
1707
|
+
function Ue({ icon: e, label: t, onClick: l, tone: s = "plain", pressed: a }) {
|
|
1708
|
+
return /* @__PURE__ */ f(
|
|
1925
1709
|
"button",
|
|
1926
1710
|
{
|
|
1927
1711
|
type: "button",
|
|
1928
|
-
className:
|
|
1712
|
+
className: F("cms-call-button", `cms-call-button--${s}`, a && "is-pressed"),
|
|
1929
1713
|
"aria-pressed": a,
|
|
1930
1714
|
onClick: l,
|
|
1931
1715
|
children: [
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
/* @__PURE__ */
|
|
1716
|
+
/* @__PURE__ */ n("span", { className: "cms-call-button__disc", children: /* @__PURE__ */ n($, { name: e, size: 24 }) }),
|
|
1717
|
+
/* @__PURE__ */ n("span", { className: "cms-call-button__label", children: t })
|
|
1934
1718
|
]
|
|
1935
1719
|
}
|
|
1936
1720
|
);
|
|
1937
1721
|
}
|
|
1938
|
-
function
|
|
1939
|
-
const
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */
|
|
1945
|
-
/* @__PURE__ */
|
|
1722
|
+
function pl({ name: e, duration: t, connection: l, you: s, muted: a, speaker: i, onToggleMute: h, onToggleSpeaker: d, onAddPerson: u, onChat: b, onHangUp: c, labels: v }) {
|
|
1723
|
+
const m = qe(mn, v);
|
|
1724
|
+
return /* @__PURE__ */ f("section", { className: "cms-call-panel", "aria-label": m.callWith(e), children: [
|
|
1725
|
+
/* @__PURE__ */ f("div", { className: "cms-call-panel__head", children: [
|
|
1726
|
+
/* @__PURE__ */ n(Ye, { name: e, size: 64 }),
|
|
1727
|
+
/* @__PURE__ */ f("div", { className: "cms-call-panel__who", children: [
|
|
1728
|
+
/* @__PURE__ */ n("p", { className: "cms-call-panel__name", children: e }),
|
|
1729
|
+
/* @__PURE__ */ n("p", { className: "cms-call-panel__time", "aria-label": m.callTime(t), children: t })
|
|
1946
1730
|
] }),
|
|
1947
|
-
/* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ n("span", { className: F("cms-pill", l === "good" ? "cms-pill--success" : "cms-pill--warning"), children: l === "good" ? m.goodConnection : m.poorConnection })
|
|
1948
1732
|
] }),
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
/* @__PURE__ */
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
s.speaking ? /* @__PURE__ */
|
|
1733
|
+
/* @__PURE__ */ f("div", { className: "cms-call-panel__you", children: [
|
|
1734
|
+
/* @__PURE__ */ n(Ye, { name: s.name, size: 36 }),
|
|
1735
|
+
/* @__PURE__ */ n("span", { children: m.you }),
|
|
1736
|
+
s.speaking ? /* @__PURE__ */ n("span", { className: "cms-call-panel__level", role: "img", "aria-label": m.speaking }) : null
|
|
1953
1737
|
] }),
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ f("div", { className: "cms-call-panel__controls", children: [
|
|
1739
|
+
/* @__PURE__ */ n(Ue, { icon: "mic", label: a ? m.unmute : m.mute, pressed: a, onClick: h }),
|
|
1740
|
+
/* @__PURE__ */ n(Ue, { icon: "speaker", label: m.speaker, pressed: i, onClick: d }),
|
|
1741
|
+
u ? /* @__PURE__ */ n(Ue, { icon: "user-plus", label: m.addPerson, onClick: u }) : null,
|
|
1742
|
+
b ? /* @__PURE__ */ n(Ue, { icon: "chat", label: m.chat, onClick: b }) : null,
|
|
1743
|
+
/* @__PURE__ */ n(Ue, { icon: "phone-off", label: m.hangUp, tone: "hang-up", onClick: c })
|
|
1960
1744
|
] })
|
|
1961
1745
|
] });
|
|
1962
1746
|
}
|
|
1963
|
-
function
|
|
1964
|
-
const
|
|
1965
|
-
return /* @__PURE__ */
|
|
1966
|
-
/* @__PURE__ */
|
|
1967
|
-
/* @__PURE__ */
|
|
1968
|
-
/* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1747
|
+
function bl({ name: e, duration: t, muted: l, onToggleMute: s, onReturn: a, onHangUp: i, labels: h }) {
|
|
1748
|
+
const d = qe(mn, h);
|
|
1749
|
+
return /* @__PURE__ */ f("section", { className: "cms-call-bar", "aria-label": d.callWith(e), children: [
|
|
1750
|
+
/* @__PURE__ */ n("span", { className: "cms-call-bar__live", "aria-hidden": "true" }),
|
|
1751
|
+
/* @__PURE__ */ n("span", { className: "cms-call-bar__name", children: d.onCallWith(e) }),
|
|
1752
|
+
/* @__PURE__ */ n("span", { className: "cms-call-bar__time", children: t }),
|
|
1753
|
+
/* @__PURE__ */ f("span", { className: "cms-call-bar__actions", children: [
|
|
1754
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon", "aria-label": l ? d.unmute : d.mute, "aria-pressed": l, onClick: s, children: /* @__PURE__ */ n($, { name: "mic" }) }),
|
|
1755
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-button cms-button--primary", onClick: a, children: d.returnToCall }),
|
|
1756
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-call-bar__icon cms-call-bar__icon--hang-up", "aria-label": d.hangUp, onClick: i, children: /* @__PURE__ */ n($, { name: "phone-off" }) })
|
|
1973
1757
|
] })
|
|
1974
1758
|
] });
|
|
1975
1759
|
}
|
|
1976
|
-
function
|
|
1977
|
-
return /* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
1760
|
+
function _l({ mark: e, product: t, headline: l, lead: s, features: a = [], children: i }) {
|
|
1761
|
+
return /* @__PURE__ */ f("div", { className: "cms-signin", children: [
|
|
1762
|
+
/* @__PURE__ */ f("aside", { className: "cms-signin__brand", children: [
|
|
1763
|
+
/* @__PURE__ */ f("p", { className: "cms-signin__logo", children: [
|
|
1764
|
+
/* @__PURE__ */ n("span", { className: "cms-signin__mark", "aria-hidden": "true", children: e }),
|
|
1981
1765
|
t
|
|
1982
1766
|
] }),
|
|
1983
|
-
/* @__PURE__ */
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
a.length ? /* @__PURE__ */
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
|
|
1989
|
-
] },
|
|
1767
|
+
/* @__PURE__ */ f("div", { className: "cms-signin__pitch", children: [
|
|
1768
|
+
/* @__PURE__ */ n("p", { className: "cms-signin__headline", children: l }),
|
|
1769
|
+
/* @__PURE__ */ n("p", { className: "cms-signin__lead", children: s }),
|
|
1770
|
+
a.length ? /* @__PURE__ */ n("ul", { className: "cms-signin__features", children: a.map((h) => /* @__PURE__ */ f("li", { children: [
|
|
1771
|
+
/* @__PURE__ */ n($, { name: h.icon, size: 18 }),
|
|
1772
|
+
h.label
|
|
1773
|
+
] }, h.label)) }) : null
|
|
1990
1774
|
] })
|
|
1991
1775
|
] }),
|
|
1992
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ n("main", { className: "cms-signin__form", children: i })
|
|
1993
1777
|
] });
|
|
1994
1778
|
}
|
|
1995
|
-
const
|
|
1779
|
+
const Mt = {
|
|
1996
1780
|
title: "Sign in",
|
|
1997
1781
|
identifier: "Email or username",
|
|
1998
1782
|
identifierPlaceholder: "name@example.com",
|
|
@@ -2004,243 +1788,243 @@ const gt = {
|
|
|
2004
1788
|
newHere: "New here?",
|
|
2005
1789
|
create: "Create an account"
|
|
2006
1790
|
};
|
|
2007
|
-
function
|
|
2008
|
-
const
|
|
2009
|
-
return /* @__PURE__ */
|
|
2010
|
-
T.preventDefault(), t(
|
|
2011
|
-
}, "aria-describedby": a ? `${
|
|
2012
|
-
/* @__PURE__ */
|
|
2013
|
-
/* @__PURE__ */
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
|
|
1791
|
+
function vl({ server: e, onSubmit: t, forgotHref: l, createHref: s, error: a, busy: i, labels: h }) {
|
|
1792
|
+
const d = qe(Mt, h), u = he(), [b, c] = D(""), [v, m] = D(""), [N, r] = D(!1);
|
|
1793
|
+
return /* @__PURE__ */ f("form", { className: "cms-signin-form", onSubmit: (T) => {
|
|
1794
|
+
T.preventDefault(), t(b, v);
|
|
1795
|
+
}, "aria-describedby": a ? `${u}-error` : void 0, children: [
|
|
1796
|
+
/* @__PURE__ */ n("h1", { className: "cms-signin-form__title", children: d.title }),
|
|
1797
|
+
/* @__PURE__ */ f("p", { className: "cms-signin-form__server", children: [
|
|
1798
|
+
/* @__PURE__ */ n($, { name: "server", size: 18 }),
|
|
1799
|
+
e
|
|
2016
1800
|
] }),
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */
|
|
1801
|
+
/* @__PURE__ */ n("label", { className: "cms-signin-form__label", htmlFor: `${u}-identifier`, children: d.identifier }),
|
|
1802
|
+
/* @__PURE__ */ n(
|
|
2019
1803
|
"input",
|
|
2020
1804
|
{
|
|
2021
|
-
id: `${
|
|
1805
|
+
id: `${u}-identifier`,
|
|
2022
1806
|
className: "cms-signin-form__input",
|
|
2023
1807
|
type: "text",
|
|
2024
1808
|
autoComplete: "username",
|
|
2025
|
-
placeholder:
|
|
2026
|
-
value:
|
|
2027
|
-
onChange: (T) =>
|
|
1809
|
+
placeholder: d.identifierPlaceholder,
|
|
1810
|
+
value: b,
|
|
1811
|
+
onChange: (T) => c(T.target.value),
|
|
2028
1812
|
required: !0
|
|
2029
1813
|
}
|
|
2030
1814
|
),
|
|
2031
|
-
/* @__PURE__ */
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ n("label", { className: "cms-signin-form__label", htmlFor: `${u}-password`, children: d.password }),
|
|
1816
|
+
/* @__PURE__ */ f("span", { className: "cms-signin-form__password", children: [
|
|
1817
|
+
/* @__PURE__ */ n(
|
|
2034
1818
|
"input",
|
|
2035
1819
|
{
|
|
2036
|
-
id: `${
|
|
1820
|
+
id: `${u}-password`,
|
|
2037
1821
|
className: "cms-signin-form__input",
|
|
2038
|
-
type:
|
|
1822
|
+
type: N ? "text" : "password",
|
|
2039
1823
|
autoComplete: "current-password",
|
|
2040
1824
|
value: v,
|
|
2041
|
-
onChange: (T) =>
|
|
1825
|
+
onChange: (T) => m(T.target.value),
|
|
2042
1826
|
required: !0
|
|
2043
1827
|
}
|
|
2044
1828
|
),
|
|
2045
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-signin-form__show", "aria-pressed": N, onClick: () => r((T) => !T), children: N ? d.hide : d.show })
|
|
2046
1830
|
] }),
|
|
2047
|
-
l ? /* @__PURE__ */
|
|
2048
|
-
a ? /* @__PURE__ */
|
|
2049
|
-
/* @__PURE__ */
|
|
2050
|
-
s ? /* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2052
|
-
/* @__PURE__ */
|
|
1831
|
+
l ? /* @__PURE__ */ n("a", { className: "cms-signin-form__forgot", href: l, children: d.forgot }) : null,
|
|
1832
|
+
a ? /* @__PURE__ */ n("p", { id: `${u}-error`, className: "cms-signin-form__error", role: "alert", children: a }) : null,
|
|
1833
|
+
/* @__PURE__ */ n("button", { type: "submit", className: "cms-button cms-button--chrome cms-signin-form__submit", disabled: i, "aria-busy": i || void 0, children: d.submit }),
|
|
1834
|
+
s ? /* @__PURE__ */ f(ge, { children: [
|
|
1835
|
+
/* @__PURE__ */ n("p", { className: "cms-signin-form__or", children: /* @__PURE__ */ n("span", { children: d.newHere }) }),
|
|
1836
|
+
/* @__PURE__ */ n("a", { className: "cms-button cms-signin-form__create", href: s, children: d.create })
|
|
2053
1837
|
] }) : null
|
|
2054
1838
|
] });
|
|
2055
1839
|
}
|
|
2056
|
-
const
|
|
2057
|
-
function
|
|
2058
|
-
const t =
|
|
2059
|
-
return t ===
|
|
1840
|
+
const Ct = { name: (e, t) => `${e}: ${t}` };
|
|
1841
|
+
function An(e) {
|
|
1842
|
+
const t = hn(e);
|
|
1843
|
+
return t === fn(e.options, e.defaultValue) ? null : t ?? null;
|
|
2060
1844
|
}
|
|
2061
|
-
function
|
|
2062
|
-
return
|
|
1845
|
+
function hn({ options: e, value: t, defaultValue: l }) {
|
|
1846
|
+
return e.find((s) => s.id === t) ?? fn(e, l);
|
|
2063
1847
|
}
|
|
2064
|
-
function
|
|
1848
|
+
function Tn(e) {
|
|
2065
1849
|
var t;
|
|
2066
|
-
return qe(
|
|
1850
|
+
return qe(Ct, e.labels).name(e.label, ((t = hn(e)) == null ? void 0 : t.label) ?? "");
|
|
2067
1851
|
}
|
|
2068
|
-
function
|
|
2069
|
-
const l =
|
|
2070
|
-
return
|
|
1852
|
+
function Ln(e, t) {
|
|
1853
|
+
const l = hn(e);
|
|
1854
|
+
return e.options.map((s) => ({
|
|
2071
1855
|
id: s.id,
|
|
2072
1856
|
label: s.label,
|
|
2073
1857
|
offer: { offered: !0, locked: !1 },
|
|
2074
1858
|
checked: s === l,
|
|
2075
1859
|
...t === void 0 ? {} : { group: t },
|
|
2076
1860
|
onSelect: () => {
|
|
2077
|
-
s !== l &&
|
|
1861
|
+
s !== l && e.onChange(s.id);
|
|
2078
1862
|
}
|
|
2079
1863
|
}));
|
|
2080
1864
|
}
|
|
2081
|
-
function
|
|
2082
|
-
return
|
|
1865
|
+
function fn(e, t) {
|
|
1866
|
+
return e.find((l) => l.id === t) ?? e[0];
|
|
2083
1867
|
}
|
|
2084
|
-
function
|
|
2085
|
-
var
|
|
2086
|
-
const t =
|
|
2087
|
-
|
|
2088
|
-
a === null ? t.current = null : t.current !== l && (t.current = l,
|
|
1868
|
+
function Dn(e) {
|
|
1869
|
+
var i;
|
|
1870
|
+
const t = O(null), l = (e == null ? void 0 : e.value) ?? null, a = e === void 0 || e.options.some((h) => h.id === e.value) ? null : ((i = fn(e.options, e.defaultValue)) == null ? void 0 : i.id) ?? null;
|
|
1871
|
+
Q(() => {
|
|
1872
|
+
a === null ? t.current = null : t.current !== l && (t.current = l, e == null || e.onChange(a));
|
|
2089
1873
|
}, [a, l]);
|
|
2090
1874
|
}
|
|
2091
|
-
function
|
|
2092
|
-
return l.options.length < 2 ? null : /* @__PURE__ */
|
|
1875
|
+
function In({ iconOnly: e = !1, onOpenChange: t, ...l }) {
|
|
1876
|
+
return l.options.length < 2 ? null : /* @__PURE__ */ n(St, { ...l, iconOnly: e, onOpenChange: t });
|
|
2093
1877
|
}
|
|
2094
|
-
function
|
|
2095
|
-
const [s, a] = D(null),
|
|
2096
|
-
|
|
2097
|
-
const
|
|
2098
|
-
const r =
|
|
2099
|
-
a({ x: r.left, y: r.bottom + 4, focus:
|
|
1878
|
+
function St({ iconOnly: e, onOpenChange: t, ...l }) {
|
|
1879
|
+
const [s, a] = D(null), i = Ie(() => a(null), []), h = O(!1), d = s !== null;
|
|
1880
|
+
Q(() => (t == null || t(d), () => t == null ? void 0 : t(!1)), [d, t]);
|
|
1881
|
+
const u = An(l), b = u !== null && !e, c = Tn(l), v = (m, N) => {
|
|
1882
|
+
const r = m.getBoundingClientRect();
|
|
1883
|
+
a({ x: r.left, y: r.bottom + 4, focus: N });
|
|
2100
1884
|
};
|
|
2101
|
-
return /* @__PURE__ */
|
|
2102
|
-
/* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ f(ge, { children: [
|
|
1886
|
+
/* @__PURE__ */ n(
|
|
2103
1887
|
"button",
|
|
2104
1888
|
{
|
|
2105
1889
|
type: "button",
|
|
2106
|
-
className:
|
|
1890
|
+
className: F("cms-filter-menu", u !== null && "cms-filter-menu--active", b && "cms-filter-menu--named"),
|
|
2107
1891
|
"aria-haspopup": "menu",
|
|
2108
|
-
"aria-expanded":
|
|
2109
|
-
"aria-label":
|
|
2110
|
-
title:
|
|
1892
|
+
"aria-expanded": d,
|
|
1893
|
+
"aria-label": c,
|
|
1894
|
+
title: c,
|
|
2111
1895
|
onMouseDown: () => {
|
|
2112
|
-
|
|
1896
|
+
h.current = d;
|
|
2113
1897
|
},
|
|
2114
|
-
onClick: (
|
|
2115
|
-
|
|
1898
|
+
onClick: (m) => {
|
|
1899
|
+
d || h.current ? i() : v(m.currentTarget, "current"), h.current = !1;
|
|
2116
1900
|
},
|
|
2117
|
-
onKeyDown: (
|
|
2118
|
-
|
|
1901
|
+
onKeyDown: (m) => {
|
|
1902
|
+
h.current = !1, (m.key === "ArrowDown" || m.key === "ArrowUp") && (m.preventDefault(), v(m.currentTarget, m.key === "ArrowUp" ? "last" : "current"));
|
|
2119
1903
|
},
|
|
2120
|
-
children:
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
] }) : /* @__PURE__ */
|
|
1904
|
+
children: b ? /* @__PURE__ */ f(ge, { children: [
|
|
1905
|
+
/* @__PURE__ */ n("span", { className: "cms-filter-menu__choice", children: u.label }),
|
|
1906
|
+
/* @__PURE__ */ n($, { name: "chevron-down", size: 16 })
|
|
1907
|
+
] }) : /* @__PURE__ */ n($, { name: "funnel" })
|
|
2124
1908
|
}
|
|
2125
1909
|
),
|
|
2126
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ n(
|
|
2127
1911
|
Ke,
|
|
2128
1912
|
{
|
|
2129
1913
|
at: s,
|
|
2130
|
-
items:
|
|
2131
|
-
onClose:
|
|
1914
|
+
items: Ln(l),
|
|
1915
|
+
onClose: i,
|
|
2132
1916
|
label: l.label,
|
|
2133
1917
|
focus: s == null ? void 0 : s.focus
|
|
2134
1918
|
}
|
|
2135
1919
|
)
|
|
2136
1920
|
] });
|
|
2137
1921
|
}
|
|
2138
|
-
function
|
|
2139
|
-
return
|
|
1922
|
+
function Et(e) {
|
|
1923
|
+
return Dn(e), /* @__PURE__ */ n(In, { ...e });
|
|
2140
1924
|
}
|
|
2141
|
-
function
|
|
2142
|
-
return /* @__PURE__ */
|
|
2143
|
-
|
|
2144
|
-
/* @__PURE__ */
|
|
2145
|
-
l !== void 0 ? /* @__PURE__ */
|
|
1925
|
+
function gl({ leading: e, name: t, filter: l }) {
|
|
1926
|
+
return /* @__PURE__ */ f("div", { className: "cms-list-head", children: [
|
|
1927
|
+
e != null ? /* @__PURE__ */ n("span", { className: "cms-list-head__leading", children: e }) : null,
|
|
1928
|
+
/* @__PURE__ */ n("h2", { className: "cms-list-head__name", title: t, children: t }),
|
|
1929
|
+
l !== void 0 ? /* @__PURE__ */ n(Et, { ...l }) : null
|
|
2146
1930
|
] });
|
|
2147
1931
|
}
|
|
2148
|
-
const
|
|
2149
|
-
function
|
|
1932
|
+
const kn = { bare: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Set() }, xn = (e, t) => e.size === t.size && [...e].every((l) => t.has(l));
|
|
1933
|
+
function At(e) {
|
|
2150
1934
|
const t = /* @__PURE__ */ new Map();
|
|
2151
|
-
for (const l of
|
|
1935
|
+
for (const l of e) t.set(l.group, [...t.get(l.group) ?? [], l]);
|
|
2152
1936
|
return [...t.values()];
|
|
2153
1937
|
}
|
|
2154
|
-
function
|
|
1938
|
+
function Tt(e) {
|
|
2155
1939
|
const t = /* @__PURE__ */ new Map();
|
|
2156
|
-
for (const l of
|
|
1940
|
+
for (const l of e) l.overflow !== void 0 && l.overflow !== 0 && t.set(l.overflow, [...t.get(l.overflow) ?? [], l.id]);
|
|
2157
1941
|
return [...t.entries()].sort(([l], [s]) => l - s).map(([, l]) => l);
|
|
2158
1942
|
}
|
|
2159
|
-
function
|
|
2160
|
-
var
|
|
2161
|
-
const
|
|
2162
|
-
const p =
|
|
1943
|
+
function wl({ label: e, actions: t, onAction: l, status: s, moreLabel: a, leading: i }) {
|
|
1944
|
+
var q;
|
|
1945
|
+
const h = t.filter((p) => p.entries === void 0 || p.entries.length > 0), d = O(null), u = O(null), b = O(null), [c, v] = D(kn), [m, N] = D(null), [r, g] = D("first"), [T, C] = D(null), [S, x] = D(null), _ = At(h), y = _.flat(), I = ((q = y.find((p) => p.primary === !0 && p.overflow !== 0)) == null ? void 0 : q.id) ?? null, U = Tt(h.filter((p) => p.id !== I)), P = y.filter((p) => p.overflow === 0), k = y.filter((p) => p.overflow !== 0), B = P.length === 1 ? P[0] ?? null : null, z = JSON.stringify([h.map((p) => [p.id, p.label, p.icon, p.group, p.overflow ?? null, p.primary === !0, p.entries !== void 0]), s ?? "", i !== void 0]), j = (p) => /* @__PURE__ */ new Set([...P.filter((L) => L !== B || p.size > 0).map((L) => L.id), ...p]), K = Ie(() => {
|
|
1946
|
+
const p = d.current, L = u.current;
|
|
2163
1947
|
if (p === null || L === null) return;
|
|
2164
|
-
const
|
|
2165
|
-
var
|
|
2166
|
-
return ((
|
|
2167
|
-
}, Se =
|
|
2168
|
-
const
|
|
2169
|
-
return Se + ke.reduce((
|
|
2170
|
-
}, R = k.filter((A) => A.id !== I && !
|
|
2171
|
-
let
|
|
2172
|
-
if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <=
|
|
1948
|
+
const Z = getComputedStyle(p), ue = parseFloat(Z.columnGap || "0") || 0, ae = p.clientWidth - (parseFloat(Z.paddingLeft) || 0) - (parseFloat(Z.paddingRight) || 0), me = (A) => {
|
|
1949
|
+
var M;
|
|
1950
|
+
return ((M = L.querySelector(A)) == null ? void 0 : M.getBoundingClientRect().width) ?? 0;
|
|
1951
|
+
}, Se = me('[data-measure="leading"]'), We = me('[data-measure="separator"]'), Fe = me('[data-measure="more"]'), Te = (A, M) => me(`[data-measure="${M ? "full" : "icon"}"][data-measure-action="${CSS.escape(A)}"]`), Ee = (A, M) => {
|
|
1952
|
+
const H = j(M), le = B !== null && !H.has(B.id) ? B : null, J = _.map((He) => He.filter((V) => !H.has(V.id) && V !== le)).filter((He) => He.length > 0), ke = [...J.flat(), ...le !== null ? [le] : []], Re = ke.length + (J.length - 1) + (H.size > 0 ? 1 : 0) + (Se > 0 ? 1 : 0);
|
|
1953
|
+
return Se + ke.reduce((He, V) => He + Te(V.id, !A.has(V.id)), 0) + We * Math.max(0, J.length - 1) + (H.size > 0 ? Fe : 0) + ue * Math.max(0, Re - 1);
|
|
1954
|
+
}, R = k.filter((A) => A.id !== I && !U.some((M) => M.includes(A.id))).map((A) => A.id), X = [...U, ...[...R].reverse().map((A) => [A]), ...I !== null ? [[I]] : []], Ne = [...B !== null ? [[B.id]] : [], ...X];
|
|
1955
|
+
let oe = null;
|
|
1956
|
+
if (Ee(/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()) <= ae) oe = kn;
|
|
2173
1957
|
else {
|
|
2174
1958
|
const A = /* @__PURE__ */ new Set();
|
|
2175
|
-
for (const
|
|
2176
|
-
for (const
|
|
2177
|
-
if (Ee(A, /* @__PURE__ */ new Set()) <=
|
|
2178
|
-
|
|
1959
|
+
for (const M of Ne) {
|
|
1960
|
+
for (const H of M) A.add(H);
|
|
1961
|
+
if (Ee(A, /* @__PURE__ */ new Set()) <= ae) {
|
|
1962
|
+
oe = { bare: A, hidden: /* @__PURE__ */ new Set() };
|
|
2179
1963
|
break;
|
|
2180
1964
|
}
|
|
2181
1965
|
}
|
|
2182
1966
|
}
|
|
2183
|
-
if (
|
|
2184
|
-
const A = new Set(Ne.flat()),
|
|
2185
|
-
for (const
|
|
2186
|
-
for (const
|
|
2187
|
-
if (
|
|
1967
|
+
if (oe === null) {
|
|
1968
|
+
const A = new Set(Ne.flat()), M = /* @__PURE__ */ new Set(), H = () => M.size + P.length >= 2;
|
|
1969
|
+
for (const le of X) {
|
|
1970
|
+
for (const J of le) M.add(J);
|
|
1971
|
+
if (H() && Ee(A, M) <= ae) break;
|
|
2188
1972
|
}
|
|
2189
|
-
|
|
1973
|
+
H() || M.clear(), oe = { bare: A, hidden: M };
|
|
2190
1974
|
}
|
|
2191
|
-
const
|
|
2192
|
-
v((A) =>
|
|
2193
|
-
}, [
|
|
2194
|
-
$e(
|
|
2195
|
-
const p =
|
|
1975
|
+
const o = oe;
|
|
1976
|
+
v((A) => xn(A.bare, o.bare) && xn(A.hidden, o.hidden) ? A : o);
|
|
1977
|
+
}, [z]);
|
|
1978
|
+
$e(K, [K]), Q(() => {
|
|
1979
|
+
const p = d.current;
|
|
2196
1980
|
if (p === null || typeof ResizeObserver > "u") return;
|
|
2197
|
-
const L = new ResizeObserver(() =>
|
|
1981
|
+
const L = new ResizeObserver(() => K());
|
|
2198
1982
|
return L.observe(p), () => L.disconnect();
|
|
2199
|
-
}, [
|
|
1983
|
+
}, [K]), Q(() => {
|
|
2200
1984
|
const p = typeof document > "u" ? void 0 : document.fonts;
|
|
2201
1985
|
if (p === void 0) return;
|
|
2202
1986
|
let L = !0;
|
|
2203
|
-
const
|
|
2204
|
-
L &&
|
|
1987
|
+
const Z = () => {
|
|
1988
|
+
L && K();
|
|
2205
1989
|
};
|
|
2206
|
-
return p.ready.then(
|
|
2207
|
-
L = !1, p.removeEventListener("loadingdone",
|
|
1990
|
+
return p.ready.then(Z), p.addEventListener("loadingdone", Z), () => {
|
|
1991
|
+
L = !1, p.removeEventListener("loadingdone", Z);
|
|
2208
1992
|
};
|
|
2209
|
-
}, [
|
|
2210
|
-
const
|
|
2211
|
-
...I !== null &&
|
|
2212
|
-
...
|
|
2213
|
-
...
|
|
2214
|
-
].filter((p) => p !== void 0 &&
|
|
2215
|
-
var
|
|
2216
|
-
const L =
|
|
2217
|
-
let
|
|
2218
|
-
if (p.key === "ArrowRight" ?
|
|
1993
|
+
}, [K]);
|
|
1994
|
+
const G = j(c.hidden), Y = B !== null && !G.has(B.id) ? B : null, ee = (p) => G.has(p.id) || p === Y, be = [..._.map((p) => p.filter((L) => !ee(L))).filter((p) => p.length > 0).flat(), ...Y !== null ? [Y] : []], ce = (p) => y.find((L) => L.id === p), de = [...U.flat(), ...k.filter((p) => p.id !== I && !U.some((L) => L.includes(p.id))).map((p) => p.id).reverse()], Ce = [
|
|
1995
|
+
...I !== null && c.hidden.has(I) ? [ce(I)] : [],
|
|
1996
|
+
...de.filter((p) => c.hidden.has(p)).map(ce),
|
|
1997
|
+
...G.size > 0 ? P : []
|
|
1998
|
+
].filter((p) => p !== void 0 && G.has(p.id)), fe = new Set(k.filter((p) => !U.some((L) => L.includes(p.id))).map((p) => p.id)), te = [...be.map((p) => p.id), ...Ce.length > 0 ? ["more"] : []], pe = T !== null && te.includes(T) ? T : te[0] ?? null, _e = (p) => {
|
|
1999
|
+
var ae, me;
|
|
2000
|
+
const L = te.indexOf(pe ?? "");
|
|
2001
|
+
let Z = null;
|
|
2002
|
+
if (p.key === "ArrowRight" ? Z = Math.min(te.length - 1, L + 1) : p.key === "ArrowLeft" ? Z = Math.max(0, L - 1) : p.key === "Home" ? Z = 0 : p.key === "End" ? Z = te.length - 1 : p.key === "Escape" && x(pe), Z === null) return;
|
|
2219
2003
|
p.preventDefault();
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2222
|
-
},
|
|
2004
|
+
const ue = te[Z] ?? null;
|
|
2005
|
+
C(ue), (me = (ae = d.current) == null ? void 0 : ae.querySelector(`[data-stop="${CSS.escape(ue ?? "")}"]`)) == null || me.focus();
|
|
2006
|
+
}, we = Ce.map((p) => ({
|
|
2223
2007
|
id: p.id,
|
|
2224
|
-
label: /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2008
|
+
label: /* @__PURE__ */ f(ge, { children: [
|
|
2009
|
+
/* @__PURE__ */ n(je, { name: p.icon }),
|
|
2226
2010
|
p.label
|
|
2227
2011
|
] }),
|
|
2228
2012
|
offer: p.disabled ? { offered: !0, locked: !1, refusal: p.reason ?? "" } : { offered: !0, locked: !1 },
|
|
2229
2013
|
...p.danger ? { danger: !0 } : {},
|
|
2230
2014
|
onSelect: () => {
|
|
2231
|
-
var
|
|
2015
|
+
var Z;
|
|
2232
2016
|
if (p.disabled || p.busy) return;
|
|
2233
2017
|
if (p.entries === void 0) {
|
|
2234
2018
|
l(p.id);
|
|
2235
2019
|
return;
|
|
2236
2020
|
}
|
|
2237
|
-
const L = (
|
|
2238
|
-
g("first"),
|
|
2021
|
+
const L = (Z = b.current) == null ? void 0 : Z.getBoundingClientRect();
|
|
2022
|
+
g("first"), N({ which: p.id, x: (L == null ? void 0 : L.left) ?? 0, y: (L == null ? void 0 : L.bottom) ?? 0 });
|
|
2239
2023
|
}
|
|
2240
|
-
})),
|
|
2024
|
+
})), ne = m === null || m.which === "more" ? void 0 : y.find((p) => p.id === m.which), ye = ((ne == null ? void 0 : ne.entries) ?? []).map((p) => ({
|
|
2241
2025
|
id: p.id,
|
|
2242
|
-
label: /* @__PURE__ */
|
|
2243
|
-
p.icon !== void 0 ? /* @__PURE__ */
|
|
2026
|
+
label: /* @__PURE__ */ f(ge, { children: [
|
|
2027
|
+
p.icon !== void 0 ? /* @__PURE__ */ n(je, { name: p.icon }) : null,
|
|
2244
2028
|
p.label
|
|
2245
2029
|
] }),
|
|
2246
2030
|
offer: p.disabled ? { offered: !0, locked: !1, refusal: p.reason ?? "" } : { offered: !0, locked: !1 },
|
|
@@ -2248,88 +2032,89 @@ function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leadin
|
|
|
2248
2032
|
onSelect: () => {
|
|
2249
2033
|
p.disabled || l(p.id);
|
|
2250
2034
|
}
|
|
2251
|
-
})),
|
|
2252
|
-
const
|
|
2253
|
-
g(
|
|
2254
|
-
},
|
|
2255
|
-
|
|
2035
|
+
})), w = (p, L, Z) => {
|
|
2036
|
+
const ue = L.getBoundingClientRect();
|
|
2037
|
+
g(Z), N({ which: p, x: ue.left, y: ue.bottom });
|
|
2038
|
+
}, E = k.length + (B !== null ? 1 : 0), W = (p) => /* @__PURE__ */ n(
|
|
2039
|
+
Lt,
|
|
2256
2040
|
{
|
|
2257
2041
|
action: p,
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2042
|
+
primary: p.id === I,
|
|
2043
|
+
labels: !c.bare.has(p.id),
|
|
2044
|
+
overflowed: G.has(p.id),
|
|
2045
|
+
pinned: fe.has(p.id),
|
|
2046
|
+
tabbable: pe === p.id,
|
|
2047
|
+
tipOff: S === p.id,
|
|
2048
|
+
menuOpen: (m == null ? void 0 : m.which) === p.id,
|
|
2049
|
+
onChoose: (L, Z) => {
|
|
2050
|
+
p.entries === void 0 ? l(p.id) : (m == null ? void 0 : m.which) === p.id && Z === null ? N(null) : w(p.id, L, Z ?? "first");
|
|
2266
2051
|
},
|
|
2267
2052
|
onFocus: () => {
|
|
2268
|
-
|
|
2053
|
+
C(p.id), x(null);
|
|
2269
2054
|
}
|
|
2270
2055
|
},
|
|
2271
2056
|
p.id
|
|
2272
2057
|
);
|
|
2273
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ f(
|
|
2274
2059
|
"div",
|
|
2275
2060
|
{
|
|
2276
|
-
ref:
|
|
2061
|
+
ref: d,
|
|
2277
2062
|
role: "toolbar",
|
|
2278
|
-
"aria-label":
|
|
2279
|
-
className:
|
|
2063
|
+
"aria-label": e,
|
|
2064
|
+
className: F(
|
|
2280
2065
|
"cms-pane-toolbar",
|
|
2281
|
-
|
|
2282
|
-
|
|
2066
|
+
E > 0 && c.bare.size >= E && "cms-pane-toolbar--labels-hidden",
|
|
2067
|
+
c.bare.size > 0 && c.bare.size < E && "cms-pane-toolbar--labels-partly-hidden"
|
|
2283
2068
|
),
|
|
2284
|
-
onKeyDown:
|
|
2069
|
+
onKeyDown: _e,
|
|
2285
2070
|
children: [
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
const
|
|
2289
|
-
return /* @__PURE__ */
|
|
2290
|
-
|
|
2291
|
-
/* @__PURE__ */
|
|
2071
|
+
i !== void 0 ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__leading", children: i }) : null,
|
|
2072
|
+
_.map((p, L) => {
|
|
2073
|
+
const Z = p.filter((ae) => !ee(ae)), ue = _.slice(0, L).some((ae) => ae.some((me) => !ee(me)));
|
|
2074
|
+
return /* @__PURE__ */ f("div", { className: "cms-pane-toolbar__group-wrap", children: [
|
|
2075
|
+
Z.length > 0 && ue ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__separator", role: "separator", "aria-orientation": "vertical" }) : null,
|
|
2076
|
+
/* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group", hidden: Z.length === 0, children: p.filter((ae) => ae !== Y).map((ae) => W(ae)) })
|
|
2292
2077
|
] }, L);
|
|
2293
2078
|
}),
|
|
2294
|
-
|
|
2295
|
-
Ce.length > 0 ? /* @__PURE__ */
|
|
2079
|
+
Y !== null ? /* @__PURE__ */ n("div", { className: "cms-pane-toolbar__group cms-pane-toolbar__lone", children: W(Y) }) : null,
|
|
2080
|
+
Ce.length > 0 ? /* @__PURE__ */ n(
|
|
2296
2081
|
"button",
|
|
2297
2082
|
{
|
|
2298
|
-
ref:
|
|
2083
|
+
ref: b,
|
|
2299
2084
|
type: "button",
|
|
2300
2085
|
className: "cms-icon-button cms-pane-toolbar__more",
|
|
2301
2086
|
"data-stop": "more",
|
|
2302
2087
|
"aria-label": a,
|
|
2303
2088
|
title: a,
|
|
2304
2089
|
"aria-haspopup": "menu",
|
|
2305
|
-
"aria-expanded": (
|
|
2306
|
-
tabIndex:
|
|
2307
|
-
onFocus: () =>
|
|
2090
|
+
"aria-expanded": (m == null ? void 0 : m.which) === "more",
|
|
2091
|
+
tabIndex: pe === "more" ? 0 : -1,
|
|
2092
|
+
onFocus: () => C("more"),
|
|
2308
2093
|
onClick: (p) => {
|
|
2309
|
-
(
|
|
2094
|
+
(m == null ? void 0 : m.which) === "more" ? N(null) : w("more", p.currentTarget, "first");
|
|
2310
2095
|
},
|
|
2311
2096
|
onKeyDown: (p) => {
|
|
2312
|
-
(p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(),
|
|
2097
|
+
(p.key === "ArrowDown" || p.key === "ArrowUp") && (p.preventDefault(), p.stopPropagation(), w("more", p.currentTarget, p.key === "ArrowUp" ? "last" : "first"));
|
|
2313
2098
|
},
|
|
2314
|
-
children: /* @__PURE__ */
|
|
2099
|
+
children: /* @__PURE__ */ n($, { name: "more" })
|
|
2315
2100
|
}
|
|
2316
2101
|
) : null,
|
|
2317
|
-
s !== void 0 ? /* @__PURE__ */
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
|
|
2322
|
-
/* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
|
|
2325
|
-
/* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2328
|
-
p.entries !== void 0 ? /* @__PURE__ */
|
|
2102
|
+
s !== void 0 ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__status", title: s, children: s }) : null,
|
|
2103
|
+
/* @__PURE__ */ n(Ke, { at: (m == null ? void 0 : m.which) === "more" ? m : null, items: we, onClose: () => N(null), label: a, focus: r }),
|
|
2104
|
+
/* @__PURE__ */ n(Ke, { at: ne !== void 0 ? m : null, items: ye, onClose: () => N(null), label: (ne == null ? void 0 : ne.label) ?? "", focus: r }),
|
|
2105
|
+
/* @__PURE__ */ f("div", { ref: u, className: "cms-pane-toolbar__measure", "aria-hidden": "true", children: [
|
|
2106
|
+
i !== void 0 ? /* @__PURE__ */ n("div", { "data-measure": "leading", children: i }) : null,
|
|
2107
|
+
/* @__PURE__ */ n("span", { "data-measure": "separator", className: "cms-pane-toolbar__separator" }),
|
|
2108
|
+
/* @__PURE__ */ n("span", { "data-measure": "more", className: "cms-icon-button cms-pane-toolbar__more", children: /* @__PURE__ */ n($, { name: "more" }) }),
|
|
2109
|
+
y.map((p) => /* @__PURE__ */ f("span", { children: [
|
|
2110
|
+
/* @__PURE__ */ f("span", { "data-measure": "full", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
|
|
2111
|
+
/* @__PURE__ */ n(je, { name: p.icon }),
|
|
2112
|
+
/* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
|
|
2113
|
+
p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
|
|
2329
2114
|
] }),
|
|
2330
|
-
/* @__PURE__ */
|
|
2331
|
-
Be(p.icon) !== null ? /* @__PURE__ */
|
|
2332
|
-
p.entries !== void 0 ? /* @__PURE__ */
|
|
2115
|
+
/* @__PURE__ */ f("span", { "data-measure": "icon", "data-measure-action": p.id, className: F("cms-pane-toolbar__action", Be(p.icon) !== null && "cms-pane-toolbar__action--bare", p.entries !== void 0 && "cms-pane-toolbar__action--menu"), children: [
|
|
2116
|
+
Be(p.icon) !== null ? /* @__PURE__ */ n(je, { name: p.icon }) : /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", children: p.label }),
|
|
2117
|
+
p.entries !== void 0 ? /* @__PURE__ */ n(ln, {}) : null
|
|
2333
2118
|
] })
|
|
2334
2119
|
] }, p.id))
|
|
2335
2120
|
] })
|
|
@@ -2338,139 +2123,139 @@ function fl({ label: n, actions: t, onAction: l, status: s, moreLabel: a, leadin
|
|
|
2338
2123
|
);
|
|
2339
2124
|
}
|
|
2340
2125
|
const Pe = "tip";
|
|
2341
|
-
function
|
|
2342
|
-
const [
|
|
2343
|
-
|
|
2344
|
-
if (!
|
|
2345
|
-
|
|
2126
|
+
function Lt({ action: e, primary: t, labels: l, overflowed: s, pinned: a, tabbable: i, tipOff: h, menuOpen: d, onChoose: u, onFocus: b }) {
|
|
2127
|
+
const [c, v] = D(!1);
|
|
2128
|
+
Q(() => {
|
|
2129
|
+
if (!e.busy) {
|
|
2130
|
+
v(!1);
|
|
2346
2131
|
return;
|
|
2347
2132
|
}
|
|
2348
|
-
const
|
|
2349
|
-
return () => clearTimeout(
|
|
2350
|
-
}, [
|
|
2351
|
-
const
|
|
2352
|
-
return /* @__PURE__ */
|
|
2133
|
+
const y = setTimeout(() => v(!0), en);
|
|
2134
|
+
return () => clearTimeout(y);
|
|
2135
|
+
}, [e.busy]);
|
|
2136
|
+
const m = Be(e.icon) === null, N = l || m, r = e.disabled && e.reason ? e.reason : null, g = r ?? (N ? null : e.label), T = he(), [C, S] = D(!1), x = dn(), _ = e.entries !== void 0;
|
|
2137
|
+
return /* @__PURE__ */ f(
|
|
2353
2138
|
"button",
|
|
2354
2139
|
{
|
|
2355
2140
|
type: "button",
|
|
2356
|
-
className:
|
|
2357
|
-
"data-action":
|
|
2358
|
-
"data-stop":
|
|
2359
|
-
...
|
|
2360
|
-
...
|
|
2361
|
-
hidden:
|
|
2362
|
-
"aria-label":
|
|
2363
|
-
"aria-disabled":
|
|
2364
|
-
"aria-busy":
|
|
2365
|
-
...
|
|
2366
|
-
...
|
|
2367
|
-
...
|
|
2368
|
-
...
|
|
2369
|
-
tabIndex:
|
|
2141
|
+
className: F("cms-pane-toolbar__action", t && "cms-pane-toolbar__action--primary", !N && "cms-pane-toolbar__action--bare", m && "cms-pane-toolbar__action--text", _ && "cms-pane-toolbar__action--menu", e.danger && "is-danger"),
|
|
2142
|
+
"data-action": e.id,
|
|
2143
|
+
"data-stop": e.id,
|
|
2144
|
+
...s ? { "data-overflowed": "" } : {},
|
|
2145
|
+
...a ? { "data-pinned": "" } : {},
|
|
2146
|
+
hidden: s,
|
|
2147
|
+
"aria-label": e.label,
|
|
2148
|
+
"aria-disabled": e.disabled || void 0,
|
|
2149
|
+
"aria-busy": e.busy || void 0,
|
|
2150
|
+
..._ ? { "aria-haspopup": "menu", "aria-expanded": d } : {},
|
|
2151
|
+
...r === null ? {} : { "aria-describedby": T },
|
|
2152
|
+
...C && r !== null ? { "data-reason-shown": "" } : {},
|
|
2153
|
+
...x.dismissed(Pe) ? { "data-tip-dismissed": "" } : {},
|
|
2154
|
+
tabIndex: i ? 0 : -1,
|
|
2370
2155
|
onFocus: () => {
|
|
2371
|
-
|
|
2156
|
+
b(), x.focusIn(Pe);
|
|
2372
2157
|
},
|
|
2373
2158
|
onBlur: () => {
|
|
2374
|
-
|
|
2159
|
+
S(!1), x.focusOut(Pe);
|
|
2375
2160
|
},
|
|
2376
|
-
onMouseEnter: () =>
|
|
2377
|
-
onMouseLeave: () =>
|
|
2378
|
-
onKeyDown: (
|
|
2379
|
-
|
|
2161
|
+
onMouseEnter: () => x.pointerIn(Pe),
|
|
2162
|
+
onMouseLeave: () => x.pointerOut(Pe),
|
|
2163
|
+
onKeyDown: (y) => {
|
|
2164
|
+
y.key === "Escape" && (S(!1), x.dismiss(Pe)), _ && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), r !== null ? S(!0) : !e.disabled && !e.busy && u(y.currentTarget, y.key === "ArrowUp" ? "last" : "first"));
|
|
2380
2165
|
},
|
|
2381
|
-
onClick: (
|
|
2382
|
-
|
|
2166
|
+
onClick: (y) => {
|
|
2167
|
+
r !== null ? (S(!0), x.show(Pe)) : !e.disabled && !e.busy && u(y.currentTarget, null);
|
|
2383
2168
|
},
|
|
2384
2169
|
children: [
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2170
|
+
c ? /* @__PURE__ */ n(se, { name: "spinner" }) : /* @__PURE__ */ n(je, { name: e.icon }),
|
|
2171
|
+
N ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__label", "aria-hidden": "true", children: e.label }) : null,
|
|
2172
|
+
_ ? /* @__PURE__ */ n(ln, {}) : null,
|
|
2173
|
+
r !== null || g !== null && !h ? /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__tip", role: "tooltip", id: T, children: g }) : null
|
|
2389
2174
|
]
|
|
2390
2175
|
}
|
|
2391
2176
|
);
|
|
2392
2177
|
}
|
|
2393
|
-
function
|
|
2394
|
-
return /* @__PURE__ */
|
|
2178
|
+
function ln() {
|
|
2179
|
+
return /* @__PURE__ */ n("span", { className: "cms-pane-toolbar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ n($, { name: "chevron-down", size: 14 }) });
|
|
2395
2180
|
}
|
|
2396
|
-
function je({ name:
|
|
2397
|
-
const t = Be(
|
|
2398
|
-
return t === null ? null : /* @__PURE__ */
|
|
2181
|
+
function je({ name: e }) {
|
|
2182
|
+
const t = Be(e);
|
|
2183
|
+
return t === null ? null : /* @__PURE__ */ n($, { name: t, size: 18 });
|
|
2399
2184
|
}
|
|
2400
|
-
function
|
|
2401
|
-
const [
|
|
2402
|
-
s &&
|
|
2403
|
-
}, r = (
|
|
2404
|
-
var
|
|
2405
|
-
|
|
2185
|
+
function yl({ title: e, body: t = null, time: l = null, unread: s, unreadLabel: a, expandLabel: i, collapseLabel: h, action: d = null, onRead: u, leading: b }) {
|
|
2186
|
+
const [c, v] = D(!1), m = he(), N = () => {
|
|
2187
|
+
s && u();
|
|
2188
|
+
}, r = (d == null ? void 0 : d.presentation) === "row" && d.onAction !== void 0, g = (d == null ? void 0 : d.presentation) === "button" && d.onAction !== void 0 ? d : null, T = () => {
|
|
2189
|
+
var C;
|
|
2190
|
+
N(), r && ((C = d.onAction) == null || C.call(d));
|
|
2406
2191
|
};
|
|
2407
|
-
return /* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2192
|
+
return /* @__PURE__ */ f("article", { className: F("cms-notification", s && "is-unread", c && "is-expanded", r && "is-row-action"), "data-state": s ? "unread" : "read", children: [
|
|
2193
|
+
/* @__PURE__ */ f(
|
|
2409
2194
|
"div",
|
|
2410
2195
|
{
|
|
2411
2196
|
className: "cms-notification__row",
|
|
2412
2197
|
role: "button",
|
|
2413
2198
|
tabIndex: 0,
|
|
2414
|
-
"aria-describedby": t === null ? void 0 :
|
|
2199
|
+
"aria-describedby": t === null ? void 0 : m,
|
|
2415
2200
|
onClick: T,
|
|
2416
|
-
onKeyDown: (
|
|
2417
|
-
|
|
2201
|
+
onKeyDown: (C) => {
|
|
2202
|
+
C.target !== C.currentTarget || C.key !== "Enter" && C.key !== " " || (C.preventDefault(), T());
|
|
2418
2203
|
},
|
|
2419
2204
|
children: [
|
|
2420
|
-
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2424
|
-
s ? /* @__PURE__ */
|
|
2205
|
+
b != null ? /* @__PURE__ */ n("span", { className: "cms-notification__leading", children: b }) : null,
|
|
2206
|
+
/* @__PURE__ */ f("span", { className: "cms-notification__text", children: [
|
|
2207
|
+
/* @__PURE__ */ f("span", { className: "cms-notification__head", children: [
|
|
2208
|
+
/* @__PURE__ */ f("span", { className: "cms-notification__title", children: [
|
|
2209
|
+
s ? /* @__PURE__ */ f("span", { className: "cms-visually-hidden", children: [
|
|
2425
2210
|
a,
|
|
2426
2211
|
" "
|
|
2427
2212
|
] }) : null,
|
|
2428
|
-
|
|
2213
|
+
e
|
|
2429
2214
|
] }),
|
|
2430
|
-
l !== null ? /* @__PURE__ */
|
|
2215
|
+
l !== null ? /* @__PURE__ */ n("span", { className: "cms-notification__time", children: l }) : null
|
|
2431
2216
|
] }),
|
|
2432
|
-
t !== null && t !== "" ? /* @__PURE__ */
|
|
2217
|
+
t !== null && t !== "" ? /* @__PURE__ */ n("span", { className: "cms-notification__body", id: m, children: t }) : null
|
|
2433
2218
|
] }),
|
|
2434
|
-
s ? /* @__PURE__ */
|
|
2219
|
+
s ? /* @__PURE__ */ n("span", { className: "cms-notification__dot", "aria-hidden": "true" }) : null
|
|
2435
2220
|
]
|
|
2436
2221
|
}
|
|
2437
2222
|
),
|
|
2438
|
-
t !== null && t !== "" ? /* @__PURE__ */
|
|
2223
|
+
t !== null && t !== "" ? /* @__PURE__ */ n(
|
|
2439
2224
|
"button",
|
|
2440
2225
|
{
|
|
2441
2226
|
type: "button",
|
|
2442
2227
|
className: "cms-notification__chevron",
|
|
2443
|
-
"aria-expanded":
|
|
2444
|
-
"aria-controls":
|
|
2445
|
-
"aria-label":
|
|
2446
|
-
title:
|
|
2228
|
+
"aria-expanded": c,
|
|
2229
|
+
"aria-controls": m,
|
|
2230
|
+
"aria-label": c ? h : i,
|
|
2231
|
+
title: c ? h : i,
|
|
2447
2232
|
onClick: () => {
|
|
2448
|
-
|
|
2233
|
+
c || N(), v((C) => !C);
|
|
2449
2234
|
},
|
|
2450
|
-
children: /* @__PURE__ */
|
|
2235
|
+
children: /* @__PURE__ */ n($, { name: "chevron-down", size: 18 })
|
|
2451
2236
|
}
|
|
2452
2237
|
) : null,
|
|
2453
|
-
g !== null ? /* @__PURE__ */
|
|
2238
|
+
g !== null ? /* @__PURE__ */ n(
|
|
2454
2239
|
"button",
|
|
2455
2240
|
{
|
|
2456
2241
|
type: "button",
|
|
2457
2242
|
className: "cms-button cms-notification__action",
|
|
2458
2243
|
onClick: () => {
|
|
2459
|
-
var
|
|
2460
|
-
|
|
2244
|
+
var C;
|
|
2245
|
+
N(), (C = g.onAction) == null || C.call(g);
|
|
2461
2246
|
},
|
|
2462
2247
|
children: g.label
|
|
2463
2248
|
}
|
|
2464
2249
|
) : null
|
|
2465
2250
|
] });
|
|
2466
2251
|
}
|
|
2467
|
-
function
|
|
2468
|
-
return
|
|
2252
|
+
function Dt(e) {
|
|
2253
|
+
return e === "allowed" || e === "elevate" || e === "denied";
|
|
2469
2254
|
}
|
|
2470
|
-
function
|
|
2471
|
-
if (!
|
|
2255
|
+
function Nl(e, t) {
|
|
2256
|
+
if (!Dt(e))
|
|
2472
2257
|
return t.showRefused ? { offered: !0, locked: !1, refusal: "not available: the server gave an answer this app does not know", unknown: !0 } : { offered: !1, locked: !1, unknown: !0 };
|
|
2473
|
-
switch (
|
|
2258
|
+
switch (e) {
|
|
2474
2259
|
case "allowed":
|
|
2475
2260
|
return { offered: !0, locked: !1 };
|
|
2476
2261
|
case "elevate":
|
|
@@ -2479,223 +2264,223 @@ function _l(n, t) {
|
|
|
2479
2264
|
return t.showRefused ? { offered: !0, locked: !1, refusal: t.refusal ?? "not allowed" } : { offered: !1, locked: !1 };
|
|
2480
2265
|
}
|
|
2481
2266
|
}
|
|
2482
|
-
function
|
|
2483
|
-
if (!
|
|
2484
|
-
if (typeof
|
|
2485
|
-
const l =
|
|
2267
|
+
function It(e, t) {
|
|
2268
|
+
if (!e) return;
|
|
2269
|
+
if (typeof e.get == "function") return e.get(t) ?? void 0;
|
|
2270
|
+
const l = e, s = Object.keys(l).find((a) => a.toLowerCase() === t.toLowerCase());
|
|
2486
2271
|
return s === void 0 ? void 0 : l[s];
|
|
2487
2272
|
}
|
|
2488
|
-
function
|
|
2489
|
-
if (
|
|
2490
|
-
const t =
|
|
2273
|
+
function $t(e) {
|
|
2274
|
+
if (e && typeof e == "object") {
|
|
2275
|
+
const t = e;
|
|
2491
2276
|
if (typeof t.detail == "string" && t.detail !== "") return t.detail;
|
|
2492
2277
|
if (typeof t.title == "string" && t.title !== "") return t.title;
|
|
2493
2278
|
}
|
|
2494
2279
|
}
|
|
2495
|
-
function
|
|
2496
|
-
if (
|
|
2497
|
-
const a =
|
|
2498
|
-
return
|
|
2499
|
-
}
|
|
2500
|
-
const
|
|
2501
|
-
function
|
|
2502
|
-
window.dispatchEvent(new Event(
|
|
2503
|
-
}
|
|
2504
|
-
function
|
|
2505
|
-
const [t, l] = D(void 0), [s, a] = D(void 0), [
|
|
2506
|
-
|
|
2507
|
-
const
|
|
2508
|
-
const
|
|
2509
|
-
|
|
2280
|
+
function kl(e, t, l, s) {
|
|
2281
|
+
if (e !== 403) return { kind: "none" };
|
|
2282
|
+
const a = $t(l);
|
|
2283
|
+
return It(t, "X-Elevation-Required") !== void 0 ? s.elevates ? { kind: "elevation-required", message: a ?? "This needs an elevated session." } : { kind: "refused", message: "This can only be done in the admin, in an elevated session." } : { kind: "refused", message: a ?? "The server refused this." };
|
|
2284
|
+
}
|
|
2285
|
+
const sn = "coolms-kit:reread";
|
|
2286
|
+
function xl() {
|
|
2287
|
+
window.dispatchEvent(new Event(sn));
|
|
2288
|
+
}
|
|
2289
|
+
function Ml(e) {
|
|
2290
|
+
const [t, l] = D(void 0), [s, a] = D(void 0), [i, h] = D(!0), d = O(e);
|
|
2291
|
+
d.current = e;
|
|
2292
|
+
const u = O(0), b = Ie(() => {
|
|
2293
|
+
const c = ++u.current;
|
|
2294
|
+
h(!0), d.current().then(
|
|
2510
2295
|
(v) => {
|
|
2511
|
-
|
|
2296
|
+
c === u.current && (l(v), a(void 0), h(!1));
|
|
2512
2297
|
},
|
|
2513
2298
|
(v) => {
|
|
2514
|
-
|
|
2299
|
+
c === u.current && (a(v), h(!1));
|
|
2515
2300
|
}
|
|
2516
2301
|
);
|
|
2517
2302
|
}, []);
|
|
2518
|
-
return
|
|
2519
|
-
|
|
2520
|
-
const
|
|
2521
|
-
return window.addEventListener("focus",
|
|
2522
|
-
window.removeEventListener("focus",
|
|
2303
|
+
return Q(() => {
|
|
2304
|
+
b();
|
|
2305
|
+
const c = () => b();
|
|
2306
|
+
return window.addEventListener("focus", c), window.addEventListener(sn, c), () => {
|
|
2307
|
+
window.removeEventListener("focus", c), window.removeEventListener(sn, c);
|
|
2523
2308
|
};
|
|
2524
|
-
}, [
|
|
2309
|
+
}, [b]), { value: t, error: s, loading: i, reread: b };
|
|
2525
2310
|
}
|
|
2526
|
-
function
|
|
2527
|
-
return
|
|
2311
|
+
function Cl(e) {
|
|
2312
|
+
return e === 412 ? { conflict: !0, message: "Someone changed this since you opened it. Nothing was saved; read it again to see the change." } : { conflict: !1 };
|
|
2528
2313
|
}
|
|
2529
|
-
const
|
|
2530
|
-
function
|
|
2531
|
-
const l =
|
|
2314
|
+
const Bt = "/errors/client-update-required";
|
|
2315
|
+
function Ft(e, t) {
|
|
2316
|
+
const l = e.split(".").map((a) => Number.parseInt(a, 10) || 0), s = t.split(".").map((a) => Number.parseInt(a, 10) || 0);
|
|
2532
2317
|
for (let a = 0; a < Math.max(l.length, s.length); a++) {
|
|
2533
|
-
const
|
|
2534
|
-
if (
|
|
2318
|
+
const i = l[a] ?? 0, h = s[a] ?? 0;
|
|
2319
|
+
if (i !== h) return i < h;
|
|
2535
2320
|
}
|
|
2536
2321
|
return !1;
|
|
2537
2322
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return
|
|
2323
|
+
function Sl(e) {
|
|
2324
|
+
return e.problemType !== void 0 && e.problemType.endsWith(Bt) ? !0 : e.minimumVersion !== void 0 && Ft(e.version, e.minimumVersion);
|
|
2540
2325
|
}
|
|
2541
|
-
const ze = "primary",
|
|
2542
|
-
function
|
|
2543
|
-
const s =
|
|
2326
|
+
const ze = "primary", Mn = 4, Rt = 48;
|
|
2327
|
+
function Ht(e, t, l) {
|
|
2328
|
+
const s = e.querySelector(":scope > .cms-screen__bar");
|
|
2544
2329
|
return l <= t.scrollHeight - t.clientHeight - ((s == null ? void 0 : s.offsetHeight) ?? 0);
|
|
2545
2330
|
}
|
|
2546
|
-
const
|
|
2547
|
-
function
|
|
2331
|
+
const Ot = 800, Pt = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "PageDown", "PageUp", "Home", "End", " "]);
|
|
2332
|
+
function zt(e, t) {
|
|
2548
2333
|
const [l, s] = D(!1);
|
|
2549
|
-
return
|
|
2550
|
-
const a =
|
|
2334
|
+
return Q(() => {
|
|
2335
|
+
const a = e.current;
|
|
2551
2336
|
if (a === null || !t) {
|
|
2552
2337
|
s(!1);
|
|
2553
2338
|
return;
|
|
2554
2339
|
}
|
|
2555
|
-
const
|
|
2556
|
-
let
|
|
2557
|
-
const
|
|
2558
|
-
|
|
2559
|
-
},
|
|
2560
|
-
const
|
|
2561
|
-
!(
|
|
2562
|
-
},
|
|
2563
|
-
const
|
|
2564
|
-
if (!(
|
|
2565
|
-
const r =
|
|
2566
|
-
if (
|
|
2340
|
+
const i = /* @__PURE__ */ new WeakMap();
|
|
2341
|
+
let h = Number.NEGATIVE_INFINITY, d = null;
|
|
2342
|
+
const u = (m) => {
|
|
2343
|
+
h = performance.now(), d = m.target;
|
|
2344
|
+
}, b = (m) => {
|
|
2345
|
+
const N = m.target;
|
|
2346
|
+
!(N instanceof HTMLElement && (N.isContentEditable || N.closest("input, textarea, select") !== null)) && Pt.has(m.key) && u(m);
|
|
2347
|
+
}, c = (m) => {
|
|
2348
|
+
const N = m.target;
|
|
2349
|
+
if (!(N instanceof HTMLElement)) return;
|
|
2350
|
+
const r = N.scrollTop, g = i.get(N) ?? 0;
|
|
2351
|
+
if (i.set(N, r), r <= 0) {
|
|
2567
2352
|
s(!1);
|
|
2568
2353
|
return;
|
|
2569
2354
|
}
|
|
2570
|
-
performance.now() -
|
|
2571
|
-
}, v = [["wheel",
|
|
2572
|
-
for (const [
|
|
2573
|
-
return a.addEventListener("scroll",
|
|
2574
|
-
for (const [
|
|
2575
|
-
a.removeEventListener("scroll",
|
|
2355
|
+
performance.now() - h > Ot || !(d === a || d === document.body || d instanceof Node && N.contains(d)) || (r < g - Mn ? s(!1) : r > g + Mn && r > Rt && Ht(a, N, r) && s(!0));
|
|
2356
|
+
}, v = [["wheel", u], ["touchmove", u], ["pointerdown", u], ["keydown", b]];
|
|
2357
|
+
for (const [m, N] of v) a.addEventListener(m, N, { capture: !0, passive: !0 });
|
|
2358
|
+
return a.addEventListener("scroll", c, { capture: !0, passive: !0 }), () => {
|
|
2359
|
+
for (const [m, N] of v) a.removeEventListener(m, N, { capture: !0 });
|
|
2360
|
+
a.removeEventListener("scroll", c, { capture: !0 });
|
|
2576
2361
|
};
|
|
2577
|
-
}, [
|
|
2362
|
+
}, [e, t]), [l, s];
|
|
2578
2363
|
}
|
|
2579
|
-
const
|
|
2580
|
-
function
|
|
2581
|
-
const
|
|
2582
|
-
return
|
|
2364
|
+
const Ut = 64;
|
|
2365
|
+
function Kt({ bar: e, leading: t, gap: l, icon: s, iconGap: a, search: i, more: h, globals: d, name: u, choice: b }) {
|
|
2366
|
+
const c = [...i ? [s] : [], s, s, ...d], v = c.reduce((N, r) => N + r, 0) + a * (c.length - 1);
|
|
2367
|
+
return e - (t > 0 ? t + l : 0) - l - v + 0.01 < Math.min(Ut, u) + b;
|
|
2583
2368
|
}
|
|
2584
|
-
function
|
|
2369
|
+
function El({ title: e, back: t, navigation: l, search: s, searching: a, more: i = [], moreLabel: h = "More actions", globals: d, filter: u, primary: b, onRefresh: c, pullText: v, barHidden: m, children: N }) {
|
|
2585
2370
|
var Te, Ee;
|
|
2586
|
-
const r =
|
|
2587
|
-
|
|
2588
|
-
const
|
|
2589
|
-
...
|
|
2371
|
+
const r = b === void 0 || ("menu" in b ? !b.menu.some((R) => R.offer.offered) : ((Te = b.offer) == null ? void 0 : Te.offered) === !1) ? void 0 : b, g = r !== void 0 && !("menu" in r) ? ((Ee = r.offer) == null ? void 0 : Ee.refusal) ?? null : null, T = he(), [C, S] = D(!1), x = dn(), _ = O(null), y = O(null), [I, U] = D(!1), [P, k] = D(null), [B, z] = D(null), j = Ie(() => z(null), []), K = O(!1), G = O(null), Y = O(null), ee = O(null), ie = i.some((R) => R.offer.offered), be = B !== null && ie && a === void 0;
|
|
2372
|
+
Dn(u);
|
|
2373
|
+
const ce = u === void 0 ? null : An(u), [de, Ce] = D(!1), fe = O(!1), te = O(!1), pe = O(null), _e = u === void 0 ? void 0 : {
|
|
2374
|
+
...u,
|
|
2590
2375
|
onChange: (R) => {
|
|
2591
|
-
|
|
2376
|
+
fe.current = !0, u.onChange(R);
|
|
2592
2377
|
}
|
|
2593
|
-
},
|
|
2594
|
-
const R =
|
|
2595
|
-
if (R === null ||
|
|
2596
|
-
const
|
|
2378
|
+
}, we = ce === null ? "" : ` · ${ce.label}`, ne = u !== void 0 && u.options.length >= 2, [ye, w] = D(!1), E = ne && ie && ye, W = JSON.stringify([ne, ie, E, s !== void 0, a !== void 0, t !== void 0, e, we]), q = Ie(() => {
|
|
2379
|
+
const R = G.current, X = Y.current, Ne = ee.current;
|
|
2380
|
+
if (R === null || X === null || Ne === null || !ne) return null;
|
|
2381
|
+
const oe = (J) => parseFloat(J) || 0, o = getComputedStyle(R), A = R.getBoundingClientRect().width;
|
|
2597
2382
|
if (A === 0) return null;
|
|
2598
|
-
const
|
|
2383
|
+
const M = (J) => {
|
|
2599
2384
|
var ke;
|
|
2600
|
-
return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${
|
|
2601
|
-
},
|
|
2602
|
-
return
|
|
2603
|
-
bar: A -
|
|
2604
|
-
leading:
|
|
2605
|
-
gap:
|
|
2385
|
+
return ((ke = R.querySelector(`.cms-screen__ruler > [data-ruler="${J}"]`)) == null ? void 0 : ke.getBoundingClientRect().width) ?? 0;
|
|
2386
|
+
}, H = R.querySelector(".cms-screen__leading"), le = (s !== void 0 ? 1 : 0) + (E ? 0 : 1) + 1;
|
|
2387
|
+
return Kt({
|
|
2388
|
+
bar: A - oe(o.paddingLeft) - oe(o.paddingRight),
|
|
2389
|
+
leading: H === null || H.childNodes.length === 0 ? 0 : oe(getComputedStyle(H).minWidth),
|
|
2390
|
+
gap: oe(o.columnGap),
|
|
2606
2391
|
icon: Ne.getBoundingClientRect().width,
|
|
2607
|
-
iconGap:
|
|
2392
|
+
iconGap: oe(getComputedStyle(X).columnGap),
|
|
2608
2393
|
search: s !== void 0,
|
|
2609
2394
|
more: !0,
|
|
2610
|
-
globals: Array.from(
|
|
2611
|
-
name:
|
|
2612
|
-
choice:
|
|
2395
|
+
globals: Array.from(X.children).slice(le).map((J) => J.getBoundingClientRect().width),
|
|
2396
|
+
name: M("name"),
|
|
2397
|
+
choice: M("choice")
|
|
2613
2398
|
});
|
|
2614
|
-
}, [
|
|
2399
|
+
}, [W]);
|
|
2615
2400
|
$e(() => {
|
|
2616
|
-
const R =
|
|
2617
|
-
R !==
|
|
2618
|
-
}, [
|
|
2619
|
-
if (
|
|
2401
|
+
const R = q() ?? ye;
|
|
2402
|
+
R !== ye && fe.current && (te.current = !0), fe.current = !1, w(R);
|
|
2403
|
+
}, [q]), Q(() => {
|
|
2404
|
+
if (G.current === null || typeof ResizeObserver > "u") return;
|
|
2620
2405
|
const R = new ResizeObserver(() => {
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2406
|
+
const X = q();
|
|
2407
|
+
X !== null && w(X);
|
|
2623
2408
|
});
|
|
2624
|
-
for (const
|
|
2409
|
+
for (const X of [G.current, Y.current, ...G.current.querySelectorAll(".cms-screen__ruler > span")]) X !== null && R.observe(X);
|
|
2625
2410
|
return () => R.disconnect();
|
|
2626
|
-
}, [
|
|
2627
|
-
const p =
|
|
2411
|
+
}, [q]);
|
|
2412
|
+
const p = O(E);
|
|
2628
2413
|
$e(() => {
|
|
2629
|
-
var Ne,
|
|
2630
|
-
if (p.current ===
|
|
2631
|
-
p.current =
|
|
2414
|
+
var Ne, oe, o;
|
|
2415
|
+
if (p.current === E) return;
|
|
2416
|
+
p.current = E, z(null);
|
|
2632
2417
|
const R = document.activeElement;
|
|
2633
|
-
(R === document.body &&
|
|
2634
|
-
}, [
|
|
2635
|
-
const L =
|
|
2636
|
-
I || (
|
|
2637
|
-
}),
|
|
2638
|
-
return /* @__PURE__ */
|
|
2418
|
+
(R === document.body && pe.current !== null && !pe.current.isConnected || te.current && (R === document.body || ((Ne = G.current) == null ? void 0 : Ne.contains(R)) === !0)) && ((o = E ? ee.current : (oe = Y.current) == null ? void 0 : oe.querySelector(".cms-filter-menu")) == null || o.focus()), te.current = !1;
|
|
2419
|
+
}, [E]);
|
|
2420
|
+
const L = E && ce !== null && u !== void 0 ? `${h}, ${Tn(u)}` : h, ue = dt(y, c === void 0 ? null : () => {
|
|
2421
|
+
I || (U(!0), c().finally(() => U(!1)));
|
|
2422
|
+
}), ae = c === void 0 ? null : { distance: ue, refreshing: I, text: v ?? null }, me = a !== void 0 || ue > 0 || I || be || de, [Se, We] = zt(_, m === void 0 && !me), Fe = !me && (m ?? Se);
|
|
2423
|
+
return /* @__PURE__ */ f(
|
|
2639
2424
|
"div",
|
|
2640
2425
|
{
|
|
2641
|
-
ref:
|
|
2642
|
-
className:
|
|
2426
|
+
ref: _,
|
|
2427
|
+
className: F("cms-screen", r !== void 0 && "cms-screen--with-primary"),
|
|
2643
2428
|
"data-bar-hidden": Fe ? "" : void 0,
|
|
2644
2429
|
onFocus: (R) => {
|
|
2645
|
-
|
|
2430
|
+
pe.current = R.target, Fe && R.target instanceof Element && R.target.closest(".cms-screen__bar") !== null && We(!1);
|
|
2646
2431
|
},
|
|
2647
2432
|
children: [
|
|
2648
|
-
a !== void 0 ? /* @__PURE__ */
|
|
2649
|
-
/* @__PURE__ */
|
|
2650
|
-
/* @__PURE__ */
|
|
2651
|
-
] }) : /* @__PURE__ */
|
|
2652
|
-
/* @__PURE__ */
|
|
2653
|
-
/* @__PURE__ */
|
|
2654
|
-
/* @__PURE__ */
|
|
2655
|
-
] }) : /* @__PURE__ */
|
|
2656
|
-
/* @__PURE__ */
|
|
2657
|
-
/* @__PURE__ */
|
|
2433
|
+
a !== void 0 ? /* @__PURE__ */ f("header", { className: "cms-screen__bar cms-screen__bar--searching", children: [
|
|
2434
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": a.closeLabel, title: a.closeLabel, onClick: a.onClose, children: /* @__PURE__ */ n($, { name: "chevron-left" }) }),
|
|
2435
|
+
/* @__PURE__ */ n("div", { className: "cms-screen__search", children: a.field })
|
|
2436
|
+
] }) : /* @__PURE__ */ f("header", { ref: G, className: "cms-screen__bar", children: [
|
|
2437
|
+
/* @__PURE__ */ n("div", { className: "cms-screen__leading", children: t !== void 0 ? t.href !== void 0 ? /* @__PURE__ */ f("a", { className: "cms-screen__back", href: t.href, onClick: t.onBack, children: [
|
|
2438
|
+
/* @__PURE__ */ n($, { name: "chevron-left" }),
|
|
2439
|
+
/* @__PURE__ */ n("span", { className: "cms-screen__back-name", children: t.label })
|
|
2440
|
+
] }) : /* @__PURE__ */ f("button", { type: "button", className: "cms-screen__back", onClick: t.onBack, children: [
|
|
2441
|
+
/* @__PURE__ */ n($, { name: "chevron-left" }),
|
|
2442
|
+
/* @__PURE__ */ n("span", { className: "cms-screen__back-name", children: t.label })
|
|
2658
2443
|
] }) : l }),
|
|
2659
|
-
|
|
2660
|
-
/* @__PURE__ */
|
|
2661
|
-
/* @__PURE__ */
|
|
2662
|
-
/* @__PURE__ */
|
|
2444
|
+
ce === null ? /* @__PURE__ */ n("h1", { className: "cms-screen__title", title: e, children: e }) : /* @__PURE__ */ f("h1", { className: "cms-screen__title cms-screen__title--filtered", title: e + we, children: [
|
|
2445
|
+
/* @__PURE__ */ f("span", { className: "cms-screen__title-place", children: [
|
|
2446
|
+
/* @__PURE__ */ n("span", { className: "cms-screen__title-name", children: e }),
|
|
2447
|
+
/* @__PURE__ */ n("span", { className: "cms-screen__title-dot", children: " · " })
|
|
2663
2448
|
] }),
|
|
2664
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ n("span", { className: "cms-screen__title-choice", children: ce.label })
|
|
2665
2450
|
] }),
|
|
2666
|
-
|
|
2667
|
-
/* @__PURE__ */
|
|
2668
|
-
|
|
2451
|
+
ne && ie ? /* @__PURE__ */ f("span", { className: "cms-screen__ruler", "aria-hidden": "true", children: [
|
|
2452
|
+
/* @__PURE__ */ n("span", { "data-ruler": "name", children: e }),
|
|
2453
|
+
ce !== null ? /* @__PURE__ */ n("span", { "data-ruler": "choice", children: we }) : null
|
|
2669
2454
|
] }) : null,
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
s !== void 0 ? /* @__PURE__ */
|
|
2672
|
-
|
|
2673
|
-
|
|
2455
|
+
/* @__PURE__ */ f("div", { ref: Y, className: "cms-screen__trailing", children: [
|
|
2456
|
+
s !== void 0 ? /* @__PURE__ */ n("button", { type: "button", className: "cms-icon-button cms-screen__icon", "aria-label": s.label, title: s.label, onClick: s.onOpen, children: /* @__PURE__ */ n($, { name: "search" }) }) : null,
|
|
2457
|
+
_e !== void 0 && !E ? /* @__PURE__ */ n(In, { ..._e, iconOnly: !0, onOpenChange: Ce }) : null,
|
|
2458
|
+
ie ? /* @__PURE__ */ n(
|
|
2674
2459
|
"button",
|
|
2675
2460
|
{
|
|
2676
|
-
ref:
|
|
2461
|
+
ref: ee,
|
|
2677
2462
|
type: "button",
|
|
2678
|
-
className:
|
|
2463
|
+
className: F("cms-icon-button cms-screen__icon", E && ce !== null && "cms-screen__icon--active"),
|
|
2679
2464
|
"data-action": "more",
|
|
2680
2465
|
"aria-haspopup": "menu",
|
|
2681
2466
|
"aria-expanded": be,
|
|
2682
2467
|
"aria-label": L,
|
|
2683
2468
|
title: L,
|
|
2684
2469
|
onMouseDown: () => {
|
|
2685
|
-
|
|
2470
|
+
K.current = be;
|
|
2686
2471
|
},
|
|
2687
2472
|
onClick: (R) => {
|
|
2688
|
-
const
|
|
2689
|
-
|
|
2473
|
+
const X = R.currentTarget.getBoundingClientRect();
|
|
2474
|
+
z(K.current ? null : { x: X.left, y: X.bottom + 4 }), K.current = !1;
|
|
2690
2475
|
},
|
|
2691
|
-
children: /* @__PURE__ */
|
|
2476
|
+
children: /* @__PURE__ */ n($, { name: "more" })
|
|
2692
2477
|
}
|
|
2693
2478
|
) : null,
|
|
2694
|
-
|
|
2479
|
+
d
|
|
2695
2480
|
] })
|
|
2696
2481
|
] }),
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
r !== void 0 ? /* @__PURE__ */
|
|
2482
|
+
/* @__PURE__ */ n("div", { ref: y, className: "cms-screen__content", "data-pulling": ue > 0 ? "" : void 0, "data-refreshing": I ? "" : void 0, children: /* @__PURE__ */ n(En.Provider, { value: ae, children: N }) }),
|
|
2483
|
+
r !== void 0 ? /* @__PURE__ */ f(
|
|
2699
2484
|
"button",
|
|
2700
2485
|
{
|
|
2701
2486
|
type: "button",
|
|
@@ -2704,118 +2489,118 @@ function Nl({ title: n, back: t, navigation: l, search: s, searching: a, more: c
|
|
|
2704
2489
|
...g === null ? { title: r.label } : {
|
|
2705
2490
|
"aria-disabled": !0,
|
|
2706
2491
|
"aria-describedby": T,
|
|
2707
|
-
...
|
|
2708
|
-
...
|
|
2492
|
+
...C ? { "data-reason-shown": "" } : {},
|
|
2493
|
+
...x.dismissed(ze) ? { "data-tip-dismissed": "" } : {}
|
|
2709
2494
|
},
|
|
2710
|
-
..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded":
|
|
2711
|
-
onFocus: () =>
|
|
2495
|
+
..."menu" in r ? { "aria-haspopup": "menu", "aria-expanded": P !== null } : {},
|
|
2496
|
+
onFocus: () => x.focusIn(ze),
|
|
2712
2497
|
onBlur: () => {
|
|
2713
|
-
|
|
2498
|
+
S(!1), x.focusOut(ze);
|
|
2714
2499
|
},
|
|
2715
|
-
onMouseEnter: () =>
|
|
2716
|
-
onMouseLeave: () =>
|
|
2500
|
+
onMouseEnter: () => x.pointerIn(ze),
|
|
2501
|
+
onMouseLeave: () => x.pointerOut(ze),
|
|
2717
2502
|
onKeyDown: (R) => {
|
|
2718
|
-
R.key === "Escape" && g !== null && (
|
|
2503
|
+
R.key === "Escape" && g !== null && (S(!1), x.dismiss(ze));
|
|
2719
2504
|
},
|
|
2720
2505
|
onClick: (R) => {
|
|
2721
2506
|
if (g !== null)
|
|
2722
|
-
|
|
2507
|
+
S(!0), x.show(ze);
|
|
2723
2508
|
else if ("menu" in r) {
|
|
2724
|
-
const
|
|
2725
|
-
k(
|
|
2509
|
+
const X = R.currentTarget.getBoundingClientRect();
|
|
2510
|
+
k(P === null ? { x: X.left, y: X.top } : null);
|
|
2726
2511
|
} else
|
|
2727
2512
|
r.onPress();
|
|
2728
2513
|
},
|
|
2729
2514
|
children: [
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
g !== null ? /* @__PURE__ */
|
|
2515
|
+
/* @__PURE__ */ n($, { name: r.icon, size: 24 }),
|
|
2516
|
+
g !== null ? /* @__PURE__ */ n("span", { className: "cms-screen__tip", role: "tooltip", id: T, children: g }) : null
|
|
2732
2517
|
]
|
|
2733
2518
|
}
|
|
2734
2519
|
) : null,
|
|
2735
|
-
/* @__PURE__ */
|
|
2520
|
+
/* @__PURE__ */ n(
|
|
2736
2521
|
Ke,
|
|
2737
2522
|
{
|
|
2738
|
-
at: be ?
|
|
2739
|
-
items:
|
|
2740
|
-
onClose:
|
|
2741
|
-
label:
|
|
2523
|
+
at: be ? B : null,
|
|
2524
|
+
items: E && _e !== void 0 ? [...i, ...Ln(_e, _e.label)] : i,
|
|
2525
|
+
onClose: j,
|
|
2526
|
+
label: h,
|
|
2742
2527
|
focus: "first"
|
|
2743
2528
|
}
|
|
2744
2529
|
),
|
|
2745
|
-
r !== void 0 && "menu" in r ? /* @__PURE__ */
|
|
2530
|
+
r !== void 0 && "menu" in r ? /* @__PURE__ */ n(Ke, { at: P, items: r.menu, onClose: () => k(null), label: r.label }) : null
|
|
2746
2531
|
]
|
|
2747
2532
|
}
|
|
2748
2533
|
);
|
|
2749
2534
|
}
|
|
2750
2535
|
export {
|
|
2751
|
-
|
|
2536
|
+
cl as AppShell,
|
|
2752
2537
|
Ye as Avatar,
|
|
2753
|
-
|
|
2754
|
-
|
|
2538
|
+
vn as BOOTSTRAP_ICONS,
|
|
2539
|
+
Nt as Badge,
|
|
2755
2540
|
De as Button,
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2541
|
+
mn as CALL_LABELS,
|
|
2542
|
+
Bt as CLIENT_UPDATE_REQUIRED,
|
|
2543
|
+
bl as CallBar,
|
|
2544
|
+
pl as CallPanel,
|
|
2545
|
+
ml as ChatBubble,
|
|
2546
|
+
al as Column,
|
|
2547
|
+
hl as Composer,
|
|
2548
|
+
Jt as ConfirmDialog,
|
|
2764
2549
|
Ke as ContextMenu,
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2550
|
+
jn as EmptyState,
|
|
2551
|
+
Yn as ErrorBanner,
|
|
2552
|
+
Ct as FILTER_MENU_LABELS,
|
|
2553
|
+
tl as FilePicker,
|
|
2554
|
+
at as FilePickerDenied,
|
|
2555
|
+
rt as FilePickerRestart,
|
|
2556
|
+
nl as FileViewer,
|
|
2557
|
+
Et as FilterMenu,
|
|
2558
|
+
qt as ICON_NAMES,
|
|
2559
|
+
$ as Icon,
|
|
2560
|
+
fl as IncomingCall,
|
|
2561
|
+
ll as List,
|
|
2562
|
+
gl as ListHead,
|
|
2563
|
+
Gn as Loading,
|
|
2564
|
+
xt as MAIL_ROW_LABELS,
|
|
2565
|
+
qn as MODAL_CLOSE_MS,
|
|
2566
|
+
ul as MailRow,
|
|
2567
|
+
Sn as Modal,
|
|
2568
|
+
Cn as NamedIcon,
|
|
2569
|
+
yl as Notification,
|
|
2570
|
+
nn as PULL_AT,
|
|
2571
|
+
rl as PageHeader,
|
|
2572
|
+
wl as PaneToolbar,
|
|
2573
|
+
Mt as SIGN_IN_LABELS,
|
|
2574
|
+
en as STATE_DELAY_MS,
|
|
2575
|
+
El as ScreenShell,
|
|
2576
|
+
ol as SearchField,
|
|
2577
|
+
sl as SectionHeader,
|
|
2578
|
+
Yt as Select,
|
|
2579
|
+
vl as SignInForm,
|
|
2580
|
+
_l as SignInLayout,
|
|
2581
|
+
dl as SplitPanes,
|
|
2582
|
+
yt as Splitter,
|
|
2798
2583
|
Le as State,
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2584
|
+
il as TabStrip,
|
|
2585
|
+
jt as TextArea,
|
|
2586
|
+
Gt as TextField,
|
|
2587
|
+
Qt as Toast,
|
|
2588
|
+
el as ToastRegion,
|
|
2589
|
+
Xt as Toggle,
|
|
2590
|
+
kt as fitPanes,
|
|
2806
2591
|
Be as iconForName,
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2592
|
+
bt as initialsOf,
|
|
2593
|
+
Dt as isCapability,
|
|
2594
|
+
Sl as needsClientUpdate,
|
|
2595
|
+
Nl as offerFor,
|
|
2596
|
+
Cl as readConflict,
|
|
2597
|
+
kl as readRefusal,
|
|
2598
|
+
$t as refusalText,
|
|
2599
|
+
xl as rereadAll,
|
|
2600
|
+
_t as tintOf,
|
|
2601
|
+
dt as usePull,
|
|
2602
|
+
ut as usePullState,
|
|
2603
|
+
Ml as useReread,
|
|
2604
|
+
Ft as versionBelow,
|
|
2605
|
+
Zn as writtenOut
|
|
2821
2606
|
};
|