rk-designsystem 1.1.61 → 1.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/componentlibrary.es.js +963 -863
- package/dist/componentlibrary.umd.js +16 -14
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Alert as
|
|
4
|
-
import { startOfMonth as ve, isValid as
|
|
5
|
-
import { ChevronLeftIcon as
|
|
6
|
-
const Qn = me((t, e) => /* @__PURE__ */ d(
|
|
1
|
+
import { jsx as d, jsxs as E, Fragment as Ht } from "react/jsx-runtime";
|
|
2
|
+
import $t, { forwardRef as me, useState as ne, useEffect as q, useMemo as be, useCallback as se, useRef as Oe, createContext as Ut, useContext as Ot } from "react";
|
|
3
|
+
import { Alert as Vt, Avatar as Kt, BadgePosition as qt, Badge as Yt, Breadcrumbs as Jt, BreadcrumbsList as Zt, BreadcrumbsItem as Qt, BreadcrumbsLink as Xt, Button as Ve, Card as en, CardBlock as tn, Checkbox as nn, useCheckboxGroup as on, Fieldset as St, Chip as rn, Spinner as sn, Details as an, Dialog as ln, Divider as dn, Dropdown as cn, ErrorSummary as un, Field as mn, FieldDescription as pn, FieldCounter as gn, Heading as fn, Input as hn, Label as kn, Link as vn, List as yn, Pagination as bn, usePagination as Tn, Paragraph as Sn, Popover as xn, Radio as wn, useRadioGroup as Cn, Search as In, SearchInput as Dn, SearchClear as An, SearchButton as _n, Select as jn, Skeleton as Ln, SkipLink as En, EXPERIMENTAL_Suggestion as Fn, Switch as Mn, Table as Bn, Tabs as Nn, Tag as Pn, Textarea as zn, Textfield as Rn, ToggleGroup as Gn, Tooltip as Wn, ValidationMessage as Hn } from "@digdir/designsystemet-react";
|
|
4
|
+
import { startOfMonth as ve, isValid as He, isSameMonth as ct, startOfWeek as xt, format as xe, addDays as wt, subMonths as $n, addMonths as Un, isSameDay as On, isToday as Vn, eachDayOfInterval as Kn } from "date-fns";
|
|
5
|
+
import { ChevronLeftIcon as qn, ChevronRightIcon as Yn, ChevronDownIcon as ut, XMarkIcon as mt, MagnifyingGlassIcon as pt, MenuHamburgerIcon as Jn, HeartIcon as Zn } from "@navikt/aksel-icons";
|
|
6
|
+
const Qn = me((t, e) => /* @__PURE__ */ d(Vt, { ref: e, ...t }));
|
|
7
7
|
Qn.displayName = "Alert";
|
|
8
|
-
const Ct = me((t, e) => /* @__PURE__ */ d(
|
|
8
|
+
const Ct = me((t, e) => /* @__PURE__ */ d(Kt, { ref: e, ...t }));
|
|
9
9
|
Ct.displayName = "Avatar";
|
|
10
10
|
const Xn = me((t, e) => /* @__PURE__ */ d(Yt, { ref: e, ...t }));
|
|
11
11
|
Xn.displayName = "Badge";
|
|
12
|
-
const ui =
|
|
12
|
+
const ui = qt, mi = Jt, pi = Zt, gi = Qt, fi = Xt, Te = Ve;
|
|
13
13
|
Te.displayName = "Button";
|
|
14
14
|
const eo = en, hi = tn;
|
|
15
15
|
eo.displayName = "Card";
|
|
16
|
-
const to = nn, no =
|
|
16
|
+
const to = nn, no = St, ki = on;
|
|
17
17
|
to.displayName = "Checkbox";
|
|
18
18
|
no.displayName = "Fieldset";
|
|
19
19
|
const vi = rn;
|
|
20
|
-
function
|
|
20
|
+
function $e(t) {
|
|
21
21
|
return (e = {}) => {
|
|
22
22
|
const n = e.width ? String(e.width) : t.defaultWidth;
|
|
23
23
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
@@ -43,17 +43,17 @@ function Ce(t) {
|
|
|
43
43
|
const r = n.width, i = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], s = e.match(i);
|
|
44
44
|
if (!s)
|
|
45
45
|
return null;
|
|
46
|
-
const o = s[0], l = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], a = Array.isArray(l) ? ro(l, (
|
|
46
|
+
const o = s[0], l = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], a = Array.isArray(l) ? ro(l, (g) => g.test(o)) : (
|
|
47
47
|
// [TODO] -- I challenge you to fix the type
|
|
48
|
-
oo(l, (
|
|
48
|
+
oo(l, (g) => g.test(o))
|
|
49
49
|
);
|
|
50
50
|
let c;
|
|
51
51
|
c = t.valueCallback ? t.valueCallback(a) : a, c = n.valueCallback ? (
|
|
52
52
|
// [TODO] -- I challenge you to fix the type
|
|
53
53
|
n.valueCallback(c)
|
|
54
54
|
) : c;
|
|
55
|
-
const
|
|
56
|
-
return { value: c, rest:
|
|
55
|
+
const y = e.slice(o.length);
|
|
56
|
+
return { value: c, rest: y };
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function oo(t, e) {
|
|
@@ -160,26 +160,26 @@ const io = {
|
|
|
160
160
|
medium: "{{date}} {{time}}",
|
|
161
161
|
short: "{{date}} {{time}}"
|
|
162
162
|
}, mo = {
|
|
163
|
-
date:
|
|
163
|
+
date: $e({
|
|
164
164
|
formats: lo,
|
|
165
165
|
defaultWidth: "full"
|
|
166
166
|
}),
|
|
167
|
-
time:
|
|
167
|
+
time: $e({
|
|
168
168
|
formats: co,
|
|
169
169
|
defaultWidth: "full"
|
|
170
170
|
}),
|
|
171
|
-
dateTime:
|
|
171
|
+
dateTime: $e({
|
|
172
172
|
formats: uo,
|
|
173
173
|
defaultWidth: "full"
|
|
174
174
|
})
|
|
175
|
-
},
|
|
175
|
+
}, po = {
|
|
176
176
|
lastWeek: "'forrige' eeee 'kl.' p",
|
|
177
177
|
yesterday: "'i går kl.' p",
|
|
178
178
|
today: "'i dag kl.' p",
|
|
179
179
|
tomorrow: "'i morgen kl.' p",
|
|
180
180
|
nextWeek: "EEEE 'kl.' p",
|
|
181
181
|
other: "P"
|
|
182
|
-
},
|
|
182
|
+
}, go = (t, e, n, r) => po[t], fo = {
|
|
183
183
|
narrow: ["f.Kr.", "e.Kr."],
|
|
184
184
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
185
185
|
wide: ["før Kristus", "etter Kristus"]
|
|
@@ -230,7 +230,7 @@ const io = {
|
|
|
230
230
|
"fredag",
|
|
231
231
|
"lørdag"
|
|
232
232
|
]
|
|
233
|
-
},
|
|
233
|
+
}, yo = {
|
|
234
234
|
narrow: {
|
|
235
235
|
am: "a",
|
|
236
236
|
pm: "p",
|
|
@@ -261,8 +261,8 @@ const io = {
|
|
|
261
261
|
evening: "på kvelden",
|
|
262
262
|
night: "på natten"
|
|
263
263
|
}
|
|
264
|
-
},
|
|
265
|
-
ordinalNumber:
|
|
264
|
+
}, bo = (t, e) => Number(t) + ".", To = {
|
|
265
|
+
ordinalNumber: bo,
|
|
266
266
|
era: we({
|
|
267
267
|
values: fo,
|
|
268
268
|
defaultWidth: "wide"
|
|
@@ -281,26 +281,26 @@ const io = {
|
|
|
281
281
|
defaultWidth: "wide"
|
|
282
282
|
}),
|
|
283
283
|
dayPeriod: we({
|
|
284
|
-
values:
|
|
284
|
+
values: yo,
|
|
285
285
|
defaultWidth: "wide"
|
|
286
286
|
})
|
|
287
|
-
},
|
|
287
|
+
}, So = /^(\d+)\.?/i, xo = /\d+/i, wo = {
|
|
288
288
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
289
289
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
290
290
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
291
291
|
}, Co = {
|
|
292
292
|
any: [/^f/i, /^e/i]
|
|
293
|
-
},
|
|
293
|
+
}, Io = {
|
|
294
294
|
narrow: /^[1234]/i,
|
|
295
295
|
abbreviated: /^q[1234]/i,
|
|
296
296
|
wide: /^[1234](\.)? kvartal/i
|
|
297
|
-
},
|
|
297
|
+
}, Do = {
|
|
298
298
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
299
299
|
}, Ao = {
|
|
300
300
|
narrow: /^[jfmasond]/i,
|
|
301
301
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
302
302
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
303
|
-
},
|
|
303
|
+
}, _o = {
|
|
304
304
|
narrow: [
|
|
305
305
|
/^j/i,
|
|
306
306
|
/^f/i,
|
|
@@ -329,17 +329,17 @@ const io = {
|
|
|
329
329
|
/^n/i,
|
|
330
330
|
/^d/i
|
|
331
331
|
]
|
|
332
|
-
},
|
|
332
|
+
}, jo = {
|
|
333
333
|
narrow: /^[smtofl]/i,
|
|
334
334
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
335
335
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
336
336
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
337
|
-
},
|
|
337
|
+
}, Lo = {
|
|
338
338
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
339
|
-
},
|
|
339
|
+
}, Eo = {
|
|
340
340
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
341
341
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
342
|
-
},
|
|
342
|
+
}, Fo = {
|
|
343
343
|
any: {
|
|
344
344
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
345
345
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -350,10 +350,10 @@ const io = {
|
|
|
350
350
|
evening: /kveld/i,
|
|
351
351
|
night: /natt/i
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, Mo = {
|
|
354
354
|
ordinalNumber: so({
|
|
355
|
-
matchPattern:
|
|
356
|
-
parsePattern:
|
|
355
|
+
matchPattern: So,
|
|
356
|
+
parsePattern: xo,
|
|
357
357
|
valueCallback: (t) => parseInt(t, 10)
|
|
358
358
|
}),
|
|
359
359
|
era: Ce({
|
|
@@ -363,42 +363,42 @@ const io = {
|
|
|
363
363
|
defaultParseWidth: "any"
|
|
364
364
|
}),
|
|
365
365
|
quarter: Ce({
|
|
366
|
-
matchPatterns:
|
|
366
|
+
matchPatterns: Io,
|
|
367
367
|
defaultMatchWidth: "wide",
|
|
368
|
-
parsePatterns:
|
|
368
|
+
parsePatterns: Do,
|
|
369
369
|
defaultParseWidth: "any",
|
|
370
370
|
valueCallback: (t) => t + 1
|
|
371
371
|
}),
|
|
372
372
|
month: Ce({
|
|
373
373
|
matchPatterns: Ao,
|
|
374
374
|
defaultMatchWidth: "wide",
|
|
375
|
-
parsePatterns:
|
|
375
|
+
parsePatterns: _o,
|
|
376
376
|
defaultParseWidth: "any"
|
|
377
377
|
}),
|
|
378
378
|
day: Ce({
|
|
379
|
-
matchPatterns:
|
|
379
|
+
matchPatterns: jo,
|
|
380
380
|
defaultMatchWidth: "wide",
|
|
381
|
-
parsePatterns:
|
|
381
|
+
parsePatterns: Lo,
|
|
382
382
|
defaultParseWidth: "any"
|
|
383
383
|
}),
|
|
384
384
|
dayPeriod: Ce({
|
|
385
|
-
matchPatterns:
|
|
385
|
+
matchPatterns: Eo,
|
|
386
386
|
defaultMatchWidth: "any",
|
|
387
|
-
parsePatterns:
|
|
387
|
+
parsePatterns: Fo,
|
|
388
388
|
defaultParseWidth: "any"
|
|
389
389
|
})
|
|
390
|
-
},
|
|
390
|
+
}, ye = {
|
|
391
391
|
code: "nb",
|
|
392
392
|
formatDistance: ao,
|
|
393
393
|
formatLong: mo,
|
|
394
|
-
formatRelative:
|
|
394
|
+
formatRelative: go,
|
|
395
395
|
localize: To,
|
|
396
|
-
match:
|
|
396
|
+
match: Mo,
|
|
397
397
|
options: {
|
|
398
398
|
weekStartsOn: 1,
|
|
399
399
|
firstWeekContainsDate: 4
|
|
400
400
|
}
|
|
401
|
-
},
|
|
401
|
+
}, It = ({ title: t, ...e }) => /* @__PURE__ */ E(
|
|
402
402
|
"svg",
|
|
403
403
|
{
|
|
404
404
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -423,8 +423,8 @@ const io = {
|
|
|
423
423
|
]
|
|
424
424
|
}
|
|
425
425
|
);
|
|
426
|
-
|
|
427
|
-
const
|
|
426
|
+
It.displayName = "ChevronLeftIcon";
|
|
427
|
+
const Dt = ({ title: t, ...e }) => /* @__PURE__ */ E(
|
|
428
428
|
"svg",
|
|
429
429
|
{
|
|
430
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -449,22 +449,22 @@ const It = ({ title: t, ...e }) => /* @__PURE__ */ B(
|
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
calendarContainer:
|
|
455
|
-
calendarHeader:
|
|
456
|
-
monthYear:
|
|
452
|
+
Dt.displayName = "ChevronRightIcon";
|
|
453
|
+
const Bo = "_calendarContainer_10l5p_1", No = "_calendarHeader_10l5p_14", Po = "_monthYear_10l5p_21", zo = "_navigationButtons_10l5p_32", Ro = "_grid_10l5p_41", Go = "_dayNameCell_10l5p_48", Wo = "_dateCell_10l5p_65", Ho = "_dateNumberContainer_10l5p_90", $o = "_otherMonth_10l5p_103", Uo = "_selectedDate_10l5p_129", re = {
|
|
454
|
+
calendarContainer: Bo,
|
|
455
|
+
calendarHeader: No,
|
|
456
|
+
monthYear: Po,
|
|
457
457
|
navigationButtons: zo,
|
|
458
458
|
grid: Ro,
|
|
459
|
-
dayNameCell:
|
|
460
|
-
dateCell:
|
|
461
|
-
dateNumberContainer:
|
|
462
|
-
otherMonth:
|
|
463
|
-
selectedDate:
|
|
464
|
-
},
|
|
465
|
-
const e = ve(t), n =
|
|
466
|
-
return
|
|
467
|
-
},
|
|
459
|
+
dayNameCell: Go,
|
|
460
|
+
dateCell: Wo,
|
|
461
|
+
dateNumberContainer: Ho,
|
|
462
|
+
otherMonth: $o,
|
|
463
|
+
selectedDate: Uo
|
|
464
|
+
}, Oo = (t) => {
|
|
465
|
+
const e = ve(t), n = xt(e, { locale: ye }), r = wt(n, 41);
|
|
466
|
+
return Kn({ start: n, end: r });
|
|
467
|
+
}, gt = (t) => t && t.charAt(0).toUpperCase() + t.slice(1), Vo = ({
|
|
468
468
|
initialDate: t = /* @__PURE__ */ new Date(),
|
|
469
469
|
selectedDate: e = null,
|
|
470
470
|
// Prop for valgt dato
|
|
@@ -475,91 +475,91 @@ const Mo = "_calendarContainer_10l5p_1", Eo = "_calendarHeader_10l5p_14", _o = "
|
|
|
475
475
|
// <-- Destrukturert
|
|
476
476
|
}) => {
|
|
477
477
|
const [s, o] = ne(
|
|
478
|
-
ve(e &&
|
|
478
|
+
ve(e && He(e) ? e : t)
|
|
479
479
|
);
|
|
480
|
-
|
|
481
|
-
if (e &&
|
|
480
|
+
q(() => {
|
|
481
|
+
if (e && He(e)) {
|
|
482
482
|
const u = ve(e);
|
|
483
483
|
ct(u, s) || o(u);
|
|
484
484
|
}
|
|
485
485
|
}, [e]);
|
|
486
|
-
const l =
|
|
487
|
-
() =>
|
|
486
|
+
const l = be(() => ve(/* @__PURE__ */ new Date()), []), a = be(() => !1, [s, l]), c = be(
|
|
487
|
+
() => Oo(s),
|
|
488
488
|
[s]
|
|
489
|
-
),
|
|
490
|
-
const u =
|
|
491
|
-
return Array.from({ length: 7 }).map((T,
|
|
492
|
-
const A =
|
|
493
|
-
return
|
|
489
|
+
), y = be(() => {
|
|
490
|
+
const u = xt(/* @__PURE__ */ new Date(), { locale: ye });
|
|
491
|
+
return Array.from({ length: 7 }).map((T, _) => {
|
|
492
|
+
const A = xe(wt(u, _), "EEEEEE", { locale: ye });
|
|
493
|
+
return gt(A);
|
|
494
494
|
});
|
|
495
|
-
}, []),
|
|
496
|
-
a || o((u) => ve(
|
|
495
|
+
}, []), g = se(() => {
|
|
496
|
+
a || o((u) => ve($n(u, 1)));
|
|
497
497
|
}, [a]), k = se(() => {
|
|
498
|
-
o((u) => ve(
|
|
499
|
-
}, []),
|
|
498
|
+
o((u) => ve(Un(u, 1)));
|
|
499
|
+
}, []), p = se(
|
|
500
500
|
(u) => {
|
|
501
501
|
n && n(u);
|
|
502
502
|
},
|
|
503
503
|
[n]
|
|
504
504
|
), f = se(
|
|
505
505
|
(u, T) => {
|
|
506
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(),
|
|
506
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), p(T));
|
|
507
507
|
},
|
|
508
|
-
[
|
|
509
|
-
), h =
|
|
510
|
-
return /* @__PURE__ */
|
|
508
|
+
[p]
|
|
509
|
+
), h = xe(s, "MMMM", { locale: ye }), v = xe(s, "yyyy", { locale: ye }), m = `${gt(h)} ${v}`;
|
|
510
|
+
return /* @__PURE__ */ E(
|
|
511
511
|
"div",
|
|
512
512
|
{
|
|
513
513
|
className: re.calendarContainer,
|
|
514
514
|
"data-color": r,
|
|
515
515
|
"data-size": i,
|
|
516
516
|
children: [
|
|
517
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ E("div", { className: re.calendarHeader, children: [
|
|
518
518
|
/* @__PURE__ */ d("span", { className: re.monthYear, children: m }),
|
|
519
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ E("div", { className: re.navigationButtons, children: [
|
|
520
520
|
/* @__PURE__ */ d(
|
|
521
|
-
|
|
521
|
+
Ve,
|
|
522
522
|
{
|
|
523
523
|
variant: "tertiary",
|
|
524
524
|
icon: !0,
|
|
525
|
-
onClick:
|
|
525
|
+
onClick: g,
|
|
526
526
|
"aria-label": "Forrige måned",
|
|
527
527
|
disabled: a,
|
|
528
|
-
children: /* @__PURE__ */ d(
|
|
528
|
+
children: /* @__PURE__ */ d(It, {})
|
|
529
529
|
}
|
|
530
530
|
),
|
|
531
531
|
/* @__PURE__ */ d(
|
|
532
|
-
|
|
532
|
+
Ve,
|
|
533
533
|
{
|
|
534
534
|
variant: "tertiary",
|
|
535
535
|
icon: !0,
|
|
536
536
|
onClick: k,
|
|
537
537
|
"aria-label": "Neste måned",
|
|
538
|
-
children: /* @__PURE__ */ d(
|
|
538
|
+
children: /* @__PURE__ */ d(Dt, {})
|
|
539
539
|
}
|
|
540
540
|
)
|
|
541
541
|
] })
|
|
542
542
|
] }),
|
|
543
|
-
/* @__PURE__ */ d("div", { className: re.grid, children:
|
|
543
|
+
/* @__PURE__ */ d("div", { className: re.grid, children: y.map((u) => /* @__PURE__ */ d("div", { className: re.dayNameCell, children: u }, u)) }),
|
|
544
544
|
/* @__PURE__ */ d("div", { className: re.grid, children: c.map((u) => {
|
|
545
|
-
const T = ct(u, s),
|
|
545
|
+
const T = ct(u, s), _ = e && He(e) && On(u, e), A = Vn(u), j = [
|
|
546
546
|
re.dateCell,
|
|
547
547
|
T ? "" : re.otherMonth,
|
|
548
|
-
|
|
548
|
+
_ ? re.selectedDate : "",
|
|
549
549
|
// Utheving basert på prop
|
|
550
|
-
A && !
|
|
550
|
+
A && !_ ? re.todayDate : ""
|
|
551
551
|
].filter(Boolean).join(" ");
|
|
552
552
|
return /* @__PURE__ */ d(
|
|
553
553
|
"div",
|
|
554
554
|
{
|
|
555
|
-
className:
|
|
556
|
-
onClick: () =>
|
|
555
|
+
className: j,
|
|
556
|
+
onClick: () => p(u),
|
|
557
557
|
onKeyDown: (w) => f(w, u),
|
|
558
558
|
role: "button",
|
|
559
559
|
tabIndex: 0,
|
|
560
|
-
"aria-pressed":
|
|
561
|
-
"aria-label":
|
|
562
|
-
children: /* @__PURE__ */ d("span", { className: re.dateNumberContainer, children:
|
|
560
|
+
"aria-pressed": _ ?? !1,
|
|
561
|
+
"aria-label": xe(u, "PPP", { locale: ye }),
|
|
562
|
+
children: /* @__PURE__ */ d("span", { className: re.dateNumberContainer, children: xe(u, "d") })
|
|
563
563
|
},
|
|
564
564
|
u.toISOString()
|
|
565
565
|
);
|
|
@@ -568,13 +568,13 @@ const Mo = "_calendarContainer_10l5p_1", Eo = "_calendarHeader_10l5p_14", _o = "
|
|
|
568
568
|
}
|
|
569
569
|
);
|
|
570
570
|
};
|
|
571
|
-
|
|
572
|
-
const
|
|
573
|
-
fieldset:
|
|
574
|
-
description:
|
|
571
|
+
Vo.displayName = "DatePicker";
|
|
572
|
+
const Ko = "_fieldset_16fx7_2", qo = "_description_16fx7_14", Yo = "_error_16fx7_21", Jo = "_inputWrapper_16fx7_30", Zo = "_inputWrapperError_16fx7_42", Qo = "_suffixButton_16fx7_80", Xo = "_suffixButtonInteractive_16fx7_100", fe = {
|
|
573
|
+
fieldset: Ko,
|
|
574
|
+
description: qo,
|
|
575
575
|
error: Yo,
|
|
576
|
-
inputWrapper:
|
|
577
|
-
inputWrapperError:
|
|
576
|
+
inputWrapper: Jo,
|
|
577
|
+
inputWrapperError: Zo,
|
|
578
578
|
suffixButton: Qo,
|
|
579
579
|
suffixButtonInteractive: Xo
|
|
580
580
|
}, ft = (t) => {
|
|
@@ -605,10 +605,10 @@ const qo = "_fieldset_16fx7_2", Ko = "_description_16fx7_14", Yo = "_error_16fx7
|
|
|
605
605
|
// For selve input-elementet
|
|
606
606
|
value: a,
|
|
607
607
|
defaultValue: c,
|
|
608
|
-
onChange:
|
|
609
|
-
readOnly:
|
|
608
|
+
onChange: y,
|
|
609
|
+
readOnly: g,
|
|
610
610
|
placeholder: k = "dd.mm.åååå",
|
|
611
|
-
id:
|
|
611
|
+
id: p,
|
|
612
612
|
name: f,
|
|
613
613
|
required: h,
|
|
614
614
|
disabled: v,
|
|
@@ -617,89 +617,89 @@ const qo = "_fieldset_16fx7_2", Ko = "_description_16fx7_14", Yo = "_error_16fx7
|
|
|
617
617
|
// Send ekstern onFocus videre
|
|
618
618
|
onBlur: T,
|
|
619
619
|
// Send ekstern onBlur videre
|
|
620
|
-
autoComplete:
|
|
620
|
+
autoComplete: _ = "off",
|
|
621
621
|
"aria-label": A,
|
|
622
|
-
"aria-labelledby":
|
|
622
|
+
"aria-labelledby": j,
|
|
623
623
|
description: w,
|
|
624
|
-
error:
|
|
624
|
+
error: D,
|
|
625
625
|
// Bruk error-prop for styling
|
|
626
|
-
"data-color":
|
|
626
|
+
"data-color": L,
|
|
627
627
|
// <-- Destrukturering
|
|
628
628
|
"data-size": z,
|
|
629
629
|
// <-- Destrukturering
|
|
630
|
-
...
|
|
631
|
-
} = t, R = a !== void 0,
|
|
632
|
-
|
|
630
|
+
...M
|
|
631
|
+
} = t, R = a !== void 0, P = Oe(null);
|
|
632
|
+
$t.useImperativeHandle(
|
|
633
633
|
e,
|
|
634
|
-
() =>
|
|
634
|
+
() => P.current
|
|
635
635
|
);
|
|
636
|
-
const
|
|
636
|
+
const B = se(
|
|
637
637
|
(C) => {
|
|
638
|
-
const
|
|
639
|
-
return ft(
|
|
638
|
+
const F = ht(C), H = kt(F);
|
|
639
|
+
return ft(H);
|
|
640
640
|
},
|
|
641
641
|
[]
|
|
642
|
-
), [
|
|
643
|
-
() =>
|
|
642
|
+
), [I, U] = ne(
|
|
643
|
+
() => B(a ?? c)
|
|
644
644
|
);
|
|
645
|
-
|
|
645
|
+
q(() => {
|
|
646
646
|
if (R) {
|
|
647
|
-
const C =
|
|
648
|
-
C !==
|
|
647
|
+
const C = B(a);
|
|
648
|
+
C !== I && (U(C), P.current && P.current.value !== C && (P.current.value = C));
|
|
649
649
|
}
|
|
650
|
-
}, [a, R,
|
|
650
|
+
}, [a, R, I, B]);
|
|
651
651
|
const oe = se(
|
|
652
652
|
(C) => {
|
|
653
|
-
const
|
|
654
|
-
let
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
if (
|
|
658
|
-
const
|
|
653
|
+
const F = C.target, H = F.value, te = I, ee = ht(H).slice(0, 8), G = kt(ee), x = ft(G);
|
|
654
|
+
let N = 0;
|
|
655
|
+
const W = G.length;
|
|
656
|
+
W <= 2 ? N = W : W <= 4 ? N = W + 1 : N = W + 2, N = Math.min(N, x.length), requestAnimationFrame(() => {
|
|
657
|
+
if (P.current && (U(x), P.current.value = x, P.current.setSelectionRange(N, N), (x !== te || R) && y)) {
|
|
658
|
+
const O = {
|
|
659
659
|
...C,
|
|
660
|
-
target: { ...
|
|
660
|
+
target: { ...F, value: x }
|
|
661
661
|
};
|
|
662
|
-
|
|
662
|
+
y(O, x);
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
},
|
|
666
|
-
[
|
|
667
|
-
),
|
|
666
|
+
[I, R, y, B]
|
|
667
|
+
), J = [fe.fieldset, s].filter(Boolean).join(" "), Y = [
|
|
668
668
|
fe.inputWrapper,
|
|
669
669
|
o,
|
|
670
|
-
|
|
670
|
+
D ? fe.inputWrapperError : ""
|
|
671
671
|
].filter(Boolean).join(" "), de = [
|
|
672
672
|
l
|
|
673
|
-
].filter(Boolean).join(" "),
|
|
673
|
+
].filter(Boolean).join(" "), Z = [
|
|
674
674
|
fe.suffixButton,
|
|
675
675
|
i ? fe.suffixButtonInteractive : ""
|
|
676
676
|
].filter(Boolean).join(" ");
|
|
677
|
-
!n && !A && !
|
|
678
|
-
const ie = n && typeof n == "string" ?
|
|
677
|
+
!n && !A && !j && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
678
|
+
const ie = n && typeof n == "string" ? j || `${p}-label` : void 0, Q = w ? `${p}-desc` : void 0, X = D ? `${p}-err` : void 0, S = [Q, X].filter(Boolean).join(" ") || void 0;
|
|
679
679
|
return (
|
|
680
680
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
681
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ E(
|
|
682
682
|
"div",
|
|
683
683
|
{
|
|
684
|
-
className:
|
|
685
|
-
"data-color":
|
|
684
|
+
className: J,
|
|
685
|
+
"data-color": L,
|
|
686
686
|
"data-size": z,
|
|
687
687
|
children: [
|
|
688
|
-
n && typeof n == "string" ? /* @__PURE__ */ d("label", { id: ie, htmlFor:
|
|
688
|
+
n && typeof n == "string" ? /* @__PURE__ */ d("label", { id: ie, htmlFor: p, children: n }) : n,
|
|
689
689
|
w && /* @__PURE__ */ d("p", { id: Q, className: fe.description, children: w }),
|
|
690
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ E("div", { className: Y, children: [
|
|
691
691
|
/* @__PURE__ */ d(
|
|
692
692
|
"input",
|
|
693
693
|
{
|
|
694
|
-
ref:
|
|
694
|
+
ref: P,
|
|
695
695
|
type: "text",
|
|
696
696
|
inputMode: "numeric",
|
|
697
697
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
698
698
|
maxLength: 10,
|
|
699
|
-
value:
|
|
700
|
-
readOnly:
|
|
699
|
+
value: I,
|
|
700
|
+
readOnly: g,
|
|
701
701
|
placeholder: k,
|
|
702
|
-
id:
|
|
702
|
+
id: p,
|
|
703
703
|
name: f,
|
|
704
704
|
required: h,
|
|
705
705
|
disabled: v,
|
|
@@ -707,20 +707,20 @@ const qo = "_fieldset_16fx7_2", Ko = "_description_16fx7_14", Yo = "_error_16fx7
|
|
|
707
707
|
onChange: oe,
|
|
708
708
|
onFocus: u,
|
|
709
709
|
onBlur: T,
|
|
710
|
-
autoComplete:
|
|
710
|
+
autoComplete: _,
|
|
711
711
|
"aria-label": A,
|
|
712
712
|
"aria-labelledby": ie,
|
|
713
|
-
"aria-describedby":
|
|
714
|
-
"aria-invalid": !!
|
|
713
|
+
"aria-describedby": S,
|
|
714
|
+
"aria-invalid": !!D,
|
|
715
715
|
className: de,
|
|
716
|
-
...
|
|
716
|
+
...M
|
|
717
717
|
}
|
|
718
718
|
),
|
|
719
719
|
r && /* @__PURE__ */ d(
|
|
720
720
|
"button",
|
|
721
721
|
{
|
|
722
722
|
type: "button",
|
|
723
|
-
className:
|
|
723
|
+
className: Z,
|
|
724
724
|
onClick: v ? void 0 : i,
|
|
725
725
|
tabIndex: i && !v ? 0 : -1,
|
|
726
726
|
"aria-hidden": !i,
|
|
@@ -730,7 +730,7 @@ const qo = "_fieldset_16fx7_2", Ko = "_description_16fx7_14", Yo = "_error_16fx7
|
|
|
730
730
|
}
|
|
731
731
|
)
|
|
732
732
|
] }),
|
|
733
|
-
|
|
733
|
+
D && /* @__PURE__ */ d("p", { id: X, className: fe.error, role: "alert", children: D })
|
|
734
734
|
]
|
|
735
735
|
}
|
|
736
736
|
)
|
|
@@ -747,80 +747,80 @@ function vt(t) {
|
|
|
747
747
|
function nr() {
|
|
748
748
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Je(t, e) {
|
|
751
751
|
const n = Object.keys(t), r = Object.keys(e);
|
|
752
752
|
if (n.length !== r.length) return !1;
|
|
753
753
|
const i = JSON.stringify(Object.keys(t.breakpoints || {})), s = JSON.stringify(Object.keys(e.breakpoints || {}));
|
|
754
754
|
return i !== s ? !1 : n.every((o) => {
|
|
755
755
|
const l = t[o], a = e[o];
|
|
756
|
-
return typeof l == "function" ? `${l}` == `${a}` : !vt(l) || !vt(a) ? l === a :
|
|
756
|
+
return typeof l == "function" ? `${l}` == `${a}` : !vt(l) || !vt(a) ? l === a : Je(l, a);
|
|
757
757
|
});
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function yt(t) {
|
|
760
760
|
return t.concat().sort((e, n) => e.name > n.name ? 1 : -1).map((e) => e.options);
|
|
761
761
|
}
|
|
762
762
|
function or(t, e) {
|
|
763
763
|
if (t.length !== e.length) return !1;
|
|
764
|
-
const n =
|
|
764
|
+
const n = yt(t), r = yt(e);
|
|
765
765
|
return n.every((i, s) => {
|
|
766
766
|
const o = r[s];
|
|
767
|
-
return
|
|
767
|
+
return Je(i, o);
|
|
768
768
|
});
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Ze(t) {
|
|
771
771
|
return typeof t == "number";
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function Ke(t) {
|
|
774
774
|
return typeof t == "string";
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function Ne(t) {
|
|
777
777
|
return typeof t == "boolean";
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function bt(t) {
|
|
780
780
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function $(t) {
|
|
783
783
|
return Math.abs(t);
|
|
784
784
|
}
|
|
785
785
|
function Qe(t) {
|
|
786
786
|
return Math.sign(t);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
788
|
+
function De(t, e) {
|
|
789
|
+
return $(t - e);
|
|
790
790
|
}
|
|
791
791
|
function rr(t, e) {
|
|
792
|
-
if (t === 0 || e === 0 ||
|
|
793
|
-
const n =
|
|
794
|
-
return
|
|
792
|
+
if (t === 0 || e === 0 || $(t) <= $(e)) return 0;
|
|
793
|
+
const n = De($(t), $(e));
|
|
794
|
+
return $(n / t);
|
|
795
795
|
}
|
|
796
796
|
function sr(t) {
|
|
797
797
|
return Math.round(t * 100) / 100;
|
|
798
798
|
}
|
|
799
799
|
function Ae(t) {
|
|
800
|
-
return
|
|
800
|
+
return _e(t).map(Number);
|
|
801
801
|
}
|
|
802
802
|
function ae(t) {
|
|
803
|
-
return t[
|
|
803
|
+
return t[Le(t)];
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function Le(t) {
|
|
806
806
|
return Math.max(0, t.length - 1);
|
|
807
807
|
}
|
|
808
808
|
function Xe(t, e) {
|
|
809
|
-
return e ===
|
|
809
|
+
return e === Le(t);
|
|
810
810
|
}
|
|
811
811
|
function Tt(t, e = 0) {
|
|
812
812
|
return Array.from(Array(t), (n, r) => e + r);
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function _e(t) {
|
|
815
815
|
return Object.keys(t);
|
|
816
816
|
}
|
|
817
817
|
function At(t, e) {
|
|
818
|
-
return [t, e].reduce((n, r) => (
|
|
819
|
-
const s = n[i], o = r[i], l =
|
|
818
|
+
return [t, e].reduce((n, r) => (_e(r).forEach((i) => {
|
|
819
|
+
const s = n[i], o = r[i], l = bt(s) && bt(o);
|
|
820
820
|
n[i] = l ? At(s, o) : o;
|
|
821
821
|
}), n), {});
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function qe(t, e) {
|
|
824
824
|
return typeof e.MouseEvent < "u" && t instanceof e.MouseEvent;
|
|
825
825
|
}
|
|
826
826
|
function ir(t, e) {
|
|
@@ -839,13 +839,13 @@ function ir(t, e) {
|
|
|
839
839
|
return e - a;
|
|
840
840
|
}
|
|
841
841
|
function o(a, c) {
|
|
842
|
-
return
|
|
842
|
+
return Ke(t) ? n[t](a) : t(e, a, c);
|
|
843
843
|
}
|
|
844
844
|
return {
|
|
845
845
|
measure: o
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function je() {
|
|
849
849
|
let t = [];
|
|
850
850
|
function e(i, s, o, l = {
|
|
851
851
|
passive: !0
|
|
@@ -869,29 +869,29 @@ function Le() {
|
|
|
869
869
|
return r;
|
|
870
870
|
}
|
|
871
871
|
function ar(t, e, n, r) {
|
|
872
|
-
const i =
|
|
872
|
+
const i = je(), s = 1e3 / 60;
|
|
873
873
|
let o = null, l = 0, a = 0;
|
|
874
874
|
function c() {
|
|
875
875
|
i.add(t, "visibilitychange", () => {
|
|
876
876
|
t.hidden && f();
|
|
877
877
|
});
|
|
878
878
|
}
|
|
879
|
-
function
|
|
880
|
-
|
|
879
|
+
function y() {
|
|
880
|
+
p(), i.clear();
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function g(v) {
|
|
883
883
|
if (!a) return;
|
|
884
884
|
o || (o = v, n(), n());
|
|
885
885
|
const m = v - o;
|
|
886
886
|
for (o = v, l += m; l >= s; )
|
|
887
887
|
n(), l -= s;
|
|
888
888
|
const u = l / s;
|
|
889
|
-
r(u), a && (a = e.requestAnimationFrame(
|
|
889
|
+
r(u), a && (a = e.requestAnimationFrame(g));
|
|
890
890
|
}
|
|
891
891
|
function k() {
|
|
892
|
-
a || (a = e.requestAnimationFrame(
|
|
892
|
+
a || (a = e.requestAnimationFrame(g));
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function p() {
|
|
895
895
|
e.cancelAnimationFrame(a), o = null, l = 0, a = 0;
|
|
896
896
|
}
|
|
897
897
|
function f() {
|
|
@@ -899,15 +899,15 @@ function ar(t, e, n, r) {
|
|
|
899
899
|
}
|
|
900
900
|
return {
|
|
901
901
|
init: c,
|
|
902
|
-
destroy:
|
|
902
|
+
destroy: y,
|
|
903
903
|
start: k,
|
|
904
|
-
stop:
|
|
904
|
+
stop: p,
|
|
905
905
|
update: n,
|
|
906
906
|
render: r
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
909
|
function lr(t, e) {
|
|
910
|
-
const n = e === "rtl", r = t === "y", i = r ? "y" : "x", s = r ? "x" : "y", o = !r && n ? -1 : 1, l =
|
|
910
|
+
const n = e === "rtl", r = t === "y", i = r ? "y" : "x", s = r ? "x" : "y", o = !r && n ? -1 : 1, l = y(), a = g();
|
|
911
911
|
function c(f) {
|
|
912
912
|
const {
|
|
913
913
|
height: h,
|
|
@@ -915,10 +915,10 @@ function lr(t, e) {
|
|
|
915
915
|
} = f;
|
|
916
916
|
return r ? h : v;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function y() {
|
|
919
919
|
return r ? "top" : n ? "right" : "left";
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function g() {
|
|
922
922
|
return r ? "bottom" : n ? "left" : "right";
|
|
923
923
|
}
|
|
924
924
|
function k(f) {
|
|
@@ -934,7 +934,7 @@ function lr(t, e) {
|
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
936
|
function he(t = 0, e = 0) {
|
|
937
|
-
const n =
|
|
937
|
+
const n = $(t - e);
|
|
938
938
|
function r(c) {
|
|
939
939
|
return c < t;
|
|
940
940
|
}
|
|
@@ -961,124 +961,124 @@ function he(t = 0, e = 0) {
|
|
|
961
961
|
removeOffset: l
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function _t(t, e, n) {
|
|
965
965
|
const {
|
|
966
966
|
constrain: r
|
|
967
967
|
} = he(0, t), i = t + 1;
|
|
968
968
|
let s = o(e);
|
|
969
969
|
function o(k) {
|
|
970
|
-
return n ?
|
|
970
|
+
return n ? $((i + k) % i) : r(k);
|
|
971
971
|
}
|
|
972
972
|
function l() {
|
|
973
973
|
return s;
|
|
974
974
|
}
|
|
975
975
|
function a(k) {
|
|
976
|
-
return s = o(k),
|
|
976
|
+
return s = o(k), g;
|
|
977
977
|
}
|
|
978
978
|
function c(k) {
|
|
979
|
-
return
|
|
979
|
+
return y().set(l() + k);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
982
|
-
return
|
|
981
|
+
function y() {
|
|
982
|
+
return _t(t, l(), n);
|
|
983
983
|
}
|
|
984
|
-
const
|
|
984
|
+
const g = {
|
|
985
985
|
get: l,
|
|
986
986
|
set: a,
|
|
987
987
|
add: c,
|
|
988
|
-
clone:
|
|
988
|
+
clone: y
|
|
989
989
|
};
|
|
990
|
-
return
|
|
990
|
+
return g;
|
|
991
991
|
}
|
|
992
|
-
function dr(t, e, n, r, i, s, o, l, a, c,
|
|
992
|
+
function dr(t, e, n, r, i, s, o, l, a, c, y, g, k, p, f, h, v, m, u) {
|
|
993
993
|
const {
|
|
994
994
|
cross: T,
|
|
995
|
-
direction:
|
|
996
|
-
} = t, A = ["INPUT", "SELECT", "TEXTAREA"],
|
|
995
|
+
direction: _
|
|
996
|
+
} = t, A = ["INPUT", "SELECT", "TEXTAREA"], j = {
|
|
997
997
|
passive: !1
|
|
998
|
-
}, w =
|
|
998
|
+
}, w = je(), D = je(), L = he(50, 225).constrain(p.measure(20)), z = {
|
|
999
999
|
mouse: 300,
|
|
1000
1000
|
touch: 400
|
|
1001
|
-
},
|
|
1001
|
+
}, M = {
|
|
1002
1002
|
mouse: 500,
|
|
1003
1003
|
touch: 600
|
|
1004
1004
|
}, R = f ? 43 : 25;
|
|
1005
|
-
let
|
|
1006
|
-
function de(
|
|
1005
|
+
let P = !1, B = 0, I = 0, U = !1, oe = !1, J = !1, Y = !1;
|
|
1006
|
+
function de(x) {
|
|
1007
1007
|
if (!u) return;
|
|
1008
|
-
function
|
|
1009
|
-
(
|
|
1008
|
+
function N(O) {
|
|
1009
|
+
(Ne(u) || u(x, O)) && C(O);
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1012
|
-
w.add(
|
|
1013
|
-
},
|
|
1014
|
-
}).add(
|
|
1011
|
+
const W = e;
|
|
1012
|
+
w.add(W, "dragstart", (O) => O.preventDefault(), j).add(W, "touchmove", () => {
|
|
1013
|
+
}, j).add(W, "touchend", () => {
|
|
1014
|
+
}).add(W, "touchstart", N).add(W, "mousedown", N).add(W, "touchcancel", H).add(W, "contextmenu", H).add(W, "click", te, !0);
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
w.clear(),
|
|
1016
|
+
function Z() {
|
|
1017
|
+
w.clear(), D.clear();
|
|
1018
1018
|
}
|
|
1019
1019
|
function ie() {
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1020
|
+
const x = Y ? n : e;
|
|
1021
|
+
D.add(x, "touchmove", F, j).add(x, "touchend", H).add(x, "mousemove", F, j).add(x, "mouseup", H);
|
|
1022
1022
|
}
|
|
1023
|
-
function Q(
|
|
1024
|
-
const
|
|
1025
|
-
return A.includes(
|
|
1023
|
+
function Q(x) {
|
|
1024
|
+
const N = x.nodeName || "";
|
|
1025
|
+
return A.includes(N);
|
|
1026
1026
|
}
|
|
1027
1027
|
function X() {
|
|
1028
|
-
return (f ?
|
|
1028
|
+
return (f ? M : z)[Y ? "mouse" : "touch"];
|
|
1029
1029
|
}
|
|
1030
|
-
function x
|
|
1031
|
-
const
|
|
1032
|
-
return f ||
|
|
1030
|
+
function S(x, N) {
|
|
1031
|
+
const W = g.add(Qe(x) * -1), O = y.byDistance(x, !f).distance;
|
|
1032
|
+
return f || $(x) < L ? O : v && N ? O * 0.5 : y.byIndex(W.get(), 0).distance;
|
|
1033
1033
|
}
|
|
1034
|
-
function C(
|
|
1035
|
-
const
|
|
1036
|
-
Y =
|
|
1034
|
+
function C(x) {
|
|
1035
|
+
const N = qe(x, r);
|
|
1036
|
+
Y = N, J = f && N && !x.buttons && P, P = De(i.get(), o.get()) >= 2, !(N && x.button !== 0) && (Q(x.target) || (U = !0, s.pointerDown(x), c.useFriction(0).useDuration(0), i.set(o), ie(), B = s.readPoint(x), I = s.readPoint(x, T), k.emit("pointerDown")));
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1039
|
-
if (!
|
|
1040
|
-
const
|
|
1041
|
-
if (!oe && !Y && (!
|
|
1042
|
-
return
|
|
1043
|
-
const
|
|
1044
|
-
le > h && (
|
|
1038
|
+
function F(x) {
|
|
1039
|
+
if (!qe(x, r) && x.touches.length >= 2) return H(x);
|
|
1040
|
+
const W = s.readPoint(x), O = s.readPoint(x, T), le = De(W, B), ce = De(O, I);
|
|
1041
|
+
if (!oe && !Y && (!x.cancelable || (oe = le > ce, !oe)))
|
|
1042
|
+
return H(x);
|
|
1043
|
+
const pe = s.pointerMove(x);
|
|
1044
|
+
le > h && (J = !0), c.useFriction(0.3).useDuration(0.75), l.start(), i.add(_(pe)), x.preventDefault();
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const
|
|
1048
|
-
oe = !1,
|
|
1046
|
+
function H(x) {
|
|
1047
|
+
const W = y.byDistance(0, !1).index !== g.get(), O = s.pointerUp(x) * X(), le = S(_(O), W), ce = rr(O, le), pe = R - 10 * ce, ue = m + ce / 50;
|
|
1048
|
+
oe = !1, U = !1, D.clear(), c.useDuration(pe).useFriction(ue), a.distance(le, !f), Y = !1, k.emit("pointerUp");
|
|
1049
1049
|
}
|
|
1050
|
-
function te(
|
|
1051
|
-
|
|
1050
|
+
function te(x) {
|
|
1051
|
+
J && (x.stopPropagation(), x.preventDefault(), J = !1);
|
|
1052
1052
|
}
|
|
1053
1053
|
function ee() {
|
|
1054
|
-
return
|
|
1054
|
+
return U;
|
|
1055
1055
|
}
|
|
1056
1056
|
return {
|
|
1057
1057
|
init: de,
|
|
1058
|
-
destroy:
|
|
1058
|
+
destroy: Z,
|
|
1059
1059
|
pointerDown: ee
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
1062
|
function cr(t, e) {
|
|
1063
1063
|
let r, i;
|
|
1064
|
-
function s(
|
|
1065
|
-
return
|
|
1064
|
+
function s(g) {
|
|
1065
|
+
return g.timeStamp;
|
|
1066
1066
|
}
|
|
1067
|
-
function o(
|
|
1067
|
+
function o(g, k) {
|
|
1068
1068
|
const f = `client${(k || t.scroll) === "x" ? "X" : "Y"}`;
|
|
1069
|
-
return (
|
|
1069
|
+
return (qe(g, e) ? g : g.touches[0])[f];
|
|
1070
1070
|
}
|
|
1071
|
-
function l(
|
|
1072
|
-
return r =
|
|
1071
|
+
function l(g) {
|
|
1072
|
+
return r = g, i = g, o(g);
|
|
1073
1073
|
}
|
|
1074
|
-
function a(
|
|
1075
|
-
const k = o(
|
|
1076
|
-
return i =
|
|
1074
|
+
function a(g) {
|
|
1075
|
+
const k = o(g) - o(i), p = s(g) - s(r) > 170;
|
|
1076
|
+
return i = g, p && (r = g), k;
|
|
1077
1077
|
}
|
|
1078
|
-
function c(
|
|
1078
|
+
function c(g) {
|
|
1079
1079
|
if (!r || !i) return 0;
|
|
1080
|
-
const k = o(i) - o(r),
|
|
1081
|
-
return
|
|
1080
|
+
const k = o(i) - o(r), p = s(g) - s(r), f = s(g) - s(i) > 170, h = k / p;
|
|
1081
|
+
return p && !f && $(h) > 0.1 ? h : 0;
|
|
1082
1082
|
}
|
|
1083
1083
|
return {
|
|
1084
1084
|
pointerDown: l,
|
|
@@ -1116,49 +1116,49 @@ function mr(t) {
|
|
|
1116
1116
|
measure: e
|
|
1117
1117
|
};
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function pr(t, e, n, r, i, s, o) {
|
|
1120
1120
|
const l = [t].concat(r);
|
|
1121
|
-
let a, c,
|
|
1121
|
+
let a, c, y = [], g = !1;
|
|
1122
1122
|
function k(v) {
|
|
1123
1123
|
return i.measureSize(o.measure(v));
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function p(v) {
|
|
1126
1126
|
if (!s) return;
|
|
1127
|
-
c = k(t),
|
|
1127
|
+
c = k(t), y = r.map(k);
|
|
1128
1128
|
function m(u) {
|
|
1129
1129
|
for (const T of u) {
|
|
1130
|
-
if (
|
|
1131
|
-
const
|
|
1132
|
-
if (
|
|
1130
|
+
if (g) return;
|
|
1131
|
+
const _ = T.target === t, A = r.indexOf(T.target), j = _ ? c : y[A], w = k(_ ? t : r[A]);
|
|
1132
|
+
if ($(w - j) >= 0.5) {
|
|
1133
1133
|
v.reInit(), e.emit("resize");
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
a = new ResizeObserver((u) => {
|
|
1139
|
-
(
|
|
1139
|
+
(Ne(s) || s(v, u)) && m(u);
|
|
1140
1140
|
}), n.requestAnimationFrame(() => {
|
|
1141
1141
|
l.forEach((u) => a.observe(u));
|
|
1142
1142
|
});
|
|
1143
1143
|
}
|
|
1144
1144
|
function f() {
|
|
1145
|
-
|
|
1145
|
+
g = !0, a && a.disconnect();
|
|
1146
1146
|
}
|
|
1147
1147
|
return {
|
|
1148
|
-
init:
|
|
1148
|
+
init: p,
|
|
1149
1149
|
destroy: f
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
let o = 0, l = 0, a = i, c = s,
|
|
1152
|
+
function gr(t, e, n, r, i, s) {
|
|
1153
|
+
let o = 0, l = 0, a = i, c = s, y = t.get(), g = 0;
|
|
1154
1154
|
function k() {
|
|
1155
|
-
const
|
|
1156
|
-
let
|
|
1157
|
-
return w ? (o = 0, n.set(r), t.set(r),
|
|
1155
|
+
const j = r.get() - t.get(), w = !a;
|
|
1156
|
+
let D = 0;
|
|
1157
|
+
return w ? (o = 0, n.set(r), t.set(r), D = j) : (n.set(t), o += j / a, o *= c, y += o, t.add(o), D = y - g), l = Qe(D), g = y, A;
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const
|
|
1161
|
-
return
|
|
1159
|
+
function p() {
|
|
1160
|
+
const j = r.get() - e.get();
|
|
1161
|
+
return $(j) < 1e-3;
|
|
1162
1162
|
}
|
|
1163
1163
|
function f() {
|
|
1164
1164
|
return a;
|
|
@@ -1173,23 +1173,23 @@ function pr(t, e, n, r, i, s) {
|
|
|
1173
1173
|
return T(i);
|
|
1174
1174
|
}
|
|
1175
1175
|
function u() {
|
|
1176
|
-
return
|
|
1176
|
+
return _(s);
|
|
1177
1177
|
}
|
|
1178
|
-
function T(
|
|
1179
|
-
return a =
|
|
1178
|
+
function T(j) {
|
|
1179
|
+
return a = j, A;
|
|
1180
1180
|
}
|
|
1181
|
-
function j
|
|
1182
|
-
return c =
|
|
1181
|
+
function _(j) {
|
|
1182
|
+
return c = j, A;
|
|
1183
1183
|
}
|
|
1184
1184
|
const A = {
|
|
1185
1185
|
direction: h,
|
|
1186
1186
|
duration: f,
|
|
1187
1187
|
velocity: v,
|
|
1188
1188
|
seek: k,
|
|
1189
|
-
settled:
|
|
1189
|
+
settled: p,
|
|
1190
1190
|
useBaseFriction: u,
|
|
1191
1191
|
useBaseDuration: m,
|
|
1192
|
-
useFriction:
|
|
1192
|
+
useFriction: _,
|
|
1193
1193
|
useDuration: T
|
|
1194
1194
|
};
|
|
1195
1195
|
return A;
|
|
@@ -1200,36 +1200,36 @@ function fr(t, e, n, r, i) {
|
|
|
1200
1200
|
function c() {
|
|
1201
1201
|
return !(a || !t.reachedAny(n.get()) || !t.reachedAny(e.get()));
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function y(p) {
|
|
1204
1204
|
if (!c()) return;
|
|
1205
|
-
const f = t.reachedMin(e.get()) ? "min" : "max", h =
|
|
1206
|
-
n.subtract(v * m), !
|
|
1205
|
+
const f = t.reachedMin(e.get()) ? "min" : "max", h = $(t[f] - e.get()), v = n.get() - e.get(), m = l.constrain(h / o);
|
|
1206
|
+
n.subtract(v * m), !p && $(v) < s && (n.set(t.constrain(n.get())), r.useDuration(25).useBaseFriction());
|
|
1207
1207
|
}
|
|
1208
|
-
function p
|
|
1209
|
-
a = !
|
|
1208
|
+
function g(p) {
|
|
1209
|
+
a = !p;
|
|
1210
1210
|
}
|
|
1211
1211
|
return {
|
|
1212
1212
|
shouldConstrain: c,
|
|
1213
|
-
constrain:
|
|
1214
|
-
toggleActive:
|
|
1213
|
+
constrain: y,
|
|
1214
|
+
toggleActive: g
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
1217
|
function hr(t, e, n, r, i) {
|
|
1218
|
-
const s = he(-e + t, 0), o =
|
|
1218
|
+
const s = he(-e + t, 0), o = g(), l = y(), a = k();
|
|
1219
1219
|
function c(f, h) {
|
|
1220
|
-
return
|
|
1220
|
+
return De(f, h) <= 1;
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function y() {
|
|
1223
1223
|
const f = o[0], h = ae(o), v = o.lastIndexOf(f), m = o.indexOf(h) + 1;
|
|
1224
1224
|
return he(v, m);
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function g() {
|
|
1227
1227
|
return n.map((f, h) => {
|
|
1228
1228
|
const {
|
|
1229
1229
|
min: v,
|
|
1230
1230
|
max: m
|
|
1231
|
-
} = s, u = s.constrain(f), T = !h,
|
|
1232
|
-
return T ? m :
|
|
1231
|
+
} = s, u = s.constrain(f), T = !h, _ = Xe(n, h);
|
|
1232
|
+
return T ? m : _ || c(v, u) ? v : c(m, u) ? m : u;
|
|
1233
1233
|
}).map((f) => parseFloat(f.toFixed(3)));
|
|
1234
1234
|
}
|
|
1235
1235
|
function k() {
|
|
@@ -1260,16 +1260,16 @@ function vr(t, e, n, r) {
|
|
|
1260
1260
|
function c(k) {
|
|
1261
1261
|
return k === 1 ? a(n.get()) : k === -1 ? l(n.get()) : !1;
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function y(k) {
|
|
1264
1264
|
if (!c(k)) return;
|
|
1265
|
-
const
|
|
1266
|
-
r.forEach((f) => f.add(
|
|
1265
|
+
const p = t * (k * -1);
|
|
1266
|
+
r.forEach((f) => f.add(p));
|
|
1267
1267
|
}
|
|
1268
1268
|
return {
|
|
1269
|
-
loop:
|
|
1269
|
+
loop: y
|
|
1270
1270
|
};
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function yr(t) {
|
|
1273
1273
|
const {
|
|
1274
1274
|
max: e,
|
|
1275
1275
|
length: n
|
|
@@ -1282,25 +1282,25 @@ function br(t) {
|
|
|
1282
1282
|
get: r
|
|
1283
1283
|
};
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function br(t, e, n, r, i) {
|
|
1286
1286
|
const {
|
|
1287
1287
|
startEdge: s,
|
|
1288
1288
|
endEdge: o
|
|
1289
1289
|
} = t, {
|
|
1290
1290
|
groupSlides: l
|
|
1291
|
-
} = i, a =
|
|
1292
|
-
function
|
|
1293
|
-
return l(r).map((h) => ae(h)[o] - h[0][s]).map(
|
|
1291
|
+
} = i, a = g().map(e.measure), c = k(), y = p();
|
|
1292
|
+
function g() {
|
|
1293
|
+
return l(r).map((h) => ae(h)[o] - h[0][s]).map($);
|
|
1294
1294
|
}
|
|
1295
1295
|
function k() {
|
|
1296
|
-
return r.map((h) => n[s] - h[s]).map((h) =>
|
|
1296
|
+
return r.map((h) => n[s] - h[s]).map((h) => -$(h));
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function p() {
|
|
1299
1299
|
return l(c).map((h) => h[0]).map((h, v) => h + a[v]);
|
|
1300
1300
|
}
|
|
1301
1301
|
return {
|
|
1302
1302
|
snaps: c,
|
|
1303
|
-
snapsAligned:
|
|
1303
|
+
snapsAligned: y
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
1306
|
function Tr(t, e, n, r, i, s) {
|
|
@@ -1309,17 +1309,17 @@ function Tr(t, e, n, r, i, s) {
|
|
|
1309
1309
|
} = i, {
|
|
1310
1310
|
min: l,
|
|
1311
1311
|
max: a
|
|
1312
|
-
} = r, c =
|
|
1313
|
-
function
|
|
1314
|
-
const k = o(s),
|
|
1315
|
-
return n.length === 1 ? [s] :
|
|
1312
|
+
} = r, c = y();
|
|
1313
|
+
function y() {
|
|
1314
|
+
const k = o(s), p = !t || e === "keepSnaps";
|
|
1315
|
+
return n.length === 1 ? [s] : p ? k : k.slice(l, a).map((f, h, v) => {
|
|
1316
1316
|
const m = !h, u = Xe(v, h);
|
|
1317
1317
|
if (m) {
|
|
1318
1318
|
const T = ae(v[0]) + 1;
|
|
1319
1319
|
return Tt(T);
|
|
1320
1320
|
}
|
|
1321
1321
|
if (u) {
|
|
1322
|
-
const T =
|
|
1322
|
+
const T = Le(s) - ae(v)[0] + 1;
|
|
1323
1323
|
return Tt(T, ae(v)[0]);
|
|
1324
1324
|
}
|
|
1325
1325
|
return f;
|
|
@@ -1329,20 +1329,20 @@ function Tr(t, e, n, r, i, s) {
|
|
|
1329
1329
|
slideRegistry: c
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function Sr(t, e, n, r, i) {
|
|
1333
1333
|
const {
|
|
1334
1334
|
reachedAny: s,
|
|
1335
1335
|
removeOffset: o,
|
|
1336
1336
|
constrain: l
|
|
1337
1337
|
} = r;
|
|
1338
1338
|
function a(f) {
|
|
1339
|
-
return f.concat().sort((h, v) =>
|
|
1339
|
+
return f.concat().sort((h, v) => $(h) - $(v))[0];
|
|
1340
1340
|
}
|
|
1341
1341
|
function c(f) {
|
|
1342
1342
|
const h = t ? o(f) : l(f), v = e.map((u, T) => ({
|
|
1343
|
-
diff:
|
|
1343
|
+
diff: y(u - h, 0),
|
|
1344
1344
|
index: T
|
|
1345
|
-
})).sort((u, T) =>
|
|
1345
|
+
})).sort((u, T) => $(u.diff) - $(T.diff)), {
|
|
1346
1346
|
index: m
|
|
1347
1347
|
} = v[0];
|
|
1348
1348
|
return {
|
|
@@ -1350,15 +1350,15 @@ function xr(t, e, n, r, i) {
|
|
|
1350
1350
|
distance: h
|
|
1351
1351
|
};
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function y(f, h) {
|
|
1354
1354
|
const v = [f, f + n, f - n];
|
|
1355
1355
|
if (!t) return f;
|
|
1356
1356
|
if (!h) return a(v);
|
|
1357
1357
|
const m = v.filter((u) => Qe(u) === h);
|
|
1358
1358
|
return m.length ? a(m) : ae(v) - n;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
const v = e[f] - i.get(), m =
|
|
1360
|
+
function g(f, h) {
|
|
1361
|
+
const v = e[f] - i.get(), m = y(v, h);
|
|
1362
1362
|
return {
|
|
1363
1363
|
index: f,
|
|
1364
1364
|
distance: m
|
|
@@ -1373,7 +1373,7 @@ function xr(t, e, n, r, i) {
|
|
|
1373
1373
|
index: m,
|
|
1374
1374
|
distance: f
|
|
1375
1375
|
};
|
|
1376
|
-
const
|
|
1376
|
+
const _ = e[m] - u, A = f + y(_, 0);
|
|
1377
1377
|
return {
|
|
1378
1378
|
index: m,
|
|
1379
1379
|
distance: A
|
|
@@ -1381,21 +1381,21 @@ function xr(t, e, n, r, i) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
return {
|
|
1383
1383
|
byDistance: k,
|
|
1384
|
-
byIndex:
|
|
1385
|
-
shortcut:
|
|
1384
|
+
byIndex: g,
|
|
1385
|
+
shortcut: y
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1389
|
-
function l(
|
|
1390
|
-
const k =
|
|
1391
|
-
s.add(k), k && (r.duration() ? t.start() : (t.update(), t.render(1), t.update())),
|
|
1388
|
+
function xr(t, e, n, r, i, s, o) {
|
|
1389
|
+
function l(g) {
|
|
1390
|
+
const k = g.distance, p = g.index !== e.get();
|
|
1391
|
+
s.add(k), k && (r.duration() ? t.start() : (t.update(), t.render(1), t.update())), p && (n.set(e.get()), e.set(g.index), o.emit("select"));
|
|
1392
1392
|
}
|
|
1393
|
-
function a(
|
|
1394
|
-
const
|
|
1395
|
-
l(
|
|
1393
|
+
function a(g, k) {
|
|
1394
|
+
const p = i.byDistance(g, k);
|
|
1395
|
+
l(p);
|
|
1396
1396
|
}
|
|
1397
|
-
function c(
|
|
1398
|
-
const
|
|
1397
|
+
function c(g, k) {
|
|
1398
|
+
const p = e.clone().set(g), f = i.byIndex(p.get(), k);
|
|
1399
1399
|
l(f);
|
|
1400
1400
|
}
|
|
1401
1401
|
return {
|
|
@@ -1409,28 +1409,28 @@ function wr(t, e, n, r, i, s, o, l) {
|
|
|
1409
1409
|
capture: !0
|
|
1410
1410
|
};
|
|
1411
1411
|
let c = 0;
|
|
1412
|
-
function
|
|
1412
|
+
function y(p) {
|
|
1413
1413
|
if (!l) return;
|
|
1414
1414
|
function f(h) {
|
|
1415
1415
|
if ((/* @__PURE__ */ new Date()).getTime() - c > 10) return;
|
|
1416
1416
|
o.emit("slideFocusStart"), t.scrollLeft = 0;
|
|
1417
1417
|
const u = n.findIndex((T) => T.includes(h));
|
|
1418
|
-
|
|
1418
|
+
Ze(u) && (i.useDuration(0), r.index(u, 0), o.emit("slideFocus"));
|
|
1419
1419
|
}
|
|
1420
|
-
s.add(document, "keydown",
|
|
1420
|
+
s.add(document, "keydown", g, !1), e.forEach((h, v) => {
|
|
1421
1421
|
s.add(h, "focus", (m) => {
|
|
1422
|
-
(
|
|
1422
|
+
(Ne(l) || l(p, m)) && f(v);
|
|
1423
1423
|
}, a);
|
|
1424
1424
|
});
|
|
1425
1425
|
}
|
|
1426
|
-
function p
|
|
1427
|
-
|
|
1426
|
+
function g(p) {
|
|
1427
|
+
p.code === "Tab" && (c = (/* @__PURE__ */ new Date()).getTime());
|
|
1428
1428
|
}
|
|
1429
1429
|
return {
|
|
1430
|
-
init:
|
|
1430
|
+
init: y
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function Ie(t) {
|
|
1434
1434
|
let e = t;
|
|
1435
1435
|
function n() {
|
|
1436
1436
|
return e;
|
|
@@ -1445,7 +1445,7 @@ function De(t) {
|
|
|
1445
1445
|
e -= o(a);
|
|
1446
1446
|
}
|
|
1447
1447
|
function o(a) {
|
|
1448
|
-
return
|
|
1448
|
+
return Ze(a) ? a : a.get();
|
|
1449
1449
|
}
|
|
1450
1450
|
return {
|
|
1451
1451
|
get: n,
|
|
@@ -1454,7 +1454,7 @@ function De(t) {
|
|
|
1454
1454
|
subtract: s
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function jt(t, e) {
|
|
1458
1458
|
const n = t.scroll === "x" ? o : l, r = e.style;
|
|
1459
1459
|
let i = null, s = !1;
|
|
1460
1460
|
function o(k) {
|
|
@@ -1465,72 +1465,72 @@ function Lt(t, e) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
function a(k) {
|
|
1467
1467
|
if (s) return;
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1468
|
+
const p = sr(t.direction(k));
|
|
1469
|
+
p !== i && (r.transform = n(p), i = p);
|
|
1470
1470
|
}
|
|
1471
1471
|
function c(k) {
|
|
1472
1472
|
s = !k;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function y() {
|
|
1475
1475
|
s || (r.transform = "", e.getAttribute("style") || e.removeAttribute("style"));
|
|
1476
1476
|
}
|
|
1477
1477
|
return {
|
|
1478
|
-
clear:
|
|
1478
|
+
clear: y,
|
|
1479
1479
|
to: a,
|
|
1480
1480
|
toggleActive: c
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
1483
|
function Cr(t, e, n, r, i, s, o, l, a) {
|
|
1484
|
-
const
|
|
1485
|
-
function
|
|
1486
|
-
return w.reduce((
|
|
1484
|
+
const y = Ae(i), g = Ae(i).reverse(), k = m().concat(u());
|
|
1485
|
+
function p(w, D) {
|
|
1486
|
+
return w.reduce((L, z) => L - i[z], D);
|
|
1487
1487
|
}
|
|
1488
|
-
function f(w,
|
|
1489
|
-
return w.reduce((
|
|
1488
|
+
function f(w, D) {
|
|
1489
|
+
return w.reduce((L, z) => p(L, D) > 0 ? L.concat([z]) : L, []);
|
|
1490
1490
|
}
|
|
1491
1491
|
function h(w) {
|
|
1492
|
-
return s.map((
|
|
1493
|
-
start:
|
|
1494
|
-
end:
|
|
1492
|
+
return s.map((D, L) => ({
|
|
1493
|
+
start: D - r[L] + 0.5 + w,
|
|
1494
|
+
end: D + e - 0.5 + w
|
|
1495
1495
|
}));
|
|
1496
1496
|
}
|
|
1497
|
-
function v(w,
|
|
1498
|
-
const z = h(
|
|
1499
|
-
return w.map((
|
|
1500
|
-
const R =
|
|
1497
|
+
function v(w, D, L) {
|
|
1498
|
+
const z = h(D);
|
|
1499
|
+
return w.map((M) => {
|
|
1500
|
+
const R = L ? 0 : -n, P = L ? n : 0, B = L ? "end" : "start", I = z[M][B];
|
|
1501
1501
|
return {
|
|
1502
|
-
index:
|
|
1503
|
-
loopPoint:
|
|
1504
|
-
slideLocation:
|
|
1505
|
-
translate:
|
|
1506
|
-
target: () => l.get() >
|
|
1502
|
+
index: M,
|
|
1503
|
+
loopPoint: I,
|
|
1504
|
+
slideLocation: Ie(-1),
|
|
1505
|
+
translate: jt(t, a[M]),
|
|
1506
|
+
target: () => l.get() > I ? R : P
|
|
1507
1507
|
};
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
function m() {
|
|
1511
|
-
const w = o[0],
|
|
1512
|
-
return v(
|
|
1511
|
+
const w = o[0], D = f(g, w);
|
|
1512
|
+
return v(D, n, !1);
|
|
1513
1513
|
}
|
|
1514
1514
|
function u() {
|
|
1515
|
-
const w = e - o[0] - 1,
|
|
1516
|
-
return v(
|
|
1515
|
+
const w = e - o[0] - 1, D = f(y, w);
|
|
1516
|
+
return v(D, -n, !0);
|
|
1517
1517
|
}
|
|
1518
1518
|
function T() {
|
|
1519
1519
|
return k.every(({
|
|
1520
1520
|
index: w
|
|
1521
1521
|
}) => {
|
|
1522
|
-
const
|
|
1523
|
-
return
|
|
1522
|
+
const D = y.filter((L) => L !== w);
|
|
1523
|
+
return p(D, e) <= 0.1;
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function _() {
|
|
1527
1527
|
k.forEach((w) => {
|
|
1528
1528
|
const {
|
|
1529
|
-
target:
|
|
1530
|
-
translate:
|
|
1529
|
+
target: D,
|
|
1530
|
+
translate: L,
|
|
1531
1531
|
slideLocation: z
|
|
1532
|
-
} = w,
|
|
1533
|
-
|
|
1532
|
+
} = w, M = D();
|
|
1533
|
+
M !== z.get() && (L.to(M), z.set(M));
|
|
1534
1534
|
});
|
|
1535
1535
|
}
|
|
1536
1536
|
function A() {
|
|
@@ -1539,23 +1539,23 @@ function Cr(t, e, n, r, i, s, o, l, a) {
|
|
|
1539
1539
|
return {
|
|
1540
1540
|
canLoop: T,
|
|
1541
1541
|
clear: A,
|
|
1542
|
-
loop:
|
|
1542
|
+
loop: _,
|
|
1543
1543
|
loopPoints: k
|
|
1544
1544
|
};
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function Ir(t, e, n) {
|
|
1547
1547
|
let r, i = !1;
|
|
1548
1548
|
function s(a) {
|
|
1549
1549
|
if (!n) return;
|
|
1550
|
-
function c(
|
|
1551
|
-
for (const
|
|
1552
|
-
if (
|
|
1550
|
+
function c(y) {
|
|
1551
|
+
for (const g of y)
|
|
1552
|
+
if (g.type === "childList") {
|
|
1553
1553
|
a.reInit(), e.emit("slidesChanged");
|
|
1554
1554
|
break;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
r = new MutationObserver((
|
|
1558
|
-
i || (
|
|
1557
|
+
r = new MutationObserver((y) => {
|
|
1558
|
+
i || (Ne(n) || n(a, y)) && c(y);
|
|
1559
1559
|
}), r.observe(t, {
|
|
1560
1560
|
childList: !0
|
|
1561
1561
|
});
|
|
@@ -1568,7 +1568,7 @@ function Dr(t, e, n) {
|
|
|
1568
1568
|
destroy: o
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Dr(t, e, n, r) {
|
|
1572
1572
|
const i = {};
|
|
1573
1573
|
let s = null, o = null, l, a = !1;
|
|
1574
1574
|
function c() {
|
|
@@ -1582,11 +1582,11 @@ function Ir(t, e, n, r) {
|
|
|
1582
1582
|
threshold: r
|
|
1583
1583
|
}), e.forEach((f) => l.observe(f));
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function y() {
|
|
1586
1586
|
l && l.disconnect(), a = !0;
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1589
|
-
return
|
|
1588
|
+
function g(f) {
|
|
1589
|
+
return _e(i).reduce((h, v) => {
|
|
1590
1590
|
const m = parseInt(v), {
|
|
1591
1591
|
isIntersecting: u
|
|
1592
1592
|
} = i[m];
|
|
@@ -1596,12 +1596,12 @@ function Ir(t, e, n, r) {
|
|
|
1596
1596
|
function k(f = !0) {
|
|
1597
1597
|
if (f && s) return s;
|
|
1598
1598
|
if (!f && o) return o;
|
|
1599
|
-
const h =
|
|
1599
|
+
const h = g(f);
|
|
1600
1600
|
return f && (s = h), f || (o = h), h;
|
|
1601
1601
|
}
|
|
1602
1602
|
return {
|
|
1603
1603
|
init: c,
|
|
1604
|
-
destroy:
|
|
1604
|
+
destroy: y,
|
|
1605
1605
|
get: k
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
@@ -1610,11 +1610,11 @@ function Ar(t, e, n, r, i, s) {
|
|
|
1610
1610
|
measureSize: o,
|
|
1611
1611
|
startEdge: l,
|
|
1612
1612
|
endEdge: a
|
|
1613
|
-
} = t, c = n[0] && i,
|
|
1613
|
+
} = t, c = n[0] && i, y = f(), g = h(), k = n.map(o), p = v();
|
|
1614
1614
|
function f() {
|
|
1615
1615
|
if (!c) return 0;
|
|
1616
1616
|
const u = n[0];
|
|
1617
|
-
return
|
|
1617
|
+
return $(e[l] - u[l]);
|
|
1618
1618
|
}
|
|
1619
1619
|
function h() {
|
|
1620
1620
|
if (!c) return 0;
|
|
@@ -1622,92 +1622,92 @@ function Ar(t, e, n, r, i, s) {
|
|
|
1622
1622
|
return parseFloat(u.getPropertyValue(`margin-${a}`));
|
|
1623
1623
|
}
|
|
1624
1624
|
function v() {
|
|
1625
|
-
return n.map((u, T,
|
|
1626
|
-
const A = !T,
|
|
1627
|
-
return A ? k[T] +
|
|
1628
|
-
}).map(
|
|
1625
|
+
return n.map((u, T, _) => {
|
|
1626
|
+
const A = !T, j = Xe(_, T);
|
|
1627
|
+
return A ? k[T] + y : j ? k[T] + g : _[T + 1][l] - u[l];
|
|
1628
|
+
}).map($);
|
|
1629
1629
|
}
|
|
1630
1630
|
return {
|
|
1631
1631
|
slideSizes: k,
|
|
1632
|
-
slideSizesWithGaps:
|
|
1633
|
-
startGap:
|
|
1634
|
-
endGap:
|
|
1632
|
+
slideSizesWithGaps: p,
|
|
1633
|
+
startGap: y,
|
|
1634
|
+
endGap: g
|
|
1635
1635
|
};
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function _r(t, e, n, r, i, s, o, l, a) {
|
|
1638
1638
|
const {
|
|
1639
1639
|
startEdge: c,
|
|
1640
|
-
endEdge:
|
|
1641
|
-
direction:
|
|
1642
|
-
} = t, k =
|
|
1643
|
-
function
|
|
1640
|
+
endEdge: y,
|
|
1641
|
+
direction: g
|
|
1642
|
+
} = t, k = Ze(n);
|
|
1643
|
+
function p(m, u) {
|
|
1644
1644
|
return Ae(m).filter((T) => T % u === 0).map((T) => m.slice(T, T + u));
|
|
1645
1645
|
}
|
|
1646
1646
|
function f(m) {
|
|
1647
|
-
return m.length ? Ae(m).reduce((u, T,
|
|
1648
|
-
const A = ae(u) || 0,
|
|
1649
|
-
return
|
|
1650
|
-
}, []).map((u, T,
|
|
1651
|
-
const A = Math.max(
|
|
1647
|
+
return m.length ? Ae(m).reduce((u, T, _) => {
|
|
1648
|
+
const A = ae(u) || 0, j = A === 0, w = T === Le(m), D = i[c] - s[A][c], L = i[c] - s[T][y], z = !r && j ? g(o) : 0, M = !r && w ? g(l) : 0, R = $(L - M - (D + z));
|
|
1649
|
+
return _ && R > e + a && u.push(T), w && u.push(m.length), u;
|
|
1650
|
+
}, []).map((u, T, _) => {
|
|
1651
|
+
const A = Math.max(_[T - 1] || 0);
|
|
1652
1652
|
return m.slice(A, u);
|
|
1653
1653
|
}) : [];
|
|
1654
1654
|
}
|
|
1655
1655
|
function h(m) {
|
|
1656
|
-
return k ?
|
|
1656
|
+
return k ? p(m, n) : f(m);
|
|
1657
1657
|
}
|
|
1658
1658
|
return {
|
|
1659
1659
|
groupSlides: h
|
|
1660
1660
|
};
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function jr(t, e, n, r, i, s, o) {
|
|
1663
1663
|
const {
|
|
1664
1664
|
align: l,
|
|
1665
1665
|
axis: a,
|
|
1666
1666
|
direction: c,
|
|
1667
|
-
startIndex:
|
|
1668
|
-
loop:
|
|
1667
|
+
startIndex: y,
|
|
1668
|
+
loop: g,
|
|
1669
1669
|
duration: k,
|
|
1670
|
-
dragFree:
|
|
1670
|
+
dragFree: p,
|
|
1671
1671
|
dragThreshold: f,
|
|
1672
1672
|
inViewThreshold: h,
|
|
1673
1673
|
slidesToScroll: v,
|
|
1674
1674
|
skipSnaps: m,
|
|
1675
1675
|
containScroll: u,
|
|
1676
1676
|
watchResize: T,
|
|
1677
|
-
watchSlides:
|
|
1677
|
+
watchSlides: _,
|
|
1678
1678
|
watchDrag: A,
|
|
1679
|
-
watchFocus:
|
|
1680
|
-
} = s, w = 2,
|
|
1679
|
+
watchFocus: j
|
|
1680
|
+
} = s, w = 2, D = ur(), L = D.measure(e), z = n.map(D.measure), M = lr(a, c), R = M.measureSize(L), P = mr(R), B = ir(l, R), I = !g && !!u, U = g || !!u, {
|
|
1681
1681
|
slideSizes: oe,
|
|
1682
|
-
slideSizesWithGaps:
|
|
1682
|
+
slideSizesWithGaps: J,
|
|
1683
1683
|
startGap: Y,
|
|
1684
1684
|
endGap: de
|
|
1685
|
-
} = Ar(
|
|
1685
|
+
} = Ar(M, L, z, n, U, i), Z = _r(M, R, v, g, L, z, Y, de, w), {
|
|
1686
1686
|
snaps: ie,
|
|
1687
1687
|
snapsAligned: Q
|
|
1688
|
-
} =
|
|
1689
|
-
snapsContained:
|
|
1688
|
+
} = br(M, B, L, z, Z), X = -ae(ie) + ae(J), {
|
|
1689
|
+
snapsContained: S,
|
|
1690
1690
|
scrollContainLimit: C
|
|
1691
|
-
} = hr(R, X, Q, u, w),
|
|
1692
|
-
limit:
|
|
1693
|
-
} = kr(X,
|
|
1691
|
+
} = hr(R, X, Q, u, w), F = I ? S : Q, {
|
|
1692
|
+
limit: H
|
|
1693
|
+
} = kr(X, F, g), te = _t(Le(F), y, g), ee = te.clone(), G = Ae(n), x = ({
|
|
1694
1694
|
dragHandler: ke,
|
|
1695
|
-
scrollBody:
|
|
1696
|
-
scrollBounds:
|
|
1695
|
+
scrollBody: Ge,
|
|
1696
|
+
scrollBounds: We,
|
|
1697
1697
|
options: {
|
|
1698
|
-
loop:
|
|
1698
|
+
loop: Ee
|
|
1699
1699
|
}
|
|
1700
1700
|
}) => {
|
|
1701
|
-
|
|
1702
|
-
},
|
|
1701
|
+
Ee || We.constrain(ke.pointerDown()), Ge.seek();
|
|
1702
|
+
}, N = ({
|
|
1703
1703
|
scrollBody: ke,
|
|
1704
|
-
translate:
|
|
1705
|
-
location:
|
|
1706
|
-
offsetLocation:
|
|
1707
|
-
previousLocation:
|
|
1708
|
-
scrollLooper:
|
|
1709
|
-
slideLooper:
|
|
1710
|
-
dragHandler:
|
|
1704
|
+
translate: Ge,
|
|
1705
|
+
location: We,
|
|
1706
|
+
offsetLocation: Ee,
|
|
1707
|
+
previousLocation: Mt,
|
|
1708
|
+
scrollLooper: Bt,
|
|
1709
|
+
slideLooper: Nt,
|
|
1710
|
+
dragHandler: Pt,
|
|
1711
1711
|
animation: zt,
|
|
1712
1712
|
eventHandler: rt,
|
|
1713
1713
|
scrollBounds: Rt,
|
|
@@ -1715,52 +1715,52 @@ function Lr(t, e, n, r, i, s, o) {
|
|
|
1715
1715
|
loop: st
|
|
1716
1716
|
}
|
|
1717
1717
|
}, it) => {
|
|
1718
|
-
const at = ke.settled(),
|
|
1718
|
+
const at = ke.settled(), Gt = !Rt.shouldConstrain(), lt = st ? at : at && Gt, dt = lt && !Pt.pointerDown();
|
|
1719
1719
|
dt && zt.stop();
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
},
|
|
1720
|
+
const Wt = We.get() * it + Mt.get() * (1 - it);
|
|
1721
|
+
Ee.set(Wt), st && (Bt.loop(ke.direction()), Nt.loop()), Ge.to(Ee.get()), dt && rt.emit("settle"), lt || rt.emit("scroll");
|
|
1722
|
+
}, W = ar(r, i, () => x(Re), (ke) => N(Re, ke)), O = 0.68, le = F[te.get()], ce = Ie(le), pe = Ie(le), ue = Ie(le), ge = Ie(le), Se = gr(ce, ue, pe, ge, k, O), Pe = Sr(g, F, X, H, ge), ze = xr(W, te, ee, Se, Pe, ge, o), tt = yr(H), nt = je(), Et = Dr(e, n, o, h), {
|
|
1723
1723
|
slideRegistry: ot
|
|
1724
|
-
} = Tr(
|
|
1724
|
+
} = Tr(I, u, F, C, Z, G), Ft = wr(t, n, ot, ze, Se, nt, o, j), Re = {
|
|
1725
1725
|
ownerDocument: r,
|
|
1726
1726
|
ownerWindow: i,
|
|
1727
1727
|
eventHandler: o,
|
|
1728
|
-
containerRect:
|
|
1728
|
+
containerRect: L,
|
|
1729
1729
|
slideRects: z,
|
|
1730
|
-
animation:
|
|
1731
|
-
axis:
|
|
1732
|
-
dragHandler: dr(
|
|
1730
|
+
animation: W,
|
|
1731
|
+
axis: M,
|
|
1732
|
+
dragHandler: dr(M, t, r, i, ge, cr(M, i), ce, W, ze, Se, Pe, te, o, P, p, f, m, O, A),
|
|
1733
1733
|
eventStore: nt,
|
|
1734
|
-
percentOfView:
|
|
1734
|
+
percentOfView: P,
|
|
1735
1735
|
index: te,
|
|
1736
1736
|
indexPrevious: ee,
|
|
1737
|
-
limit:
|
|
1737
|
+
limit: H,
|
|
1738
1738
|
location: ce,
|
|
1739
1739
|
offsetLocation: ue,
|
|
1740
|
-
previousLocation:
|
|
1740
|
+
previousLocation: pe,
|
|
1741
1741
|
options: s,
|
|
1742
|
-
resizeHandler:
|
|
1743
|
-
scrollBody:
|
|
1744
|
-
scrollBounds: fr(
|
|
1745
|
-
scrollLooper: vr(X,
|
|
1742
|
+
resizeHandler: pr(e, o, i, n, M, T, D),
|
|
1743
|
+
scrollBody: Se,
|
|
1744
|
+
scrollBounds: fr(H, ue, ge, Se, P),
|
|
1745
|
+
scrollLooper: vr(X, H, ue, [ce, ue, pe, ge]),
|
|
1746
1746
|
scrollProgress: tt,
|
|
1747
|
-
scrollSnapList:
|
|
1748
|
-
scrollSnaps:
|
|
1749
|
-
scrollTarget:
|
|
1747
|
+
scrollSnapList: F.map(tt.get),
|
|
1748
|
+
scrollSnaps: F,
|
|
1749
|
+
scrollTarget: Pe,
|
|
1750
1750
|
scrollTo: ze,
|
|
1751
|
-
slideLooper: Cr(
|
|
1752
|
-
slideFocus:
|
|
1753
|
-
slidesHandler:
|
|
1754
|
-
slidesInView:
|
|
1755
|
-
slideIndexes:
|
|
1751
|
+
slideLooper: Cr(M, R, X, oe, J, ie, F, ue, n),
|
|
1752
|
+
slideFocus: Ft,
|
|
1753
|
+
slidesHandler: Ir(e, o, _),
|
|
1754
|
+
slidesInView: Et,
|
|
1755
|
+
slideIndexes: G,
|
|
1756
1756
|
slideRegistry: ot,
|
|
1757
|
-
slidesToScroll:
|
|
1758
|
-
target:
|
|
1759
|
-
translate:
|
|
1757
|
+
slidesToScroll: Z,
|
|
1758
|
+
target: ge,
|
|
1759
|
+
translate: jt(M, e)
|
|
1760
1760
|
};
|
|
1761
1761
|
return Re;
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function Lr() {
|
|
1764
1764
|
let t = {}, e;
|
|
1765
1765
|
function n(c) {
|
|
1766
1766
|
e = c;
|
|
@@ -1769,13 +1769,13 @@ function Fr() {
|
|
|
1769
1769
|
return t[c] || [];
|
|
1770
1770
|
}
|
|
1771
1771
|
function i(c) {
|
|
1772
|
-
return r(c).forEach((
|
|
1772
|
+
return r(c).forEach((y) => y(e, c)), a;
|
|
1773
1773
|
}
|
|
1774
|
-
function s(c,
|
|
1775
|
-
return t[c] = r(c).concat([
|
|
1774
|
+
function s(c, y) {
|
|
1775
|
+
return t[c] = r(c).concat([y]), a;
|
|
1776
1776
|
}
|
|
1777
|
-
function o(c,
|
|
1778
|
-
return t[c] = r(c).filter((
|
|
1777
|
+
function o(c, y) {
|
|
1778
|
+
return t[c] = r(c).filter((g) => g !== y), a;
|
|
1779
1779
|
}
|
|
1780
1780
|
function l() {
|
|
1781
1781
|
t = {};
|
|
@@ -1789,7 +1789,7 @@ function Fr() {
|
|
|
1789
1789
|
};
|
|
1790
1790
|
return a;
|
|
1791
1791
|
}
|
|
1792
|
-
const
|
|
1792
|
+
const Er = {
|
|
1793
1793
|
align: "center",
|
|
1794
1794
|
axis: "x",
|
|
1795
1795
|
container: null,
|
|
@@ -1811,16 +1811,16 @@ const Br = {
|
|
|
1811
1811
|
watchSlides: !0,
|
|
1812
1812
|
watchFocus: !0
|
|
1813
1813
|
};
|
|
1814
|
-
function
|
|
1814
|
+
function Fr(t) {
|
|
1815
1815
|
function e(s, o) {
|
|
1816
1816
|
return At(s, o || {});
|
|
1817
1817
|
}
|
|
1818
1818
|
function n(s) {
|
|
1819
|
-
const o = s.breakpoints || {}, l =
|
|
1819
|
+
const o = s.breakpoints || {}, l = _e(o).filter((a) => t.matchMedia(a).matches).map((a) => o[a]).reduce((a, c) => e(a, c), {});
|
|
1820
1820
|
return e(s, l);
|
|
1821
1821
|
}
|
|
1822
1822
|
function r(s) {
|
|
1823
|
-
return s.map((o) =>
|
|
1823
|
+
return s.map((o) => _e(o.breakpoints || {})).reduce((o, l) => o.concat(l), []).map(t.matchMedia);
|
|
1824
1824
|
}
|
|
1825
1825
|
return {
|
|
1826
1826
|
mergeOptions: e,
|
|
@@ -1828,7 +1828,7 @@ function Nr(t) {
|
|
|
1828
1828
|
optionsMediaQueries: r
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function Mr(t) {
|
|
1832
1832
|
let e = [];
|
|
1833
1833
|
function n(s, o) {
|
|
1834
1834
|
return e = o.filter(({
|
|
@@ -1845,69 +1845,69 @@ function Pr(t) {
|
|
|
1845
1845
|
destroy: r
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1849
|
-
const r = t.ownerDocument, i = r.defaultView, s =
|
|
1848
|
+
function Be(t, e, n) {
|
|
1849
|
+
const r = t.ownerDocument, i = r.defaultView, s = Fr(i), o = Mr(s), l = je(), a = Lr(), {
|
|
1850
1850
|
mergeOptions: c,
|
|
1851
|
-
optionsAtMedia:
|
|
1852
|
-
optionsMediaQueries:
|
|
1851
|
+
optionsAtMedia: y,
|
|
1852
|
+
optionsMediaQueries: g
|
|
1853
1853
|
} = s, {
|
|
1854
1854
|
on: k,
|
|
1855
|
-
off:
|
|
1855
|
+
off: p,
|
|
1856
1856
|
emit: f
|
|
1857
|
-
} = a, h =
|
|
1858
|
-
let v = !1, m, u = c(
|
|
1859
|
-
function
|
|
1857
|
+
} = a, h = M;
|
|
1858
|
+
let v = !1, m, u = c(Er, Be.globalOptions), T = c(u), _ = [], A, j, w;
|
|
1859
|
+
function D() {
|
|
1860
1860
|
const {
|
|
1861
|
-
container:
|
|
1862
|
-
slides:
|
|
1861
|
+
container: G,
|
|
1862
|
+
slides: x
|
|
1863
1863
|
} = T;
|
|
1864
|
-
|
|
1865
|
-
const
|
|
1866
|
-
w = [].slice.call(
|
|
1867
|
-
}
|
|
1868
|
-
function
|
|
1869
|
-
const
|
|
1870
|
-
if (
|
|
1871
|
-
const
|
|
1864
|
+
j = (Ke(G) ? t.querySelector(G) : G) || t.children[0];
|
|
1865
|
+
const W = Ke(x) ? j.querySelectorAll(x) : x;
|
|
1866
|
+
w = [].slice.call(W || j.children);
|
|
1867
|
+
}
|
|
1868
|
+
function L(G) {
|
|
1869
|
+
const x = jr(t, j, w, r, i, G, a);
|
|
1870
|
+
if (G.loop && !x.slideLooper.canLoop()) {
|
|
1871
|
+
const N = Object.assign({}, G, {
|
|
1872
1872
|
loop: !1
|
|
1873
1873
|
});
|
|
1874
|
-
return
|
|
1874
|
+
return L(N);
|
|
1875
1875
|
}
|
|
1876
|
-
return
|
|
1876
|
+
return x;
|
|
1877
1877
|
}
|
|
1878
|
-
function z(
|
|
1879
|
-
v || (u = c(u,
|
|
1880
|
-
options:
|
|
1881
|
-
}) =>
|
|
1878
|
+
function z(G, x) {
|
|
1879
|
+
v || (u = c(u, G), T = y(u), _ = x || _, D(), m = L(T), g([u, ..._.map(({
|
|
1880
|
+
options: N
|
|
1881
|
+
}) => N)]).forEach((N) => l.add(N, "change", M)), T.active && (m.translate.to(m.location.get()), m.animation.init(), m.slidesInView.init(), m.slideFocus.init(ee), m.eventHandler.init(ee), m.resizeHandler.init(ee), m.slidesHandler.init(ee), m.options.loop && m.slideLooper.loop(), j.offsetParent && w.length && m.dragHandler.init(ee), A = o.init(ee, _)));
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1884
|
-
const
|
|
1883
|
+
function M(G, x) {
|
|
1884
|
+
const N = Z();
|
|
1885
1885
|
R(), z(c({
|
|
1886
|
-
startIndex:
|
|
1887
|
-
},
|
|
1886
|
+
startIndex: N
|
|
1887
|
+
}, G), x), a.emit("reInit");
|
|
1888
1888
|
}
|
|
1889
1889
|
function R() {
|
|
1890
1890
|
m.dragHandler.destroy(), m.eventStore.clear(), m.translate.clear(), m.slideLooper.clear(), m.resizeHandler.destroy(), m.slidesHandler.destroy(), m.slidesInView.destroy(), m.animation.destroy(), o.destroy(), l.clear();
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function P() {
|
|
1893
1893
|
v || (v = !0, l.clear(), R(), a.emit("destroy"), a.clear());
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1896
|
-
!T.active || v || (m.scrollBody.useBaseFriction().useDuration(
|
|
1895
|
+
function B(G, x, N) {
|
|
1896
|
+
!T.active || v || (m.scrollBody.useBaseFriction().useDuration(x === !0 ? 0 : T.duration), m.scrollTo.index(G, N || 0));
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1899
|
-
const
|
|
1900
|
-
|
|
1898
|
+
function I(G) {
|
|
1899
|
+
const x = m.index.add(1).get();
|
|
1900
|
+
B(x, G, -1);
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1902
|
+
function U(G) {
|
|
1903
|
+
const x = m.index.add(-1).get();
|
|
1904
|
+
B(x, G, 1);
|
|
1905
1905
|
}
|
|
1906
1906
|
function oe() {
|
|
1907
|
-
return m.index.add(1).get() !==
|
|
1907
|
+
return m.index.add(1).get() !== Z();
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return m.index.add(-1).get() !==
|
|
1909
|
+
function J() {
|
|
1910
|
+
return m.index.add(-1).get() !== Z();
|
|
1911
1911
|
}
|
|
1912
1912
|
function Y() {
|
|
1913
1913
|
return m.scrollSnapList;
|
|
@@ -1915,7 +1915,7 @@ function Me(t, e, n) {
|
|
|
1915
1915
|
function de() {
|
|
1916
1916
|
return m.scrollProgress.get(m.offsetLocation.get());
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function Z() {
|
|
1919
1919
|
return m.index.get();
|
|
1920
1920
|
}
|
|
1921
1921
|
function ie() {
|
|
@@ -1927,81 +1927,81 @@ function Me(t, e, n) {
|
|
|
1927
1927
|
function X() {
|
|
1928
1928
|
return m.slidesInView.get(!1);
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function S() {
|
|
1931
1931
|
return A;
|
|
1932
1932
|
}
|
|
1933
1933
|
function C() {
|
|
1934
1934
|
return m;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function F() {
|
|
1937
1937
|
return t;
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1940
|
-
return
|
|
1939
|
+
function H() {
|
|
1940
|
+
return j;
|
|
1941
1941
|
}
|
|
1942
1942
|
function te() {
|
|
1943
1943
|
return w;
|
|
1944
1944
|
}
|
|
1945
1945
|
const ee = {
|
|
1946
1946
|
canScrollNext: oe,
|
|
1947
|
-
canScrollPrev:
|
|
1948
|
-
containerNode:
|
|
1947
|
+
canScrollPrev: J,
|
|
1948
|
+
containerNode: H,
|
|
1949
1949
|
internalEngine: C,
|
|
1950
|
-
destroy:
|
|
1951
|
-
off:
|
|
1950
|
+
destroy: P,
|
|
1951
|
+
off: p,
|
|
1952
1952
|
on: k,
|
|
1953
1953
|
emit: f,
|
|
1954
|
-
plugins:
|
|
1954
|
+
plugins: S,
|
|
1955
1955
|
previousScrollSnap: ie,
|
|
1956
1956
|
reInit: h,
|
|
1957
|
-
rootNode:
|
|
1958
|
-
scrollNext:
|
|
1959
|
-
scrollPrev:
|
|
1957
|
+
rootNode: F,
|
|
1958
|
+
scrollNext: I,
|
|
1959
|
+
scrollPrev: U,
|
|
1960
1960
|
scrollProgress: de,
|
|
1961
1961
|
scrollSnapList: Y,
|
|
1962
|
-
scrollTo:
|
|
1963
|
-
selectedScrollSnap:
|
|
1962
|
+
scrollTo: B,
|
|
1963
|
+
selectedScrollSnap: Z,
|
|
1964
1964
|
slideNodes: te,
|
|
1965
1965
|
slidesInView: Q,
|
|
1966
1966
|
slidesNotInView: X
|
|
1967
1967
|
};
|
|
1968
1968
|
return z(e, n), setTimeout(() => a.emit("init"), 0), ee;
|
|
1969
1969
|
}
|
|
1970
|
-
|
|
1970
|
+
Be.globalOptions = void 0;
|
|
1971
1971
|
function et(t = {}, e = []) {
|
|
1972
|
-
const n =
|
|
1972
|
+
const n = Oe(t), r = Oe(e), [i, s] = ne(), [o, l] = ne(), a = se(() => {
|
|
1973
1973
|
i && i.reInit(n.current, r.current);
|
|
1974
1974
|
}, [i]);
|
|
1975
|
-
return
|
|
1976
|
-
|
|
1977
|
-
}, [t, a]),
|
|
1975
|
+
return q(() => {
|
|
1976
|
+
Je(n.current, t) || (n.current = t, a());
|
|
1977
|
+
}, [t, a]), q(() => {
|
|
1978
1978
|
or(r.current, e) || (r.current = e, a());
|
|
1979
|
-
}, [e, a]),
|
|
1979
|
+
}, [e, a]), q(() => {
|
|
1980
1980
|
if (nr() && o) {
|
|
1981
|
-
|
|
1982
|
-
const c =
|
|
1981
|
+
Be.globalOptions = et.globalOptions;
|
|
1982
|
+
const c = Be(o, n.current, r.current);
|
|
1983
1983
|
return s(c), () => c.destroy();
|
|
1984
1984
|
} else
|
|
1985
1985
|
s(void 0);
|
|
1986
1986
|
}, [o, s]), [l, i];
|
|
1987
1987
|
}
|
|
1988
1988
|
et.globalOptions = void 0;
|
|
1989
|
-
const
|
|
1990
|
-
carouselContainer:
|
|
1991
|
-
viewport:
|
|
1992
|
-
slides:
|
|
1989
|
+
const Br = "_carouselContainer_1bu1s_1", Nr = "_viewport_1bu1s_11", Pr = "_slides_1bu1s_17", zr = "_slide_1bu1s_17", Rr = "_slideInner_1bu1s_37", Gr = "_loaderOverlay_1bu1s_45", Wr = "_image_1bu1s_55", Hr = "_loaded_1bu1s_66", $r = "_empty_1bu1s_78", Ur = "_controls_1bu1s_84", Or = "_arrows_1bu1s_94", Vr = "_dots_1bu1s_104", Kr = "_dot_1bu1s_104", qr = "_dotActive_1bu1s_130", V = {
|
|
1990
|
+
carouselContainer: Br,
|
|
1991
|
+
viewport: Nr,
|
|
1992
|
+
slides: Pr,
|
|
1993
1993
|
slide: zr,
|
|
1994
1994
|
slideInner: Rr,
|
|
1995
|
-
loaderOverlay:
|
|
1996
|
-
image:
|
|
1997
|
-
loaded:
|
|
1998
|
-
empty:
|
|
1999
|
-
controls:
|
|
2000
|
-
arrows:
|
|
2001
|
-
dots:
|
|
2002
|
-
dot:
|
|
2003
|
-
dotActive:
|
|
2004
|
-
}, Yr = sn,
|
|
1995
|
+
loaderOverlay: Gr,
|
|
1996
|
+
image: Wr,
|
|
1997
|
+
loaded: Hr,
|
|
1998
|
+
empty: $r,
|
|
1999
|
+
controls: Ur,
|
|
2000
|
+
arrows: Or,
|
|
2001
|
+
dots: Vr,
|
|
2002
|
+
dot: Kr,
|
|
2003
|
+
dotActive: qr
|
|
2004
|
+
}, Yr = sn, Jr = ({
|
|
2005
2005
|
images: t,
|
|
2006
2006
|
autoPlay: e = !1,
|
|
2007
2007
|
autoDelay: n = 5,
|
|
@@ -2012,103 +2012,103 @@ const Mr = "_carouselContainer_1bu1s_1", Er = "_viewport_1bu1s_11", _r = "_slide
|
|
|
2012
2012
|
slideSpacing: l = 16,
|
|
2013
2013
|
cornerRadius: a = 0,
|
|
2014
2014
|
"data-color": c,
|
|
2015
|
-
"data-size":
|
|
2015
|
+
"data-size": y
|
|
2016
2016
|
}) => {
|
|
2017
|
-
const
|
|
2017
|
+
const g = {
|
|
2018
2018
|
loop: !0,
|
|
2019
2019
|
align: "start",
|
|
2020
2020
|
containScroll: "trimSnaps",
|
|
2021
2021
|
slidesToScroll: 1
|
|
2022
|
-
}, [k,
|
|
2023
|
-
|
|
2022
|
+
}, [k, p] = et(g), [f, h] = ne(0), [v, m] = ne([]), [u, T] = ne([]);
|
|
2023
|
+
q(() => {
|
|
2024
2024
|
T(new Array((t == null ? void 0 : t.length) || 0).fill(!1));
|
|
2025
2025
|
}, [t]);
|
|
2026
|
-
const
|
|
2027
|
-
T((
|
|
2028
|
-
const
|
|
2029
|
-
return
|
|
2026
|
+
const _ = se((P) => {
|
|
2027
|
+
T((B) => {
|
|
2028
|
+
const I = [...B];
|
|
2029
|
+
return I[P] = !0, I;
|
|
2030
2030
|
});
|
|
2031
|
-
}, []), A =
|
|
2032
|
-
|
|
2033
|
-
}, [
|
|
2034
|
-
|
|
2035
|
-
if (
|
|
2036
|
-
return
|
|
2037
|
-
|
|
2031
|
+
}, []), A = be(() => n * 1e3, [n]), j = se(() => {
|
|
2032
|
+
p && h(p.selectedScrollSnap());
|
|
2033
|
+
}, [p]), w = se((P) => p && p.scrollTo(P), [p]), D = se(() => p && p.scrollPrev(), [p]), L = se(() => p && p.scrollNext(), [p]);
|
|
2034
|
+
q(() => {
|
|
2035
|
+
if (p)
|
|
2036
|
+
return p.on("select", j), p.on("reInit", j), m(p.scrollSnapList()), () => {
|
|
2037
|
+
p.off("select", j), p.off("reInit", j);
|
|
2038
2038
|
};
|
|
2039
|
-
}, [
|
|
2040
|
-
|
|
2041
|
-
}, [
|
|
2042
|
-
if (!e || !
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2039
|
+
}, [p, j]), q(() => {
|
|
2040
|
+
p && (p.reInit(), m(p.scrollSnapList()));
|
|
2041
|
+
}, [p, t, o, l]), q(() => {
|
|
2042
|
+
if (!e || !p || !t || t.length <= 1) return;
|
|
2043
|
+
const P = window.setInterval(() => {
|
|
2044
|
+
p.canScrollNext() && p.scrollNext();
|
|
2045
2045
|
}, A);
|
|
2046
2046
|
return () => {
|
|
2047
|
-
window.clearInterval(
|
|
2047
|
+
window.clearInterval(P);
|
|
2048
2048
|
};
|
|
2049
|
-
}, [e, A,
|
|
2050
|
-
const z = Math.max(1, o),
|
|
2051
|
-
return /* @__PURE__ */
|
|
2049
|
+
}, [e, A, p, t]);
|
|
2050
|
+
const z = Math.max(1, o), M = `${100 / z}%`, R = l / 2;
|
|
2051
|
+
return /* @__PURE__ */ E(
|
|
2052
2052
|
"div",
|
|
2053
2053
|
{
|
|
2054
|
-
className:
|
|
2054
|
+
className: V.carouselContainer,
|
|
2055
2055
|
"data-color": c,
|
|
2056
|
-
"data-size":
|
|
2056
|
+
"data-size": y,
|
|
2057
2057
|
"data-variant": s,
|
|
2058
2058
|
children: [
|
|
2059
|
-
/* @__PURE__ */ d("div", { className:
|
|
2059
|
+
/* @__PURE__ */ d("div", { className: V.viewport, ref: k, children: /* @__PURE__ */ d(
|
|
2060
2060
|
"div",
|
|
2061
2061
|
{
|
|
2062
|
-
className:
|
|
2062
|
+
className: V.slides,
|
|
2063
2063
|
style: {
|
|
2064
2064
|
marginLeft: `-${R}px`,
|
|
2065
2065
|
marginRight: `-${R}px`
|
|
2066
2066
|
},
|
|
2067
|
-
children: t && t.length > 0 ? t.map((
|
|
2067
|
+
children: t && t.length > 0 ? t.map((P, B) => /* @__PURE__ */ d(
|
|
2068
2068
|
"div",
|
|
2069
2069
|
{
|
|
2070
|
-
className:
|
|
2070
|
+
className: V.slide,
|
|
2071
2071
|
style: {
|
|
2072
|
-
flex: `0 0 ${
|
|
2072
|
+
flex: `0 0 ${M}`,
|
|
2073
2073
|
paddingLeft: `${R}px`,
|
|
2074
2074
|
paddingRight: `${R}px`,
|
|
2075
2075
|
borderRadius: a > 0 ? `${a}px` : void 0,
|
|
2076
2076
|
overflow: "hidden"
|
|
2077
2077
|
// Ensure radius clips content
|
|
2078
2078
|
},
|
|
2079
|
-
children: /* @__PURE__ */
|
|
2080
|
-
!u[
|
|
2079
|
+
children: /* @__PURE__ */ E("div", { className: V.slideInner, style: { borderRadius: `${a}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
2080
|
+
!u[B] && /* @__PURE__ */ d("div", { className: V.loaderOverlay, children: /* @__PURE__ */ d(Yr, { "aria-label": "Laster bilde" }) }),
|
|
2081
2081
|
/* @__PURE__ */ d(
|
|
2082
2082
|
"img",
|
|
2083
2083
|
{
|
|
2084
|
-
className: `${
|
|
2085
|
-
src:
|
|
2086
|
-
alt:
|
|
2087
|
-
loading:
|
|
2084
|
+
className: `${V.image} ${u[B] ? V.loaded : V.loadingImage}`,
|
|
2085
|
+
src: P.src,
|
|
2086
|
+
alt: P.alt,
|
|
2087
|
+
loading: B < z ? "eager" : "lazy",
|
|
2088
2088
|
crossOrigin: "anonymous",
|
|
2089
|
-
onLoad: () =>
|
|
2090
|
-
onError: (
|
|
2091
|
-
|
|
2089
|
+
onLoad: () => _(B),
|
|
2090
|
+
onError: (I) => {
|
|
2091
|
+
I.target.style.display = "none", _(B);
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
)
|
|
2095
2095
|
] })
|
|
2096
2096
|
},
|
|
2097
|
-
`image-${
|
|
2098
|
-
)) : /* @__PURE__ */ d("div", { className:
|
|
2097
|
+
`image-${B}-${P.src}`
|
|
2098
|
+
)) : /* @__PURE__ */ d("div", { className: V.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ d("div", { className: V.empty, children: "Ingen bilder" }) })
|
|
2099
2099
|
}
|
|
2100
2100
|
) }),
|
|
2101
|
-
(r || i && t && t.length > 1) && /* @__PURE__ */
|
|
2102
|
-
r && /* @__PURE__ */
|
|
2101
|
+
(r || i && t && t.length > 1) && /* @__PURE__ */ E("div", { className: V.controls, "aria-hidden": "false", children: [
|
|
2102
|
+
r && /* @__PURE__ */ E("div", { className: V.arrows, children: [
|
|
2103
2103
|
/* @__PURE__ */ d(
|
|
2104
2104
|
Te,
|
|
2105
2105
|
{
|
|
2106
2106
|
variant: "primary",
|
|
2107
2107
|
icon: !0,
|
|
2108
2108
|
"aria-label": "Forrige bilde",
|
|
2109
|
-
onClick:
|
|
2109
|
+
onClick: D,
|
|
2110
2110
|
disabled: !t || t.length <= 1,
|
|
2111
|
-
children: /* @__PURE__ */ d(
|
|
2111
|
+
children: /* @__PURE__ */ d(qn, { "aria-hidden": !0 })
|
|
2112
2112
|
}
|
|
2113
2113
|
),
|
|
2114
2114
|
/* @__PURE__ */ d(
|
|
@@ -2117,25 +2117,25 @@ const Mr = "_carouselContainer_1bu1s_1", Er = "_viewport_1bu1s_11", _r = "_slide
|
|
|
2117
2117
|
variant: "primary",
|
|
2118
2118
|
icon: !0,
|
|
2119
2119
|
"aria-label": "Neste bilde",
|
|
2120
|
-
onClick:
|
|
2120
|
+
onClick: L,
|
|
2121
2121
|
disabled: !t || t.length <= 1,
|
|
2122
2122
|
children: /* @__PURE__ */ d(Yn, { "aria-hidden": !0 })
|
|
2123
2123
|
}
|
|
2124
2124
|
)
|
|
2125
2125
|
] }),
|
|
2126
|
-
i && t && t.length > 1 && /* @__PURE__ */ d("div", { className:
|
|
2127
|
-
const
|
|
2126
|
+
i && t && t.length > 1 && /* @__PURE__ */ d("div", { className: V.dots, role: "tablist", "aria-label": "Bildeposisjon", children: v.map((P, B) => {
|
|
2127
|
+
const I = B === f;
|
|
2128
2128
|
return /* @__PURE__ */ d(
|
|
2129
2129
|
"button",
|
|
2130
2130
|
{
|
|
2131
2131
|
type: "button",
|
|
2132
|
-
className: `${
|
|
2133
|
-
onClick: () => w(
|
|
2134
|
-
"aria-label": `Gå til bilde ${
|
|
2135
|
-
"aria-selected":
|
|
2132
|
+
className: `${V.dot} ${I ? V.dotActive : ""}`,
|
|
2133
|
+
onClick: () => w(B),
|
|
2134
|
+
"aria-label": `Gå til bilde ${B + 1}`,
|
|
2135
|
+
"aria-selected": I,
|
|
2136
2136
|
role: "tab"
|
|
2137
2137
|
},
|
|
2138
|
-
`dot-${
|
|
2138
|
+
`dot-${B}`
|
|
2139
2139
|
);
|
|
2140
2140
|
}) })
|
|
2141
2141
|
] })
|
|
@@ -2143,25 +2143,25 @@ const Mr = "_carouselContainer_1bu1s_1", Er = "_viewport_1bu1s_11", _r = "_slide
|
|
|
2143
2143
|
}
|
|
2144
2144
|
);
|
|
2145
2145
|
};
|
|
2146
|
-
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2146
|
+
Jr.displayName = "Carousel";
|
|
2147
|
+
const yi = an, bi = ln, Ti = dn, K = cn, Si = un, xi = mn, Zr = pn, Qr = gn;
|
|
2148
|
+
Zr.displayName = "Field.Description";
|
|
2149
2149
|
Qr.displayName = "Field.Counter";
|
|
2150
|
-
const wi =
|
|
2150
|
+
const wi = St, Xr = me((t, e) => /* @__PURE__ */ d(fn, { ref: e, ...t }));
|
|
2151
2151
|
Xr.displayName = "Heading";
|
|
2152
2152
|
const Ci = hn, es = me((t, e) => /* @__PURE__ */ d(kn, { ref: e, ...t }));
|
|
2153
2153
|
es.displayName = "Label";
|
|
2154
|
-
const
|
|
2155
|
-
(t, e) => /* @__PURE__ */ d(
|
|
2154
|
+
const Fe = vn, Ii = yn, Di = bn, Ai = Tn, Ye = me(
|
|
2155
|
+
(t, e) => /* @__PURE__ */ d(Sn, { ref: e, ...t })
|
|
2156
2156
|
);
|
|
2157
2157
|
Ye.displayName = "Paragraph";
|
|
2158
|
-
const
|
|
2159
|
-
Button:
|
|
2158
|
+
const _i = xn, ji = wn, Li = Cn, Me = Object.assign(In, {
|
|
2159
|
+
Button: _n,
|
|
2160
2160
|
ClearButton: An,
|
|
2161
|
-
Input:
|
|
2162
|
-
}),
|
|
2161
|
+
Input: Dn
|
|
2162
|
+
}), Ei = jn, Fi = Ln, Mi = En, ts = Fn;
|
|
2163
2163
|
ts.displayName = "Suggestion";
|
|
2164
|
-
const
|
|
2164
|
+
const Ue = Mn, Bi = Bn, Ni = Nn, Pi = Pn, zi = zn, Ri = Rn, Gi = Gn, Wi = Wn, ns = me((t, e) => /* @__PURE__ */ d(Hn, { ref: e, ...t }));
|
|
2165
2165
|
ns.displayName = "ValidationMessage";
|
|
2166
2166
|
const os = {
|
|
2167
2167
|
NO: {
|
|
@@ -2267,7 +2267,8 @@ const os = {
|
|
|
2267
2267
|
figmaMcp: "Fra Figma til Kode (MCP)",
|
|
2268
2268
|
componentCreation: "Komponent Kreasjon",
|
|
2269
2269
|
metadataFiles: "Metadata filer",
|
|
2270
|
-
developerGuide: "Utviklerguide"
|
|
2270
|
+
developerGuide: "Utviklerguide",
|
|
2271
|
+
aiGuide: "AI Guide for Assistanter"
|
|
2271
2272
|
},
|
|
2272
2273
|
overview: {
|
|
2273
2274
|
title: "Røde Kors Designsystem",
|
|
@@ -2448,6 +2449,51 @@ const os = {
|
|
|
2448
2449
|
step0Item5: "Trykk Confirm.",
|
|
2449
2450
|
step0WhatHappensTitle: "Hva skjer nå?",
|
|
2450
2451
|
step0WhatHappensText: 'Cursor vil automatisk "crawle" (lese) gjennom hovedsiden og alle undersider. Den lagrer informasjonen i en lokal database. Dette gjør at du senere kan referere til @RødeKors i chatten, og AI-en vil umiddelbart vite alle fargekoder, spacing-variabler og komponent-regler uten at du trenger å lime inn tekst manuelt. NB: Dette gjelder når du refererer til @RødeKors i chatten. Hvis du bruker .cursorrules, trenger du ikke å legge ved @RødeKors manuelt.',
|
|
2452
|
+
step0_5Title: "Steg 0.5: Hent AI Design System Guide",
|
|
2453
|
+
step0_5Description: "Før du begynner å konvertere Figma-design til kode, må du hente AI Design System Guide. Denne guiden inneholder komplett dokumentasjon om alle komponenter, design tokens, og beste praksis som AI-assistenten trenger for å produsere korrekt kode.",
|
|
2454
|
+
step0_5WhyCurlTitle: "Hvorfor bruke curl?",
|
|
2455
|
+
step0_5WhyCurlText: "curl er den anbefalte metoden fordi:",
|
|
2456
|
+
step0_5WhyCurlItem1: "Filen lastes ned lokalt - AI-assistenten har alltid tilgang til den uten internett",
|
|
2457
|
+
step0_5WhyCurlItem2: "Raskere referanse - Ingen behov for å laste ned på nytt ved hver prompt",
|
|
2458
|
+
step0_5WhyCurlItem3: "Fungerer offline - Etter nedlasting kan du jobbe uten internettforbindelse",
|
|
2459
|
+
step0_5WhyCurlItem4: "Konsistent kontekst - AI-en leser samme versjon av guiden hver gang",
|
|
2460
|
+
step0_5WhyCurlItem5: "Enklere referanse - Bare bruk filnavnet (@AI_DESIGN_SYSTEM_GUIDE.md) i stedet for lange URL-er",
|
|
2461
|
+
step0_5ClaudeTitle: "For Claude Code:",
|
|
2462
|
+
step0_5ClaudeIntro: "I Claude Code kan du hente guiden direkte i terminalen eller be Claude om å gjøre det:",
|
|
2463
|
+
step0_5ClaudeMethod1Title: "Metode 1: Hent via terminal",
|
|
2464
|
+
step0_5ClaudeMethod1Step1: "Åpne terminalen i Claude Code",
|
|
2465
|
+
step0_5ClaudeMethod1Step2: "Kjør denne kommandoen:",
|
|
2466
|
+
step0_5ClaudeMethod1Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
2467
|
+
step0_5ClaudeMethod1Step3: "Verifiser at filen er lastet ned: ls -la AI_DESIGN_SYSTEM_GUIDE.md",
|
|
2468
|
+
step0_5ClaudeMethod2Title: "Metode 2: Be Claude om å hente den",
|
|
2469
|
+
step0_5ClaudeMethod2Text: 'Du kan også be Claude Code direkte: "Please fetch the AI Design System Guide from https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md"',
|
|
2470
|
+
step0_5ClaudeMethod2Note: "Merk: Dette laster ned filen lokalt, akkurat som curl-kommandoen.",
|
|
2471
|
+
step0_5ClaudeUsageTitle: "Bruk av guiden i Claude:",
|
|
2472
|
+
step0_5ClaudeUsageText: "Etter at guiden er lastet ned, referer til den i dine prompts:",
|
|
2473
|
+
step0_5ClaudeUsageExample: '"Using the AI_DESIGN_SYSTEM_GUIDE.md file and this Figma link [paste link], create a React component..."',
|
|
2474
|
+
step0_5CursorTitle: "For Cursor:",
|
|
2475
|
+
step0_5CursorIntro: "I Cursor kan du hente guiden på flere måter:",
|
|
2476
|
+
step0_5CursorMethod1Title: "Metode 1: Hent via terminal",
|
|
2477
|
+
step0_5CursorMethod1Step1: "Åpne terminalen i Cursor (Ctrl + ` eller Cmd + `)",
|
|
2478
|
+
step0_5CursorMethod1Step2: "Kjør denne kommandoen:",
|
|
2479
|
+
step0_5CursorMethod1Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
2480
|
+
step0_5CursorMethod2Title: "Metode 2: Referer direkte i chat (Alternativ)",
|
|
2481
|
+
step0_5CursorMethod2Text: "Du kan også referere til guiden direkte i Cursor-chatten uten å laste den ned først:",
|
|
2482
|
+
step0_5CursorMethod2Example: "@AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
2483
|
+
step0_5CursorMethod2Note: "Merk: Dette krever internettforbindelse hver gang. curl (Metode 1) er anbefalt for bedre ytelse og offline-tilgang.",
|
|
2484
|
+
step0_5CursorMethod3Title: "Metode 3: Via .cursorrules (Anbefalt for automatisk workflow)",
|
|
2485
|
+
step0_5CursorMethod3Text: "Hvis du bruker .cursorrules, legg til instruksjonen om å hente guiden der (se Steg 2, Alternativ B). Dette sikrer at guiden alltid lastes ned automatisk.",
|
|
2486
|
+
step0_5CursorUsageTitle: "Bruk av guiden i Cursor:",
|
|
2487
|
+
step0_5CursorUsageText: "Etter at guiden er tilgjengelig, referer til den i chatten:",
|
|
2488
|
+
step0_5CursorUsageExample1: 'Hvis lastet ned lokalt: "@AI_DESIGN_SYSTEM_GUIDE.md implement a component based on this Figma design [link]"',
|
|
2489
|
+
step0_5CursorUsageExample2: 'Hvis referert direkte: "Using the AI guide from @https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md, create..."',
|
|
2490
|
+
step0_5WhyTitle: "Hvorfor trenger jeg denne guiden?",
|
|
2491
|
+
step0_5WhyText: "AI Design System Guide inneholder:",
|
|
2492
|
+
step0_5WhyItem1: "Komplett liste over alle tilgjengelige komponenter med props og eksempler",
|
|
2493
|
+
step0_5WhyItem2: "Alle design tokens (farger, spacing, typografi, etc.) med korrekte CSS-variabler",
|
|
2494
|
+
step0_5WhyItem3: "Komponentmapping fra Figma-elementer til React-komponenter",
|
|
2495
|
+
step0_5WhyItem4: "Beste praksis for tilgjengelighet, TypeScript, og CSS Modules",
|
|
2496
|
+
step0_5WhyItem5: "Troubleshooting-guide for vanlige problemer",
|
|
2451
2497
|
step1Title: "Steg 1: Hent presis lenke i Figma",
|
|
2452
2498
|
step1Description: "For best resultat bør du isolere seksjonen du jobber med.",
|
|
2453
2499
|
step1Item1: "Marker rammen (Frame), komponenten eller gruppen du vil implementere.",
|
|
@@ -2462,6 +2508,9 @@ const os = {
|
|
|
2462
2508
|
step2AltAItem1Sub1: "@https://norwegianredcross.github.io/design-tokens/theme.css",
|
|
2463
2509
|
step2AltAItem1Sub2: "@https://norwegianredcross.github.io/DesignSystem/storybook/metadata.json",
|
|
2464
2510
|
step2AltAItem2: "Lim inn Figma-lenken: Lim inn lenken fra steg 1.",
|
|
2511
|
+
step2AltAItem3: "VIKTIG - Hent AI-guiden: Før du starter, hent AI Design System Guide ved å kjøre denne kommandoen i terminalen:",
|
|
2512
|
+
step2AltAItem3Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
2513
|
+
step2AltAItem3Note: 'Denne guiden inneholder komplett dokumentasjon om alle komponenter, design tokens, og beste praksis. Referer til den i din prompt: "Using AI_DESIGN_SYSTEM_GUIDE.md, implement..."',
|
|
2465
2514
|
step2AltAImageCaption: "",
|
|
2466
2515
|
step2AltBTitle: "Alternativ B: Automatisert med .cursorrules (Anbefalt)",
|
|
2467
2516
|
step2AltBDescription: "Bruk dette for å slippe å legge ved dokumentasjon hver gang. Med en .cursorrules-fil i roten av prosjektet, vet AI-en alltid hvilke regler som gjelder.",
|
|
@@ -2470,12 +2519,13 @@ const os = {
|
|
|
2470
2519
|
step2AltBCodeBlock: `You are an expert Frontend Developer implementing designs from Figma.
|
|
2471
2520
|
|
|
2472
2521
|
ALWAYS follow these rules:
|
|
2473
|
-
1. **
|
|
2474
|
-
2. **
|
|
2475
|
-
3. **
|
|
2476
|
-
4. **
|
|
2522
|
+
1. **AI Guide:** First, fetch the AI Design System Guide: curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md
|
|
2523
|
+
2. **Documentation:** Refer to the indexed design system documentation (@RødeKors) and AI_DESIGN_SYSTEM_GUIDE.md for component usage, patterns, and guidelines.
|
|
2524
|
+
3. **Metadata:** Use component metadata from: https://norwegianredcross.github.io/DesignSystem/storybook/metadata.json
|
|
2525
|
+
4. **Tokens:** Always use CSS variables/tokens defined in: https://norwegianredcross.github.io/design-tokens/theme.css (e.g., var(--spacing-md)).
|
|
2526
|
+
5. **Figma MCP:** When a Figma link is provided, use the \`figma\` tool to inspect node properties.
|
|
2477
2527
|
|
|
2478
|
-
Note: Make sure you have indexed the documentation (Step 0) before using these rules. Reference @RødeKors in chat when you need design system context.`,
|
|
2528
|
+
Note: Make sure you have indexed the documentation (Step 0) and fetched AI_DESIGN_SYSTEM_GUIDE.md before using these rules. Reference @RødeKors and AI_DESIGN_SYSTEM_GUIDE.md in chat when you need design system context.`,
|
|
2479
2529
|
step2AltBUsageTitle: "2. I daglig bruk:",
|
|
2480
2530
|
step2AltBUsageText: "Nå trenger du kun å lime inn Figma-lenken i chatten. AI-en vil automatisk sjekke .cursorrules og forstå at den skal hente designreglene fra dokumentasjonen du definerte.",
|
|
2481
2531
|
step3Title: "Steg 3: Prompt",
|
|
@@ -3121,7 +3171,8 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3121
3171
|
figmaMcp: "From Figma to Code (MCP)",
|
|
3122
3172
|
componentCreation: "Component Creation",
|
|
3123
3173
|
metadataFiles: "Metadata Files",
|
|
3124
|
-
developerGuide: "Developer Guide"
|
|
3174
|
+
developerGuide: "Developer Guide",
|
|
3175
|
+
aiGuide: "AI Guide for Assistants"
|
|
3125
3176
|
},
|
|
3126
3177
|
overview: {
|
|
3127
3178
|
title: "Red Cross Design System",
|
|
@@ -3304,7 +3355,52 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3304
3355
|
step0Item4: "Give it a name that's easy to remember, e.g. RedCross.",
|
|
3305
3356
|
step0Item5: "Click Confirm.",
|
|
3306
3357
|
step0WhatHappensTitle: "What happens now?",
|
|
3307
|
-
step0WhatHappensText:
|
|
3358
|
+
step0WhatHappensText: `Cursor will automatically "crawl" (read) through the main page and all subpages. It stores the information in a local database. This means you can later refer to @RedCross in the chat, and the AI will immediately know all color codes, spacing variables, and component rules without you needing to paste text manually. Note: This applies when you reference @RedCross in chat. If you use .cursorrules, you don't need to attach @RedCross manually.`,
|
|
3359
|
+
step0_5Title: "Step 0.5: Fetch AI Design System Guide",
|
|
3360
|
+
step0_5Description: "Before you start converting Figma designs to code, you must fetch the AI Design System Guide. This guide contains complete documentation about all components, design tokens, and best practices that the AI assistant needs to produce correct code.",
|
|
3361
|
+
step0_5WhyCurlTitle: "Why use curl?",
|
|
3362
|
+
step0_5WhyCurlText: "curl is the recommended method because:",
|
|
3363
|
+
step0_5WhyCurlItem1: "File is downloaded locally - AI assistant always has access without internet",
|
|
3364
|
+
step0_5WhyCurlItem2: "Faster reference - No need to download again with each prompt",
|
|
3365
|
+
step0_5WhyCurlItem3: "Works offline - After download, you can work without internet connection",
|
|
3366
|
+
step0_5WhyCurlItem4: "Consistent context - AI reads the same version of the guide every time",
|
|
3367
|
+
step0_5WhyCurlItem5: "Easier reference - Just use the filename (@AI_DESIGN_SYSTEM_GUIDE.md) instead of long URLs",
|
|
3368
|
+
step0_5ClaudeTitle: "For Claude Code:",
|
|
3369
|
+
step0_5ClaudeIntro: "In Claude Code, you can fetch the guide directly in the terminal or ask Claude to do it:",
|
|
3370
|
+
step0_5ClaudeMethod1Title: "Method 1: Fetch via terminal",
|
|
3371
|
+
step0_5ClaudeMethod1Step1: "Open the terminal in Claude Code",
|
|
3372
|
+
step0_5ClaudeMethod1Step2: "Run this command:",
|
|
3373
|
+
step0_5ClaudeMethod1Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
3374
|
+
step0_5ClaudeMethod1Step3: "Verify the file is downloaded: ls -la AI_DESIGN_SYSTEM_GUIDE.md",
|
|
3375
|
+
step0_5ClaudeMethod2Title: "Method 2: Ask Claude to fetch it",
|
|
3376
|
+
step0_5ClaudeMethod2Text: 'You can also ask Claude Code directly: "Please fetch the AI Design System Guide from https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md"',
|
|
3377
|
+
step0_5ClaudeMethod2Note: "Note: This downloads the file locally, just like the curl command.",
|
|
3378
|
+
step0_5ClaudeUsageTitle: "Using the guide in Claude:",
|
|
3379
|
+
step0_5ClaudeUsageText: "After the guide is downloaded, reference it in your prompts:",
|
|
3380
|
+
step0_5ClaudeUsageExample: '"Using the AI_DESIGN_SYSTEM_GUIDE.md file and this Figma link [paste link], create a React component..."',
|
|
3381
|
+
step0_5CursorTitle: "For Cursor:",
|
|
3382
|
+
step0_5CursorIntro: "In Cursor, you can fetch the guide in several ways:",
|
|
3383
|
+
step0_5CursorMethod1Title: "Method 1: Fetch via terminal",
|
|
3384
|
+
step0_5CursorMethod1Step1: "Open the terminal in Cursor (Ctrl + ` or Cmd + `)",
|
|
3385
|
+
step0_5CursorMethod1Step2: "Run this command:",
|
|
3386
|
+
step0_5CursorMethod1Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
3387
|
+
step0_5CursorMethod2Title: "Method 2: Reference directly in chat (Alternative)",
|
|
3388
|
+
step0_5CursorMethod2Text: "You can also reference the guide directly in Cursor chat without downloading it first:",
|
|
3389
|
+
step0_5CursorMethod2Example: "@AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
3390
|
+
step0_5CursorMethod2Note: "Note: This requires internet connection each time. curl (Method 1) is recommended for better performance and offline access.",
|
|
3391
|
+
step0_5CursorMethod3Title: "Method 3: Via .cursorrules (Recommended for automated workflow)",
|
|
3392
|
+
step0_5CursorMethod3Text: "If you use .cursorrules, add the instruction to fetch the guide there (see Step 2, Alternative B). This ensures the guide is always downloaded automatically.",
|
|
3393
|
+
step0_5CursorUsageTitle: "Using the guide in Cursor:",
|
|
3394
|
+
step0_5CursorUsageText: "After the guide is available, reference it in chat:",
|
|
3395
|
+
step0_5CursorUsageExample1: 'If downloaded locally: "@AI_DESIGN_SYSTEM_GUIDE.md implement a component based on this Figma design [link]"',
|
|
3396
|
+
step0_5CursorUsageExample2: 'If referenced directly: "Using the AI guide from @https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md, create..."',
|
|
3397
|
+
step0_5WhyTitle: "Why do I need this guide?",
|
|
3398
|
+
step0_5WhyText: "The AI Design System Guide contains:",
|
|
3399
|
+
step0_5WhyItem1: "Complete list of all available components with props and examples",
|
|
3400
|
+
step0_5WhyItem2: "All design tokens (colors, spacing, typography, etc.) with correct CSS variables",
|
|
3401
|
+
step0_5WhyItem3: "Component mapping from Figma elements to React components",
|
|
3402
|
+
step0_5WhyItem4: "Best practices for accessibility, TypeScript, and CSS Modules",
|
|
3403
|
+
step0_5WhyItem5: "Troubleshooting guide for common problems",
|
|
3308
3404
|
step1Description: "For best results, you should isolate the section you're working with.",
|
|
3309
3405
|
step1Item1: "Select the frame (Frame), component, or group you want to implement.",
|
|
3310
3406
|
step1Item2: "Right-click and select Copy link to selection (Shortcut: Ctrl + L).",
|
|
@@ -3318,6 +3414,9 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3318
3414
|
step2AltAItem1Sub1: "@https://norwegianredcross.github.io/design-tokens/theme.css",
|
|
3319
3415
|
step2AltAItem1Sub2: "@https://norwegianredcross.github.io/DesignSystem/storybook/metadata.json",
|
|
3320
3416
|
step2AltAItem2: "Paste Figma link: Paste the link from step 1.",
|
|
3417
|
+
step2AltAItem3: "IMPORTANT - Fetch AI Guide: Before starting, fetch the AI Design System Guide by running this command in your terminal:",
|
|
3418
|
+
step2AltAItem3Command: "curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md",
|
|
3419
|
+
step2AltAItem3Note: 'This guide contains complete documentation about all components, design tokens, and best practices. Reference it in your prompt: "Using AI_DESIGN_SYSTEM_GUIDE.md, implement..."',
|
|
3321
3420
|
step2AltAImageCaption: "",
|
|
3322
3421
|
step2AltBTitle: "Alternative B: Automated with .cursorrules (Recommended)",
|
|
3323
3422
|
step2AltBDescription: "Use this to avoid attaching documentation every time. With a .cursorrules file in the project root, the AI always knows which rules apply.",
|
|
@@ -3326,12 +3425,13 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3326
3425
|
step2AltBCodeBlock: `You are an expert Frontend Developer implementing designs from Figma.
|
|
3327
3426
|
|
|
3328
3427
|
ALWAYS follow these rules:
|
|
3329
|
-
1. **
|
|
3330
|
-
2. **
|
|
3331
|
-
3. **
|
|
3332
|
-
4. **
|
|
3428
|
+
1. **AI Guide:** First, fetch the AI Design System Guide: curl -o AI_DESIGN_SYSTEM_GUIDE.md https://norwegianredcross.github.io/DesignSystem/storybook/AI_DESIGN_SYSTEM_GUIDE.md
|
|
3429
|
+
2. **Documentation:** Refer to the indexed design system documentation (@RedCross) and AI_DESIGN_SYSTEM_GUIDE.md for component usage, patterns, and guidelines.
|
|
3430
|
+
3. **Metadata:** Use component metadata from: https://norwegianredcross.github.io/DesignSystem/storybook/metadata.json
|
|
3431
|
+
4. **Tokens:** Always use CSS variables/tokens defined in: https://norwegianredcross.github.io/design-tokens/theme.css (e.g., var(--spacing-md)).
|
|
3432
|
+
5. **Figma MCP:** When a Figma link is provided, use the \`figma\` tool to inspect node properties.
|
|
3333
3433
|
|
|
3334
|
-
Note: Make sure you have indexed the documentation (Step 0) before using these rules. Reference @RedCross in chat when you need design system context.`,
|
|
3434
|
+
Note: Make sure you have indexed the documentation (Step 0) and fetched AI_DESIGN_SYSTEM_GUIDE.md before using these rules. Reference @RedCross and AI_DESIGN_SYSTEM_GUIDE.md in chat when you need design system context.`,
|
|
3335
3435
|
step2AltBUsageTitle: "2. In daily use:",
|
|
3336
3436
|
step2AltBUsageText: "Now you only need to paste the Figma link in the chat. The AI will automatically check .cursorrules and understand that it should fetch design rules from the documentation you defined.",
|
|
3337
3437
|
step3Title: "Step 3: Prompt",
|
|
@@ -3874,7 +3974,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3874
3974
|
}
|
|
3875
3975
|
}
|
|
3876
3976
|
}
|
|
3877
|
-
},
|
|
3977
|
+
}, Lt = Ut(void 0), Hi = ({ children: t }) => {
|
|
3878
3978
|
const [e, n] = ne("NO"), r = (i) => {
|
|
3879
3979
|
const s = i.split(".");
|
|
3880
3980
|
let o = os[e];
|
|
@@ -3885,13 +3985,13 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3885
3985
|
}
|
|
3886
3986
|
return o;
|
|
3887
3987
|
};
|
|
3888
|
-
return /* @__PURE__ */ d(
|
|
3988
|
+
return /* @__PURE__ */ d(Lt.Provider, { value: { language: e, setLanguage: n, t: r }, children: t });
|
|
3889
3989
|
}, rs = () => {
|
|
3890
|
-
const t =
|
|
3990
|
+
const t = Ot(Lt);
|
|
3891
3991
|
if (t === void 0)
|
|
3892
3992
|
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
3893
3993
|
return t;
|
|
3894
|
-
}, ss = "_header_3zql2_1", is = "_languageSwitch_3zql2_36", as = "_searchOverlay_3zql2_40", ls = "_headerExtension_3zql2_45", ds = "_extensionContentWrapper_3zql2_61", cs = "_extensionContent_3zql2_61", us = "_extensionDivider_3zql2_84", ms = "_languageLabel_3zql2_98",
|
|
3994
|
+
}, ss = "_header_3zql2_1", is = "_languageSwitch_3zql2_36", as = "_searchOverlay_3zql2_40", ls = "_headerExtension_3zql2_45", ds = "_extensionContentWrapper_3zql2_61", cs = "_extensionContent_3zql2_61", us = "_extensionDivider_3zql2_84", ms = "_languageLabel_3zql2_98", ps = "_languageLink_3zql2_104", gs = "_headerInner_3zql2_129", fs = "_logoWrapper_3zql2_146", hs = "_logo_3zql2_146", ks = "_secondaryLogoWrapper_3zql2_169", vs = "_slotComponent_3zql2_178", ys = "_slotContainer_3zql2_188", bs = "_slotText_3zql2_196", Ts = "_secondaryLogo_3zql2_169", Ss = "_redCrossLogo_3zql2_223", xs = "_primaryLogo_3zql2_229", ws = "_navItems_3zql2_233", Cs = "_navLink_3zql2_242", Is = "_actions_3zql2_255", Ds = "_ctaButton_3zql2_263", As = "_themeToggle_3zql2_268", _s = "_userInfo_3zql2_273", js = "_userName_3zql2_279", Ls = "_loginLink_3zql2_286", Es = "_loginText_3zql2_295", Fs = "_underline_3zql2_302", Ms = "_searchButtonWrapper_3zql2_308", Bs = "_buttonText_3zql2_312", Ns = "_menuButton_3zql2_317", Ps = "_menuOverlay_3zql2_322", zs = "_searchContent_3zql2_356", Rs = "_menuContent_3zql2_366", Gs = "_menuLeftColumn_3zql2_375", Ws = "_menuRightColumn_3zql2_381", Hs = "_slotContent_3zql2_395", $s = "_navList_3zql2_408", Us = "_menuUtilities_3zql2_415", Os = "_menuBrand_3zql2_422", Vs = "_suggestionsSection_3zql2_426", Ks = "_suggestionsTitle_3zql2_432", qs = "_searchResults_3zql2_441", Ys = "_resultList_3zql2_447", Js = "_resultItem_3zql2_453", Zs = "_resultLink_3zql2_461", Qs = "_suggestionIcon_3zql2_475", Xs = "_suggestionText_3zql2_488", ei = "_highlightedText_3zql2_495", ti = "_remainingText_3zql2_500", ni = "_viewAllLink_3zql2_513", oi = "_noResults_3zql2_548", b = {
|
|
3895
3995
|
header: ss,
|
|
3896
3996
|
languageSwitch: is,
|
|
3897
3997
|
searchOverlay: as,
|
|
@@ -3900,45 +4000,45 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
3900
4000
|
extensionContent: cs,
|
|
3901
4001
|
extensionDivider: us,
|
|
3902
4002
|
languageLabel: ms,
|
|
3903
|
-
languageLink:
|
|
3904
|
-
headerInner:
|
|
4003
|
+
languageLink: ps,
|
|
4004
|
+
headerInner: gs,
|
|
3905
4005
|
logoWrapper: fs,
|
|
3906
4006
|
logo: hs,
|
|
3907
4007
|
secondaryLogoWrapper: ks,
|
|
3908
4008
|
slotComponent: vs,
|
|
3909
|
-
slotContainer:
|
|
3910
|
-
slotText:
|
|
4009
|
+
slotContainer: ys,
|
|
4010
|
+
slotText: bs,
|
|
3911
4011
|
secondaryLogo: Ts,
|
|
3912
|
-
redCrossLogo:
|
|
3913
|
-
primaryLogo:
|
|
4012
|
+
redCrossLogo: Ss,
|
|
4013
|
+
primaryLogo: xs,
|
|
3914
4014
|
navItems: ws,
|
|
3915
4015
|
navLink: Cs,
|
|
3916
|
-
actions:
|
|
3917
|
-
ctaButton:
|
|
4016
|
+
actions: Is,
|
|
4017
|
+
ctaButton: Ds,
|
|
3918
4018
|
themeToggle: As,
|
|
3919
|
-
userInfo:
|
|
3920
|
-
userName:
|
|
3921
|
-
loginLink:
|
|
3922
|
-
loginText:
|
|
3923
|
-
underline:
|
|
3924
|
-
searchButtonWrapper:
|
|
3925
|
-
buttonText:
|
|
3926
|
-
menuButton:
|
|
3927
|
-
menuOverlay:
|
|
4019
|
+
userInfo: _s,
|
|
4020
|
+
userName: js,
|
|
4021
|
+
loginLink: Ls,
|
|
4022
|
+
loginText: Es,
|
|
4023
|
+
underline: Fs,
|
|
4024
|
+
searchButtonWrapper: Ms,
|
|
4025
|
+
buttonText: Bs,
|
|
4026
|
+
menuButton: Ns,
|
|
4027
|
+
menuOverlay: Ps,
|
|
3928
4028
|
searchContent: zs,
|
|
3929
4029
|
menuContent: Rs,
|
|
3930
|
-
menuLeftColumn:
|
|
3931
|
-
menuRightColumn:
|
|
3932
|
-
slotContent:
|
|
3933
|
-
navList:
|
|
3934
|
-
menuUtilities:
|
|
3935
|
-
menuBrand:
|
|
3936
|
-
suggestionsSection:
|
|
3937
|
-
suggestionsTitle:
|
|
3938
|
-
searchResults:
|
|
4030
|
+
menuLeftColumn: Gs,
|
|
4031
|
+
menuRightColumn: Ws,
|
|
4032
|
+
slotContent: Hs,
|
|
4033
|
+
navList: $s,
|
|
4034
|
+
menuUtilities: Us,
|
|
4035
|
+
menuBrand: Os,
|
|
4036
|
+
suggestionsSection: Vs,
|
|
4037
|
+
suggestionsTitle: Ks,
|
|
4038
|
+
searchResults: qs,
|
|
3939
4039
|
resultList: Ys,
|
|
3940
|
-
resultItem:
|
|
3941
|
-
resultLink:
|
|
4040
|
+
resultItem: Js,
|
|
4041
|
+
resultLink: Zs,
|
|
3942
4042
|
suggestionIcon: Qs,
|
|
3943
4043
|
suggestionText: Xs,
|
|
3944
4044
|
highlightedText: ei,
|
|
@@ -4008,7 +4108,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4008
4108
|
{ id: "komponent-kreasjon", title: "Komponent Kreasjon", category: "Code", path: "code/komponent-kreasjon", description: "Opprette nye komponenter" },
|
|
4009
4109
|
{ id: "progression", title: "Progresjon", category: "Code", path: "code/progression", description: "Fra design til ferdig komponent" },
|
|
4010
4110
|
{ id: "metadata-files", title: "Metadata filer", category: "Code", path: "code/metadata-files", description: "Struktur og bruk av metadata.json" }
|
|
4011
|
-
],
|
|
4111
|
+
], $i = ({
|
|
4012
4112
|
activePage: t,
|
|
4013
4113
|
setPage: e,
|
|
4014
4114
|
children: n,
|
|
@@ -4017,28 +4117,28 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4017
4117
|
showLogin: s = !0,
|
|
4018
4118
|
showCta: o = !1,
|
|
4019
4119
|
ctaLabel: l,
|
|
4020
|
-
ctaIcon: a = /* @__PURE__ */ d(
|
|
4120
|
+
ctaIcon: a = /* @__PURE__ */ d(Zn, { "aria-hidden": !0 }),
|
|
4021
4121
|
onCtaClick: c,
|
|
4022
|
-
showThemeToggle:
|
|
4023
|
-
secondaryLogo:
|
|
4122
|
+
showThemeToggle: y = !1,
|
|
4123
|
+
secondaryLogo: g = !1,
|
|
4024
4124
|
secondaryLogoSrc: k,
|
|
4025
|
-
secondaryLogoSrcDark:
|
|
4125
|
+
secondaryLogoSrcDark: p,
|
|
4026
4126
|
secondaryLogoAlt: f = "Secondary Logo",
|
|
4027
4127
|
navItems: h,
|
|
4028
4128
|
showNavItems: v = !0,
|
|
4029
4129
|
showMenuButton: m = !0,
|
|
4030
4130
|
showHeaderExtension: u = !1,
|
|
4031
4131
|
showModeToggle: T = !1,
|
|
4032
|
-
showLanguageSwitch:
|
|
4132
|
+
showLanguageSwitch: _ = !1
|
|
4033
4133
|
}) => {
|
|
4034
|
-
const [A,
|
|
4035
|
-
|
|
4036
|
-
const
|
|
4037
|
-
if (typeof document > "u" || document.getElementById(
|
|
4038
|
-
const C = si(
|
|
4039
|
-
|
|
4134
|
+
const [A, j] = ne(!1), [w, D] = ne(!1), [L, z] = ne(""), [M, R] = ne("light"), { language: P, setLanguage: B, t: I } = rs(), [U, oe] = ne(!1);
|
|
4135
|
+
q(() => {
|
|
4136
|
+
const S = "rk-header-inline-styles";
|
|
4137
|
+
if (typeof document > "u" || document.getElementById(S)) return;
|
|
4138
|
+
const C = si(b), F = document.createElement("style");
|
|
4139
|
+
F.id = S, F.textContent = C, document.head.appendChild(F);
|
|
4040
4140
|
}, []);
|
|
4041
|
-
const
|
|
4141
|
+
const J = () => /* @__PURE__ */ E(
|
|
4042
4142
|
"svg",
|
|
4043
4143
|
{
|
|
4044
4144
|
width: "170",
|
|
@@ -4048,7 +4148,7 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4048
4148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4049
4149
|
"aria-hidden": !0,
|
|
4050
4150
|
focusable: "false",
|
|
4051
|
-
className:
|
|
4151
|
+
className: b.redCrossLogo,
|
|
4052
4152
|
children: [
|
|
4053
4153
|
/* @__PURE__ */ d("path", { d: "M76.1036 48.1397C77.8925 47.8781 79.6984 47.7525 81.5061 47.7639C84.1713 47.7639 86.0396 48.1669 87.3182 49.1857C87.8735 49.639 88.3149 50.2176 88.6067 50.8744C88.8984 51.5312 89.0323 52.2479 88.9974 52.9665C88.9839 53.9451 88.6724 54.896 88.1049 55.691C87.5373 56.4861 86.7411 57.087 85.8235 57.4129V57.4944C87.0796 58.006 87.7684 59.2104 88.2231 60.8722C88.7813 62.9097 89.3441 65.2688 89.6907 65.9661H85.5309C85.2382 65.4544 84.7835 63.9829 84.2793 61.7597C83.7751 59.5365 83.0097 58.8527 81.344 58.8527H80.1284V65.9661H76.1036V48.1397ZM80.1284 55.9141H81.7312C83.7526 55.9141 84.9546 54.8954 84.9546 53.3151C84.9546 51.6534 83.8336 50.8202 81.9698 50.7931C81.3532 50.7814 80.7368 50.8268 80.1284 50.9289V55.9141Z", fill: "#1E1E1E" }),
|
|
4054
4154
|
/* @__PURE__ */ d("path", { d: "M97.8528 52.5633C98.9439 52.5351 100.026 52.7744 101.004 53.2606L102.256 51.4087L103.669 52.4003L102.467 54.2115C103.188 54.8589 103.758 55.6585 104.137 56.5531C104.515 57.4478 104.692 58.4154 104.655 59.3869C104.655 64.0506 101.243 66.2738 97.8573 66.2738C96.7852 66.2984 95.7234 66.059 94.7644 65.5765L93.4543 67.4556L92.1037 66.387L93.2787 64.6438C91.8651 63.4892 91.0277 61.7233 91.0277 59.414C91.0277 55.2891 93.7965 52.5543 97.8213 52.5543L97.8528 52.5633ZM99.2934 55.9411C98.8798 55.6237 98.3731 55.4533 97.8528 55.4566C95.7458 55.4566 94.949 57.5757 94.949 59.4005C94.9265 60.126 95.0909 60.845 95.4262 61.4878L95.4802 61.515L99.2934 55.9411ZM96.4932 62.8552C96.8653 63.1843 97.3486 63.3576 97.8438 63.3397C99.6446 63.3397 100.748 61.7821 100.748 59.4774C100.76 58.7777 100.625 58.0833 100.351 57.4399L100.27 57.4127L96.4932 62.8552Z", fill: "#1E1E1E" }),
|
|
@@ -4063,195 +4163,195 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4063
4163
|
]
|
|
4064
4164
|
}
|
|
4065
4165
|
);
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
}, [t]),
|
|
4069
|
-
if (!(typeof document > "u") && A &&
|
|
4070
|
-
const
|
|
4166
|
+
q(() => {
|
|
4167
|
+
j(!1), D(!1), z("");
|
|
4168
|
+
}, [t]), q(() => {
|
|
4169
|
+
if (!(typeof document > "u") && A && U) {
|
|
4170
|
+
const S = document.body.style.overflow;
|
|
4071
4171
|
return document.body.style.overflow = "hidden", () => {
|
|
4072
|
-
document.body.style.overflow =
|
|
4172
|
+
document.body.style.overflow = S;
|
|
4073
4173
|
};
|
|
4074
4174
|
}
|
|
4075
|
-
}, [A,
|
|
4175
|
+
}, [A, U]), q(() => {
|
|
4076
4176
|
if (typeof window > "u" || typeof window.matchMedia > "u") return;
|
|
4077
|
-
const
|
|
4078
|
-
return C(
|
|
4079
|
-
|
|
4177
|
+
const S = window.matchMedia("(max-width: 850px)"), C = (F) => oe("matches" in F ? F.matches : S.matches);
|
|
4178
|
+
return C(S), S.addEventListener ? S.addEventListener("change", C) : S.addListener(C), () => {
|
|
4179
|
+
S.removeEventListener ? S.removeEventListener("change", C) : S.removeListener(C);
|
|
4080
4180
|
};
|
|
4081
|
-
}, []),
|
|
4181
|
+
}, []), q(() => {
|
|
4082
4182
|
if (typeof document > "u") return;
|
|
4083
|
-
const
|
|
4084
|
-
if (!
|
|
4183
|
+
const S = document.querySelector(`.${b.header}`);
|
|
4184
|
+
if (!S) return;
|
|
4085
4185
|
const C = () => {
|
|
4086
|
-
const
|
|
4087
|
-
document.documentElement.style.setProperty("--header-height-mobile", `${
|
|
4186
|
+
const H = S.offsetHeight;
|
|
4187
|
+
document.documentElement.style.setProperty("--header-height-mobile", `${H}px`);
|
|
4088
4188
|
};
|
|
4089
4189
|
C(), window.addEventListener("resize", C);
|
|
4090
|
-
const
|
|
4190
|
+
const F = new ResizeObserver(() => {
|
|
4091
4191
|
C();
|
|
4092
4192
|
});
|
|
4093
|
-
return
|
|
4094
|
-
window.removeEventListener("resize", C),
|
|
4193
|
+
return F.observe(S), () => {
|
|
4194
|
+
window.removeEventListener("resize", C), F.disconnect();
|
|
4095
4195
|
};
|
|
4096
|
-
}, [
|
|
4196
|
+
}, [U]), q(() => {
|
|
4097
4197
|
if (typeof document > "u") return;
|
|
4098
|
-
const
|
|
4099
|
-
if (!
|
|
4198
|
+
const S = document.querySelector(`.${b.logoWrapper}`);
|
|
4199
|
+
if (!S) return;
|
|
4100
4200
|
const C = () => {
|
|
4101
|
-
const
|
|
4102
|
-
document.documentElement.style.setProperty("--rk-logo-width", `${
|
|
4201
|
+
const F = S.offsetWidth;
|
|
4202
|
+
document.documentElement.style.setProperty("--rk-logo-width", `${F}px`);
|
|
4103
4203
|
};
|
|
4104
4204
|
return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
|
|
4105
|
-
}, [
|
|
4205
|
+
}, [U]), q(() => {
|
|
4106
4206
|
if (typeof document > "u" || !w) {
|
|
4107
4207
|
document.documentElement.style.setProperty("--rk-search-overlay-height", "0px");
|
|
4108
4208
|
return;
|
|
4109
4209
|
}
|
|
4110
|
-
const
|
|
4111
|
-
if (!
|
|
4210
|
+
const S = document.querySelector(`.${b.searchOverlay}`);
|
|
4211
|
+
if (!S) return;
|
|
4112
4212
|
const C = () => {
|
|
4113
|
-
const
|
|
4114
|
-
document.documentElement.style.setProperty("--rk-search-overlay-height", `${
|
|
4213
|
+
const H = S.offsetHeight;
|
|
4214
|
+
document.documentElement.style.setProperty("--rk-search-overlay-height", `${H}px`);
|
|
4115
4215
|
};
|
|
4116
4216
|
requestAnimationFrame(C), window.addEventListener("resize", C);
|
|
4117
|
-
const
|
|
4118
|
-
return
|
|
4119
|
-
window.removeEventListener("resize", C),
|
|
4217
|
+
const F = new ResizeObserver(C);
|
|
4218
|
+
return F.observe(S), () => {
|
|
4219
|
+
window.removeEventListener("resize", C), F.disconnect();
|
|
4120
4220
|
};
|
|
4121
4221
|
}, [w]);
|
|
4122
4222
|
const Y = () => {
|
|
4123
|
-
const
|
|
4124
|
-
R(
|
|
4125
|
-
}, de = (
|
|
4126
|
-
e && (
|
|
4127
|
-
},
|
|
4128
|
-
|
|
4129
|
-
const
|
|
4130
|
-
if (
|
|
4131
|
-
const C =
|
|
4223
|
+
const S = M === "light" ? "dark" : "light";
|
|
4224
|
+
R(S), document.documentElement.setAttribute("data-color-scheme", S);
|
|
4225
|
+
}, de = (S) => {
|
|
4226
|
+
e && (S.preventDefault(), e("home")), j(!1), D(!1);
|
|
4227
|
+
}, Z = () => {
|
|
4228
|
+
j(!A), w && D(!1), !A && typeof document < "u" && requestAnimationFrame(() => {
|
|
4229
|
+
const S = document.querySelector(`.${b.header}`);
|
|
4230
|
+
if (S) {
|
|
4231
|
+
const C = S.offsetHeight;
|
|
4132
4232
|
document.documentElement.style.setProperty("--header-height-mobile", `${C}px`);
|
|
4133
4233
|
}
|
|
4134
4234
|
});
|
|
4135
4235
|
}, ie = () => {
|
|
4136
|
-
|
|
4137
|
-
}, Q =
|
|
4138
|
-
if (!
|
|
4139
|
-
const
|
|
4236
|
+
D(!w), A && j(!1);
|
|
4237
|
+
}, Q = be(() => {
|
|
4238
|
+
if (!L.trim()) return [];
|
|
4239
|
+
const S = L.toLowerCase();
|
|
4140
4240
|
return ri.filter(
|
|
4141
|
-
(C) => C.title.toLowerCase().startsWith(
|
|
4241
|
+
(C) => C.title.toLowerCase().startsWith(S)
|
|
4142
4242
|
);
|
|
4143
|
-
}, [
|
|
4144
|
-
e && e(
|
|
4243
|
+
}, [L]), X = (S) => {
|
|
4244
|
+
e && e(S), D(!1), z("");
|
|
4145
4245
|
};
|
|
4146
|
-
return /* @__PURE__ */
|
|
4147
|
-
u && /* @__PURE__ */ d("div", { className:
|
|
4148
|
-
T && /* @__PURE__ */ d("div", { className:
|
|
4149
|
-
|
|
4246
|
+
return /* @__PURE__ */ E("header", { className: b.header, "data-open": A ? "true" : "false", children: [
|
|
4247
|
+
u && /* @__PURE__ */ d("div", { className: b.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */ E("div", { className: b.extensionContentWrapper, children: [
|
|
4248
|
+
T && /* @__PURE__ */ d("div", { className: b.extensionContent, children: /* @__PURE__ */ d(
|
|
4249
|
+
Ue,
|
|
4150
4250
|
{
|
|
4151
4251
|
"data-size": "sm",
|
|
4152
|
-
checked:
|
|
4252
|
+
checked: M === "dark",
|
|
4153
4253
|
onChange: Y,
|
|
4154
|
-
label:
|
|
4254
|
+
label: I("header.darkMode"),
|
|
4155
4255
|
color: "neutral",
|
|
4156
4256
|
"data-color-scheme": "light"
|
|
4157
4257
|
}
|
|
4158
4258
|
) }),
|
|
4159
|
-
T &&
|
|
4160
|
-
|
|
4161
|
-
/* @__PURE__ */ d("span", { className:
|
|
4162
|
-
/* @__PURE__ */
|
|
4163
|
-
/* @__PURE__ */
|
|
4164
|
-
|
|
4259
|
+
T && _ && /* @__PURE__ */ d("div", { className: b.extensionDivider }),
|
|
4260
|
+
_ && /* @__PURE__ */ E("div", { className: b.languageSwitch, children: [
|
|
4261
|
+
/* @__PURE__ */ d("span", { className: b.languageLabel, children: I("header.language") }),
|
|
4262
|
+
/* @__PURE__ */ E(K.TriggerContext, { children: [
|
|
4263
|
+
/* @__PURE__ */ E(
|
|
4264
|
+
K.Trigger,
|
|
4165
4265
|
{
|
|
4166
|
-
className:
|
|
4167
|
-
"aria-label":
|
|
4266
|
+
className: b.languageLink,
|
|
4267
|
+
"aria-label": I("header.selectLanguage"),
|
|
4168
4268
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4169
4269
|
children: [
|
|
4170
|
-
|
|
4270
|
+
P,
|
|
4171
4271
|
" ",
|
|
4172
4272
|
/* @__PURE__ */ d(ut, { "aria-hidden": !0 })
|
|
4173
4273
|
]
|
|
4174
4274
|
}
|
|
4175
4275
|
),
|
|
4176
4276
|
/* @__PURE__ */ d(
|
|
4177
|
-
|
|
4277
|
+
K,
|
|
4178
4278
|
{
|
|
4179
|
-
"data-color-scheme":
|
|
4279
|
+
"data-color-scheme": M,
|
|
4180
4280
|
placement: "bottom-end",
|
|
4181
|
-
children: /* @__PURE__ */
|
|
4182
|
-
/* @__PURE__ */ d(
|
|
4183
|
-
/* @__PURE__ */ d(
|
|
4281
|
+
children: /* @__PURE__ */ E(K.List, { children: [
|
|
4282
|
+
/* @__PURE__ */ d(K.Item, { children: /* @__PURE__ */ d(K.Button, { onClick: () => B("NO"), children: "Norsk (NO)" }) }),
|
|
4283
|
+
/* @__PURE__ */ d(K.Item, { children: /* @__PURE__ */ d(K.Button, { onClick: () => B("EN"), children: "English (EN)" }) })
|
|
4184
4284
|
] })
|
|
4185
4285
|
}
|
|
4186
4286
|
)
|
|
4187
4287
|
] })
|
|
4188
4288
|
] })
|
|
4189
4289
|
] }) }),
|
|
4190
|
-
/* @__PURE__ */
|
|
4191
|
-
/* @__PURE__ */
|
|
4290
|
+
/* @__PURE__ */ E("div", { className: b.headerInner, children: [
|
|
4291
|
+
/* @__PURE__ */ E("div", { className: b.logoWrapper, children: [
|
|
4192
4292
|
/* @__PURE__ */ d(
|
|
4193
|
-
|
|
4293
|
+
Fe,
|
|
4194
4294
|
{
|
|
4195
4295
|
href: "/",
|
|
4196
|
-
className: `${
|
|
4197
|
-
"aria-label":
|
|
4296
|
+
className: `${b.logo} ${b.primaryLogo}`,
|
|
4297
|
+
"aria-label": I("header.homeAriaLabel"),
|
|
4198
4298
|
onClick: de,
|
|
4199
|
-
children: /* @__PURE__ */ d(
|
|
4299
|
+
children: /* @__PURE__ */ d(J, {})
|
|
4200
4300
|
}
|
|
4201
4301
|
),
|
|
4202
|
-
/* @__PURE__ */ d("div", { className:
|
|
4302
|
+
/* @__PURE__ */ d("div", { className: b.secondaryLogoWrapper, children: g && k ? /* @__PURE__ */ d(
|
|
4203
4303
|
"img",
|
|
4204
4304
|
{
|
|
4205
|
-
src:
|
|
4305
|
+
src: M === "dark" && p ? p : k,
|
|
4206
4306
|
alt: f,
|
|
4207
|
-
className:
|
|
4307
|
+
className: b.secondaryLogo
|
|
4208
4308
|
}
|
|
4209
|
-
) :
|
|
4309
|
+
) : g ? /* @__PURE__ */ d("div", { className: b.slotComponent, children: /* @__PURE__ */ d("div", { className: b.slotContainer, children: /* @__PURE__ */ d("p", { className: b.slotText, children: "SLOT" }) }) }) : null })
|
|
4210
4310
|
] }),
|
|
4211
|
-
v && h && h.length > 0 && !
|
|
4212
|
-
|
|
4311
|
+
v && h && h.length > 0 && !U && /* @__PURE__ */ d("nav", { className: b.navItems, children: h.map((S, C) => /* @__PURE__ */ d(
|
|
4312
|
+
Fe,
|
|
4213
4313
|
{
|
|
4214
|
-
href:
|
|
4215
|
-
className:
|
|
4216
|
-
onClick: (
|
|
4217
|
-
e && (
|
|
4314
|
+
href: S.href,
|
|
4315
|
+
className: b.navLink,
|
|
4316
|
+
onClick: (F) => {
|
|
4317
|
+
e && (F.preventDefault(), e(S.href));
|
|
4218
4318
|
},
|
|
4219
|
-
children:
|
|
4319
|
+
children: S.label
|
|
4220
4320
|
},
|
|
4221
4321
|
C
|
|
4222
4322
|
)) }),
|
|
4223
|
-
/* @__PURE__ */
|
|
4224
|
-
o && /* @__PURE__ */
|
|
4323
|
+
/* @__PURE__ */ E("div", { className: b.actions, children: [
|
|
4324
|
+
o && /* @__PURE__ */ E(
|
|
4225
4325
|
Te,
|
|
4226
4326
|
{
|
|
4227
4327
|
variant: "primary",
|
|
4228
4328
|
"data-color": "main",
|
|
4229
4329
|
"data-size": "md",
|
|
4230
|
-
className:
|
|
4330
|
+
className: b.ctaButton,
|
|
4231
4331
|
onClick: c,
|
|
4232
4332
|
children: [
|
|
4233
4333
|
a,
|
|
4234
|
-
/* @__PURE__ */ d("span", { className:
|
|
4334
|
+
/* @__PURE__ */ d("span", { className: b.buttonText, children: l || I("header.supportUs") })
|
|
4235
4335
|
]
|
|
4236
4336
|
}
|
|
4237
4337
|
),
|
|
4238
|
-
!u &&
|
|
4239
|
-
|
|
4338
|
+
!u && y && /* @__PURE__ */ d("div", { className: b.themeToggle, children: /* @__PURE__ */ d(
|
|
4339
|
+
Ue,
|
|
4240
4340
|
{
|
|
4241
|
-
checked:
|
|
4341
|
+
checked: M === "dark",
|
|
4242
4342
|
onChange: Y,
|
|
4243
|
-
"aria-label":
|
|
4343
|
+
"aria-label": I("header.toggleTheme")
|
|
4244
4344
|
}
|
|
4245
4345
|
) }),
|
|
4246
|
-
r && /* @__PURE__ */
|
|
4247
|
-
/* @__PURE__ */ d(Ye, { "data-size": "md", className:
|
|
4346
|
+
r && /* @__PURE__ */ E("div", { className: b.userInfo, children: [
|
|
4347
|
+
/* @__PURE__ */ d(Ye, { "data-size": "md", className: b.userName, children: "Frodo Baggins" }),
|
|
4248
4348
|
/* @__PURE__ */ d(Ct, { "aria-label": "Frodo Baggins", "data-color": "main", variant: "circle", initials: "FB" })
|
|
4249
4349
|
] }),
|
|
4250
|
-
s && /* @__PURE__ */
|
|
4251
|
-
/* @__PURE__ */ d("span", { className:
|
|
4252
|
-
/* @__PURE__ */ d("div", { className:
|
|
4350
|
+
s && /* @__PURE__ */ E("a", { href: "#", className: b.loginLink, children: [
|
|
4351
|
+
/* @__PURE__ */ d("span", { className: b.loginText, children: I("header.login") }),
|
|
4352
|
+
/* @__PURE__ */ d("div", { className: b.underline })
|
|
4253
4353
|
] }),
|
|
4254
|
-
i && /* @__PURE__ */ d("div", { className:
|
|
4354
|
+
i && /* @__PURE__ */ d("div", { className: b.searchButtonWrapper, children: /* @__PURE__ */ E(
|
|
4255
4355
|
Te,
|
|
4256
4356
|
{
|
|
4257
4357
|
variant: "secondary",
|
|
@@ -4259,151 +4359,151 @@ Map design elements to our existing components where possible (e.g. Buttons, Hea
|
|
|
4259
4359
|
"data-size": "md",
|
|
4260
4360
|
onClick: ie,
|
|
4261
4361
|
"aria-expanded": w,
|
|
4262
|
-
"aria-label":
|
|
4362
|
+
"aria-label": I(w ? "header.closeSearch" : "header.openSearch"),
|
|
4263
4363
|
children: [
|
|
4264
|
-
w ? /* @__PURE__ */ d(mt, { "aria-hidden": !0 }) : /* @__PURE__ */ d(
|
|
4265
|
-
/* @__PURE__ */ d("span", { className:
|
|
4364
|
+
w ? /* @__PURE__ */ d(mt, { "aria-hidden": !0 }) : /* @__PURE__ */ d(pt, { "aria-hidden": !0 }),
|
|
4365
|
+
/* @__PURE__ */ d("span", { className: b.buttonText, children: I(w ? "header.close" : "header.search") })
|
|
4266
4366
|
]
|
|
4267
4367
|
}
|
|
4268
4368
|
) }),
|
|
4269
|
-
(m ||
|
|
4369
|
+
(m || U) && /* @__PURE__ */ E(
|
|
4270
4370
|
Te,
|
|
4271
4371
|
{
|
|
4272
4372
|
variant: "primary",
|
|
4273
4373
|
"data-color": "main",
|
|
4274
4374
|
"data-size": "md",
|
|
4275
|
-
onClick:
|
|
4375
|
+
onClick: Z,
|
|
4276
4376
|
"aria-expanded": A,
|
|
4277
|
-
"aria-label":
|
|
4278
|
-
className:
|
|
4377
|
+
"aria-label": I(A ? "header.closeMenu" : "header.openMenu"),
|
|
4378
|
+
className: b.menuButton,
|
|
4279
4379
|
children: [
|
|
4280
|
-
A ? /* @__PURE__ */ d(mt, { "aria-hidden": !0 }) : /* @__PURE__ */ d(
|
|
4281
|
-
/* @__PURE__ */ d("span", { className:
|
|
4380
|
+
A ? /* @__PURE__ */ d(mt, { "aria-hidden": !0 }) : /* @__PURE__ */ d(Jn, { "aria-hidden": !0 }),
|
|
4381
|
+
/* @__PURE__ */ d("span", { className: b.buttonText, children: I(A ? "header.close" : "header.menu") })
|
|
4282
4382
|
]
|
|
4283
4383
|
}
|
|
4284
4384
|
)
|
|
4285
4385
|
] })
|
|
4286
4386
|
] }),
|
|
4287
|
-
A && /* @__PURE__ */ d("div", { className:
|
|
4288
|
-
/* @__PURE__ */ d("div", { className:
|
|
4289
|
-
/* @__PURE__ */
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
/* @__PURE__ */ d("span", { className:
|
|
4293
|
-
/* @__PURE__ */
|
|
4294
|
-
/* @__PURE__ */
|
|
4295
|
-
|
|
4387
|
+
A && /* @__PURE__ */ d("div", { className: b.menuOverlay, children: /* @__PURE__ */ E("div", { className: b.menuContent, children: [
|
|
4388
|
+
/* @__PURE__ */ d("div", { className: b.menuLeftColumn }),
|
|
4389
|
+
/* @__PURE__ */ E("div", { className: b.menuRightColumn, children: [
|
|
4390
|
+
U && (_ || T) && /* @__PURE__ */ E("div", { className: b.menuUtilities, children: [
|
|
4391
|
+
_ && /* @__PURE__ */ E("div", { className: b.languageSwitch, children: [
|
|
4392
|
+
/* @__PURE__ */ d("span", { className: b.languageLabel, children: I("header.language") }),
|
|
4393
|
+
/* @__PURE__ */ E(K.TriggerContext, { children: [
|
|
4394
|
+
/* @__PURE__ */ E(
|
|
4395
|
+
K.Trigger,
|
|
4296
4396
|
{
|
|
4297
|
-
className:
|
|
4298
|
-
"aria-label":
|
|
4397
|
+
className: b.languageLink,
|
|
4398
|
+
"aria-label": I("header.selectLanguage"),
|
|
4299
4399
|
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
4300
4400
|
children: [
|
|
4301
|
-
|
|
4401
|
+
P,
|
|
4302
4402
|
" ",
|
|
4303
4403
|
/* @__PURE__ */ d(ut, { "aria-hidden": !0 })
|
|
4304
4404
|
]
|
|
4305
4405
|
}
|
|
4306
4406
|
),
|
|
4307
4407
|
/* @__PURE__ */ d(
|
|
4308
|
-
|
|
4408
|
+
K,
|
|
4309
4409
|
{
|
|
4310
|
-
"data-color-scheme":
|
|
4410
|
+
"data-color-scheme": M,
|
|
4311
4411
|
placement: "bottom-start",
|
|
4312
|
-
children: /* @__PURE__ */
|
|
4313
|
-
/* @__PURE__ */ d(
|
|
4314
|
-
/* @__PURE__ */ d(
|
|
4412
|
+
children: /* @__PURE__ */ E(K.List, { children: [
|
|
4413
|
+
/* @__PURE__ */ d(K.Item, { children: /* @__PURE__ */ d(K.Button, { onClick: () => B("NO"), children: "Norsk (NO)" }) }),
|
|
4414
|
+
/* @__PURE__ */ d(K.Item, { children: /* @__PURE__ */ d(K.Button, { onClick: () => B("EN"), children: "English (EN)" }) })
|
|
4315
4415
|
] })
|
|
4316
4416
|
}
|
|
4317
4417
|
)
|
|
4318
4418
|
] })
|
|
4319
4419
|
] }),
|
|
4320
|
-
T && /* @__PURE__ */ d("div", { className:
|
|
4321
|
-
|
|
4420
|
+
T && /* @__PURE__ */ d("div", { className: b.extensionContent, children: /* @__PURE__ */ d(
|
|
4421
|
+
Ue,
|
|
4322
4422
|
{
|
|
4323
4423
|
"data-size": "sm",
|
|
4324
|
-
checked:
|
|
4424
|
+
checked: M === "dark",
|
|
4325
4425
|
onChange: Y,
|
|
4326
|
-
label:
|
|
4426
|
+
label: I("header.darkMode"),
|
|
4327
4427
|
color: "neutral",
|
|
4328
4428
|
"data-color-scheme": "light"
|
|
4329
4429
|
}
|
|
4330
4430
|
) })
|
|
4331
4431
|
] }),
|
|
4332
|
-
/* @__PURE__ */
|
|
4432
|
+
/* @__PURE__ */ E("div", { className: b.slotContent, children: [
|
|
4333
4433
|
n,
|
|
4334
|
-
|
|
4335
|
-
|
|
4434
|
+
U && v && h && h.length > 0 && /* @__PURE__ */ d("nav", { className: b.navList, children: h.map((S, C) => /* @__PURE__ */ d(
|
|
4435
|
+
Fe,
|
|
4336
4436
|
{
|
|
4337
|
-
href:
|
|
4338
|
-
className:
|
|
4339
|
-
onClick: (
|
|
4340
|
-
e && (
|
|
4437
|
+
href: S.href,
|
|
4438
|
+
className: b.navLink,
|
|
4439
|
+
onClick: (F) => {
|
|
4440
|
+
e && (F.preventDefault(), e(S.href));
|
|
4341
4441
|
},
|
|
4342
|
-
children:
|
|
4442
|
+
children: S.label
|
|
4343
4443
|
},
|
|
4344
4444
|
C
|
|
4345
4445
|
)) })
|
|
4346
4446
|
] }),
|
|
4347
|
-
|
|
4447
|
+
U && /* @__PURE__ */ d("div", { className: b.menuBrand, children: /* @__PURE__ */ d(J, {}) })
|
|
4348
4448
|
] })
|
|
4349
4449
|
] }) }),
|
|
4350
|
-
w && /* @__PURE__ */ d("div", { className:
|
|
4351
|
-
/* @__PURE__ */
|
|
4450
|
+
w && /* @__PURE__ */ d("div", { className: b.searchOverlay, children: /* @__PURE__ */ E("div", { className: b.searchContent, children: [
|
|
4451
|
+
/* @__PURE__ */ E(Me, { children: [
|
|
4352
4452
|
/* @__PURE__ */ d(
|
|
4353
|
-
|
|
4453
|
+
Me.Input,
|
|
4354
4454
|
{
|
|
4355
|
-
"aria-label":
|
|
4356
|
-
placeholder:
|
|
4357
|
-
value:
|
|
4358
|
-
onChange: (
|
|
4455
|
+
"aria-label": I("header.search"),
|
|
4456
|
+
placeholder: I("header.searchPlaceholder"),
|
|
4457
|
+
value: L,
|
|
4458
|
+
onChange: (S) => z(S.target.value)
|
|
4359
4459
|
}
|
|
4360
4460
|
),
|
|
4361
|
-
/* @__PURE__ */ d(
|
|
4362
|
-
/* @__PURE__ */ d(
|
|
4461
|
+
/* @__PURE__ */ d(Me.Button, { "aria-label": I("header.search") }),
|
|
4462
|
+
/* @__PURE__ */ d(Me.ClearButton, { onClick: () => z(""), "aria-label": I("header.clearSearch") })
|
|
4363
4463
|
] }),
|
|
4364
|
-
|
|
4365
|
-
/* @__PURE__ */ d("h3", { className:
|
|
4366
|
-
/* @__PURE__ */ d("ul", { className:
|
|
4464
|
+
L && /* @__PURE__ */ d("div", { className: b.searchResults, children: Q.length > 0 ? /* @__PURE__ */ E("div", { className: b.suggestionsSection, children: [
|
|
4465
|
+
/* @__PURE__ */ d("h3", { className: b.suggestionsTitle, children: I("header.suggestions") }),
|
|
4466
|
+
/* @__PURE__ */ d("ul", { className: b.resultList, children: Q.slice(0, 5).map((S) => /* @__PURE__ */ d("li", { className: b.resultItem, children: /* @__PURE__ */ E(
|
|
4367
4467
|
"button",
|
|
4368
4468
|
{
|
|
4369
|
-
className:
|
|
4370
|
-
onClick: () => X(
|
|
4469
|
+
className: b.resultLink,
|
|
4470
|
+
onClick: () => X(S.path),
|
|
4371
4471
|
children: [
|
|
4372
|
-
/* @__PURE__ */ d("span", { className:
|
|
4373
|
-
/* @__PURE__ */ d("span", { className:
|
|
4374
|
-
const C =
|
|
4375
|
-
if (C === -1) return /* @__PURE__ */ d("span", { className:
|
|
4376
|
-
const
|
|
4377
|
-
return /* @__PURE__ */
|
|
4378
|
-
/* @__PURE__ */ d("span", { className:
|
|
4379
|
-
/* @__PURE__ */ d("span", { className:
|
|
4380
|
-
/* @__PURE__ */ d("span", { className:
|
|
4472
|
+
/* @__PURE__ */ d("span", { className: b.suggestionIcon, children: /* @__PURE__ */ d(pt, { "aria-hidden": !0 }) }),
|
|
4473
|
+
/* @__PURE__ */ d("span", { className: b.suggestionText, children: (() => {
|
|
4474
|
+
const C = S.title.toLowerCase().indexOf(L.toLowerCase());
|
|
4475
|
+
if (C === -1) return /* @__PURE__ */ d("span", { className: b.remainingText, children: S.title });
|
|
4476
|
+
const F = S.title.slice(0, C), H = S.title.slice(C, C + L.length), te = S.title.slice(C + L.length);
|
|
4477
|
+
return /* @__PURE__ */ E(Ht, { children: [
|
|
4478
|
+
/* @__PURE__ */ d("span", { className: b.remainingText, children: F }),
|
|
4479
|
+
/* @__PURE__ */ d("span", { className: b.highlightedText, children: H }),
|
|
4480
|
+
/* @__PURE__ */ d("span", { className: b.remainingText, children: te })
|
|
4381
4481
|
] });
|
|
4382
4482
|
})() })
|
|
4383
4483
|
]
|
|
4384
4484
|
}
|
|
4385
|
-
) },
|
|
4386
|
-
Q.length > 5 && /* @__PURE__ */
|
|
4387
|
-
|
|
4485
|
+
) }, S.id)) }),
|
|
4486
|
+
Q.length > 5 && /* @__PURE__ */ E(
|
|
4487
|
+
Fe,
|
|
4388
4488
|
{
|
|
4389
4489
|
href: "#",
|
|
4390
4490
|
"data-color": "neutral",
|
|
4391
|
-
className:
|
|
4392
|
-
onClick: (
|
|
4393
|
-
|
|
4491
|
+
className: b.viewAllLink,
|
|
4492
|
+
onClick: (S) => {
|
|
4493
|
+
S.preventDefault(), e && e(`search/${L}`), D(!1), z("");
|
|
4394
4494
|
},
|
|
4395
4495
|
children: [
|
|
4396
|
-
|
|
4496
|
+
I("header.viewAll"),
|
|
4397
4497
|
" (",
|
|
4398
4498
|
Q.length,
|
|
4399
4499
|
")"
|
|
4400
4500
|
]
|
|
4401
4501
|
}
|
|
4402
4502
|
)
|
|
4403
|
-
] }) : /* @__PURE__ */ d("div", { className:
|
|
4404
|
-
|
|
4503
|
+
] }) : /* @__PURE__ */ d("div", { className: b.noResults, children: /* @__PURE__ */ E(Ye, { children: [
|
|
4504
|
+
I("header.noResults"),
|
|
4405
4505
|
' "',
|
|
4406
|
-
|
|
4506
|
+
L,
|
|
4407
4507
|
'"'
|
|
4408
4508
|
] }) }) })
|
|
4409
4509
|
] }) })
|
|
@@ -4545,54 +4645,54 @@ export {
|
|
|
4545
4645
|
Xn as Badge,
|
|
4546
4646
|
ui as BadgePosition,
|
|
4547
4647
|
mi as Breadcrumbs,
|
|
4548
|
-
|
|
4648
|
+
gi as BreadcrumbsItem,
|
|
4549
4649
|
fi as BreadcrumbsLink,
|
|
4550
|
-
|
|
4650
|
+
pi as BreadcrumbsList,
|
|
4551
4651
|
Te as Button,
|
|
4552
4652
|
eo as Card,
|
|
4553
4653
|
hi as CardBlock,
|
|
4554
|
-
|
|
4654
|
+
Jr as Carousel,
|
|
4555
4655
|
to as Checkbox,
|
|
4556
4656
|
vi as Chip,
|
|
4557
4657
|
er as DateInput,
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4658
|
+
Vo as DatePicker,
|
|
4659
|
+
yi as Details,
|
|
4660
|
+
bi as Dialog,
|
|
4561
4661
|
Ti as Divider,
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4662
|
+
K as Dropdown,
|
|
4663
|
+
Si as ErrorSummary,
|
|
4664
|
+
xi as Field,
|
|
4565
4665
|
Qr as FieldCounter,
|
|
4566
|
-
|
|
4666
|
+
Zr as FieldDescription,
|
|
4567
4667
|
wi as Fieldset,
|
|
4568
|
-
|
|
4668
|
+
$i as Header,
|
|
4569
4669
|
Xr as Heading,
|
|
4570
4670
|
Ci as Input,
|
|
4571
4671
|
es as Label,
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4672
|
+
Hi as LanguageProvider,
|
|
4673
|
+
Fe as Link,
|
|
4674
|
+
Ii as List,
|
|
4675
|
+
Di as Pagination,
|
|
4576
4676
|
Ye as Paragraph,
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4677
|
+
_i as Popover,
|
|
4678
|
+
ji as Radio,
|
|
4679
|
+
Me as Search,
|
|
4680
|
+
Ei as Select,
|
|
4681
|
+
Fi as SkeletonLoader,
|
|
4682
|
+
Mi as SkipLink,
|
|
4583
4683
|
Yr as Spinner,
|
|
4584
4684
|
ts as Suggestion,
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4685
|
+
Ue as Switch,
|
|
4686
|
+
Bi as Table,
|
|
4687
|
+
Ni as Tabs,
|
|
4688
|
+
Pi as Tag,
|
|
4589
4689
|
zi as Textarea,
|
|
4590
4690
|
Ri as Textfield,
|
|
4591
|
-
|
|
4592
|
-
|
|
4691
|
+
Gi as ToggleGroup,
|
|
4692
|
+
Wi as Tooltip,
|
|
4593
4693
|
ns as ValidationMessage,
|
|
4594
4694
|
ki as useCheckboxGroup,
|
|
4595
4695
|
rs as useLanguage,
|
|
4596
4696
|
Ai as usePagination,
|
|
4597
|
-
|
|
4697
|
+
Li as useRadioGroup
|
|
4598
4698
|
};
|