@zomako/elearning-components 1.0.0 → 1.0.1
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/elearning-components.es.js +448 -320
- package/dist/elearning-components.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Accordion/README.md +181 -0
- package/src/components/Accordion/index.tsx +191 -0
- package/src/components/Accordion/style.module.css +112 -0
- package/src/index.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { motion as
|
|
3
|
-
var
|
|
1
|
+
import De, { useState as re, useId as pr, useCallback as Ce } from "react";
|
|
2
|
+
import { motion as te, AnimatePresence as hr } from "framer-motion";
|
|
3
|
+
var ne = { exports: {} }, L = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,21 +10,21 @@ var H = { exports: {} }, I = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof:
|
|
13
|
+
var Pe;
|
|
14
|
+
function gr() {
|
|
15
|
+
if (Pe) return L;
|
|
16
|
+
Pe = 1;
|
|
17
|
+
var d = De, v = Symbol.for("react.element"), j = Symbol.for("react.fragment"), _ = Object.prototype.hasOwnProperty, E = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function w(k, p, C) {
|
|
19
|
+
var o, u = {}, f = null, b = null;
|
|
20
|
+
C !== void 0 && (f = "" + C), p.key !== void 0 && (f = "" + p.key), p.ref !== void 0 && (b = p.ref);
|
|
21
|
+
for (o in p) _.call(p, o) && !O.hasOwnProperty(o) && (u[o] = p[o]);
|
|
22
|
+
if (k && k.defaultProps) for (o in p = k.defaultProps, p) u[o] === void 0 && (u[o] = p[o]);
|
|
23
|
+
return { $$typeof: v, type: k, key: f, ref: b, props: u, _owner: E.current };
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return L.Fragment = j, L.jsx = w, L.jsxs = w, L;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var U = {};
|
|
28
28
|
/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-jsx-runtime.development.js
|
|
@@ -34,91 +34,91 @@ var $ = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
function
|
|
37
|
+
var xe;
|
|
38
|
+
function _r() {
|
|
39
|
+
return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var d = De, v = Symbol.for("react.element"), j = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), k = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), x = Symbol.iterator, F = "@@iterator";
|
|
41
|
+
function V(e) {
|
|
42
42
|
if (e === null || typeof e != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var r =
|
|
44
|
+
var r = x && e[x] || e[F];
|
|
45
45
|
return typeof r == "function" ? r : null;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
function
|
|
47
|
+
var P = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function y(e) {
|
|
49
49
|
{
|
|
50
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
51
|
-
t[
|
|
52
|
-
|
|
50
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
51
|
+
t[n - 1] = arguments[n];
|
|
52
|
+
Ae("error", e, t);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ae(e, r, t) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var
|
|
57
|
+
var n = P.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
58
|
+
s !== "" && (r += "%s", t = t.concat([s]));
|
|
59
|
+
var c = t.map(function(i) {
|
|
60
60
|
return String(i);
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
65
|
+
var Ne = !1, Fe = !1, Ie = !1, $e = !1, We = !1, ae;
|
|
66
|
+
ae = Symbol.for("react.module.reference");
|
|
67
|
+
function Ye(e) {
|
|
68
|
+
return !!(typeof e == "string" || typeof e == "function" || e === _ || e === O || We || e === E || e === C || e === o || $e || e === b || Ne || Fe || Ie || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === u || e.$$typeof === w || e.$$typeof === k || e.$$typeof === p || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
|
-
e.$$typeof ===
|
|
72
|
+
e.$$typeof === ae || e.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
78
|
-
var
|
|
79
|
-
return
|
|
74
|
+
function Le(e, r, t) {
|
|
75
|
+
var n = e.displayName;
|
|
76
|
+
if (n)
|
|
77
|
+
return n;
|
|
78
|
+
var s = r.displayName || r.name || "";
|
|
79
|
+
return s !== "" ? t + "(" + s + ")" : t;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function ie(e) {
|
|
82
82
|
return e.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function D(e) {
|
|
85
85
|
if (e == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof e.tag == "number" &&
|
|
87
|
+
if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
88
88
|
return e.displayName || e.name || null;
|
|
89
89
|
if (typeof e == "string")
|
|
90
90
|
return e;
|
|
91
91
|
switch (e) {
|
|
92
|
-
case
|
|
92
|
+
case _:
|
|
93
93
|
return "Fragment";
|
|
94
|
-
case w:
|
|
95
|
-
return "Portal";
|
|
96
94
|
case j:
|
|
95
|
+
return "Portal";
|
|
96
|
+
case O:
|
|
97
97
|
return "Profiler";
|
|
98
|
-
case
|
|
98
|
+
case E:
|
|
99
99
|
return "StrictMode";
|
|
100
|
-
case
|
|
100
|
+
case C:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case o:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof e == "object")
|
|
106
106
|
switch (e.$$typeof) {
|
|
107
|
-
case
|
|
107
|
+
case k:
|
|
108
108
|
var r = e;
|
|
109
|
-
return
|
|
110
|
-
case
|
|
109
|
+
return ie(r) + ".Consumer";
|
|
110
|
+
case w:
|
|
111
111
|
var t = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
return
|
|
115
|
-
case
|
|
116
|
-
var
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
112
|
+
return ie(t._context) + ".Provider";
|
|
113
|
+
case p:
|
|
114
|
+
return Le(e, e.render, "ForwardRef");
|
|
115
|
+
case u:
|
|
116
|
+
var n = e.displayName || null;
|
|
117
|
+
return n !== null ? n : D(e.type) || "Memo";
|
|
118
|
+
case f: {
|
|
119
|
+
var s = e, c = s._payload, i = s._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return D(i(c));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,18 +126,18 @@ function vr() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
130
|
-
function
|
|
129
|
+
var A = Object.assign, W = 0, oe, se, ce, le, ue, fe, de;
|
|
130
|
+
function ve() {
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
132
|
+
ve.__reactDisabledLog = !0;
|
|
133
|
+
function Ue() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if (W === 0) {
|
|
136
|
+
oe = console.log, se = console.info, ce = console.warn, le = console.error, ue = console.group, fe = console.groupCollapsed, de = console.groupEnd;
|
|
137
137
|
var e = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
140
|
-
value:
|
|
140
|
+
value: ve,
|
|
141
141
|
writable: !0
|
|
142
142
|
};
|
|
143
143
|
Object.defineProperties(console, {
|
|
@@ -150,77 +150,77 @@ function vr() {
|
|
|
150
150
|
groupEnd: e
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
W++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Ve() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (W--, W === 0) {
|
|
159
159
|
var e = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
166
|
-
value:
|
|
165
|
+
log: A({}, e, {
|
|
166
|
+
value: oe
|
|
167
167
|
}),
|
|
168
|
-
info:
|
|
169
|
-
value:
|
|
168
|
+
info: A({}, e, {
|
|
169
|
+
value: se
|
|
170
170
|
}),
|
|
171
|
-
warn:
|
|
172
|
-
value:
|
|
171
|
+
warn: A({}, e, {
|
|
172
|
+
value: ce
|
|
173
173
|
}),
|
|
174
|
-
error:
|
|
175
|
-
value:
|
|
174
|
+
error: A({}, e, {
|
|
175
|
+
value: le
|
|
176
176
|
}),
|
|
177
|
-
group:
|
|
178
|
-
value:
|
|
177
|
+
group: A({}, e, {
|
|
178
|
+
value: ue
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed:
|
|
181
|
-
value:
|
|
180
|
+
groupCollapsed: A({}, e, {
|
|
181
|
+
value: fe
|
|
182
182
|
}),
|
|
183
|
-
groupEnd:
|
|
184
|
-
value:
|
|
183
|
+
groupEnd: A({}, e, {
|
|
184
|
+
value: de
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
W < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
var
|
|
192
|
-
function
|
|
191
|
+
var J = P.ReactCurrentDispatcher, G;
|
|
192
|
+
function M(e, r, t) {
|
|
193
193
|
{
|
|
194
|
-
if (
|
|
194
|
+
if (G === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
|
-
} catch (
|
|
198
|
-
var
|
|
199
|
-
|
|
197
|
+
} catch (s) {
|
|
198
|
+
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
G = n && n[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
|
-
` +
|
|
202
|
+
` + G + e;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var
|
|
205
|
+
var z = !1, B;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var Me = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
B = new Me();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
if (!e ||
|
|
210
|
+
function pe(e, r) {
|
|
211
|
+
if (!e || z)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var t =
|
|
214
|
+
var t = B.get(e);
|
|
215
215
|
if (t !== void 0)
|
|
216
216
|
return t;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var
|
|
218
|
+
var n;
|
|
219
|
+
z = !0;
|
|
220
|
+
var s = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
|
-
var
|
|
223
|
-
|
|
222
|
+
var c;
|
|
223
|
+
c = J.current, J.current = null, Ue();
|
|
224
224
|
try {
|
|
225
225
|
if (r) {
|
|
226
226
|
var i = function() {
|
|
@@ -233,167 +233,167 @@ function vr() {
|
|
|
233
233
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
234
|
try {
|
|
235
235
|
Reflect.construct(i, []);
|
|
236
|
-
} catch (
|
|
237
|
-
|
|
236
|
+
} catch (R) {
|
|
237
|
+
n = R;
|
|
238
238
|
}
|
|
239
239
|
Reflect.construct(e, [], i);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
242
|
i.call();
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
243
|
+
} catch (R) {
|
|
244
|
+
n = R;
|
|
245
245
|
}
|
|
246
246
|
e.call(i.prototype);
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
|
-
} catch (
|
|
252
|
-
|
|
251
|
+
} catch (R) {
|
|
252
|
+
n = R;
|
|
253
253
|
}
|
|
254
254
|
e();
|
|
255
255
|
}
|
|
256
|
-
} catch (
|
|
257
|
-
if (
|
|
258
|
-
for (var
|
|
259
|
-
`),
|
|
260
|
-
`),
|
|
261
|
-
|
|
262
|
-
for (;
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
256
|
+
} catch (R) {
|
|
257
|
+
if (R && n && typeof R.stack == "string") {
|
|
258
|
+
for (var a = R.stack.split(`
|
|
259
|
+
`), m = n.stack.split(`
|
|
260
|
+
`), h = a.length - 1, g = m.length - 1; h >= 1 && g >= 0 && a[h] !== m[g]; )
|
|
261
|
+
g--;
|
|
262
|
+
for (; h >= 1 && g >= 0; h--, g--)
|
|
263
|
+
if (a[h] !== m[g]) {
|
|
264
|
+
if (h !== 1 || g !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (
|
|
267
|
-
var
|
|
268
|
-
` +
|
|
269
|
-
return e.displayName &&
|
|
266
|
+
if (h--, g--, g < 0 || a[h] !== m[g]) {
|
|
267
|
+
var T = `
|
|
268
|
+
` + a[h].replace(" at new ", " at ");
|
|
269
|
+
return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, T), T;
|
|
270
270
|
}
|
|
271
|
-
while (
|
|
271
|
+
while (h >= 1 && g >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
z = !1, J.current = c, Ve(), Error.prepareStackTrace = s;
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
return typeof e == "function" &&
|
|
278
|
+
var $ = e ? e.displayName || e.name : "", N = $ ? M($) : "";
|
|
279
|
+
return typeof e == "function" && B.set(e, N), N;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
281
|
+
function Be(e, r, t) {
|
|
282
|
+
return pe(e, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Ke(e) {
|
|
285
285
|
var r = e.prototype;
|
|
286
286
|
return !!(r && r.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function K(e, r, t) {
|
|
289
289
|
if (e == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof e == "function")
|
|
292
|
-
return
|
|
292
|
+
return pe(e, Ke(e));
|
|
293
293
|
if (typeof e == "string")
|
|
294
|
-
return
|
|
294
|
+
return M(e);
|
|
295
295
|
switch (e) {
|
|
296
|
-
case
|
|
297
|
-
return
|
|
298
|
-
case
|
|
299
|
-
return
|
|
296
|
+
case C:
|
|
297
|
+
return M("Suspense");
|
|
298
|
+
case o:
|
|
299
|
+
return M("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof e == "object")
|
|
302
302
|
switch (e.$$typeof) {
|
|
303
|
-
case
|
|
304
|
-
return
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var
|
|
303
|
+
case p:
|
|
304
|
+
return Be(e.render);
|
|
305
|
+
case u:
|
|
306
|
+
return K(e.type, r, t);
|
|
307
|
+
case f: {
|
|
308
|
+
var n = e, s = n._payload, c = n._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return K(c(s), r, t);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var Y = Object.prototype.hasOwnProperty, he = {}, ge = P.ReactDebugCurrentFrame;
|
|
318
|
+
function q(e) {
|
|
319
319
|
if (e) {
|
|
320
|
-
var r = e._owner, t =
|
|
321
|
-
|
|
320
|
+
var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
|
|
321
|
+
ge.setExtraStackFrame(t);
|
|
322
322
|
} else
|
|
323
|
-
|
|
323
|
+
ge.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function qe(e, r, t, n, s) {
|
|
326
326
|
{
|
|
327
|
-
var
|
|
327
|
+
var c = Function.call.bind(Y);
|
|
328
328
|
for (var i in e)
|
|
329
|
-
if (
|
|
330
|
-
var
|
|
329
|
+
if (c(e, i)) {
|
|
330
|
+
var a = void 0;
|
|
331
331
|
try {
|
|
332
332
|
if (typeof e[i] != "function") {
|
|
333
|
-
var
|
|
334
|
-
throw
|
|
333
|
+
var m = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw m.name = "Invariant Violation", m;
|
|
335
335
|
}
|
|
336
|
-
|
|
337
|
-
} catch (
|
|
338
|
-
|
|
336
|
+
a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (h) {
|
|
338
|
+
a = h;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
a && !(a instanceof Error) && (q(s), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), q(null)), a instanceof Error && !(a.message in he) && (he[a.message] = !0, q(s), y("Failed %s type: %s", t, a.message), q(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
return
|
|
344
|
+
var Je = Array.isArray;
|
|
345
|
+
function X(e) {
|
|
346
|
+
return Je(e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Ge(e) {
|
|
349
349
|
{
|
|
350
350
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
351
351
|
return t;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function ze(e) {
|
|
355
355
|
try {
|
|
356
|
-
return
|
|
356
|
+
return _e(e), !1;
|
|
357
357
|
} catch {
|
|
358
358
|
return !0;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function _e(e) {
|
|
362
362
|
return "" + e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
364
|
+
function be(e) {
|
|
365
|
+
if (ze(e))
|
|
366
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), _e(e);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var ye = P.ReactCurrentOwner, Xe = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
373
|
+
}, me, Ee;
|
|
374
|
+
function He(e) {
|
|
375
|
+
if (Y.call(e, "ref")) {
|
|
376
376
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
377
377
|
if (r && r.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
380
|
return e.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
382
|
+
function Ze(e) {
|
|
383
|
+
if (Y.call(e, "key")) {
|
|
384
384
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
385
385
|
if (r && r.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return e.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof e.ref == "string" &&
|
|
390
|
+
function Qe(e, r) {
|
|
391
|
+
typeof e.ref == "string" && ye.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function er(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var t = function() {
|
|
396
|
-
|
|
396
|
+
me || (me = !0, y("%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://reactjs.org/link/special-props)", r));
|
|
397
397
|
};
|
|
398
398
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
399
399
|
get: t,
|
|
@@ -401,10 +401,10 @@ function vr() {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function rr(e, r) {
|
|
405
405
|
{
|
|
406
406
|
var t = function() {
|
|
407
|
-
|
|
407
|
+
Ee || (Ee = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", r));
|
|
408
408
|
};
|
|
409
409
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
410
410
|
get: t,
|
|
@@ -412,70 +412,70 @@ function vr() {
|
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
var
|
|
415
|
+
var tr = function(e, r, t, n, s, c, i) {
|
|
416
|
+
var a = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: v,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: e,
|
|
421
421
|
key: r,
|
|
422
422
|
ref: t,
|
|
423
423
|
props: i,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
|
-
_owner:
|
|
425
|
+
_owner: c
|
|
426
426
|
};
|
|
427
|
-
return
|
|
427
|
+
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
429
429
|
enumerable: !1,
|
|
430
430
|
writable: !0,
|
|
431
431
|
value: !1
|
|
432
|
-
}), Object.defineProperty(
|
|
432
|
+
}), Object.defineProperty(a, "_self", {
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
437
|
-
}), Object.defineProperty(
|
|
436
|
+
value: n
|
|
437
|
+
}), Object.defineProperty(a, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
|
-
value:
|
|
442
|
-
}), Object.freeze && (Object.freeze(
|
|
441
|
+
value: s
|
|
442
|
+
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function nr(e, r, t, n, s) {
|
|
445
445
|
{
|
|
446
|
-
var
|
|
447
|
-
t !== void 0 && (
|
|
448
|
-
for (
|
|
449
|
-
|
|
446
|
+
var c, i = {}, a = null, m = null;
|
|
447
|
+
t !== void 0 && (be(t), a = "" + t), Ze(r) && (be(r.key), a = "" + r.key), He(r) && (m = r.ref, Qe(r, s));
|
|
448
|
+
for (c in r)
|
|
449
|
+
Y.call(r, c) && !Xe.hasOwnProperty(c) && (i[c] = r[c]);
|
|
450
450
|
if (e && e.defaultProps) {
|
|
451
|
-
var
|
|
452
|
-
for (
|
|
453
|
-
i[
|
|
451
|
+
var h = e.defaultProps;
|
|
452
|
+
for (c in h)
|
|
453
|
+
i[c] === void 0 && (i[c] = h[c]);
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
456
|
-
var
|
|
457
|
-
|
|
455
|
+
if (a || m) {
|
|
456
|
+
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
457
|
+
a && er(i, g), m && rr(i, g);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return tr(e, a, m, s, n, ye.current, i);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var
|
|
463
|
-
function
|
|
462
|
+
var H = P.ReactCurrentOwner, Re = P.ReactDebugCurrentFrame;
|
|
463
|
+
function I(e) {
|
|
464
464
|
if (e) {
|
|
465
|
-
var r = e._owner, t =
|
|
466
|
-
|
|
465
|
+
var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
|
|
466
|
+
Re.setExtraStackFrame(t);
|
|
467
467
|
} else
|
|
468
|
-
|
|
468
|
+
Re.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
|
-
var
|
|
471
|
-
|
|
472
|
-
function
|
|
473
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
470
|
+
var Z;
|
|
471
|
+
Z = !1;
|
|
472
|
+
function Q(e) {
|
|
473
|
+
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function je() {
|
|
476
476
|
{
|
|
477
|
-
if (
|
|
478
|
-
var e =
|
|
477
|
+
if (H.current) {
|
|
478
|
+
var e = D(H.current.type);
|
|
479
479
|
if (e)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -484,13 +484,13 @@ Check the render method of \`` + e + "`.";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function ar(e) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var ke = {};
|
|
491
|
+
function ir(e) {
|
|
492
492
|
{
|
|
493
|
-
var r =
|
|
493
|
+
var r = je();
|
|
494
494
|
if (!r) {
|
|
495
495
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
496
496
|
t && (r = `
|
|
@@ -500,39 +500,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
500
500
|
return r;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Te(e, r) {
|
|
504
504
|
{
|
|
505
505
|
if (!e._store || e._store.validated || e.key != null)
|
|
506
506
|
return;
|
|
507
507
|
e._store.validated = !0;
|
|
508
|
-
var t =
|
|
509
|
-
if (
|
|
508
|
+
var t = ir(r);
|
|
509
|
+
if (ke[t])
|
|
510
510
|
return;
|
|
511
|
-
|
|
512
|
-
var
|
|
513
|
-
e && e._owner && e._owner !==
|
|
511
|
+
ke[t] = !0;
|
|
512
|
+
var n = "";
|
|
513
|
+
e && e._owner && e._owner !== H.current && (n = " It was passed a child from " + D(e._owner.type) + "."), I(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), I(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Se(e, r) {
|
|
517
517
|
{
|
|
518
518
|
if (typeof e != "object")
|
|
519
519
|
return;
|
|
520
|
-
if (
|
|
520
|
+
if (X(e))
|
|
521
521
|
for (var t = 0; t < e.length; t++) {
|
|
522
|
-
var
|
|
523
|
-
|
|
522
|
+
var n = e[t];
|
|
523
|
+
Q(n) && Te(n, r);
|
|
524
524
|
}
|
|
525
|
-
else if (
|
|
525
|
+
else if (Q(e))
|
|
526
526
|
e._store && (e._store.validated = !0);
|
|
527
527
|
else if (e) {
|
|
528
|
-
var
|
|
529
|
-
if (typeof
|
|
530
|
-
for (var
|
|
531
|
-
|
|
528
|
+
var s = V(e);
|
|
529
|
+
if (typeof s == "function" && s !== e.entries)
|
|
530
|
+
for (var c = s.call(e), i; !(i = c.next()).done; )
|
|
531
|
+
Q(i.value) && Te(i.value, r);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function or(e) {
|
|
536
536
|
{
|
|
537
537
|
var r = e.type;
|
|
538
538
|
if (r == null || typeof r == "string")
|
|
@@ -540,149 +540,277 @@ Check the top-level render call using <` + t + ">.");
|
|
|
540
540
|
var t;
|
|
541
541
|
if (typeof r == "function")
|
|
542
542
|
t = r.propTypes;
|
|
543
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
543
|
+
else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
|
-
r.$$typeof ===
|
|
545
|
+
r.$$typeof === u))
|
|
546
546
|
t = r.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (t) {
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
} else if (r.PropTypes !== void 0 && !
|
|
553
|
-
|
|
554
|
-
var
|
|
555
|
-
|
|
550
|
+
var n = D(r);
|
|
551
|
+
qe(t, e.props, "prop", n, e);
|
|
552
|
+
} else if (r.PropTypes !== void 0 && !Z) {
|
|
553
|
+
Z = !0;
|
|
554
|
+
var s = D(r);
|
|
555
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function sr(e) {
|
|
561
561
|
{
|
|
562
562
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
|
|
563
|
+
var n = r[t];
|
|
564
|
+
if (n !== "children" && n !== "key") {
|
|
565
|
+
I(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
e.ref !== null && (
|
|
569
|
+
e.ref !== null && (I(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
var
|
|
573
|
-
function
|
|
572
|
+
var Oe = {};
|
|
573
|
+
function we(e, r, t, n, s, c) {
|
|
574
574
|
{
|
|
575
|
-
var i =
|
|
575
|
+
var i = Ye(e);
|
|
576
576
|
if (!i) {
|
|
577
|
-
var
|
|
578
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
579
|
-
var
|
|
580
|
-
|
|
581
|
-
var
|
|
582
|
-
e === null ?
|
|
577
|
+
var a = "";
|
|
578
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var m = ar();
|
|
580
|
+
m ? a += m : a += je();
|
|
581
|
+
var h;
|
|
582
|
+
e === null ? h = "null" : X(e) ? h = "array" : e !== void 0 && e.$$typeof === v ? (h = "<" + (D(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, a);
|
|
583
583
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
584
|
+
var g = nr(e, r, t, s, c);
|
|
585
|
+
if (g == null)
|
|
586
|
+
return g;
|
|
587
587
|
if (i) {
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
for (var
|
|
593
|
-
|
|
594
|
-
Object.freeze && Object.freeze(
|
|
588
|
+
var T = r.children;
|
|
589
|
+
if (T !== void 0)
|
|
590
|
+
if (n)
|
|
591
|
+
if (X(T)) {
|
|
592
|
+
for (var $ = 0; $ < T.length; $++)
|
|
593
|
+
Se(T[$], e);
|
|
594
|
+
Object.freeze && Object.freeze(T);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
Se(T, e);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var
|
|
602
|
-
return
|
|
603
|
-
}),
|
|
604
|
-
if (!
|
|
605
|
-
var
|
|
606
|
-
|
|
600
|
+
if (Y.call(r, "key")) {
|
|
601
|
+
var N = D(e), R = Object.keys(r).filter(function(vr) {
|
|
602
|
+
return vr !== "key";
|
|
603
|
+
}), ee = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!Oe[N + ee]) {
|
|
605
|
+
var dr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
y(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`,
|
|
611
|
+
<%s key={someKey} {...props} />`, ee, N, dr, N), Oe[N + ee] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return e ===
|
|
614
|
+
return e === _ ? sr(g) : or(g), g;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function cr(e, r, t) {
|
|
618
|
+
return we(e, r, t, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function lr(e, r, t) {
|
|
621
|
+
return we(e, r, t, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
}()),
|
|
623
|
+
var ur = lr, fr = cr;
|
|
624
|
+
U.Fragment = _, U.jsx = ur, U.jsxs = fr;
|
|
625
|
+
}()), U;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
const
|
|
630
|
-
const [
|
|
631
|
-
if (!
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
},
|
|
636
|
-
|
|
637
|
-
},
|
|
638
|
-
|
|
627
|
+
process.env.NODE_ENV === "production" ? ne.exports = gr() : ne.exports = _r();
|
|
628
|
+
var l = ne.exports;
|
|
629
|
+
const xr = ({ cards: d = [] }) => {
|
|
630
|
+
const [v, j] = re(0), [_, E] = re(!1);
|
|
631
|
+
if (!d || d.length === 0)
|
|
632
|
+
return /* @__PURE__ */ l.jsx("div", { className: "flashcard-deck-container", children: /* @__PURE__ */ l.jsx("p", { className: "flashcard-empty-message", children: "No cards available" }) });
|
|
633
|
+
const O = d[v], w = v > 0, k = v < d.length - 1, p = () => {
|
|
634
|
+
w && (j(v - 1), E(!1));
|
|
635
|
+
}, C = () => {
|
|
636
|
+
k && (j(v + 1), E(!1));
|
|
637
|
+
}, o = () => {
|
|
638
|
+
E(!_);
|
|
639
639
|
};
|
|
640
|
-
return /* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
640
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "flashcard-deck-container", children: [
|
|
641
|
+
/* @__PURE__ */ l.jsx("div", { className: "flashcard-deck-header", children: /* @__PURE__ */ l.jsxs("span", { className: "flashcard-counter", children: [
|
|
642
642
|
"Card ",
|
|
643
|
-
|
|
643
|
+
v + 1,
|
|
644
644
|
" of ",
|
|
645
|
-
|
|
645
|
+
d.length
|
|
646
646
|
] }) }),
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
|
|
647
|
+
/* @__PURE__ */ l.jsx("div", { className: "flashcard-wrapper", children: /* @__PURE__ */ l.jsxs(
|
|
648
|
+
te.div,
|
|
649
649
|
{
|
|
650
650
|
className: "flashcard",
|
|
651
|
-
onClick:
|
|
652
|
-
animate: { rotateY:
|
|
651
|
+
onClick: o,
|
|
652
|
+
animate: { rotateY: _ ? 180 : 0 },
|
|
653
653
|
transition: { duration: 0.6, type: "spring", stiffness: 100 },
|
|
654
654
|
style: { transformStyle: "preserve-3d" },
|
|
655
655
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ l.jsx("div", { className: "flashcard-face flashcard-front", children: /* @__PURE__ */ l.jsx("div", { className: "flashcard-content", children: O.front }) }),
|
|
657
|
+
/* @__PURE__ */ l.jsx("div", { className: "flashcard-face flashcard-back", children: /* @__PURE__ */ l.jsx("div", { className: "flashcard-content", children: O.back }) })
|
|
658
658
|
]
|
|
659
659
|
},
|
|
660
|
-
|
|
660
|
+
v
|
|
661
661
|
) }),
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ l.jsxs("div", { className: "flashcard-controls", children: [
|
|
663
|
+
/* @__PURE__ */ l.jsx(
|
|
664
664
|
"button",
|
|
665
665
|
{
|
|
666
666
|
className: "flashcard-button flashcard-button-previous",
|
|
667
|
-
onClick:
|
|
668
|
-
disabled: !
|
|
667
|
+
onClick: p,
|
|
668
|
+
disabled: !w,
|
|
669
669
|
"aria-label": "Previous card",
|
|
670
670
|
children: "Previous"
|
|
671
671
|
}
|
|
672
672
|
),
|
|
673
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ l.jsx(
|
|
674
674
|
"button",
|
|
675
675
|
{
|
|
676
676
|
className: "flashcard-button flashcard-button-next",
|
|
677
|
-
onClick:
|
|
678
|
-
disabled: !
|
|
677
|
+
onClick: C,
|
|
678
|
+
disabled: !k,
|
|
679
679
|
"aria-label": "Next card",
|
|
680
680
|
children: "Next"
|
|
681
681
|
}
|
|
682
682
|
)
|
|
683
683
|
] })
|
|
684
684
|
] });
|
|
685
|
+
}, br = "_accordion_1gkiv_1", yr = "_empty_1gkiv_17", mr = "_item_1gkiv_31", Er = "_heading_1gkiv_73", Rr = "_trigger_1gkiv_85", jr = "_title_1gkiv_145", kr = "_icon_1gkiv_155", Tr = "_panelWrapper_1gkiv_179", Sr = "_panel_1gkiv_179", Or = "_content_1gkiv_195", S = {
|
|
686
|
+
accordion: br,
|
|
687
|
+
empty: yr,
|
|
688
|
+
item: mr,
|
|
689
|
+
heading: Er,
|
|
690
|
+
trigger: Rr,
|
|
691
|
+
title: jr,
|
|
692
|
+
icon: kr,
|
|
693
|
+
panelWrapper: Tr,
|
|
694
|
+
panel: Sr,
|
|
695
|
+
content: Or
|
|
696
|
+
}, wr = (d, v, j, _) => d && j && j.length > 0 ? new Set(
|
|
697
|
+
j.filter((E) => _ != null && E >= 0 && E < _)
|
|
698
|
+
) : !d && v != null && v >= 0 && _ != null && v < _ ? /* @__PURE__ */ new Set([v]) : /* @__PURE__ */ new Set(), Dr = ({
|
|
699
|
+
items: d,
|
|
700
|
+
allowMultiple: v = !1,
|
|
701
|
+
defaultExpandedIndex: j,
|
|
702
|
+
defaultExpandedIndexes: _,
|
|
703
|
+
className: E
|
|
704
|
+
}) => {
|
|
705
|
+
const O = pr(), [w, k] = re(
|
|
706
|
+
() => wr(v, j, _, d == null ? void 0 : d.length)
|
|
707
|
+
), p = Ce(
|
|
708
|
+
(o) => {
|
|
709
|
+
k((u) => {
|
|
710
|
+
const f = new Set(u);
|
|
711
|
+
return f.has(o) ? f.delete(o) : (v || f.clear(), f.add(o)), f;
|
|
712
|
+
});
|
|
713
|
+
},
|
|
714
|
+
[v]
|
|
715
|
+
), C = Ce(
|
|
716
|
+
(o, u) => {
|
|
717
|
+
var x, F, V, P;
|
|
718
|
+
const f = o.currentTarget.closest("[data-accordion]"), b = f == null ? void 0 : f.querySelectorAll("[data-accordion-trigger]");
|
|
719
|
+
if (b != null && b.length)
|
|
720
|
+
switch (o.key) {
|
|
721
|
+
case "Enter":
|
|
722
|
+
case " ":
|
|
723
|
+
o.preventDefault(), p(u);
|
|
724
|
+
break;
|
|
725
|
+
case "ArrowDown":
|
|
726
|
+
case "ArrowRight":
|
|
727
|
+
o.preventDefault(), u < d.length - 1 && ((x = b[u + 1]) == null || x.focus());
|
|
728
|
+
break;
|
|
729
|
+
case "ArrowUp":
|
|
730
|
+
case "ArrowLeft":
|
|
731
|
+
o.preventDefault(), u > 0 && ((F = b[u - 1]) == null || F.focus());
|
|
732
|
+
break;
|
|
733
|
+
case "Home":
|
|
734
|
+
o.preventDefault(), (V = b[0]) == null || V.focus();
|
|
735
|
+
break;
|
|
736
|
+
case "End":
|
|
737
|
+
o.preventDefault(), (P = b[b.length - 1]) == null || P.focus();
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
[d.length, p]
|
|
742
|
+
);
|
|
743
|
+
return d != null && d.length ? /* @__PURE__ */ l.jsx(
|
|
744
|
+
"div",
|
|
745
|
+
{
|
|
746
|
+
className: [S.accordion, E].filter(Boolean).join(" "),
|
|
747
|
+
role: "region",
|
|
748
|
+
"aria-label": "Accordion",
|
|
749
|
+
"data-accordion": !0,
|
|
750
|
+
children: d.map((o, u) => {
|
|
751
|
+
const f = w.has(u), b = `${O}-header-${u}`, x = `${O}-panel-${u}`;
|
|
752
|
+
return /* @__PURE__ */ l.jsxs(
|
|
753
|
+
"div",
|
|
754
|
+
{
|
|
755
|
+
className: S.item,
|
|
756
|
+
"data-open": f,
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ l.jsx("h3", { className: S.heading, children: /* @__PURE__ */ l.jsxs(
|
|
759
|
+
"button",
|
|
760
|
+
{
|
|
761
|
+
type: "button",
|
|
762
|
+
id: b,
|
|
763
|
+
className: S.trigger,
|
|
764
|
+
"aria-expanded": f,
|
|
765
|
+
"aria-controls": x,
|
|
766
|
+
"data-accordion-trigger": !0,
|
|
767
|
+
onClick: () => p(u),
|
|
768
|
+
onKeyDown: (F) => C(F, u),
|
|
769
|
+
children: [
|
|
770
|
+
/* @__PURE__ */ l.jsx("span", { className: S.title, children: o.title }),
|
|
771
|
+
/* @__PURE__ */ l.jsx(
|
|
772
|
+
te.span,
|
|
773
|
+
{
|
|
774
|
+
className: S.icon,
|
|
775
|
+
animate: { rotate: f ? 180 : 0 },
|
|
776
|
+
transition: { duration: 0.25 },
|
|
777
|
+
"aria-hidden": !0,
|
|
778
|
+
children: "▼"
|
|
779
|
+
}
|
|
780
|
+
)
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
) }),
|
|
784
|
+
/* @__PURE__ */ l.jsx(
|
|
785
|
+
"div",
|
|
786
|
+
{
|
|
787
|
+
id: x,
|
|
788
|
+
role: "region",
|
|
789
|
+
"aria-labelledby": b,
|
|
790
|
+
"aria-hidden": !f,
|
|
791
|
+
className: S.panelWrapper,
|
|
792
|
+
children: /* @__PURE__ */ l.jsx(hr, { initial: !1, children: f && /* @__PURE__ */ l.jsx(
|
|
793
|
+
te.div,
|
|
794
|
+
{
|
|
795
|
+
initial: { height: 0, opacity: 0 },
|
|
796
|
+
animate: { height: "auto", opacity: 1 },
|
|
797
|
+
exit: { height: 0, opacity: 0 },
|
|
798
|
+
transition: { duration: 0.25, ease: "easeInOut" },
|
|
799
|
+
className: S.panel,
|
|
800
|
+
children: /* @__PURE__ */ l.jsx("div", { className: S.content, children: o.content })
|
|
801
|
+
}
|
|
802
|
+
) })
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
]
|
|
806
|
+
},
|
|
807
|
+
o.id ?? u
|
|
808
|
+
);
|
|
809
|
+
})
|
|
810
|
+
}
|
|
811
|
+
) : /* @__PURE__ */ l.jsx("div", { className: [S.accordion, E].filter(Boolean).join(" "), role: "region", "aria-label": "Accordion", children: /* @__PURE__ */ l.jsx("p", { className: S.empty, children: "No items to display." }) });
|
|
685
812
|
};
|
|
686
813
|
export {
|
|
687
|
-
|
|
814
|
+
Dr as Accordion,
|
|
815
|
+
xr as FlashcardDeck
|
|
688
816
|
};
|