@telia-ace/knowledge-widget-bot-provider 0.0.24 → 1.1.1-rc.0

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.
Files changed (54) hide show
  1. package/contact-method-a18f6436.mjs +896 -0
  2. package/contact-method-a9506b8c.js +99 -0
  3. package/contact-method-list-814eb03f.mjs +97 -0
  4. package/contact-method-list-b5815c14.js +28 -0
  5. package/feedback-list-04b512a4.mjs +80 -0
  6. package/feedback-list-e7973adc.js +25 -0
  7. package/index-07363705.js +1214 -0
  8. package/index-373df3a5.js +6 -0
  9. package/index-5c9c2abf.mjs +883 -0
  10. package/index-cc31f772.mjs +10810 -0
  11. package/index.js +1 -0
  12. package/index.mjs +7 -0
  13. package/no-good-alternative-2d562ff9.mjs +53 -0
  14. package/no-good-alternative-d31e7d52.js +15 -0
  15. package/notification-list-291a2001.mjs +1449 -0
  16. package/notification-list-876b3f3d.js +546 -0
  17. package/notification-list-9fca63ae.mjs +53 -0
  18. package/notification-list-f9c4cafe.js +8 -0
  19. package/package.json +20 -42
  20. package/styles-15c941d4.js +4 -0
  21. package/{dist/styles.a00306c5.js → styles-ad5c7069.mjs} +3 -4
  22. package/use-dispatch-951d7a5c.js +1 -0
  23. package/use-dispatch-97d3af39.mjs +24 -0
  24. package/{dist/utils.d.ts → utils.d.ts} +1 -1
  25. package/LICENSE.txt +0 -6
  26. package/README.md +0 -12
  27. package/dist/contact-method-list.4fcc98f1.js +0 -128
  28. package/dist/contact-method-list.4fcc98f1.js.map +0 -1
  29. package/dist/contact-method.4e96a7d4.js +0 -136
  30. package/dist/contact-method.4e96a7d4.js.map +0 -1
  31. package/dist/feedback-list.ff7e22da.js +0 -77
  32. package/dist/feedback-list.ff7e22da.js.map +0 -1
  33. package/dist/index.483ca2e8.js +0 -795
  34. package/dist/index.483ca2e8.js.map +0 -1
  35. package/dist/index.js +0 -9
  36. package/dist/index.js.map +0 -1
  37. package/dist/no-good-alternative.e9155cb9.js +0 -50
  38. package/dist/no-good-alternative.e9155cb9.js.map +0 -1
  39. package/dist/notification-list.7fd5ba2b.js +0 -67
  40. package/dist/notification-list.7fd5ba2b.js.map +0 -1
  41. package/dist/styles.a00306c5.js.map +0 -1
  42. /package/{dist/entry-handler.d.ts → entry-handler.d.ts} +0 -0
  43. /package/{dist/http-client.d.ts → http-client.d.ts} +0 -0
  44. /package/{dist/index.d.ts → index.d.ts} +0 -0
  45. /package/{dist/plugin.d.ts → plugin.d.ts} +0 -0
  46. /package/{dist/provider.d.ts → provider.d.ts} +0 -0
  47. /package/{dist/store.d.ts → store.d.ts} +0 -0
  48. /package/{dist/types.d.ts → types.d.ts} +0 -0
  49. /package/{dist/ui → ui}/contact-method-list.d.ts +0 -0
  50. /package/{dist/ui → ui}/contact-method.d.ts +0 -0
  51. /package/{dist/ui → ui}/feedback-list.d.ts +0 -0
  52. /package/{dist/ui → ui}/no-good-alternative.d.ts +0 -0
  53. /package/{dist/ui → ui}/notification-list.d.ts +0 -0
  54. /package/{dist/ui → ui}/styles.d.ts +0 -0
@@ -0,0 +1,1449 @@
1
+ import { jsx as n, jsxs as y, Fragment as ne } from "react/jsx-runtime";
2
+ import { u as se, x as Ye, a as Ee, e as S, L as Fe, m as F, n as f, o as V, p as le, r as me, I as j, i as P, h as G, c as $, y as ce, B as J, z as Q, A as Ae, d as z, S as R, D as de, E as K, G as je, b as U, J as fe, P as Pe, g as Le } from "./index-cc31f772.mjs";
3
+ import { useState as L, useEffect as M, forwardRef as O, useCallback as I, useMemo as Oe, useRef as _e, useImperativeHandle as Be } from "react";
4
+ import "react-dom";
5
+ function A(e = {}) {
6
+ const {
7
+ phrase: t = "",
8
+ category: o,
9
+ guideCategory: i,
10
+ contactCategory: r,
11
+ take: s,
12
+ connectionKey: l,
13
+ accordion: d,
14
+ id: c,
15
+ uriName: u,
16
+ sorting: h,
17
+ tag: m,
18
+ tagId: g,
19
+ tagTitle: v,
20
+ ...b
21
+ } = e, a = {};
22
+ return Object.keys(b).forEach((x) => {
23
+ typeof e[x] == "string" && (a[x] = e[x]);
24
+ }), typeof t == "string" && t.length && (a.phrase = t), t === null && (a.phrase = t), typeof i == "string" && i !== "0" && (a.guideCategory = i), typeof i == "number" && i !== 0 && (a.guideCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (a.guideCategory = i.id), typeof i.id == "number" && i.id !== 0 && (a.guideCategory = i.id)), typeof r == "string" && r !== "0" && (a.contactCategory = r), typeof r == "number" && r !== 0 && (a.contactCategory = r), typeof r == "object" && r !== null && (typeof r.id == "string" && r.id !== "0" && (a.contactCategory = r.id), typeof r.id == "number" && r.id !== 0 && (a.contactCategory = r.id)), typeof o == "string" && o !== "0" && (a.category = o), typeof o == "number" && o !== 0 && (a.category = o), typeof o == "object" && o !== null && (typeof o.id == "string" && o.id !== "0" && (a.category = o.id), typeof o.id == "number" && o.id !== 0 && (a.category = o.id)), c && (a.id = c), u && (+a.category || +a.guideCategory || +a.guide || +a.contactCategory || +a.contactMethod) && (a.uriName = u), l && (a.connectionKey = l), s && (a.take = s), h && (a.sorting = h), typeof d == "string" && d.length > 0 && (a.accordion = d), typeof m == "string" && m !== "0" && (a.tag = m), typeof m == "number" && m !== 0 && (a.tag = m), Array.isArray(m) && m.length && (a.tag = m), (typeof g == "string" || typeof g == "number") && (a.tagId = g), typeof v == "string" && (a.tagTitle = v), typeof a.tag == "string" && (a.tag = a.tag.split(",")), a;
25
+ }
26
+ const X = (e) => {
27
+ if (!e)
28
+ return "";
29
+ const t = [
30
+ { from: /[äæǽ]+/gi, to: "ae" },
31
+ { from: /[öœ]+/gi, to: "oe" },
32
+ { from: /[ü]+/gi, to: "ue" },
33
+ { from: /[Ä]+/gi, to: "Ae" },
34
+ { from: /[Ü]+/gi, to: "Ue" },
35
+ { from: /[Ö]+/gi, to: "Oe" },
36
+ { from: /[ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА]+/gi, to: "A" },
37
+ { from: /[àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа]+/gi, to: "a" },
38
+ { from: /[Б]+/gi, to: "B" },
39
+ { from: /[б]+/gi, to: "b" },
40
+ { from: /[ÇĆĈĊČ]+/gi, to: "C" },
41
+ { from: /[çćĉċč]+/gi, to: "c" },
42
+ { from: /[Д]+/gi, to: "D" },
43
+ { from: /[д]+/gi, to: "d" },
44
+ { from: /[ÐĎĐΔ]+/gi, to: "Dj" },
45
+ { from: /[ðďđδ]+/gi, to: "dj" },
46
+ { from: /[ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ]+/gi, to: "E" },
47
+ { from: /[èéêëēĕėęěέεẽẻẹềếễểệеэ]+/gi, to: "e" },
48
+ { from: /[Ф]+/gi, to: "F" },
49
+ { from: /[ф]+/gi, to: "f" },
50
+ { from: /[ĜĞĠĢΓГҐ]+/gi, to: "G" },
51
+ { from: /[ĝğġģγгґ]+/gi, to: "g" },
52
+ { from: /[ĤĦ]+/gi, to: "H" },
53
+ { from: /[ĥħ]+/gi, to: "h" },
54
+ { from: /[ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ]+/gi, to: "I" },
55
+ { from: /[ìíîïĩīĭǐįıηήίιϊỉịиыї]+/gi, to: "i" },
56
+ { from: /[Ĵ]+/gi, to: "J" },
57
+ { from: /[ĵ]+/gi, to: "j" },
58
+ { from: /[ĶΚК]+/gi, to: "K" },
59
+ { from: /[ķκк]+/gi, to: "k" },
60
+ { from: /[ĹĻĽĿŁΛЛ]+/gi, to: "L" },
61
+ { from: /[ĺļľŀłλл]+/gi, to: "l" },
62
+ { from: /[М]+/gi, to: "M" },
63
+ { from: /[м]+/gi, to: "m" },
64
+ { from: /[ÑŃŅŇΝН]+/gi, to: "N" },
65
+ { from: /[ñńņňʼnνн]+/gi, to: "n" },
66
+ { from: /[ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО]+/gi, to: "O" },
67
+ { from: /[òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо]+/gi, to: "o" },
68
+ { from: /[П]+/gi, to: "P" },
69
+ { from: /[п]+/gi, to: "p" },
70
+ { from: /[ŔŖŘΡР]+/gi, to: "R" },
71
+ { from: /[ŕŗřρр]+/gi, to: "r" },
72
+ { from: /[ŚŜŞȘŠΣС]+/gi, to: "S" },
73
+ { from: /[śŝşșšſσςс]+/gi, to: "s" },
74
+ { from: /[ȚŢŤŦτТ]+/gi, to: "T" },
75
+ { from: /[țţťŧт]+/gi, to: "t" },
76
+ { from: /[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ]+/gi, to: "U" },
77
+ { from: /[ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу]+/gi, to: "u" },
78
+ { from: /[ÝŸŶΥΎΫỲỸỶỴЙ]+/gi, to: "Y" },
79
+ { from: /[ýÿŷỳỹỷỵй]+/gi, to: "y" },
80
+ { from: /[В]+/gi, to: "V" },
81
+ { from: /[в]+/gi, to: "v" },
82
+ { from: /[Ŵ]+/gi, to: "W" },
83
+ { from: /[ŵ]+/gi, to: "w" },
84
+ { from: /[ŹŻŽΖЗ]+/gi, to: "Z" },
85
+ { from: /[źżžζз]+/gi, to: "z" },
86
+ { from: /[ÆǼ]+/gi, to: "AE" },
87
+ { from: /[ß]+/gi, to: "ss" },
88
+ { from: /[IJ]+/gi, to: "IJ" },
89
+ { from: /[ij]+/gi, to: "ij" },
90
+ { from: /[Œ]+/gi, to: "OE" },
91
+ { from: /[ƒ]+/gi, to: "f" },
92
+ { from: /[ξ]+/gi, to: "ks" },
93
+ { from: /[π]+/gi, to: "p" },
94
+ { from: /[β]+/gi, to: "v" },
95
+ { from: /[μ]+/gi, to: "m" },
96
+ { from: /[ψ]+/gi, to: "ps" },
97
+ { from: /[Ё]+/gi, to: "Yo" },
98
+ { from: /[ё]+/gi, to: "yo" },
99
+ { from: /[Є]+/gi, to: "Ye" },
100
+ { from: /[є]+/gi, to: "ye" },
101
+ { from: /[Ї]+/gi, to: "Yi" },
102
+ { from: /[Ж]+/gi, to: "Zh" },
103
+ { from: /[ж]+/gi, to: "zh" },
104
+ { from: /[Х]+/gi, to: "Kh" },
105
+ { from: /[х]+/gi, to: "kh" },
106
+ { from: /[Ц]+/gi, to: "Ts" },
107
+ { from: /[ц]+/gi, to: "ts" },
108
+ { from: /[Ч]+/gi, to: "Ch" },
109
+ { from: /[ч]+/gi, to: "ch" },
110
+ { from: /[Ш]+/gi, to: "Sh" },
111
+ { from: /[ш]+/gi, to: "sh" },
112
+ { from: /[Щ]+/gi, to: "Shch" },
113
+ { from: /[щ]+/gi, to: "shch" },
114
+ { from: /[ЪъЬь]+/gi, to: "" },
115
+ { from: /[Ю]+/gi, to: "Yu" },
116
+ { from: /[ю]+/gi, to: "yu" },
117
+ { from: /[Я]+/gi, to: "Ya" },
118
+ { from: /[я]+/gi, to: "ya" }
119
+ ], o = /[^a-zA-Z0-9]+/g, i = /[-]$/;
120
+ let r = e;
121
+ for (const s in t)
122
+ t.hasOwnProperty(s) && t[s].from.test(e) && (r = r.replace(t[s].from, t[s].to));
123
+ return r = r.replace(o, "-"), r = r.replace(i, ""), r = r.toLowerCase(), r || "humany";
124
+ }, He = (e, t) => {
125
+ if (!e || !t)
126
+ return !0;
127
+ let o = t.parentNode, i = !1;
128
+ for (; o !== null; )
129
+ o === e && (i = !0), o = o.parentNode;
130
+ return i;
131
+ }, ee = (e = {}) => (Object.keys(e).forEach((t) => {
132
+ (e[t] === null || typeof e[t] > "u") && delete e[t];
133
+ }), e), Re = () => {
134
+ const [e, t] = L(!1);
135
+ return M(() => {
136
+ const o = () => {
137
+ t(!1);
138
+ }, i = (r) => {
139
+ r.keyCode === 9 && t(!0);
140
+ };
141
+ return window.addEventListener("keydown", i), window.addEventListener("click", o), () => {
142
+ window.removeEventListener("keydown", i), window.removeEventListener("click", o);
143
+ };
144
+ }, []), e;
145
+ }, ge = (e) => {
146
+ const t = se(), o = Ye(), [i, r] = L({ name: "", params: {} }), s = Ee();
147
+ return M(() => {
148
+ const l = (e || t).get("$widget");
149
+ if (!l)
150
+ return;
151
+ const { events: d } = l;
152
+ return d.subscribe("router:change", (u, { next: { routeData: h } }) => {
153
+ if (s.current) {
154
+ const { name: m, params: g } = h;
155
+ ee(g), r({ name: m, params: g });
156
+ }
157
+ });
158
+ }, [s, e, t]), M(() => {
159
+ if (o && o.history && s.current) {
160
+ const l = o.getRouteData(), { name: d, params: c } = l;
161
+ ee(c), r({ name: d, params: c });
162
+ }
163
+ }, [o, s]), i;
164
+ };
165
+ var W = /* @__PURE__ */ ((e) => (e.HH_MM = "hh:mm", e.YYYY_MM_DD = "yyyy-mm-dd", e.YYYY_MM_DD_HH_MM = "yyyy-mm-dd hh:mm", e))(W || {});
166
+ const he = ({ className: e = "", format: t = "hh:mm", timestamp: o }) => /* @__PURE__ */ n("span", { className: S(e, "humany-timestamp"), children: Ke(o, t) }), te = (e) => `0${e}`.slice(-2);
167
+ function Ke(e, t) {
168
+ const o = new Date(e), i = o.toTimeString().split(" ")[0].split(":"), r = i.length > 1 ? `${i[0]}:${i[1]}` : i[0], s = o.getFullYear(), l = o.getMonth() + 1, d = o.getDate(), c = `${s}-${te(l)}-${te(d)}`;
169
+ return t === "yyyy-mm-dd" ? c : t === "hh:mm" ? r : `${c} ${r}`;
170
+ }
171
+ const Ue = ({
172
+ title: e = "",
173
+ className: t,
174
+ id: o,
175
+ parent: i,
176
+ connection: r,
177
+ type: s,
178
+ target: l,
179
+ href: d,
180
+ children: c,
181
+ connectionKey: u
182
+ }) => {
183
+ const h = {}, { name: m, params: g } = ge();
184
+ switch (s) {
185
+ case "default":
186
+ case "guide":
187
+ const { id: v, title: b } = i;
188
+ let a = u || r;
189
+ v !== o && !u && (a = void 0), h.routeName = m, h.params = A({
190
+ ...g,
191
+ guide: o,
192
+ connection: a,
193
+ uriName: X(o === v ? b : e)
194
+ });
195
+ break;
196
+ case "link":
197
+ h.href = d, h.target = l;
198
+ break;
199
+ }
200
+ return /* @__PURE__ */ n(
201
+ Fe,
202
+ {
203
+ className: S(t, "humany-dialog-link"),
204
+ ...h,
205
+ children: c || /* @__PURE__ */ y(ne, { children: [
206
+ s === "link" && /* @__PURE__ */ n(F, { faIcon: "link" }),
207
+ /* @__PURE__ */ n("span", { children: e })
208
+ ] })
209
+ }
210
+ );
211
+ };
212
+ O(
213
+ ({ className: e, dialog: t, ...o }, i) => t.length ? /* @__PURE__ */ n(
214
+ Ve,
215
+ {
216
+ className: S(e, "humany-dialog"),
217
+ items: t,
218
+ renderItem: (r) => /* @__PURE__ */ n("li", { "data-dialog": r.connection, children: /* @__PURE__ */ n(Ue, { ...r }) }, r.connection),
219
+ ...o,
220
+ ref: i
221
+ }
222
+ ) : null
223
+ );
224
+ const Ve = f(V)`
225
+ ${le}
226
+ a {
227
+ min-width: 150px;
228
+ max-width: 400px;
229
+ display: block;
230
+ white-space: normal;
231
+ ${(e) => {
232
+ var t, o;
233
+ return ((t = e.theme.colors) == null ? void 0 : t.primary) && me({
234
+ primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
235
+ secondaryColor: "#FFFFFF",
236
+ theme: e.theme
237
+ });
238
+ }}
239
+ }
240
+
241
+ i {
242
+ margin: 0 ${(e) => {
243
+ var t;
244
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
245
+ }} 0 0;
246
+ }
247
+ `;
248
+ f(j)`
249
+ ${P}
250
+ font-family: ${(e) => {
251
+ var t;
252
+ return (t = e.theme.fonts) == null ? void 0 : t.type;
253
+ }};
254
+ padding: ${(e) => {
255
+ var t;
256
+ return (t = e.theme.sizes) == null ? void 0 : t.medium;
257
+ }};
258
+ > ul > li {
259
+ overflow: visible;
260
+ font-weight: 300;
261
+ font-size: ${(e) => {
262
+ var t;
263
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
264
+ }};
265
+ }
266
+ `;
267
+ f.div`
268
+ background: #fff;
269
+ border: #ccc 1px solid;
270
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
271
+ font-family: ${(e) => {
272
+ var t;
273
+ return (t = e.theme.fonts) == null ? void 0 : t.type;
274
+ }};
275
+ font-size: ${(e) => {
276
+ var t;
277
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
278
+ }};
279
+ `;
280
+ f.div`
281
+ padding: ${(e) => {
282
+ var t;
283
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
284
+ }};
285
+ padding-bottom: 0;
286
+ font-size: ${(e) => {
287
+ var t;
288
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
289
+ }};
290
+ font-weight: normal;
291
+ white-space: nowrap;
292
+ display: flex;
293
+ align-items: center;
294
+
295
+ h1,
296
+ h2,
297
+ h3,
298
+ h4,
299
+ h5,
300
+ h6 {
301
+ margin: 0;
302
+ font-weight: normal;
303
+ padding-bottom: 0;
304
+ }
305
+
306
+ svg,
307
+ i {
308
+ margin-right: ${(e) => {
309
+ var t;
310
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
311
+ }};
312
+ }
313
+ `;
314
+ f(V)`
315
+ list-style: none;
316
+ padding: 0;
317
+ margin: 0;
318
+ padding: ${(e) => {
319
+ var t;
320
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
321
+ }} 0;
322
+
323
+ li {
324
+ background: #fff;
325
+
326
+ a {
327
+ display: block;
328
+ font-size: ${(e) => {
329
+ var t;
330
+ return (t = e.theme.fonts) == null ? void 0 : t.small;
331
+ }};
332
+ padding: ${(e) => {
333
+ var t, o;
334
+ return `${(t = e.theme.sizes) == null ? void 0 : t.small} ${(o = e.theme.sizes) == null ? void 0 : o.normal}`;
335
+ }};
336
+ cursor: pointer;
337
+ color: #555;
338
+ text-decoration: none;
339
+
340
+ &:hover {
341
+ background: #f9f9f9;
342
+ color: ${(e) => {
343
+ var t;
344
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
345
+ }};
346
+ }
347
+ }
348
+ }
349
+ `;
350
+ f(j)`
351
+ ${P}
352
+ font-family: ${(e) => {
353
+ var t;
354
+ return (t = e.theme.fonts) == null ? void 0 : t.type;
355
+ }};
356
+ > div {
357
+ ${(e) => {
358
+ var t;
359
+ return G(e)(
360
+ "> h1",
361
+ $`
362
+ font-size: ${(t = e.theme.fonts) == null ? void 0 : t.normal};
363
+ line-height: 1.2em;
364
+ `
365
+ );
366
+ }}
367
+ }
368
+ > ul > li {
369
+ overflow: visible;
370
+ font-weight: 300;
371
+ font-size: ${(e) => {
372
+ var t;
373
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
374
+ }};
375
+
376
+ a {
377
+ display: inline-block;
378
+
379
+ @media (hover: hover) {
380
+ &:hover {
381
+ text-decoration: underline;
382
+ }
383
+ }
384
+ }
385
+ }
386
+ `;
387
+ const Ge = (e) => $`
388
+ ${e["data-loading"] && "position: relative;"};
389
+ ${e["data-loading"] && "min-height: 150px;"}
390
+ > * {
391
+ transition: 200ms ease-out opacity;
392
+ opacity: ${e["data-loading"] ? "0.5" : "1"};
393
+ }
394
+ .humany-loader {
395
+ opacity: ${e["data-loading"] ? "1" : "0"};
396
+ }
397
+ `;
398
+ f(F)`
399
+ && {
400
+ font-size: ${(e) => {
401
+ var t;
402
+ return (t = e.theme.fonts) == null ? void 0 : t.small;
403
+ }};
404
+ }
405
+ width: 1.2em;
406
+ `;
407
+ f(ce)`
408
+ font-size: ${(e) => {
409
+ var t;
410
+ return (t = e.theme.fonts) == null ? void 0 : t.medium;
411
+ }};
412
+ font-weight: normal;
413
+ line-height: 1.2em;
414
+ color: ${(e) => {
415
+ var t;
416
+ return (t = e.theme.colors) == null ? void 0 : t.text;
417
+ }};
418
+ `;
419
+ const Je = f(J)`
420
+ display: flex;
421
+ align-items: center;
422
+
423
+ ${(e) => {
424
+ var t;
425
+ return e["data-has-label"] === "true" && e["data-has-symbol"] === "true" && `
426
+ svg, i {
427
+ margin: 0 ${(t = e.theme.sizes) == null ? void 0 : t.small} 0 0;
428
+ }
429
+ `;
430
+ }}
431
+
432
+ &:focus-visible {
433
+ ${(e) => e["data-has-label"] === "true" && Q}
434
+
435
+ svg, i {
436
+ ${(e) => e["data-has-label"] === "false" && e["data-has-symbol"] === "true" && $`
437
+ ${Q(e)}
438
+ box-sizing: content-box;
439
+ `}
440
+ }
441
+ }
442
+
443
+ span {
444
+ flex: 1;
445
+ font-weight: 300;
446
+ }
447
+ `, We = ({
448
+ addFavoriteTooltip: e,
449
+ removeFavoriteCancelLabel: t,
450
+ removeFavoriteConfirmLabel: o,
451
+ removeFavoriteHeader: i,
452
+ removeFavoriteLabel: r,
453
+ removeFavoriteTooltip: s,
454
+ id: l,
455
+ isFavorite: d,
456
+ guideTitle: c,
457
+ buttonLabel: u = "",
458
+ actions: { addFavorite: h, removeFavorite: m }
459
+ }) => {
460
+ const g = I(() => {
461
+ m(l);
462
+ }, [l, m]), v = I(() => {
463
+ h(l);
464
+ }, [l, h]), b = `${d ? s : e}${c ? `: "${c}"` : ""}`;
465
+ return d ? /* @__PURE__ */ n(
466
+ Ae,
467
+ {
468
+ trigger: /* @__PURE__ */ y(
469
+ oe,
470
+ {
471
+ className: "humany-favorite-button",
472
+ title: b,
473
+ "aria-label": b,
474
+ "data-favorite": "true",
475
+ "data-has-label": u ? "true" : "false",
476
+ "data-has-symbol": "true",
477
+ children: [
478
+ /* @__PURE__ */ n(
479
+ z,
480
+ {
481
+ size: 16,
482
+ symbol: { type: "Svg", content: "star-empty" }
483
+ }
484
+ ),
485
+ u && /* @__PURE__ */ n(R, { children: u })
486
+ ]
487
+ }
488
+ ),
489
+ onConfirm: g,
490
+ cancelLabel: t,
491
+ confirmLabel: o,
492
+ header: i,
493
+ text: r
494
+ }
495
+ ) : /* @__PURE__ */ y(
496
+ oe,
497
+ {
498
+ className: "humany-favorite-button",
499
+ title: b,
500
+ "aria-label": b,
501
+ onClick: v,
502
+ "data-favorite": "false",
503
+ "data-has-label": u ? "true" : "false",
504
+ "data-has-symbol": "true",
505
+ children: [
506
+ /* @__PURE__ */ n(z, { size: 16, symbol: { type: "Svg", content: "star-empty" } }),
507
+ u && /* @__PURE__ */ n(R, { children: u })
508
+ ]
509
+ }
510
+ );
511
+ }, oe = f(Je)`
512
+ grid-area: favorite;
513
+
514
+ &:focus-visible {
515
+ svg {
516
+ ${(e) => {
517
+ var t, o;
518
+ return e["data-favorite"] === "true" ? `
519
+ fill: transparent;
520
+
521
+ path {
522
+ fill: transparent;
523
+ }
524
+ ` : `
525
+ fill: ${(t = e.theme.colors) == null ? void 0 : t.text};
526
+
527
+ path {
528
+ fill: ${(o = e.theme.colors) == null ? void 0 : o.text};
529
+ }
530
+ `;
531
+ }}
532
+ }
533
+ }
534
+
535
+ ${(e) => {
536
+ var t, o, i, r, s, l, d;
537
+ return ((t = e.theme.colors) == null ? void 0 : t.text) && $`
538
+ svg {
539
+ stroke: ${(o = e.theme.colors) == null ? void 0 : o.text};
540
+
541
+ path {
542
+ stroke: ${(i = e.theme.colors) == null ? void 0 : i.text};
543
+ }
544
+
545
+ ${e["data-favorite"] === "true" && `
546
+ fill: ${(r = e.theme.colors) == null ? void 0 : r.text};
547
+
548
+ path {
549
+ fill: ${(s = e.theme.colors) == null ? void 0 : s.text};
550
+ }
551
+ `};
552
+ }
553
+
554
+ &:hover {
555
+ svg {
556
+ ${e["data-favorite"] === "true" ? `
557
+ fill: transparent;
558
+
559
+ path {
560
+ fill: transparent;
561
+ }
562
+ ` : `
563
+ fill: ${(l = e.theme.colors) == null ? void 0 : l.text};
564
+
565
+ path {
566
+ fill: ${(d = e.theme.colors) == null ? void 0 : d.text};
567
+ }
568
+ `};
569
+ }
570
+ }
571
+ `;
572
+ }}
573
+ `;
574
+ O(
575
+ ({
576
+ onFeedback: e = () => {
577
+ },
578
+ direction: t = "horizontal",
579
+ className: o,
580
+ header: i,
581
+ positive: r,
582
+ negative: s,
583
+ selected: l,
584
+ ...d
585
+ }, c) => /* @__PURE__ */ y(
586
+ qe,
587
+ {
588
+ className: S(o, "humany-feedback"),
589
+ "data-direction": t,
590
+ ...de(d),
591
+ ref: c,
592
+ children: [
593
+ !!i && /* @__PURE__ */ n(Ze, { children: i }),
594
+ /* @__PURE__ */ y(
595
+ ie,
596
+ {
597
+ className: "humany-feedback-button",
598
+ disabled: !!l,
599
+ "data-selected": l === "positive",
600
+ "data-direction": t,
601
+ onClick: () => e("positive"),
602
+ children: [
603
+ /* @__PURE__ */ n(F, { faIcon: "smile-o" }),
604
+ /* @__PURE__ */ n("span", { children: r })
605
+ ]
606
+ }
607
+ ),
608
+ /* @__PURE__ */ y(
609
+ ie,
610
+ {
611
+ className: "humany-feedback-button",
612
+ disabled: !!l,
613
+ "data-selected": l === "negative",
614
+ "data-direction": t,
615
+ onClick: () => e("negative"),
616
+ children: [
617
+ /* @__PURE__ */ n(F, { faIcon: "frown-o" }),
618
+ /* @__PURE__ */ n("span", { children: s })
619
+ ]
620
+ }
621
+ )
622
+ ]
623
+ }
624
+ )
625
+ );
626
+ const Ze = f(R)`
627
+ font-weight: normal;
628
+ margin: 0 0 ${(e) => {
629
+ var t;
630
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
631
+ }};
632
+ font-size: ${(e) => {
633
+ var t;
634
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
635
+ }};
636
+ display: block;
637
+ `, ie = f(J)`
638
+ display: inline-block;
639
+ font-size: ${(e) => {
640
+ var t;
641
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
642
+ }};
643
+ font-weight: 300;
644
+ && {
645
+ margin-right: ${(e) => {
646
+ var t;
647
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
648
+ }};
649
+ }
650
+
651
+ ${(e) => {
652
+ var t, o;
653
+ return e["data-direction"] === "horizontal" && $`
654
+ width: 225px;
655
+ max-width: calc(50% - ${(t = e.theme.sizes) == null ? void 0 : t.large} - ${(o = e.theme.sizes) == null ? void 0 : o.small});
656
+ `;
657
+ }}
658
+
659
+ ${(e) => e["data-direction"] === "vertical" && $`
660
+ min-width: 190px;
661
+ `}
662
+
663
+ ${(e) => {
664
+ var t, o;
665
+ return ((t = e.theme.colors) == null ? void 0 : t.primary) && me({
666
+ active: e["data-selected"],
667
+ primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
668
+ secondaryColor: "#FFFFFF",
669
+ theme: e.theme
670
+ });
671
+ }}
672
+
673
+ i {
674
+ margin: 0 ${(e) => {
675
+ var t;
676
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
677
+ }} 0 0;
678
+ }
679
+ `, qe = f.div`
680
+ ${(e) => {
681
+ var t;
682
+ return e["data-direction"] === "vertical" && $`
683
+ > button {
684
+ width: 100%;
685
+ &:not(:last-child) {
686
+ margin-bottom: ${(t = e.theme.sizes) == null ? void 0 : t.normal};
687
+ }
688
+ }
689
+ `;
690
+ }}
691
+ `, Qe = () => {
692
+ const e = se(), [t, o] = L([]), i = e.get("favorites");
693
+ M(() => {
694
+ if (i) {
695
+ o(i.get());
696
+ const { events: c } = e.get("$widget");
697
+ return c.subscribe(
698
+ "widget:favorites-updated",
699
+ (h, { updated: m }) => {
700
+ o([...m]);
701
+ }
702
+ );
703
+ }
704
+ }, []);
705
+ const r = (c) => i ? i.add(c) : Promise.resolve([]), s = (c) => i ? i.remove(c) : Promise.resolve([]), l = () => i ? i.clear() : Promise.resolve([]), d = I(
706
+ (c) => t.indexOf(c) > -1 ? s(c) : r(c),
707
+ // eslint-disable-next-line react-hooks/exhaustive-deps
708
+ [t]
709
+ );
710
+ return [
711
+ t,
712
+ Oe(
713
+ () => ({
714
+ addFavorite: r,
715
+ removeFavorite: s,
716
+ clearFavorites: l,
717
+ toggleFavorite: d
718
+ }),
719
+ // eslint-disable-next-line react-hooks/exhaustive-deps
720
+ [t]
721
+ )
722
+ ];
723
+ }, Xe = ({
724
+ format: e = W.YYYY_MM_DD_HH_MM,
725
+ className: t = "",
726
+ byLabel: o = "",
727
+ modifiedLabel: i = "",
728
+ publishedLabel: r = "",
729
+ modifiedBy: s = "",
730
+ publishedBy: l = "",
731
+ showModified: d = !1,
732
+ showPublished: c = !1,
733
+ modified: u,
734
+ published: h
735
+ }) => {
736
+ const m = c && h ? /* @__PURE__ */ n(re, { format: e, timestamp: h }) : null, g = d && u ? /* @__PURE__ */ n(re, { format: e, timestamp: u }) : null;
737
+ return !m && !g ? null : /* @__PURE__ */ y(H, { className: S(t, "humany-metadata"), children: [
738
+ m && /* @__PURE__ */ y(H, { className: "humany-published", children: [
739
+ r,
740
+ m,
741
+ o && l && ` ${o.replace("{{editor}}", l)}`
742
+ ] }),
743
+ g && /* @__PURE__ */ y(H, { className: "humany-modified", children: [
744
+ m && ", ",
745
+ i,
746
+ g,
747
+ o && s && ` ${o.replace("{{editor}}", s)}`
748
+ ] })
749
+ ] });
750
+ }, re = f(he)`
751
+ &:not(:first-child) {
752
+ margin-left: 4px;
753
+ }
754
+ &:not(:last-child) {
755
+ margin-right: 4px;
756
+ }
757
+ `, H = f(ce)`
758
+ font-style: italic;
759
+ `, et = ({ tags: e }) => e.filter((t) => t.symbol).length ? /* @__PURE__ */ n(
760
+ it,
761
+ {
762
+ className: "humany-guide-list-tags",
763
+ items: e,
764
+ renderItem: ({ id: t, symbol: o, title: i }) => o && /* @__PURE__ */ n("li", { "data-tag": t, children: /* @__PURE__ */ n(rt, { size: 18, symbol: o, title: i }) }, t)
765
+ }
766
+ ) : null;
767
+ O(({ title: e, id: t, route: o, symbolSize: i, collapseUri: r, children: s }, l) => {
768
+ const { params: d } = ge();
769
+ return /* @__PURE__ */ y(tt, { ref: l, "data-guide": t, children: [
770
+ /* @__PURE__ */ n(
771
+ K,
772
+ {
773
+ title: e,
774
+ "aria-label": e,
775
+ routeName: o,
776
+ params: A({
777
+ ...d,
778
+ uriName: r || void 0,
779
+ id: void 0,
780
+ guide: void 0,
781
+ accordion: void 0
782
+ }),
783
+ text: e,
784
+ children: /* @__PURE__ */ n(
785
+ z,
786
+ {
787
+ size: i,
788
+ symbol: { type: "Svg", content: "caret-up" }
789
+ }
790
+ )
791
+ }
792
+ ),
793
+ s
794
+ ] });
795
+ });
796
+ const tt = f.li`
797
+ > a {
798
+ grid-column: 1/-1;
799
+ font-weight: bold;
800
+ margin: 0 0 ${(e) => {
801
+ var t;
802
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
803
+ }} 0;
804
+ }
805
+
806
+ > div {
807
+ grid-column: 1/-1;
808
+ }
809
+ `;
810
+ O(
811
+ ({
812
+ expandable: e = !1,
813
+ routing: t = {},
814
+ paramMappers: o = {},
815
+ symbolSize: i = 11,
816
+ pageRole: r = "link",
817
+ pageCaret: s = "down",
818
+ showTags: l = !1,
819
+ showFavoriteToggle: d = !1,
820
+ localPaging: c = !1,
821
+ onItemClick: u = () => {
822
+ },
823
+ dispatch: h = () => {
824
+ },
825
+ metadata: m = {},
826
+ pageLabel: g,
827
+ className: v,
828
+ children: b,
829
+ items: a,
830
+ renderItem: x,
831
+ addFavoriteTooltip: ue,
832
+ removeFavoriteCancelLabel: pe,
833
+ removeFavoriteConfirmLabel: ye,
834
+ removeFavoriteHeader: $e,
835
+ removeFavoriteLabel: ve,
836
+ removeFavoriteTooltip: be,
837
+ ...xe
838
+ }, we) => {
839
+ const Z = Re(), C = _e(), T = je(a), { guide: ke = "guide", page: ze = "index" } = t, {
840
+ guide: Se = ({ id: p }) => A({ guide: p }),
841
+ page: q = () => A()
842
+ } = o, [Ne, Ce] = Qe();
843
+ Be(we, () => C.current);
844
+ const _ = (p) => {
845
+ const { id: k, title: w, tags: N, published: Y, modified: D, publishedBy: E, modifiedBy: B } = p;
846
+ return /* @__PURE__ */ y(
847
+ "li",
848
+ {
849
+ "data-guide": k,
850
+ "has-metadata": (!!(m != null && m.showPublished) && !!Y || !!(m != null && m.showModified) && !!D).toString(),
851
+ children: [
852
+ /* @__PURE__ */ n(
853
+ K,
854
+ {
855
+ className: "humany-guide-link",
856
+ title: w,
857
+ "aria-label": w,
858
+ routeName: ke,
859
+ onClick: (Ie) => u(Ie, p),
860
+ params: Se(p),
861
+ text: w,
862
+ children: /* @__PURE__ */ n(
863
+ z,
864
+ {
865
+ size: i,
866
+ symbol: {
867
+ type: "Svg",
868
+ content: e ? "caret-down" : "caret-right"
869
+ }
870
+ }
871
+ )
872
+ }
873
+ ),
874
+ d && /* @__PURE__ */ n(
875
+ We,
876
+ {
877
+ guideTitle: w,
878
+ addFavoriteTooltip: ue,
879
+ removeFavoriteCancelLabel: pe,
880
+ removeFavoriteConfirmLabel: ye,
881
+ removeFavoriteHeader: $e,
882
+ removeFavoriteLabel: ve,
883
+ removeFavoriteTooltip: be,
884
+ isFavorite: Ne.indexOf(k) > -1,
885
+ actions: Ce,
886
+ id: k
887
+ }
888
+ ),
889
+ l && /* @__PURE__ */ n(et, { tags: N }),
890
+ /* @__PURE__ */ n(
891
+ at,
892
+ {
893
+ ...m,
894
+ indent: e ? void 0 : i,
895
+ modified: D,
896
+ published: Y,
897
+ publishedBy: E,
898
+ modifiedBy: B
899
+ }
900
+ )
901
+ ]
902
+ },
903
+ k
904
+ );
905
+ }, Te = I(
906
+ (p, k, w) => x ? x(p, k, w, _) : _(p),
907
+ [x, _]
908
+ ), De = I(
909
+ (p) => {
910
+ c && (p.preventDefault(), h("page", q()));
911
+ },
912
+ [h, c]
913
+ );
914
+ M(() => {
915
+ if (T && T.length < a.length && C.current) {
916
+ const p = C.current.querySelectorAll(
917
+ ".humany-guide-list > ul > li"
918
+ ), k = p[T.length];
919
+ if (p.length === a.length && T.length) {
920
+ const w = p[T.length];
921
+ if (w) {
922
+ const N = w.querySelector(
923
+ ".humany-guide-link"
924
+ );
925
+ N && N.focus();
926
+ }
927
+ } else
928
+ k && new MutationObserver((N, Y) => {
929
+ N.forEach((D) => {
930
+ if (D.addedNodes) {
931
+ const E = Array.from(
932
+ D.addedNodes
933
+ ).find((B) => B.tagName === "A");
934
+ E && He(C.current, document.activeElement) && (Z && E.focus(), Y.disconnect());
935
+ }
936
+ });
937
+ }).observe(k, {
938
+ attributes: !1,
939
+ characterData: !1,
940
+ childList: !0,
941
+ subtree: !0,
942
+ attributeOldValue: !1,
943
+ characterDataOldValue: !1
944
+ });
945
+ }
946
+ });
947
+ const Me = !!Object.keys(m).filter(
948
+ (p) => typeof m[p] < "u"
949
+ ).length;
950
+ return /* @__PURE__ */ y(
951
+ ot,
952
+ {
953
+ className: S(v, "humany-guide-list"),
954
+ "data-item-count": a.length,
955
+ items: a,
956
+ renderItem: Te,
957
+ isTabbing: Z,
958
+ expandable: e ? "true" : "false",
959
+ "grid-items": l || d || Me ? "true" : "false",
960
+ ...de(xe),
961
+ ref: C,
962
+ children: [
963
+ g ? /* @__PURE__ */ n(
964
+ K,
965
+ {
966
+ text: g,
967
+ title: g,
968
+ "aria-label": g,
969
+ routeName: ze,
970
+ role: r,
971
+ params: q(),
972
+ onClick: De,
973
+ children: /* @__PURE__ */ n(
974
+ z,
975
+ {
976
+ size: i,
977
+ symbol: { type: "Svg", content: `caret-${s}` }
978
+ }
979
+ )
980
+ }
981
+ ) : null,
982
+ b
983
+ ]
984
+ }
985
+ );
986
+ }
987
+ );
988
+ const ot = f(j)`
989
+ ${P}
990
+ padding: ${(e) => {
991
+ var t;
992
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
993
+ }};
994
+ overflow: auto;
995
+ justify-content: flex-start;
996
+ white-space: nowrap;
997
+ font-weight: 300;
998
+ text-decoration: none;
999
+
1000
+ > div {
1001
+ ${(e) => G(e)(
1002
+ "> h1",
1003
+ $`
1004
+ white-space: pre-wrap;
1005
+ `
1006
+ )}
1007
+ }
1008
+
1009
+ > ul > li {
1010
+ ${(e) => {
1011
+ var t, o;
1012
+ return e["grid-items"] === "true" && $`
1013
+ display: grid;
1014
+ grid-template-columns: auto 1fr 1fr;
1015
+ gap: 0px 0px;
1016
+ grid-template-areas: '. favorite tags';
1017
+ align-items: center;
1018
+
1019
+ > button {
1020
+ margin: 0 0 0 ${(t = e.theme.sizes) == null ? void 0 : t.small};
1021
+
1022
+ &[data-favorite='false'] {
1023
+ ${e.isTabbing ? "opacity: 0;" : "display: none;"};
1024
+ &:focus {
1025
+ opacity: 1;
1026
+ }
1027
+ }
1028
+ }
1029
+
1030
+ > span {
1031
+ font-size: ${(o = e.theme.fonts) == null ? void 0 : o.small};
1032
+ }
1033
+
1034
+ &:hover {
1035
+ button[data-favorite='false'] {
1036
+ display: flex;
1037
+ justify-self: flex-start;
1038
+ }
1039
+ }
1040
+
1041
+ &[has-metadata='true'] {
1042
+ grid-template-rows: 1fr 1fr;
1043
+ grid-template-areas:
1044
+ '. favorite tags'
1045
+ 'metadata metadata metadata';
1046
+ }
1047
+ `;
1048
+ }}
1049
+ > a {
1050
+ color: ${(e) => {
1051
+ var t;
1052
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1053
+ }};
1054
+ overflow: hidden;
1055
+ text-overflow: ellipsis;
1056
+ max-width: 100%;
1057
+ display: inline-block;
1058
+
1059
+ svg {
1060
+ margin: 0 calc(${(e) => {
1061
+ var t;
1062
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
1063
+ }}*2) 0 0;
1064
+ line {
1065
+ stroke: ${(e) => {
1066
+ var t;
1067
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1068
+ }};
1069
+ }
1070
+ }
1071
+
1072
+ ${(e) => {
1073
+ var t;
1074
+ return e.expandable === "true" && $`
1075
+ display: flex;
1076
+ flex-direction: row-reverse;
1077
+ justify-content: flex-end;
1078
+ align-items: center;
1079
+
1080
+ span {
1081
+ overflow: hidden;
1082
+ text-overflow: ellipsis;
1083
+ }
1084
+
1085
+ svg {
1086
+ margin: 0 0 0 ${(t = e.theme.sizes) == null ? void 0 : t.small};
1087
+ }
1088
+ `;
1089
+ }}
1090
+
1091
+ &:focus-visible {
1092
+ ${U}
1093
+ text-decoration: underline;
1094
+ }
1095
+
1096
+ @media (hover: hover) {
1097
+ &:hover {
1098
+ text-decoration: underline;
1099
+ }
1100
+ }
1101
+ }
1102
+ }
1103
+
1104
+ > a {
1105
+ color: ${(e) => {
1106
+ var t;
1107
+ return (t = e.theme.colors) == null ? void 0 : t.text;
1108
+ }};
1109
+ margin: ${(e) => {
1110
+ var t;
1111
+ return (t = e.theme.sizes) == null ? void 0 : t.normal;
1112
+ }} 0 0;
1113
+ align-self: flex-start;
1114
+ align-items: center;
1115
+ display: flex;
1116
+
1117
+ span {
1118
+ text-decoration: underline;
1119
+ }
1120
+
1121
+ svg {
1122
+ margin: 0 calc(${(e) => {
1123
+ var t;
1124
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
1125
+ }}*2) 0 0;
1126
+ line {
1127
+ stroke: ${(e) => {
1128
+ var t;
1129
+ return (t = e.theme.colors) == null ? void 0 : t.text;
1130
+ }};
1131
+ }
1132
+ }
1133
+
1134
+ &:focus-visible {
1135
+ ${U}
1136
+ text-decoration: underline;
1137
+ }
1138
+ }
1139
+ `, it = f(V)`
1140
+ ${le}
1141
+ display: flex;
1142
+ margin: 0 0 0 auto;
1143
+ grid-area: tags;
1144
+
1145
+ li,
1146
+ li:last-child {
1147
+ margin: 0 0 0 ${(e) => {
1148
+ var t;
1149
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
1150
+ }};
1151
+ display: flex;
1152
+ align-items: center;
1153
+ justify-content: space-between;
1154
+ }
1155
+ `, rt = f(z)`
1156
+ display: block;
1157
+ color: ${(e) => {
1158
+ var t;
1159
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1160
+ }};
1161
+ ${(e) => {
1162
+ if (e.symbol.type === "Uri")
1163
+ return `
1164
+ width: ${e.size}px;
1165
+ height: ${e.size}px;
1166
+ `;
1167
+ if (e.symbol.type === "FontAwesome")
1168
+ return `
1169
+ font-size: ${e.size}px;
1170
+ `;
1171
+ }}
1172
+ `, at = f(Xe)`
1173
+ grid-area: metadata;
1174
+ text-overflow: ellipsis;
1175
+ overflow: hidden;
1176
+ font-size: ${(e) => {
1177
+ var t;
1178
+ return (t = e.theme.fonts) == null ? void 0 : t.small;
1179
+ }};
1180
+ ${(e) => {
1181
+ var t;
1182
+ return typeof e.indent == "number" && `text-indent: calc(${(t = e.theme.sizes) == null ? void 0 : t.small} * 2 + ${e.indent}px);`;
1183
+ }}
1184
+ `, nt = fe`
1185
+ 100% {
1186
+ transform: rotate(360deg);
1187
+ }
1188
+ `, st = fe`
1189
+ 0% {
1190
+ stroke-dasharray: 1, 200;
1191
+ stroke-dashoffset: 0;
1192
+ }
1193
+ 50% {
1194
+ stroke-dasharray: 89, 200;
1195
+ stroke-dashoffset: -35px;
1196
+ }
1197
+ 100% {
1198
+ stroke-dasharray: 89, 200;
1199
+ stroke-dashoffset: -124px;
1200
+ }
1201
+ `, lt = f.svg`
1202
+ animation: ${nt} 2s linear infinite;
1203
+ height: 100%;
1204
+ transform-origin: center center;
1205
+ width: 100%;
1206
+ position: absolute;
1207
+ top: 0;
1208
+ bottom: 0;
1209
+ left: 0;
1210
+ right: 0;
1211
+ margin: auto;
1212
+ transition: 200ms ease-out opacity;
1213
+ `, mt = f.div`
1214
+ position: absolute;
1215
+ top: 0;
1216
+ bottom: 0;
1217
+ left: 0;
1218
+ right: 0;
1219
+ height: 100%;
1220
+ width: 100%;
1221
+ pointer-events: ${(e) => e["data-loading"] ? "all" : "none"};
1222
+ display: flex;
1223
+ flex-direction: column;
1224
+ justify-content: center;
1225
+ transition: 200ms ease-out opacity;
1226
+ box-sizing: border-box;
1227
+ overflow: hidden;
1228
+
1229
+ .humany-spinner-svg {
1230
+ opacity: ${(e) => e["data-loading"] ? "1" : "0"};
1231
+ }
1232
+ `, ct = f.div`
1233
+ position: relative;
1234
+ margin: 0 auto;
1235
+ width: 100px;
1236
+ &:before {
1237
+ content: '';
1238
+ display: block;
1239
+ padding-top: 100%;
1240
+ }
1241
+ `, dt = f.circle`
1242
+ stroke-dasharray: 1, 200;
1243
+ stroke-dashoffset: 0;
1244
+ animation: ${st} 1.5s ease-in-out infinite;
1245
+ stroke-linecap: round;
1246
+ stroke: ${(e) => {
1247
+ var t;
1248
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1249
+ }};
1250
+ stroke-width: 2px;
1251
+ `, ft = ({ loading: e = !1 }) => /* @__PURE__ */ n(mt, { className: "humany-loader", "data-loading": e, children: /* @__PURE__ */ n(ct, { className: "humany-spinner", children: /* @__PURE__ */ n(lt, { className: "humany-spinner-svg", viewBox: "25 25 50 50", children: /* @__PURE__ */ n(
1252
+ dt,
1253
+ {
1254
+ cx: "50",
1255
+ cy: "50",
1256
+ r: "20",
1257
+ fill: "none",
1258
+ "stroke-width": "2",
1259
+ "stroke-miterlimit": "10"
1260
+ }
1261
+ ) }) }) }), wt = ({
1262
+ className: e,
1263
+ showHeader: t,
1264
+ notificationList: o,
1265
+ loading: i,
1266
+ ...r
1267
+ }) => {
1268
+ const [s, l] = L(null), {
1269
+ id: d,
1270
+ title: c,
1271
+ symbol: u,
1272
+ notifications: h = [],
1273
+ defaultHeaderOptions: m = { visible: !0 }
1274
+ } = o || {};
1275
+ return !h.length && !i ? null : /* @__PURE__ */ n(
1276
+ ht,
1277
+ {
1278
+ ...r,
1279
+ "data-loading": i,
1280
+ "data-show-header": typeof t == "boolean" ? t : m.visible,
1281
+ className: S(e, "humany-notification-list"),
1282
+ "data-notification-category": d,
1283
+ header: c,
1284
+ symbol: u,
1285
+ items: h,
1286
+ renderItem: ({ id: g, title: v, body: b, modified: a, expandable: x }) => /* @__PURE__ */ n(
1287
+ ut,
1288
+ {
1289
+ "data-notification": g,
1290
+ "data-expanded": x ? s === g : !0,
1291
+ children: x ? /* @__PURE__ */ y(ne, { children: [
1292
+ /* @__PURE__ */ y(
1293
+ gt,
1294
+ {
1295
+ title: v,
1296
+ "aria-label": v,
1297
+ "aria-expanded": s === g,
1298
+ onClick: () => l(s === g ? null : g),
1299
+ children: [
1300
+ /* @__PURE__ */ n("span", { children: v }),
1301
+ /* @__PURE__ */ n(
1302
+ pt,
1303
+ {
1304
+ size: 11,
1305
+ symbol: {
1306
+ type: "Svg",
1307
+ content: `caret-${s === g ? "up" : "down"}`
1308
+ }
1309
+ }
1310
+ )
1311
+ ]
1312
+ }
1313
+ ),
1314
+ /* @__PURE__ */ n(ae, { html: b }),
1315
+ a && /* @__PURE__ */ n(
1316
+ yt,
1317
+ {
1318
+ format: W.YYYY_MM_DD,
1319
+ timestamp: a
1320
+ }
1321
+ )
1322
+ ] }) : /* @__PURE__ */ n(ae, { html: b })
1323
+ },
1324
+ g
1325
+ ),
1326
+ children: /* @__PURE__ */ n(ft, { loading: i })
1327
+ }
1328
+ );
1329
+ }, gt = f(J)`
1330
+ display: flex;
1331
+ justify-content: space-between;
1332
+ align-items: center;
1333
+ width: 100%;
1334
+ text-align: left;
1335
+ svg,
1336
+ i {
1337
+ color: ${(e) => {
1338
+ var t;
1339
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1340
+ }};
1341
+ }
1342
+ span {
1343
+ color: ${(e) => {
1344
+ var t;
1345
+ return (t = e.theme.colors) == null ? void 0 : t.text;
1346
+ }};
1347
+ font-size: ${(e) => {
1348
+ var t;
1349
+ return (t = e.theme.fonts) == null ? void 0 : t.normal;
1350
+ }};
1351
+ overflow: hidden;
1352
+ text-overflow: ellipsis;
1353
+ flex: 1;
1354
+ white-space: nowrap;
1355
+ }
1356
+ &:focus-visible {
1357
+ ${U}
1358
+ span {
1359
+ color: ${(e) => {
1360
+ var t;
1361
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1362
+ }};
1363
+ text-decoration: underline;
1364
+ }
1365
+ }
1366
+ `, ht = f(j)`
1367
+ ${Ge}
1368
+ ${P}
1369
+ overflow: hidden;
1370
+ justify-content: flex-start;
1371
+ padding: ${(e) => {
1372
+ var t;
1373
+ return (t = e.theme.sizes) == null ? void 0 : t.large;
1374
+ }};
1375
+ ${(e) => !e["data-show-header"] && $`
1376
+ > div {
1377
+ ${G(e)(
1378
+ "h1",
1379
+ $`
1380
+ display: none;
1381
+ `
1382
+ )}
1383
+ }
1384
+ `}
1385
+
1386
+ @media (hover: hover) {
1387
+ button:hover {
1388
+ text-decoration: underline;
1389
+ }
1390
+ }
1391
+ `, ae = f(Pe)`
1392
+ ${Le}
1393
+ font-weight: 300;
1394
+
1395
+ p {
1396
+ white-space: normal;
1397
+ }
1398
+ `, ut = f.li`
1399
+ .humany-paragraph {
1400
+ display: none;
1401
+ &:not(:only-child) {
1402
+ ${(e) => {
1403
+ var t, o, i;
1404
+ return ((t = e.theme.sizes) == null ? void 0 : t.cardinal) && ((o = e.theme.sizes) == null ? void 0 : o.normal) && $`
1405
+ margin: ${(i = e.theme.sizes) == null ? void 0 : i.normal} 0;
1406
+ `;
1407
+ }}
1408
+ }
1409
+ }
1410
+
1411
+ ${(e) => e["data-expanded"] && $`
1412
+ .humany-paragraph {
1413
+ display: block;
1414
+ }
1415
+ `}
1416
+
1417
+ > span {
1418
+ display: block;
1419
+ font-weight: 300;
1420
+ color: ${(e) => {
1421
+ var t;
1422
+ return (t = e.theme.colors) == null ? void 0 : t.accent;
1423
+ }};
1424
+ }
1425
+ `, pt = f(z)`
1426
+ margin: 0 0 0 ${(e) => {
1427
+ var t;
1428
+ return (t = e.theme.sizes) == null ? void 0 : t.small;
1429
+ }};
1430
+ line {
1431
+ stroke: ${(e) => {
1432
+ var t;
1433
+ return (t = e.theme.colors) == null ? void 0 : t.primary;
1434
+ }};
1435
+ }
1436
+ `, yt = f(he)`
1437
+ font-size: ${(e) => {
1438
+ var t;
1439
+ return (t = e.theme.fonts) == null ? void 0 : t.small;
1440
+ }};
1441
+ font-weight: 300;
1442
+ `;
1443
+ export {
1444
+ wt as N,
1445
+ A as c,
1446
+ X as f,
1447
+ ee as r,
1448
+ ge as u
1449
+ };