rk-designsystem 1.1.47 → 1.1.48
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 +1597 -1211
- package/dist/componentlibrary.umd.js +4 -4
- package/dist/index.d.ts +30 -0
- package/dist/red-cross-logo.svg +12 -0
- package/dist/rk-designsystem.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Alert as
|
|
3
|
-
import { startOfMonth as
|
|
4
|
-
import { ChevronLeftIcon as
|
|
5
|
-
var
|
|
1
|
+
import Lt, { forwardRef as ue, useState as oe, useEffect as ie, useMemo as xe, useCallback as re, useRef as Ye, createContext as Yt, useContext as Gt } from "react";
|
|
2
|
+
import { Alert as Kt, Avatar as Zt, Badge as Ut, BadgePosition as Xt, Breadcrumbs as Jt, BreadcrumbsList as Qt, BreadcrumbsItem as en, BreadcrumbsLink as tn, Button as Ge, Card as nn, CardBlock as rn, Checkbox as on, Fieldset as Tt, useCheckboxGroup as sn, Chip as an, Spinner as cn, Details as ln, Dialog as dn, Divider as un, Dropdown as fn, ErrorSummary as mn, FieldDescription as pn, FieldCounter as gn, Field as hn, Heading as vn, Input as bn, Label as xn, Link as yn, List as Cn, Pagination as _n, usePagination as kn, Paragraph as jn, Popover as Sn, Radio as Ln, useRadioGroup as Tn, Search as En, SearchInput as Nn, SearchClear as wn, SearchButton as In, Select as Pn, Skeleton as Dn, SkipLink as Mn, EXPERIMENTAL_Suggestion as On, Switch as Rn, Table as An, Tabs as Bn, Tag as $n, Textarea as Fn, Textfield as qn, ToggleGroup as Vn, Tooltip as Hn, ValidationMessage as Wn } from "@digdir/designsystemet-react";
|
|
3
|
+
import { startOfMonth as ve, isValid as He, isSameMonth as ut, startOfWeek as Et, format as _e, addDays as Nt, subMonths as zn, addMonths as Yn, isSameDay as Gn, isToday as Kn, eachDayOfInterval as Zn } from "date-fns";
|
|
4
|
+
import { ChevronLeftIcon as Un, ChevronRightIcon as Xn, ChevronDownIcon as Jn, XMarkIcon as ft, MagnifyingGlassIcon as mt, MenuHamburgerIcon as Qn, HeartIcon as er } from "@navikt/aksel-icons";
|
|
5
|
+
var Me = { exports: {} }, ke = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,17 +12,17 @@ var Ie = { exports: {} }, ye = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var pt;
|
|
16
|
+
function tr() {
|
|
17
|
+
if (pt) return ke;
|
|
18
|
+
pt = 1;
|
|
19
19
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
20
20
|
function n(o, a, s) {
|
|
21
21
|
var r = null;
|
|
22
22
|
if (s !== void 0 && (r = "" + s), a.key !== void 0 && (r = "" + a.key), "key" in a) {
|
|
23
23
|
s = {};
|
|
24
|
-
for (var
|
|
25
|
-
|
|
24
|
+
for (var l in a)
|
|
25
|
+
l !== "key" && (s[l] = a[l]);
|
|
26
26
|
} else s = a;
|
|
27
27
|
return a = s.ref, {
|
|
28
28
|
$$typeof: e,
|
|
@@ -32,9 +32,9 @@ function Vn() {
|
|
|
32
32
|
props: s
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return ke.Fragment = t, ke.jsx = n, ke.jsxs = n, ke;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var je = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,167 +44,167 @@ var xe = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
50
|
-
function e(
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
switch (
|
|
56
|
-
case
|
|
47
|
+
var gt;
|
|
48
|
+
function nr() {
|
|
49
|
+
return gt || (gt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
|
+
function e(d) {
|
|
51
|
+
if (d == null) return null;
|
|
52
|
+
if (typeof d == "function")
|
|
53
|
+
return d.$$typeof === O ? null : d.displayName || d.name || null;
|
|
54
|
+
if (typeof d == "string") return d;
|
|
55
|
+
switch (d) {
|
|
56
|
+
case x:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case f:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case p:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case N:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case j:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case $:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
|
-
if (typeof
|
|
70
|
-
switch (typeof
|
|
69
|
+
if (typeof d == "object")
|
|
70
|
+
switch (typeof d.tag == "number" && console.error(
|
|
71
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
-
),
|
|
72
|
+
), d.$$typeof) {
|
|
73
73
|
case b:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
76
|
-
return
|
|
77
|
-
case x:
|
|
78
|
-
return (l._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case N:
|
|
80
|
-
var k = l.render;
|
|
81
|
-
return l = l.displayName, l || (l = k.displayName || k.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
75
|
+
case I:
|
|
76
|
+
return d.displayName || "Context";
|
|
82
77
|
case C:
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
|
|
78
|
+
return (d._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case P:
|
|
80
|
+
var E = d.render;
|
|
81
|
+
return d = d.displayName, d || (d = E.displayName || E.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
82
|
+
case T:
|
|
83
|
+
return E = d.displayName || null, E !== null ? E : e(d.type) || "Memo";
|
|
84
|
+
case w:
|
|
85
|
+
E = d._payload, d = d._init;
|
|
86
86
|
try {
|
|
87
|
-
return e(
|
|
87
|
+
return e(d(E));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
-
function t(
|
|
94
|
-
return "" +
|
|
93
|
+
function t(d) {
|
|
94
|
+
return "" + d;
|
|
95
95
|
}
|
|
96
|
-
function n(
|
|
96
|
+
function n(d) {
|
|
97
97
|
try {
|
|
98
|
-
t(
|
|
99
|
-
var
|
|
98
|
+
t(d);
|
|
99
|
+
var E = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
E = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
103
|
+
if (E) {
|
|
104
|
+
E = console;
|
|
105
|
+
var k = E.error, D = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
106
|
+
return k.call(
|
|
107
|
+
E,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
D
|
|
110
|
-
), t(
|
|
110
|
+
), t(d);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function o(
|
|
114
|
-
if (
|
|
115
|
-
if (typeof
|
|
113
|
+
function o(d) {
|
|
114
|
+
if (d === x) return "<>";
|
|
115
|
+
if (typeof d == "object" && d !== null && d.$$typeof === w)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var E = e(d);
|
|
119
|
+
return E ? "<" + E + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function a() {
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var d = F.A;
|
|
126
|
+
return d === null ? null : d.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function s() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function r(
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
131
|
+
function r(d) {
|
|
132
|
+
if (R.call(d, "key")) {
|
|
133
|
+
var E = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
134
|
+
if (E && E.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return d.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
function l(d, E) {
|
|
139
|
+
function k() {
|
|
140
|
+
Q || (Q = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
|
-
|
|
142
|
+
E
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
k.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
146
|
+
get: k,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
152
|
-
return
|
|
150
|
+
function c() {
|
|
151
|
+
var d = e(this.type);
|
|
152
|
+
return G[d] || (G[d] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
|
-
)),
|
|
154
|
+
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
155
155
|
}
|
|
156
|
-
function u(
|
|
157
|
-
var
|
|
158
|
-
return
|
|
156
|
+
function u(d, E, k, D, U, z) {
|
|
157
|
+
var M = k.ref;
|
|
158
|
+
return d = {
|
|
159
159
|
$$typeof: h,
|
|
160
|
-
type:
|
|
161
|
-
key:
|
|
162
|
-
props:
|
|
160
|
+
type: d,
|
|
161
|
+
key: E,
|
|
162
|
+
props: k,
|
|
163
163
|
_owner: D
|
|
164
|
-
}, (
|
|
164
|
+
}, (M !== void 0 ? M : null) !== null ? Object.defineProperty(d, "ref", {
|
|
165
165
|
enumerable: !1,
|
|
166
|
-
get:
|
|
167
|
-
}) : Object.defineProperty(
|
|
166
|
+
get: c
|
|
167
|
+
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
168
168
|
configurable: !1,
|
|
169
169
|
enumerable: !1,
|
|
170
170
|
writable: !0,
|
|
171
171
|
value: 0
|
|
172
|
-
}), Object.defineProperty(
|
|
172
|
+
}), Object.defineProperty(d, "_debugInfo", {
|
|
173
173
|
configurable: !1,
|
|
174
174
|
enumerable: !1,
|
|
175
175
|
writable: !0,
|
|
176
176
|
value: null
|
|
177
|
-
}), Object.defineProperty(
|
|
177
|
+
}), Object.defineProperty(d, "_debugStack", {
|
|
178
178
|
configurable: !1,
|
|
179
179
|
enumerable: !1,
|
|
180
180
|
writable: !0,
|
|
181
|
-
value:
|
|
182
|
-
}), Object.defineProperty(
|
|
181
|
+
value: U
|
|
182
|
+
}), Object.defineProperty(d, "_debugTask", {
|
|
183
183
|
configurable: !1,
|
|
184
184
|
enumerable: !1,
|
|
185
185
|
writable: !0,
|
|
186
|
-
value:
|
|
187
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
+
value: z
|
|
187
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
188
188
|
}
|
|
189
|
-
function y(
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
189
|
+
function y(d, E, k, D, U, z) {
|
|
190
|
+
var M = E.children;
|
|
191
|
+
if (M !== void 0)
|
|
192
192
|
if (D)
|
|
193
|
-
if (
|
|
194
|
-
for (D = 0; D <
|
|
195
|
-
|
|
196
|
-
Object.freeze && Object.freeze(
|
|
193
|
+
if (A(M)) {
|
|
194
|
+
for (D = 0; D < M.length; D++)
|
|
195
|
+
g(M[D]);
|
|
196
|
+
Object.freeze && Object.freeze(M);
|
|
197
197
|
} else
|
|
198
198
|
console.error(
|
|
199
199
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
200
|
);
|
|
201
|
-
else
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
var
|
|
205
|
-
return
|
|
201
|
+
else g(M);
|
|
202
|
+
if (R.call(E, "key")) {
|
|
203
|
+
M = e(d);
|
|
204
|
+
var q = Object.keys(E).filter(function(X) {
|
|
205
|
+
return X !== "key";
|
|
206
206
|
});
|
|
207
|
-
D = 0 <
|
|
207
|
+
D = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", te[M + D] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s {...props} />
|
|
@@ -212,89 +212,89 @@ React keys must be passed directly to JSX without using spread:
|
|
|
212
212
|
let props = %s;
|
|
213
213
|
<%s key={someKey} {...props} />`,
|
|
214
214
|
D,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
),
|
|
215
|
+
M,
|
|
216
|
+
q,
|
|
217
|
+
M
|
|
218
|
+
), te[M + D] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (
|
|
221
|
-
|
|
222
|
-
for (var
|
|
223
|
-
|
|
224
|
-
} else
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
typeof
|
|
220
|
+
if (M = null, k !== void 0 && (n(k), M = "" + k), r(E) && (n(E.key), M = "" + E.key), "key" in E) {
|
|
221
|
+
k = {};
|
|
222
|
+
for (var ee in E)
|
|
223
|
+
ee !== "key" && (k[ee] = E[ee]);
|
|
224
|
+
} else k = E;
|
|
225
|
+
return M && l(
|
|
226
|
+
k,
|
|
227
|
+
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
228
228
|
), u(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
d,
|
|
230
|
+
M,
|
|
231
|
+
k,
|
|
232
232
|
a(),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
U,
|
|
234
|
+
z
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
237
|
+
function g(d) {
|
|
238
|
+
v(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === w && (d._payload.status === "fulfilled" ? v(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return typeof
|
|
240
|
+
function v(d) {
|
|
241
|
+
return typeof d == "object" && d !== null && d.$$typeof === h;
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var m = Lt, h = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), I = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), F = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, R = Object.prototype.hasOwnProperty, A = Array.isArray, L = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
247
|
-
react_stack_bottom_frame: function(
|
|
248
|
-
return
|
|
246
|
+
m = {
|
|
247
|
+
react_stack_bottom_frame: function(d) {
|
|
248
|
+
return d();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
252
|
-
|
|
251
|
+
var Q, G = {}, K = m.react_stack_bottom_frame.bind(
|
|
252
|
+
m,
|
|
253
253
|
s
|
|
254
|
-
)(),
|
|
255
|
-
|
|
256
|
-
var D = 1e4 >
|
|
254
|
+
)(), Z = L(o(s)), te = {};
|
|
255
|
+
je.Fragment = x, je.jsx = function(d, E, k) {
|
|
256
|
+
var D = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return y(
|
|
258
|
-
|
|
258
|
+
d,
|
|
259
|
+
E,
|
|
259
260
|
k,
|
|
260
|
-
A,
|
|
261
261
|
!1,
|
|
262
|
-
D ? Error("react-stack-top-frame") :
|
|
263
|
-
D ?
|
|
262
|
+
D ? Error("react-stack-top-frame") : K,
|
|
263
|
+
D ? L(o(d)) : Z
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var D = 1e4 >
|
|
265
|
+
}, je.jsxs = function(d, E, k) {
|
|
266
|
+
var D = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return y(
|
|
268
|
-
|
|
268
|
+
d,
|
|
269
|
+
E,
|
|
269
270
|
k,
|
|
270
|
-
A,
|
|
271
271
|
!0,
|
|
272
|
-
D ? Error("react-stack-top-frame") :
|
|
273
|
-
D ?
|
|
272
|
+
D ? Error("react-stack-top-frame") : K,
|
|
273
|
+
D ? L(o(d)) : Z
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
|
-
})()),
|
|
277
|
-
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
return
|
|
281
|
-
}
|
|
282
|
-
var
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
function
|
|
276
|
+
})()), je;
|
|
277
|
+
}
|
|
278
|
+
var ht;
|
|
279
|
+
function rr() {
|
|
280
|
+
return ht || (ht = 1, process.env.NODE_ENV === "production" ? Me.exports = tr() : Me.exports = nr()), Me.exports;
|
|
281
|
+
}
|
|
282
|
+
var i = rr();
|
|
283
|
+
const or = ue((e, t) => /* @__PURE__ */ i.jsx(Kt, { ref: t, ...e }));
|
|
284
|
+
or.displayName = "Alert";
|
|
285
|
+
const wt = ue((e, t) => /* @__PURE__ */ i.jsx(Zt, { ref: t, ...e }));
|
|
286
|
+
wt.displayName = "Avatar";
|
|
287
|
+
const sr = ue((e, t) => /* @__PURE__ */ i.jsx(Ut, { ref: t, ...e }));
|
|
288
|
+
sr.displayName = "Badge";
|
|
289
|
+
const ua = Xt, fa = Jt, ma = Qt, pa = en, ga = tn, ye = Ge;
|
|
290
|
+
ye.displayName = "Button";
|
|
291
|
+
const ar = nn, ha = rn;
|
|
292
|
+
ar.displayName = "Card";
|
|
293
|
+
const ir = on, cr = Tt, va = sn;
|
|
294
|
+
ir.displayName = "Checkbox";
|
|
295
|
+
cr.displayName = "Fieldset";
|
|
296
|
+
const ba = an;
|
|
297
|
+
function We(e) {
|
|
298
298
|
return (t = {}) => {
|
|
299
299
|
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
300
300
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
@@ -305,27 +305,27 @@ function Se(e) {
|
|
|
305
305
|
const o = n != null && n.context ? String(n.context) : "standalone";
|
|
306
306
|
let a;
|
|
307
307
|
if (o === "formatting" && e.formattingValues) {
|
|
308
|
-
const r = e.defaultFormattingWidth || e.defaultWidth,
|
|
309
|
-
a = e.formattingValues[
|
|
308
|
+
const r = e.defaultFormattingWidth || e.defaultWidth, l = n != null && n.width ? String(n.width) : r;
|
|
309
|
+
a = e.formattingValues[l] || e.formattingValues[r];
|
|
310
310
|
} else {
|
|
311
|
-
const r = e.defaultWidth,
|
|
312
|
-
a = e.values[
|
|
311
|
+
const r = e.defaultWidth, l = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
312
|
+
a = e.values[l] || e.values[r];
|
|
313
313
|
}
|
|
314
314
|
const s = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
315
315
|
return a[s];
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Le(e) {
|
|
319
319
|
return (t, n = {}) => {
|
|
320
320
|
const o = n.width, a = o && e.matchPatterns[o] || e.matchPatterns[e.defaultMatchWidth], s = t.match(a);
|
|
321
321
|
if (!s)
|
|
322
322
|
return null;
|
|
323
|
-
const r = s[0],
|
|
323
|
+
const r = s[0], l = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(l) ? dr(l, (g) => g.test(r)) : (
|
|
324
324
|
// [TODO] -- I challenge you to fix the type
|
|
325
|
-
|
|
325
|
+
lr(l, (g) => g.test(r))
|
|
326
326
|
);
|
|
327
327
|
let u;
|
|
328
|
-
u = e.valueCallback ? e.valueCallback(
|
|
328
|
+
u = e.valueCallback ? e.valueCallback(c) : c, u = n.valueCallback ? (
|
|
329
329
|
// [TODO] -- I challenge you to fix the type
|
|
330
330
|
n.valueCallback(u)
|
|
331
331
|
) : u;
|
|
@@ -333,17 +333,17 @@ function _e(e) {
|
|
|
333
333
|
return { value: u, rest: y };
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function lr(e, t) {
|
|
337
337
|
for (const n in e)
|
|
338
338
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
339
339
|
return n;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function dr(e, t) {
|
|
342
342
|
for (let n = 0; n < e.length; n++)
|
|
343
343
|
if (t(e[n]))
|
|
344
344
|
return n;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function ur(e) {
|
|
347
347
|
return (t, n = {}) => {
|
|
348
348
|
const o = t.match(e.matchPattern);
|
|
349
349
|
if (!o) return null;
|
|
@@ -351,11 +351,11 @@ function Qn(e) {
|
|
|
351
351
|
if (!s) return null;
|
|
352
352
|
let r = e.valueCallback ? e.valueCallback(s[0]) : s[0];
|
|
353
353
|
r = n.valueCallback ? n.valueCallback(r) : r;
|
|
354
|
-
const
|
|
355
|
-
return { value: r, rest:
|
|
354
|
+
const l = t.slice(a.length);
|
|
355
|
+
return { value: r, rest: l };
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
const
|
|
358
|
+
const fr = {
|
|
359
359
|
lessThanXSeconds: {
|
|
360
360
|
one: "mindre enn ett sekund",
|
|
361
361
|
other: "mindre enn {{count}} sekunder"
|
|
@@ -417,54 +417,54 @@ const Zn = {
|
|
|
417
417
|
one: "nesten ett år",
|
|
418
418
|
other: "nesten {{count}} år"
|
|
419
419
|
}
|
|
420
|
-
},
|
|
420
|
+
}, mr = (e, t, n) => {
|
|
421
421
|
let o;
|
|
422
|
-
const a =
|
|
422
|
+
const a = fr[e];
|
|
423
423
|
return typeof a == "string" ? o = a : t === 1 ? o = a.one : o = a.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "om " + o : o + " siden" : o;
|
|
424
|
-
},
|
|
424
|
+
}, pr = {
|
|
425
425
|
full: "EEEE d. MMMM y",
|
|
426
426
|
long: "d. MMMM y",
|
|
427
427
|
medium: "d. MMM y",
|
|
428
428
|
short: "dd.MM.y"
|
|
429
|
-
},
|
|
429
|
+
}, gr = {
|
|
430
430
|
full: "'kl'. HH:mm:ss zzzz",
|
|
431
431
|
long: "HH:mm:ss z",
|
|
432
432
|
medium: "HH:mm:ss",
|
|
433
433
|
short: "HH:mm"
|
|
434
|
-
},
|
|
434
|
+
}, hr = {
|
|
435
435
|
full: "{{date}} 'kl.' {{time}}",
|
|
436
436
|
long: "{{date}} 'kl.' {{time}}",
|
|
437
437
|
medium: "{{date}} {{time}}",
|
|
438
438
|
short: "{{date}} {{time}}"
|
|
439
|
-
},
|
|
440
|
-
date:
|
|
441
|
-
formats:
|
|
439
|
+
}, vr = {
|
|
440
|
+
date: We({
|
|
441
|
+
formats: pr,
|
|
442
442
|
defaultWidth: "full"
|
|
443
443
|
}),
|
|
444
|
-
time:
|
|
445
|
-
formats:
|
|
444
|
+
time: We({
|
|
445
|
+
formats: gr,
|
|
446
446
|
defaultWidth: "full"
|
|
447
447
|
}),
|
|
448
|
-
dateTime:
|
|
449
|
-
formats:
|
|
448
|
+
dateTime: We({
|
|
449
|
+
formats: hr,
|
|
450
450
|
defaultWidth: "full"
|
|
451
451
|
})
|
|
452
|
-
},
|
|
452
|
+
}, br = {
|
|
453
453
|
lastWeek: "'forrige' eeee 'kl.' p",
|
|
454
454
|
yesterday: "'i går kl.' p",
|
|
455
455
|
today: "'i dag kl.' p",
|
|
456
456
|
tomorrow: "'i morgen kl.' p",
|
|
457
457
|
nextWeek: "EEEE 'kl.' p",
|
|
458
458
|
other: "P"
|
|
459
|
-
},
|
|
459
|
+
}, xr = (e, t, n, o) => br[e], yr = {
|
|
460
460
|
narrow: ["f.Kr.", "e.Kr."],
|
|
461
461
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
462
462
|
wide: ["før Kristus", "etter Kristus"]
|
|
463
|
-
},
|
|
463
|
+
}, Cr = {
|
|
464
464
|
narrow: ["1", "2", "3", "4"],
|
|
465
465
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
466
466
|
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
|
|
467
|
-
},
|
|
467
|
+
}, _r = {
|
|
468
468
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
469
469
|
abbreviated: [
|
|
470
470
|
"jan.",
|
|
@@ -494,7 +494,7 @@ const Zn = {
|
|
|
494
494
|
"november",
|
|
495
495
|
"desember"
|
|
496
496
|
]
|
|
497
|
-
},
|
|
497
|
+
}, kr = {
|
|
498
498
|
narrow: ["S", "M", "T", "O", "T", "F", "L"],
|
|
499
499
|
short: ["sø", "ma", "ti", "on", "to", "fr", "lø"],
|
|
500
500
|
abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
|
|
@@ -507,7 +507,7 @@ const Zn = {
|
|
|
507
507
|
"fredag",
|
|
508
508
|
"lørdag"
|
|
509
509
|
]
|
|
510
|
-
},
|
|
510
|
+
}, jr = {
|
|
511
511
|
narrow: {
|
|
512
512
|
am: "a",
|
|
513
513
|
pm: "p",
|
|
@@ -538,46 +538,46 @@ const Zn = {
|
|
|
538
538
|
evening: "på kvelden",
|
|
539
539
|
night: "på natten"
|
|
540
540
|
}
|
|
541
|
-
},
|
|
542
|
-
ordinalNumber:
|
|
541
|
+
}, Sr = (e, t) => Number(e) + ".", Lr = {
|
|
542
|
+
ordinalNumber: Sr,
|
|
543
543
|
era: Se({
|
|
544
|
-
values:
|
|
544
|
+
values: yr,
|
|
545
545
|
defaultWidth: "wide"
|
|
546
546
|
}),
|
|
547
547
|
quarter: Se({
|
|
548
|
-
values:
|
|
548
|
+
values: Cr,
|
|
549
549
|
defaultWidth: "wide",
|
|
550
550
|
argumentCallback: (e) => e - 1
|
|
551
551
|
}),
|
|
552
552
|
month: Se({
|
|
553
|
-
values:
|
|
553
|
+
values: _r,
|
|
554
554
|
defaultWidth: "wide"
|
|
555
555
|
}),
|
|
556
556
|
day: Se({
|
|
557
|
-
values:
|
|
557
|
+
values: kr,
|
|
558
558
|
defaultWidth: "wide"
|
|
559
559
|
}),
|
|
560
560
|
dayPeriod: Se({
|
|
561
|
-
values:
|
|
561
|
+
values: jr,
|
|
562
562
|
defaultWidth: "wide"
|
|
563
563
|
})
|
|
564
|
-
},
|
|
564
|
+
}, Tr = /^(\d+)\.?/i, Er = /\d+/i, Nr = {
|
|
565
565
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
566
566
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
567
567
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
568
|
-
},
|
|
568
|
+
}, wr = {
|
|
569
569
|
any: [/^f/i, /^e/i]
|
|
570
|
-
},
|
|
570
|
+
}, Ir = {
|
|
571
571
|
narrow: /^[1234]/i,
|
|
572
572
|
abbreviated: /^q[1234]/i,
|
|
573
573
|
wide: /^[1234](\.)? kvartal/i
|
|
574
|
-
},
|
|
574
|
+
}, Pr = {
|
|
575
575
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
576
|
-
},
|
|
576
|
+
}, Dr = {
|
|
577
577
|
narrow: /^[jfmasond]/i,
|
|
578
578
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
579
579
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
580
|
-
},
|
|
580
|
+
}, Mr = {
|
|
581
581
|
narrow: [
|
|
582
582
|
/^j/i,
|
|
583
583
|
/^f/i,
|
|
@@ -606,17 +606,17 @@ const Zn = {
|
|
|
606
606
|
/^n/i,
|
|
607
607
|
/^d/i
|
|
608
608
|
]
|
|
609
|
-
},
|
|
609
|
+
}, Or = {
|
|
610
610
|
narrow: /^[smtofl]/i,
|
|
611
611
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
612
612
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
613
613
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
614
|
-
},
|
|
614
|
+
}, Rr = {
|
|
615
615
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
616
|
-
},
|
|
616
|
+
}, Ar = {
|
|
617
617
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
618
618
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
619
|
-
},
|
|
619
|
+
}, Br = {
|
|
620
620
|
any: {
|
|
621
621
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
622
622
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -627,55 +627,55 @@ const Zn = {
|
|
|
627
627
|
evening: /kveld/i,
|
|
628
628
|
night: /natt/i
|
|
629
629
|
}
|
|
630
|
-
},
|
|
631
|
-
ordinalNumber:
|
|
632
|
-
matchPattern:
|
|
633
|
-
parsePattern:
|
|
630
|
+
}, $r = {
|
|
631
|
+
ordinalNumber: ur({
|
|
632
|
+
matchPattern: Tr,
|
|
633
|
+
parsePattern: Er,
|
|
634
634
|
valueCallback: (e) => parseInt(e, 10)
|
|
635
635
|
}),
|
|
636
|
-
era:
|
|
637
|
-
matchPatterns:
|
|
636
|
+
era: Le({
|
|
637
|
+
matchPatterns: Nr,
|
|
638
638
|
defaultMatchWidth: "wide",
|
|
639
|
-
parsePatterns:
|
|
639
|
+
parsePatterns: wr,
|
|
640
640
|
defaultParseWidth: "any"
|
|
641
641
|
}),
|
|
642
|
-
quarter:
|
|
643
|
-
matchPatterns:
|
|
642
|
+
quarter: Le({
|
|
643
|
+
matchPatterns: Ir,
|
|
644
644
|
defaultMatchWidth: "wide",
|
|
645
|
-
parsePatterns:
|
|
645
|
+
parsePatterns: Pr,
|
|
646
646
|
defaultParseWidth: "any",
|
|
647
647
|
valueCallback: (e) => e + 1
|
|
648
648
|
}),
|
|
649
|
-
month:
|
|
650
|
-
matchPatterns:
|
|
649
|
+
month: Le({
|
|
650
|
+
matchPatterns: Dr,
|
|
651
651
|
defaultMatchWidth: "wide",
|
|
652
|
-
parsePatterns:
|
|
652
|
+
parsePatterns: Mr,
|
|
653
653
|
defaultParseWidth: "any"
|
|
654
654
|
}),
|
|
655
|
-
day:
|
|
656
|
-
matchPatterns:
|
|
655
|
+
day: Le({
|
|
656
|
+
matchPatterns: Or,
|
|
657
657
|
defaultMatchWidth: "wide",
|
|
658
|
-
parsePatterns:
|
|
658
|
+
parsePatterns: Rr,
|
|
659
659
|
defaultParseWidth: "any"
|
|
660
660
|
}),
|
|
661
|
-
dayPeriod:
|
|
662
|
-
matchPatterns:
|
|
661
|
+
dayPeriod: Le({
|
|
662
|
+
matchPatterns: Ar,
|
|
663
663
|
defaultMatchWidth: "any",
|
|
664
|
-
parsePatterns:
|
|
664
|
+
parsePatterns: Br,
|
|
665
665
|
defaultParseWidth: "any"
|
|
666
666
|
})
|
|
667
|
-
},
|
|
667
|
+
}, be = {
|
|
668
668
|
code: "nb",
|
|
669
|
-
formatDistance:
|
|
670
|
-
formatLong:
|
|
671
|
-
formatRelative:
|
|
672
|
-
localize:
|
|
673
|
-
match:
|
|
669
|
+
formatDistance: mr,
|
|
670
|
+
formatLong: vr,
|
|
671
|
+
formatRelative: xr,
|
|
672
|
+
localize: Lr,
|
|
673
|
+
match: $r,
|
|
674
674
|
options: {
|
|
675
675
|
weekStartsOn: 1,
|
|
676
676
|
firstWeekContainsDate: 4
|
|
677
677
|
}
|
|
678
|
-
},
|
|
678
|
+
}, It = ({ title: e, ...t }) => /* @__PURE__ */ i.jsxs(
|
|
679
679
|
"svg",
|
|
680
680
|
{
|
|
681
681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -687,8 +687,8 @@ const Zn = {
|
|
|
687
687
|
focusable: "false",
|
|
688
688
|
...t,
|
|
689
689
|
children: [
|
|
690
|
-
e && /* @__PURE__ */
|
|
691
|
-
/* @__PURE__ */
|
|
690
|
+
e && /* @__PURE__ */ i.jsx("title", { children: e }),
|
|
691
|
+
/* @__PURE__ */ i.jsx(
|
|
692
692
|
"path",
|
|
693
693
|
{
|
|
694
694
|
fillRule: "evenodd",
|
|
@@ -700,8 +700,8 @@ const Zn = {
|
|
|
700
700
|
]
|
|
701
701
|
}
|
|
702
702
|
);
|
|
703
|
-
|
|
704
|
-
const
|
|
703
|
+
It.displayName = "ChevronLeftIcon";
|
|
704
|
+
const Pt = ({ title: e, ...t }) => /* @__PURE__ */ i.jsxs(
|
|
705
705
|
"svg",
|
|
706
706
|
{
|
|
707
707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -713,8 +713,8 @@ const kt = ({ title: e, ...t }) => /* @__PURE__ */ _.jsxs(
|
|
|
713
713
|
focusable: "false",
|
|
714
714
|
...t,
|
|
715
715
|
children: [
|
|
716
|
-
e && /* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
716
|
+
e && /* @__PURE__ */ i.jsx("title", { children: e }),
|
|
717
|
+
/* @__PURE__ */ i.jsx(
|
|
718
718
|
"path",
|
|
719
719
|
{
|
|
720
720
|
fillRule: "evenodd",
|
|
@@ -726,22 +726,22 @@ const kt = ({ title: e, ...t }) => /* @__PURE__ */ _.jsxs(
|
|
|
726
726
|
]
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
|
-
|
|
730
|
-
const
|
|
731
|
-
calendarContainer:
|
|
732
|
-
calendarHeader:
|
|
733
|
-
monthYear:
|
|
734
|
-
navigationButtons:
|
|
735
|
-
grid:
|
|
736
|
-
dayNameCell:
|
|
737
|
-
dateCell:
|
|
738
|
-
dateNumberContainer:
|
|
739
|
-
otherMonth:
|
|
740
|
-
selectedDate:
|
|
741
|
-
},
|
|
742
|
-
const t =
|
|
743
|
-
return
|
|
744
|
-
},
|
|
729
|
+
Pt.displayName = "ChevronRightIcon";
|
|
730
|
+
const Fr = "_calendarContainer_10l5p_1", qr = "_calendarHeader_10l5p_14", Vr = "_monthYear_10l5p_21", Hr = "_navigationButtons_10l5p_32", Wr = "_grid_10l5p_41", zr = "_dayNameCell_10l5p_48", Yr = "_dateCell_10l5p_65", Gr = "_dateNumberContainer_10l5p_90", Kr = "_otherMonth_10l5p_103", Zr = "_selectedDate_10l5p_129", ne = {
|
|
731
|
+
calendarContainer: Fr,
|
|
732
|
+
calendarHeader: qr,
|
|
733
|
+
monthYear: Vr,
|
|
734
|
+
navigationButtons: Hr,
|
|
735
|
+
grid: Wr,
|
|
736
|
+
dayNameCell: zr,
|
|
737
|
+
dateCell: Yr,
|
|
738
|
+
dateNumberContainer: Gr,
|
|
739
|
+
otherMonth: Kr,
|
|
740
|
+
selectedDate: Zr
|
|
741
|
+
}, Ur = (e) => {
|
|
742
|
+
const t = ve(e), n = Et(t, { locale: be }), o = Nt(n, 41);
|
|
743
|
+
return Zn({ start: n, end: o });
|
|
744
|
+
}, vt = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Xr = ({
|
|
745
745
|
initialDate: e = /* @__PURE__ */ new Date(),
|
|
746
746
|
selectedDate: t = null,
|
|
747
747
|
// Prop for valgt dato
|
|
@@ -751,113 +751,113 @@ const Pr = "_calendarContainer_10l5p_1", Tr = "_calendarHeader_10l5p_14", Nr = "
|
|
|
751
751
|
"data-size": a
|
|
752
752
|
// <-- Destrukturert
|
|
753
753
|
}) => {
|
|
754
|
-
const [s, r] =
|
|
755
|
-
|
|
754
|
+
const [s, r] = oe(
|
|
755
|
+
ve(t && He(t) ? t : e)
|
|
756
756
|
);
|
|
757
|
-
|
|
758
|
-
if (t &&
|
|
759
|
-
const
|
|
760
|
-
|
|
757
|
+
ie(() => {
|
|
758
|
+
if (t && He(t)) {
|
|
759
|
+
const f = ve(t);
|
|
760
|
+
ut(f, s) || r(f);
|
|
761
761
|
}
|
|
762
762
|
}, [t]);
|
|
763
|
-
const
|
|
764
|
-
() =>
|
|
763
|
+
const l = xe(() => ve(/* @__PURE__ */ new Date()), []), c = xe(() => !1, [s, l]), u = xe(
|
|
764
|
+
() => Ur(s),
|
|
765
765
|
[s]
|
|
766
|
-
), y =
|
|
767
|
-
const
|
|
768
|
-
return Array.from({ length: 7 }).map((
|
|
769
|
-
const
|
|
770
|
-
return
|
|
766
|
+
), y = xe(() => {
|
|
767
|
+
const f = Et(/* @__PURE__ */ new Date(), { locale: be });
|
|
768
|
+
return Array.from({ length: 7 }).map((C, I) => {
|
|
769
|
+
const P = _e(Nt(f, I), "EEEEEE", { locale: be });
|
|
770
|
+
return vt(P);
|
|
771
771
|
});
|
|
772
|
-
}, []),
|
|
773
|
-
|
|
774
|
-
}, [
|
|
775
|
-
r((
|
|
776
|
-
}, []),
|
|
777
|
-
(
|
|
778
|
-
n && n(
|
|
772
|
+
}, []), g = re(() => {
|
|
773
|
+
c || r((f) => ve(zn(f, 1)));
|
|
774
|
+
}, [c]), v = re(() => {
|
|
775
|
+
r((f) => ve(Yn(f, 1)));
|
|
776
|
+
}, []), m = re(
|
|
777
|
+
(f) => {
|
|
778
|
+
n && n(f);
|
|
779
779
|
},
|
|
780
780
|
[n]
|
|
781
|
-
), h =
|
|
782
|
-
(
|
|
783
|
-
(
|
|
781
|
+
), h = re(
|
|
782
|
+
(f, C) => {
|
|
783
|
+
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), m(C));
|
|
784
784
|
},
|
|
785
|
-
[
|
|
786
|
-
), b =
|
|
787
|
-
return /* @__PURE__ */
|
|
785
|
+
[m]
|
|
786
|
+
), b = _e(s, "MMMM", { locale: be }), x = _e(s, "yyyy", { locale: be }), p = `${vt(b)} ${x}`;
|
|
787
|
+
return /* @__PURE__ */ i.jsxs(
|
|
788
788
|
"div",
|
|
789
789
|
{
|
|
790
|
-
className:
|
|
790
|
+
className: ne.calendarContainer,
|
|
791
791
|
"data-color": o,
|
|
792
792
|
"data-size": a,
|
|
793
793
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
|
|
794
|
+
/* @__PURE__ */ i.jsxs("div", { className: ne.calendarHeader, children: [
|
|
795
|
+
/* @__PURE__ */ i.jsx("span", { className: ne.monthYear, children: p }),
|
|
796
|
+
/* @__PURE__ */ i.jsxs("div", { className: ne.navigationButtons, children: [
|
|
797
|
+
/* @__PURE__ */ i.jsx(
|
|
798
|
+
Ge,
|
|
799
799
|
{
|
|
800
800
|
variant: "tertiary",
|
|
801
801
|
icon: !0,
|
|
802
|
-
onClick:
|
|
802
|
+
onClick: g,
|
|
803
803
|
"aria-label": "Forrige måned",
|
|
804
|
-
disabled:
|
|
805
|
-
children: /* @__PURE__ */
|
|
804
|
+
disabled: c,
|
|
805
|
+
children: /* @__PURE__ */ i.jsx(It, {})
|
|
806
806
|
}
|
|
807
807
|
),
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
-
|
|
808
|
+
/* @__PURE__ */ i.jsx(
|
|
809
|
+
Ge,
|
|
810
810
|
{
|
|
811
811
|
variant: "tertiary",
|
|
812
812
|
icon: !0,
|
|
813
|
-
onClick:
|
|
813
|
+
onClick: v,
|
|
814
814
|
"aria-label": "Neste måned",
|
|
815
|
-
children: /* @__PURE__ */
|
|
815
|
+
children: /* @__PURE__ */ i.jsx(Pt, {})
|
|
816
816
|
}
|
|
817
817
|
)
|
|
818
818
|
] })
|
|
819
819
|
] }),
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
-
/* @__PURE__ */
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
820
|
+
/* @__PURE__ */ i.jsx("div", { className: ne.grid, children: y.map((f) => /* @__PURE__ */ i.jsx("div", { className: ne.dayNameCell, children: f }, f)) }),
|
|
821
|
+
/* @__PURE__ */ i.jsx("div", { className: ne.grid, children: u.map((f) => {
|
|
822
|
+
const C = ut(f, s), I = t && He(t) && Gn(f, t), P = Kn(f), N = [
|
|
823
|
+
ne.dateCell,
|
|
824
|
+
C ? "" : ne.otherMonth,
|
|
825
|
+
I ? ne.selectedDate : "",
|
|
826
826
|
// Utheving basert på prop
|
|
827
|
-
|
|
827
|
+
P && !I ? ne.todayDate : ""
|
|
828
828
|
].filter(Boolean).join(" ");
|
|
829
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ i.jsx(
|
|
830
830
|
"div",
|
|
831
831
|
{
|
|
832
|
-
className:
|
|
833
|
-
onClick: () => f
|
|
834
|
-
onKeyDown: (
|
|
832
|
+
className: N,
|
|
833
|
+
onClick: () => m(f),
|
|
834
|
+
onKeyDown: (j) => h(j, f),
|
|
835
835
|
role: "button",
|
|
836
836
|
tabIndex: 0,
|
|
837
|
-
"aria-pressed":
|
|
838
|
-
"aria-label":
|
|
839
|
-
children: /* @__PURE__ */
|
|
837
|
+
"aria-pressed": I ?? !1,
|
|
838
|
+
"aria-label": _e(f, "PPP", { locale: be }),
|
|
839
|
+
children: /* @__PURE__ */ i.jsx("span", { className: ne.dateNumberContainer, children: _e(f, "d") })
|
|
840
840
|
},
|
|
841
|
-
|
|
841
|
+
f.toISOString()
|
|
842
842
|
);
|
|
843
843
|
}) })
|
|
844
844
|
]
|
|
845
845
|
}
|
|
846
846
|
);
|
|
847
847
|
};
|
|
848
|
-
|
|
849
|
-
const
|
|
850
|
-
fieldset:
|
|
851
|
-
description:
|
|
852
|
-
error:
|
|
853
|
-
inputWrapper:
|
|
854
|
-
inputWrapperError:
|
|
855
|
-
suffixButton:
|
|
856
|
-
suffixButtonInteractive:
|
|
857
|
-
},
|
|
848
|
+
Xr.displayName = "DatePicker";
|
|
849
|
+
const Jr = "_fieldset_16fx7_2", Qr = "_description_16fx7_14", eo = "_error_16fx7_21", to = "_inputWrapper_16fx7_30", no = "_inputWrapperError_16fx7_42", ro = "_suffixButton_16fx7_80", oo = "_suffixButtonInteractive_16fx7_100", pe = {
|
|
850
|
+
fieldset: Jr,
|
|
851
|
+
description: Qr,
|
|
852
|
+
error: eo,
|
|
853
|
+
inputWrapper: to,
|
|
854
|
+
inputWrapperError: no,
|
|
855
|
+
suffixButton: ro,
|
|
856
|
+
suffixButtonInteractive: oo
|
|
857
|
+
}, bt = (e) => {
|
|
858
858
|
const t = e.slice(0, 2), n = e.slice(2, 4), o = e.slice(4, 8);
|
|
859
859
|
return e.length > 4 ? `${t}.${n}.${o}` : e.length > 2 ? `${t}.${n}` : e.length > 0 ? t : "";
|
|
860
|
-
},
|
|
860
|
+
}, xt = (e) => (e || "").replace(/\D/g, ""), yt = (e) => {
|
|
861
861
|
let t = e;
|
|
862
862
|
if (t.length >= 2) {
|
|
863
863
|
const n = parseInt(t.substring(0, 2), 10);
|
|
@@ -868,7 +868,7 @@ const Fr = "_fieldset_16fx7_2", Br = "_description_16fx7_14", Vr = "_error_16fx7
|
|
|
868
868
|
!isNaN(n) && n > 12 && (t = t.substring(0, 2) + "12" + t.substring(4));
|
|
869
869
|
}
|
|
870
870
|
return t.slice(0, 8);
|
|
871
|
-
},
|
|
871
|
+
}, so = ue(
|
|
872
872
|
(e, t) => {
|
|
873
873
|
const {
|
|
874
874
|
label: n,
|
|
@@ -878,229 +878,229 @@ const Fr = "_fieldset_16fx7_2", Br = "_description_16fx7_14", Vr = "_error_16fx7
|
|
|
878
878
|
// For ytre fieldset
|
|
879
879
|
inputWrapperClassName: r,
|
|
880
880
|
// For input wrapper div
|
|
881
|
-
inputClassName:
|
|
881
|
+
inputClassName: l,
|
|
882
882
|
// For selve input-elementet
|
|
883
|
-
value:
|
|
883
|
+
value: c,
|
|
884
884
|
defaultValue: u,
|
|
885
885
|
onChange: y,
|
|
886
|
-
readOnly:
|
|
887
|
-
placeholder:
|
|
888
|
-
id:
|
|
886
|
+
readOnly: g,
|
|
887
|
+
placeholder: v = "dd.mm.åååå",
|
|
888
|
+
id: m,
|
|
889
889
|
name: h,
|
|
890
890
|
required: b,
|
|
891
|
-
disabled:
|
|
892
|
-
onClick:
|
|
893
|
-
onFocus:
|
|
891
|
+
disabled: x,
|
|
892
|
+
onClick: p,
|
|
893
|
+
onFocus: f,
|
|
894
894
|
// Send ekstern onFocus videre
|
|
895
|
-
onBlur:
|
|
895
|
+
onBlur: C,
|
|
896
896
|
// Send ekstern onBlur videre
|
|
897
|
-
autoComplete:
|
|
898
|
-
"aria-label":
|
|
899
|
-
"aria-labelledby":
|
|
900
|
-
description:
|
|
901
|
-
error:
|
|
897
|
+
autoComplete: I = "off",
|
|
898
|
+
"aria-label": P,
|
|
899
|
+
"aria-labelledby": N,
|
|
900
|
+
description: j,
|
|
901
|
+
error: T,
|
|
902
902
|
// Bruk error-prop for styling
|
|
903
|
-
"data-color":
|
|
903
|
+
"data-color": w,
|
|
904
904
|
// <-- Destrukturering
|
|
905
|
-
"data-size":
|
|
905
|
+
"data-size": $,
|
|
906
906
|
// <-- Destrukturering
|
|
907
|
-
...
|
|
908
|
-
} = e,
|
|
909
|
-
|
|
907
|
+
...O
|
|
908
|
+
} = e, F = c !== void 0, R = Ye(null);
|
|
909
|
+
Lt.useImperativeHandle(
|
|
910
910
|
t,
|
|
911
|
-
() =>
|
|
911
|
+
() => R.current
|
|
912
912
|
);
|
|
913
|
-
const
|
|
914
|
-
(
|
|
915
|
-
const
|
|
916
|
-
return
|
|
913
|
+
const A = re(
|
|
914
|
+
(z) => {
|
|
915
|
+
const M = xt(z), q = yt(M);
|
|
916
|
+
return bt(q);
|
|
917
917
|
},
|
|
918
918
|
[]
|
|
919
|
-
), [
|
|
920
|
-
() =>
|
|
919
|
+
), [L, Q] = oe(
|
|
920
|
+
() => A(c ?? u)
|
|
921
921
|
);
|
|
922
|
-
|
|
923
|
-
if (
|
|
924
|
-
const
|
|
925
|
-
|
|
922
|
+
ie(() => {
|
|
923
|
+
if (F) {
|
|
924
|
+
const z = A(c);
|
|
925
|
+
z !== L && (Q(z), R.current && R.current.value !== z && (R.current.value = z));
|
|
926
926
|
}
|
|
927
|
-
}, [
|
|
928
|
-
const
|
|
929
|
-
(
|
|
930
|
-
const
|
|
931
|
-
let
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
if (
|
|
927
|
+
}, [c, F, L, A]);
|
|
928
|
+
const G = re(
|
|
929
|
+
(z) => {
|
|
930
|
+
const M = z.target, q = M.value, ee = L, X = xt(q).slice(0, 8), V = yt(X), _ = bt(V);
|
|
931
|
+
let B = 0;
|
|
932
|
+
const H = V.length;
|
|
933
|
+
H <= 2 ? B = H : H <= 4 ? B = H + 1 : B = H + 2, B = Math.min(B, _.length), requestAnimationFrame(() => {
|
|
934
|
+
if (R.current && (Q(_), R.current.value = _, R.current.setSelectionRange(B, B), (_ !== ee || F) && y)) {
|
|
935
935
|
const Y = {
|
|
936
|
-
...
|
|
937
|
-
target: { ...
|
|
936
|
+
...z,
|
|
937
|
+
target: { ...M, value: _ }
|
|
938
938
|
};
|
|
939
|
-
y(Y,
|
|
939
|
+
y(Y, _);
|
|
940
940
|
}
|
|
941
941
|
});
|
|
942
942
|
},
|
|
943
|
-
[
|
|
944
|
-
),
|
|
945
|
-
|
|
943
|
+
[L, F, y, A]
|
|
944
|
+
), K = [pe.fieldset, s].filter(Boolean).join(" "), Z = [
|
|
945
|
+
pe.inputWrapper,
|
|
946
946
|
r,
|
|
947
|
-
|
|
948
|
-
].filter(Boolean).join(" "),
|
|
949
|
-
|
|
950
|
-
].filter(Boolean).join(" "),
|
|
951
|
-
|
|
952
|
-
a ?
|
|
947
|
+
T ? pe.inputWrapperError : ""
|
|
948
|
+
].filter(Boolean).join(" "), te = [
|
|
949
|
+
l
|
|
950
|
+
].filter(Boolean).join(" "), d = [
|
|
951
|
+
pe.suffixButton,
|
|
952
|
+
a ? pe.suffixButtonInteractive : ""
|
|
953
953
|
].filter(Boolean).join(" ");
|
|
954
|
-
!n && !
|
|
955
|
-
const
|
|
954
|
+
!n && !P && !N && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
955
|
+
const E = n && typeof n == "string" ? N || `${m}-label` : void 0, k = j ? `${m}-desc` : void 0, D = T ? `${m}-err` : void 0, U = [k, D].filter(Boolean).join(" ") || void 0;
|
|
956
956
|
return (
|
|
957
957
|
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
958
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ i.jsxs(
|
|
959
959
|
"div",
|
|
960
960
|
{
|
|
961
|
-
className:
|
|
962
|
-
"data-color":
|
|
963
|
-
"data-size":
|
|
961
|
+
className: K,
|
|
962
|
+
"data-color": w,
|
|
963
|
+
"data-size": $,
|
|
964
964
|
children: [
|
|
965
|
-
n && typeof n == "string" ? /* @__PURE__ */
|
|
966
|
-
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
/* @__PURE__ */
|
|
965
|
+
n && typeof n == "string" ? /* @__PURE__ */ i.jsx("label", { id: E, htmlFor: m, children: n }) : n,
|
|
966
|
+
j && /* @__PURE__ */ i.jsx("p", { id: k, className: pe.description, children: j }),
|
|
967
|
+
/* @__PURE__ */ i.jsxs("div", { className: Z, children: [
|
|
968
|
+
/* @__PURE__ */ i.jsx(
|
|
969
969
|
"input",
|
|
970
970
|
{
|
|
971
|
-
ref:
|
|
971
|
+
ref: R,
|
|
972
972
|
type: "text",
|
|
973
973
|
inputMode: "numeric",
|
|
974
974
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
975
975
|
maxLength: 10,
|
|
976
|
-
value:
|
|
977
|
-
readOnly:
|
|
978
|
-
placeholder:
|
|
979
|
-
id:
|
|
976
|
+
value: L,
|
|
977
|
+
readOnly: g,
|
|
978
|
+
placeholder: v,
|
|
979
|
+
id: m,
|
|
980
980
|
name: h,
|
|
981
981
|
required: b,
|
|
982
|
-
disabled:
|
|
983
|
-
onClick:
|
|
984
|
-
onChange:
|
|
985
|
-
onFocus:
|
|
986
|
-
onBlur:
|
|
987
|
-
autoComplete:
|
|
988
|
-
"aria-label":
|
|
989
|
-
"aria-labelledby":
|
|
990
|
-
"aria-describedby":
|
|
991
|
-
"aria-invalid": !!
|
|
992
|
-
className:
|
|
993
|
-
...
|
|
982
|
+
disabled: x,
|
|
983
|
+
onClick: p,
|
|
984
|
+
onChange: G,
|
|
985
|
+
onFocus: f,
|
|
986
|
+
onBlur: C,
|
|
987
|
+
autoComplete: I,
|
|
988
|
+
"aria-label": P,
|
|
989
|
+
"aria-labelledby": E,
|
|
990
|
+
"aria-describedby": U,
|
|
991
|
+
"aria-invalid": !!T,
|
|
992
|
+
className: te,
|
|
993
|
+
...O
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
|
-
o && /* @__PURE__ */
|
|
996
|
+
o && /* @__PURE__ */ i.jsx(
|
|
997
997
|
"button",
|
|
998
998
|
{
|
|
999
999
|
type: "button",
|
|
1000
|
-
className:
|
|
1001
|
-
onClick:
|
|
1002
|
-
tabIndex: a && !
|
|
1000
|
+
className: d,
|
|
1001
|
+
onClick: x ? void 0 : a,
|
|
1002
|
+
tabIndex: a && !x ? 0 : -1,
|
|
1003
1003
|
"aria-hidden": !a,
|
|
1004
|
-
disabled:
|
|
1004
|
+
disabled: x,
|
|
1005
1005
|
"aria-label": a ? "Åpne datovelger" : void 0,
|
|
1006
1006
|
children: o
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
] }),
|
|
1010
|
-
|
|
1010
|
+
T && /* @__PURE__ */ i.jsx("p", { id: D, className: pe.error, role: "alert", children: T })
|
|
1011
1011
|
]
|
|
1012
1012
|
}
|
|
1013
1013
|
)
|
|
1014
1014
|
);
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
|
-
|
|
1018
|
-
function
|
|
1017
|
+
so.displayName = "DateInput";
|
|
1018
|
+
function ao(e) {
|
|
1019
1019
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1022
|
-
return
|
|
1021
|
+
function Ct(e) {
|
|
1022
|
+
return ao(e) || Array.isArray(e);
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function io() {
|
|
1025
1025
|
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Xe(e, t) {
|
|
1028
1028
|
const n = Object.keys(e), o = Object.keys(t);
|
|
1029
1029
|
if (n.length !== o.length) return !1;
|
|
1030
1030
|
const a = JSON.stringify(Object.keys(e.breakpoints || {})), s = JSON.stringify(Object.keys(t.breakpoints || {}));
|
|
1031
1031
|
return a !== s ? !1 : n.every((r) => {
|
|
1032
|
-
const
|
|
1033
|
-
return typeof
|
|
1032
|
+
const l = e[r], c = t[r];
|
|
1033
|
+
return typeof l == "function" ? `${l}` == `${c}` : !Ct(l) || !Ct(c) ? l === c : Xe(l, c);
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function _t(e) {
|
|
1037
1037
|
return e.concat().sort((t, n) => t.name > n.name ? 1 : -1).map((t) => t.options);
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function co(e, t) {
|
|
1040
1040
|
if (e.length !== t.length) return !1;
|
|
1041
|
-
const n =
|
|
1041
|
+
const n = _t(e), o = _t(t);
|
|
1042
1042
|
return n.every((a, s) => {
|
|
1043
1043
|
const r = o[s];
|
|
1044
|
-
return
|
|
1044
|
+
return Xe(a, r);
|
|
1045
1045
|
});
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Je(e) {
|
|
1048
1048
|
return typeof e == "number";
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Ke(e) {
|
|
1051
1051
|
return typeof e == "string";
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Ae(e) {
|
|
1054
1054
|
return typeof e == "boolean";
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function kt(e) {
|
|
1057
1057
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function W(e) {
|
|
1060
1060
|
return Math.abs(e);
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Qe(e) {
|
|
1063
1063
|
return Math.sign(e);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return
|
|
1065
|
+
function Ee(e, t) {
|
|
1066
|
+
return W(e - t);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1069
|
-
if (e === 0 || t === 0 ||
|
|
1070
|
-
const n =
|
|
1071
|
-
return
|
|
1068
|
+
function lo(e, t) {
|
|
1069
|
+
if (e === 0 || t === 0 || W(e) <= W(t)) return 0;
|
|
1070
|
+
const n = Ee(W(e), W(t));
|
|
1071
|
+
return W(n / e);
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function uo(e) {
|
|
1074
1074
|
return Math.round(e * 100) / 100;
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1076
|
+
function Ne(e) {
|
|
1077
|
+
return we(e).map(Number);
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return e[
|
|
1079
|
+
function se(e) {
|
|
1080
|
+
return e[Pe(e)];
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function Pe(e) {
|
|
1083
1083
|
return Math.max(0, e.length - 1);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return t ===
|
|
1085
|
+
function et(e, t) {
|
|
1086
|
+
return t === Pe(e);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function jt(e, t = 0) {
|
|
1089
1089
|
return Array.from(Array(e), (n, o) => t + o);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function we(e) {
|
|
1092
1092
|
return Object.keys(e);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return [e, t].reduce((n, o) => (
|
|
1096
|
-
const s = n[a], r = o[a],
|
|
1097
|
-
n[a] =
|
|
1094
|
+
function Dt(e, t) {
|
|
1095
|
+
return [e, t].reduce((n, o) => (we(o).forEach((a) => {
|
|
1096
|
+
const s = n[a], r = o[a], l = kt(s) && kt(r);
|
|
1097
|
+
n[a] = l ? Dt(s, r) : r;
|
|
1098
1098
|
}), n), {});
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Ze(e, t) {
|
|
1101
1101
|
return typeof t.MouseEvent < "u" && e instanceof t.MouseEvent;
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function fo(e, t) {
|
|
1104
1104
|
const n = {
|
|
1105
1105
|
start: o,
|
|
1106
1106
|
center: a,
|
|
@@ -1109,32 +1109,32 @@ function Qr(e, t) {
|
|
|
1109
1109
|
function o() {
|
|
1110
1110
|
return 0;
|
|
1111
1111
|
}
|
|
1112
|
-
function a(
|
|
1113
|
-
return s(
|
|
1112
|
+
function a(c) {
|
|
1113
|
+
return s(c) / 2;
|
|
1114
1114
|
}
|
|
1115
|
-
function s(
|
|
1116
|
-
return t -
|
|
1115
|
+
function s(c) {
|
|
1116
|
+
return t - c;
|
|
1117
1117
|
}
|
|
1118
|
-
function r(
|
|
1119
|
-
return
|
|
1118
|
+
function r(c, u) {
|
|
1119
|
+
return Ke(e) ? n[e](c) : e(t, c, u);
|
|
1120
1120
|
}
|
|
1121
1121
|
return {
|
|
1122
1122
|
measure: r
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function Ie() {
|
|
1126
1126
|
let e = [];
|
|
1127
|
-
function t(a, s, r,
|
|
1127
|
+
function t(a, s, r, l = {
|
|
1128
1128
|
passive: !0
|
|
1129
1129
|
}) {
|
|
1130
|
-
let
|
|
1130
|
+
let c;
|
|
1131
1131
|
if ("addEventListener" in a)
|
|
1132
|
-
a.addEventListener(s, r,
|
|
1132
|
+
a.addEventListener(s, r, l), c = () => a.removeEventListener(s, r, l);
|
|
1133
1133
|
else {
|
|
1134
1134
|
const u = a;
|
|
1135
|
-
u.addListener(r),
|
|
1135
|
+
u.addListener(r), c = () => u.removeListener(r);
|
|
1136
1136
|
}
|
|
1137
|
-
return e.push(
|
|
1137
|
+
return e.push(c), o;
|
|
1138
1138
|
}
|
|
1139
1139
|
function n() {
|
|
1140
1140
|
e = e.filter((a) => a());
|
|
@@ -1145,73 +1145,73 @@ function Te() {
|
|
|
1145
1145
|
};
|
|
1146
1146
|
return o;
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
const a =
|
|
1150
|
-
let r = null,
|
|
1148
|
+
function mo(e, t, n, o) {
|
|
1149
|
+
const a = Ie(), s = 1e3 / 60;
|
|
1150
|
+
let r = null, l = 0, c = 0;
|
|
1151
1151
|
function u() {
|
|
1152
1152
|
a.add(e, "visibilitychange", () => {
|
|
1153
1153
|
e.hidden && h();
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
function y() {
|
|
1157
|
-
|
|
1157
|
+
m(), a.clear();
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1160
|
-
if (!
|
|
1161
|
-
r || (r =
|
|
1162
|
-
const
|
|
1163
|
-
for (r =
|
|
1164
|
-
n(),
|
|
1165
|
-
const
|
|
1166
|
-
o(
|
|
1159
|
+
function g(x) {
|
|
1160
|
+
if (!c) return;
|
|
1161
|
+
r || (r = x, n(), n());
|
|
1162
|
+
const p = x - r;
|
|
1163
|
+
for (r = x, l += p; l >= s; )
|
|
1164
|
+
n(), l -= s;
|
|
1165
|
+
const f = l / s;
|
|
1166
|
+
o(f), c && (c = t.requestAnimationFrame(g));
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1169
|
-
|
|
1168
|
+
function v() {
|
|
1169
|
+
c || (c = t.requestAnimationFrame(g));
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1172
|
-
t.cancelAnimationFrame(
|
|
1171
|
+
function m() {
|
|
1172
|
+
t.cancelAnimationFrame(c), r = null, l = 0, c = 0;
|
|
1173
1173
|
}
|
|
1174
1174
|
function h() {
|
|
1175
|
-
r = null,
|
|
1175
|
+
r = null, l = 0;
|
|
1176
1176
|
}
|
|
1177
1177
|
return {
|
|
1178
1178
|
init: u,
|
|
1179
1179
|
destroy: y,
|
|
1180
|
-
start:
|
|
1181
|
-
stop:
|
|
1180
|
+
start: v,
|
|
1181
|
+
stop: m,
|
|
1182
1182
|
update: n,
|
|
1183
1183
|
render: o
|
|
1184
1184
|
};
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1187
|
-
const n = t === "rtl", o = e === "y", a = o ? "y" : "x", s = o ? "x" : "y", r = !o && n ? -1 : 1,
|
|
1186
|
+
function po(e, t) {
|
|
1187
|
+
const n = t === "rtl", o = e === "y", a = o ? "y" : "x", s = o ? "x" : "y", r = !o && n ? -1 : 1, l = y(), c = g();
|
|
1188
1188
|
function u(h) {
|
|
1189
1189
|
const {
|
|
1190
1190
|
height: b,
|
|
1191
|
-
width:
|
|
1191
|
+
width: x
|
|
1192
1192
|
} = h;
|
|
1193
|
-
return o ? b :
|
|
1193
|
+
return o ? b : x;
|
|
1194
1194
|
}
|
|
1195
1195
|
function y() {
|
|
1196
1196
|
return o ? "top" : n ? "right" : "left";
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function g() {
|
|
1199
1199
|
return o ? "bottom" : n ? "left" : "right";
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function v(h) {
|
|
1202
1202
|
return h * r;
|
|
1203
1203
|
}
|
|
1204
1204
|
return {
|
|
1205
1205
|
scroll: a,
|
|
1206
1206
|
cross: s,
|
|
1207
|
-
startEdge:
|
|
1208
|
-
endEdge:
|
|
1207
|
+
startEdge: l,
|
|
1208
|
+
endEdge: c,
|
|
1209
1209
|
measureSize: u,
|
|
1210
|
-
direction:
|
|
1210
|
+
direction: v
|
|
1211
1211
|
};
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
const n =
|
|
1213
|
+
function ge(e = 0, t = 0) {
|
|
1214
|
+
const n = W(e - t);
|
|
1215
1215
|
function o(u) {
|
|
1216
1216
|
return u < e;
|
|
1217
1217
|
}
|
|
@@ -1224,7 +1224,7 @@ function me(e = 0, t = 0) {
|
|
|
1224
1224
|
function r(u) {
|
|
1225
1225
|
return s(u) ? o(u) ? e : t : u;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function l(u) {
|
|
1228
1228
|
return n ? u - n * Math.ceil((u - t) / n) : u;
|
|
1229
1229
|
}
|
|
1230
1230
|
return {
|
|
@@ -1235,136 +1235,136 @@ function me(e = 0, t = 0) {
|
|
|
1235
1235
|
reachedAny: s,
|
|
1236
1236
|
reachedMax: a,
|
|
1237
1237
|
reachedMin: o,
|
|
1238
|
-
removeOffset:
|
|
1238
|
+
removeOffset: l
|
|
1239
1239
|
};
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1241
|
+
function Mt(e, t, n) {
|
|
1242
1242
|
const {
|
|
1243
1243
|
constrain: o
|
|
1244
|
-
} =
|
|
1244
|
+
} = ge(0, e), a = e + 1;
|
|
1245
1245
|
let s = r(t);
|
|
1246
|
-
function r(
|
|
1247
|
-
return n ?
|
|
1246
|
+
function r(v) {
|
|
1247
|
+
return n ? W((a + v) % a) : o(v);
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function l() {
|
|
1250
1250
|
return s;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1253
|
-
return s = r(
|
|
1252
|
+
function c(v) {
|
|
1253
|
+
return s = r(v), g;
|
|
1254
1254
|
}
|
|
1255
|
-
function u(
|
|
1256
|
-
return y().set(
|
|
1255
|
+
function u(v) {
|
|
1256
|
+
return y().set(l() + v);
|
|
1257
1257
|
}
|
|
1258
1258
|
function y() {
|
|
1259
|
-
return
|
|
1259
|
+
return Mt(e, l(), n);
|
|
1260
1260
|
}
|
|
1261
|
-
const
|
|
1262
|
-
get:
|
|
1263
|
-
set:
|
|
1261
|
+
const g = {
|
|
1262
|
+
get: l,
|
|
1263
|
+
set: c,
|
|
1264
1264
|
add: u,
|
|
1265
1265
|
clone: y
|
|
1266
1266
|
};
|
|
1267
|
-
return
|
|
1267
|
+
return g;
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function go(e, t, n, o, a, s, r, l, c, u, y, g, v, m, h, b, x, p, f) {
|
|
1270
1270
|
const {
|
|
1271
|
-
cross:
|
|
1272
|
-
direction:
|
|
1273
|
-
} = e,
|
|
1271
|
+
cross: C,
|
|
1272
|
+
direction: I
|
|
1273
|
+
} = e, P = ["INPUT", "SELECT", "TEXTAREA"], N = {
|
|
1274
1274
|
passive: !1
|
|
1275
|
-
},
|
|
1275
|
+
}, j = Ie(), T = Ie(), w = ge(50, 225).constrain(m.measure(20)), $ = {
|
|
1276
1276
|
mouse: 300,
|
|
1277
1277
|
touch: 400
|
|
1278
|
-
},
|
|
1278
|
+
}, O = {
|
|
1279
1279
|
mouse: 500,
|
|
1280
1280
|
touch: 600
|
|
1281
|
-
},
|
|
1282
|
-
let
|
|
1283
|
-
function
|
|
1284
|
-
if (!
|
|
1285
|
-
function
|
|
1286
|
-
(
|
|
1281
|
+
}, F = h ? 43 : 25;
|
|
1282
|
+
let R = !1, A = 0, L = 0, Q = !1, G = !1, K = !1, Z = !1;
|
|
1283
|
+
function te(_) {
|
|
1284
|
+
if (!f) return;
|
|
1285
|
+
function B(Y) {
|
|
1286
|
+
(Ae(f) || f(_, Y)) && z(Y);
|
|
1287
1287
|
}
|
|
1288
|
-
const
|
|
1289
|
-
|
|
1290
|
-
},
|
|
1291
|
-
}).add(
|
|
1288
|
+
const H = t;
|
|
1289
|
+
j.add(H, "dragstart", (Y) => Y.preventDefault(), N).add(H, "touchmove", () => {
|
|
1290
|
+
}, N).add(H, "touchend", () => {
|
|
1291
|
+
}).add(H, "touchstart", B).add(H, "mousedown", B).add(H, "touchcancel", q).add(H, "contextmenu", q).add(H, "click", ee, !0);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
|
|
1293
|
+
function d() {
|
|
1294
|
+
j.clear(), T.clear();
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1296
|
+
function E() {
|
|
1297
|
+
const _ = Z ? n : t;
|
|
1298
|
+
T.add(_, "touchmove", M, N).add(_, "touchend", q).add(_, "mousemove", M, N).add(_, "mouseup", q);
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
const
|
|
1302
|
-
return
|
|
1300
|
+
function k(_) {
|
|
1301
|
+
const B = _.nodeName || "";
|
|
1302
|
+
return P.includes(B);
|
|
1303
1303
|
}
|
|
1304
1304
|
function D() {
|
|
1305
|
-
return (h ?
|
|
1305
|
+
return (h ? O : $)[Z ? "mouse" : "touch"];
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const
|
|
1309
|
-
return h ||
|
|
1307
|
+
function U(_, B) {
|
|
1308
|
+
const H = g.add(Qe(_) * -1), Y = y.byDistance(_, !h).distance;
|
|
1309
|
+
return h || W(_) < w ? Y : x && B ? Y * 0.5 : y.byIndex(H.get(), 0).distance;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
const
|
|
1313
|
-
|
|
1311
|
+
function z(_) {
|
|
1312
|
+
const B = Ze(_, o);
|
|
1313
|
+
Z = B, K = h && B && !_.buttons && R, R = Ee(a.get(), r.get()) >= 2, !(B && _.button !== 0) && (k(_.target) || (Q = !0, s.pointerDown(_), u.useFriction(0).useDuration(0), a.set(r), E(), A = s.readPoint(_), L = s.readPoint(_, C), v.emit("pointerDown")));
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
if (!
|
|
1317
|
-
const
|
|
1318
|
-
if (!
|
|
1319
|
-
return
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1315
|
+
function M(_) {
|
|
1316
|
+
if (!Ze(_, o) && _.touches.length >= 2) return q(_);
|
|
1317
|
+
const H = s.readPoint(_), Y = s.readPoint(_, C), ae = Ee(H, A), ce = Ee(Y, L);
|
|
1318
|
+
if (!G && !Z && (!_.cancelable || (G = ae > ce, !G)))
|
|
1319
|
+
return q(_);
|
|
1320
|
+
const fe = s.pointerMove(_);
|
|
1321
|
+
ae > b && (K = !0), u.useFriction(0.3).useDuration(0.75), l.start(), a.add(I(fe)), _.preventDefault();
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1323
|
+
function q(_) {
|
|
1324
|
+
const H = y.byDistance(0, !1).index !== g.get(), Y = s.pointerUp(_) * D(), ae = U(I(Y), H), ce = lo(Y, ae), fe = F - 10 * ce, le = p + ce / 50;
|
|
1325
|
+
G = !1, Q = !1, T.clear(), u.useDuration(fe).useFriction(le), c.distance(ae, !h), Z = !1, v.emit("pointerUp");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
|
|
1327
|
+
function ee(_) {
|
|
1328
|
+
K && (_.stopPropagation(), _.preventDefault(), K = !1);
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1331
|
-
return
|
|
1330
|
+
function X() {
|
|
1331
|
+
return Q;
|
|
1332
1332
|
}
|
|
1333
1333
|
return {
|
|
1334
|
-
init:
|
|
1335
|
-
destroy:
|
|
1336
|
-
pointerDown:
|
|
1334
|
+
init: te,
|
|
1335
|
+
destroy: d,
|
|
1336
|
+
pointerDown: X
|
|
1337
1337
|
};
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function ho(e, t) {
|
|
1340
1340
|
let o, a;
|
|
1341
|
-
function s(
|
|
1342
|
-
return
|
|
1341
|
+
function s(g) {
|
|
1342
|
+
return g.timeStamp;
|
|
1343
1343
|
}
|
|
1344
|
-
function r(
|
|
1345
|
-
const h = `client${(
|
|
1346
|
-
return (
|
|
1344
|
+
function r(g, v) {
|
|
1345
|
+
const h = `client${(v || e.scroll) === "x" ? "X" : "Y"}`;
|
|
1346
|
+
return (Ze(g, t) ? g : g.touches[0])[h];
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return o =
|
|
1348
|
+
function l(g) {
|
|
1349
|
+
return o = g, a = g, r(g);
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1352
|
-
const
|
|
1353
|
-
return a =
|
|
1351
|
+
function c(g) {
|
|
1352
|
+
const v = r(g) - r(a), m = s(g) - s(o) > 170;
|
|
1353
|
+
return a = g, m && (o = g), v;
|
|
1354
1354
|
}
|
|
1355
|
-
function u(
|
|
1355
|
+
function u(g) {
|
|
1356
1356
|
if (!o || !a) return 0;
|
|
1357
|
-
const
|
|
1358
|
-
return
|
|
1357
|
+
const v = r(a) - r(o), m = s(g) - s(o), h = s(g) - s(a) > 170, b = v / m;
|
|
1358
|
+
return m && !h && W(b) > 0.1 ? b : 0;
|
|
1359
1359
|
}
|
|
1360
1360
|
return {
|
|
1361
|
-
pointerDown:
|
|
1362
|
-
pointerMove:
|
|
1361
|
+
pointerDown: l,
|
|
1362
|
+
pointerMove: c,
|
|
1363
1363
|
pointerUp: u,
|
|
1364
1364
|
readPoint: r
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function vo() {
|
|
1368
1368
|
function e(n) {
|
|
1369
1369
|
const {
|
|
1370
1370
|
offsetTop: o,
|
|
@@ -1385,7 +1385,7 @@ function ro() {
|
|
|
1385
1385
|
measure: e
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function bo(e) {
|
|
1389
1389
|
function t(o) {
|
|
1390
1390
|
return e * (o / 100);
|
|
1391
1391
|
}
|
|
@@ -1393,160 +1393,160 @@ function oo(e) {
|
|
|
1393
1393
|
measure: t
|
|
1394
1394
|
};
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
const
|
|
1398
|
-
let
|
|
1399
|
-
function
|
|
1400
|
-
return a.measureSize(r.measure(
|
|
1396
|
+
function xo(e, t, n, o, a, s, r) {
|
|
1397
|
+
const l = [e].concat(o);
|
|
1398
|
+
let c, u, y = [], g = !1;
|
|
1399
|
+
function v(x) {
|
|
1400
|
+
return a.measureSize(r.measure(x));
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function m(x) {
|
|
1403
1403
|
if (!s) return;
|
|
1404
|
-
u =
|
|
1405
|
-
function
|
|
1406
|
-
for (const
|
|
1407
|
-
if (
|
|
1408
|
-
const
|
|
1409
|
-
if (
|
|
1410
|
-
|
|
1404
|
+
u = v(e), y = o.map(v);
|
|
1405
|
+
function p(f) {
|
|
1406
|
+
for (const C of f) {
|
|
1407
|
+
if (g) return;
|
|
1408
|
+
const I = C.target === e, P = o.indexOf(C.target), N = I ? u : y[P], j = v(I ? e : o[P]);
|
|
1409
|
+
if (W(j - N) >= 0.5) {
|
|
1410
|
+
x.reInit(), t.emit("resize");
|
|
1411
1411
|
break;
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
|
-
|
|
1416
|
-
(
|
|
1415
|
+
c = new ResizeObserver((f) => {
|
|
1416
|
+
(Ae(s) || s(x, f)) && p(f);
|
|
1417
1417
|
}), n.requestAnimationFrame(() => {
|
|
1418
|
-
|
|
1418
|
+
l.forEach((f) => c.observe(f));
|
|
1419
1419
|
});
|
|
1420
1420
|
}
|
|
1421
1421
|
function h() {
|
|
1422
|
-
|
|
1422
|
+
g = !0, c && c.disconnect();
|
|
1423
1423
|
}
|
|
1424
1424
|
return {
|
|
1425
|
-
init:
|
|
1425
|
+
init: m,
|
|
1426
1426
|
destroy: h
|
|
1427
1427
|
};
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1430
|
-
let r = 0,
|
|
1431
|
-
function
|
|
1432
|
-
const
|
|
1433
|
-
let
|
|
1434
|
-
return
|
|
1429
|
+
function yo(e, t, n, o, a, s) {
|
|
1430
|
+
let r = 0, l = 0, c = a, u = s, y = e.get(), g = 0;
|
|
1431
|
+
function v() {
|
|
1432
|
+
const N = o.get() - e.get(), j = !c;
|
|
1433
|
+
let T = 0;
|
|
1434
|
+
return j ? (r = 0, n.set(o), e.set(o), T = N) : (n.set(e), r += N / c, r *= u, y += r, e.add(r), T = y - g), l = Qe(T), g = y, P;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1436
|
+
function m() {
|
|
1437
|
+
const N = o.get() - t.get();
|
|
1438
|
+
return W(N) < 1e-3;
|
|
1439
1439
|
}
|
|
1440
1440
|
function h() {
|
|
1441
|
-
return
|
|
1441
|
+
return c;
|
|
1442
1442
|
}
|
|
1443
1443
|
function b() {
|
|
1444
|
-
return
|
|
1444
|
+
return l;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function x() {
|
|
1447
1447
|
return r;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1449
|
+
function p() {
|
|
1450
|
+
return C(a);
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1453
|
-
return
|
|
1452
|
+
function f() {
|
|
1453
|
+
return I(s);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1455
|
+
function C(N) {
|
|
1456
|
+
return c = N, P;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
return u =
|
|
1458
|
+
function I(N) {
|
|
1459
|
+
return u = N, P;
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1461
|
+
const P = {
|
|
1462
1462
|
direction: b,
|
|
1463
1463
|
duration: h,
|
|
1464
|
-
velocity:
|
|
1465
|
-
seek:
|
|
1466
|
-
settled:
|
|
1467
|
-
useBaseFriction:
|
|
1468
|
-
useBaseDuration:
|
|
1469
|
-
useFriction:
|
|
1470
|
-
useDuration:
|
|
1464
|
+
velocity: x,
|
|
1465
|
+
seek: v,
|
|
1466
|
+
settled: m,
|
|
1467
|
+
useBaseFriction: f,
|
|
1468
|
+
useBaseDuration: p,
|
|
1469
|
+
useFriction: I,
|
|
1470
|
+
useDuration: C
|
|
1471
1471
|
};
|
|
1472
|
-
return
|
|
1472
|
+
return P;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
const s = a.measure(10), r = a.measure(50),
|
|
1476
|
-
let
|
|
1474
|
+
function Co(e, t, n, o, a) {
|
|
1475
|
+
const s = a.measure(10), r = a.measure(50), l = ge(0.1, 0.99);
|
|
1476
|
+
let c = !1;
|
|
1477
1477
|
function u() {
|
|
1478
|
-
return !(
|
|
1478
|
+
return !(c || !e.reachedAny(n.get()) || !e.reachedAny(t.get()));
|
|
1479
1479
|
}
|
|
1480
|
-
function y(
|
|
1480
|
+
function y(m) {
|
|
1481
1481
|
if (!u()) return;
|
|
1482
|
-
const h = e.reachedMin(t.get()) ? "min" : "max", b =
|
|
1483
|
-
n.subtract(
|
|
1482
|
+
const h = e.reachedMin(t.get()) ? "min" : "max", b = W(e[h] - t.get()), x = n.get() - t.get(), p = l.constrain(b / r);
|
|
1483
|
+
n.subtract(x * p), !m && W(x) < s && (n.set(e.constrain(n.get())), o.useDuration(25).useBaseFriction());
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1486
|
-
|
|
1485
|
+
function g(m) {
|
|
1486
|
+
c = !m;
|
|
1487
1487
|
}
|
|
1488
1488
|
return {
|
|
1489
1489
|
shouldConstrain: u,
|
|
1490
1490
|
constrain: y,
|
|
1491
|
-
toggleActive:
|
|
1491
|
+
toggleActive: g
|
|
1492
1492
|
};
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1495
|
-
const s =
|
|
1494
|
+
function _o(e, t, n, o, a) {
|
|
1495
|
+
const s = ge(-t + e, 0), r = g(), l = y(), c = v();
|
|
1496
1496
|
function u(h, b) {
|
|
1497
|
-
return
|
|
1497
|
+
return Ee(h, b) <= 1;
|
|
1498
1498
|
}
|
|
1499
1499
|
function y() {
|
|
1500
|
-
const h = r[0], b =
|
|
1501
|
-
return
|
|
1500
|
+
const h = r[0], b = se(r), x = r.lastIndexOf(h), p = r.indexOf(b) + 1;
|
|
1501
|
+
return ge(x, p);
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function g() {
|
|
1504
1504
|
return n.map((h, b) => {
|
|
1505
1505
|
const {
|
|
1506
|
-
min:
|
|
1507
|
-
max:
|
|
1508
|
-
} = s,
|
|
1509
|
-
return
|
|
1506
|
+
min: x,
|
|
1507
|
+
max: p
|
|
1508
|
+
} = s, f = s.constrain(h), C = !b, I = et(n, b);
|
|
1509
|
+
return C ? p : I || u(x, f) ? x : u(p, f) ? p : f;
|
|
1510
1510
|
}).map((h) => parseFloat(h.toFixed(3)));
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function v() {
|
|
1513
1513
|
if (t <= e + a) return [s.max];
|
|
1514
1514
|
if (o === "keepSnaps") return r;
|
|
1515
1515
|
const {
|
|
1516
1516
|
min: h,
|
|
1517
1517
|
max: b
|
|
1518
|
-
} =
|
|
1518
|
+
} = l;
|
|
1519
1519
|
return r.slice(h, b);
|
|
1520
1520
|
}
|
|
1521
1521
|
return {
|
|
1522
|
-
snapsContained:
|
|
1523
|
-
scrollContainLimit:
|
|
1522
|
+
snapsContained: c,
|
|
1523
|
+
scrollContainLimit: l
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const o = t[0], a = n ? o - e :
|
|
1526
|
+
function ko(e, t, n) {
|
|
1527
|
+
const o = t[0], a = n ? o - e : se(t);
|
|
1528
1528
|
return {
|
|
1529
|
-
limit:
|
|
1529
|
+
limit: ge(a, o)
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function jo(e, t, n, o) {
|
|
1533
1533
|
const s = t.min + 0.1, r = t.max + 0.1, {
|
|
1534
|
-
reachedMin:
|
|
1535
|
-
reachedMax:
|
|
1536
|
-
} =
|
|
1537
|
-
function u(
|
|
1538
|
-
return
|
|
1534
|
+
reachedMin: l,
|
|
1535
|
+
reachedMax: c
|
|
1536
|
+
} = ge(s, r);
|
|
1537
|
+
function u(v) {
|
|
1538
|
+
return v === 1 ? c(n.get()) : v === -1 ? l(n.get()) : !1;
|
|
1539
1539
|
}
|
|
1540
|
-
function y(
|
|
1541
|
-
if (!u(
|
|
1542
|
-
const
|
|
1543
|
-
o.forEach((h) => h.add(
|
|
1540
|
+
function y(v) {
|
|
1541
|
+
if (!u(v)) return;
|
|
1542
|
+
const m = e * (v * -1);
|
|
1543
|
+
o.forEach((h) => h.add(m));
|
|
1544
1544
|
}
|
|
1545
1545
|
return {
|
|
1546
1546
|
loop: y
|
|
1547
1547
|
};
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function So(e) {
|
|
1550
1550
|
const {
|
|
1551
1551
|
max: t,
|
|
1552
1552
|
length: n
|
|
@@ -1559,45 +1559,45 @@ function fo(e) {
|
|
|
1559
1559
|
get: o
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Lo(e, t, n, o, a) {
|
|
1563
1563
|
const {
|
|
1564
1564
|
startEdge: s,
|
|
1565
1565
|
endEdge: r
|
|
1566
1566
|
} = e, {
|
|
1567
|
-
groupSlides:
|
|
1568
|
-
} = a,
|
|
1569
|
-
function p() {
|
|
1570
|
-
return c(o).map((b) => ne(b)[r] - b[0][s]).map(z);
|
|
1571
|
-
}
|
|
1567
|
+
groupSlides: l
|
|
1568
|
+
} = a, c = g().map(t.measure), u = v(), y = m();
|
|
1572
1569
|
function g() {
|
|
1573
|
-
return o.map((b) =>
|
|
1570
|
+
return l(o).map((b) => se(b)[r] - b[0][s]).map(W);
|
|
1574
1571
|
}
|
|
1575
|
-
function
|
|
1576
|
-
return
|
|
1572
|
+
function v() {
|
|
1573
|
+
return o.map((b) => n[s] - b[s]).map((b) => -W(b));
|
|
1574
|
+
}
|
|
1575
|
+
function m() {
|
|
1576
|
+
return l(u).map((b) => b[0]).map((b, x) => b + c[x]);
|
|
1577
1577
|
}
|
|
1578
1578
|
return {
|
|
1579
1579
|
snaps: u,
|
|
1580
1580
|
snapsAligned: y
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function To(e, t, n, o, a, s) {
|
|
1584
1584
|
const {
|
|
1585
1585
|
groupSlides: r
|
|
1586
1586
|
} = a, {
|
|
1587
|
-
min:
|
|
1588
|
-
max:
|
|
1587
|
+
min: l,
|
|
1588
|
+
max: c
|
|
1589
1589
|
} = o, u = y();
|
|
1590
1590
|
function y() {
|
|
1591
|
-
const
|
|
1592
|
-
return n.length === 1 ? [s] :
|
|
1593
|
-
const
|
|
1594
|
-
if (
|
|
1595
|
-
const
|
|
1596
|
-
return
|
|
1591
|
+
const v = r(s), m = !e || t === "keepSnaps";
|
|
1592
|
+
return n.length === 1 ? [s] : m ? v : v.slice(l, c).map((h, b, x) => {
|
|
1593
|
+
const p = !b, f = et(x, b);
|
|
1594
|
+
if (p) {
|
|
1595
|
+
const C = se(x[0]) + 1;
|
|
1596
|
+
return jt(C);
|
|
1597
1597
|
}
|
|
1598
|
-
if (
|
|
1599
|
-
const
|
|
1600
|
-
return
|
|
1598
|
+
if (f) {
|
|
1599
|
+
const C = Pe(s) - se(x)[0] + 1;
|
|
1600
|
+
return jt(C, se(x)[0]);
|
|
1601
1601
|
}
|
|
1602
1602
|
return h;
|
|
1603
1603
|
});
|
|
@@ -1606,123 +1606,123 @@ function po(e, t, n, o, a, s) {
|
|
|
1606
1606
|
slideRegistry: u
|
|
1607
1607
|
};
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function Eo(e, t, n, o, a) {
|
|
1610
1610
|
const {
|
|
1611
1611
|
reachedAny: s,
|
|
1612
1612
|
removeOffset: r,
|
|
1613
|
-
constrain:
|
|
1613
|
+
constrain: l
|
|
1614
1614
|
} = o;
|
|
1615
|
-
function
|
|
1616
|
-
return h.concat().sort((b,
|
|
1615
|
+
function c(h) {
|
|
1616
|
+
return h.concat().sort((b, x) => W(b) - W(x))[0];
|
|
1617
1617
|
}
|
|
1618
1618
|
function u(h) {
|
|
1619
|
-
const b = e ? r(h) :
|
|
1620
|
-
diff: y(
|
|
1621
|
-
index:
|
|
1622
|
-
})).sort((
|
|
1623
|
-
index:
|
|
1624
|
-
} =
|
|
1619
|
+
const b = e ? r(h) : l(h), x = t.map((f, C) => ({
|
|
1620
|
+
diff: y(f - b, 0),
|
|
1621
|
+
index: C
|
|
1622
|
+
})).sort((f, C) => W(f.diff) - W(C.diff)), {
|
|
1623
|
+
index: p
|
|
1624
|
+
} = x[0];
|
|
1625
1625
|
return {
|
|
1626
|
-
index:
|
|
1626
|
+
index: p,
|
|
1627
1627
|
distance: b
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
1630
|
function y(h, b) {
|
|
1631
|
-
const
|
|
1631
|
+
const x = [h, h + n, h - n];
|
|
1632
1632
|
if (!e) return h;
|
|
1633
|
-
if (!b) return
|
|
1634
|
-
const
|
|
1635
|
-
return
|
|
1633
|
+
if (!b) return c(x);
|
|
1634
|
+
const p = x.filter((f) => Qe(f) === b);
|
|
1635
|
+
return p.length ? c(p) : se(x) - n;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1638
|
-
const
|
|
1637
|
+
function g(h, b) {
|
|
1638
|
+
const x = t[h] - a.get(), p = y(x, b);
|
|
1639
1639
|
return {
|
|
1640
1640
|
index: h,
|
|
1641
|
-
distance:
|
|
1641
|
+
distance: p
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1645
|
-
const
|
|
1646
|
-
index:
|
|
1647
|
-
distance:
|
|
1648
|
-
} = u(
|
|
1649
|
-
if (!b ||
|
|
1650
|
-
index:
|
|
1644
|
+
function v(h, b) {
|
|
1645
|
+
const x = a.get() + h, {
|
|
1646
|
+
index: p,
|
|
1647
|
+
distance: f
|
|
1648
|
+
} = u(x), C = !e && s(x);
|
|
1649
|
+
if (!b || C) return {
|
|
1650
|
+
index: p,
|
|
1651
1651
|
distance: h
|
|
1652
1652
|
};
|
|
1653
|
-
const
|
|
1653
|
+
const I = t[p] - f, P = h + y(I, 0);
|
|
1654
1654
|
return {
|
|
1655
|
-
index:
|
|
1656
|
-
distance:
|
|
1655
|
+
index: p,
|
|
1656
|
+
distance: P
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
1659
|
return {
|
|
1660
|
-
byDistance:
|
|
1661
|
-
byIndex:
|
|
1660
|
+
byDistance: v,
|
|
1661
|
+
byIndex: g,
|
|
1662
1662
|
shortcut: y
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1666
|
-
function
|
|
1667
|
-
const
|
|
1668
|
-
s.add(
|
|
1665
|
+
function No(e, t, n, o, a, s, r) {
|
|
1666
|
+
function l(g) {
|
|
1667
|
+
const v = g.distance, m = g.index !== t.get();
|
|
1668
|
+
s.add(v), v && (o.duration() ? e.start() : (e.update(), e.render(1), e.update())), m && (n.set(t.get()), t.set(g.index), r.emit("select"));
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1670
|
+
function c(g, v) {
|
|
1671
|
+
const m = a.byDistance(g, v);
|
|
1672
|
+
l(m);
|
|
1673
1673
|
}
|
|
1674
|
-
function u(
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1674
|
+
function u(g, v) {
|
|
1675
|
+
const m = t.clone().set(g), h = a.byIndex(m.get(), v);
|
|
1676
|
+
l(h);
|
|
1677
1677
|
}
|
|
1678
1678
|
return {
|
|
1679
|
-
distance:
|
|
1679
|
+
distance: c,
|
|
1680
1680
|
index: u
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
const
|
|
1683
|
+
function wo(e, t, n, o, a, s, r, l) {
|
|
1684
|
+
const c = {
|
|
1685
1685
|
passive: !0,
|
|
1686
1686
|
capture: !0
|
|
1687
1687
|
};
|
|
1688
1688
|
let u = 0;
|
|
1689
|
-
function y(
|
|
1690
|
-
if (!
|
|
1689
|
+
function y(m) {
|
|
1690
|
+
if (!l) return;
|
|
1691
1691
|
function h(b) {
|
|
1692
1692
|
if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
|
|
1693
1693
|
r.emit("slideFocusStart"), e.scrollLeft = 0;
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1694
|
+
const f = n.findIndex((C) => C.includes(b));
|
|
1695
|
+
Je(f) && (a.useDuration(0), o.index(f, 0), r.emit("slideFocus"));
|
|
1696
1696
|
}
|
|
1697
|
-
s.add(document, "keydown",
|
|
1698
|
-
s.add(b, "focus", (
|
|
1699
|
-
(
|
|
1700
|
-
},
|
|
1697
|
+
s.add(document, "keydown", g, !1), t.forEach((b, x) => {
|
|
1698
|
+
s.add(b, "focus", (p) => {
|
|
1699
|
+
(Ae(l) || l(m, p)) && h(x);
|
|
1700
|
+
}, c);
|
|
1701
1701
|
});
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
|
|
1703
|
+
function g(m) {
|
|
1704
|
+
m.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
|
|
1705
1705
|
}
|
|
1706
1706
|
return {
|
|
1707
1707
|
init: y
|
|
1708
1708
|
};
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function Te(e) {
|
|
1711
1711
|
let t = e;
|
|
1712
1712
|
function n() {
|
|
1713
1713
|
return t;
|
|
1714
1714
|
}
|
|
1715
|
-
function o(
|
|
1716
|
-
t = r(
|
|
1715
|
+
function o(c) {
|
|
1716
|
+
t = r(c);
|
|
1717
1717
|
}
|
|
1718
|
-
function a(
|
|
1719
|
-
t += r(
|
|
1718
|
+
function a(c) {
|
|
1719
|
+
t += r(c);
|
|
1720
1720
|
}
|
|
1721
|
-
function s(
|
|
1722
|
-
t -= r(
|
|
1721
|
+
function s(c) {
|
|
1722
|
+
t -= r(c);
|
|
1723
1723
|
}
|
|
1724
|
-
function r(
|
|
1725
|
-
return
|
|
1724
|
+
function r(c) {
|
|
1725
|
+
return Je(c) ? c : c.get();
|
|
1726
1726
|
}
|
|
1727
1727
|
return {
|
|
1728
1728
|
get: n,
|
|
@@ -1731,108 +1731,108 @@ function Ee(e) {
|
|
|
1731
1731
|
subtract: s
|
|
1732
1732
|
};
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const n = e.scroll === "x" ? r :
|
|
1734
|
+
function Ot(e, t) {
|
|
1735
|
+
const n = e.scroll === "x" ? r : l, o = t.style;
|
|
1736
1736
|
let a = null, s = !1;
|
|
1737
|
-
function r(
|
|
1738
|
-
return `translate3d(${
|
|
1737
|
+
function r(v) {
|
|
1738
|
+
return `translate3d(${v}px,0px,0px)`;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return `translate3d(0px,${
|
|
1740
|
+
function l(v) {
|
|
1741
|
+
return `translate3d(0px,${v}px,0px)`;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function c(v) {
|
|
1744
1744
|
if (s) return;
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1745
|
+
const m = uo(e.direction(v));
|
|
1746
|
+
m !== a && (o.transform = n(m), a = m);
|
|
1747
1747
|
}
|
|
1748
|
-
function u(
|
|
1749
|
-
s = !
|
|
1748
|
+
function u(v) {
|
|
1749
|
+
s = !v;
|
|
1750
1750
|
}
|
|
1751
1751
|
function y() {
|
|
1752
1752
|
s || (o.transform = "", t.getAttribute("style") || t.removeAttribute("style"));
|
|
1753
1753
|
}
|
|
1754
1754
|
return {
|
|
1755
1755
|
clear: y,
|
|
1756
|
-
to:
|
|
1756
|
+
to: c,
|
|
1757
1757
|
toggleActive: u
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1761
|
-
const y =
|
|
1762
|
-
function
|
|
1763
|
-
return
|
|
1760
|
+
function Io(e, t, n, o, a, s, r, l, c) {
|
|
1761
|
+
const y = Ne(a), g = Ne(a).reverse(), v = p().concat(f());
|
|
1762
|
+
function m(j, T) {
|
|
1763
|
+
return j.reduce((w, $) => w - a[$], T);
|
|
1764
1764
|
}
|
|
1765
|
-
function h(
|
|
1766
|
-
return
|
|
1765
|
+
function h(j, T) {
|
|
1766
|
+
return j.reduce((w, $) => m(w, T) > 0 ? w.concat([$]) : w, []);
|
|
1767
1767
|
}
|
|
1768
|
-
function b(
|
|
1769
|
-
return s.map((
|
|
1770
|
-
start:
|
|
1771
|
-
end:
|
|
1768
|
+
function b(j) {
|
|
1769
|
+
return s.map((T, w) => ({
|
|
1770
|
+
start: T - o[w] + 0.5 + j,
|
|
1771
|
+
end: T + t - 0.5 + j
|
|
1772
1772
|
}));
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const
|
|
1776
|
-
return
|
|
1777
|
-
const
|
|
1774
|
+
function x(j, T, w) {
|
|
1775
|
+
const $ = b(T);
|
|
1776
|
+
return j.map((O) => {
|
|
1777
|
+
const F = w ? 0 : -n, R = w ? n : 0, A = w ? "end" : "start", L = $[O][A];
|
|
1778
1778
|
return {
|
|
1779
|
-
index:
|
|
1780
|
-
loopPoint:
|
|
1781
|
-
slideLocation:
|
|
1782
|
-
translate:
|
|
1783
|
-
target: () =>
|
|
1779
|
+
index: O,
|
|
1780
|
+
loopPoint: L,
|
|
1781
|
+
slideLocation: Te(-1),
|
|
1782
|
+
translate: Ot(e, c[O]),
|
|
1783
|
+
target: () => l.get() > L ? F : R
|
|
1784
1784
|
};
|
|
1785
1785
|
});
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1788
|
-
const
|
|
1789
|
-
return
|
|
1787
|
+
function p() {
|
|
1788
|
+
const j = r[0], T = h(g, j);
|
|
1789
|
+
return x(T, n, !1);
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1792
|
-
const
|
|
1793
|
-
return
|
|
1791
|
+
function f() {
|
|
1792
|
+
const j = t - r[0] - 1, T = h(y, j);
|
|
1793
|
+
return x(T, -n, !0);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
1797
|
-
index:
|
|
1795
|
+
function C() {
|
|
1796
|
+
return v.every(({
|
|
1797
|
+
index: j
|
|
1798
1798
|
}) => {
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1799
|
+
const T = y.filter((w) => w !== j);
|
|
1800
|
+
return m(T, t) <= 0.1;
|
|
1801
1801
|
});
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1804
|
-
|
|
1803
|
+
function I() {
|
|
1804
|
+
v.forEach((j) => {
|
|
1805
1805
|
const {
|
|
1806
|
-
target:
|
|
1807
|
-
translate:
|
|
1808
|
-
slideLocation:
|
|
1809
|
-
} =
|
|
1810
|
-
|
|
1806
|
+
target: T,
|
|
1807
|
+
translate: w,
|
|
1808
|
+
slideLocation: $
|
|
1809
|
+
} = j, O = T();
|
|
1810
|
+
O !== $.get() && (w.to(O), $.set(O));
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1814
|
-
|
|
1813
|
+
function P() {
|
|
1814
|
+
v.forEach((j) => j.translate.clear());
|
|
1815
1815
|
}
|
|
1816
1816
|
return {
|
|
1817
|
-
canLoop:
|
|
1818
|
-
clear:
|
|
1819
|
-
loop:
|
|
1820
|
-
loopPoints:
|
|
1817
|
+
canLoop: C,
|
|
1818
|
+
clear: P,
|
|
1819
|
+
loop: I,
|
|
1820
|
+
loopPoints: v
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function Po(e, t, n) {
|
|
1824
1824
|
let o, a = !1;
|
|
1825
|
-
function s(
|
|
1825
|
+
function s(c) {
|
|
1826
1826
|
if (!n) return;
|
|
1827
1827
|
function u(y) {
|
|
1828
|
-
for (const
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1828
|
+
for (const g of y)
|
|
1829
|
+
if (g.type === "childList") {
|
|
1830
|
+
c.reInit(), t.emit("slidesChanged");
|
|
1831
1831
|
break;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
o = new MutationObserver((y) => {
|
|
1835
|
-
a || (
|
|
1835
|
+
a || (Ae(n) || n(c, y)) && u(y);
|
|
1836
1836
|
}), o.observe(e, {
|
|
1837
1837
|
childList: !0
|
|
1838
1838
|
});
|
|
@@ -1845,199 +1845,199 @@ function yo(e, t, n) {
|
|
|
1845
1845
|
destroy: r
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function Do(e, t, n, o) {
|
|
1849
1849
|
const a = {};
|
|
1850
|
-
let s = null, r = null,
|
|
1850
|
+
let s = null, r = null, l, c = !1;
|
|
1851
1851
|
function u() {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
const
|
|
1855
|
-
a[
|
|
1852
|
+
l = new IntersectionObserver((h) => {
|
|
1853
|
+
c || (h.forEach((b) => {
|
|
1854
|
+
const x = t.indexOf(b.target);
|
|
1855
|
+
a[x] = b;
|
|
1856
1856
|
}), s = null, r = null, n.emit("slidesInView"));
|
|
1857
1857
|
}, {
|
|
1858
1858
|
root: e.parentElement,
|
|
1859
1859
|
threshold: o
|
|
1860
|
-
}), t.forEach((h) =>
|
|
1860
|
+
}), t.forEach((h) => l.observe(h));
|
|
1861
1861
|
}
|
|
1862
1862
|
function y() {
|
|
1863
|
-
|
|
1864
|
-
}
|
|
1865
|
-
function
|
|
1866
|
-
return
|
|
1867
|
-
const
|
|
1868
|
-
isIntersecting:
|
|
1869
|
-
} = a[
|
|
1870
|
-
return (h &&
|
|
1863
|
+
l && l.disconnect(), c = !0;
|
|
1864
|
+
}
|
|
1865
|
+
function g(h) {
|
|
1866
|
+
return we(a).reduce((b, x) => {
|
|
1867
|
+
const p = parseInt(x), {
|
|
1868
|
+
isIntersecting: f
|
|
1869
|
+
} = a[p];
|
|
1870
|
+
return (h && f || !h && !f) && b.push(p), b;
|
|
1871
1871
|
}, []);
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function v(h = !0) {
|
|
1874
1874
|
if (h && s) return s;
|
|
1875
1875
|
if (!h && r) return r;
|
|
1876
|
-
const b =
|
|
1876
|
+
const b = g(h);
|
|
1877
1877
|
return h && (s = b), h || (r = b), b;
|
|
1878
1878
|
}
|
|
1879
1879
|
return {
|
|
1880
1880
|
init: u,
|
|
1881
1881
|
destroy: y,
|
|
1882
|
-
get:
|
|
1882
|
+
get: v
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Mo(e, t, n, o, a, s) {
|
|
1886
1886
|
const {
|
|
1887
1887
|
measureSize: r,
|
|
1888
|
-
startEdge:
|
|
1889
|
-
endEdge:
|
|
1890
|
-
} = e, u = n[0] && a, y = h(),
|
|
1888
|
+
startEdge: l,
|
|
1889
|
+
endEdge: c
|
|
1890
|
+
} = e, u = n[0] && a, y = h(), g = b(), v = n.map(r), m = x();
|
|
1891
1891
|
function h() {
|
|
1892
1892
|
if (!u) return 0;
|
|
1893
|
-
const
|
|
1894
|
-
return
|
|
1893
|
+
const f = n[0];
|
|
1894
|
+
return W(t[l] - f[l]);
|
|
1895
1895
|
}
|
|
1896
1896
|
function b() {
|
|
1897
1897
|
if (!u) return 0;
|
|
1898
|
-
const
|
|
1899
|
-
return parseFloat(
|
|
1898
|
+
const f = s.getComputedStyle(se(o));
|
|
1899
|
+
return parseFloat(f.getPropertyValue(`margin-${c}`));
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1902
|
-
return n.map((
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1905
|
-
}).map(
|
|
1901
|
+
function x() {
|
|
1902
|
+
return n.map((f, C, I) => {
|
|
1903
|
+
const P = !C, N = et(I, C);
|
|
1904
|
+
return P ? v[C] + y : N ? v[C] + g : I[C + 1][l] - f[l];
|
|
1905
|
+
}).map(W);
|
|
1906
1906
|
}
|
|
1907
1907
|
return {
|
|
1908
|
-
slideSizes:
|
|
1909
|
-
slideSizesWithGaps:
|
|
1908
|
+
slideSizes: v,
|
|
1909
|
+
slideSizesWithGaps: m,
|
|
1910
1910
|
startGap: y,
|
|
1911
|
-
endGap:
|
|
1911
|
+
endGap: g
|
|
1912
1912
|
};
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Oo(e, t, n, o, a, s, r, l, c) {
|
|
1915
1915
|
const {
|
|
1916
1916
|
startEdge: u,
|
|
1917
1917
|
endEdge: y,
|
|
1918
|
-
direction:
|
|
1919
|
-
} = e,
|
|
1920
|
-
function
|
|
1921
|
-
return
|
|
1922
|
-
}
|
|
1923
|
-
function h(
|
|
1924
|
-
return
|
|
1925
|
-
const
|
|
1926
|
-
return
|
|
1927
|
-
}, []).map((
|
|
1928
|
-
const
|
|
1929
|
-
return
|
|
1918
|
+
direction: g
|
|
1919
|
+
} = e, v = Je(n);
|
|
1920
|
+
function m(p, f) {
|
|
1921
|
+
return Ne(p).filter((C) => C % f === 0).map((C) => p.slice(C, C + f));
|
|
1922
|
+
}
|
|
1923
|
+
function h(p) {
|
|
1924
|
+
return p.length ? Ne(p).reduce((f, C, I) => {
|
|
1925
|
+
const P = se(f) || 0, N = P === 0, j = C === Pe(p), T = a[u] - s[P][u], w = a[u] - s[C][y], $ = !o && N ? g(r) : 0, O = !o && j ? g(l) : 0, F = W(w - O - (T + $));
|
|
1926
|
+
return I && F > t + c && f.push(C), j && f.push(p.length), f;
|
|
1927
|
+
}, []).map((f, C, I) => {
|
|
1928
|
+
const P = Math.max(I[C - 1] || 0);
|
|
1929
|
+
return p.slice(P, f);
|
|
1930
1930
|
}) : [];
|
|
1931
1931
|
}
|
|
1932
|
-
function b(
|
|
1933
|
-
return
|
|
1932
|
+
function b(p) {
|
|
1933
|
+
return v ? m(p, n) : h(p);
|
|
1934
1934
|
}
|
|
1935
1935
|
return {
|
|
1936
1936
|
groupSlides: b
|
|
1937
1937
|
};
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function Ro(e, t, n, o, a, s, r) {
|
|
1940
1940
|
const {
|
|
1941
|
-
align:
|
|
1942
|
-
axis:
|
|
1941
|
+
align: l,
|
|
1942
|
+
axis: c,
|
|
1943
1943
|
direction: u,
|
|
1944
1944
|
startIndex: y,
|
|
1945
|
-
loop:
|
|
1946
|
-
duration:
|
|
1947
|
-
dragFree:
|
|
1945
|
+
loop: g,
|
|
1946
|
+
duration: v,
|
|
1947
|
+
dragFree: m,
|
|
1948
1948
|
dragThreshold: h,
|
|
1949
1949
|
inViewThreshold: b,
|
|
1950
|
-
slidesToScroll:
|
|
1951
|
-
skipSnaps:
|
|
1952
|
-
containScroll:
|
|
1953
|
-
watchResize:
|
|
1954
|
-
watchSlides:
|
|
1955
|
-
watchDrag:
|
|
1956
|
-
watchFocus:
|
|
1957
|
-
} = s,
|
|
1958
|
-
slideSizes:
|
|
1959
|
-
slideSizesWithGaps:
|
|
1960
|
-
startGap:
|
|
1961
|
-
endGap:
|
|
1962
|
-
} =
|
|
1963
|
-
snaps:
|
|
1964
|
-
snapsAligned:
|
|
1965
|
-
} =
|
|
1966
|
-
snapsContained:
|
|
1967
|
-
scrollContainLimit:
|
|
1968
|
-
} =
|
|
1969
|
-
limit:
|
|
1970
|
-
} =
|
|
1971
|
-
dragHandler:
|
|
1972
|
-
scrollBody:
|
|
1973
|
-
scrollBounds:
|
|
1950
|
+
slidesToScroll: x,
|
|
1951
|
+
skipSnaps: p,
|
|
1952
|
+
containScroll: f,
|
|
1953
|
+
watchResize: C,
|
|
1954
|
+
watchSlides: I,
|
|
1955
|
+
watchDrag: P,
|
|
1956
|
+
watchFocus: N
|
|
1957
|
+
} = s, j = 2, T = vo(), w = T.measure(t), $ = n.map(T.measure), O = po(c, u), F = O.measureSize(w), R = bo(F), A = fo(l, F), L = !g && !!f, Q = g || !!f, {
|
|
1958
|
+
slideSizes: G,
|
|
1959
|
+
slideSizesWithGaps: K,
|
|
1960
|
+
startGap: Z,
|
|
1961
|
+
endGap: te
|
|
1962
|
+
} = Mo(O, w, $, n, Q, a), d = Oo(O, F, x, g, w, $, Z, te, j), {
|
|
1963
|
+
snaps: E,
|
|
1964
|
+
snapsAligned: k
|
|
1965
|
+
} = Lo(O, A, w, $, d), D = -se(E) + se(K), {
|
|
1966
|
+
snapsContained: U,
|
|
1967
|
+
scrollContainLimit: z
|
|
1968
|
+
} = _o(F, D, k, f, j), M = L ? U : k, {
|
|
1969
|
+
limit: q
|
|
1970
|
+
} = ko(D, M, g), ee = Mt(Pe(M), y, g), X = ee.clone(), V = Ne(n), _ = ({
|
|
1971
|
+
dragHandler: he,
|
|
1972
|
+
scrollBody: qe,
|
|
1973
|
+
scrollBounds: Ve,
|
|
1974
1974
|
options: {
|
|
1975
|
-
loop:
|
|
1975
|
+
loop: De
|
|
1976
1976
|
}
|
|
1977
1977
|
}) => {
|
|
1978
|
-
|
|
1979
|
-
},
|
|
1980
|
-
scrollBody:
|
|
1981
|
-
translate:
|
|
1982
|
-
location:
|
|
1983
|
-
offsetLocation:
|
|
1984
|
-
previousLocation:
|
|
1985
|
-
scrollLooper:
|
|
1986
|
-
slideLooper:
|
|
1987
|
-
dragHandler:
|
|
1988
|
-
animation:
|
|
1989
|
-
eventHandler:
|
|
1990
|
-
scrollBounds:
|
|
1978
|
+
De || Ve.constrain(he.pointerDown()), qe.seek();
|
|
1979
|
+
}, B = ({
|
|
1980
|
+
scrollBody: he,
|
|
1981
|
+
translate: qe,
|
|
1982
|
+
location: Ve,
|
|
1983
|
+
offsetLocation: De,
|
|
1984
|
+
previousLocation: Bt,
|
|
1985
|
+
scrollLooper: $t,
|
|
1986
|
+
slideLooper: Ft,
|
|
1987
|
+
dragHandler: qt,
|
|
1988
|
+
animation: Vt,
|
|
1989
|
+
eventHandler: st,
|
|
1990
|
+
scrollBounds: Ht,
|
|
1991
1991
|
options: {
|
|
1992
|
-
loop:
|
|
1992
|
+
loop: at
|
|
1993
1993
|
}
|
|
1994
|
-
},
|
|
1995
|
-
const
|
|
1996
|
-
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
},
|
|
2000
|
-
slideRegistry:
|
|
2001
|
-
} =
|
|
1994
|
+
}, it) => {
|
|
1995
|
+
const ct = he.settled(), Wt = !Ht.shouldConstrain(), lt = at ? ct : ct && Wt, dt = lt && !qt.pointerDown();
|
|
1996
|
+
dt && Vt.stop();
|
|
1997
|
+
const zt = Ve.get() * it + Bt.get() * (1 - it);
|
|
1998
|
+
De.set(zt), at && ($t.loop(he.direction()), Ft.loop()), qe.to(De.get()), dt && st.emit("settle"), lt || st.emit("scroll");
|
|
1999
|
+
}, H = mo(o, a, () => _(Fe), (he) => B(Fe, he)), Y = 0.68, ae = M[ee.get()], ce = Te(ae), fe = Te(ae), le = Te(ae), me = Te(ae), Ce = yo(ce, le, fe, me, v, Y), Be = Eo(g, M, D, q, me), $e = No(H, ee, X, Ce, Be, me, r), nt = So(q), rt = Ie(), Rt = Do(t, n, r, b), {
|
|
2000
|
+
slideRegistry: ot
|
|
2001
|
+
} = To(L, f, M, z, d, V), At = wo(e, n, ot, $e, Ce, rt, r, N), Fe = {
|
|
2002
2002
|
ownerDocument: o,
|
|
2003
2003
|
ownerWindow: a,
|
|
2004
2004
|
eventHandler: r,
|
|
2005
|
-
containerRect:
|
|
2006
|
-
slideRects:
|
|
2007
|
-
animation:
|
|
2008
|
-
axis:
|
|
2009
|
-
dragHandler:
|
|
2010
|
-
eventStore:
|
|
2011
|
-
percentOfView:
|
|
2012
|
-
index:
|
|
2013
|
-
indexPrevious:
|
|
2014
|
-
limit:
|
|
2015
|
-
location:
|
|
2016
|
-
offsetLocation:
|
|
2017
|
-
previousLocation:
|
|
2005
|
+
containerRect: w,
|
|
2006
|
+
slideRects: $,
|
|
2007
|
+
animation: H,
|
|
2008
|
+
axis: O,
|
|
2009
|
+
dragHandler: go(O, e, o, a, me, ho(O, a), ce, H, $e, Ce, Be, ee, r, R, m, h, p, Y, P),
|
|
2010
|
+
eventStore: rt,
|
|
2011
|
+
percentOfView: R,
|
|
2012
|
+
index: ee,
|
|
2013
|
+
indexPrevious: X,
|
|
2014
|
+
limit: q,
|
|
2015
|
+
location: ce,
|
|
2016
|
+
offsetLocation: le,
|
|
2017
|
+
previousLocation: fe,
|
|
2018
2018
|
options: s,
|
|
2019
|
-
resizeHandler:
|
|
2020
|
-
scrollBody:
|
|
2021
|
-
scrollBounds:
|
|
2022
|
-
scrollLooper:
|
|
2023
|
-
scrollProgress:
|
|
2024
|
-
scrollSnapList:
|
|
2025
|
-
scrollSnaps:
|
|
2026
|
-
scrollTarget:
|
|
2027
|
-
scrollTo:
|
|
2028
|
-
slideLooper:
|
|
2029
|
-
slideFocus:
|
|
2030
|
-
slidesHandler:
|
|
2031
|
-
slidesInView:
|
|
2019
|
+
resizeHandler: xo(t, r, a, n, O, C, T),
|
|
2020
|
+
scrollBody: Ce,
|
|
2021
|
+
scrollBounds: Co(q, le, me, Ce, R),
|
|
2022
|
+
scrollLooper: jo(D, q, le, [ce, le, fe, me]),
|
|
2023
|
+
scrollProgress: nt,
|
|
2024
|
+
scrollSnapList: M.map(nt.get),
|
|
2025
|
+
scrollSnaps: M,
|
|
2026
|
+
scrollTarget: Be,
|
|
2027
|
+
scrollTo: $e,
|
|
2028
|
+
slideLooper: Io(O, F, D, G, K, E, M, le, n),
|
|
2029
|
+
slideFocus: At,
|
|
2030
|
+
slidesHandler: Po(t, r, I),
|
|
2031
|
+
slidesInView: Rt,
|
|
2032
2032
|
slideIndexes: V,
|
|
2033
|
-
slideRegistry:
|
|
2034
|
-
slidesToScroll:
|
|
2035
|
-
target:
|
|
2036
|
-
translate:
|
|
2033
|
+
slideRegistry: ot,
|
|
2034
|
+
slidesToScroll: d,
|
|
2035
|
+
target: me,
|
|
2036
|
+
translate: Ot(O, t)
|
|
2037
2037
|
};
|
|
2038
|
-
return
|
|
2038
|
+
return Fe;
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2040
|
+
function Ao() {
|
|
2041
2041
|
let e = {}, t;
|
|
2042
2042
|
function n(u) {
|
|
2043
2043
|
t = u;
|
|
@@ -2046,27 +2046,27 @@ function Eo() {
|
|
|
2046
2046
|
return e[u] || [];
|
|
2047
2047
|
}
|
|
2048
2048
|
function a(u) {
|
|
2049
|
-
return o(u).forEach((y) => y(t, u)),
|
|
2049
|
+
return o(u).forEach((y) => y(t, u)), c;
|
|
2050
2050
|
}
|
|
2051
2051
|
function s(u, y) {
|
|
2052
|
-
return e[u] = o(u).concat([y]),
|
|
2052
|
+
return e[u] = o(u).concat([y]), c;
|
|
2053
2053
|
}
|
|
2054
2054
|
function r(u, y) {
|
|
2055
|
-
return e[u] = o(u).filter((
|
|
2055
|
+
return e[u] = o(u).filter((g) => g !== y), c;
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function l() {
|
|
2058
2058
|
e = {};
|
|
2059
2059
|
}
|
|
2060
|
-
const
|
|
2060
|
+
const c = {
|
|
2061
2061
|
init: n,
|
|
2062
2062
|
emit: a,
|
|
2063
2063
|
off: r,
|
|
2064
2064
|
on: s,
|
|
2065
|
-
clear:
|
|
2065
|
+
clear: l
|
|
2066
2066
|
};
|
|
2067
|
-
return
|
|
2067
|
+
return c;
|
|
2068
2068
|
}
|
|
2069
|
-
const
|
|
2069
|
+
const Bo = {
|
|
2070
2070
|
align: "center",
|
|
2071
2071
|
axis: "x",
|
|
2072
2072
|
container: null,
|
|
@@ -2088,16 +2088,16 @@ const Co = {
|
|
|
2088
2088
|
watchSlides: !0,
|
|
2089
2089
|
watchFocus: !0
|
|
2090
2090
|
};
|
|
2091
|
-
function
|
|
2091
|
+
function $o(e) {
|
|
2092
2092
|
function t(s, r) {
|
|
2093
|
-
return
|
|
2093
|
+
return Dt(s, r || {});
|
|
2094
2094
|
}
|
|
2095
2095
|
function n(s) {
|
|
2096
|
-
const r = s.breakpoints || {},
|
|
2097
|
-
return t(s,
|
|
2096
|
+
const r = s.breakpoints || {}, l = we(r).filter((c) => e.matchMedia(c).matches).map((c) => r[c]).reduce((c, u) => t(c, u), {});
|
|
2097
|
+
return t(s, l);
|
|
2098
2098
|
}
|
|
2099
2099
|
function o(s) {
|
|
2100
|
-
return s.map((r) =>
|
|
2100
|
+
return s.map((r) => we(r.breakpoints || {})).reduce((r, l) => r.concat(l), []).map(e.matchMedia);
|
|
2101
2101
|
}
|
|
2102
2102
|
return {
|
|
2103
2103
|
mergeOptions: t,
|
|
@@ -2105,13 +2105,13 @@ function wo(e) {
|
|
|
2105
2105
|
optionsMediaQueries: o
|
|
2106
2106
|
};
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function Fo(e) {
|
|
2109
2109
|
let t = [];
|
|
2110
2110
|
function n(s, r) {
|
|
2111
2111
|
return t = r.filter(({
|
|
2112
|
-
options:
|
|
2113
|
-
}) => e.optionsAtMedia(
|
|
2114
|
-
[
|
|
2112
|
+
options: l
|
|
2113
|
+
}) => e.optionsAtMedia(l).active !== !1), t.forEach((l) => l.init(s, e)), r.reduce((l, c) => Object.assign(l, {
|
|
2114
|
+
[c.name]: c
|
|
2115
2115
|
}), {});
|
|
2116
2116
|
}
|
|
2117
2117
|
function o() {
|
|
@@ -2122,163 +2122,163 @@ function Po(e) {
|
|
|
2122
2122
|
destroy: o
|
|
2123
2123
|
};
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
const o = e.ownerDocument, a = o.defaultView, s =
|
|
2125
|
+
function Re(e, t, n) {
|
|
2126
|
+
const o = e.ownerDocument, a = o.defaultView, s = $o(a), r = Fo(s), l = Ie(), c = Ao(), {
|
|
2127
2127
|
mergeOptions: u,
|
|
2128
2128
|
optionsAtMedia: y,
|
|
2129
|
-
optionsMediaQueries:
|
|
2129
|
+
optionsMediaQueries: g
|
|
2130
2130
|
} = s, {
|
|
2131
|
-
on:
|
|
2132
|
-
off:
|
|
2131
|
+
on: v,
|
|
2132
|
+
off: m,
|
|
2133
2133
|
emit: h
|
|
2134
|
-
} =
|
|
2135
|
-
let
|
|
2136
|
-
function
|
|
2134
|
+
} = c, b = O;
|
|
2135
|
+
let x = !1, p, f = u(Bo, Re.globalOptions), C = u(f), I = [], P, N, j;
|
|
2136
|
+
function T() {
|
|
2137
2137
|
const {
|
|
2138
2138
|
container: V,
|
|
2139
|
-
slides:
|
|
2140
|
-
} =
|
|
2141
|
-
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2144
|
-
}
|
|
2145
|
-
function
|
|
2146
|
-
const
|
|
2147
|
-
if (V.loop && !
|
|
2148
|
-
const
|
|
2139
|
+
slides: _
|
|
2140
|
+
} = C;
|
|
2141
|
+
N = (Ke(V) ? e.querySelector(V) : V) || e.children[0];
|
|
2142
|
+
const H = Ke(_) ? N.querySelectorAll(_) : _;
|
|
2143
|
+
j = [].slice.call(H || N.children);
|
|
2144
|
+
}
|
|
2145
|
+
function w(V) {
|
|
2146
|
+
const _ = Ro(e, N, j, o, a, V, c);
|
|
2147
|
+
if (V.loop && !_.slideLooper.canLoop()) {
|
|
2148
|
+
const B = Object.assign({}, V, {
|
|
2149
2149
|
loop: !1
|
|
2150
2150
|
});
|
|
2151
|
-
return
|
|
2151
|
+
return w(B);
|
|
2152
2152
|
}
|
|
2153
|
-
return
|
|
2153
|
+
return _;
|
|
2154
|
+
}
|
|
2155
|
+
function $(V, _) {
|
|
2156
|
+
x || (f = u(f, V), C = y(f), I = _ || I, T(), p = w(C), g([f, ...I.map(({
|
|
2157
|
+
options: B
|
|
2158
|
+
}) => B)]).forEach((B) => l.add(B, "change", O)), C.active && (p.translate.to(p.location.get()), p.animation.init(), p.slidesInView.init(), p.slideFocus.init(X), p.eventHandler.init(X), p.resizeHandler.init(X), p.slidesHandler.init(X), p.options.loop && p.slideLooper.loop(), N.offsetParent && j.length && p.dragHandler.init(X), P = r.init(X, I)));
|
|
2154
2159
|
}
|
|
2155
|
-
function
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2160
|
+
function O(V, _) {
|
|
2161
|
+
const B = d();
|
|
2162
|
+
F(), $(u({
|
|
2163
|
+
startIndex: B
|
|
2164
|
+
}, V), _), c.emit("reInit");
|
|
2159
2165
|
}
|
|
2160
|
-
function
|
|
2161
|
-
|
|
2162
|
-
R(), F(u({
|
|
2163
|
-
startIndex: I
|
|
2164
|
-
}, V), S), i.emit("reInit");
|
|
2166
|
+
function F() {
|
|
2167
|
+
p.dragHandler.destroy(), p.eventStore.clear(), p.translate.clear(), p.slideLooper.clear(), p.resizeHandler.destroy(), p.slidesHandler.destroy(), p.slidesInView.destroy(), p.animation.destroy(), r.destroy(), l.clear();
|
|
2165
2168
|
}
|
|
2166
2169
|
function R() {
|
|
2167
|
-
|
|
2170
|
+
x || (x = !0, l.clear(), F(), c.emit("destroy"), c.clear());
|
|
2168
2171
|
}
|
|
2169
|
-
function
|
|
2170
|
-
|
|
2172
|
+
function A(V, _, B) {
|
|
2173
|
+
!C.active || x || (p.scrollBody.useBaseFriction().useDuration(_ === !0 ? 0 : C.duration), p.scrollTo.index(V, B || 0));
|
|
2171
2174
|
}
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2175
|
+
function L(V) {
|
|
2176
|
+
const _ = p.index.add(1).get();
|
|
2177
|
+
A(_, V, -1);
|
|
2174
2178
|
}
|
|
2175
|
-
function
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2179
|
+
function Q(V) {
|
|
2180
|
+
const _ = p.index.add(-1).get();
|
|
2181
|
+
A(_, V, 1);
|
|
2178
2182
|
}
|
|
2179
|
-
function
|
|
2180
|
-
|
|
2181
|
-
O(S, V, 1);
|
|
2183
|
+
function G() {
|
|
2184
|
+
return p.index.add(1).get() !== d();
|
|
2182
2185
|
}
|
|
2183
|
-
function
|
|
2184
|
-
return
|
|
2186
|
+
function K() {
|
|
2187
|
+
return p.index.add(-1).get() !== d();
|
|
2185
2188
|
}
|
|
2186
|
-
function
|
|
2187
|
-
return
|
|
2189
|
+
function Z() {
|
|
2190
|
+
return p.scrollSnapList;
|
|
2188
2191
|
}
|
|
2189
|
-
function
|
|
2190
|
-
return
|
|
2192
|
+
function te() {
|
|
2193
|
+
return p.scrollProgress.get(p.offsetLocation.get());
|
|
2191
2194
|
}
|
|
2192
|
-
function
|
|
2193
|
-
return
|
|
2195
|
+
function d() {
|
|
2196
|
+
return p.index.get();
|
|
2194
2197
|
}
|
|
2195
|
-
function
|
|
2196
|
-
return
|
|
2198
|
+
function E() {
|
|
2199
|
+
return p.indexPrevious.get();
|
|
2197
2200
|
}
|
|
2198
2201
|
function k() {
|
|
2199
|
-
return
|
|
2200
|
-
}
|
|
2201
|
-
function A() {
|
|
2202
|
-
return m.slidesInView.get();
|
|
2202
|
+
return p.slidesInView.get();
|
|
2203
2203
|
}
|
|
2204
2204
|
function D() {
|
|
2205
|
-
return
|
|
2205
|
+
return p.slidesInView.get(!1);
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2207
|
+
function U() {
|
|
2208
|
+
return P;
|
|
2209
2209
|
}
|
|
2210
|
-
function
|
|
2211
|
-
return
|
|
2210
|
+
function z() {
|
|
2211
|
+
return p;
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function M() {
|
|
2214
2214
|
return e;
|
|
2215
2215
|
}
|
|
2216
|
-
function
|
|
2217
|
-
return
|
|
2216
|
+
function q() {
|
|
2217
|
+
return N;
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2220
|
-
return
|
|
2221
|
-
}
|
|
2222
|
-
const
|
|
2223
|
-
canScrollNext:
|
|
2224
|
-
canScrollPrev:
|
|
2225
|
-
containerNode:
|
|
2226
|
-
internalEngine:
|
|
2227
|
-
destroy:
|
|
2228
|
-
off:
|
|
2229
|
-
on:
|
|
2219
|
+
function ee() {
|
|
2220
|
+
return j;
|
|
2221
|
+
}
|
|
2222
|
+
const X = {
|
|
2223
|
+
canScrollNext: G,
|
|
2224
|
+
canScrollPrev: K,
|
|
2225
|
+
containerNode: q,
|
|
2226
|
+
internalEngine: z,
|
|
2227
|
+
destroy: R,
|
|
2228
|
+
off: m,
|
|
2229
|
+
on: v,
|
|
2230
2230
|
emit: h,
|
|
2231
|
-
plugins:
|
|
2232
|
-
previousScrollSnap:
|
|
2231
|
+
plugins: U,
|
|
2232
|
+
previousScrollSnap: E,
|
|
2233
2233
|
reInit: b,
|
|
2234
|
-
rootNode:
|
|
2235
|
-
scrollNext:
|
|
2236
|
-
scrollPrev:
|
|
2237
|
-
scrollProgress:
|
|
2238
|
-
scrollSnapList:
|
|
2239
|
-
scrollTo:
|
|
2240
|
-
selectedScrollSnap:
|
|
2241
|
-
slideNodes:
|
|
2242
|
-
slidesInView:
|
|
2234
|
+
rootNode: M,
|
|
2235
|
+
scrollNext: L,
|
|
2236
|
+
scrollPrev: Q,
|
|
2237
|
+
scrollProgress: te,
|
|
2238
|
+
scrollSnapList: Z,
|
|
2239
|
+
scrollTo: A,
|
|
2240
|
+
selectedScrollSnap: d,
|
|
2241
|
+
slideNodes: ee,
|
|
2242
|
+
slidesInView: k,
|
|
2243
2243
|
slidesNotInView: D
|
|
2244
2244
|
};
|
|
2245
|
-
return
|
|
2245
|
+
return $(t, n), setTimeout(() => c.emit("init"), 0), X;
|
|
2246
2246
|
}
|
|
2247
|
-
|
|
2248
|
-
function
|
|
2249
|
-
const n =
|
|
2247
|
+
Re.globalOptions = void 0;
|
|
2248
|
+
function tt(e = {}, t = []) {
|
|
2249
|
+
const n = Ye(e), o = Ye(t), [a, s] = oe(), [r, l] = oe(), c = re(() => {
|
|
2250
2250
|
a && a.reInit(n.current, o.current);
|
|
2251
2251
|
}, [a]);
|
|
2252
|
-
return
|
|
2253
|
-
|
|
2254
|
-
}, [e,
|
|
2255
|
-
|
|
2256
|
-
}, [t,
|
|
2257
|
-
if (
|
|
2258
|
-
|
|
2259
|
-
const u =
|
|
2252
|
+
return ie(() => {
|
|
2253
|
+
Xe(n.current, e) || (n.current = e, c());
|
|
2254
|
+
}, [e, c]), ie(() => {
|
|
2255
|
+
co(o.current, t) || (o.current = t, c());
|
|
2256
|
+
}, [t, c]), ie(() => {
|
|
2257
|
+
if (io() && r) {
|
|
2258
|
+
Re.globalOptions = tt.globalOptions;
|
|
2259
|
+
const u = Re(r, n.current, o.current);
|
|
2260
2260
|
return s(u), () => u.destroy();
|
|
2261
2261
|
} else
|
|
2262
2262
|
s(void 0);
|
|
2263
|
-
}, [r, s]), [
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
const
|
|
2267
|
-
carouselContainer:
|
|
2268
|
-
viewport:
|
|
2269
|
-
slides:
|
|
2270
|
-
slide:
|
|
2271
|
-
slideInner:
|
|
2272
|
-
loaderOverlay:
|
|
2273
|
-
image:
|
|
2274
|
-
loaded:
|
|
2275
|
-
empty:
|
|
2276
|
-
controls:
|
|
2277
|
-
arrows:
|
|
2278
|
-
dots:
|
|
2279
|
-
dot:
|
|
2280
|
-
dotActive:
|
|
2281
|
-
},
|
|
2263
|
+
}, [r, s]), [l, a];
|
|
2264
|
+
}
|
|
2265
|
+
tt.globalOptions = void 0;
|
|
2266
|
+
const qo = "_carouselContainer_1bu1s_1", Vo = "_viewport_1bu1s_11", Ho = "_slides_1bu1s_17", Wo = "_slide_1bu1s_17", zo = "_slideInner_1bu1s_37", Yo = "_loaderOverlay_1bu1s_45", Go = "_image_1bu1s_55", Ko = "_loaded_1bu1s_66", Zo = "_empty_1bu1s_78", Uo = "_controls_1bu1s_84", Xo = "_arrows_1bu1s_94", Jo = "_dots_1bu1s_104", Qo = "_dot_1bu1s_104", es = "_dotActive_1bu1s_130", J = {
|
|
2267
|
+
carouselContainer: qo,
|
|
2268
|
+
viewport: Vo,
|
|
2269
|
+
slides: Ho,
|
|
2270
|
+
slide: Wo,
|
|
2271
|
+
slideInner: zo,
|
|
2272
|
+
loaderOverlay: Yo,
|
|
2273
|
+
image: Go,
|
|
2274
|
+
loaded: Ko,
|
|
2275
|
+
empty: Zo,
|
|
2276
|
+
controls: Uo,
|
|
2277
|
+
arrows: Xo,
|
|
2278
|
+
dots: Jo,
|
|
2279
|
+
dot: Qo,
|
|
2280
|
+
dotActive: es
|
|
2281
|
+
}, ts = cn, ns = ({
|
|
2282
2282
|
images: e,
|
|
2283
2283
|
autoPlay: t = !1,
|
|
2284
2284
|
autoDelay: n = 5,
|
|
@@ -2286,133 +2286,133 @@ const To = "_carouselContainer_1bu1s_1", No = "_viewport_1bu1s_11", jo = "_slide
|
|
|
2286
2286
|
showDots: a = !0,
|
|
2287
2287
|
variant: s,
|
|
2288
2288
|
slidesPerView: r = 1,
|
|
2289
|
-
slideSpacing:
|
|
2290
|
-
cornerRadius:
|
|
2289
|
+
slideSpacing: l = 16,
|
|
2290
|
+
cornerRadius: c = 0,
|
|
2291
2291
|
"data-color": u,
|
|
2292
2292
|
"data-size": y
|
|
2293
2293
|
}) => {
|
|
2294
|
-
const
|
|
2294
|
+
const g = {
|
|
2295
2295
|
loop: !0,
|
|
2296
2296
|
align: "start",
|
|
2297
2297
|
containScroll: "trimSnaps",
|
|
2298
2298
|
slidesToScroll: 1
|
|
2299
|
-
}, [
|
|
2300
|
-
|
|
2301
|
-
|
|
2299
|
+
}, [v, m] = tt(g), [h, b] = oe(0), [x, p] = oe([]), [f, C] = oe([]);
|
|
2300
|
+
ie(() => {
|
|
2301
|
+
C(new Array((e == null ? void 0 : e.length) || 0).fill(!1));
|
|
2302
2302
|
}, [e]);
|
|
2303
|
-
const
|
|
2304
|
-
|
|
2305
|
-
const
|
|
2306
|
-
return
|
|
2303
|
+
const I = re((R) => {
|
|
2304
|
+
C((A) => {
|
|
2305
|
+
const L = [...A];
|
|
2306
|
+
return L[R] = !0, L;
|
|
2307
2307
|
});
|
|
2308
|
-
}, []),
|
|
2309
|
-
|
|
2310
|
-
}, [
|
|
2311
|
-
|
|
2312
|
-
if (
|
|
2313
|
-
return
|
|
2314
|
-
|
|
2308
|
+
}, []), P = xe(() => n * 1e3, [n]), N = re(() => {
|
|
2309
|
+
m && b(m.selectedScrollSnap());
|
|
2310
|
+
}, [m]), j = re((R) => m && m.scrollTo(R), [m]), T = re(() => m && m.scrollPrev(), [m]), w = re(() => m && m.scrollNext(), [m]);
|
|
2311
|
+
ie(() => {
|
|
2312
|
+
if (m)
|
|
2313
|
+
return m.on("select", N), m.on("reInit", N), p(m.scrollSnapList()), () => {
|
|
2314
|
+
m.off("select", N), m.off("reInit", N);
|
|
2315
2315
|
};
|
|
2316
|
-
}, [
|
|
2317
|
-
|
|
2318
|
-
}, [
|
|
2319
|
-
if (!t || !
|
|
2320
|
-
const
|
|
2321
|
-
|
|
2322
|
-
},
|
|
2316
|
+
}, [m, N]), ie(() => {
|
|
2317
|
+
m && (m.reInit(), p(m.scrollSnapList()));
|
|
2318
|
+
}, [m, e, r, l]), ie(() => {
|
|
2319
|
+
if (!t || !m || !e || e.length <= 1) return;
|
|
2320
|
+
const R = window.setInterval(() => {
|
|
2321
|
+
m.canScrollNext() && m.scrollNext();
|
|
2322
|
+
}, P);
|
|
2323
2323
|
return () => {
|
|
2324
|
-
window.clearInterval(
|
|
2324
|
+
window.clearInterval(R);
|
|
2325
2325
|
};
|
|
2326
|
-
}, [t,
|
|
2327
|
-
const
|
|
2328
|
-
return /* @__PURE__ */
|
|
2326
|
+
}, [t, P, m, e]);
|
|
2327
|
+
const $ = Math.max(1, r), O = `${100 / $}%`, F = l / 2;
|
|
2328
|
+
return /* @__PURE__ */ i.jsxs(
|
|
2329
2329
|
"div",
|
|
2330
2330
|
{
|
|
2331
|
-
className:
|
|
2331
|
+
className: J.carouselContainer,
|
|
2332
2332
|
"data-color": u,
|
|
2333
2333
|
"data-size": y,
|
|
2334
2334
|
"data-variant": s,
|
|
2335
2335
|
children: [
|
|
2336
|
-
/* @__PURE__ */
|
|
2336
|
+
/* @__PURE__ */ i.jsx("div", { className: J.viewport, ref: v, children: /* @__PURE__ */ i.jsx(
|
|
2337
2337
|
"div",
|
|
2338
2338
|
{
|
|
2339
|
-
className:
|
|
2339
|
+
className: J.slides,
|
|
2340
2340
|
style: {
|
|
2341
|
-
marginLeft: `-${
|
|
2342
|
-
marginRight: `-${
|
|
2341
|
+
marginLeft: `-${F}px`,
|
|
2342
|
+
marginRight: `-${F}px`
|
|
2343
2343
|
},
|
|
2344
|
-
children: e && e.length > 0 ? e.map((
|
|
2344
|
+
children: e && e.length > 0 ? e.map((R, A) => /* @__PURE__ */ i.jsx(
|
|
2345
2345
|
"div",
|
|
2346
2346
|
{
|
|
2347
|
-
className:
|
|
2347
|
+
className: J.slide,
|
|
2348
2348
|
style: {
|
|
2349
|
-
flex: `0 0 ${
|
|
2350
|
-
paddingLeft: `${
|
|
2351
|
-
paddingRight: `${
|
|
2352
|
-
borderRadius:
|
|
2349
|
+
flex: `0 0 ${O}`,
|
|
2350
|
+
paddingLeft: `${F}px`,
|
|
2351
|
+
paddingRight: `${F}px`,
|
|
2352
|
+
borderRadius: c > 0 ? `${c}px` : void 0,
|
|
2353
2353
|
overflow: "hidden"
|
|
2354
2354
|
// Ensure radius clips content
|
|
2355
2355
|
},
|
|
2356
|
-
children: /* @__PURE__ */
|
|
2357
|
-
!
|
|
2358
|
-
/* @__PURE__ */
|
|
2356
|
+
children: /* @__PURE__ */ i.jsxs("div", { className: J.slideInner, style: { borderRadius: `${c}px`, overflow: "hidden", position: "relative", width: "100%", height: "100%" }, children: [
|
|
2357
|
+
!f[A] && /* @__PURE__ */ i.jsx("div", { className: J.loaderOverlay, children: /* @__PURE__ */ i.jsx(ts, { "aria-label": "Laster bilde" }) }),
|
|
2358
|
+
/* @__PURE__ */ i.jsx(
|
|
2359
2359
|
"img",
|
|
2360
2360
|
{
|
|
2361
|
-
className: `${
|
|
2362
|
-
src:
|
|
2363
|
-
alt:
|
|
2364
|
-
loading:
|
|
2361
|
+
className: `${J.image} ${f[A] ? J.loaded : J.loadingImage}`,
|
|
2362
|
+
src: R.src,
|
|
2363
|
+
alt: R.alt,
|
|
2364
|
+
loading: A < $ ? "eager" : "lazy",
|
|
2365
2365
|
crossOrigin: "anonymous",
|
|
2366
|
-
onLoad: () =>
|
|
2367
|
-
onError: (
|
|
2368
|
-
|
|
2366
|
+
onLoad: () => I(A),
|
|
2367
|
+
onError: (L) => {
|
|
2368
|
+
L.target.style.display = "none", I(A);
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
2371
|
)
|
|
2372
2372
|
] })
|
|
2373
2373
|
},
|
|
2374
|
-
`image-${
|
|
2375
|
-
)) : /* @__PURE__ */
|
|
2374
|
+
`image-${A}-${R.src}`
|
|
2375
|
+
)) : /* @__PURE__ */ i.jsx("div", { className: J.slide, style: { flex: "0 0 100%" }, children: /* @__PURE__ */ i.jsx("div", { className: J.empty, children: "Ingen bilder" }) })
|
|
2376
2376
|
}
|
|
2377
2377
|
) }),
|
|
2378
|
-
(o || a && e && e.length > 1) && /* @__PURE__ */
|
|
2379
|
-
o && /* @__PURE__ */
|
|
2380
|
-
/* @__PURE__ */
|
|
2381
|
-
|
|
2378
|
+
(o || a && e && e.length > 1) && /* @__PURE__ */ i.jsxs("div", { className: J.controls, "aria-hidden": "false", children: [
|
|
2379
|
+
o && /* @__PURE__ */ i.jsxs("div", { className: J.arrows, children: [
|
|
2380
|
+
/* @__PURE__ */ i.jsx(
|
|
2381
|
+
ye,
|
|
2382
2382
|
{
|
|
2383
2383
|
variant: "primary",
|
|
2384
2384
|
icon: !0,
|
|
2385
2385
|
"aria-label": "Forrige bilde",
|
|
2386
|
-
onClick:
|
|
2386
|
+
onClick: T,
|
|
2387
2387
|
disabled: !e || e.length <= 1,
|
|
2388
|
-
children: /* @__PURE__ */
|
|
2388
|
+
children: /* @__PURE__ */ i.jsx(Un, { "aria-hidden": !0 })
|
|
2389
2389
|
}
|
|
2390
2390
|
),
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
|
|
2391
|
+
/* @__PURE__ */ i.jsx(
|
|
2392
|
+
ye,
|
|
2393
2393
|
{
|
|
2394
2394
|
variant: "primary",
|
|
2395
2395
|
icon: !0,
|
|
2396
2396
|
"aria-label": "Neste bilde",
|
|
2397
|
-
onClick:
|
|
2397
|
+
onClick: w,
|
|
2398
2398
|
disabled: !e || e.length <= 1,
|
|
2399
|
-
children: /* @__PURE__ */
|
|
2399
|
+
children: /* @__PURE__ */ i.jsx(Xn, { "aria-hidden": !0 })
|
|
2400
2400
|
}
|
|
2401
2401
|
)
|
|
2402
2402
|
] }),
|
|
2403
|
-
a && e && e.length > 1 && /* @__PURE__ */
|
|
2404
|
-
const
|
|
2405
|
-
return /* @__PURE__ */
|
|
2403
|
+
a && e && e.length > 1 && /* @__PURE__ */ i.jsx("div", { className: J.dots, role: "tablist", "aria-label": "Bildeposisjon", children: x.map((R, A) => {
|
|
2404
|
+
const L = A === h;
|
|
2405
|
+
return /* @__PURE__ */ i.jsx(
|
|
2406
2406
|
"button",
|
|
2407
2407
|
{
|
|
2408
2408
|
type: "button",
|
|
2409
|
-
className: `${
|
|
2410
|
-
onClick: () =>
|
|
2411
|
-
"aria-label": `Gå til bilde ${
|
|
2412
|
-
"aria-selected":
|
|
2409
|
+
className: `${J.dot} ${L ? J.dotActive : ""}`,
|
|
2410
|
+
onClick: () => j(A),
|
|
2411
|
+
"aria-label": `Gå til bilde ${A + 1}`,
|
|
2412
|
+
"aria-selected": L,
|
|
2413
2413
|
role: "tab"
|
|
2414
2414
|
},
|
|
2415
|
-
`dot-${
|
|
2415
|
+
`dot-${A}`
|
|
2416
2416
|
);
|
|
2417
2417
|
}) })
|
|
2418
2418
|
] })
|
|
@@ -2420,77 +2420,463 @@ const To = "_carouselContainer_1bu1s_1", No = "_viewport_1bu1s_11", jo = "_slide
|
|
|
2420
2420
|
}
|
|
2421
2421
|
);
|
|
2422
2422
|
};
|
|
2423
|
-
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
const
|
|
2428
|
-
|
|
2429
|
-
const
|
|
2430
|
-
|
|
2431
|
-
const
|
|
2432
|
-
(e, t) => /* @__PURE__ */
|
|
2423
|
+
ns.displayName = "Carousel";
|
|
2424
|
+
const xa = ln, ya = dn, Ca = un, de = fn, _a = mn, ka = hn, rs = pn, os = gn;
|
|
2425
|
+
rs.displayName = "Field.Description";
|
|
2426
|
+
os.displayName = "Field.Counter";
|
|
2427
|
+
const ja = Tt, ss = ue((e, t) => /* @__PURE__ */ i.jsx(vn, { ref: t, ...e }));
|
|
2428
|
+
ss.displayName = "Heading";
|
|
2429
|
+
const Sa = bn, as = ue((e, t) => /* @__PURE__ */ i.jsx(xn, { ref: t, ...e }));
|
|
2430
|
+
as.displayName = "Label";
|
|
2431
|
+
const ze = yn, La = Cn, Ta = _n, Ea = kn, Ue = ue(
|
|
2432
|
+
(e, t) => /* @__PURE__ */ i.jsx(jn, { ref: t, ...e })
|
|
2433
2433
|
);
|
|
2434
|
-
|
|
2435
|
-
const
|
|
2436
|
-
Button:
|
|
2437
|
-
ClearButton:
|
|
2438
|
-
Input:
|
|
2439
|
-
}),
|
|
2440
|
-
|
|
2441
|
-
const
|
|
2442
|
-
|
|
2434
|
+
Ue.displayName = "Paragraph";
|
|
2435
|
+
const Na = Sn, wa = Ln, Ia = Tn, Oe = Object.assign(En, {
|
|
2436
|
+
Button: In,
|
|
2437
|
+
ClearButton: wn,
|
|
2438
|
+
Input: Nn
|
|
2439
|
+
}), Pa = Pn, Da = Dn, Ma = Mn, is = On;
|
|
2440
|
+
is.displayName = "Suggestion";
|
|
2441
|
+
const St = Rn, Oa = An, Ra = Bn, Aa = $n, Ba = Fn, $a = qn, Fa = Vn, qa = Hn, cs = ue((e, t) => /* @__PURE__ */ i.jsx(Wn, { ref: t, ...e }));
|
|
2442
|
+
cs.displayName = "ValidationMessage";
|
|
2443
|
+
const ls = Yt(void 0), ds = () => {
|
|
2444
|
+
const e = Gt(ls);
|
|
2445
|
+
if (e === void 0)
|
|
2446
|
+
throw new Error("useLanguage must be used within a LanguageProvider");
|
|
2447
|
+
return e;
|
|
2448
|
+
}, us = "_header_7c61q_1", fs = "_headerExtension_7c61q_11", ms = "_extensionContentWrapper_7c61q_25", ps = "_extensionContent_7c61q_25", gs = "_extensionDivider_7c61q_48", hs = "_languageSwitch_7c61q_54", vs = "_languageLabel_7c61q_62", bs = "_languageLink_7c61q_68", xs = "_headerInner_7c61q_82", ys = "_logoWrapper_7c61q_96", Cs = "_logo_7c61q_96", _s = "_secondaryLogoWrapper_7c61q_115", ks = "_slotComponent_7c61q_124", js = "_slotContainer_7c61q_134", Ss = "_slotText_7c61q_142", Ls = "_secondaryLogo_7c61q_115", Ts = "_redCrossLogo_7c61q_169", Es = "_navItems_7c61q_175", Ns = "_navLink_7c61q_184", ws = "_actions_7c61q_197", Is = "_ctaButton_7c61q_205", Ps = "_themeToggle_7c61q_210", Ds = "_userInfo_7c61q_215", Ms = "_userName_7c61q_221", Os = "_loginLink_7c61q_228", Rs = "_loginText_7c61q_237", As = "_underline_7c61q_244", Bs = "_searchButtonWrapper_7c61q_250", $s = "_buttonText_7c61q_254", Fs = "_menuButton_7c61q_259", qs = "_menuOverlay_7c61q_264", Vs = "_searchOverlay_7c61q_276", Hs = "_searchContent_7c61q_294", Ws = "_menuContent_7c61q_304", zs = "_menuLeftColumn_7c61q_313", Ys = "_menuRightColumn_7c61q_318", Gs = "_slotContent_7c61q_332", Ks = "_suggestionsSection_7c61q_341", Zs = "_suggestionsTitle_7c61q_347", Us = "_searchResults_7c61q_356", Xs = "_resultList_7c61q_362", Js = "_resultItem_7c61q_368", Qs = "_resultLink_7c61q_376", ea = "_suggestionIcon_7c61q_390", ta = "_suggestionText_7c61q_403", na = "_highlightedText_7c61q_410", ra = "_remainingText_7c61q_415", oa = "_viewAllLink_7c61q_428", sa = "_noResults_7c61q_463", S = {
|
|
2449
|
+
header: us,
|
|
2450
|
+
headerExtension: fs,
|
|
2451
|
+
extensionContentWrapper: ms,
|
|
2452
|
+
extensionContent: ps,
|
|
2453
|
+
extensionDivider: gs,
|
|
2454
|
+
languageSwitch: hs,
|
|
2455
|
+
languageLabel: vs,
|
|
2456
|
+
languageLink: bs,
|
|
2457
|
+
headerInner: xs,
|
|
2458
|
+
logoWrapper: ys,
|
|
2459
|
+
logo: Cs,
|
|
2460
|
+
secondaryLogoWrapper: _s,
|
|
2461
|
+
slotComponent: ks,
|
|
2462
|
+
slotContainer: js,
|
|
2463
|
+
slotText: Ss,
|
|
2464
|
+
secondaryLogo: Ls,
|
|
2465
|
+
redCrossLogo: Ts,
|
|
2466
|
+
navItems: Es,
|
|
2467
|
+
navLink: Ns,
|
|
2468
|
+
actions: ws,
|
|
2469
|
+
ctaButton: Is,
|
|
2470
|
+
themeToggle: Ps,
|
|
2471
|
+
userInfo: Ds,
|
|
2472
|
+
userName: Ms,
|
|
2473
|
+
loginLink: Os,
|
|
2474
|
+
loginText: Rs,
|
|
2475
|
+
underline: As,
|
|
2476
|
+
searchButtonWrapper: Bs,
|
|
2477
|
+
buttonText: $s,
|
|
2478
|
+
menuButton: Fs,
|
|
2479
|
+
menuOverlay: qs,
|
|
2480
|
+
searchOverlay: Vs,
|
|
2481
|
+
searchContent: Hs,
|
|
2482
|
+
menuContent: Ws,
|
|
2483
|
+
menuLeftColumn: zs,
|
|
2484
|
+
menuRightColumn: Ys,
|
|
2485
|
+
slotContent: Gs,
|
|
2486
|
+
suggestionsSection: Ks,
|
|
2487
|
+
suggestionsTitle: Zs,
|
|
2488
|
+
searchResults: Us,
|
|
2489
|
+
resultList: Xs,
|
|
2490
|
+
resultItem: Js,
|
|
2491
|
+
resultLink: Qs,
|
|
2492
|
+
suggestionIcon: ea,
|
|
2493
|
+
suggestionText: ta,
|
|
2494
|
+
highlightedText: na,
|
|
2495
|
+
remainingText: ra,
|
|
2496
|
+
viewAllLink: oa,
|
|
2497
|
+
noResults: sa
|
|
2498
|
+
}, aa = [
|
|
2499
|
+
// Pages
|
|
2500
|
+
{ id: "home", title: "Hjem", category: "Page", path: "home", description: "Forsiden" },
|
|
2501
|
+
{ id: "components", title: "Komponenter", category: "Page", path: "components", description: "Oversikt over alle komponenter" },
|
|
2502
|
+
{ id: "design", title: "Design", category: "Page", path: "design", description: "Designretningslinjer og prinsipper" },
|
|
2503
|
+
{ id: "code", title: "Kode", category: "Page", path: "code", description: "Utviklerdokumentasjon og oppsett" },
|
|
2504
|
+
// Components
|
|
2505
|
+
{ id: "alert", title: "Alert", category: "Component", path: "components", description: "Varselbokser for viktige meldinger" },
|
|
2506
|
+
{ id: "avatar", title: "Avatar", category: "Component", path: "components", description: "Profilbilder og initialer" },
|
|
2507
|
+
{ id: "badge", title: "Badge", category: "Component", path: "components", description: "Små merker for status eller antall" },
|
|
2508
|
+
{ id: "button", title: "Button", category: "Component", path: "components", description: "Knapper for handlinger" },
|
|
2509
|
+
{ id: "card", title: "Card", category: "Component", path: "components", description: "Kort for gruppering av innhold" },
|
|
2510
|
+
{ id: "carousel", title: "Carousel", category: "Component", path: "components", description: "Bildekarusell" },
|
|
2511
|
+
{ id: "checkbox", title: "Checkbox", category: "Component", path: "components", description: "Valg av flere alternativer" },
|
|
2512
|
+
{ id: "dialog", title: "Dialog", category: "Component", path: "components", description: "Modale vinduer" },
|
|
2513
|
+
{ id: "dropdown", title: "Dropdown", category: "Component", path: "components", description: "Nedtrekksmenyer" },
|
|
2514
|
+
{ id: "header", title: "Header", category: "Component", path: "components", description: "Topptekst og navigasjon" },
|
|
2515
|
+
{ id: "herosection", title: "HeroSection", category: "Component", path: "components", description: "Store introduksjonsseksjoner" },
|
|
2516
|
+
{ id: "input", title: "Input", category: "Component", path: "components", description: "Tekstfelt for brukerinput" },
|
|
2517
|
+
{ id: "link", title: "Link", category: "Component", path: "components", description: "Lenker til andre sider" },
|
|
2518
|
+
{ id: "list", title: "List", category: "Component", path: "components", description: "Ordnede og uordnede lister" },
|
|
2519
|
+
{ id: "pagination", title: "Pagination", category: "Component", path: "components", description: "Navigasjon mellom sider" },
|
|
2520
|
+
{ id: "radio", title: "Radio", category: "Component", path: "components", description: "Valg av ett alternativ" },
|
|
2521
|
+
{ id: "search", title: "Search", category: "Component", path: "components", description: "Søkefelter" },
|
|
2522
|
+
{ id: "select", title: "Select", category: "Component", path: "components", description: "Valgmeny" },
|
|
2523
|
+
{ id: "spinner", title: "Spinner", category: "Component", path: "components", description: "Lasteindikator" },
|
|
2524
|
+
{ id: "switch", title: "Switch", category: "Component", path: "components", description: "Av/på bryter" },
|
|
2525
|
+
{ id: "table", title: "Table", category: "Component", path: "components", description: "Tabeller for data" },
|
|
2526
|
+
{ id: "tabs", title: "Tabs", category: "Component", path: "components", description: "Faner for inndeling av innhold" },
|
|
2527
|
+
{ id: "tag", title: "Tag", category: "Component", path: "components", description: "Merkelapper og emneknagger" },
|
|
2528
|
+
{ id: "textarea", title: "Textarea", category: "Component", path: "components", description: "Flerlinjers tekstfelt" },
|
|
2529
|
+
{ id: "tooltip", title: "Tooltip", category: "Component", path: "components", description: "Hjelpetekster ved hover" },
|
|
2530
|
+
// Design Docs - For Designere
|
|
2531
|
+
{ id: "figma-oppkobling", title: "Figma tilkobling", category: "Design", path: "design/figma-oppkobling", description: "Hvordan koble til Figma-biblioteket" },
|
|
2532
|
+
{ id: "oppstart", title: "Oppstart", category: "Design", path: "design/oppstart", description: "Oppsett av arbeidsområde" },
|
|
2533
|
+
{ id: "lage-komponenter", title: "Lage ett nytt komponent", category: "Design", path: "design/lage-komponenter", description: "Veileder for komponentbygging" },
|
|
2534
|
+
{ id: "praktiske-eksempler", title: "Praktiske eksempler", category: "Design", path: "design/praktiske-eksempler", description: "Eksempler på bruk av designsystemet" },
|
|
2535
|
+
{ id: "token-studio", title: "Token Studio", category: "Design", path: "design/token-studio", description: "Bruk av Token Studio" },
|
|
2536
|
+
// Design Docs - Farger
|
|
2537
|
+
{ id: "fargesystem", title: "Sette opp ditt eget fargesystem", category: "Design", path: "design/fargesystem", description: "Hvordan sette opp farger" },
|
|
2538
|
+
{ id: "temabygger", title: "Temabygger", category: "Design", path: "design/temabygger", description: "Designsystemets temagenerator" },
|
|
2539
|
+
{ id: "bruk-farger", title: "Bruk fargene", category: "Design", path: "design/bruk-farger", description: "Bruk genererte farger" },
|
|
2540
|
+
// Design Docs - Bidra
|
|
2541
|
+
{ id: "foresla-design", title: "Foreslå nytt design", category: "Design", path: "design/foresla-design", description: "Hvordan bidra med nytt design" },
|
|
2542
|
+
// Design Docs - Designelementer
|
|
2543
|
+
{ id: "hva-er-design-tokens", title: "Hva er design tokens", category: "Design", path: "design/hva-er-design-tokens", description: "Introduksjon til design tokens" },
|
|
2544
|
+
{ id: "design-tokens-i-figma", title: "Design tokens i Figma", category: "Design", path: "design/design-tokens-i-figma", description: "Bruke tokens i Figma" },
|
|
2545
|
+
{ id: "farger-navnestruktur", title: "Farger: Navnestruktur", category: "Design", path: "design/farger-navnestruktur", description: "Navngiving av farger" },
|
|
2546
|
+
{ id: "farger-oversikt", title: "Farger: Oversikt", category: "Design", path: "design/farger-oversikt", description: "Oversikt og forklaringer av farger" },
|
|
2547
|
+
{ id: "farge-tokens", title: "Farge-tokens", category: "Design", path: "design/farge-tokens", description: "Tokens for farger" },
|
|
2548
|
+
{ id: "skygger-bruk", title: "Bruk av skygger", category: "Design", path: "design/skygger-bruk", description: "Retningslinjer for skygger" },
|
|
2549
|
+
{ id: "skygge-tokens", title: "Skygge-tokens", category: "Design", path: "design/skygge-tokens", description: "Tokens for skygger" },
|
|
2550
|
+
{ id: "komponent-storrelser", title: "Komponentstørrelser", category: "Design", path: "design/komponent-storrelser", description: "Størrelsesguide for komponenter" },
|
|
2551
|
+
{ id: "storrelse-tokens", title: "Størrelse-tokens", category: "Design", path: "design/storrelse-tokens", description: "Tokens for størrelser" },
|
|
2552
|
+
{ id: "font-family", title: "Typografi: Font-family", category: "Design", path: "design/font-family", description: "Font-familier" },
|
|
2553
|
+
{ id: "typografi-tokens", title: "Typografi-tokens", category: "Design", path: "design/typografi-tokens", description: "Tokens for typografi" },
|
|
2554
|
+
// Code Docs
|
|
2555
|
+
{ id: "code-intro", title: "Oversikt (Kode)", category: "Code", path: "code/intro", description: "Startside for kode" },
|
|
2556
|
+
{ id: "kom-i-gang", title: "Kom i gang (Kode)", category: "Code", path: "code/kom-i-gang", description: "Installasjon og oppsett" },
|
|
2557
|
+
{ id: "figma-mcp", title: "Fra Figma til Kode (MCP)", category: "Code", path: "code/figma-mcp", description: "Automatisert arbeidsflyt med MCP" },
|
|
2558
|
+
{ id: "komponent-kreasjon", title: "Komponent Kreasjon", category: "Code", path: "code/komponent-kreasjon", description: "Opprette nye komponenter" },
|
|
2559
|
+
{ id: "progression", title: "Progresjon", category: "Code", path: "code/progression", description: "Fra design til ferdig komponent" },
|
|
2560
|
+
{ id: "metadata-files", title: "Metadata filer", category: "Code", path: "code/metadata-files", description: "Struktur og bruk av metadata.json" }
|
|
2561
|
+
], Va = ({
|
|
2562
|
+
activePage: e,
|
|
2563
|
+
setPage: t,
|
|
2564
|
+
children: n,
|
|
2565
|
+
showUser: o = !0,
|
|
2566
|
+
showSearch: a = !0,
|
|
2567
|
+
showLogin: s = !0,
|
|
2568
|
+
showCta: r = !1,
|
|
2569
|
+
ctaLabel: l,
|
|
2570
|
+
ctaIcon: c = /* @__PURE__ */ i.jsx(er, { "aria-hidden": !0 }),
|
|
2571
|
+
onCtaClick: u,
|
|
2572
|
+
showThemeToggle: y = !1,
|
|
2573
|
+
secondaryLogo: g = !1,
|
|
2574
|
+
secondaryLogoSrc: v,
|
|
2575
|
+
secondaryLogoSrcDark: m,
|
|
2576
|
+
secondaryLogoAlt: h = "Secondary Logo",
|
|
2577
|
+
navItems: b,
|
|
2578
|
+
showNavItems: x = !0,
|
|
2579
|
+
showMenuButton: p = !0,
|
|
2580
|
+
showHeaderExtension: f = !1,
|
|
2581
|
+
showModeToggle: C = !1,
|
|
2582
|
+
showLanguageSwitch: I = !1
|
|
2583
|
+
}) => {
|
|
2584
|
+
const [P, N] = oe(!1), [j, T] = oe(!1), [w, $] = oe(""), [O, F] = oe("light"), { language: R, setLanguage: A, t: L } = ds(), Q = () => /* @__PURE__ */ i.jsxs(
|
|
2585
|
+
"svg",
|
|
2586
|
+
{
|
|
2587
|
+
width: "170",
|
|
2588
|
+
height: "119",
|
|
2589
|
+
viewBox: "24 0 170 119",
|
|
2590
|
+
fill: "none",
|
|
2591
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2592
|
+
"aria-hidden": !0,
|
|
2593
|
+
focusable: "false",
|
|
2594
|
+
className: S.redCrossLogo,
|
|
2595
|
+
children: [
|
|
2596
|
+
/* @__PURE__ */ i.jsx("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" }),
|
|
2597
|
+
/* @__PURE__ */ i.jsx("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" }),
|
|
2598
|
+
/* @__PURE__ */ i.jsx("path", { d: "M119.76 46.9351V62.0537C119.76 63.5253 119.814 65.0829 119.868 65.9659H116.266L116.077 64.037H116.01C115.593 64.7375 114.998 65.3131 114.285 65.7041C113.573 66.095 112.769 66.287 111.958 66.2602C108.865 66.2602 106.384 63.6068 106.384 59.5317C106.384 55.1079 109.085 52.5632 112.237 52.5632C113.835 52.5632 115.087 53.1247 115.676 54.0393H115.726V46.9351H119.76ZM115.708 58.4088C115.708 58.1914 115.681 57.8971 115.658 57.6843C115.556 57.1295 115.266 56.6274 114.838 56.2627C114.41 55.8981 113.869 55.6933 113.308 55.683C111.467 55.683 110.508 57.3447 110.508 59.4094C110.508 61.6327 111.602 63.0318 113.281 63.0318C113.838 63.0337 114.378 62.8389 114.807 62.4814C115.235 62.1239 115.526 61.6264 115.627 61.0757C115.702 60.7676 115.737 60.451 115.73 60.1339L115.708 58.4088Z", fill: "#1E1E1E" }),
|
|
2599
|
+
/* @__PURE__ */ i.jsx("path", { d: "M126.13 60.6869C126.265 62.3758 127.931 63.1772 129.808 63.1772C131.029 63.1934 132.245 63.013 133.41 62.6429L133.946 65.4049C132.438 65.9752 130.838 66.2562 129.227 66.2335C124.802 66.2335 122.272 63.6345 122.272 59.5322C122.272 56.2088 124.325 52.5366 128.854 52.5366C133.063 52.5366 134.666 55.8329 134.666 59.0794C134.666 59.6271 134.62 60.1738 134.531 60.714L126.13 60.6869ZM130.902 57.8977C130.902 56.9061 130.475 55.2443 128.611 55.2443C126.904 55.2443 126.211 56.8246 126.103 57.8977H130.902Z", fill: "#1E1E1E" }),
|
|
2600
|
+
/* @__PURE__ */ i.jsx("path", { d: "M142.603 47.8994H146.623V55.8866H146.7C147.1 55.1893 147.501 54.5283 147.929 53.9034L151.981 47.8994H156.978L151.035 55.5969L157.297 65.9703H152.57L148.172 58.1687L146.623 60.0704V65.9567H142.598L142.603 47.8994Z", fill: "#1E1E1E" }),
|
|
2601
|
+
/* @__PURE__ */ i.jsx("path", { d: "M164.294 66.2599C160.485 66.2599 157.541 63.7424 157.541 59.5043C157.541 55.2662 160.309 52.563 164.496 52.563C168.494 52.563 171.159 55.325 171.159 59.2643C171.159 64.0639 167.774 66.2599 164.307 66.2599H164.294ZM164.375 63.3394C165.946 63.3394 166.959 61.7592 166.959 59.4001C166.959 57.4395 166.216 55.4563 164.375 55.4563C162.43 55.4563 161.709 57.4667 161.709 59.4001C161.709 61.6641 162.641 63.3394 164.348 63.3394H164.375Z", fill: "#1E1E1E" }),
|
|
2602
|
+
/* @__PURE__ */ i.jsx("path", { d: "M173.676 57.1727C173.676 55.2438 173.622 54.0031 173.568 52.8576H177.062L177.197 55.271H177.3C177.535 54.507 178 53.8353 178.63 53.3486C179.261 52.8619 180.026 52.5843 180.821 52.5542C181.105 52.5425 181.391 52.5607 181.672 52.6086V56.4392C181.303 56.3736 180.93 56.3387 180.555 56.335C179.06 56.335 178.048 57.1365 177.782 58.3997C177.726 58.6983 177.699 59.0015 177.701 59.3053V65.9659H173.649L173.676 57.1727Z", fill: "#1E1E1E" }),
|
|
2603
|
+
/* @__PURE__ */ i.jsx("path", { d: "M183.752 62.4023C184.824 62.9936 186.018 63.3283 187.241 63.3803C188.47 63.3803 188.974 62.9275 188.974 62.28C188.974 61.6325 188.573 61.2613 187.056 60.7768C184.355 59.8712 183.351 58.3951 183.351 56.8375C183.351 54.3969 185.404 52.5496 188.654 52.5496C189.92 52.5283 191.175 52.7848 192.332 53.3012L191.612 56.1357C190.741 55.6712 189.775 55.4155 188.789 55.3886C187.803 55.3886 187.241 55.787 187.241 56.4571C187.241 57.1273 187.749 57.4216 189.348 57.9604C191.828 58.8162 192.868 60.0795 192.891 62.0084C192.891 64.4444 190.973 66.2691 187.241 66.2691C185.784 66.2951 184.341 65.974 183.031 65.3318L183.752 62.4023Z", fill: "#1E1E1E" }),
|
|
2604
|
+
/* @__PURE__ */ i.jsx("path", { d: "M50.1985 39.8037H37.1426V79.1965H50.1985V39.8037Z", fill: "#D52B1E" }),
|
|
2605
|
+
/* @__PURE__ */ i.jsx("path", { d: "M63.2545 52.9331H24.0869V66.0625H63.2545V52.9331Z", fill: "#D52B1E" })
|
|
2606
|
+
]
|
|
2607
|
+
}
|
|
2608
|
+
);
|
|
2609
|
+
ie(() => {
|
|
2610
|
+
N(!1), T(!1), $("");
|
|
2611
|
+
}, [e]);
|
|
2612
|
+
const G = () => {
|
|
2613
|
+
const k = O === "light" ? "dark" : "light";
|
|
2614
|
+
F(k), document.documentElement.setAttribute("data-color-scheme", k);
|
|
2615
|
+
}, K = (k) => {
|
|
2616
|
+
t && (k.preventDefault(), t("home")), N(!1), T(!1);
|
|
2617
|
+
}, Z = () => {
|
|
2618
|
+
N(!P), j && T(!1);
|
|
2619
|
+
}, te = () => {
|
|
2620
|
+
T(!j), P && N(!1);
|
|
2621
|
+
}, d = xe(() => {
|
|
2622
|
+
if (!w.trim()) return [];
|
|
2623
|
+
const k = w.toLowerCase();
|
|
2624
|
+
return aa.filter(
|
|
2625
|
+
(D) => D.title.toLowerCase().startsWith(k)
|
|
2626
|
+
);
|
|
2627
|
+
}, [w]), E = (k) => {
|
|
2628
|
+
t && t(k), T(!1), $("");
|
|
2629
|
+
};
|
|
2630
|
+
return /* @__PURE__ */ i.jsxs("header", { className: S.header, children: [
|
|
2631
|
+
f && /* @__PURE__ */ i.jsx("div", { className: S.headerExtension, "data-color-scheme": "light", children: /* @__PURE__ */ i.jsxs("div", { className: S.extensionContentWrapper, children: [
|
|
2632
|
+
C && /* @__PURE__ */ i.jsx("div", { className: S.extensionContent, children: /* @__PURE__ */ i.jsx(
|
|
2633
|
+
St,
|
|
2634
|
+
{
|
|
2635
|
+
"data-size": "sm",
|
|
2636
|
+
checked: O === "dark",
|
|
2637
|
+
onChange: G,
|
|
2638
|
+
label: L("header.darkMode"),
|
|
2639
|
+
color: "neutral",
|
|
2640
|
+
"data-color-scheme": "light"
|
|
2641
|
+
}
|
|
2642
|
+
) }),
|
|
2643
|
+
C && I && /* @__PURE__ */ i.jsx("div", { className: S.extensionDivider }),
|
|
2644
|
+
I && /* @__PURE__ */ i.jsxs("div", { className: S.languageSwitch, children: [
|
|
2645
|
+
/* @__PURE__ */ i.jsx("span", { className: S.languageLabel, children: L("header.language") }),
|
|
2646
|
+
/* @__PURE__ */ i.jsxs(de.TriggerContext, { children: [
|
|
2647
|
+
/* @__PURE__ */ i.jsxs(
|
|
2648
|
+
de.Trigger,
|
|
2649
|
+
{
|
|
2650
|
+
className: S.languageLink,
|
|
2651
|
+
"aria-label": L("header.selectLanguage"),
|
|
2652
|
+
style: { background: "transparent", border: "none", padding: 0, cursor: "pointer", font: "inherit" },
|
|
2653
|
+
children: [
|
|
2654
|
+
R,
|
|
2655
|
+
" ",
|
|
2656
|
+
/* @__PURE__ */ i.jsx(Jn, { "aria-hidden": !0 })
|
|
2657
|
+
]
|
|
2658
|
+
}
|
|
2659
|
+
),
|
|
2660
|
+
/* @__PURE__ */ i.jsx(
|
|
2661
|
+
de,
|
|
2662
|
+
{
|
|
2663
|
+
"data-color-scheme": O,
|
|
2664
|
+
placement: "bottom-end",
|
|
2665
|
+
children: /* @__PURE__ */ i.jsxs(de.List, { children: [
|
|
2666
|
+
/* @__PURE__ */ i.jsx(de.Item, { children: /* @__PURE__ */ i.jsx(de.Button, { onClick: () => A("NO"), children: "Norsk (NO)" }) }),
|
|
2667
|
+
/* @__PURE__ */ i.jsx(de.Item, { children: /* @__PURE__ */ i.jsx(de.Button, { onClick: () => A("EN"), children: "English (EN)" }) })
|
|
2668
|
+
] })
|
|
2669
|
+
}
|
|
2670
|
+
)
|
|
2671
|
+
] })
|
|
2672
|
+
] })
|
|
2673
|
+
] }) }),
|
|
2674
|
+
/* @__PURE__ */ i.jsxs("div", { className: S.headerInner, children: [
|
|
2675
|
+
/* @__PURE__ */ i.jsxs("div", { className: S.logoWrapper, children: [
|
|
2676
|
+
/* @__PURE__ */ i.jsx(ze, { href: "/", className: S.logo, "aria-label": L("header.homeAriaLabel"), onClick: K, children: /* @__PURE__ */ i.jsx(Q, {}) }),
|
|
2677
|
+
/* @__PURE__ */ i.jsx("div", { className: S.secondaryLogoWrapper, children: g && v ? /* @__PURE__ */ i.jsx(
|
|
2678
|
+
"img",
|
|
2679
|
+
{
|
|
2680
|
+
src: O === "dark" && m ? m : v,
|
|
2681
|
+
alt: h,
|
|
2682
|
+
className: S.secondaryLogo
|
|
2683
|
+
}
|
|
2684
|
+
) : g ? /* @__PURE__ */ i.jsx("div", { className: S.slotComponent, children: /* @__PURE__ */ i.jsx("div", { className: S.slotContainer, children: /* @__PURE__ */ i.jsx("p", { className: S.slotText, children: "SLOT" }) }) }) : null })
|
|
2685
|
+
] }),
|
|
2686
|
+
x && b && b.length > 0 && /* @__PURE__ */ i.jsx("nav", { className: S.navItems, children: b.map((k, D) => /* @__PURE__ */ i.jsx(
|
|
2687
|
+
ze,
|
|
2688
|
+
{
|
|
2689
|
+
href: k.href,
|
|
2690
|
+
className: S.navLink,
|
|
2691
|
+
onClick: (U) => {
|
|
2692
|
+
t && (U.preventDefault(), t(k.href));
|
|
2693
|
+
},
|
|
2694
|
+
children: k.label
|
|
2695
|
+
},
|
|
2696
|
+
D
|
|
2697
|
+
)) }),
|
|
2698
|
+
/* @__PURE__ */ i.jsxs("div", { className: S.actions, children: [
|
|
2699
|
+
r && /* @__PURE__ */ i.jsxs(
|
|
2700
|
+
ye,
|
|
2701
|
+
{
|
|
2702
|
+
variant: "primary",
|
|
2703
|
+
"data-color": "main",
|
|
2704
|
+
"data-size": "md",
|
|
2705
|
+
className: S.ctaButton,
|
|
2706
|
+
onClick: u,
|
|
2707
|
+
children: [
|
|
2708
|
+
c,
|
|
2709
|
+
/* @__PURE__ */ i.jsx("span", { className: S.buttonText, children: l || L("header.supportUs") })
|
|
2710
|
+
]
|
|
2711
|
+
}
|
|
2712
|
+
),
|
|
2713
|
+
!f && y && /* @__PURE__ */ i.jsx("div", { className: S.themeToggle, children: /* @__PURE__ */ i.jsx(
|
|
2714
|
+
St,
|
|
2715
|
+
{
|
|
2716
|
+
checked: O === "dark",
|
|
2717
|
+
onChange: G,
|
|
2718
|
+
"aria-label": L("header.toggleTheme")
|
|
2719
|
+
}
|
|
2720
|
+
) }),
|
|
2721
|
+
o && /* @__PURE__ */ i.jsxs("div", { className: S.userInfo, children: [
|
|
2722
|
+
/* @__PURE__ */ i.jsx(Ue, { "data-size": "md", className: S.userName, children: "Frodo Baggins" }),
|
|
2723
|
+
/* @__PURE__ */ i.jsx(wt, { "aria-label": "Frodo Baggins", "data-color": "main", variant: "circle", initials: "FB" })
|
|
2724
|
+
] }),
|
|
2725
|
+
s && /* @__PURE__ */ i.jsxs("a", { href: "#", className: S.loginLink, children: [
|
|
2726
|
+
/* @__PURE__ */ i.jsx("span", { className: S.loginText, children: L("header.login") }),
|
|
2727
|
+
/* @__PURE__ */ i.jsx("div", { className: S.underline })
|
|
2728
|
+
] }),
|
|
2729
|
+
a && /* @__PURE__ */ i.jsx("div", { className: S.searchButtonWrapper, children: /* @__PURE__ */ i.jsxs(
|
|
2730
|
+
ye,
|
|
2731
|
+
{
|
|
2732
|
+
variant: "secondary",
|
|
2733
|
+
"data-color": "main",
|
|
2734
|
+
"data-size": "md",
|
|
2735
|
+
onClick: te,
|
|
2736
|
+
"aria-expanded": j,
|
|
2737
|
+
"aria-label": L(j ? "header.closeSearch" : "header.openSearch"),
|
|
2738
|
+
children: [
|
|
2739
|
+
j ? /* @__PURE__ */ i.jsx(ft, { "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(mt, { "aria-hidden": !0 }),
|
|
2740
|
+
/* @__PURE__ */ i.jsx("span", { className: S.buttonText, children: L(j ? "header.close" : "header.search") })
|
|
2741
|
+
]
|
|
2742
|
+
}
|
|
2743
|
+
) }),
|
|
2744
|
+
p && /* @__PURE__ */ i.jsxs(
|
|
2745
|
+
ye,
|
|
2746
|
+
{
|
|
2747
|
+
variant: "primary",
|
|
2748
|
+
"data-color": "main",
|
|
2749
|
+
"data-size": "md",
|
|
2750
|
+
onClick: Z,
|
|
2751
|
+
"aria-expanded": P,
|
|
2752
|
+
"aria-label": L(P ? "header.closeMenu" : "header.openMenu"),
|
|
2753
|
+
className: S.menuButton,
|
|
2754
|
+
children: [
|
|
2755
|
+
P ? /* @__PURE__ */ i.jsx(ft, { "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Qn, { "aria-hidden": !0 }),
|
|
2756
|
+
/* @__PURE__ */ i.jsx("span", { className: S.buttonText, children: L(P ? "header.close" : "header.menu") })
|
|
2757
|
+
]
|
|
2758
|
+
}
|
|
2759
|
+
)
|
|
2760
|
+
] })
|
|
2761
|
+
] }),
|
|
2762
|
+
P && /* @__PURE__ */ i.jsx("div", { className: S.menuOverlay, children: /* @__PURE__ */ i.jsxs("div", { className: S.menuContent, children: [
|
|
2763
|
+
/* @__PURE__ */ i.jsx("div", { className: S.menuLeftColumn, "aria-hidden": "true" }),
|
|
2764
|
+
/* @__PURE__ */ i.jsx("div", { className: S.menuRightColumn, children: /* @__PURE__ */ i.jsx("div", { className: S.slotContent, children: n }) })
|
|
2765
|
+
] }) }),
|
|
2766
|
+
j && /* @__PURE__ */ i.jsx("div", { className: S.searchOverlay, children: /* @__PURE__ */ i.jsxs("div", { className: S.searchContent, children: [
|
|
2767
|
+
/* @__PURE__ */ i.jsxs(Oe, { children: [
|
|
2768
|
+
/* @__PURE__ */ i.jsx(
|
|
2769
|
+
Oe.Input,
|
|
2770
|
+
{
|
|
2771
|
+
"aria-label": L("header.search"),
|
|
2772
|
+
placeholder: L("header.searchPlaceholder"),
|
|
2773
|
+
value: w,
|
|
2774
|
+
onChange: (k) => $(k.target.value)
|
|
2775
|
+
}
|
|
2776
|
+
),
|
|
2777
|
+
/* @__PURE__ */ i.jsx(Oe.Button, { "aria-label": L("header.search") }),
|
|
2778
|
+
/* @__PURE__ */ i.jsx(Oe.ClearButton, { onClick: () => $(""), "aria-label": L("header.clearSearch") })
|
|
2779
|
+
] }),
|
|
2780
|
+
w && /* @__PURE__ */ i.jsx("div", { className: S.searchResults, children: d.length > 0 ? /* @__PURE__ */ i.jsxs("div", { className: S.suggestionsSection, children: [
|
|
2781
|
+
/* @__PURE__ */ i.jsx("h3", { className: S.suggestionsTitle, children: L("header.suggestions") }),
|
|
2782
|
+
/* @__PURE__ */ i.jsx("ul", { className: S.resultList, children: d.slice(0, 5).map((k) => /* @__PURE__ */ i.jsx("li", { className: S.resultItem, children: /* @__PURE__ */ i.jsxs(
|
|
2783
|
+
"button",
|
|
2784
|
+
{
|
|
2785
|
+
className: S.resultLink,
|
|
2786
|
+
onClick: () => E(k.path),
|
|
2787
|
+
children: [
|
|
2788
|
+
/* @__PURE__ */ i.jsx("span", { className: S.suggestionIcon, children: /* @__PURE__ */ i.jsx(mt, { "aria-hidden": !0 }) }),
|
|
2789
|
+
/* @__PURE__ */ i.jsx("span", { className: S.suggestionText, children: (() => {
|
|
2790
|
+
const D = k.title.toLowerCase().indexOf(w.toLowerCase());
|
|
2791
|
+
if (D === -1) return /* @__PURE__ */ i.jsx("span", { className: S.remainingText, children: k.title });
|
|
2792
|
+
const U = k.title.slice(0, D), z = k.title.slice(D, D + w.length), M = k.title.slice(D + w.length);
|
|
2793
|
+
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2794
|
+
/* @__PURE__ */ i.jsx("span", { className: S.remainingText, children: U }),
|
|
2795
|
+
/* @__PURE__ */ i.jsx("span", { className: S.highlightedText, children: z }),
|
|
2796
|
+
/* @__PURE__ */ i.jsx("span", { className: S.remainingText, children: M })
|
|
2797
|
+
] });
|
|
2798
|
+
})() })
|
|
2799
|
+
]
|
|
2800
|
+
}
|
|
2801
|
+
) }, k.id)) }),
|
|
2802
|
+
d.length > 5 && /* @__PURE__ */ i.jsxs(
|
|
2803
|
+
ze,
|
|
2804
|
+
{
|
|
2805
|
+
href: "#",
|
|
2806
|
+
"data-color": "neutral",
|
|
2807
|
+
className: S.viewAllLink,
|
|
2808
|
+
onClick: (k) => {
|
|
2809
|
+
k.preventDefault(), t && t(`search/${w}`), T(!1), $("");
|
|
2810
|
+
},
|
|
2811
|
+
children: [
|
|
2812
|
+
L("header.viewAll"),
|
|
2813
|
+
" (",
|
|
2814
|
+
d.length,
|
|
2815
|
+
")"
|
|
2816
|
+
]
|
|
2817
|
+
}
|
|
2818
|
+
)
|
|
2819
|
+
] }) : /* @__PURE__ */ i.jsx("div", { className: S.noResults, children: /* @__PURE__ */ i.jsxs(Ue, { children: [
|
|
2820
|
+
L("header.noResults"),
|
|
2821
|
+
' "',
|
|
2822
|
+
w,
|
|
2823
|
+
'"'
|
|
2824
|
+
] }) }) })
|
|
2825
|
+
] }) })
|
|
2826
|
+
] });
|
|
2827
|
+
};
|
|
2443
2828
|
export {
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2829
|
+
or as Alert,
|
|
2830
|
+
wt as Avatar,
|
|
2831
|
+
sr as Badge,
|
|
2832
|
+
ua as BadgePosition,
|
|
2833
|
+
fa as Breadcrumbs,
|
|
2834
|
+
pa as BreadcrumbsItem,
|
|
2835
|
+
ga as BreadcrumbsLink,
|
|
2836
|
+
ma as BreadcrumbsList,
|
|
2837
|
+
ye as Button,
|
|
2838
|
+
ar as Card,
|
|
2839
|
+
ha as CardBlock,
|
|
2840
|
+
ns as Carousel,
|
|
2841
|
+
ir as Checkbox,
|
|
2842
|
+
ba as Chip,
|
|
2843
|
+
so as DateInput,
|
|
2844
|
+
Xr as DatePicker,
|
|
2845
|
+
xa as Details,
|
|
2846
|
+
ya as Dialog,
|
|
2847
|
+
Ca as Divider,
|
|
2848
|
+
de as Dropdown,
|
|
2849
|
+
_a as ErrorSummary,
|
|
2850
|
+
ka as Field,
|
|
2851
|
+
os as FieldCounter,
|
|
2852
|
+
rs as FieldDescription,
|
|
2853
|
+
ja as Fieldset,
|
|
2854
|
+
Va as Header,
|
|
2855
|
+
ss as Heading,
|
|
2856
|
+
Sa as Input,
|
|
2857
|
+
as as Label,
|
|
2858
|
+
ze as Link,
|
|
2859
|
+
La as List,
|
|
2860
|
+
Ta as Pagination,
|
|
2861
|
+
Ue as Paragraph,
|
|
2862
|
+
Na as Popover,
|
|
2863
|
+
wa as Radio,
|
|
2864
|
+
Oe as Search,
|
|
2865
|
+
Pa as Select,
|
|
2866
|
+
Da as SkeletonLoader,
|
|
2867
|
+
Ma as SkipLink,
|
|
2868
|
+
ts as Spinner,
|
|
2869
|
+
is as Suggestion,
|
|
2870
|
+
St as Switch,
|
|
2871
|
+
Oa as Table,
|
|
2872
|
+
Ra as Tabs,
|
|
2873
|
+
Aa as Tag,
|
|
2874
|
+
Ba as Textarea,
|
|
2875
|
+
$a as Textfield,
|
|
2876
|
+
Fa as ToggleGroup,
|
|
2877
|
+
qa as Tooltip,
|
|
2878
|
+
cs as ValidationMessage,
|
|
2879
|
+
va as useCheckboxGroup,
|
|
2880
|
+
Ea as usePagination,
|
|
2881
|
+
Ia as useRadioGroup
|
|
2496
2882
|
};
|