rk-designsystem 1.1.35 → 1.1.37
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 +1937 -590
- package/dist/componentlibrary.umd.js +4 -4
- package/dist/index.d.ts +79 -10
- package/dist/rk-designsystem.css +1 -1
- package/package.json +2 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Alert as
|
|
3
|
-
import { startOfMonth as
|
|
4
|
-
|
|
1
|
+
import bt, { forwardRef as ce, useState as ge, useEffect as ie, useMemo as ke, useCallback as te, useRef as We } from "react";
|
|
2
|
+
import { Alert as Rt, Avatar as Ot, Badge as $t, BadgePosition as Ft, Breadcrumbs as Bt, BreadcrumbsList as Vt, BreadcrumbsItem as Wt, BreadcrumbsLink as zt, Button as we, Card as Ht, CardBlock as Yt, Checkbox as Gt, Fieldset as vt, useCheckboxGroup as qt, Chip as Kt, Details as Ut, Dialog as Xt, Divider as Jt, Dropdown as Qt, ErrorSummary as Zt, FieldDescription as en, FieldCounter as tn, Field as nn, Heading as rn, Input as on, Label as sn, Link as an, List as cn, Pagination as ln, usePagination as un, Paragraph as dn, Popover as fn, Radio as mn, useRadioGroup as pn, Search as hn, Select as gn, Skeleton as bn, SkipLink as vn, Spinner as yn, EXPERIMENTAL_Suggestion as xn, Switch as Sn, Table as _n, Tabs as kn, Tag as En, Textarea as Cn, Textfield as wn, ToggleGroup as Pn, Tooltip as Tn, ValidationMessage as Nn } from "@digdir/designsystemet-react";
|
|
3
|
+
import { startOfMonth as pe, isValid as Be, isSameMonth as st, startOfWeek as yt, format as ve, addDays as xt, subMonths as jn, addMonths as Ln, isSameDay as In, isToday as Mn, eachDayOfInterval as An } from "date-fns";
|
|
4
|
+
import { ChevronLeftIcon as Dn, ChevronRightIcon as Rn } from "@navikt/aksel-icons";
|
|
5
|
+
var Ie = { exports: {} }, ye = {};
|
|
5
6
|
/**
|
|
6
7
|
* @license React
|
|
7
8
|
* react-jsx-runtime.production.js
|
|
@@ -11,29 +12,29 @@ var se = { exports: {} }, U = {};
|
|
|
11
12
|
* This source code is licensed under the MIT license found in the
|
|
12
13
|
* LICENSE file in the root directory of this source tree.
|
|
13
14
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return i =
|
|
27
|
-
$$typeof:
|
|
28
|
-
type:
|
|
29
|
-
key:
|
|
15
|
+
var at;
|
|
16
|
+
function On() {
|
|
17
|
+
if (at) return ye;
|
|
18
|
+
at = 1;
|
|
19
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
20
|
+
function n(s, i, a) {
|
|
21
|
+
var r = null;
|
|
22
|
+
if (a !== void 0 && (r = "" + a), i.key !== void 0 && (r = "" + i.key), "key" in i) {
|
|
23
|
+
a = {};
|
|
24
|
+
for (var c in i)
|
|
25
|
+
c !== "key" && (a[c] = i[c]);
|
|
26
|
+
} else a = i;
|
|
27
|
+
return i = a.ref, {
|
|
28
|
+
$$typeof: e,
|
|
29
|
+
type: s,
|
|
30
|
+
key: r,
|
|
30
31
|
ref: i !== void 0 ? i : null,
|
|
31
|
-
props:
|
|
32
|
+
props: a
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
+
return ye.Fragment = t, ye.jsx = n, ye.jsxs = n, ye;
|
|
35
36
|
}
|
|
36
|
-
var
|
|
37
|
+
var xe = {};
|
|
37
38
|
/**
|
|
38
39
|
* @license React
|
|
39
40
|
* react-jsx-runtime.development.js
|
|
@@ -43,318 +44,318 @@ var Q = {};
|
|
|
43
44
|
* This source code is licensed under the MIT license found in the
|
|
44
45
|
* LICENSE file in the root directory of this source tree.
|
|
45
46
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
function
|
|
50
|
-
if (
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
switch (
|
|
55
|
-
case
|
|
47
|
+
var it;
|
|
48
|
+
function $n() {
|
|
49
|
+
return it || (it = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
|
+
function e(l) {
|
|
51
|
+
if (l == null) return null;
|
|
52
|
+
if (typeof l == "function")
|
|
53
|
+
return l.$$typeof === A ? null : l.displayName || l.name || null;
|
|
54
|
+
if (typeof l == "string") return l;
|
|
55
|
+
switch (l) {
|
|
56
|
+
case b:
|
|
56
57
|
return "Fragment";
|
|
57
|
-
case
|
|
58
|
+
case d:
|
|
58
59
|
return "Profiler";
|
|
59
|
-
case
|
|
60
|
+
case m:
|
|
60
61
|
return "StrictMode";
|
|
61
|
-
case
|
|
62
|
+
case T:
|
|
62
63
|
return "Suspense";
|
|
63
|
-
case
|
|
64
|
+
case C:
|
|
64
65
|
return "SuspenseList";
|
|
65
|
-
case
|
|
66
|
+
case $:
|
|
66
67
|
return "Activity";
|
|
67
68
|
}
|
|
68
|
-
if (typeof
|
|
69
|
-
switch (typeof
|
|
69
|
+
if (typeof l == "object")
|
|
70
|
+
switch (typeof l.tag == "number" && console.error(
|
|
70
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
-
),
|
|
72
|
-
case
|
|
72
|
+
), l.$$typeof) {
|
|
73
|
+
case g:
|
|
73
74
|
return "Portal";
|
|
75
|
+
case E:
|
|
76
|
+
return l.displayName || "Context";
|
|
77
|
+
case x:
|
|
78
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case N:
|
|
80
|
+
var _ = l.render;
|
|
81
|
+
return l = l.displayName, l || (l = _.displayName || _.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
74
82
|
case w:
|
|
75
|
-
return
|
|
83
|
+
return _ = l.displayName || null, _ !== null ? _ : e(l.type) || "Memo";
|
|
76
84
|
case j:
|
|
77
|
-
|
|
78
|
-
case N:
|
|
79
|
-
var n = e.render;
|
|
80
|
-
return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
81
|
-
case $:
|
|
82
|
-
return n = e.displayName || null, n !== null ? n : t(e.type) || "Memo";
|
|
83
|
-
case G:
|
|
84
|
-
n = e._payload, e = e._init;
|
|
85
|
+
_ = l._payload, l = l._init;
|
|
85
86
|
try {
|
|
86
|
-
return
|
|
87
|
+
return e(l(_));
|
|
87
88
|
} catch {
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
return "" +
|
|
93
|
+
function t(l) {
|
|
94
|
+
return "" + l;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function n(l) {
|
|
96
97
|
try {
|
|
97
|
-
|
|
98
|
-
var
|
|
98
|
+
t(l);
|
|
99
|
+
var _ = !1;
|
|
99
100
|
} catch {
|
|
100
|
-
|
|
101
|
+
_ = !0;
|
|
101
102
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
103
|
+
if (_) {
|
|
104
|
+
_ = console;
|
|
105
|
+
var I = _.error, M = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
106
|
+
return I.call(
|
|
107
|
+
_,
|
|
107
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
109
|
-
),
|
|
109
|
+
M
|
|
110
|
+
), t(l);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
-
if (
|
|
114
|
-
if (typeof
|
|
113
|
+
function s(l) {
|
|
114
|
+
if (l === b) return "<>";
|
|
115
|
+
if (typeof l == "object" && l !== null && l.$$typeof === j)
|
|
115
116
|
return "<...>";
|
|
116
117
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
118
|
+
var _ = e(l);
|
|
119
|
+
return _ ? "<" + _ + ">" : "<...>";
|
|
119
120
|
} catch {
|
|
120
121
|
return "<...>";
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
function i() {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
125
|
+
var l = F.A;
|
|
126
|
+
return l === null ? null : l.getOwner();
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
+
function a() {
|
|
128
129
|
return Error("react-stack-top-frame");
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
131
|
+
function r(l) {
|
|
132
|
+
if (V.call(l, "key")) {
|
|
133
|
+
var _ = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
134
|
+
if (_ && _.isReactWarning) return !1;
|
|
134
135
|
}
|
|
135
|
-
return
|
|
136
|
+
return l.key !== void 0;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
138
|
+
function c(l, _) {
|
|
139
|
+
function I() {
|
|
140
|
+
X || (X = !0, console.error(
|
|
140
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)",
|
|
141
|
-
|
|
142
|
+
_
|
|
142
143
|
));
|
|
143
144
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
145
|
+
I.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
146
|
+
get: I,
|
|
146
147
|
configurable: !0
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
return
|
|
150
|
+
function o() {
|
|
151
|
+
var l = e(this.type);
|
|
152
|
+
return J[l] || (J[l] = !0, console.error(
|
|
152
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."
|
|
153
|
-
)),
|
|
154
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
var
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
159
|
-
type:
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
156
|
+
function u(l, _, I, M, Q, z) {
|
|
157
|
+
var P = I.ref;
|
|
158
|
+
return l = {
|
|
159
|
+
$$typeof: f,
|
|
160
|
+
type: l,
|
|
161
|
+
key: _,
|
|
162
|
+
props: I,
|
|
163
|
+
_owner: M
|
|
164
|
+
}, (P !== void 0 ? P : null) !== null ? Object.defineProperty(l, "ref", {
|
|
164
165
|
enumerable: !1,
|
|
165
|
-
get:
|
|
166
|
-
}) : Object.defineProperty(
|
|
166
|
+
get: o
|
|
167
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
167
168
|
configurable: !1,
|
|
168
169
|
enumerable: !1,
|
|
169
170
|
writable: !0,
|
|
170
171
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
172
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
172
173
|
configurable: !1,
|
|
173
174
|
enumerable: !1,
|
|
174
175
|
writable: !0,
|
|
175
176
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
177
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
177
178
|
configurable: !1,
|
|
178
179
|
enumerable: !1,
|
|
179
180
|
writable: !0,
|
|
180
|
-
value:
|
|
181
|
-
}), Object.defineProperty(
|
|
181
|
+
value: Q
|
|
182
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
182
183
|
configurable: !1,
|
|
183
184
|
enumerable: !1,
|
|
184
185
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
+
value: z
|
|
187
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
for (
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
189
|
+
function v(l, _, I, M, Q, z) {
|
|
190
|
+
var P = _.children;
|
|
191
|
+
if (P !== void 0)
|
|
192
|
+
if (M)
|
|
193
|
+
if (H(P)) {
|
|
194
|
+
for (M = 0; M < P.length; M++)
|
|
195
|
+
p(P[M]);
|
|
196
|
+
Object.freeze && Object.freeze(P);
|
|
196
197
|
} else
|
|
197
198
|
console.error(
|
|
198
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."
|
|
199
200
|
);
|
|
200
|
-
else
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
return
|
|
201
|
+
else p(P);
|
|
202
|
+
if (V.call(_, "key")) {
|
|
203
|
+
P = e(l);
|
|
204
|
+
var D = Object.keys(_).filter(function(G) {
|
|
205
|
+
return G !== "key";
|
|
205
206
|
});
|
|
206
|
-
|
|
207
|
+
M = 0 < D.length ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}", re[P + M] || (D = 0 < D.length ? "{" + D.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
208
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
209
|
let props = %s;
|
|
209
210
|
<%s {...props} />
|
|
210
211
|
React keys must be passed directly to JSX without using spread:
|
|
211
212
|
let props = %s;
|
|
212
213
|
<%s key={someKey} {...props} />`,
|
|
213
|
-
|
|
214
|
-
m,
|
|
214
|
+
M,
|
|
215
215
|
P,
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
D,
|
|
217
|
+
P
|
|
218
|
+
), re[P + M] = !0);
|
|
218
219
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
227
|
-
),
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
220
|
+
if (P = null, I !== void 0 && (n(I), P = "" + I), r(_) && (n(_.key), P = "" + _.key), "key" in _) {
|
|
221
|
+
I = {};
|
|
222
|
+
for (var q in _)
|
|
223
|
+
q !== "key" && (I[q] = _[q]);
|
|
224
|
+
} else I = _;
|
|
225
|
+
return P && c(
|
|
226
|
+
I,
|
|
227
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
228
|
+
), u(
|
|
229
|
+
l,
|
|
230
|
+
P,
|
|
231
|
+
I,
|
|
231
232
|
i(),
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
Q,
|
|
234
|
+
z
|
|
234
235
|
);
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
-
|
|
237
|
+
function p(l) {
|
|
238
|
+
h(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === j && (l._payload.status === "fulfilled" ? h(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
238
239
|
}
|
|
239
|
-
function
|
|
240
|
-
return typeof
|
|
240
|
+
function h(l) {
|
|
241
|
+
return typeof l == "object" && l !== null && l.$$typeof === f;
|
|
241
242
|
}
|
|
242
|
-
var
|
|
243
|
+
var y = bt, f = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), E = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), A = Symbol.for("react.client.reference"), F = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, H = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
243
244
|
return null;
|
|
244
245
|
};
|
|
245
|
-
|
|
246
|
-
react_stack_bottom_frame: function(
|
|
247
|
-
return
|
|
246
|
+
y = {
|
|
247
|
+
react_stack_bottom_frame: function(l) {
|
|
248
|
+
return l();
|
|
248
249
|
}
|
|
249
250
|
};
|
|
250
|
-
var
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
)(),
|
|
254
|
-
|
|
255
|
-
var
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
251
|
+
var X, J = {}, K = y.react_stack_bottom_frame.bind(
|
|
252
|
+
y,
|
|
253
|
+
a
|
|
254
|
+
)(), U = W(s(a)), re = {};
|
|
255
|
+
xe.Fragment = b, xe.jsx = function(l, _, I) {
|
|
256
|
+
var M = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return v(
|
|
258
|
+
l,
|
|
259
|
+
_,
|
|
260
|
+
I,
|
|
260
261
|
!1,
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
M ? Error("react-stack-top-frame") : K,
|
|
263
|
+
M ? W(s(l)) : U
|
|
263
264
|
);
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
}, xe.jsxs = function(l, _, I) {
|
|
266
|
+
var M = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return v(
|
|
268
|
+
l,
|
|
269
|
+
_,
|
|
270
|
+
I,
|
|
270
271
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
M ? Error("react-stack-top-frame") : K,
|
|
273
|
+
M ? W(s(l)) : U
|
|
273
274
|
);
|
|
274
275
|
};
|
|
275
|
-
})()),
|
|
276
|
-
}
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
return
|
|
280
|
-
}
|
|
281
|
-
var
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
function
|
|
297
|
-
return (
|
|
298
|
-
const
|
|
299
|
-
return
|
|
276
|
+
})()), xe;
|
|
277
|
+
}
|
|
278
|
+
var ct;
|
|
279
|
+
function Fn() {
|
|
280
|
+
return ct || (ct = 1, process.env.NODE_ENV === "production" ? Ie.exports = On() : Ie.exports = $n()), Ie.exports;
|
|
281
|
+
}
|
|
282
|
+
var k = Fn();
|
|
283
|
+
const Bn = ce((e, t) => /* @__PURE__ */ k.jsx(Rt, { ref: t, ...e }));
|
|
284
|
+
Bn.displayName = "Alert";
|
|
285
|
+
const Vn = ce((e, t) => /* @__PURE__ */ k.jsx(Ot, { ref: t, ...e }));
|
|
286
|
+
Vn.displayName = "Avatar";
|
|
287
|
+
const Wn = ce((e, t) => /* @__PURE__ */ k.jsx($t, { ref: t, ...e }));
|
|
288
|
+
Wn.displayName = "Badge";
|
|
289
|
+
const Ko = Ft, Uo = Bt, Xo = Vt, Jo = Wt, Qo = zt, zn = we;
|
|
290
|
+
zn.displayName = "Button";
|
|
291
|
+
const Hn = Ht, Zo = Yt;
|
|
292
|
+
Hn.displayName = "Card";
|
|
293
|
+
const Yn = Gt, Gn = vt, es = qt;
|
|
294
|
+
Yn.displayName = "Checkbox";
|
|
295
|
+
Gn.displayName = "Fieldset";
|
|
296
|
+
const ts = Kt;
|
|
297
|
+
function Ve(e) {
|
|
298
|
+
return (t = {}) => {
|
|
299
|
+
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
300
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
300
301
|
};
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
-
return (
|
|
304
|
-
const
|
|
303
|
+
function Se(e) {
|
|
304
|
+
return (t, n) => {
|
|
305
|
+
const s = n != null && n.context ? String(n.context) : "standalone";
|
|
305
306
|
let i;
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
i =
|
|
307
|
+
if (s === "formatting" && e.formattingValues) {
|
|
308
|
+
const r = e.defaultFormattingWidth || e.defaultWidth, c = n != null && n.width ? String(n.width) : r;
|
|
309
|
+
i = e.formattingValues[c] || e.formattingValues[r];
|
|
309
310
|
} else {
|
|
310
|
-
const
|
|
311
|
-
i =
|
|
311
|
+
const r = e.defaultWidth, c = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
312
|
+
i = e.values[c] || e.values[r];
|
|
312
313
|
}
|
|
313
|
-
const
|
|
314
|
-
return i[
|
|
314
|
+
const a = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
315
|
+
return i[a];
|
|
315
316
|
};
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
-
return (
|
|
319
|
-
const
|
|
320
|
-
if (!
|
|
318
|
+
function _e(e) {
|
|
319
|
+
return (t, n = {}) => {
|
|
320
|
+
const s = n.width, i = s && e.matchPatterns[s] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
321
|
+
if (!a)
|
|
321
322
|
return null;
|
|
322
|
-
const
|
|
323
|
+
const r = a[0], c = s && e.parsePatterns[s] || e.parsePatterns[e.defaultParseWidth], o = Array.isArray(c) ? Kn(c, (p) => p.test(r)) : (
|
|
323
324
|
// [TODO] -- I challenge you to fix the type
|
|
324
|
-
|
|
325
|
+
qn(c, (p) => p.test(r))
|
|
325
326
|
);
|
|
326
|
-
let
|
|
327
|
-
|
|
327
|
+
let u;
|
|
328
|
+
u = e.valueCallback ? e.valueCallback(o) : o, u = n.valueCallback ? (
|
|
328
329
|
// [TODO] -- I challenge you to fix the type
|
|
329
|
-
|
|
330
|
-
) :
|
|
331
|
-
const
|
|
332
|
-
return { value:
|
|
330
|
+
n.valueCallback(u)
|
|
331
|
+
) : u;
|
|
332
|
+
const v = t.slice(r.length);
|
|
333
|
+
return { value: u, rest: v };
|
|
333
334
|
};
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
for (const
|
|
337
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
338
|
-
return
|
|
339
|
-
}
|
|
340
|
-
function
|
|
341
|
-
for (let
|
|
342
|
-
if (
|
|
343
|
-
return
|
|
344
|
-
}
|
|
345
|
-
function
|
|
346
|
-
return (
|
|
347
|
-
const
|
|
348
|
-
if (!
|
|
349
|
-
const i =
|
|
350
|
-
if (!
|
|
351
|
-
let
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
return { value:
|
|
336
|
+
function qn(e, t) {
|
|
337
|
+
for (const n in e)
|
|
338
|
+
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
339
|
+
return n;
|
|
340
|
+
}
|
|
341
|
+
function Kn(e, t) {
|
|
342
|
+
for (let n = 0; n < e.length; n++)
|
|
343
|
+
if (t(e[n]))
|
|
344
|
+
return n;
|
|
345
|
+
}
|
|
346
|
+
function Un(e) {
|
|
347
|
+
return (t, n = {}) => {
|
|
348
|
+
const s = t.match(e.matchPattern);
|
|
349
|
+
if (!s) return null;
|
|
350
|
+
const i = s[0], a = t.match(e.parsePattern);
|
|
351
|
+
if (!a) return null;
|
|
352
|
+
let r = e.valueCallback ? e.valueCallback(a[0]) : a[0];
|
|
353
|
+
r = n.valueCallback ? n.valueCallback(r) : r;
|
|
354
|
+
const c = t.slice(i.length);
|
|
355
|
+
return { value: r, rest: c };
|
|
355
356
|
};
|
|
356
357
|
}
|
|
357
|
-
const
|
|
358
|
+
const Xn = {
|
|
358
359
|
lessThanXSeconds: {
|
|
359
360
|
one: "mindre enn ett sekund",
|
|
360
361
|
other: "mindre enn {{count}} sekunder"
|
|
@@ -416,54 +417,54 @@ const Yt = {
|
|
|
416
417
|
one: "nesten ett år",
|
|
417
418
|
other: "nesten {{count}} år"
|
|
418
419
|
}
|
|
419
|
-
},
|
|
420
|
-
let
|
|
421
|
-
const i =
|
|
422
|
-
return typeof i == "string" ?
|
|
423
|
-
},
|
|
420
|
+
}, Jn = (e, t, n) => {
|
|
421
|
+
let s;
|
|
422
|
+
const i = Xn[e];
|
|
423
|
+
return typeof i == "string" ? s = i : t === 1 ? s = i.one : s = i.other.replace("{{count}}", String(t)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "om " + s : s + " siden" : s;
|
|
424
|
+
}, Qn = {
|
|
424
425
|
full: "EEEE d. MMMM y",
|
|
425
426
|
long: "d. MMMM y",
|
|
426
427
|
medium: "d. MMM y",
|
|
427
428
|
short: "dd.MM.y"
|
|
428
|
-
},
|
|
429
|
+
}, Zn = {
|
|
429
430
|
full: "'kl'. HH:mm:ss zzzz",
|
|
430
431
|
long: "HH:mm:ss z",
|
|
431
432
|
medium: "HH:mm:ss",
|
|
432
433
|
short: "HH:mm"
|
|
433
|
-
},
|
|
434
|
+
}, er = {
|
|
434
435
|
full: "{{date}} 'kl.' {{time}}",
|
|
435
436
|
long: "{{date}} 'kl.' {{time}}",
|
|
436
437
|
medium: "{{date}} {{time}}",
|
|
437
438
|
short: "{{date}} {{time}}"
|
|
438
|
-
},
|
|
439
|
-
date:
|
|
440
|
-
formats:
|
|
439
|
+
}, tr = {
|
|
440
|
+
date: Ve({
|
|
441
|
+
formats: Qn,
|
|
441
442
|
defaultWidth: "full"
|
|
442
443
|
}),
|
|
443
|
-
time:
|
|
444
|
-
formats:
|
|
444
|
+
time: Ve({
|
|
445
|
+
formats: Zn,
|
|
445
446
|
defaultWidth: "full"
|
|
446
447
|
}),
|
|
447
|
-
dateTime:
|
|
448
|
-
formats:
|
|
448
|
+
dateTime: Ve({
|
|
449
|
+
formats: er,
|
|
449
450
|
defaultWidth: "full"
|
|
450
451
|
})
|
|
451
|
-
},
|
|
452
|
+
}, nr = {
|
|
452
453
|
lastWeek: "'forrige' eeee 'kl.' p",
|
|
453
454
|
yesterday: "'i går kl.' p",
|
|
454
455
|
today: "'i dag kl.' p",
|
|
455
456
|
tomorrow: "'i morgen kl.' p",
|
|
456
457
|
nextWeek: "EEEE 'kl.' p",
|
|
457
458
|
other: "P"
|
|
458
|
-
},
|
|
459
|
+
}, rr = (e, t, n, s) => nr[e], or = {
|
|
459
460
|
narrow: ["f.Kr.", "e.Kr."],
|
|
460
461
|
abbreviated: ["f.Kr.", "e.Kr."],
|
|
461
462
|
wide: ["før Kristus", "etter Kristus"]
|
|
462
|
-
},
|
|
463
|
+
}, sr = {
|
|
463
464
|
narrow: ["1", "2", "3", "4"],
|
|
464
465
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
465
466
|
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"]
|
|
466
|
-
},
|
|
467
|
+
}, ar = {
|
|
467
468
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
468
469
|
abbreviated: [
|
|
469
470
|
"jan.",
|
|
@@ -493,7 +494,7 @@ const Yt = {
|
|
|
493
494
|
"november",
|
|
494
495
|
"desember"
|
|
495
496
|
]
|
|
496
|
-
},
|
|
497
|
+
}, ir = {
|
|
497
498
|
narrow: ["S", "M", "T", "O", "T", "F", "L"],
|
|
498
499
|
short: ["sø", "ma", "ti", "on", "to", "fr", "lø"],
|
|
499
500
|
abbreviated: ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
|
|
@@ -506,7 +507,7 @@ const Yt = {
|
|
|
506
507
|
"fredag",
|
|
507
508
|
"lørdag"
|
|
508
509
|
]
|
|
509
|
-
},
|
|
510
|
+
}, cr = {
|
|
510
511
|
narrow: {
|
|
511
512
|
am: "a",
|
|
512
513
|
pm: "p",
|
|
@@ -537,46 +538,46 @@ const Yt = {
|
|
|
537
538
|
evening: "på kvelden",
|
|
538
539
|
night: "på natten"
|
|
539
540
|
}
|
|
540
|
-
},
|
|
541
|
-
ordinalNumber:
|
|
542
|
-
era:
|
|
543
|
-
values:
|
|
541
|
+
}, lr = (e, t) => Number(e) + ".", ur = {
|
|
542
|
+
ordinalNumber: lr,
|
|
543
|
+
era: Se({
|
|
544
|
+
values: or,
|
|
544
545
|
defaultWidth: "wide"
|
|
545
546
|
}),
|
|
546
|
-
quarter:
|
|
547
|
-
values:
|
|
547
|
+
quarter: Se({
|
|
548
|
+
values: sr,
|
|
548
549
|
defaultWidth: "wide",
|
|
549
|
-
argumentCallback: (
|
|
550
|
+
argumentCallback: (e) => e - 1
|
|
550
551
|
}),
|
|
551
|
-
month:
|
|
552
|
-
values:
|
|
552
|
+
month: Se({
|
|
553
|
+
values: ar,
|
|
553
554
|
defaultWidth: "wide"
|
|
554
555
|
}),
|
|
555
|
-
day:
|
|
556
|
-
values:
|
|
556
|
+
day: Se({
|
|
557
|
+
values: ir,
|
|
557
558
|
defaultWidth: "wide"
|
|
558
559
|
}),
|
|
559
|
-
dayPeriod:
|
|
560
|
-
values:
|
|
560
|
+
dayPeriod: Se({
|
|
561
|
+
values: cr,
|
|
561
562
|
defaultWidth: "wide"
|
|
562
563
|
})
|
|
563
|
-
},
|
|
564
|
+
}, dr = /^(\d+)\.?/i, fr = /\d+/i, mr = {
|
|
564
565
|
narrow: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
565
566
|
abbreviated: /^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,
|
|
566
567
|
wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i
|
|
567
|
-
},
|
|
568
|
+
}, pr = {
|
|
568
569
|
any: [/^f/i, /^e/i]
|
|
569
|
-
},
|
|
570
|
+
}, hr = {
|
|
570
571
|
narrow: /^[1234]/i,
|
|
571
572
|
abbreviated: /^q[1234]/i,
|
|
572
573
|
wide: /^[1234](\.)? kvartal/i
|
|
573
|
-
},
|
|
574
|
+
}, gr = {
|
|
574
575
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
575
|
-
},
|
|
576
|
+
}, br = {
|
|
576
577
|
narrow: /^[jfmasond]/i,
|
|
577
578
|
abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,
|
|
578
579
|
wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i
|
|
579
|
-
},
|
|
580
|
+
}, vr = {
|
|
580
581
|
narrow: [
|
|
581
582
|
/^j/i,
|
|
582
583
|
/^f/i,
|
|
@@ -605,17 +606,17 @@ const Yt = {
|
|
|
605
606
|
/^n/i,
|
|
606
607
|
/^d/i
|
|
607
608
|
]
|
|
608
|
-
},
|
|
609
|
+
}, yr = {
|
|
609
610
|
narrow: /^[smtofl]/i,
|
|
610
611
|
short: /^(sø|ma|ti|on|to|fr|lø)/i,
|
|
611
612
|
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
|
|
612
613
|
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i
|
|
613
|
-
},
|
|
614
|
+
}, xr = {
|
|
614
615
|
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]
|
|
615
|
-
},
|
|
616
|
+
}, Sr = {
|
|
616
617
|
narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,
|
|
617
618
|
any: /^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i
|
|
618
|
-
},
|
|
619
|
+
}, _r = {
|
|
619
620
|
any: {
|
|
620
621
|
am: /^a(\.?\s?m\.?)?$/i,
|
|
621
622
|
pm: /^p(\.?\s?m\.?)?$/i,
|
|
@@ -626,55 +627,55 @@ const Yt = {
|
|
|
626
627
|
evening: /kveld/i,
|
|
627
628
|
night: /natt/i
|
|
628
629
|
}
|
|
629
|
-
},
|
|
630
|
-
ordinalNumber:
|
|
631
|
-
matchPattern:
|
|
632
|
-
parsePattern:
|
|
633
|
-
valueCallback: (
|
|
630
|
+
}, kr = {
|
|
631
|
+
ordinalNumber: Un({
|
|
632
|
+
matchPattern: dr,
|
|
633
|
+
parsePattern: fr,
|
|
634
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
634
635
|
}),
|
|
635
|
-
era:
|
|
636
|
-
matchPatterns:
|
|
636
|
+
era: _e({
|
|
637
|
+
matchPatterns: mr,
|
|
637
638
|
defaultMatchWidth: "wide",
|
|
638
|
-
parsePatterns:
|
|
639
|
+
parsePatterns: pr,
|
|
639
640
|
defaultParseWidth: "any"
|
|
640
641
|
}),
|
|
641
|
-
quarter:
|
|
642
|
-
matchPatterns:
|
|
642
|
+
quarter: _e({
|
|
643
|
+
matchPatterns: hr,
|
|
643
644
|
defaultMatchWidth: "wide",
|
|
644
|
-
parsePatterns:
|
|
645
|
+
parsePatterns: gr,
|
|
645
646
|
defaultParseWidth: "any",
|
|
646
|
-
valueCallback: (
|
|
647
|
+
valueCallback: (e) => e + 1
|
|
647
648
|
}),
|
|
648
|
-
month:
|
|
649
|
-
matchPatterns:
|
|
649
|
+
month: _e({
|
|
650
|
+
matchPatterns: br,
|
|
650
651
|
defaultMatchWidth: "wide",
|
|
651
|
-
parsePatterns:
|
|
652
|
+
parsePatterns: vr,
|
|
652
653
|
defaultParseWidth: "any"
|
|
653
654
|
}),
|
|
654
|
-
day:
|
|
655
|
-
matchPatterns:
|
|
655
|
+
day: _e({
|
|
656
|
+
matchPatterns: yr,
|
|
656
657
|
defaultMatchWidth: "wide",
|
|
657
|
-
parsePatterns:
|
|
658
|
+
parsePatterns: xr,
|
|
658
659
|
defaultParseWidth: "any"
|
|
659
660
|
}),
|
|
660
|
-
dayPeriod:
|
|
661
|
-
matchPatterns:
|
|
661
|
+
dayPeriod: _e({
|
|
662
|
+
matchPatterns: Sr,
|
|
662
663
|
defaultMatchWidth: "any",
|
|
663
|
-
parsePatterns:
|
|
664
|
+
parsePatterns: _r,
|
|
664
665
|
defaultParseWidth: "any"
|
|
665
666
|
})
|
|
666
|
-
},
|
|
667
|
+
}, he = {
|
|
667
668
|
code: "nb",
|
|
668
|
-
formatDistance:
|
|
669
|
-
formatLong:
|
|
670
|
-
formatRelative:
|
|
671
|
-
localize:
|
|
672
|
-
match:
|
|
669
|
+
formatDistance: Jn,
|
|
670
|
+
formatLong: tr,
|
|
671
|
+
formatRelative: rr,
|
|
672
|
+
localize: ur,
|
|
673
|
+
match: kr,
|
|
673
674
|
options: {
|
|
674
675
|
weekStartsOn: 1,
|
|
675
676
|
firstWeekContainsDate: 4
|
|
676
677
|
}
|
|
677
|
-
},
|
|
678
|
+
}, St = ({ title: e, ...t }) => /* @__PURE__ */ k.jsxs(
|
|
678
679
|
"svg",
|
|
679
680
|
{
|
|
680
681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -682,12 +683,12 @@ const Yt = {
|
|
|
682
683
|
height: "1em",
|
|
683
684
|
viewBox: "0 0 28 28",
|
|
684
685
|
fill: "none",
|
|
685
|
-
"aria-hidden":
|
|
686
|
+
"aria-hidden": e ? void 0 : !0,
|
|
686
687
|
focusable: "false",
|
|
687
|
-
...
|
|
688
|
+
...t,
|
|
688
689
|
children: [
|
|
689
|
-
|
|
690
|
-
/* @__PURE__ */
|
|
690
|
+
e && /* @__PURE__ */ k.jsx("title", { children: e }),
|
|
691
|
+
/* @__PURE__ */ k.jsx(
|
|
691
692
|
"path",
|
|
692
693
|
{
|
|
693
694
|
fillRule: "evenodd",
|
|
@@ -699,8 +700,8 @@ const Yt = {
|
|
|
699
700
|
]
|
|
700
701
|
}
|
|
701
702
|
);
|
|
702
|
-
|
|
703
|
-
const
|
|
703
|
+
St.displayName = "ChevronLeftIcon";
|
|
704
|
+
const _t = ({ title: e, ...t }) => /* @__PURE__ */ k.jsxs(
|
|
704
705
|
"svg",
|
|
705
706
|
{
|
|
706
707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -708,12 +709,12 @@ const Re = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
|
|
|
708
709
|
height: "1em",
|
|
709
710
|
viewBox: "0 0 28 28",
|
|
710
711
|
fill: "none",
|
|
711
|
-
"aria-hidden":
|
|
712
|
+
"aria-hidden": e ? void 0 : !0,
|
|
712
713
|
focusable: "false",
|
|
713
|
-
...
|
|
714
|
+
...t,
|
|
714
715
|
children: [
|
|
715
|
-
|
|
716
|
-
/* @__PURE__ */
|
|
716
|
+
e && /* @__PURE__ */ k.jsx("title", { children: e }),
|
|
717
|
+
/* @__PURE__ */ k.jsx(
|
|
717
718
|
"path",
|
|
718
719
|
{
|
|
719
720
|
fillRule: "evenodd",
|
|
@@ -725,360 +726,1706 @@ const Re = ({ title: t, ...a }) => /* @__PURE__ */ s.jsxs(
|
|
|
725
726
|
]
|
|
726
727
|
}
|
|
727
728
|
);
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
calendarContainer:
|
|
731
|
-
calendarHeader:
|
|
732
|
-
monthYear:
|
|
733
|
-
navigationButtons:
|
|
734
|
-
grid:
|
|
735
|
-
dayNameCell:
|
|
736
|
-
dateCell:
|
|
737
|
-
dateNumberContainer:
|
|
738
|
-
otherMonth:
|
|
739
|
-
selectedDate:
|
|
740
|
-
},
|
|
741
|
-
const
|
|
742
|
-
return
|
|
743
|
-
},
|
|
744
|
-
initialDate:
|
|
745
|
-
selectedDate:
|
|
746
|
-
// Prop for
|
|
747
|
-
onDateSelect:
|
|
748
|
-
"data-color":
|
|
749
|
-
// <--
|
|
729
|
+
_t.displayName = "ChevronRightIcon";
|
|
730
|
+
const Er = "_calendarContainer_10l5p_1", Cr = "_calendarHeader_10l5p_14", wr = "_monthYear_10l5p_21", Pr = "_navigationButtons_10l5p_32", Tr = "_grid_10l5p_41", Nr = "_dayNameCell_10l5p_48", jr = "_dateCell_10l5p_65", Lr = "_dateNumberContainer_10l5p_90", Ir = "_otherMonth_10l5p_103", Mr = "_selectedDate_10l5p_129", Z = {
|
|
731
|
+
calendarContainer: Er,
|
|
732
|
+
calendarHeader: Cr,
|
|
733
|
+
monthYear: wr,
|
|
734
|
+
navigationButtons: Pr,
|
|
735
|
+
grid: Tr,
|
|
736
|
+
dayNameCell: Nr,
|
|
737
|
+
dateCell: jr,
|
|
738
|
+
dateNumberContainer: Lr,
|
|
739
|
+
otherMonth: Ir,
|
|
740
|
+
selectedDate: Mr
|
|
741
|
+
}, Ar = (e) => {
|
|
742
|
+
const t = pe(e), n = yt(t, { locale: he }), s = xt(n, 41);
|
|
743
|
+
return An({ start: n, end: s });
|
|
744
|
+
}, lt = (e) => e && e.charAt(0).toUpperCase() + e.slice(1), Dr = ({
|
|
745
|
+
initialDate: e = /* @__PURE__ */ new Date(),
|
|
746
|
+
selectedDate: t = null,
|
|
747
|
+
// Prop for valgt dato
|
|
748
|
+
onDateSelect: n,
|
|
749
|
+
"data-color": s,
|
|
750
|
+
// <-- Destrukturert
|
|
750
751
|
"data-size": i
|
|
751
|
-
// <--
|
|
752
|
+
// <-- Destrukturert
|
|
752
753
|
}) => {
|
|
753
|
-
const [
|
|
754
|
-
|
|
754
|
+
const [a, r] = ge(
|
|
755
|
+
pe(t && Be(t) ? t : e)
|
|
755
756
|
);
|
|
756
|
-
|
|
757
|
-
if (
|
|
758
|
-
const
|
|
759
|
-
|
|
757
|
+
ie(() => {
|
|
758
|
+
if (t && Be(t)) {
|
|
759
|
+
const d = pe(t);
|
|
760
|
+
st(d, a) || r(d);
|
|
760
761
|
}
|
|
761
|
-
}, [
|
|
762
|
-
const
|
|
763
|
-
() =>
|
|
764
|
-
[
|
|
765
|
-
),
|
|
766
|
-
const
|
|
767
|
-
return Array.from({ length: 7 }).map((
|
|
768
|
-
const N =
|
|
769
|
-
return
|
|
762
|
+
}, [t]);
|
|
763
|
+
const c = ke(() => pe(/* @__PURE__ */ new Date()), []), o = ke(() => !1, [a, c]), u = ke(
|
|
764
|
+
() => Ar(a),
|
|
765
|
+
[a]
|
|
766
|
+
), v = ke(() => {
|
|
767
|
+
const d = yt(/* @__PURE__ */ new Date(), { locale: he });
|
|
768
|
+
return Array.from({ length: 7 }).map((x, E) => {
|
|
769
|
+
const N = ve(xt(d, E), "EEEEEE", { locale: he });
|
|
770
|
+
return lt(N);
|
|
770
771
|
});
|
|
771
|
-
}, []),
|
|
772
|
-
|
|
773
|
-
}, [
|
|
774
|
-
|
|
775
|
-
}, []),
|
|
776
|
-
(
|
|
777
|
-
|
|
772
|
+
}, []), p = te(() => {
|
|
773
|
+
o || r((d) => pe(jn(d, 1)));
|
|
774
|
+
}, [o]), h = te(() => {
|
|
775
|
+
r((d) => pe(Ln(d, 1)));
|
|
776
|
+
}, []), y = te(
|
|
777
|
+
(d) => {
|
|
778
|
+
n && n(d);
|
|
778
779
|
},
|
|
779
|
-
[
|
|
780
|
-
),
|
|
781
|
-
(
|
|
782
|
-
(
|
|
780
|
+
[n]
|
|
781
|
+
), f = te(
|
|
782
|
+
(d, x) => {
|
|
783
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), y(x));
|
|
783
784
|
},
|
|
784
|
-
[
|
|
785
|
-
),
|
|
786
|
-
return /* @__PURE__ */
|
|
785
|
+
[y]
|
|
786
|
+
), g = ve(a, "MMMM", { locale: he }), b = ve(a, "yyyy", { locale: he }), m = `${lt(g)} ${b}`;
|
|
787
|
+
return /* @__PURE__ */ k.jsxs(
|
|
787
788
|
"div",
|
|
788
789
|
{
|
|
789
|
-
className:
|
|
790
|
-
"data-color":
|
|
790
|
+
className: Z.calendarContainer,
|
|
791
|
+
"data-color": s,
|
|
791
792
|
"data-size": i,
|
|
792
793
|
children: [
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
|
|
794
|
+
/* @__PURE__ */ k.jsxs("div", { className: Z.calendarHeader, children: [
|
|
795
|
+
/* @__PURE__ */ k.jsx("span", { className: Z.monthYear, children: m }),
|
|
796
|
+
/* @__PURE__ */ k.jsxs("div", { className: Z.navigationButtons, children: [
|
|
797
|
+
/* @__PURE__ */ k.jsx(
|
|
798
|
+
we,
|
|
798
799
|
{
|
|
799
800
|
variant: "tertiary",
|
|
800
801
|
icon: !0,
|
|
801
|
-
onClick:
|
|
802
|
+
onClick: p,
|
|
802
803
|
"aria-label": "Forrige måned",
|
|
803
|
-
disabled:
|
|
804
|
-
children: /* @__PURE__ */
|
|
804
|
+
disabled: o,
|
|
805
|
+
children: /* @__PURE__ */ k.jsx(St, {})
|
|
805
806
|
}
|
|
806
807
|
),
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
|
|
808
|
+
/* @__PURE__ */ k.jsx(
|
|
809
|
+
we,
|
|
809
810
|
{
|
|
810
811
|
variant: "tertiary",
|
|
811
812
|
icon: !0,
|
|
812
|
-
onClick:
|
|
813
|
+
onClick: h,
|
|
813
814
|
"aria-label": "Neste måned",
|
|
814
|
-
children: /* @__PURE__ */
|
|
815
|
+
children: /* @__PURE__ */ k.jsx(_t, {})
|
|
815
816
|
}
|
|
816
817
|
)
|
|
817
818
|
] })
|
|
818
819
|
] }),
|
|
819
|
-
/* @__PURE__ */
|
|
820
|
-
/* @__PURE__ */
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
//
|
|
826
|
-
N && !
|
|
820
|
+
/* @__PURE__ */ k.jsx("div", { className: Z.grid, children: v.map((d) => /* @__PURE__ */ k.jsx("div", { className: Z.dayNameCell, children: d }, d)) }),
|
|
821
|
+
/* @__PURE__ */ k.jsx("div", { className: Z.grid, children: u.map((d) => {
|
|
822
|
+
const x = st(d, a), E = t && Be(t) && In(d, t), N = Mn(d), T = [
|
|
823
|
+
Z.dateCell,
|
|
824
|
+
x ? "" : Z.otherMonth,
|
|
825
|
+
E ? Z.selectedDate : "",
|
|
826
|
+
// Utheving basert på prop
|
|
827
|
+
N && !E ? Z.todayDate : ""
|
|
827
828
|
].filter(Boolean).join(" ");
|
|
828
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ k.jsx(
|
|
829
830
|
"div",
|
|
830
831
|
{
|
|
831
|
-
className:
|
|
832
|
-
onClick: () =>
|
|
833
|
-
onKeyDown: (
|
|
832
|
+
className: T,
|
|
833
|
+
onClick: () => y(d),
|
|
834
|
+
onKeyDown: (C) => f(C, d),
|
|
834
835
|
role: "button",
|
|
835
836
|
tabIndex: 0,
|
|
836
|
-
"aria-pressed":
|
|
837
|
-
"aria-label":
|
|
838
|
-
children: /* @__PURE__ */
|
|
837
|
+
"aria-pressed": E ?? !1,
|
|
838
|
+
"aria-label": ve(d, "PPP", { locale: he }),
|
|
839
|
+
children: /* @__PURE__ */ k.jsx("span", { className: Z.dateNumberContainer, children: ve(d, "d") })
|
|
839
840
|
},
|
|
840
|
-
|
|
841
|
+
d.toISOString()
|
|
841
842
|
);
|
|
842
843
|
}) })
|
|
843
844
|
]
|
|
844
845
|
}
|
|
845
846
|
);
|
|
846
847
|
};
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
fieldset:
|
|
850
|
-
description:
|
|
851
|
-
error:
|
|
852
|
-
inputWrapper:
|
|
853
|
-
inputWrapperError:
|
|
854
|
-
suffixButton:
|
|
855
|
-
suffixButtonInteractive:
|
|
856
|
-
},
|
|
857
|
-
const
|
|
858
|
-
return
|
|
859
|
-
},
|
|
860
|
-
let
|
|
861
|
-
if (
|
|
862
|
-
const
|
|
863
|
-
!isNaN(
|
|
864
|
-
}
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
!isNaN(
|
|
868
|
-
}
|
|
869
|
-
return
|
|
870
|
-
},
|
|
871
|
-
(
|
|
848
|
+
Dr.displayName = "DatePicker";
|
|
849
|
+
const Rr = "_fieldset_16fx7_2", Or = "_description_16fx7_14", $r = "_error_16fx7_21", Fr = "_inputWrapper_16fx7_30", Br = "_inputWrapperError_16fx7_42", Vr = "_suffixButton_16fx7_80", Wr = "_suffixButtonInteractive_16fx7_100", de = {
|
|
850
|
+
fieldset: Rr,
|
|
851
|
+
description: Or,
|
|
852
|
+
error: $r,
|
|
853
|
+
inputWrapper: Fr,
|
|
854
|
+
inputWrapperError: Br,
|
|
855
|
+
suffixButton: Vr,
|
|
856
|
+
suffixButtonInteractive: Wr
|
|
857
|
+
}, ut = (e) => {
|
|
858
|
+
const t = e.slice(0, 2), n = e.slice(2, 4), s = e.slice(4, 8);
|
|
859
|
+
return e.length > 4 ? `${t}.${n}.${s}` : e.length > 2 ? `${t}.${n}` : e.length > 0 ? t : "";
|
|
860
|
+
}, dt = (e) => (e || "").replace(/\D/g, ""), ft = (e) => {
|
|
861
|
+
let t = e;
|
|
862
|
+
if (t.length >= 2) {
|
|
863
|
+
const n = parseInt(t.substring(0, 2), 10);
|
|
864
|
+
!isNaN(n) && n > 31 && (t = "31" + t.substring(2));
|
|
865
|
+
}
|
|
866
|
+
if (t.length >= 4) {
|
|
867
|
+
const n = parseInt(t.substring(2, 4), 10);
|
|
868
|
+
!isNaN(n) && n > 12 && (t = t.substring(0, 2) + "12" + t.substring(4));
|
|
869
|
+
}
|
|
870
|
+
return t.slice(0, 8);
|
|
871
|
+
}, zr = ce(
|
|
872
|
+
(e, t) => {
|
|
872
873
|
const {
|
|
873
|
-
label:
|
|
874
|
-
suffixIcon:
|
|
874
|
+
label: n,
|
|
875
|
+
suffixIcon: s,
|
|
875
876
|
onSuffixClick: i,
|
|
876
|
-
className:
|
|
877
|
-
// For
|
|
878
|
-
inputWrapperClassName:
|
|
877
|
+
className: a,
|
|
878
|
+
// For ytre fieldset
|
|
879
|
+
inputWrapperClassName: r,
|
|
879
880
|
// For input wrapper div
|
|
880
|
-
inputClassName:
|
|
881
|
-
// For
|
|
882
|
-
value:
|
|
883
|
-
defaultValue:
|
|
884
|
-
onChange:
|
|
885
|
-
readOnly:
|
|
886
|
-
placeholder:
|
|
887
|
-
id:
|
|
888
|
-
name:
|
|
889
|
-
required:
|
|
890
|
-
disabled:
|
|
891
|
-
onClick:
|
|
892
|
-
onFocus:
|
|
893
|
-
//
|
|
894
|
-
onBlur:
|
|
895
|
-
//
|
|
896
|
-
autoComplete:
|
|
881
|
+
inputClassName: c,
|
|
882
|
+
// For selve input-elementet
|
|
883
|
+
value: o,
|
|
884
|
+
defaultValue: u,
|
|
885
|
+
onChange: v,
|
|
886
|
+
readOnly: p,
|
|
887
|
+
placeholder: h = "dd.mm.åååå",
|
|
888
|
+
id: y,
|
|
889
|
+
name: f,
|
|
890
|
+
required: g,
|
|
891
|
+
disabled: b,
|
|
892
|
+
onClick: m,
|
|
893
|
+
onFocus: d,
|
|
894
|
+
// Send ekstern onFocus videre
|
|
895
|
+
onBlur: x,
|
|
896
|
+
// Send ekstern onBlur videre
|
|
897
|
+
autoComplete: E = "off",
|
|
897
898
|
"aria-label": N,
|
|
898
|
-
"aria-labelledby":
|
|
899
|
-
description:
|
|
900
|
-
error:
|
|
901
|
-
//
|
|
902
|
-
"data-color":
|
|
903
|
-
// <--
|
|
904
|
-
"data-size":
|
|
905
|
-
// <--
|
|
906
|
-
...
|
|
907
|
-
} =
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
() =>
|
|
899
|
+
"aria-labelledby": T,
|
|
900
|
+
description: C,
|
|
901
|
+
error: w,
|
|
902
|
+
// Bruk error-prop for styling
|
|
903
|
+
"data-color": j,
|
|
904
|
+
// <-- Destrukturering
|
|
905
|
+
"data-size": $,
|
|
906
|
+
// <-- Destrukturering
|
|
907
|
+
...A
|
|
908
|
+
} = e, F = o !== void 0, V = We(null);
|
|
909
|
+
bt.useImperativeHandle(
|
|
910
|
+
t,
|
|
911
|
+
() => V.current
|
|
911
912
|
);
|
|
912
|
-
const
|
|
913
|
-
(
|
|
914
|
-
const
|
|
915
|
-
return
|
|
913
|
+
const H = te(
|
|
914
|
+
(z) => {
|
|
915
|
+
const P = dt(z), D = ft(P);
|
|
916
|
+
return ut(D);
|
|
916
917
|
},
|
|
917
918
|
[]
|
|
918
|
-
), [
|
|
919
|
-
() =>
|
|
919
|
+
), [W, X] = ge(
|
|
920
|
+
() => H(o ?? u)
|
|
920
921
|
);
|
|
921
|
-
|
|
922
|
-
if (
|
|
923
|
-
const
|
|
924
|
-
|
|
922
|
+
ie(() => {
|
|
923
|
+
if (F) {
|
|
924
|
+
const z = H(o);
|
|
925
|
+
z !== W && (X(z), V.current && V.current.value !== z && (V.current.value = z));
|
|
925
926
|
}
|
|
926
|
-
}, [
|
|
927
|
-
const
|
|
928
|
-
(
|
|
929
|
-
const
|
|
930
|
-
let
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
if (
|
|
934
|
-
const
|
|
935
|
-
...
|
|
936
|
-
target: { ...
|
|
927
|
+
}, [o, F, W, H]);
|
|
928
|
+
const J = te(
|
|
929
|
+
(z) => {
|
|
930
|
+
const P = z.target, D = P.value, q = W, G = dt(D).slice(0, 8), R = ft(G), S = ut(R);
|
|
931
|
+
let L = 0;
|
|
932
|
+
const O = R.length;
|
|
933
|
+
O <= 2 ? L = O : O <= 4 ? L = O + 1 : L = O + 2, L = Math.min(L, S.length), requestAnimationFrame(() => {
|
|
934
|
+
if (V.current && (X(S), V.current.value = S, V.current.setSelectionRange(L, L), (S !== q || F) && v)) {
|
|
935
|
+
const Y = {
|
|
936
|
+
...z,
|
|
937
|
+
target: { ...P, value: S }
|
|
937
938
|
};
|
|
938
|
-
|
|
939
|
+
v(Y, S);
|
|
939
940
|
}
|
|
940
941
|
});
|
|
941
942
|
},
|
|
942
|
-
[
|
|
943
|
-
),
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
].filter(Boolean).join(" "),
|
|
948
|
-
|
|
949
|
-
].filter(Boolean).join(" "),
|
|
950
|
-
|
|
951
|
-
i ?
|
|
943
|
+
[W, F, v, H]
|
|
944
|
+
), K = [de.fieldset, a].filter(Boolean).join(" "), U = [
|
|
945
|
+
de.inputWrapper,
|
|
946
|
+
r,
|
|
947
|
+
w ? de.inputWrapperError : ""
|
|
948
|
+
].filter(Boolean).join(" "), re = [
|
|
949
|
+
c
|
|
950
|
+
].filter(Boolean).join(" "), l = [
|
|
951
|
+
de.suffixButton,
|
|
952
|
+
i ? de.suffixButtonInteractive : ""
|
|
952
953
|
].filter(Boolean).join(" ");
|
|
953
|
-
!
|
|
954
|
-
const
|
|
954
|
+
!n && !N && !T && console.warn("Advarsel: DateInput-komponenten bør ha label, aria-label, eller aria-labelledby for tilgjengelighet.");
|
|
955
|
+
const _ = n && typeof n == "string" ? T || `${y}-label` : void 0, I = C ? `${y}-desc` : void 0, M = w ? `${y}-err` : void 0, Q = [I, M].filter(Boolean).join(" ") || void 0;
|
|
955
956
|
return (
|
|
956
|
-
// ---
|
|
957
|
-
/* @__PURE__ */
|
|
957
|
+
// --- Bruk data-color og data-size på den ytre wrapperen ---
|
|
958
|
+
/* @__PURE__ */ k.jsxs(
|
|
958
959
|
"div",
|
|
959
960
|
{
|
|
960
|
-
className:
|
|
961
|
-
"data-color":
|
|
962
|
-
"data-size":
|
|
961
|
+
className: K,
|
|
962
|
+
"data-color": j,
|
|
963
|
+
"data-size": $,
|
|
963
964
|
children: [
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
965
|
+
n && typeof n == "string" ? /* @__PURE__ */ k.jsx("label", { id: _, htmlFor: y, children: n }) : n,
|
|
966
|
+
C && /* @__PURE__ */ k.jsx("p", { id: I, className: de.description, children: C }),
|
|
967
|
+
/* @__PURE__ */ k.jsxs("div", { className: U, children: [
|
|
968
|
+
/* @__PURE__ */ k.jsx(
|
|
968
969
|
"input",
|
|
969
970
|
{
|
|
970
|
-
ref:
|
|
971
|
+
ref: V,
|
|
971
972
|
type: "text",
|
|
972
973
|
inputMode: "numeric",
|
|
973
974
|
pattern: "\\d{2}\\.\\d{2}\\.\\d{4}",
|
|
974
975
|
maxLength: 10,
|
|
975
|
-
value:
|
|
976
|
-
readOnly:
|
|
977
|
-
placeholder:
|
|
978
|
-
id:
|
|
979
|
-
name:
|
|
980
|
-
required:
|
|
981
|
-
disabled:
|
|
982
|
-
onClick:
|
|
983
|
-
onChange:
|
|
984
|
-
onFocus:
|
|
985
|
-
onBlur:
|
|
986
|
-
autoComplete:
|
|
976
|
+
value: W,
|
|
977
|
+
readOnly: p,
|
|
978
|
+
placeholder: h,
|
|
979
|
+
id: y,
|
|
980
|
+
name: f,
|
|
981
|
+
required: g,
|
|
982
|
+
disabled: b,
|
|
983
|
+
onClick: m,
|
|
984
|
+
onChange: J,
|
|
985
|
+
onFocus: d,
|
|
986
|
+
onBlur: x,
|
|
987
|
+
autoComplete: E,
|
|
987
988
|
"aria-label": N,
|
|
988
|
-
"aria-labelledby":
|
|
989
|
-
"aria-describedby":
|
|
990
|
-
"aria-invalid":
|
|
991
|
-
className:
|
|
992
|
-
...
|
|
989
|
+
"aria-labelledby": _,
|
|
990
|
+
"aria-describedby": Q,
|
|
991
|
+
"aria-invalid": !!w,
|
|
992
|
+
className: re,
|
|
993
|
+
...A
|
|
993
994
|
}
|
|
994
995
|
),
|
|
995
|
-
|
|
996
|
+
s && /* @__PURE__ */ k.jsx(
|
|
996
997
|
"button",
|
|
997
998
|
{
|
|
998
999
|
type: "button",
|
|
999
|
-
className:
|
|
1000
|
-
onClick:
|
|
1001
|
-
tabIndex: i && !
|
|
1000
|
+
className: l,
|
|
1001
|
+
onClick: b ? void 0 : i,
|
|
1002
|
+
tabIndex: i && !b ? 0 : -1,
|
|
1002
1003
|
"aria-hidden": !i,
|
|
1003
|
-
disabled:
|
|
1004
|
+
disabled: b,
|
|
1004
1005
|
"aria-label": i ? "Åpne datovelger" : void 0,
|
|
1005
|
-
children:
|
|
1006
|
+
children: s
|
|
1006
1007
|
}
|
|
1007
1008
|
)
|
|
1008
1009
|
] }),
|
|
1009
|
-
|
|
1010
|
+
w && /* @__PURE__ */ k.jsx("p", { id: M, className: de.error, role: "alert", children: w })
|
|
1010
1011
|
]
|
|
1011
1012
|
}
|
|
1012
1013
|
)
|
|
1013
1014
|
);
|
|
1014
1015
|
}
|
|
1015
1016
|
);
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1017
|
+
zr.displayName = "DateInput";
|
|
1018
|
+
function Hr(e) {
|
|
1019
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1020
|
+
}
|
|
1021
|
+
function mt(e) {
|
|
1022
|
+
return Hr(e) || Array.isArray(e);
|
|
1023
|
+
}
|
|
1024
|
+
function Yr() {
|
|
1025
|
+
return !!(typeof window < "u" && window.document && window.document.createElement);
|
|
1026
|
+
}
|
|
1027
|
+
function Ye(e, t) {
|
|
1028
|
+
const n = Object.keys(e), s = Object.keys(t);
|
|
1029
|
+
if (n.length !== s.length) return !1;
|
|
1030
|
+
const i = JSON.stringify(Object.keys(e.breakpoints || {})), a = JSON.stringify(Object.keys(t.breakpoints || {}));
|
|
1031
|
+
return i !== a ? !1 : n.every((r) => {
|
|
1032
|
+
const c = e[r], o = t[r];
|
|
1033
|
+
return typeof c == "function" ? `${c}` == `${o}` : !mt(c) || !mt(o) ? c === o : Ye(c, o);
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
function pt(e) {
|
|
1037
|
+
return e.concat().sort((t, n) => t.name > n.name ? 1 : -1).map((t) => t.options);
|
|
1038
|
+
}
|
|
1039
|
+
function Gr(e, t) {
|
|
1040
|
+
if (e.length !== t.length) return !1;
|
|
1041
|
+
const n = pt(e), s = pt(t);
|
|
1042
|
+
return n.every((i, a) => {
|
|
1043
|
+
const r = s[a];
|
|
1044
|
+
return Ye(i, r);
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
function Ge(e) {
|
|
1048
|
+
return typeof e == "number";
|
|
1049
|
+
}
|
|
1050
|
+
function ze(e) {
|
|
1051
|
+
return typeof e == "string";
|
|
1052
|
+
}
|
|
1053
|
+
function Ae(e) {
|
|
1054
|
+
return typeof e == "boolean";
|
|
1055
|
+
}
|
|
1056
|
+
function ht(e) {
|
|
1057
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1058
|
+
}
|
|
1059
|
+
function B(e) {
|
|
1060
|
+
return Math.abs(e);
|
|
1061
|
+
}
|
|
1062
|
+
function qe(e) {
|
|
1063
|
+
return Math.sign(e);
|
|
1064
|
+
}
|
|
1065
|
+
function Ce(e, t) {
|
|
1066
|
+
return B(e - t);
|
|
1067
|
+
}
|
|
1068
|
+
function qr(e, t) {
|
|
1069
|
+
if (e === 0 || t === 0 || B(e) <= B(t)) return 0;
|
|
1070
|
+
const n = Ce(B(e), B(t));
|
|
1071
|
+
return B(n / e);
|
|
1072
|
+
}
|
|
1073
|
+
function Kr(e) {
|
|
1074
|
+
return Math.round(e * 100) / 100;
|
|
1075
|
+
}
|
|
1076
|
+
function Pe(e) {
|
|
1077
|
+
return Te(e).map(Number);
|
|
1078
|
+
}
|
|
1079
|
+
function ne(e) {
|
|
1080
|
+
return e[je(e)];
|
|
1081
|
+
}
|
|
1082
|
+
function je(e) {
|
|
1083
|
+
return Math.max(0, e.length - 1);
|
|
1084
|
+
}
|
|
1085
|
+
function Ke(e, t) {
|
|
1086
|
+
return t === je(e);
|
|
1087
|
+
}
|
|
1088
|
+
function gt(e, t = 0) {
|
|
1089
|
+
return Array.from(Array(e), (n, s) => t + s);
|
|
1090
|
+
}
|
|
1091
|
+
function Te(e) {
|
|
1092
|
+
return Object.keys(e);
|
|
1093
|
+
}
|
|
1094
|
+
function kt(e, t) {
|
|
1095
|
+
return [e, t].reduce((n, s) => (Te(s).forEach((i) => {
|
|
1096
|
+
const a = n[i], r = s[i], c = ht(a) && ht(r);
|
|
1097
|
+
n[i] = c ? kt(a, r) : r;
|
|
1098
|
+
}), n), {});
|
|
1099
|
+
}
|
|
1100
|
+
function He(e, t) {
|
|
1101
|
+
return typeof t.MouseEvent < "u" && e instanceof t.MouseEvent;
|
|
1102
|
+
}
|
|
1103
|
+
function Ur(e, t) {
|
|
1104
|
+
const n = {
|
|
1105
|
+
start: s,
|
|
1106
|
+
center: i,
|
|
1107
|
+
end: a
|
|
1108
|
+
};
|
|
1109
|
+
function s() {
|
|
1110
|
+
return 0;
|
|
1111
|
+
}
|
|
1112
|
+
function i(o) {
|
|
1113
|
+
return a(o) / 2;
|
|
1114
|
+
}
|
|
1115
|
+
function a(o) {
|
|
1116
|
+
return t - o;
|
|
1117
|
+
}
|
|
1118
|
+
function r(o, u) {
|
|
1119
|
+
return ze(e) ? n[e](o) : e(t, o, u);
|
|
1120
|
+
}
|
|
1121
|
+
return {
|
|
1122
|
+
measure: r
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
function Ne() {
|
|
1126
|
+
let e = [];
|
|
1127
|
+
function t(i, a, r, c = {
|
|
1128
|
+
passive: !0
|
|
1129
|
+
}) {
|
|
1130
|
+
let o;
|
|
1131
|
+
if ("addEventListener" in i)
|
|
1132
|
+
i.addEventListener(a, r, c), o = () => i.removeEventListener(a, r, c);
|
|
1133
|
+
else {
|
|
1134
|
+
const u = i;
|
|
1135
|
+
u.addListener(r), o = () => u.removeListener(r);
|
|
1136
|
+
}
|
|
1137
|
+
return e.push(o), s;
|
|
1138
|
+
}
|
|
1139
|
+
function n() {
|
|
1140
|
+
e = e.filter((i) => i());
|
|
1141
|
+
}
|
|
1142
|
+
const s = {
|
|
1143
|
+
add: t,
|
|
1144
|
+
clear: n
|
|
1145
|
+
};
|
|
1146
|
+
return s;
|
|
1147
|
+
}
|
|
1148
|
+
function Xr(e, t, n, s) {
|
|
1149
|
+
const i = Ne(), a = 1e3 / 60;
|
|
1150
|
+
let r = null, c = 0, o = 0;
|
|
1151
|
+
function u() {
|
|
1152
|
+
i.add(e, "visibilitychange", () => {
|
|
1153
|
+
e.hidden && f();
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
function v() {
|
|
1157
|
+
y(), i.clear();
|
|
1158
|
+
}
|
|
1159
|
+
function p(b) {
|
|
1160
|
+
if (!o) return;
|
|
1161
|
+
r || (r = b, n(), n());
|
|
1162
|
+
const m = b - r;
|
|
1163
|
+
for (r = b, c += m; c >= a; )
|
|
1164
|
+
n(), c -= a;
|
|
1165
|
+
const d = c / a;
|
|
1166
|
+
s(d), o && (o = t.requestAnimationFrame(p));
|
|
1167
|
+
}
|
|
1168
|
+
function h() {
|
|
1169
|
+
o || (o = t.requestAnimationFrame(p));
|
|
1170
|
+
}
|
|
1171
|
+
function y() {
|
|
1172
|
+
t.cancelAnimationFrame(o), r = null, c = 0, o = 0;
|
|
1173
|
+
}
|
|
1174
|
+
function f() {
|
|
1175
|
+
r = null, c = 0;
|
|
1176
|
+
}
|
|
1177
|
+
return {
|
|
1178
|
+
init: u,
|
|
1179
|
+
destroy: v,
|
|
1180
|
+
start: h,
|
|
1181
|
+
stop: y,
|
|
1182
|
+
update: n,
|
|
1183
|
+
render: s
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
function Jr(e, t) {
|
|
1187
|
+
const n = t === "rtl", s = e === "y", i = s ? "y" : "x", a = s ? "x" : "y", r = !s && n ? -1 : 1, c = v(), o = p();
|
|
1188
|
+
function u(f) {
|
|
1189
|
+
const {
|
|
1190
|
+
height: g,
|
|
1191
|
+
width: b
|
|
1192
|
+
} = f;
|
|
1193
|
+
return s ? g : b;
|
|
1194
|
+
}
|
|
1195
|
+
function v() {
|
|
1196
|
+
return s ? "top" : n ? "right" : "left";
|
|
1197
|
+
}
|
|
1198
|
+
function p() {
|
|
1199
|
+
return s ? "bottom" : n ? "left" : "right";
|
|
1200
|
+
}
|
|
1201
|
+
function h(f) {
|
|
1202
|
+
return f * r;
|
|
1203
|
+
}
|
|
1204
|
+
return {
|
|
1205
|
+
scroll: i,
|
|
1206
|
+
cross: a,
|
|
1207
|
+
startEdge: c,
|
|
1208
|
+
endEdge: o,
|
|
1209
|
+
measureSize: u,
|
|
1210
|
+
direction: h
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
function fe(e = 0, t = 0) {
|
|
1214
|
+
const n = B(e - t);
|
|
1215
|
+
function s(u) {
|
|
1216
|
+
return u < e;
|
|
1217
|
+
}
|
|
1218
|
+
function i(u) {
|
|
1219
|
+
return u > t;
|
|
1220
|
+
}
|
|
1221
|
+
function a(u) {
|
|
1222
|
+
return s(u) || i(u);
|
|
1223
|
+
}
|
|
1224
|
+
function r(u) {
|
|
1225
|
+
return a(u) ? s(u) ? e : t : u;
|
|
1226
|
+
}
|
|
1227
|
+
function c(u) {
|
|
1228
|
+
return n ? u - n * Math.ceil((u - t) / n) : u;
|
|
1229
|
+
}
|
|
1230
|
+
return {
|
|
1231
|
+
length: n,
|
|
1232
|
+
max: t,
|
|
1233
|
+
min: e,
|
|
1234
|
+
constrain: r,
|
|
1235
|
+
reachedAny: a,
|
|
1236
|
+
reachedMax: i,
|
|
1237
|
+
reachedMin: s,
|
|
1238
|
+
removeOffset: c
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
function Et(e, t, n) {
|
|
1242
|
+
const {
|
|
1243
|
+
constrain: s
|
|
1244
|
+
} = fe(0, e), i = e + 1;
|
|
1245
|
+
let a = r(t);
|
|
1246
|
+
function r(h) {
|
|
1247
|
+
return n ? B((i + h) % i) : s(h);
|
|
1248
|
+
}
|
|
1249
|
+
function c() {
|
|
1250
|
+
return a;
|
|
1251
|
+
}
|
|
1252
|
+
function o(h) {
|
|
1253
|
+
return a = r(h), p;
|
|
1254
|
+
}
|
|
1255
|
+
function u(h) {
|
|
1256
|
+
return v().set(c() + h);
|
|
1257
|
+
}
|
|
1258
|
+
function v() {
|
|
1259
|
+
return Et(e, c(), n);
|
|
1260
|
+
}
|
|
1261
|
+
const p = {
|
|
1262
|
+
get: c,
|
|
1263
|
+
set: o,
|
|
1264
|
+
add: u,
|
|
1265
|
+
clone: v
|
|
1266
|
+
};
|
|
1267
|
+
return p;
|
|
1268
|
+
}
|
|
1269
|
+
function Qr(e, t, n, s, i, a, r, c, o, u, v, p, h, y, f, g, b, m, d) {
|
|
1270
|
+
const {
|
|
1271
|
+
cross: x,
|
|
1272
|
+
direction: E
|
|
1273
|
+
} = e, N = ["INPUT", "SELECT", "TEXTAREA"], T = {
|
|
1274
|
+
passive: !1
|
|
1275
|
+
}, C = Ne(), w = Ne(), j = fe(50, 225).constrain(y.measure(20)), $ = {
|
|
1276
|
+
mouse: 300,
|
|
1277
|
+
touch: 400
|
|
1278
|
+
}, A = {
|
|
1279
|
+
mouse: 500,
|
|
1280
|
+
touch: 600
|
|
1281
|
+
}, F = f ? 43 : 25;
|
|
1282
|
+
let V = !1, H = 0, W = 0, X = !1, J = !1, K = !1, U = !1;
|
|
1283
|
+
function re(S) {
|
|
1284
|
+
if (!d) return;
|
|
1285
|
+
function L(Y) {
|
|
1286
|
+
(Ae(d) || d(S, Y)) && z(Y);
|
|
1287
|
+
}
|
|
1288
|
+
const O = t;
|
|
1289
|
+
C.add(O, "dragstart", (Y) => Y.preventDefault(), T).add(O, "touchmove", () => {
|
|
1290
|
+
}, T).add(O, "touchend", () => {
|
|
1291
|
+
}).add(O, "touchstart", L).add(O, "mousedown", L).add(O, "touchcancel", D).add(O, "contextmenu", D).add(O, "click", q, !0);
|
|
1292
|
+
}
|
|
1293
|
+
function l() {
|
|
1294
|
+
C.clear(), w.clear();
|
|
1295
|
+
}
|
|
1296
|
+
function _() {
|
|
1297
|
+
const S = U ? n : t;
|
|
1298
|
+
w.add(S, "touchmove", P, T).add(S, "touchend", D).add(S, "mousemove", P, T).add(S, "mouseup", D);
|
|
1299
|
+
}
|
|
1300
|
+
function I(S) {
|
|
1301
|
+
const L = S.nodeName || "";
|
|
1302
|
+
return N.includes(L);
|
|
1303
|
+
}
|
|
1304
|
+
function M() {
|
|
1305
|
+
return (f ? A : $)[U ? "mouse" : "touch"];
|
|
1306
|
+
}
|
|
1307
|
+
function Q(S, L) {
|
|
1308
|
+
const O = p.add(qe(S) * -1), Y = v.byDistance(S, !f).distance;
|
|
1309
|
+
return f || B(S) < j ? Y : b && L ? Y * 0.5 : v.byIndex(O.get(), 0).distance;
|
|
1310
|
+
}
|
|
1311
|
+
function z(S) {
|
|
1312
|
+
const L = He(S, s);
|
|
1313
|
+
U = L, K = f && L && !S.buttons && V, V = Ce(i.get(), r.get()) >= 2, !(L && S.button !== 0) && (I(S.target) || (X = !0, a.pointerDown(S), u.useFriction(0).useDuration(0), i.set(r), _(), H = a.readPoint(S), W = a.readPoint(S, x), h.emit("pointerDown")));
|
|
1314
|
+
}
|
|
1315
|
+
function P(S) {
|
|
1316
|
+
if (!He(S, s) && S.touches.length >= 2) return D(S);
|
|
1317
|
+
const O = a.readPoint(S), Y = a.readPoint(S, x), oe = Ce(O, H), se = Ce(Y, W);
|
|
1318
|
+
if (!J && !U && (!S.cancelable || (J = oe > se, !J)))
|
|
1319
|
+
return D(S);
|
|
1320
|
+
const le = a.pointerMove(S);
|
|
1321
|
+
oe > g && (K = !0), u.useFriction(0.3).useDuration(0.75), c.start(), i.add(E(le)), S.preventDefault();
|
|
1322
|
+
}
|
|
1323
|
+
function D(S) {
|
|
1324
|
+
const O = v.byDistance(0, !1).index !== p.get(), Y = a.pointerUp(S) * M(), oe = Q(E(Y), O), se = qr(Y, oe), le = F - 10 * se, ae = m + se / 50;
|
|
1325
|
+
J = !1, X = !1, w.clear(), u.useDuration(le).useFriction(ae), o.distance(oe, !f), U = !1, h.emit("pointerUp");
|
|
1326
|
+
}
|
|
1327
|
+
function q(S) {
|
|
1328
|
+
K && (S.stopPropagation(), S.preventDefault(), K = !1);
|
|
1329
|
+
}
|
|
1330
|
+
function G() {
|
|
1331
|
+
return X;
|
|
1332
|
+
}
|
|
1333
|
+
return {
|
|
1334
|
+
init: re,
|
|
1335
|
+
destroy: l,
|
|
1336
|
+
pointerDown: G
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
function Zr(e, t) {
|
|
1340
|
+
let s, i;
|
|
1341
|
+
function a(p) {
|
|
1342
|
+
return p.timeStamp;
|
|
1343
|
+
}
|
|
1344
|
+
function r(p, h) {
|
|
1345
|
+
const f = `client${(h || e.scroll) === "x" ? "X" : "Y"}`;
|
|
1346
|
+
return (He(p, t) ? p : p.touches[0])[f];
|
|
1347
|
+
}
|
|
1348
|
+
function c(p) {
|
|
1349
|
+
return s = p, i = p, r(p);
|
|
1350
|
+
}
|
|
1351
|
+
function o(p) {
|
|
1352
|
+
const h = r(p) - r(i), y = a(p) - a(s) > 170;
|
|
1353
|
+
return i = p, y && (s = p), h;
|
|
1354
|
+
}
|
|
1355
|
+
function u(p) {
|
|
1356
|
+
if (!s || !i) return 0;
|
|
1357
|
+
const h = r(i) - r(s), y = a(p) - a(s), f = a(p) - a(i) > 170, g = h / y;
|
|
1358
|
+
return y && !f && B(g) > 0.1 ? g : 0;
|
|
1359
|
+
}
|
|
1360
|
+
return {
|
|
1361
|
+
pointerDown: c,
|
|
1362
|
+
pointerMove: o,
|
|
1363
|
+
pointerUp: u,
|
|
1364
|
+
readPoint: r
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
function eo() {
|
|
1368
|
+
function e(n) {
|
|
1369
|
+
const {
|
|
1370
|
+
offsetTop: s,
|
|
1371
|
+
offsetLeft: i,
|
|
1372
|
+
offsetWidth: a,
|
|
1373
|
+
offsetHeight: r
|
|
1374
|
+
} = n;
|
|
1375
|
+
return {
|
|
1376
|
+
top: s,
|
|
1377
|
+
right: i + a,
|
|
1378
|
+
bottom: s + r,
|
|
1379
|
+
left: i,
|
|
1380
|
+
width: a,
|
|
1381
|
+
height: r
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
return {
|
|
1385
|
+
measure: e
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
function to(e) {
|
|
1389
|
+
function t(s) {
|
|
1390
|
+
return e * (s / 100);
|
|
1391
|
+
}
|
|
1392
|
+
return {
|
|
1393
|
+
measure: t
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
function no(e, t, n, s, i, a, r) {
|
|
1397
|
+
const c = [e].concat(s);
|
|
1398
|
+
let o, u, v = [], p = !1;
|
|
1399
|
+
function h(b) {
|
|
1400
|
+
return i.measureSize(r.measure(b));
|
|
1401
|
+
}
|
|
1402
|
+
function y(b) {
|
|
1403
|
+
if (!a) return;
|
|
1404
|
+
u = h(e), v = s.map(h);
|
|
1405
|
+
function m(d) {
|
|
1406
|
+
for (const x of d) {
|
|
1407
|
+
if (p) return;
|
|
1408
|
+
const E = x.target === e, N = s.indexOf(x.target), T = E ? u : v[N], C = h(E ? e : s[N]);
|
|
1409
|
+
if (B(C - T) >= 0.5) {
|
|
1410
|
+
b.reInit(), t.emit("resize");
|
|
1411
|
+
break;
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
o = new ResizeObserver((d) => {
|
|
1416
|
+
(Ae(a) || a(b, d)) && m(d);
|
|
1417
|
+
}), n.requestAnimationFrame(() => {
|
|
1418
|
+
c.forEach((d) => o.observe(d));
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
function f() {
|
|
1422
|
+
p = !0, o && o.disconnect();
|
|
1423
|
+
}
|
|
1424
|
+
return {
|
|
1425
|
+
init: y,
|
|
1426
|
+
destroy: f
|
|
1427
|
+
};
|
|
1428
|
+
}
|
|
1429
|
+
function ro(e, t, n, s, i, a) {
|
|
1430
|
+
let r = 0, c = 0, o = i, u = a, v = e.get(), p = 0;
|
|
1431
|
+
function h() {
|
|
1432
|
+
const T = s.get() - e.get(), C = !o;
|
|
1433
|
+
let w = 0;
|
|
1434
|
+
return C ? (r = 0, n.set(s), e.set(s), w = T) : (n.set(e), r += T / o, r *= u, v += r, e.add(r), w = v - p), c = qe(w), p = v, N;
|
|
1435
|
+
}
|
|
1436
|
+
function y() {
|
|
1437
|
+
const T = s.get() - t.get();
|
|
1438
|
+
return B(T) < 1e-3;
|
|
1439
|
+
}
|
|
1440
|
+
function f() {
|
|
1441
|
+
return o;
|
|
1442
|
+
}
|
|
1443
|
+
function g() {
|
|
1444
|
+
return c;
|
|
1445
|
+
}
|
|
1446
|
+
function b() {
|
|
1447
|
+
return r;
|
|
1448
|
+
}
|
|
1449
|
+
function m() {
|
|
1450
|
+
return x(i);
|
|
1451
|
+
}
|
|
1452
|
+
function d() {
|
|
1453
|
+
return E(a);
|
|
1454
|
+
}
|
|
1455
|
+
function x(T) {
|
|
1456
|
+
return o = T, N;
|
|
1457
|
+
}
|
|
1458
|
+
function E(T) {
|
|
1459
|
+
return u = T, N;
|
|
1460
|
+
}
|
|
1461
|
+
const N = {
|
|
1462
|
+
direction: g,
|
|
1463
|
+
duration: f,
|
|
1464
|
+
velocity: b,
|
|
1465
|
+
seek: h,
|
|
1466
|
+
settled: y,
|
|
1467
|
+
useBaseFriction: d,
|
|
1468
|
+
useBaseDuration: m,
|
|
1469
|
+
useFriction: E,
|
|
1470
|
+
useDuration: x
|
|
1471
|
+
};
|
|
1472
|
+
return N;
|
|
1473
|
+
}
|
|
1474
|
+
function oo(e, t, n, s, i) {
|
|
1475
|
+
const a = i.measure(10), r = i.measure(50), c = fe(0.1, 0.99);
|
|
1476
|
+
let o = !1;
|
|
1477
|
+
function u() {
|
|
1478
|
+
return !(o || !e.reachedAny(n.get()) || !e.reachedAny(t.get()));
|
|
1479
|
+
}
|
|
1480
|
+
function v(y) {
|
|
1481
|
+
if (!u()) return;
|
|
1482
|
+
const f = e.reachedMin(t.get()) ? "min" : "max", g = B(e[f] - t.get()), b = n.get() - t.get(), m = c.constrain(g / r);
|
|
1483
|
+
n.subtract(b * m), !y && B(b) < a && (n.set(e.constrain(n.get())), s.useDuration(25).useBaseFriction());
|
|
1484
|
+
}
|
|
1485
|
+
function p(y) {
|
|
1486
|
+
o = !y;
|
|
1487
|
+
}
|
|
1488
|
+
return {
|
|
1489
|
+
shouldConstrain: u,
|
|
1490
|
+
constrain: v,
|
|
1491
|
+
toggleActive: p
|
|
1492
|
+
};
|
|
1493
|
+
}
|
|
1494
|
+
function so(e, t, n, s, i) {
|
|
1495
|
+
const a = fe(-t + e, 0), r = p(), c = v(), o = h();
|
|
1496
|
+
function u(f, g) {
|
|
1497
|
+
return Ce(f, g) <= 1;
|
|
1498
|
+
}
|
|
1499
|
+
function v() {
|
|
1500
|
+
const f = r[0], g = ne(r), b = r.lastIndexOf(f), m = r.indexOf(g) + 1;
|
|
1501
|
+
return fe(b, m);
|
|
1502
|
+
}
|
|
1503
|
+
function p() {
|
|
1504
|
+
return n.map((f, g) => {
|
|
1505
|
+
const {
|
|
1506
|
+
min: b,
|
|
1507
|
+
max: m
|
|
1508
|
+
} = a, d = a.constrain(f), x = !g, E = Ke(n, g);
|
|
1509
|
+
return x ? m : E || u(b, d) ? b : u(m, d) ? m : d;
|
|
1510
|
+
}).map((f) => parseFloat(f.toFixed(3)));
|
|
1511
|
+
}
|
|
1512
|
+
function h() {
|
|
1513
|
+
if (t <= e + i) return [a.max];
|
|
1514
|
+
if (s === "keepSnaps") return r;
|
|
1515
|
+
const {
|
|
1516
|
+
min: f,
|
|
1517
|
+
max: g
|
|
1518
|
+
} = c;
|
|
1519
|
+
return r.slice(f, g);
|
|
1520
|
+
}
|
|
1521
|
+
return {
|
|
1522
|
+
snapsContained: o,
|
|
1523
|
+
scrollContainLimit: c
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
function ao(e, t, n) {
|
|
1527
|
+
const s = t[0], i = n ? s - e : ne(t);
|
|
1528
|
+
return {
|
|
1529
|
+
limit: fe(i, s)
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
function io(e, t, n, s) {
|
|
1533
|
+
const a = t.min + 0.1, r = t.max + 0.1, {
|
|
1534
|
+
reachedMin: c,
|
|
1535
|
+
reachedMax: o
|
|
1536
|
+
} = fe(a, r);
|
|
1537
|
+
function u(h) {
|
|
1538
|
+
return h === 1 ? o(n.get()) : h === -1 ? c(n.get()) : !1;
|
|
1539
|
+
}
|
|
1540
|
+
function v(h) {
|
|
1541
|
+
if (!u(h)) return;
|
|
1542
|
+
const y = e * (h * -1);
|
|
1543
|
+
s.forEach((f) => f.add(y));
|
|
1544
|
+
}
|
|
1545
|
+
return {
|
|
1546
|
+
loop: v
|
|
1547
|
+
};
|
|
1548
|
+
}
|
|
1549
|
+
function co(e) {
|
|
1550
|
+
const {
|
|
1551
|
+
max: t,
|
|
1552
|
+
length: n
|
|
1553
|
+
} = e;
|
|
1554
|
+
function s(a) {
|
|
1555
|
+
const r = a - t;
|
|
1556
|
+
return n ? r / -n : 0;
|
|
1557
|
+
}
|
|
1558
|
+
return {
|
|
1559
|
+
get: s
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
function lo(e, t, n, s, i) {
|
|
1563
|
+
const {
|
|
1564
|
+
startEdge: a,
|
|
1565
|
+
endEdge: r
|
|
1566
|
+
} = e, {
|
|
1567
|
+
groupSlides: c
|
|
1568
|
+
} = i, o = p().map(t.measure), u = h(), v = y();
|
|
1569
|
+
function p() {
|
|
1570
|
+
return c(s).map((g) => ne(g)[r] - g[0][a]).map(B);
|
|
1571
|
+
}
|
|
1572
|
+
function h() {
|
|
1573
|
+
return s.map((g) => n[a] - g[a]).map((g) => -B(g));
|
|
1574
|
+
}
|
|
1575
|
+
function y() {
|
|
1576
|
+
return c(u).map((g) => g[0]).map((g, b) => g + o[b]);
|
|
1577
|
+
}
|
|
1578
|
+
return {
|
|
1579
|
+
snaps: u,
|
|
1580
|
+
snapsAligned: v
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
function uo(e, t, n, s, i, a) {
|
|
1584
|
+
const {
|
|
1585
|
+
groupSlides: r
|
|
1586
|
+
} = i, {
|
|
1587
|
+
min: c,
|
|
1588
|
+
max: o
|
|
1589
|
+
} = s, u = v();
|
|
1590
|
+
function v() {
|
|
1591
|
+
const h = r(a), y = !e || t === "keepSnaps";
|
|
1592
|
+
return n.length === 1 ? [a] : y ? h : h.slice(c, o).map((f, g, b) => {
|
|
1593
|
+
const m = !g, d = Ke(b, g);
|
|
1594
|
+
if (m) {
|
|
1595
|
+
const x = ne(b[0]) + 1;
|
|
1596
|
+
return gt(x);
|
|
1597
|
+
}
|
|
1598
|
+
if (d) {
|
|
1599
|
+
const x = je(a) - ne(b)[0] + 1;
|
|
1600
|
+
return gt(x, ne(b)[0]);
|
|
1601
|
+
}
|
|
1602
|
+
return f;
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
return {
|
|
1606
|
+
slideRegistry: u
|
|
1607
|
+
};
|
|
1608
|
+
}
|
|
1609
|
+
function fo(e, t, n, s, i) {
|
|
1610
|
+
const {
|
|
1611
|
+
reachedAny: a,
|
|
1612
|
+
removeOffset: r,
|
|
1613
|
+
constrain: c
|
|
1614
|
+
} = s;
|
|
1615
|
+
function o(f) {
|
|
1616
|
+
return f.concat().sort((g, b) => B(g) - B(b))[0];
|
|
1617
|
+
}
|
|
1618
|
+
function u(f) {
|
|
1619
|
+
const g = e ? r(f) : c(f), b = t.map((d, x) => ({
|
|
1620
|
+
diff: v(d - g, 0),
|
|
1621
|
+
index: x
|
|
1622
|
+
})).sort((d, x) => B(d.diff) - B(x.diff)), {
|
|
1623
|
+
index: m
|
|
1624
|
+
} = b[0];
|
|
1625
|
+
return {
|
|
1626
|
+
index: m,
|
|
1627
|
+
distance: g
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
function v(f, g) {
|
|
1631
|
+
const b = [f, f + n, f - n];
|
|
1632
|
+
if (!e) return f;
|
|
1633
|
+
if (!g) return o(b);
|
|
1634
|
+
const m = b.filter((d) => qe(d) === g);
|
|
1635
|
+
return m.length ? o(m) : ne(b) - n;
|
|
1636
|
+
}
|
|
1637
|
+
function p(f, g) {
|
|
1638
|
+
const b = t[f] - i.get(), m = v(b, g);
|
|
1639
|
+
return {
|
|
1640
|
+
index: f,
|
|
1641
|
+
distance: m
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
function h(f, g) {
|
|
1645
|
+
const b = i.get() + f, {
|
|
1646
|
+
index: m,
|
|
1647
|
+
distance: d
|
|
1648
|
+
} = u(b), x = !e && a(b);
|
|
1649
|
+
if (!g || x) return {
|
|
1650
|
+
index: m,
|
|
1651
|
+
distance: f
|
|
1652
|
+
};
|
|
1653
|
+
const E = t[m] - d, N = f + v(E, 0);
|
|
1654
|
+
return {
|
|
1655
|
+
index: m,
|
|
1656
|
+
distance: N
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
return {
|
|
1660
|
+
byDistance: h,
|
|
1661
|
+
byIndex: p,
|
|
1662
|
+
shortcut: v
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
function mo(e, t, n, s, i, a, r) {
|
|
1666
|
+
function c(p) {
|
|
1667
|
+
const h = p.distance, y = p.index !== t.get();
|
|
1668
|
+
a.add(h), h && (s.duration() ? e.start() : (e.update(), e.render(1), e.update())), y && (n.set(t.get()), t.set(p.index), r.emit("select"));
|
|
1669
|
+
}
|
|
1670
|
+
function o(p, h) {
|
|
1671
|
+
const y = i.byDistance(p, h);
|
|
1672
|
+
c(y);
|
|
1673
|
+
}
|
|
1674
|
+
function u(p, h) {
|
|
1675
|
+
const y = t.clone().set(p), f = i.byIndex(y.get(), h);
|
|
1676
|
+
c(f);
|
|
1677
|
+
}
|
|
1678
|
+
return {
|
|
1679
|
+
distance: o,
|
|
1680
|
+
index: u
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
function po(e, t, n, s, i, a, r, c) {
|
|
1684
|
+
const o = {
|
|
1685
|
+
passive: !0,
|
|
1686
|
+
capture: !0
|
|
1687
|
+
};
|
|
1688
|
+
let u = 0;
|
|
1689
|
+
function v(y) {
|
|
1690
|
+
if (!c) return;
|
|
1691
|
+
function f(g) {
|
|
1692
|
+
if ((/* @__PURE__ */ new Date()).getTime() - u > 10) return;
|
|
1693
|
+
r.emit("slideFocusStart"), e.scrollLeft = 0;
|
|
1694
|
+
const d = n.findIndex((x) => x.includes(g));
|
|
1695
|
+
Ge(d) && (i.useDuration(0), s.index(d, 0), r.emit("slideFocus"));
|
|
1696
|
+
}
|
|
1697
|
+
a.add(document, "keydown", p, !1), t.forEach((g, b) => {
|
|
1698
|
+
a.add(g, "focus", (m) => {
|
|
1699
|
+
(Ae(c) || c(y, m)) && f(b);
|
|
1700
|
+
}, o);
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
function p(y) {
|
|
1704
|
+
y.code === "Tab" && (u = (/* @__PURE__ */ new Date()).getTime());
|
|
1705
|
+
}
|
|
1706
|
+
return {
|
|
1707
|
+
init: v
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
function Ee(e) {
|
|
1711
|
+
let t = e;
|
|
1712
|
+
function n() {
|
|
1713
|
+
return t;
|
|
1714
|
+
}
|
|
1715
|
+
function s(o) {
|
|
1716
|
+
t = r(o);
|
|
1717
|
+
}
|
|
1718
|
+
function i(o) {
|
|
1719
|
+
t += r(o);
|
|
1720
|
+
}
|
|
1721
|
+
function a(o) {
|
|
1722
|
+
t -= r(o);
|
|
1723
|
+
}
|
|
1724
|
+
function r(o) {
|
|
1725
|
+
return Ge(o) ? o : o.get();
|
|
1726
|
+
}
|
|
1727
|
+
return {
|
|
1728
|
+
get: n,
|
|
1729
|
+
set: s,
|
|
1730
|
+
add: i,
|
|
1731
|
+
subtract: a
|
|
1732
|
+
};
|
|
1733
|
+
}
|
|
1734
|
+
function Ct(e, t) {
|
|
1735
|
+
const n = e.scroll === "x" ? r : c, s = t.style;
|
|
1736
|
+
let i = null, a = !1;
|
|
1737
|
+
function r(h) {
|
|
1738
|
+
return `translate3d(${h}px,0px,0px)`;
|
|
1739
|
+
}
|
|
1740
|
+
function c(h) {
|
|
1741
|
+
return `translate3d(0px,${h}px,0px)`;
|
|
1742
|
+
}
|
|
1743
|
+
function o(h) {
|
|
1744
|
+
if (a) return;
|
|
1745
|
+
const y = Kr(e.direction(h));
|
|
1746
|
+
y !== i && (s.transform = n(y), i = y);
|
|
1747
|
+
}
|
|
1748
|
+
function u(h) {
|
|
1749
|
+
a = !h;
|
|
1750
|
+
}
|
|
1751
|
+
function v() {
|
|
1752
|
+
a || (s.transform = "", t.getAttribute("style") || t.removeAttribute("style"));
|
|
1753
|
+
}
|
|
1754
|
+
return {
|
|
1755
|
+
clear: v,
|
|
1756
|
+
to: o,
|
|
1757
|
+
toggleActive: u
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
function ho(e, t, n, s, i, a, r, c, o) {
|
|
1761
|
+
const v = Pe(i), p = Pe(i).reverse(), h = m().concat(d());
|
|
1762
|
+
function y(C, w) {
|
|
1763
|
+
return C.reduce((j, $) => j - i[$], w);
|
|
1764
|
+
}
|
|
1765
|
+
function f(C, w) {
|
|
1766
|
+
return C.reduce((j, $) => y(j, w) > 0 ? j.concat([$]) : j, []);
|
|
1767
|
+
}
|
|
1768
|
+
function g(C) {
|
|
1769
|
+
return a.map((w, j) => ({
|
|
1770
|
+
start: w - s[j] + 0.5 + C,
|
|
1771
|
+
end: w + t - 0.5 + C
|
|
1772
|
+
}));
|
|
1773
|
+
}
|
|
1774
|
+
function b(C, w, j) {
|
|
1775
|
+
const $ = g(w);
|
|
1776
|
+
return C.map((A) => {
|
|
1777
|
+
const F = j ? 0 : -n, V = j ? n : 0, H = j ? "end" : "start", W = $[A][H];
|
|
1778
|
+
return {
|
|
1779
|
+
index: A,
|
|
1780
|
+
loopPoint: W,
|
|
1781
|
+
slideLocation: Ee(-1),
|
|
1782
|
+
translate: Ct(e, o[A]),
|
|
1783
|
+
target: () => c.get() > W ? F : V
|
|
1784
|
+
};
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1787
|
+
function m() {
|
|
1788
|
+
const C = r[0], w = f(p, C);
|
|
1789
|
+
return b(w, n, !1);
|
|
1790
|
+
}
|
|
1791
|
+
function d() {
|
|
1792
|
+
const C = t - r[0] - 1, w = f(v, C);
|
|
1793
|
+
return b(w, -n, !0);
|
|
1794
|
+
}
|
|
1795
|
+
function x() {
|
|
1796
|
+
return h.every(({
|
|
1797
|
+
index: C
|
|
1798
|
+
}) => {
|
|
1799
|
+
const w = v.filter((j) => j !== C);
|
|
1800
|
+
return y(w, t) <= 0.1;
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
function E() {
|
|
1804
|
+
h.forEach((C) => {
|
|
1805
|
+
const {
|
|
1806
|
+
target: w,
|
|
1807
|
+
translate: j,
|
|
1808
|
+
slideLocation: $
|
|
1809
|
+
} = C, A = w();
|
|
1810
|
+
A !== $.get() && (j.to(A), $.set(A));
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
function N() {
|
|
1814
|
+
h.forEach((C) => C.translate.clear());
|
|
1815
|
+
}
|
|
1816
|
+
return {
|
|
1817
|
+
canLoop: x,
|
|
1818
|
+
clear: N,
|
|
1819
|
+
loop: E,
|
|
1820
|
+
loopPoints: h
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
function go(e, t, n) {
|
|
1824
|
+
let s, i = !1;
|
|
1825
|
+
function a(o) {
|
|
1826
|
+
if (!n) return;
|
|
1827
|
+
function u(v) {
|
|
1828
|
+
for (const p of v)
|
|
1829
|
+
if (p.type === "childList") {
|
|
1830
|
+
o.reInit(), t.emit("slidesChanged");
|
|
1831
|
+
break;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
s = new MutationObserver((v) => {
|
|
1835
|
+
i || (Ae(n) || n(o, v)) && u(v);
|
|
1836
|
+
}), s.observe(e, {
|
|
1837
|
+
childList: !0
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
function r() {
|
|
1841
|
+
s && s.disconnect(), i = !0;
|
|
1842
|
+
}
|
|
1843
|
+
return {
|
|
1844
|
+
init: a,
|
|
1845
|
+
destroy: r
|
|
1846
|
+
};
|
|
1847
|
+
}
|
|
1848
|
+
function bo(e, t, n, s) {
|
|
1849
|
+
const i = {};
|
|
1850
|
+
let a = null, r = null, c, o = !1;
|
|
1851
|
+
function u() {
|
|
1852
|
+
c = new IntersectionObserver((f) => {
|
|
1853
|
+
o || (f.forEach((g) => {
|
|
1854
|
+
const b = t.indexOf(g.target);
|
|
1855
|
+
i[b] = g;
|
|
1856
|
+
}), a = null, r = null, n.emit("slidesInView"));
|
|
1857
|
+
}, {
|
|
1858
|
+
root: e.parentElement,
|
|
1859
|
+
threshold: s
|
|
1860
|
+
}), t.forEach((f) => c.observe(f));
|
|
1861
|
+
}
|
|
1862
|
+
function v() {
|
|
1863
|
+
c && c.disconnect(), o = !0;
|
|
1864
|
+
}
|
|
1865
|
+
function p(f) {
|
|
1866
|
+
return Te(i).reduce((g, b) => {
|
|
1867
|
+
const m = parseInt(b), {
|
|
1868
|
+
isIntersecting: d
|
|
1869
|
+
} = i[m];
|
|
1870
|
+
return (f && d || !f && !d) && g.push(m), g;
|
|
1871
|
+
}, []);
|
|
1872
|
+
}
|
|
1873
|
+
function h(f = !0) {
|
|
1874
|
+
if (f && a) return a;
|
|
1875
|
+
if (!f && r) return r;
|
|
1876
|
+
const g = p(f);
|
|
1877
|
+
return f && (a = g), f || (r = g), g;
|
|
1878
|
+
}
|
|
1879
|
+
return {
|
|
1880
|
+
init: u,
|
|
1881
|
+
destroy: v,
|
|
1882
|
+
get: h
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
function vo(e, t, n, s, i, a) {
|
|
1886
|
+
const {
|
|
1887
|
+
measureSize: r,
|
|
1888
|
+
startEdge: c,
|
|
1889
|
+
endEdge: o
|
|
1890
|
+
} = e, u = n[0] && i, v = f(), p = g(), h = n.map(r), y = b();
|
|
1891
|
+
function f() {
|
|
1892
|
+
if (!u) return 0;
|
|
1893
|
+
const d = n[0];
|
|
1894
|
+
return B(t[c] - d[c]);
|
|
1895
|
+
}
|
|
1896
|
+
function g() {
|
|
1897
|
+
if (!u) return 0;
|
|
1898
|
+
const d = a.getComputedStyle(ne(s));
|
|
1899
|
+
return parseFloat(d.getPropertyValue(`margin-${o}`));
|
|
1900
|
+
}
|
|
1901
|
+
function b() {
|
|
1902
|
+
return n.map((d, x, E) => {
|
|
1903
|
+
const N = !x, T = Ke(E, x);
|
|
1904
|
+
return N ? h[x] + v : T ? h[x] + p : E[x + 1][c] - d[c];
|
|
1905
|
+
}).map(B);
|
|
1906
|
+
}
|
|
1907
|
+
return {
|
|
1908
|
+
slideSizes: h,
|
|
1909
|
+
slideSizesWithGaps: y,
|
|
1910
|
+
startGap: v,
|
|
1911
|
+
endGap: p
|
|
1912
|
+
};
|
|
1913
|
+
}
|
|
1914
|
+
function yo(e, t, n, s, i, a, r, c, o) {
|
|
1915
|
+
const {
|
|
1916
|
+
startEdge: u,
|
|
1917
|
+
endEdge: v,
|
|
1918
|
+
direction: p
|
|
1919
|
+
} = e, h = Ge(n);
|
|
1920
|
+
function y(m, d) {
|
|
1921
|
+
return Pe(m).filter((x) => x % d === 0).map((x) => m.slice(x, x + d));
|
|
1922
|
+
}
|
|
1923
|
+
function f(m) {
|
|
1924
|
+
return m.length ? Pe(m).reduce((d, x, E) => {
|
|
1925
|
+
const N = ne(d) || 0, T = N === 0, C = x === je(m), w = i[u] - a[N][u], j = i[u] - a[x][v], $ = !s && T ? p(r) : 0, A = !s && C ? p(c) : 0, F = B(j - A - (w + $));
|
|
1926
|
+
return E && F > t + o && d.push(x), C && d.push(m.length), d;
|
|
1927
|
+
}, []).map((d, x, E) => {
|
|
1928
|
+
const N = Math.max(E[x - 1] || 0);
|
|
1929
|
+
return m.slice(N, d);
|
|
1930
|
+
}) : [];
|
|
1931
|
+
}
|
|
1932
|
+
function g(m) {
|
|
1933
|
+
return h ? y(m, n) : f(m);
|
|
1934
|
+
}
|
|
1935
|
+
return {
|
|
1936
|
+
groupSlides: g
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
function xo(e, t, n, s, i, a, r) {
|
|
1940
|
+
const {
|
|
1941
|
+
align: c,
|
|
1942
|
+
axis: o,
|
|
1943
|
+
direction: u,
|
|
1944
|
+
startIndex: v,
|
|
1945
|
+
loop: p,
|
|
1946
|
+
duration: h,
|
|
1947
|
+
dragFree: y,
|
|
1948
|
+
dragThreshold: f,
|
|
1949
|
+
inViewThreshold: g,
|
|
1950
|
+
slidesToScroll: b,
|
|
1951
|
+
skipSnaps: m,
|
|
1952
|
+
containScroll: d,
|
|
1953
|
+
watchResize: x,
|
|
1954
|
+
watchSlides: E,
|
|
1955
|
+
watchDrag: N,
|
|
1956
|
+
watchFocus: T
|
|
1957
|
+
} = a, C = 2, w = eo(), j = w.measure(t), $ = n.map(w.measure), A = Jr(o, u), F = A.measureSize(j), V = to(F), H = Ur(c, F), W = !p && !!d, X = p || !!d, {
|
|
1958
|
+
slideSizes: J,
|
|
1959
|
+
slideSizesWithGaps: K,
|
|
1960
|
+
startGap: U,
|
|
1961
|
+
endGap: re
|
|
1962
|
+
} = vo(A, j, $, n, X, i), l = yo(A, F, b, p, j, $, U, re, C), {
|
|
1963
|
+
snaps: _,
|
|
1964
|
+
snapsAligned: I
|
|
1965
|
+
} = lo(A, H, j, $, l), M = -ne(_) + ne(K), {
|
|
1966
|
+
snapsContained: Q,
|
|
1967
|
+
scrollContainLimit: z
|
|
1968
|
+
} = so(F, M, I, d, C), P = W ? Q : I, {
|
|
1969
|
+
limit: D
|
|
1970
|
+
} = ao(M, P, p), q = Et(je(P), v, p), G = q.clone(), R = Pe(n), S = ({
|
|
1971
|
+
dragHandler: me,
|
|
1972
|
+
scrollBody: $e,
|
|
1973
|
+
scrollBounds: Fe,
|
|
1974
|
+
options: {
|
|
1975
|
+
loop: Le
|
|
1976
|
+
}
|
|
1977
|
+
}) => {
|
|
1978
|
+
Le || Fe.constrain(me.pointerDown()), $e.seek();
|
|
1979
|
+
}, L = ({
|
|
1980
|
+
scrollBody: me,
|
|
1981
|
+
translate: $e,
|
|
1982
|
+
location: Fe,
|
|
1983
|
+
offsetLocation: Le,
|
|
1984
|
+
previousLocation: Tt,
|
|
1985
|
+
scrollLooper: Nt,
|
|
1986
|
+
slideLooper: jt,
|
|
1987
|
+
dragHandler: Lt,
|
|
1988
|
+
animation: It,
|
|
1989
|
+
eventHandler: Ze,
|
|
1990
|
+
scrollBounds: Mt,
|
|
1991
|
+
options: {
|
|
1992
|
+
loop: et
|
|
1993
|
+
}
|
|
1994
|
+
}, tt) => {
|
|
1995
|
+
const nt = me.settled(), At = !Mt.shouldConstrain(), rt = et ? nt : nt && At, ot = rt && !Lt.pointerDown();
|
|
1996
|
+
ot && It.stop();
|
|
1997
|
+
const Dt = Fe.get() * tt + Tt.get() * (1 - tt);
|
|
1998
|
+
Le.set(Dt), et && (Nt.loop(me.direction()), jt.loop()), $e.to(Le.get()), ot && Ze.emit("settle"), rt || Ze.emit("scroll");
|
|
1999
|
+
}, O = Xr(s, i, () => S(Oe), (me) => L(Oe, me)), Y = 0.68, oe = P[q.get()], se = Ee(oe), le = Ee(oe), ae = Ee(oe), ue = Ee(oe), be = ro(se, ae, le, ue, h, Y), De = fo(p, P, M, D, ue), Re = mo(O, q, G, be, De, ue, r), Xe = co(D), Je = Ne(), wt = bo(t, n, r, g), {
|
|
2000
|
+
slideRegistry: Qe
|
|
2001
|
+
} = uo(W, d, P, z, l, R), Pt = po(e, n, Qe, Re, be, Je, r, T), Oe = {
|
|
2002
|
+
ownerDocument: s,
|
|
2003
|
+
ownerWindow: i,
|
|
2004
|
+
eventHandler: r,
|
|
2005
|
+
containerRect: j,
|
|
2006
|
+
slideRects: $,
|
|
2007
|
+
animation: O,
|
|
2008
|
+
axis: A,
|
|
2009
|
+
dragHandler: Qr(A, e, s, i, ue, Zr(A, i), se, O, Re, be, De, q, r, V, y, f, m, Y, N),
|
|
2010
|
+
eventStore: Je,
|
|
2011
|
+
percentOfView: V,
|
|
2012
|
+
index: q,
|
|
2013
|
+
indexPrevious: G,
|
|
2014
|
+
limit: D,
|
|
2015
|
+
location: se,
|
|
2016
|
+
offsetLocation: ae,
|
|
2017
|
+
previousLocation: le,
|
|
2018
|
+
options: a,
|
|
2019
|
+
resizeHandler: no(t, r, i, n, A, x, w),
|
|
2020
|
+
scrollBody: be,
|
|
2021
|
+
scrollBounds: oo(D, ae, ue, be, V),
|
|
2022
|
+
scrollLooper: io(M, D, ae, [se, ae, le, ue]),
|
|
2023
|
+
scrollProgress: Xe,
|
|
2024
|
+
scrollSnapList: P.map(Xe.get),
|
|
2025
|
+
scrollSnaps: P,
|
|
2026
|
+
scrollTarget: De,
|
|
2027
|
+
scrollTo: Re,
|
|
2028
|
+
slideLooper: ho(A, F, M, J, K, _, P, ae, n),
|
|
2029
|
+
slideFocus: Pt,
|
|
2030
|
+
slidesHandler: go(t, r, E),
|
|
2031
|
+
slidesInView: wt,
|
|
2032
|
+
slideIndexes: R,
|
|
2033
|
+
slideRegistry: Qe,
|
|
2034
|
+
slidesToScroll: l,
|
|
2035
|
+
target: ue,
|
|
2036
|
+
translate: Ct(A, t)
|
|
2037
|
+
};
|
|
2038
|
+
return Oe;
|
|
2039
|
+
}
|
|
2040
|
+
function So() {
|
|
2041
|
+
let e = {}, t;
|
|
2042
|
+
function n(u) {
|
|
2043
|
+
t = u;
|
|
2044
|
+
}
|
|
2045
|
+
function s(u) {
|
|
2046
|
+
return e[u] || [];
|
|
2047
|
+
}
|
|
2048
|
+
function i(u) {
|
|
2049
|
+
return s(u).forEach((v) => v(t, u)), o;
|
|
2050
|
+
}
|
|
2051
|
+
function a(u, v) {
|
|
2052
|
+
return e[u] = s(u).concat([v]), o;
|
|
2053
|
+
}
|
|
2054
|
+
function r(u, v) {
|
|
2055
|
+
return e[u] = s(u).filter((p) => p !== v), o;
|
|
2056
|
+
}
|
|
2057
|
+
function c() {
|
|
2058
|
+
e = {};
|
|
2059
|
+
}
|
|
2060
|
+
const o = {
|
|
2061
|
+
init: n,
|
|
2062
|
+
emit: i,
|
|
2063
|
+
off: r,
|
|
2064
|
+
on: a,
|
|
2065
|
+
clear: c
|
|
2066
|
+
};
|
|
2067
|
+
return o;
|
|
2068
|
+
}
|
|
2069
|
+
const _o = {
|
|
2070
|
+
align: "center",
|
|
2071
|
+
axis: "x",
|
|
2072
|
+
container: null,
|
|
2073
|
+
slides: null,
|
|
2074
|
+
containScroll: "trimSnaps",
|
|
2075
|
+
direction: "ltr",
|
|
2076
|
+
slidesToScroll: 1,
|
|
2077
|
+
inViewThreshold: 0,
|
|
2078
|
+
breakpoints: {},
|
|
2079
|
+
dragFree: !1,
|
|
2080
|
+
dragThreshold: 10,
|
|
2081
|
+
loop: !1,
|
|
2082
|
+
skipSnaps: !1,
|
|
2083
|
+
duration: 25,
|
|
2084
|
+
startIndex: 0,
|
|
2085
|
+
active: !0,
|
|
2086
|
+
watchDrag: !0,
|
|
2087
|
+
watchResize: !0,
|
|
2088
|
+
watchSlides: !0,
|
|
2089
|
+
watchFocus: !0
|
|
2090
|
+
};
|
|
2091
|
+
function ko(e) {
|
|
2092
|
+
function t(a, r) {
|
|
2093
|
+
return kt(a, r || {});
|
|
2094
|
+
}
|
|
2095
|
+
function n(a) {
|
|
2096
|
+
const r = a.breakpoints || {}, c = Te(r).filter((o) => e.matchMedia(o).matches).map((o) => r[o]).reduce((o, u) => t(o, u), {});
|
|
2097
|
+
return t(a, c);
|
|
2098
|
+
}
|
|
2099
|
+
function s(a) {
|
|
2100
|
+
return a.map((r) => Te(r.breakpoints || {})).reduce((r, c) => r.concat(c), []).map(e.matchMedia);
|
|
2101
|
+
}
|
|
2102
|
+
return {
|
|
2103
|
+
mergeOptions: t,
|
|
2104
|
+
optionsAtMedia: n,
|
|
2105
|
+
optionsMediaQueries: s
|
|
2106
|
+
};
|
|
2107
|
+
}
|
|
2108
|
+
function Eo(e) {
|
|
2109
|
+
let t = [];
|
|
2110
|
+
function n(a, r) {
|
|
2111
|
+
return t = r.filter(({
|
|
2112
|
+
options: c
|
|
2113
|
+
}) => e.optionsAtMedia(c).active !== !1), t.forEach((c) => c.init(a, e)), r.reduce((c, o) => Object.assign(c, {
|
|
2114
|
+
[o.name]: o
|
|
2115
|
+
}), {});
|
|
2116
|
+
}
|
|
2117
|
+
function s() {
|
|
2118
|
+
t = t.filter((a) => a.destroy());
|
|
2119
|
+
}
|
|
2120
|
+
return {
|
|
2121
|
+
init: n,
|
|
2122
|
+
destroy: s
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
function Me(e, t, n) {
|
|
2126
|
+
const s = e.ownerDocument, i = s.defaultView, a = ko(i), r = Eo(a), c = Ne(), o = So(), {
|
|
2127
|
+
mergeOptions: u,
|
|
2128
|
+
optionsAtMedia: v,
|
|
2129
|
+
optionsMediaQueries: p
|
|
2130
|
+
} = a, {
|
|
2131
|
+
on: h,
|
|
2132
|
+
off: y,
|
|
2133
|
+
emit: f
|
|
2134
|
+
} = o, g = A;
|
|
2135
|
+
let b = !1, m, d = u(_o, Me.globalOptions), x = u(d), E = [], N, T, C;
|
|
2136
|
+
function w() {
|
|
2137
|
+
const {
|
|
2138
|
+
container: R,
|
|
2139
|
+
slides: S
|
|
2140
|
+
} = x;
|
|
2141
|
+
T = (ze(R) ? e.querySelector(R) : R) || e.children[0];
|
|
2142
|
+
const O = ze(S) ? T.querySelectorAll(S) : S;
|
|
2143
|
+
C = [].slice.call(O || T.children);
|
|
2144
|
+
}
|
|
2145
|
+
function j(R) {
|
|
2146
|
+
const S = xo(e, T, C, s, i, R, o);
|
|
2147
|
+
if (R.loop && !S.slideLooper.canLoop()) {
|
|
2148
|
+
const L = Object.assign({}, R, {
|
|
2149
|
+
loop: !1
|
|
2150
|
+
});
|
|
2151
|
+
return j(L);
|
|
2152
|
+
}
|
|
2153
|
+
return S;
|
|
2154
|
+
}
|
|
2155
|
+
function $(R, S) {
|
|
2156
|
+
b || (d = u(d, R), x = v(d), E = S || E, w(), m = j(x), p([d, ...E.map(({
|
|
2157
|
+
options: L
|
|
2158
|
+
}) => L)]).forEach((L) => c.add(L, "change", A)), x.active && (m.translate.to(m.location.get()), m.animation.init(), m.slidesInView.init(), m.slideFocus.init(G), m.eventHandler.init(G), m.resizeHandler.init(G), m.slidesHandler.init(G), m.options.loop && m.slideLooper.loop(), T.offsetParent && C.length && m.dragHandler.init(G), N = r.init(G, E)));
|
|
2159
|
+
}
|
|
2160
|
+
function A(R, S) {
|
|
2161
|
+
const L = l();
|
|
2162
|
+
F(), $(u({
|
|
2163
|
+
startIndex: L
|
|
2164
|
+
}, R), S), o.emit("reInit");
|
|
2165
|
+
}
|
|
2166
|
+
function F() {
|
|
2167
|
+
m.dragHandler.destroy(), m.eventStore.clear(), m.translate.clear(), m.slideLooper.clear(), m.resizeHandler.destroy(), m.slidesHandler.destroy(), m.slidesInView.destroy(), m.animation.destroy(), r.destroy(), c.clear();
|
|
2168
|
+
}
|
|
2169
|
+
function V() {
|
|
2170
|
+
b || (b = !0, c.clear(), F(), o.emit("destroy"), o.clear());
|
|
2171
|
+
}
|
|
2172
|
+
function H(R, S, L) {
|
|
2173
|
+
!x.active || b || (m.scrollBody.useBaseFriction().useDuration(S === !0 ? 0 : x.duration), m.scrollTo.index(R, L || 0));
|
|
2174
|
+
}
|
|
2175
|
+
function W(R) {
|
|
2176
|
+
const S = m.index.add(1).get();
|
|
2177
|
+
H(S, R, -1);
|
|
2178
|
+
}
|
|
2179
|
+
function X(R) {
|
|
2180
|
+
const S = m.index.add(-1).get();
|
|
2181
|
+
H(S, R, 1);
|
|
2182
|
+
}
|
|
2183
|
+
function J() {
|
|
2184
|
+
return m.index.add(1).get() !== l();
|
|
2185
|
+
}
|
|
2186
|
+
function K() {
|
|
2187
|
+
return m.index.add(-1).get() !== l();
|
|
2188
|
+
}
|
|
2189
|
+
function U() {
|
|
2190
|
+
return m.scrollSnapList;
|
|
2191
|
+
}
|
|
2192
|
+
function re() {
|
|
2193
|
+
return m.scrollProgress.get(m.offsetLocation.get());
|
|
2194
|
+
}
|
|
2195
|
+
function l() {
|
|
2196
|
+
return m.index.get();
|
|
2197
|
+
}
|
|
2198
|
+
function _() {
|
|
2199
|
+
return m.indexPrevious.get();
|
|
2200
|
+
}
|
|
2201
|
+
function I() {
|
|
2202
|
+
return m.slidesInView.get();
|
|
2203
|
+
}
|
|
2204
|
+
function M() {
|
|
2205
|
+
return m.slidesInView.get(!1);
|
|
2206
|
+
}
|
|
2207
|
+
function Q() {
|
|
2208
|
+
return N;
|
|
2209
|
+
}
|
|
2210
|
+
function z() {
|
|
2211
|
+
return m;
|
|
2212
|
+
}
|
|
2213
|
+
function P() {
|
|
2214
|
+
return e;
|
|
2215
|
+
}
|
|
2216
|
+
function D() {
|
|
2217
|
+
return T;
|
|
2218
|
+
}
|
|
2219
|
+
function q() {
|
|
2220
|
+
return C;
|
|
2221
|
+
}
|
|
2222
|
+
const G = {
|
|
2223
|
+
canScrollNext: J,
|
|
2224
|
+
canScrollPrev: K,
|
|
2225
|
+
containerNode: D,
|
|
2226
|
+
internalEngine: z,
|
|
2227
|
+
destroy: V,
|
|
2228
|
+
off: y,
|
|
2229
|
+
on: h,
|
|
2230
|
+
emit: f,
|
|
2231
|
+
plugins: Q,
|
|
2232
|
+
previousScrollSnap: _,
|
|
2233
|
+
reInit: g,
|
|
2234
|
+
rootNode: P,
|
|
2235
|
+
scrollNext: W,
|
|
2236
|
+
scrollPrev: X,
|
|
2237
|
+
scrollProgress: re,
|
|
2238
|
+
scrollSnapList: U,
|
|
2239
|
+
scrollTo: H,
|
|
2240
|
+
selectedScrollSnap: l,
|
|
2241
|
+
slideNodes: q,
|
|
2242
|
+
slidesInView: I,
|
|
2243
|
+
slidesNotInView: M
|
|
2244
|
+
};
|
|
2245
|
+
return $(t, n), setTimeout(() => o.emit("init"), 0), G;
|
|
2246
|
+
}
|
|
2247
|
+
Me.globalOptions = void 0;
|
|
2248
|
+
function Ue(e = {}, t = []) {
|
|
2249
|
+
const n = We(e), s = We(t), [i, a] = ge(), [r, c] = ge(), o = te(() => {
|
|
2250
|
+
i && i.reInit(n.current, s.current);
|
|
2251
|
+
}, [i]);
|
|
2252
|
+
return ie(() => {
|
|
2253
|
+
Ye(n.current, e) || (n.current = e, o());
|
|
2254
|
+
}, [e, o]), ie(() => {
|
|
2255
|
+
Gr(s.current, t) || (s.current = t, o());
|
|
2256
|
+
}, [t, o]), ie(() => {
|
|
2257
|
+
if (Yr() && r) {
|
|
2258
|
+
Me.globalOptions = Ue.globalOptions;
|
|
2259
|
+
const u = Me(r, n.current, s.current);
|
|
2260
|
+
return a(u), () => u.destroy();
|
|
2261
|
+
} else
|
|
2262
|
+
a(void 0);
|
|
2263
|
+
}, [r, a]), [c, i];
|
|
2264
|
+
}
|
|
2265
|
+
Ue.globalOptions = void 0;
|
|
2266
|
+
const Co = "_carouselContainer_15ag3_1", wo = "_viewport_15ag3_11", Po = "_slides_15ag3_17", To = "_slide_15ag3_17", No = "_image_15ag3_33", jo = "_empty_15ag3_49", Lo = "_controls_15ag3_55", Io = "_arrows_15ag3_64", Mo = "_dots_15ag3_74", Ao = "_dot_15ag3_74", Do = "_dotActive_15ag3_95", ee = {
|
|
2267
|
+
carouselContainer: Co,
|
|
2268
|
+
viewport: wo,
|
|
2269
|
+
slides: Po,
|
|
2270
|
+
slide: To,
|
|
2271
|
+
image: No,
|
|
2272
|
+
empty: jo,
|
|
2273
|
+
controls: Lo,
|
|
2274
|
+
arrows: Io,
|
|
2275
|
+
dots: Mo,
|
|
2276
|
+
dot: Ao,
|
|
2277
|
+
dotActive: Do
|
|
2278
|
+
}, Ro = ({
|
|
2279
|
+
images: e,
|
|
2280
|
+
autoPlay: t = !1,
|
|
2281
|
+
autoDelay: n = 5,
|
|
2282
|
+
showArrows: s = !0,
|
|
2283
|
+
showDots: i = !0,
|
|
2284
|
+
"data-color": a,
|
|
2285
|
+
"data-size": r
|
|
2286
|
+
}) => {
|
|
2287
|
+
const [c, o] = Ue({ loop: !0 }), [u, v] = ge(0), [p, h] = ge([]), y = ke(() => n * 1e3, [n]), f = te(() => {
|
|
2288
|
+
o && v(o.selectedScrollSnap());
|
|
2289
|
+
}, [o]), g = te((d) => o && o.scrollTo(d), [o]), b = te(() => o && o.scrollPrev(), [o]), m = te(() => o && o.scrollNext(), [o]);
|
|
2290
|
+
return ie(() => {
|
|
2291
|
+
if (o)
|
|
2292
|
+
return o.on("select", f), o.on("reInit", f), h(o.scrollSnapList()), () => {
|
|
2293
|
+
o.off("select", f), o.off("reInit", f);
|
|
2294
|
+
};
|
|
2295
|
+
}, [o, f]), ie(() => {
|
|
2296
|
+
o && e.length > 0 && (o.reInit(), h(o.scrollSnapList()));
|
|
2297
|
+
}, [o, e]), ie(() => {
|
|
2298
|
+
if (!t || !o || e.length === 0) return;
|
|
2299
|
+
const d = window.setInterval(() => {
|
|
2300
|
+
o.scrollNext();
|
|
2301
|
+
}, y);
|
|
2302
|
+
return () => {
|
|
2303
|
+
window.clearInterval(d);
|
|
2304
|
+
};
|
|
2305
|
+
}, [t, y, o, e]), /* @__PURE__ */ k.jsxs("div", { className: ee.carouselContainer, "data-color": a, "data-size": r, children: [
|
|
2306
|
+
/* @__PURE__ */ k.jsx("div", { className: ee.viewport, ref: c, children: /* @__PURE__ */ k.jsx("div", { className: ee.slides, children: e && e.length > 0 ? e.map((d, x) => /* @__PURE__ */ k.jsx("div", { className: ee.slide, children: /* @__PURE__ */ k.jsx(
|
|
2307
|
+
"img",
|
|
2308
|
+
{
|
|
2309
|
+
className: ee.image,
|
|
2310
|
+
src: d.src,
|
|
2311
|
+
alt: d.alt,
|
|
2312
|
+
loading: x === 0 ? "eager" : "lazy",
|
|
2313
|
+
crossOrigin: "anonymous",
|
|
2314
|
+
onError: (E) => {
|
|
2315
|
+
E.target.style.display = "none";
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
) }, `image-${x}`)) : /* @__PURE__ */ k.jsx("div", { className: ee.slide, children: /* @__PURE__ */ k.jsx("div", { className: ee.empty, children: "Ingen bilder" }) }) }) }),
|
|
2319
|
+
(s || i && e.length > 1) && /* @__PURE__ */ k.jsxs("div", { className: ee.controls, "aria-hidden": "false", children: [
|
|
2320
|
+
s && /* @__PURE__ */ k.jsxs("div", { className: ee.arrows, children: [
|
|
2321
|
+
/* @__PURE__ */ k.jsx(
|
|
2322
|
+
we,
|
|
2323
|
+
{
|
|
2324
|
+
variant: "primary",
|
|
2325
|
+
icon: !0,
|
|
2326
|
+
"aria-label": "Forrige bilde",
|
|
2327
|
+
onClick: b,
|
|
2328
|
+
disabled: e.length <= 1,
|
|
2329
|
+
children: /* @__PURE__ */ k.jsx(Dn, { "aria-hidden": !0 })
|
|
2330
|
+
}
|
|
2331
|
+
),
|
|
2332
|
+
/* @__PURE__ */ k.jsx(
|
|
2333
|
+
we,
|
|
2334
|
+
{
|
|
2335
|
+
variant: "primary",
|
|
2336
|
+
icon: !0,
|
|
2337
|
+
"aria-label": "Neste bilde",
|
|
2338
|
+
onClick: m,
|
|
2339
|
+
disabled: e.length <= 1,
|
|
2340
|
+
children: /* @__PURE__ */ k.jsx(Rn, { "aria-hidden": !0 })
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
] }),
|
|
2344
|
+
i && e.length > 1 && /* @__PURE__ */ k.jsx("div", { className: ee.dots, role: "tablist", "aria-label": "Bildeposisjon", children: p.map((d, x) => {
|
|
2345
|
+
const E = x === u;
|
|
2346
|
+
return /* @__PURE__ */ k.jsx(
|
|
2347
|
+
"button",
|
|
2348
|
+
{
|
|
2349
|
+
type: "button",
|
|
2350
|
+
className: `${ee.dot} ${E ? ee.dotActive : ""}`,
|
|
2351
|
+
onClick: () => g(x),
|
|
2352
|
+
"aria-label": `Gå til bilde ${x + 1}`,
|
|
2353
|
+
"aria-selected": E,
|
|
2354
|
+
role: "tab"
|
|
2355
|
+
},
|
|
2356
|
+
`dot-${x}`
|
|
2357
|
+
);
|
|
2358
|
+
}) })
|
|
2359
|
+
] })
|
|
2360
|
+
] });
|
|
2361
|
+
};
|
|
2362
|
+
Ro.displayName = "Carousel";
|
|
2363
|
+
const ns = Ut, rs = Xt, os = Jt, ss = Qt, as = Zt, is = nn, Oo = en, $o = tn;
|
|
2364
|
+
Oo.displayName = "Field.Description";
|
|
2365
|
+
$o.displayName = "Field.Counter";
|
|
2366
|
+
const cs = vt, Fo = ce((e, t) => /* @__PURE__ */ k.jsx(rn, { ref: t, ...e }));
|
|
2367
|
+
Fo.displayName = "Heading";
|
|
2368
|
+
const ls = on, Bo = ce((e, t) => /* @__PURE__ */ k.jsx(sn, { ref: t, ...e }));
|
|
2369
|
+
Bo.displayName = "Label";
|
|
2370
|
+
const us = an, ds = cn, fs = ln, ms = un, Vo = ce(
|
|
2371
|
+
(e, t) => /* @__PURE__ */ k.jsx(dn, { ref: t, ...e })
|
|
1026
2372
|
);
|
|
1027
|
-
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
|
|
2373
|
+
Vo.displayName = "Paragraph";
|
|
2374
|
+
const ps = fn, hs = mn, gs = pn, bs = hn, vs = gn, ys = bn, xs = vn, Ss = yn, Wo = xn;
|
|
2375
|
+
Wo.displayName = "Suggestion";
|
|
2376
|
+
const _s = Sn, ks = _n, Es = kn, Cs = En, ws = Cn, Ps = wn, Ts = Pn, Ns = Tn, zo = ce((e, t) => /* @__PURE__ */ k.jsx(Nn, { ref: t, ...e }));
|
|
2377
|
+
zo.displayName = "ValidationMessage";
|
|
1032
2378
|
export {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
2379
|
+
Bn as Alert,
|
|
2380
|
+
Vn as Avatar,
|
|
2381
|
+
Wn as Badge,
|
|
2382
|
+
Ko as BadgePosition,
|
|
2383
|
+
Uo as Breadcrumbs,
|
|
2384
|
+
Jo as BreadcrumbsItem,
|
|
2385
|
+
Qo as BreadcrumbsLink,
|
|
2386
|
+
Xo as BreadcrumbsList,
|
|
2387
|
+
zn as Button,
|
|
2388
|
+
Hn as Card,
|
|
2389
|
+
Zo as CardBlock,
|
|
2390
|
+
Ro as Carousel,
|
|
2391
|
+
Yn as Checkbox,
|
|
2392
|
+
ts as Chip,
|
|
2393
|
+
zr as DateInput,
|
|
2394
|
+
Dr as DatePicker,
|
|
2395
|
+
ns as Details,
|
|
2396
|
+
rs as Dialog,
|
|
2397
|
+
os as Divider,
|
|
2398
|
+
ss as Dropdown,
|
|
2399
|
+
as as ErrorSummary,
|
|
2400
|
+
is as Field,
|
|
2401
|
+
$o as FieldCounter,
|
|
2402
|
+
Oo as FieldDescription,
|
|
2403
|
+
cs as Fieldset,
|
|
2404
|
+
Fo as Heading,
|
|
2405
|
+
ls as Input,
|
|
2406
|
+
Bo as Label,
|
|
2407
|
+
us as Link,
|
|
2408
|
+
ds as List,
|
|
2409
|
+
fs as Pagination,
|
|
2410
|
+
Vo as Paragraph,
|
|
2411
|
+
ps as Popover,
|
|
2412
|
+
hs as Radio,
|
|
2413
|
+
bs as Search,
|
|
2414
|
+
vs as Select,
|
|
2415
|
+
ys as SkeletonLoader,
|
|
2416
|
+
xs as SkipLink,
|
|
2417
|
+
Ss as Spinner,
|
|
2418
|
+
Wo as Suggestion,
|
|
2419
|
+
_s as Switch,
|
|
2420
|
+
ks as Table,
|
|
2421
|
+
Es as Tabs,
|
|
2422
|
+
Cs as Tag,
|
|
2423
|
+
ws as Textarea,
|
|
2424
|
+
Ps as Textfield,
|
|
2425
|
+
Ts as ToggleGroup,
|
|
2426
|
+
Ns as Tooltip,
|
|
2427
|
+
zo as ValidationMessage,
|
|
2428
|
+
es as useCheckboxGroup,
|
|
2429
|
+
ms as usePagination,
|
|
2430
|
+
gs as useRadioGroup
|
|
1084
2431
|
};
|