@telia-ace/knowledge-widget-types-grid 1.0.54 → 1.1.1-rc.2

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