@telia-ace/conversational-hub-bot-provider 0.0.13 → 0.0.14
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/contact-method-c926c46b.js +546 -0
- package/contact-method-e3f88945.mjs +1397 -0
- package/{index-93f64633.mjs → index-1ea9093c.mjs} +644 -680
- package/{index-482ea30a.js → index-9dc8b716.js} +109 -109
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/ui/contact-method.d.ts +1 -7
- package/contact-method-429ef265.js +0 -644
- package/contact-method-ae387667.mjs +0 -2242
- package/index-373df3a5.js +0 -6
- package/index-5c9c2abf.mjs +0 -883
|
@@ -0,0 +1,1397 @@
|
|
|
1
|
+
import { jsx as m, jsxs as $, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import { u as U, a as Ye, b as Ee, c as S, L as Fe, I as F, n as c, d as V, l as ne, i as se, e as A, f as P, h as q, g as y, T as le, B as Z, p as X, C as je, S as z, j as R, k as me, m as B, o as Ae, q as K, r as fe, P as Pe, s as Oe } from "./index-1ea9093c.mjs";
|
|
3
|
+
import { useState as G, useEffect as N, forwardRef as O, useCallback as I, useMemo as He, useRef as _e, useImperativeHandle as Le } from "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
function j(e = {}) {
|
|
6
|
+
const {
|
|
7
|
+
phrase: t = "",
|
|
8
|
+
category: o,
|
|
9
|
+
guideCategory: i,
|
|
10
|
+
contactCategory: r,
|
|
11
|
+
take: n,
|
|
12
|
+
connectionKey: s,
|
|
13
|
+
accordion: d,
|
|
14
|
+
id: f,
|
|
15
|
+
uriName: h,
|
|
16
|
+
sorting: g,
|
|
17
|
+
tag: l,
|
|
18
|
+
tagId: u,
|
|
19
|
+
tagTitle: x,
|
|
20
|
+
...v
|
|
21
|
+
} = e, a = {};
|
|
22
|
+
return Object.keys(v).forEach((k) => {
|
|
23
|
+
typeof e[k] == "string" && (a[k] = e[k]);
|
|
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)), f && (a.id = f), h && (+a.category || +a.guideCategory || +a.guide || +a.contactCategory || +a.contactMethod) && (a.uriName = h), s && (a.connectionKey = s), n && (a.take = n), g && (a.sorting = g), typeof d == "string" && d.length > 0 && (a.accordion = d), typeof l == "string" && l !== "0" && (a.tag = l), typeof l == "number" && l !== 0 && (a.tag = l), Array.isArray(l) && l.length && (a.tag = l), (typeof u == "string" || typeof u == "number") && (a.tagId = u), typeof x == "string" && (a.tagTitle = x), typeof a.tag == "string" && (a.tag = a.tag.split(",")), a;
|
|
25
|
+
}
|
|
26
|
+
const ee = (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 n in t)
|
|
122
|
+
t.hasOwnProperty(n) && t[n].from.test(e) && (r = r.replace(t[n].from, t[n].to));
|
|
123
|
+
return r = r.replace(o, "-"), r = r.replace(i, ""), r = r.toLowerCase(), r || "humany";
|
|
124
|
+
}, Re = (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
|
+
}, te = (e = {}) => (Object.keys(e).forEach((t) => {
|
|
132
|
+
(e[t] === null || typeof e[t] > "u") && delete e[t];
|
|
133
|
+
}), e), Be = () => {
|
|
134
|
+
const [e, t] = G(!1);
|
|
135
|
+
return N(() => {
|
|
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
|
+
}, ce = (e) => {
|
|
146
|
+
const t = U(), o = Ye(), [i, r] = G({
|
|
147
|
+
name: "",
|
|
148
|
+
params: {}
|
|
149
|
+
}), n = Ee();
|
|
150
|
+
return N(() => {
|
|
151
|
+
const s = (e || t).get("$widget");
|
|
152
|
+
if (!s)
|
|
153
|
+
return;
|
|
154
|
+
const { events: d } = s;
|
|
155
|
+
return d.subscribe(
|
|
156
|
+
"router:change",
|
|
157
|
+
(h, { next: { routeData: g } }) => {
|
|
158
|
+
if (n.current) {
|
|
159
|
+
const { name: l, params: u } = g;
|
|
160
|
+
te(u), r({ name: l, params: u });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}, [n, e, t]), N(() => {
|
|
165
|
+
if (o && o.history && n.current) {
|
|
166
|
+
const s = o.getRouteData(), { name: d, params: f } = s;
|
|
167
|
+
te(f), r({ name: d, params: f });
|
|
168
|
+
}
|
|
169
|
+
}, [o, n]), i;
|
|
170
|
+
};
|
|
171
|
+
var de = /* @__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))(de || {});
|
|
172
|
+
const ge = ({
|
|
173
|
+
className: e = "",
|
|
174
|
+
format: t = "hh:mm",
|
|
175
|
+
timestamp: o
|
|
176
|
+
}) => /* @__PURE__ */ m("span", { className: S(e, "humany-timestamp"), children: Ke(o, t) }), oe = (e) => `0${e}`.slice(-2);
|
|
177
|
+
function Ke(e, t) {
|
|
178
|
+
const o = new Date(e), i = o.toTimeString().split(" ")[0].split(":"), r = i.length > 1 ? `${i[0]}:${i[1]}` : i[0], n = o.getFullYear(), s = o.getMonth() + 1, d = o.getDate(), f = `${n}-${oe(s)}-${oe(
|
|
179
|
+
d
|
|
180
|
+
)}`;
|
|
181
|
+
return t === "yyyy-mm-dd" ? f : t === "hh:mm" ? r : `${f} ${r}`;
|
|
182
|
+
}
|
|
183
|
+
const Ue = ({
|
|
184
|
+
title: e = "",
|
|
185
|
+
className: t,
|
|
186
|
+
id: o,
|
|
187
|
+
parent: i,
|
|
188
|
+
connection: r,
|
|
189
|
+
type: n,
|
|
190
|
+
target: s,
|
|
191
|
+
href: d,
|
|
192
|
+
children: f,
|
|
193
|
+
connectionKey: h
|
|
194
|
+
}) => {
|
|
195
|
+
const g = {}, { name: l, params: u } = ce();
|
|
196
|
+
switch (n) {
|
|
197
|
+
case "default":
|
|
198
|
+
case "guide":
|
|
199
|
+
const { id: x, title: v } = i;
|
|
200
|
+
let a = h || r;
|
|
201
|
+
x !== o && !h && (a = void 0), g.routeName = l, g.params = j({
|
|
202
|
+
...u,
|
|
203
|
+
guide: o,
|
|
204
|
+
connection: a,
|
|
205
|
+
uriName: ee(o === x ? v : e)
|
|
206
|
+
});
|
|
207
|
+
break;
|
|
208
|
+
case "link":
|
|
209
|
+
g.href = d, g.target = s;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
return /* @__PURE__ */ m(
|
|
213
|
+
Fe,
|
|
214
|
+
{
|
|
215
|
+
className: S(t, "humany-dialog-link"),
|
|
216
|
+
...g,
|
|
217
|
+
children: f || /* @__PURE__ */ $(Ie, { children: [
|
|
218
|
+
n === "link" && /* @__PURE__ */ m(F, { faIcon: "link" }),
|
|
219
|
+
/* @__PURE__ */ m("span", { children: e })
|
|
220
|
+
] })
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
O(
|
|
225
|
+
({ className: e, dialog: t, ...o }, i) => t.length ? /* @__PURE__ */ m(
|
|
226
|
+
Ve,
|
|
227
|
+
{
|
|
228
|
+
className: S(e, "humany-dialog"),
|
|
229
|
+
items: t,
|
|
230
|
+
renderItem: (r) => /* @__PURE__ */ m("li", { "data-dialog": r.connection, children: /* @__PURE__ */ m(Ue, { ...r }) }, r.connection),
|
|
231
|
+
...o,
|
|
232
|
+
ref: i
|
|
233
|
+
}
|
|
234
|
+
) : null
|
|
235
|
+
);
|
|
236
|
+
const Ve = c(V)`
|
|
237
|
+
${ne}
|
|
238
|
+
a {
|
|
239
|
+
min-width: 150px;
|
|
240
|
+
max-width: 400px;
|
|
241
|
+
display: block;
|
|
242
|
+
white-space: normal;
|
|
243
|
+
${(e) => {
|
|
244
|
+
var t, o;
|
|
245
|
+
return ((t = e.theme.colors) == null ? void 0 : t.primary) && se({
|
|
246
|
+
primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
|
|
247
|
+
secondaryColor: "#FFFFFF",
|
|
248
|
+
theme: e.theme
|
|
249
|
+
});
|
|
250
|
+
}}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
i {
|
|
254
|
+
margin: 0 ${(e) => {
|
|
255
|
+
var t;
|
|
256
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
257
|
+
}} 0 0;
|
|
258
|
+
}
|
|
259
|
+
`;
|
|
260
|
+
c(A)`
|
|
261
|
+
${P}
|
|
262
|
+
font-family: ${(e) => {
|
|
263
|
+
var t;
|
|
264
|
+
return (t = e.theme.fonts) == null ? void 0 : t.type;
|
|
265
|
+
}};
|
|
266
|
+
padding: ${(e) => {
|
|
267
|
+
var t;
|
|
268
|
+
return (t = e.theme.sizes) == null ? void 0 : t.medium;
|
|
269
|
+
}};
|
|
270
|
+
> ul > li {
|
|
271
|
+
overflow: visible;
|
|
272
|
+
font-weight: 300;
|
|
273
|
+
font-size: ${(e) => {
|
|
274
|
+
var t;
|
|
275
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
276
|
+
}};
|
|
277
|
+
}
|
|
278
|
+
`;
|
|
279
|
+
c.div`
|
|
280
|
+
background: #fff;
|
|
281
|
+
border: #ccc 1px solid;
|
|
282
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
283
|
+
font-family: ${(e) => {
|
|
284
|
+
var t;
|
|
285
|
+
return (t = e.theme.fonts) == null ? void 0 : t.type;
|
|
286
|
+
}};
|
|
287
|
+
font-size: ${(e) => {
|
|
288
|
+
var t;
|
|
289
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
290
|
+
}};
|
|
291
|
+
`;
|
|
292
|
+
c.div`
|
|
293
|
+
padding: ${(e) => {
|
|
294
|
+
var t;
|
|
295
|
+
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
296
|
+
}};
|
|
297
|
+
padding-bottom: 0;
|
|
298
|
+
font-size: ${(e) => {
|
|
299
|
+
var t;
|
|
300
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
301
|
+
}};
|
|
302
|
+
font-weight: normal;
|
|
303
|
+
white-space: nowrap;
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
|
|
307
|
+
h1,
|
|
308
|
+
h2,
|
|
309
|
+
h3,
|
|
310
|
+
h4,
|
|
311
|
+
h5,
|
|
312
|
+
h6 {
|
|
313
|
+
margin: 0;
|
|
314
|
+
font-weight: normal;
|
|
315
|
+
padding-bottom: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
svg,
|
|
319
|
+
i {
|
|
320
|
+
margin-right: ${(e) => {
|
|
321
|
+
var t;
|
|
322
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
323
|
+
}};
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
c(V)`
|
|
327
|
+
list-style: none;
|
|
328
|
+
padding: 0;
|
|
329
|
+
margin: 0;
|
|
330
|
+
padding: ${(e) => {
|
|
331
|
+
var t;
|
|
332
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
333
|
+
}} 0;
|
|
334
|
+
|
|
335
|
+
li {
|
|
336
|
+
background: #fff;
|
|
337
|
+
|
|
338
|
+
a {
|
|
339
|
+
display: block;
|
|
340
|
+
font-size: ${(e) => {
|
|
341
|
+
var t;
|
|
342
|
+
return (t = e.theme.fonts) == null ? void 0 : t.small;
|
|
343
|
+
}};
|
|
344
|
+
padding: ${(e) => {
|
|
345
|
+
var t, o;
|
|
346
|
+
return `${(t = e.theme.sizes) == null ? void 0 : t.small} ${(o = e.theme.sizes) == null ? void 0 : o.normal}`;
|
|
347
|
+
}};
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
color: #555;
|
|
350
|
+
text-decoration: none;
|
|
351
|
+
|
|
352
|
+
&:hover {
|
|
353
|
+
background: #f9f9f9;
|
|
354
|
+
color: ${(e) => {
|
|
355
|
+
var t;
|
|
356
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
357
|
+
}};
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
`;
|
|
362
|
+
c(A)`
|
|
363
|
+
${P}
|
|
364
|
+
font-family: ${(e) => {
|
|
365
|
+
var t;
|
|
366
|
+
return (t = e.theme.fonts) == null ? void 0 : t.type;
|
|
367
|
+
}};
|
|
368
|
+
> div {
|
|
369
|
+
${(e) => {
|
|
370
|
+
var t;
|
|
371
|
+
return q(e)(
|
|
372
|
+
"> h1",
|
|
373
|
+
y`
|
|
374
|
+
font-size: ${(t = e.theme.fonts) == null ? void 0 : t.normal};
|
|
375
|
+
line-height: 1.2em;
|
|
376
|
+
`
|
|
377
|
+
);
|
|
378
|
+
}}
|
|
379
|
+
}
|
|
380
|
+
> ul > li {
|
|
381
|
+
overflow: visible;
|
|
382
|
+
font-weight: 300;
|
|
383
|
+
font-size: ${(e) => {
|
|
384
|
+
var t;
|
|
385
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
386
|
+
}};
|
|
387
|
+
|
|
388
|
+
a {
|
|
389
|
+
display: inline-block;
|
|
390
|
+
|
|
391
|
+
@media (hover: hover) {
|
|
392
|
+
&:hover {
|
|
393
|
+
text-decoration: underline;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
`;
|
|
399
|
+
const qe = (e) => y`
|
|
400
|
+
${e["data-loading"] && "position: relative;"};
|
|
401
|
+
${e["data-loading"] && "min-height: 150px;"}
|
|
402
|
+
> * {
|
|
403
|
+
transition: 200ms ease-out opacity;
|
|
404
|
+
opacity: ${e["data-loading"] ? "0.5" : "1"};
|
|
405
|
+
}
|
|
406
|
+
.humany-loader {
|
|
407
|
+
opacity: ${e["data-loading"] ? "1" : "0"};
|
|
408
|
+
}
|
|
409
|
+
`;
|
|
410
|
+
c(F)`
|
|
411
|
+
&& {
|
|
412
|
+
font-size: ${(e) => {
|
|
413
|
+
var t;
|
|
414
|
+
return (t = e.theme.fonts) == null ? void 0 : t.small;
|
|
415
|
+
}};
|
|
416
|
+
}
|
|
417
|
+
width: 1.2em;
|
|
418
|
+
`;
|
|
419
|
+
c(le)`
|
|
420
|
+
font-size: ${(e) => {
|
|
421
|
+
var t;
|
|
422
|
+
return (t = e.theme.fonts) == null ? void 0 : t.medium;
|
|
423
|
+
}};
|
|
424
|
+
font-weight: normal;
|
|
425
|
+
line-height: 1.2em;
|
|
426
|
+
color: ${(e) => {
|
|
427
|
+
var t;
|
|
428
|
+
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
429
|
+
}};
|
|
430
|
+
`;
|
|
431
|
+
const Ze = c(Z)`
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
|
|
435
|
+
${(e) => {
|
|
436
|
+
var t;
|
|
437
|
+
return e["data-has-label"] === "true" && e["data-has-symbol"] === "true" && `
|
|
438
|
+
svg, i {
|
|
439
|
+
margin: 0 ${(t = e.theme.sizes) == null ? void 0 : t.small} 0 0;
|
|
440
|
+
}
|
|
441
|
+
`;
|
|
442
|
+
}}
|
|
443
|
+
|
|
444
|
+
&:focus-visible {
|
|
445
|
+
${(e) => e["data-has-label"] === "true" && X}
|
|
446
|
+
|
|
447
|
+
svg, i {
|
|
448
|
+
${(e) => e["data-has-label"] === "false" && e["data-has-symbol"] === "true" && y`
|
|
449
|
+
${X(e)}
|
|
450
|
+
box-sizing: content-box;
|
|
451
|
+
`}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
span {
|
|
456
|
+
flex: 1;
|
|
457
|
+
font-weight: 300;
|
|
458
|
+
}
|
|
459
|
+
`, Ge = ({
|
|
460
|
+
addFavoriteTooltip: e,
|
|
461
|
+
removeFavoriteCancelLabel: t,
|
|
462
|
+
removeFavoriteConfirmLabel: o,
|
|
463
|
+
removeFavoriteHeader: i,
|
|
464
|
+
removeFavoriteLabel: r,
|
|
465
|
+
removeFavoriteTooltip: n,
|
|
466
|
+
id: s,
|
|
467
|
+
isFavorite: d,
|
|
468
|
+
guideTitle: f,
|
|
469
|
+
buttonLabel: h = "",
|
|
470
|
+
actions: { addFavorite: g, removeFavorite: l }
|
|
471
|
+
}) => {
|
|
472
|
+
const u = I(() => {
|
|
473
|
+
l(s);
|
|
474
|
+
}, [s, l]), x = I(() => {
|
|
475
|
+
g(s);
|
|
476
|
+
}, [s, g]), v = `${d ? n : e}${f ? `: "${f}"` : ""}`;
|
|
477
|
+
return d ? /* @__PURE__ */ m(
|
|
478
|
+
je,
|
|
479
|
+
{
|
|
480
|
+
trigger: /* @__PURE__ */ $(
|
|
481
|
+
ie,
|
|
482
|
+
{
|
|
483
|
+
className: "humany-favorite-button",
|
|
484
|
+
title: v,
|
|
485
|
+
"aria-label": v,
|
|
486
|
+
"data-favorite": "true",
|
|
487
|
+
"data-has-label": h ? "true" : "false",
|
|
488
|
+
"data-has-symbol": "true",
|
|
489
|
+
children: [
|
|
490
|
+
/* @__PURE__ */ m(
|
|
491
|
+
z,
|
|
492
|
+
{
|
|
493
|
+
size: 16,
|
|
494
|
+
symbol: { type: "Svg", content: "star-empty" }
|
|
495
|
+
}
|
|
496
|
+
),
|
|
497
|
+
h && /* @__PURE__ */ m(R, { children: h })
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
),
|
|
501
|
+
onConfirm: u,
|
|
502
|
+
cancelLabel: t,
|
|
503
|
+
confirmLabel: o,
|
|
504
|
+
header: i,
|
|
505
|
+
text: r
|
|
506
|
+
}
|
|
507
|
+
) : /* @__PURE__ */ $(
|
|
508
|
+
ie,
|
|
509
|
+
{
|
|
510
|
+
className: "humany-favorite-button",
|
|
511
|
+
title: v,
|
|
512
|
+
"aria-label": v,
|
|
513
|
+
onClick: x,
|
|
514
|
+
"data-favorite": "false",
|
|
515
|
+
"data-has-label": h ? "true" : "false",
|
|
516
|
+
"data-has-symbol": "true",
|
|
517
|
+
children: [
|
|
518
|
+
/* @__PURE__ */ m(z, { size: 16, symbol: { type: "Svg", content: "star-empty" } }),
|
|
519
|
+
h && /* @__PURE__ */ m(R, { children: h })
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}, ie = c(Ze)`
|
|
524
|
+
grid-area: favorite;
|
|
525
|
+
|
|
526
|
+
&:focus-visible {
|
|
527
|
+
svg {
|
|
528
|
+
${(e) => {
|
|
529
|
+
var t, o;
|
|
530
|
+
return e["data-favorite"] === "true" ? `
|
|
531
|
+
fill: transparent;
|
|
532
|
+
|
|
533
|
+
path {
|
|
534
|
+
fill: transparent;
|
|
535
|
+
}
|
|
536
|
+
` : `
|
|
537
|
+
fill: ${(t = e.theme.colors) == null ? void 0 : t.text};
|
|
538
|
+
|
|
539
|
+
path {
|
|
540
|
+
fill: ${(o = e.theme.colors) == null ? void 0 : o.text};
|
|
541
|
+
}
|
|
542
|
+
`;
|
|
543
|
+
}}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
${(e) => {
|
|
548
|
+
var t, o, i, r, n, s, d;
|
|
549
|
+
return ((t = e.theme.colors) == null ? void 0 : t.text) && y`
|
|
550
|
+
svg {
|
|
551
|
+
stroke: ${(o = e.theme.colors) == null ? void 0 : o.text};
|
|
552
|
+
|
|
553
|
+
path {
|
|
554
|
+
stroke: ${(i = e.theme.colors) == null ? void 0 : i.text};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
${e["data-favorite"] === "true" && `
|
|
558
|
+
fill: ${(r = e.theme.colors) == null ? void 0 : r.text};
|
|
559
|
+
|
|
560
|
+
path {
|
|
561
|
+
fill: ${(n = e.theme.colors) == null ? void 0 : n.text};
|
|
562
|
+
}
|
|
563
|
+
`};
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
&:hover {
|
|
567
|
+
svg {
|
|
568
|
+
${e["data-favorite"] === "true" ? `
|
|
569
|
+
fill: transparent;
|
|
570
|
+
|
|
571
|
+
path {
|
|
572
|
+
fill: transparent;
|
|
573
|
+
}
|
|
574
|
+
` : `
|
|
575
|
+
fill: ${(s = e.theme.colors) == null ? void 0 : s.text};
|
|
576
|
+
|
|
577
|
+
path {
|
|
578
|
+
fill: ${(d = e.theme.colors) == null ? void 0 : d.text};
|
|
579
|
+
}
|
|
580
|
+
`};
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
`;
|
|
584
|
+
}}
|
|
585
|
+
`;
|
|
586
|
+
O(
|
|
587
|
+
({
|
|
588
|
+
onFeedback: e = () => {
|
|
589
|
+
},
|
|
590
|
+
direction: t = "horizontal",
|
|
591
|
+
className: o,
|
|
592
|
+
header: i,
|
|
593
|
+
positive: r,
|
|
594
|
+
negative: n,
|
|
595
|
+
selected: s,
|
|
596
|
+
...d
|
|
597
|
+
}, f) => /* @__PURE__ */ $(
|
|
598
|
+
We,
|
|
599
|
+
{
|
|
600
|
+
className: S(o, "humany-feedback"),
|
|
601
|
+
"data-direction": t,
|
|
602
|
+
...me(d),
|
|
603
|
+
ref: f,
|
|
604
|
+
children: [
|
|
605
|
+
!!i && /* @__PURE__ */ m(Je, { children: i }),
|
|
606
|
+
/* @__PURE__ */ $(
|
|
607
|
+
re,
|
|
608
|
+
{
|
|
609
|
+
className: "humany-feedback-button",
|
|
610
|
+
disabled: !!s,
|
|
611
|
+
"data-selected": s === "positive",
|
|
612
|
+
"data-direction": t,
|
|
613
|
+
onClick: () => e("positive"),
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ m(F, { faIcon: "smile-o" }),
|
|
616
|
+
/* @__PURE__ */ m("span", { children: r })
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
),
|
|
620
|
+
/* @__PURE__ */ $(
|
|
621
|
+
re,
|
|
622
|
+
{
|
|
623
|
+
className: "humany-feedback-button",
|
|
624
|
+
disabled: !!s,
|
|
625
|
+
"data-selected": s === "negative",
|
|
626
|
+
"data-direction": t,
|
|
627
|
+
onClick: () => e("negative"),
|
|
628
|
+
children: [
|
|
629
|
+
/* @__PURE__ */ m(F, { faIcon: "frown-o" }),
|
|
630
|
+
/* @__PURE__ */ m("span", { children: n })
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
);
|
|
638
|
+
const Je = c(R)`
|
|
639
|
+
font-weight: normal;
|
|
640
|
+
margin: 0 0 ${(e) => {
|
|
641
|
+
var t;
|
|
642
|
+
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
643
|
+
}};
|
|
644
|
+
font-size: ${(e) => {
|
|
645
|
+
var t;
|
|
646
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
647
|
+
}};
|
|
648
|
+
display: block;
|
|
649
|
+
`, re = c(Z)`
|
|
650
|
+
display: inline-block;
|
|
651
|
+
font-size: ${(e) => {
|
|
652
|
+
var t;
|
|
653
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
654
|
+
}};
|
|
655
|
+
font-weight: 300;
|
|
656
|
+
&& {
|
|
657
|
+
margin-right: ${(e) => {
|
|
658
|
+
var t;
|
|
659
|
+
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
660
|
+
}};
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
${(e) => {
|
|
664
|
+
var t, o;
|
|
665
|
+
return e["data-direction"] === "horizontal" && y`
|
|
666
|
+
width: 225px;
|
|
667
|
+
max-width: calc(50% - ${(t = e.theme.sizes) == null ? void 0 : t.large} - ${(o = e.theme.sizes) == null ? void 0 : o.small});
|
|
668
|
+
`;
|
|
669
|
+
}}
|
|
670
|
+
|
|
671
|
+
${(e) => e["data-direction"] === "vertical" && y`
|
|
672
|
+
min-width: 190px;
|
|
673
|
+
`}
|
|
674
|
+
|
|
675
|
+
${(e) => {
|
|
676
|
+
var t, o;
|
|
677
|
+
return ((t = e.theme.colors) == null ? void 0 : t.primary) && se({
|
|
678
|
+
active: e["data-selected"],
|
|
679
|
+
primaryColor: (o = e.theme.colors) == null ? void 0 : o.primary,
|
|
680
|
+
secondaryColor: "#FFFFFF",
|
|
681
|
+
theme: e.theme
|
|
682
|
+
});
|
|
683
|
+
}}
|
|
684
|
+
|
|
685
|
+
i {
|
|
686
|
+
margin: 0 ${(e) => {
|
|
687
|
+
var t;
|
|
688
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
689
|
+
}} 0 0;
|
|
690
|
+
}
|
|
691
|
+
`, We = c.div`
|
|
692
|
+
${(e) => {
|
|
693
|
+
var t;
|
|
694
|
+
return e["data-direction"] === "vertical" && y`
|
|
695
|
+
> button {
|
|
696
|
+
width: 100%;
|
|
697
|
+
&:not(:last-child) {
|
|
698
|
+
margin-bottom: ${(t = e.theme.sizes) == null ? void 0 : t.normal};
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
`;
|
|
702
|
+
}}
|
|
703
|
+
`, Qe = () => {
|
|
704
|
+
const e = U(), [t, o] = G([]), i = e.get("favorites");
|
|
705
|
+
N(() => {
|
|
706
|
+
if (i) {
|
|
707
|
+
o(i.get());
|
|
708
|
+
const { events: f } = e.get("$widget");
|
|
709
|
+
return f.subscribe(
|
|
710
|
+
"widget:favorites-updated",
|
|
711
|
+
(g, { updated: l }) => {
|
|
712
|
+
o([...l]);
|
|
713
|
+
}
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
}, []);
|
|
717
|
+
const r = (f) => i ? i.add(f) : Promise.resolve([]), n = (f) => i ? i.remove(f) : Promise.resolve([]), s = () => i ? i.clear() : Promise.resolve([]), d = I(
|
|
718
|
+
(f) => t.indexOf(f) > -1 ? n(f) : r(f),
|
|
719
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
720
|
+
[t]
|
|
721
|
+
);
|
|
722
|
+
return [
|
|
723
|
+
t,
|
|
724
|
+
He(
|
|
725
|
+
() => ({
|
|
726
|
+
addFavorite: r,
|
|
727
|
+
removeFavorite: n,
|
|
728
|
+
clearFavorites: s,
|
|
729
|
+
toggleFavorite: d
|
|
730
|
+
}),
|
|
731
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
732
|
+
[t]
|
|
733
|
+
)
|
|
734
|
+
];
|
|
735
|
+
}, Xe = ({
|
|
736
|
+
format: e = de.YYYY_MM_DD_HH_MM,
|
|
737
|
+
className: t = "",
|
|
738
|
+
byLabel: o = "",
|
|
739
|
+
modifiedLabel: i = "",
|
|
740
|
+
publishedLabel: r = "",
|
|
741
|
+
modifiedBy: n = "",
|
|
742
|
+
publishedBy: s = "",
|
|
743
|
+
showModified: d = !1,
|
|
744
|
+
showPublished: f = !1,
|
|
745
|
+
modified: h,
|
|
746
|
+
published: g
|
|
747
|
+
}) => {
|
|
748
|
+
const l = f && g ? /* @__PURE__ */ m(ae, { format: e, timestamp: g }) : null, u = d && h ? /* @__PURE__ */ m(ae, { format: e, timestamp: h }) : null;
|
|
749
|
+
return !l && !u ? null : /* @__PURE__ */ $(L, { className: S(t, "humany-metadata"), children: [
|
|
750
|
+
l && /* @__PURE__ */ $(L, { className: "humany-published", children: [
|
|
751
|
+
r,
|
|
752
|
+
l,
|
|
753
|
+
o && s && ` ${o.replace("{{editor}}", s)}`
|
|
754
|
+
] }),
|
|
755
|
+
u && /* @__PURE__ */ $(L, { className: "humany-modified", children: [
|
|
756
|
+
l && ", ",
|
|
757
|
+
i,
|
|
758
|
+
u,
|
|
759
|
+
o && n && ` ${o.replace("{{editor}}", n)}`
|
|
760
|
+
] })
|
|
761
|
+
] });
|
|
762
|
+
}, ae = c(ge)`
|
|
763
|
+
&:not(:first-child) {
|
|
764
|
+
margin-left: 4px;
|
|
765
|
+
}
|
|
766
|
+
&:not(:last-child) {
|
|
767
|
+
margin-right: 4px;
|
|
768
|
+
}
|
|
769
|
+
`, L = c(le)`
|
|
770
|
+
font-style: italic;
|
|
771
|
+
`, et = ({ tags: e }) => e.filter((t) => t.symbol).length ? /* @__PURE__ */ m(
|
|
772
|
+
it,
|
|
773
|
+
{
|
|
774
|
+
className: "humany-guide-list-tags",
|
|
775
|
+
items: e,
|
|
776
|
+
renderItem: ({ id: t, symbol: o, title: i }) => o && /* @__PURE__ */ m("li", { "data-tag": t, children: /* @__PURE__ */ m(rt, { size: 18, symbol: o, title: i }) }, t)
|
|
777
|
+
}
|
|
778
|
+
) : null;
|
|
779
|
+
O(({ title: e, id: t, route: o, symbolSize: i, collapseUri: r, children: n }, s) => {
|
|
780
|
+
const { params: d } = ce();
|
|
781
|
+
return /* @__PURE__ */ $(tt, { ref: s, "data-guide": t, children: [
|
|
782
|
+
/* @__PURE__ */ m(
|
|
783
|
+
B,
|
|
784
|
+
{
|
|
785
|
+
title: e,
|
|
786
|
+
"aria-label": e,
|
|
787
|
+
routeName: o,
|
|
788
|
+
params: j({
|
|
789
|
+
...d,
|
|
790
|
+
uriName: r || void 0,
|
|
791
|
+
id: void 0,
|
|
792
|
+
guide: void 0,
|
|
793
|
+
accordion: void 0
|
|
794
|
+
}),
|
|
795
|
+
text: e,
|
|
796
|
+
children: /* @__PURE__ */ m(
|
|
797
|
+
z,
|
|
798
|
+
{
|
|
799
|
+
size: i,
|
|
800
|
+
symbol: { type: "Svg", content: "caret-up" }
|
|
801
|
+
}
|
|
802
|
+
)
|
|
803
|
+
}
|
|
804
|
+
),
|
|
805
|
+
n
|
|
806
|
+
] });
|
|
807
|
+
});
|
|
808
|
+
const tt = c.li`
|
|
809
|
+
> a {
|
|
810
|
+
grid-column: 1/-1;
|
|
811
|
+
font-weight: bold;
|
|
812
|
+
margin: 0 0 ${(e) => {
|
|
813
|
+
var t;
|
|
814
|
+
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
815
|
+
}} 0;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
> div {
|
|
819
|
+
grid-column: 1/-1;
|
|
820
|
+
}
|
|
821
|
+
`;
|
|
822
|
+
O(
|
|
823
|
+
({
|
|
824
|
+
expandable: e = !1,
|
|
825
|
+
routing: t = {},
|
|
826
|
+
paramMappers: o = {},
|
|
827
|
+
symbolSize: i = 11,
|
|
828
|
+
pageRole: r = "link",
|
|
829
|
+
pageCaret: n = "down",
|
|
830
|
+
showTags: s = !1,
|
|
831
|
+
showFavoriteToggle: d = !1,
|
|
832
|
+
localPaging: f = !1,
|
|
833
|
+
onItemClick: h = () => {
|
|
834
|
+
},
|
|
835
|
+
dispatch: g = () => {
|
|
836
|
+
},
|
|
837
|
+
metadata: l = {},
|
|
838
|
+
pageLabel: u,
|
|
839
|
+
className: x,
|
|
840
|
+
children: v,
|
|
841
|
+
items: a,
|
|
842
|
+
renderItem: k,
|
|
843
|
+
addFavoriteTooltip: he,
|
|
844
|
+
removeFavoriteCancelLabel: ue,
|
|
845
|
+
removeFavoriteConfirmLabel: pe,
|
|
846
|
+
removeFavoriteHeader: ye,
|
|
847
|
+
removeFavoriteLabel: $e,
|
|
848
|
+
removeFavoriteTooltip: ve,
|
|
849
|
+
searchResultsEmptyLabel: be,
|
|
850
|
+
...J
|
|
851
|
+
}, xe) => {
|
|
852
|
+
const W = Be(), T = _e(), M = Ae(a), { guide: we = "guide", page: ke = "index" } = t, {
|
|
853
|
+
guide: ze = ({ id: p }) => j({ guide: p }),
|
|
854
|
+
page: Q = () => j()
|
|
855
|
+
} = o, [Ce, Ne] = Qe();
|
|
856
|
+
Le(xe, () => T.current);
|
|
857
|
+
const H = (p) => {
|
|
858
|
+
const { id: w, title: b, tags: C, published: Y, modified: D, publishedBy: E, modifiedBy: _ } = p;
|
|
859
|
+
return /* @__PURE__ */ $(
|
|
860
|
+
"li",
|
|
861
|
+
{
|
|
862
|
+
"data-guide": w,
|
|
863
|
+
"has-metadata": (!!(l != null && l.showPublished) && !!Y || !!(l != null && l.showModified) && !!D).toString(),
|
|
864
|
+
children: [
|
|
865
|
+
/* @__PURE__ */ m(
|
|
866
|
+
B,
|
|
867
|
+
{
|
|
868
|
+
className: "humany-guide-link",
|
|
869
|
+
title: b,
|
|
870
|
+
"aria-label": b,
|
|
871
|
+
routeName: we,
|
|
872
|
+
onClick: (De) => h(De, p),
|
|
873
|
+
params: ze(p),
|
|
874
|
+
text: b,
|
|
875
|
+
children: /* @__PURE__ */ m(
|
|
876
|
+
z,
|
|
877
|
+
{
|
|
878
|
+
size: i,
|
|
879
|
+
symbol: {
|
|
880
|
+
type: "Svg",
|
|
881
|
+
content: e ? "caret-down" : "caret-right"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
)
|
|
885
|
+
}
|
|
886
|
+
),
|
|
887
|
+
d && /* @__PURE__ */ m(
|
|
888
|
+
Ge,
|
|
889
|
+
{
|
|
890
|
+
guideTitle: b,
|
|
891
|
+
addFavoriteTooltip: he,
|
|
892
|
+
removeFavoriteCancelLabel: ue,
|
|
893
|
+
removeFavoriteConfirmLabel: pe,
|
|
894
|
+
removeFavoriteHeader: ye,
|
|
895
|
+
removeFavoriteLabel: $e,
|
|
896
|
+
removeFavoriteTooltip: ve,
|
|
897
|
+
isFavorite: Ce.indexOf(w) > -1,
|
|
898
|
+
actions: Ne,
|
|
899
|
+
id: w
|
|
900
|
+
}
|
|
901
|
+
),
|
|
902
|
+
s && /* @__PURE__ */ m(et, { tags: C }),
|
|
903
|
+
/* @__PURE__ */ m(
|
|
904
|
+
at,
|
|
905
|
+
{
|
|
906
|
+
...l,
|
|
907
|
+
indent: e ? void 0 : i,
|
|
908
|
+
modified: D,
|
|
909
|
+
published: Y,
|
|
910
|
+
publishedBy: E,
|
|
911
|
+
modifiedBy: _
|
|
912
|
+
}
|
|
913
|
+
)
|
|
914
|
+
]
|
|
915
|
+
},
|
|
916
|
+
w
|
|
917
|
+
);
|
|
918
|
+
}, Se = I(
|
|
919
|
+
(p, w, b) => k ? k(p, w, b, H) : H(p),
|
|
920
|
+
[k, H]
|
|
921
|
+
), Te = I(
|
|
922
|
+
(p) => {
|
|
923
|
+
f && (p.preventDefault(), g("page", Q()));
|
|
924
|
+
},
|
|
925
|
+
[g, f]
|
|
926
|
+
);
|
|
927
|
+
N(() => {
|
|
928
|
+
if (M && M.length < a.length && T.current) {
|
|
929
|
+
const p = T.current.querySelectorAll(
|
|
930
|
+
".humany-guide-list > ul > li"
|
|
931
|
+
), w = p[M.length];
|
|
932
|
+
if (p.length === a.length && M.length) {
|
|
933
|
+
const b = p[M.length];
|
|
934
|
+
if (b) {
|
|
935
|
+
const C = b.querySelector(
|
|
936
|
+
".humany-guide-link"
|
|
937
|
+
);
|
|
938
|
+
C && C.focus();
|
|
939
|
+
}
|
|
940
|
+
} else
|
|
941
|
+
w && new MutationObserver((C, Y) => {
|
|
942
|
+
C.forEach((D) => {
|
|
943
|
+
if (D.addedNodes) {
|
|
944
|
+
const E = Array.from(
|
|
945
|
+
D.addedNodes
|
|
946
|
+
).find((_) => _.tagName === "A");
|
|
947
|
+
E && Re(T.current, document.activeElement) && (W && E.focus(), Y.disconnect());
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
}).observe(w, {
|
|
951
|
+
attributes: !1,
|
|
952
|
+
characterData: !1,
|
|
953
|
+
childList: !0,
|
|
954
|
+
subtree: !0,
|
|
955
|
+
attributeOldValue: !1,
|
|
956
|
+
characterDataOldValue: !1
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
const Me = !!Object.keys(l).filter(
|
|
961
|
+
(p) => typeof l[p] < "u"
|
|
962
|
+
).length;
|
|
963
|
+
return /* @__PURE__ */ $(
|
|
964
|
+
ot,
|
|
965
|
+
{
|
|
966
|
+
className: S(x, "humany-guide-list"),
|
|
967
|
+
"data-item-count": a.length,
|
|
968
|
+
items: a,
|
|
969
|
+
renderItem: Se,
|
|
970
|
+
isTabbing: W,
|
|
971
|
+
expandable: e ? "true" : "false",
|
|
972
|
+
"grid-items": s || d || Me ? "true" : "false",
|
|
973
|
+
...me(J),
|
|
974
|
+
ref: T,
|
|
975
|
+
children: [
|
|
976
|
+
u ? /* @__PURE__ */ m(
|
|
977
|
+
B,
|
|
978
|
+
{
|
|
979
|
+
text: u,
|
|
980
|
+
title: u,
|
|
981
|
+
"aria-label": u,
|
|
982
|
+
routeName: ke,
|
|
983
|
+
role: r,
|
|
984
|
+
params: Q(),
|
|
985
|
+
onClick: Te,
|
|
986
|
+
children: /* @__PURE__ */ m(
|
|
987
|
+
z,
|
|
988
|
+
{
|
|
989
|
+
size: i,
|
|
990
|
+
symbol: { type: "Svg", content: `caret-${n}` }
|
|
991
|
+
}
|
|
992
|
+
)
|
|
993
|
+
}
|
|
994
|
+
) : null,
|
|
995
|
+
v,
|
|
996
|
+
!J["data-loading"] && a.length === 0 && /* @__PURE__ */ m("p", { children: be })
|
|
997
|
+
]
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
1002
|
+
const ot = c(A)`
|
|
1003
|
+
${P}
|
|
1004
|
+
padding: ${(e) => {
|
|
1005
|
+
var t;
|
|
1006
|
+
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
1007
|
+
}};
|
|
1008
|
+
overflow: auto;
|
|
1009
|
+
justify-content: flex-start;
|
|
1010
|
+
white-space: nowrap;
|
|
1011
|
+
font-weight: 300;
|
|
1012
|
+
text-decoration: none;
|
|
1013
|
+
|
|
1014
|
+
> div {
|
|
1015
|
+
${(e) => q(e)(
|
|
1016
|
+
"> h1",
|
|
1017
|
+
y`
|
|
1018
|
+
white-space: pre-wrap;
|
|
1019
|
+
`
|
|
1020
|
+
)}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
> ul > li {
|
|
1024
|
+
${(e) => {
|
|
1025
|
+
var t, o;
|
|
1026
|
+
return e["grid-items"] === "true" && y`
|
|
1027
|
+
display: grid;
|
|
1028
|
+
grid-template-columns: auto 1fr 1fr;
|
|
1029
|
+
gap: 0px 0px;
|
|
1030
|
+
grid-template-areas: '. favorite tags';
|
|
1031
|
+
align-items: center;
|
|
1032
|
+
|
|
1033
|
+
> button {
|
|
1034
|
+
margin: 0 0 0 ${(t = e.theme.sizes) == null ? void 0 : t.small};
|
|
1035
|
+
|
|
1036
|
+
&[data-favorite='false'] {
|
|
1037
|
+
${e.isTabbing ? "opacity: 0;" : "display: none;"};
|
|
1038
|
+
&:focus {
|
|
1039
|
+
opacity: 1;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
> span {
|
|
1045
|
+
font-size: ${(o = e.theme.fonts) == null ? void 0 : o.small};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
&:hover {
|
|
1049
|
+
button[data-favorite='false'] {
|
|
1050
|
+
display: flex;
|
|
1051
|
+
justify-self: flex-start;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
&[has-metadata='true'] {
|
|
1056
|
+
grid-template-rows: 1fr 1fr;
|
|
1057
|
+
grid-template-areas:
|
|
1058
|
+
'. favorite tags'
|
|
1059
|
+
'metadata metadata metadata';
|
|
1060
|
+
}
|
|
1061
|
+
`;
|
|
1062
|
+
}}
|
|
1063
|
+
> a {
|
|
1064
|
+
color: ${(e) => {
|
|
1065
|
+
var t;
|
|
1066
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1067
|
+
}};
|
|
1068
|
+
overflow: hidden;
|
|
1069
|
+
text-overflow: ellipsis;
|
|
1070
|
+
max-width: 100%;
|
|
1071
|
+
display: inline-block;
|
|
1072
|
+
|
|
1073
|
+
svg {
|
|
1074
|
+
margin: 0 calc(${(e) => {
|
|
1075
|
+
var t;
|
|
1076
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
1077
|
+
}}*2) 0 0;
|
|
1078
|
+
line {
|
|
1079
|
+
stroke: ${(e) => {
|
|
1080
|
+
var t;
|
|
1081
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1082
|
+
}};
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
${(e) => {
|
|
1087
|
+
var t;
|
|
1088
|
+
return e.expandable === "true" && y`
|
|
1089
|
+
display: flex;
|
|
1090
|
+
flex-direction: row-reverse;
|
|
1091
|
+
justify-content: flex-end;
|
|
1092
|
+
align-items: center;
|
|
1093
|
+
|
|
1094
|
+
span {
|
|
1095
|
+
overflow: hidden;
|
|
1096
|
+
text-overflow: ellipsis;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
svg {
|
|
1100
|
+
margin: 0 0 0 ${(t = e.theme.sizes) == null ? void 0 : t.small};
|
|
1101
|
+
}
|
|
1102
|
+
`;
|
|
1103
|
+
}}
|
|
1104
|
+
|
|
1105
|
+
&:focus-visible {
|
|
1106
|
+
${K}
|
|
1107
|
+
text-decoration: underline;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
@media (hover: hover) {
|
|
1111
|
+
&:hover {
|
|
1112
|
+
text-decoration: underline;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
> a {
|
|
1119
|
+
color: ${(e) => {
|
|
1120
|
+
var t;
|
|
1121
|
+
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
1122
|
+
}};
|
|
1123
|
+
margin: ${(e) => {
|
|
1124
|
+
var t;
|
|
1125
|
+
return (t = e.theme.sizes) == null ? void 0 : t.normal;
|
|
1126
|
+
}} 0 0;
|
|
1127
|
+
align-self: flex-start;
|
|
1128
|
+
align-items: center;
|
|
1129
|
+
display: flex;
|
|
1130
|
+
|
|
1131
|
+
span {
|
|
1132
|
+
text-decoration: underline;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
svg {
|
|
1136
|
+
margin: 0 calc(${(e) => {
|
|
1137
|
+
var t;
|
|
1138
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
1139
|
+
}}*2) 0 0;
|
|
1140
|
+
line {
|
|
1141
|
+
stroke: ${(e) => {
|
|
1142
|
+
var t;
|
|
1143
|
+
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
1144
|
+
}};
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
&:focus-visible {
|
|
1149
|
+
${K}
|
|
1150
|
+
text-decoration: underline;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
`, it = c(V)`
|
|
1154
|
+
${ne}
|
|
1155
|
+
display: flex;
|
|
1156
|
+
margin: 0 0 0 auto;
|
|
1157
|
+
grid-area: tags;
|
|
1158
|
+
|
|
1159
|
+
li,
|
|
1160
|
+
li:last-child {
|
|
1161
|
+
margin: 0 0 0 ${(e) => {
|
|
1162
|
+
var t;
|
|
1163
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
1164
|
+
}};
|
|
1165
|
+
display: flex;
|
|
1166
|
+
align-items: center;
|
|
1167
|
+
justify-content: space-between;
|
|
1168
|
+
}
|
|
1169
|
+
`, rt = c(z)`
|
|
1170
|
+
display: block;
|
|
1171
|
+
color: ${(e) => {
|
|
1172
|
+
var t;
|
|
1173
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1174
|
+
}};
|
|
1175
|
+
${(e) => {
|
|
1176
|
+
if (e.symbol.type === "Uri")
|
|
1177
|
+
return `
|
|
1178
|
+
width: ${e.size}px;
|
|
1179
|
+
height: ${e.size}px;
|
|
1180
|
+
`;
|
|
1181
|
+
if (e.symbol.type === "FontAwesome")
|
|
1182
|
+
return `
|
|
1183
|
+
font-size: ${e.size}px;
|
|
1184
|
+
`;
|
|
1185
|
+
}}
|
|
1186
|
+
`, at = c(Xe)`
|
|
1187
|
+
grid-area: metadata;
|
|
1188
|
+
text-overflow: ellipsis;
|
|
1189
|
+
overflow: hidden;
|
|
1190
|
+
font-size: ${(e) => {
|
|
1191
|
+
var t;
|
|
1192
|
+
return (t = e.theme.fonts) == null ? void 0 : t.small;
|
|
1193
|
+
}};
|
|
1194
|
+
${(e) => {
|
|
1195
|
+
var t;
|
|
1196
|
+
return typeof e.indent == "number" && `text-indent: calc(${(t = e.theme.sizes) == null ? void 0 : t.small} * 2 + ${e.indent}px);`;
|
|
1197
|
+
}}
|
|
1198
|
+
`, nt = fe`
|
|
1199
|
+
100% {
|
|
1200
|
+
transform: rotate(360deg);
|
|
1201
|
+
}
|
|
1202
|
+
`, st = fe`
|
|
1203
|
+
0% {
|
|
1204
|
+
stroke-dasharray: 1, 200;
|
|
1205
|
+
stroke-dashoffset: 0;
|
|
1206
|
+
}
|
|
1207
|
+
50% {
|
|
1208
|
+
stroke-dasharray: 89, 200;
|
|
1209
|
+
stroke-dashoffset: -35px;
|
|
1210
|
+
}
|
|
1211
|
+
100% {
|
|
1212
|
+
stroke-dasharray: 89, 200;
|
|
1213
|
+
stroke-dashoffset: -124px;
|
|
1214
|
+
}
|
|
1215
|
+
`;
|
|
1216
|
+
c.svg`
|
|
1217
|
+
animation: ${nt} 2s linear infinite;
|
|
1218
|
+
height: 100%;
|
|
1219
|
+
transform-origin: center center;
|
|
1220
|
+
width: 100%;
|
|
1221
|
+
position: absolute;
|
|
1222
|
+
top: 0;
|
|
1223
|
+
bottom: 0;
|
|
1224
|
+
left: 0;
|
|
1225
|
+
right: 0;
|
|
1226
|
+
margin: auto;
|
|
1227
|
+
transition: 200ms ease-out opacity;
|
|
1228
|
+
`;
|
|
1229
|
+
c.div`
|
|
1230
|
+
position: absolute;
|
|
1231
|
+
top: 0;
|
|
1232
|
+
bottom: 0;
|
|
1233
|
+
left: 0;
|
|
1234
|
+
right: 0;
|
|
1235
|
+
height: 100%;
|
|
1236
|
+
width: 100%;
|
|
1237
|
+
pointer-events: ${(e) => e["data-loading"] ? "all" : "none"};
|
|
1238
|
+
display: flex;
|
|
1239
|
+
flex-direction: column;
|
|
1240
|
+
justify-content: center;
|
|
1241
|
+
transition: 200ms ease-out opacity;
|
|
1242
|
+
box-sizing: border-box;
|
|
1243
|
+
overflow: hidden;
|
|
1244
|
+
|
|
1245
|
+
.humany-spinner-svg {
|
|
1246
|
+
opacity: ${(e) => e["data-loading"] ? "1" : "0"};
|
|
1247
|
+
}
|
|
1248
|
+
`;
|
|
1249
|
+
c.div`
|
|
1250
|
+
position: relative;
|
|
1251
|
+
margin: 0 auto;
|
|
1252
|
+
width: 100px;
|
|
1253
|
+
&:before {
|
|
1254
|
+
content: '';
|
|
1255
|
+
display: block;
|
|
1256
|
+
padding-top: 100%;
|
|
1257
|
+
}
|
|
1258
|
+
`;
|
|
1259
|
+
c.circle`
|
|
1260
|
+
stroke-dasharray: 1, 200;
|
|
1261
|
+
stroke-dashoffset: 0;
|
|
1262
|
+
animation: ${st} 1.5s ease-in-out infinite;
|
|
1263
|
+
stroke-linecap: round;
|
|
1264
|
+
stroke: ${(e) => {
|
|
1265
|
+
var t;
|
|
1266
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1267
|
+
}};
|
|
1268
|
+
stroke-width: 2px;
|
|
1269
|
+
`;
|
|
1270
|
+
c(Z)`
|
|
1271
|
+
display: flex;
|
|
1272
|
+
justify-content: space-between;
|
|
1273
|
+
align-items: center;
|
|
1274
|
+
width: 100%;
|
|
1275
|
+
text-align: left;
|
|
1276
|
+
svg,
|
|
1277
|
+
i {
|
|
1278
|
+
color: ${(e) => {
|
|
1279
|
+
var t;
|
|
1280
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1281
|
+
}};
|
|
1282
|
+
}
|
|
1283
|
+
span {
|
|
1284
|
+
color: ${(e) => {
|
|
1285
|
+
var t;
|
|
1286
|
+
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
1287
|
+
}};
|
|
1288
|
+
font-size: ${(e) => {
|
|
1289
|
+
var t;
|
|
1290
|
+
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
1291
|
+
}};
|
|
1292
|
+
overflow: hidden;
|
|
1293
|
+
text-overflow: ellipsis;
|
|
1294
|
+
flex: 1;
|
|
1295
|
+
white-space: nowrap;
|
|
1296
|
+
}
|
|
1297
|
+
&:focus-visible {
|
|
1298
|
+
${K}
|
|
1299
|
+
span {
|
|
1300
|
+
color: ${(e) => {
|
|
1301
|
+
var t;
|
|
1302
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1303
|
+
}};
|
|
1304
|
+
text-decoration: underline;
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
`;
|
|
1308
|
+
c(A)`
|
|
1309
|
+
${qe}
|
|
1310
|
+
${P}
|
|
1311
|
+
overflow: hidden;
|
|
1312
|
+
justify-content: flex-start;
|
|
1313
|
+
padding: ${(e) => {
|
|
1314
|
+
var t;
|
|
1315
|
+
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
1316
|
+
}};
|
|
1317
|
+
${(e) => !e["data-show-header"] && y`
|
|
1318
|
+
> div {
|
|
1319
|
+
${q(e)(
|
|
1320
|
+
"h1",
|
|
1321
|
+
y`
|
|
1322
|
+
display: none;
|
|
1323
|
+
`
|
|
1324
|
+
)}
|
|
1325
|
+
}
|
|
1326
|
+
`}
|
|
1327
|
+
|
|
1328
|
+
@media (hover: hover) {
|
|
1329
|
+
button:hover {
|
|
1330
|
+
text-decoration: underline;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
`;
|
|
1334
|
+
c(Pe)`
|
|
1335
|
+
${Oe}
|
|
1336
|
+
font-weight: 300;
|
|
1337
|
+
|
|
1338
|
+
p {
|
|
1339
|
+
white-space: normal;
|
|
1340
|
+
}
|
|
1341
|
+
`;
|
|
1342
|
+
c.li`
|
|
1343
|
+
.humany-paragraph {
|
|
1344
|
+
display: none;
|
|
1345
|
+
&:not(:only-child) {
|
|
1346
|
+
${(e) => {
|
|
1347
|
+
var t, o, i;
|
|
1348
|
+
return ((t = e.theme.sizes) == null ? void 0 : t.cardinal) && ((o = e.theme.sizes) == null ? void 0 : o.normal) && y`
|
|
1349
|
+
margin: ${(i = e.theme.sizes) == null ? void 0 : i.normal} 0;
|
|
1350
|
+
`;
|
|
1351
|
+
}}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
${(e) => e["data-expanded"] && y`
|
|
1356
|
+
.humany-paragraph {
|
|
1357
|
+
display: block;
|
|
1358
|
+
}
|
|
1359
|
+
`}
|
|
1360
|
+
|
|
1361
|
+
> span {
|
|
1362
|
+
display: block;
|
|
1363
|
+
font-weight: 300;
|
|
1364
|
+
color: ${(e) => {
|
|
1365
|
+
var t;
|
|
1366
|
+
return (t = e.theme.colors) == null ? void 0 : t.accent;
|
|
1367
|
+
}};
|
|
1368
|
+
}
|
|
1369
|
+
`;
|
|
1370
|
+
c(z)`
|
|
1371
|
+
margin: 0 0 0 ${(e) => {
|
|
1372
|
+
var t;
|
|
1373
|
+
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
1374
|
+
}};
|
|
1375
|
+
line {
|
|
1376
|
+
stroke: ${(e) => {
|
|
1377
|
+
var t;
|
|
1378
|
+
return (t = e.theme.colors) == null ? void 0 : t.primary;
|
|
1379
|
+
}};
|
|
1380
|
+
}
|
|
1381
|
+
`;
|
|
1382
|
+
c(ge)`
|
|
1383
|
+
font-size: ${(e) => {
|
|
1384
|
+
var t;
|
|
1385
|
+
return (t = e.theme.fonts) == null ? void 0 : t.small;
|
|
1386
|
+
}};
|
|
1387
|
+
font-weight: 300;
|
|
1388
|
+
`;
|
|
1389
|
+
const dt = () => {
|
|
1390
|
+
const e = U();
|
|
1391
|
+
return N(() => {
|
|
1392
|
+
console.log("container ", e, e.get("$widget"));
|
|
1393
|
+
}, [e]), /* @__PURE__ */ m("div", { children: "Hej" });
|
|
1394
|
+
};
|
|
1395
|
+
export {
|
|
1396
|
+
dt as default
|
|
1397
|
+
};
|