evelearn-theme 1.0.0

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/index.mjs ADDED
@@ -0,0 +1,1484 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/Backdrop/Backdrop.tsx
34
+ import { jsx } from "react/jsx-runtime";
35
+ var Backdrop = ({ visible, onClick, opacity }) => {
36
+ if (!visible) return null;
37
+ return /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ style: {
41
+ opacity: opacity ? opacity : 90,
42
+ zIndex: 21
43
+ },
44
+ className: `fixed top-0 left-0 w-full h-screen bg-gray-100 dark:bg-slate-900`,
45
+ onClick
46
+ }
47
+ );
48
+ };
49
+ var Backdrop_default = Backdrop;
50
+
51
+ // src/Backdrop/Overlay.tsx
52
+ import { useEffect, useState } from "react";
53
+ import ReactDOM from "react-dom";
54
+
55
+ // src/fonts/index.tsx
56
+ import { Open_Sans, Ubuntu, Balsamiq_Sans, Parkinsans } from "next/font/google";
57
+ var openSans = Open_Sans({
58
+ preload: true,
59
+ display: "swap",
60
+ subsets: ["cyrillic", "cyrillic-ext", "greek", "greek-ext", "latin", "latin-ext", "vietnamese", "hebrew"],
61
+ variable: "--font-sans"
62
+ });
63
+ var ubuntu = Ubuntu({
64
+ preload: true,
65
+ weight: ["300", "400", "500", "700"],
66
+ display: "auto",
67
+ subsets: ["cyrillic", "cyrillic-ext", "greek", "greek-ext", "latin", "latin-ext"],
68
+ variable: "--font-fallback"
69
+ });
70
+ var parkinsans = Parkinsans({
71
+ preload: true,
72
+ weight: ["300", "400", "500", "700"],
73
+ display: "swap",
74
+ adjustFontFallback: false,
75
+ subsets: ["latin", "latin-ext"],
76
+ // fallback: ['--font-fallback'],
77
+ variable: "--font-header"
78
+ });
79
+ var balsamicSans = Balsamiq_Sans({
80
+ preload: false,
81
+ display: "swap",
82
+ weight: ["400", "700"],
83
+ subsets: ["cyrillic", "cyrillic-ext", "latin", "latin-ext"],
84
+ variable: "--font-fun"
85
+ });
86
+
87
+ // src/Backdrop/Overlay.tsx
88
+ import { jsx as jsx2 } from "react/jsx-runtime";
89
+ var Overlay = ({ visible, onDismissed, onClick, zIndex, isDark, children, opacity, withContainer = true }) => {
90
+ const [modalRoot, setModalRoot] = useState(null);
91
+ useEffect(() => {
92
+ let root = document.getElementById("modal-root");
93
+ if (!root) {
94
+ root = document.createElement("div");
95
+ root.id = "modal-root";
96
+ document.body.appendChild(root);
97
+ }
98
+ setModalRoot(root);
99
+ return () => {
100
+ const root2 = document.getElementById("modal-root");
101
+ if (root2) {
102
+ document.body.removeChild(root2);
103
+ }
104
+ };
105
+ }, [visible]);
106
+ if (!visible || !modalRoot) return null;
107
+ return ReactDOM.createPortal(
108
+ /* @__PURE__ */ jsx2("div", { className: "animate-fade-in", children: withContainer ? /* @__PURE__ */ jsx2(
109
+ "div",
110
+ {
111
+ onClick: onDismissed || onClick,
112
+ className: `top-0 left-0 fixed w-full h-screen flex items-center justify-center ${parkinsans.variable} ${ubuntu.variable} ${openSans.variable}`,
113
+ style: {
114
+ background: isDark ? `rgba(0, 0, 0, ${opacity || "0.7"})` : `rgba(255, 255, 255, ${opacity || "0.6"})`,
115
+ zIndex: zIndex || 9999
116
+ },
117
+ children
118
+ }
119
+ ) : /* @__PURE__ */ jsx2("div", { className: `${ubuntu.variable} ${parkinsans.variable} ${openSans.variable}`, children }) }),
120
+ modalRoot
121
+ );
122
+ };
123
+ var Overlay_default = Overlay;
124
+
125
+ // src/Breakpoint/Breakpoint.tsx
126
+ import { jsx as jsx3 } from "react/jsx-runtime";
127
+ var Breakpoint = ({ children, fromSize, toSize }) => {
128
+ let className = "";
129
+ if (fromSize && toSize) {
130
+ className = `hidden ${fromSize}:block ${toSize}:hidden`;
131
+ } else if (fromSize) {
132
+ className = `hidden ${fromSize}:block`;
133
+ } else if (toSize) {
134
+ className = `block ${toSize}:hidden`;
135
+ }
136
+ return /* @__PURE__ */ jsx3("div", { className, children });
137
+ };
138
+ var Breakpoint_default = Breakpoint;
139
+
140
+ // src/Spinners/Spinner.tsx
141
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
142
+ var Spinner = ({ visible = true, size, white, isDark }) => {
143
+ if (visible === false) return null;
144
+ const isWhite = white || isDark;
145
+ const color = isWhite ? "stroke-white/90" : "stroke-slate-600/80";
146
+ const bgColor = isWhite ? "stroke-white/20" : "stroke-slate-500/20";
147
+ const dimensions = size === "small" ? "w-5 h-5" : "w-8 h-8";
148
+ const spinnerClasses = `
149
+ absolute
150
+ top-0
151
+ animate-spin
152
+ ${dimensions}
153
+ `;
154
+ return /* @__PURE__ */ jsxs("div", { className: "relative h-8 w-8 flex justify-center items-center", children: [
155
+ /* @__PURE__ */ jsx4(
156
+ "svg",
157
+ {
158
+ className: `absolute top-0 ${dimensions} ${bgColor}`,
159
+ viewBox: "0 0 24 24",
160
+ fill: "none",
161
+ strokeWidth: "2.4",
162
+ children: /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "10" })
163
+ }
164
+ ),
165
+ /* @__PURE__ */ jsx4(
166
+ "svg",
167
+ {
168
+ className: spinnerClasses,
169
+ viewBox: "0 0 24 24",
170
+ fill: "none",
171
+ strokeWidth: "2.4",
172
+ strokeLinecap: "round",
173
+ children: /* @__PURE__ */ jsx4(
174
+ "path",
175
+ {
176
+ d: `
177
+ M 12 2
178
+ A 10 10 0 0 1 22 12
179
+ A 10 10 0 0 1 12 22
180
+ A 10 10 0 0 1 2 12
181
+ A 10 10 0 0 1 12 2
182
+ `,
183
+ strokeDasharray: "13 18.4",
184
+ stroke: "inherit",
185
+ className: color
186
+ }
187
+ )
188
+ }
189
+ )
190
+ ] });
191
+ };
192
+ var SpinnerCentered = (props) => {
193
+ if (props.visible === false) return null;
194
+ return /* @__PURE__ */ jsx4("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsx4(Spinner, __spreadValues({}, props)) });
195
+ };
196
+ Spinner.displayName = "Spinner";
197
+ SpinnerCentered.displayName = "Spinner.Centered";
198
+ Spinner.Centered = SpinnerCentered;
199
+ var Spinner_default = Spinner;
200
+
201
+ // src/Button/Button.tsx
202
+ import { jsx as jsx5 } from "react/jsx-runtime";
203
+ var Button = ({ disabled = false, loading, onClick, kind = "primary", size = "small", type = "button", children }) => {
204
+ const styled = () => {
205
+ switch (kind) {
206
+ case "primary":
207
+ return `bg-primary font-header text-white font-medium transition-all duration-75 ${disabled ? "bg-opacity-50" : "hover:bg-opacity-90"}`;
208
+ case "indigo":
209
+ return `bg-indigo-500 font-header text-white font-medium transition-all duration-75 ${disabled ? "bg-opacity-50" : "hover:bg-opacity-90"}`;
210
+ case "green":
211
+ return `bg-green-500 font-header text-white font-medium transition-all duration-75 ${disabled ? "bg-opacity-50" : "hover:bg-opacity-90"}`;
212
+ case "teal":
213
+ return `bg-teal-500 font-header text-white font-medium transition-all duration-75 ${disabled ? "bg-opacity-50" : "hover:bg-opacity-90"}`;
214
+ case "secondary":
215
+ return "bg-secondary text-white font-header font-medium hover:bg-opacity-90 transition-all duration-75";
216
+ case "base":
217
+ return "bg-white border-1 font-header border-gray-200 dark:bg-slate-600 dark:text-gray-100 dark:hover:bg-slate-400 hover:bg-slate-100 transition-all duration-75";
218
+ case "gray":
219
+ return "bg-slate-400 dark:bg-slate-700 font-header text-white border-1 font-medium hover:bg-opacity-90 transition-opacity duration-75";
220
+ case "alert":
221
+ return "bg-amber-500 font-header text-white transition-all hover:bg-opacity-90 duration-75";
222
+ case "warning":
223
+ return "bg-red-500 font-header text-white font-medium hover:bg-opacity-90 transition-opacity duration-100";
224
+ default:
225
+ break;
226
+ }
227
+ };
228
+ const sized = () => {
229
+ switch (size) {
230
+ case "small":
231
+ return "p-1";
232
+ case "fixed":
233
+ return "box-border w-32 h-11";
234
+ case "large":
235
+ return "px-2 h-11";
236
+ default:
237
+ return "px-2 py-1";
238
+ }
239
+ };
240
+ return /* @__PURE__ */ jsx5("button", { type: type || "button", disabled, className: `rounded-lg focus:outline-none transition duration-100 ${styled()} ${sized()}`, onClick, children: /* @__PURE__ */ jsx5("div", { className: "w-full max-h-11", children: loading ? /* @__PURE__ */ jsx5("div", { className: "flex w-full justify-center items-center", children: /* @__PURE__ */ jsx5(Spinner_default, { white: true }) }) : children }) });
241
+ };
242
+ var Button_default = Button;
243
+
244
+ // src/Button/FunButton.tsx
245
+ import { useMemo } from "react";
246
+ import colors from "tailwindcss/dist/colors";
247
+ import { motion } from "framer-motion";
248
+ import { jsx as jsx6 } from "react/jsx-runtime";
249
+ var FunButton = ({
250
+ onClick,
251
+ disabled,
252
+ type,
253
+ children,
254
+ color = "primary",
255
+ loading,
256
+ active,
257
+ className,
258
+ size = "base"
259
+ }) => {
260
+ const { front, bottom } = useMemo(() => {
261
+ switch (color) {
262
+ case "primary":
263
+ return { bottom: "#00b4d8", front: colors.sky["600"] };
264
+ case "red":
265
+ return { bottom: "#f00f0f", front: colors.red["700"] };
266
+ case "green":
267
+ return { bottom: colors.green["500"], front: colors.green["600"] };
268
+ case "purple":
269
+ return { bottom: colors.indigo["500"], front: colors.indigo["600"] };
270
+ case "teal":
271
+ return { bottom: colors.teal["500"], front: colors.teal["600"] };
272
+ case "cyan":
273
+ return { bottom: colors.cyan["500"], front: colors.cyan["600"] };
274
+ case "yellow":
275
+ return { bottom: colors.yellow["500"], front: colors.yellow["600"] };
276
+ default:
277
+ return { bottom: "#00b4d8", front: colors.sky["700"] };
278
+ }
279
+ }, [color]);
280
+ const classStyle = useMemo(() => {
281
+ switch (size) {
282
+ case "base":
283
+ return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-opacity-90";
284
+ case "big":
285
+ return "relative block px-12 py-4 rounded-lg text-lg text-white font-medium font-header hover:bg-opacity-90";
286
+ case "small":
287
+ return "relative block px-6 py-1 rounded-lg text-lg text-white font-medium font-header hover:bg-opacity-90";
288
+ case "square":
289
+ return "relative block h-12 w-12 rounded text-lg flex items-center justify-center text-white font-medium font-header hover:bg-opacity-90";
290
+ default:
291
+ return "relative block px-8 py-3 rounded-lg text-lg text-white font-medium font-header hover:bg-opacity-90";
292
+ }
293
+ }, [size]);
294
+ const computedClassName = useMemo(() => {
295
+ const cName = className + " rounded-lg border-none p-0 cursor-pointer opacity-90 hover:bg-opacity-90 transition-opacity";
296
+ return cName + (disabled ? " opacity-70 cursor-default" : "");
297
+ }, [className, disabled]);
298
+ const computedClassStyle = useMemo(() => {
299
+ const cName = classStyle;
300
+ return cName + (disabled ? " opacity-70 cursor-default hover:bg-opacity-70" : "");
301
+ }, [classStyle, disabled]);
302
+ return /* @__PURE__ */ jsx6(
303
+ motion.button,
304
+ {
305
+ className: `${computedClassName}`,
306
+ style: { background: front, outlineOffset: "4px" },
307
+ type,
308
+ onMouseDown: onClick,
309
+ whileTap: { y: disabled ? 0 : 2 },
310
+ transition: { duration: 0.1, ease: "easeInOut" },
311
+ children: /* @__PURE__ */ jsx6(
312
+ motion.span,
313
+ {
314
+ className: computedClassStyle,
315
+ style: {
316
+ background: bottom,
317
+ opacity: 1
318
+ },
319
+ initial: { y: active ? 0 : -6 },
320
+ animate: { y: active ? 0 : -6 },
321
+ whileTap: { y: disabled ? -6 : 0 },
322
+ transition: { duration: 0.1, ease: "easeInOut" },
323
+ children: loading ? /* @__PURE__ */ jsx6("div", { className: size === "small" ? "min-h-6" : "min-h-10", children: /* @__PURE__ */ jsx6(Spinner_default.Centered, { visible: true, size: size === "small" ? "small" : "base", white: true }) }) : children
324
+ }
325
+ )
326
+ }
327
+ );
328
+ };
329
+ var FunButton_default = FunButton;
330
+
331
+ // src/Button/FunRoundButton.tsx
332
+ import { useMemo as useMemo2 } from "react";
333
+ import colors2 from "tailwindcss/dist/colors";
334
+ import { motion as motion2 } from "framer-motion";
335
+ import { jsx as jsx7 } from "react/jsx-runtime";
336
+ var FunRoundButton = ({ onClick, disabled, type, children, color, active, className, size = 44 }) => {
337
+ const { front, bottom } = useMemo2(() => {
338
+ switch (color) {
339
+ case "primary":
340
+ return { bottom: "#00b4d8", front: colors2.sky["600"] };
341
+ case "red":
342
+ return { bottom: disabled ? "hsl(340deg 100% 42%)" : "hsl(345deg 100% 47%)", front: disabled ? "hsl(340deg 100% 52%)" : "hsl(340deg 100% 32%)" };
343
+ case "green":
344
+ return { bottom: disabled ? colors2.green["300"] : colors2.green["500"], front: disabled ? colors2.green["400"] : colors2.green["600"] };
345
+ case "purple":
346
+ return { bottom: disabled ? colors2.indigo["300"] : colors2.indigo["500"], front: disabled ? colors2.indigo["400"] : colors2.indigo["600"] };
347
+ case "teal":
348
+ return { bottom: disabled ? colors2.teal["300"] : colors2.teal["500"], front: disabled ? colors2.teal["400"] : colors2.teal["600"] };
349
+ case "yellow":
350
+ return { bottom: disabled ? colors2.yellow["300"] : colors2.yellow["500"], front: disabled ? colors2.yellow["400"] : colors2.yellow["600"] };
351
+ default:
352
+ return { bottom: disabled ? colors2.gray["300"] : "#00b4d8", front: disabled ? colors2.sky["400"] : colors2.sky["700"] };
353
+ }
354
+ }, [color, disabled]);
355
+ return /* @__PURE__ */ jsx7(
356
+ motion2.button,
357
+ {
358
+ className: `${className || "border-none p-0 flex justify-center items-center cursor-pointer z-10"} ${disabled ? "opacity-70 cursor-default" : "hover:opacity-95"}`,
359
+ style: {
360
+ background: front,
361
+ height: size,
362
+ width: size + 2,
363
+ borderRadius: (size + 2) / 2,
364
+ outlineOffset: 0
365
+ },
366
+ type,
367
+ disabled,
368
+ onClick,
369
+ whileHover: { opacity: 0.95 },
370
+ whileTap: { y: disabled ? 0 : 2 },
371
+ children: /* @__PURE__ */ jsx7(
372
+ motion2.span,
373
+ {
374
+ className: "flex justify-center items-center z-10",
375
+ style: {
376
+ background: bottom,
377
+ height: size,
378
+ width: size + 2,
379
+ borderRadius: (size + 2) / 2
380
+ },
381
+ initial: { y: active ? 0 : -6 },
382
+ animate: { y: active ? 0 : -6 },
383
+ transition: { duration: 0.1, ease: "easeInOut" },
384
+ whileHover: { opacity: 0.95 },
385
+ whileTap: { y: disabled ? active ? 0 : -6 : 0 },
386
+ children
387
+ }
388
+ )
389
+ }
390
+ );
391
+ };
392
+ var FunRoundButton_default = FunRoundButton;
393
+
394
+ // src/Checkbox/Checkbox.tsx
395
+ import { useMemo as useMemo3 } from "react";
396
+ import { useField } from "formik";
397
+
398
+ // src/Common/ErrorText.tsx
399
+ import { jsx as jsx8 } from "react/jsx-runtime";
400
+ var ErrorText = ({ text, style, classNames }) => {
401
+ return /* @__PURE__ */ jsx8("p", { className: classNames ? classNames : "text-red-500 font-semibold text-wrap py-auto", style, children: text });
402
+ };
403
+ var ErrorText_default = ErrorText;
404
+
405
+ // src/Checkbox/Checkbox.tsx
406
+ import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
407
+ var Checkbox = ({ name, labelText, isLarge, onChange, isDisabled }) => {
408
+ const [{ value }, { error }, { setValue, setTouched }] = useField(name);
409
+ const onCheck = (e) => {
410
+ setTouched(true);
411
+ setValue(!value, true);
412
+ };
413
+ const rand = useMemo3(() => {
414
+ return Math.random();
415
+ }, []);
416
+ return /* @__PURE__ */ jsxs2("div", { className: "relative flex flex-col justify-center items-center", children: [
417
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center", children: [
418
+ /* @__PURE__ */ jsx9(
419
+ "input",
420
+ {
421
+ disabled: !!isDisabled,
422
+ onChange: (e) => {
423
+ onCheck(e);
424
+ onChange == null ? void 0 : onChange(Boolean(e.target.value));
425
+ },
426
+ value: value ? "true" : "false",
427
+ id: `${name}${rand}`,
428
+ name,
429
+ type: "checkbox",
430
+ checked: !!value,
431
+ className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ${isLarge ? "h-5 w-5" : "h-4 w-4"}`
432
+ }
433
+ ),
434
+ typeof labelText === "string" ? /* @__PURE__ */ jsx9("label", { htmlFor: `${name}${rand}`, className: "ml-2 block text-sm text-gray-800 dark:text-gray-200", children: labelText }) : /* @__PURE__ */ jsx9("label", { htmlFor: `${name}${rand}`, children: labelText })
435
+ ] }),
436
+ error && /* @__PURE__ */ jsx9(ErrorText_default, { classNames: "absolute w-64 left-6 top-4 text-xs text-red-500", text: error })
437
+ ] });
438
+ };
439
+ var MultiChoiceCheckBox = ({ name, hasMultipleAnswers, index, isLarge, allOptionsName }) => {
440
+ const [{ value }, {}, { setValue, setTouched }] = useField(name);
441
+ const [{ value: optionsValue }, , { setValue: setOptionsValue }] = useField(allOptionsName);
442
+ const onCheck = (e) => {
443
+ setTouched(true);
444
+ if (hasMultipleAnswers) {
445
+ setValue(!value);
446
+ return;
447
+ }
448
+ setOptionsValue(optionsValue == null ? void 0 : optionsValue.map((el, idx) => ({ option: el.option, id: el.id, isCorrectAnswer: index === idx ? !el.isCorrectAnswer : false })));
449
+ };
450
+ return /* @__PURE__ */ jsx9("div", { className: "flex flex-col justify-center items-center", children: /* @__PURE__ */ jsx9("div", { className: "flex items-center", children: /* @__PURE__ */ jsx9(
451
+ "input",
452
+ {
453
+ onChange: (e) => onCheck(e),
454
+ value: index,
455
+ checked: !!value,
456
+ id: name,
457
+ name,
458
+ type: "checkbox",
459
+ className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ${isLarge ? "h-5 w-5" : "h-4 w-4"}`
460
+ }
461
+ ) }) });
462
+ };
463
+ Checkbox.Multi = MultiChoiceCheckBox;
464
+ var Checkbox_default = Checkbox;
465
+
466
+ // src/Checkbox/RadioOption.tsx
467
+ import { useField as useField2 } from "formik";
468
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
469
+ var RadioOption = ({ name, isLarge, labelText, option, onSelect }) => {
470
+ const [{ value }, {}, { setValue }] = useField2(name);
471
+ return /* @__PURE__ */ jsxs3("div", { className: "flex items-center", children: [
472
+ /* @__PURE__ */ jsx10(
473
+ "input",
474
+ {
475
+ onChange: () => {
476
+ setValue(option);
477
+ onSelect == null ? void 0 : onSelect();
478
+ },
479
+ value: option,
480
+ id: option,
481
+ name,
482
+ type: "checkbox",
483
+ checked: value === option,
484
+ className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded ${isLarge ? "h-5 w-5" : "h-4 w-4"}`
485
+ }
486
+ ),
487
+ typeof labelText === "string" ? /* @__PURE__ */ jsx10("label", { htmlFor: option, className: "ml-2 block text-sm text-gray-900", children: labelText }) : /* @__PURE__ */ jsx10("label", { htmlFor: option, children: labelText })
488
+ ] });
489
+ };
490
+ var RadioOption_default = RadioOption;
491
+
492
+ // src/Common/BottomAlert.tsx
493
+ import colors3 from "tailwindcss/dist/colors";
494
+ import ReactDOM2 from "react-dom";
495
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
496
+ var BottomAlert = ({ isDark, setDontShowAgain, dontShowAgain, title, borderColor, onDismissed, cancelText, confirmText, onConfirm, onCancel, isSingleAction, children, buttonColor }) => {
497
+ const dismiss = () => {
498
+ onDismissed == null ? void 0 : onDismissed();
499
+ };
500
+ return /* @__PURE__ */ jsx11(
501
+ "div",
502
+ {
503
+ className: "top-0 left-0 fixed w-full h-screen flex justify-center",
504
+ style: {
505
+ background: isDark ? "rgba(0, 0, 0, 0.1)" : "rgba(255, 255, 255, 0.1)",
506
+ zIndex: 9999
507
+ },
508
+ children: /* @__PURE__ */ jsx11("div", { className: "absolute top-0 w-full h-screen flex justify-center bg-gray-200 dark:bg-slate-800 dark:bg-opacity-50 bg-opacity-80", children: /* @__PURE__ */ jsx11("div", { className: "absolute sm:w-1/2 w-full mx-auto shadow-xl rounded-md p-6 flex z-50 flex-col top-24 bg-white dark:bg-slate-900 overflow-clip rounded-bl-lg rounded-br-lg border-b-8 border-b-blue-500", children: /* @__PURE__ */ jsxs4("div", { style: { borderColor: borderColor || colors3.sky["500"] }, children: [
509
+ /* @__PURE__ */ jsx11("h3", { className: "font-semibold font-header text-gray-700 dark:text-gray-300 text-xl", children: title }),
510
+ /* @__PURE__ */ jsx11("div", { className: "mt-2 text-lg", children }),
511
+ setDontShowAgain ? /* @__PURE__ */ jsxs4("div", { className: "flex items-center space-x-1", children: [
512
+ /* @__PURE__ */ jsx11(
513
+ "input",
514
+ {
515
+ onChange: () => {
516
+ setDontShowAgain((s) => !s);
517
+ },
518
+ id: `show_again_check`,
519
+ checked: !!dontShowAgain,
520
+ type: "checkbox",
521
+ className: `form-checkbox text-blue-600 focus:ring-blue-500 border-gray-300 rounded h-4 w-4`
522
+ }
523
+ ),
524
+ /* @__PURE__ */ jsx11("label", { htmlFor: "show_again_check", className: "dark:text-gray-200 text-gray-700", children: "Don't show again" })
525
+ ] }) : null,
526
+ /* @__PURE__ */ jsx11("div", { className: "mt-4 flex items-center justify-end space-x-4 z-10", children: isSingleAction ? /* @__PURE__ */ jsx11(
527
+ Button_default,
528
+ {
529
+ type: "button",
530
+ kind: buttonColor,
531
+ onClick: () => {
532
+ onConfirm(true);
533
+ dismiss();
534
+ },
535
+ children: confirmText || "Okay"
536
+ }
537
+ ) : /* @__PURE__ */ jsxs4("div", { className: "w-1/3 flex justify-end space-x-4", children: [
538
+ /* @__PURE__ */ jsx11("div", { className: "w-full flex flex-col", children: /* @__PURE__ */ jsx11(
539
+ Button_default,
540
+ {
541
+ type: "button",
542
+ kind: "secondary",
543
+ onClick: () => {
544
+ onCancel == null ? void 0 : onCancel();
545
+ dismiss();
546
+ },
547
+ children: cancelText || "Cancel"
548
+ }
549
+ ) }),
550
+ /* @__PURE__ */ jsx11("div", { className: "w-full flex flex-col", children: /* @__PURE__ */ jsx11(
551
+ Button_default,
552
+ {
553
+ type: "button",
554
+ kind: buttonColor,
555
+ onClick: () => {
556
+ onConfirm(true);
557
+ dismiss();
558
+ },
559
+ children: confirmText || "Confirm"
560
+ }
561
+ ) })
562
+ ] }) })
563
+ ] }) }) })
564
+ }
565
+ );
566
+ };
567
+ var BAWrapper = (props) => {
568
+ if (!props.isVisible) return null;
569
+ return ReactDOM2.createPortal(
570
+ /* @__PURE__ */ jsx11(BottomAlert, __spreadValues({}, props)),
571
+ document.body
572
+ );
573
+ };
574
+ var BottomAlert_default = BAWrapper;
575
+
576
+ // src/Common/Container.tsx
577
+ import { useEffect as useEffect2 } from "react";
578
+ import { jsx as jsx12 } from "react/jsx-runtime";
579
+ var Container = ({ backgroundColor, backgroundImage, style, children, onClick }) => {
580
+ useEffect2(() => {
581
+ if (backgroundColor) {
582
+ document.body.style.background = backgroundColor;
583
+ } else {
584
+ document.body.style.background = "";
585
+ }
586
+ return () => {
587
+ document.body.style.background = "";
588
+ };
589
+ }, [backgroundColor]);
590
+ return backgroundImage ? /* @__PURE__ */ jsx12(
591
+ "div",
592
+ {
593
+ style: __spreadValues({
594
+ backgroundImage,
595
+ backgroundSize: "cover"
596
+ }, style),
597
+ className: "w-full md:min-h-screen dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 md:px-2 sm:py-4 py-1 relative",
598
+ onClick,
599
+ children: children ? children : null
600
+ }
601
+ ) : /* @__PURE__ */ jsx12(
602
+ "div",
603
+ {
604
+ className: `w-full dark:bg-slate-950 mx-auto overflow-y-auto overflow-x-clip px-0 sm:px-16 relative pt-20`,
605
+ onClick,
606
+ style: style || { minHeight: "100vh" },
607
+ children: children ? children : null
608
+ }
609
+ );
610
+ };
611
+ var Container_default = Container;
612
+
613
+ // src/Common/fieldStyle.ts
614
+ var baseFieldStyle = "font-sans form-input h-11 w-full bg-white border-gray-200 dark:border-gray-500 dark:bg-slate-800 dark:text-gray-200 text-gray-700 dark:placeholder-gray-400 placeholder-gray-400 rounded-md px-2 py-1 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50";
615
+ var createExerciseElementStyle = "flex flex-col justify-between space-y-2 w-full p-4 bg-white dark:bg-slate-800 rounded-xl text-gray-800 dark:text-gray-200 border-2 border-slate-200 dark:border-slate-400 overflow-hidden transition-all";
616
+ var exerciseDeleteButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-red-600 dark:hover:text-red-500 transition-all duration-150 hover:scale-125";
617
+ var xIconButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-gray-950 dark:hover:text-gray-100 transition-all duration-150 hover:scale-125";
618
+ var exerciseEditButton = "w-6 h-6 flex justify-center text-gray-700 dark:text-gray-200 hover:text-red-600 dark:hover:text-green-500 transition-all duration-150 hover:scale-125";
619
+ var tippyClassname = "p-2 bg-slate-600 dark:bg-slate-900 opacity-90 text-white font-medium font-header rounded-lg";
620
+ var headerTippyClass = "rounded-lg p-2 bg-slate-950 opacity-95 text-white font-medium";
621
+ var headerButtonClass = "w-10 h-10 rounded-full dark:hover:bg-slate-600 hover:bg-slate-200 bg-transparent flex justify-center items-center flex justify-center items-center text-slate-600 dark:text-slate-100 hover:text-primary dark:hover:text-primary transition-colors duration-50";
622
+ var toolbarExerciseButton = "flex bg-gray-50 bg-opacity-95 items-center sm:justify-between p-4 shadow-sm w-full rounded-xl border-4 border-transparent hover:border-white text-gray-700 hover:text-white hover:bg-indigo-500 transition-colors duration-75";
623
+
624
+ // src/Common/Tippy.tsx
625
+ import { useState as useState2, useRef, useEffect as useEffect3 } from "react";
626
+ import {
627
+ useFloating,
628
+ useInteractions,
629
+ useHover,
630
+ useRole,
631
+ useDismiss,
632
+ offset,
633
+ flip,
634
+ shift,
635
+ arrow,
636
+ FloatingArrow,
637
+ FloatingPortal
638
+ } from "@floating-ui/react";
639
+ import { Fragment, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
640
+ var Tippy = ({ children, content, placement = "top", className = "", wrapperClassname = "", disabled = false, arrow: useArrow = false, visible }) => {
641
+ const [isOpen, setIsOpen] = useState2(false);
642
+ const arrowRef = useRef(null);
643
+ useEffect3(() => {
644
+ if (visible) {
645
+ setIsOpen(true);
646
+ }
647
+ }, [visible]);
648
+ const {
649
+ x,
650
+ y,
651
+ strategy,
652
+ refs,
653
+ context
654
+ } = useFloating({
655
+ placement,
656
+ open: isOpen,
657
+ onOpenChange: setIsOpen,
658
+ middleware: [
659
+ offset(8),
660
+ flip(),
661
+ shift(),
662
+ arrow({ element: arrowRef })
663
+ ]
664
+ });
665
+ const hover = useHover(context, {
666
+ enabled: !disabled
667
+ });
668
+ const dismiss = useDismiss(context);
669
+ const role = useRole(context);
670
+ const { getReferenceProps, getFloatingProps } = useInteractions([
671
+ hover,
672
+ dismiss,
673
+ role
674
+ ]);
675
+ return /* @__PURE__ */ jsxs5(Fragment, { children: [
676
+ isOpen && /* @__PURE__ */ jsxs5(FloatingPortal, { children: [
677
+ /* @__PURE__ */ jsx13(
678
+ "div",
679
+ __spreadProps(__spreadValues({
680
+ ref: refs.setFloating,
681
+ className: `z-[9999] ${className || tippyClassname}`
682
+ }, getFloatingProps()), {
683
+ style: {
684
+ position: strategy,
685
+ top: y != null ? y : 0,
686
+ left: x != null ? x : 0,
687
+ width: "max-content"
688
+ },
689
+ children: content
690
+ })
691
+ ),
692
+ useArrow && /* @__PURE__ */ jsx13(
693
+ FloatingArrow,
694
+ {
695
+ ref: arrowRef,
696
+ context,
697
+ className: "fill-gray-900",
698
+ tipRadius: 2
699
+ }
700
+ )
701
+ ] }),
702
+ /* @__PURE__ */ jsx13("div", __spreadProps(__spreadValues({ ref: refs.setReference }, getReferenceProps()), { className: wrapperClassname, children }))
703
+ ] });
704
+ };
705
+ var Tippy_default = Tippy;
706
+
707
+ // src/Common/IconInfo.tsx
708
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
709
+ var IconInfo = ({ content, icon, number, color }) => {
710
+ return /* @__PURE__ */ jsx14("div", { className: "flex flex-shrink-0 items-center justify-center w-8 h-8 rounded-full bg-slate-400 dark:bg-slate-600 dark:border dark:border-white", children: /* @__PURE__ */ jsx14(
711
+ Tippy_default,
712
+ {
713
+ className: tippyClassname,
714
+ content,
715
+ children: /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
716
+ icon,
717
+ /* @__PURE__ */ jsx14("p", { className: `absolute -bottom-1 ${number > 9 ? number > 99 ? number > 999 ? "w-8 h-8 -right-6 -bottom-3" : "w-6 h-6 -right-5 -bottom-2" : "w-5 h-5 -right-3" : "w-4 -right-3"} flex justify-center items-center text-xs font-sans rounded-full text-white ${color || "bg-secondary"}`, children: number })
718
+ ] })
719
+ }
720
+ ) });
721
+ };
722
+ var IconInfo_default = IconInfo;
723
+
724
+ // src/Common/Modal.tsx
725
+ import Link from "next/link";
726
+
727
+ // src/Icons/XIcon.tsx
728
+ import { jsx as jsx15 } from "react/jsx-runtime";
729
+ var XIcon = ({ className }) => {
730
+ return /* @__PURE__ */ jsx15("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx15("path", { fillRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", clipRule: "evenodd" }) });
731
+ };
732
+ var XIcon_default = XIcon;
733
+
734
+ // src/Common/Modal.tsx
735
+ import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
736
+ var Modal = (_a) => {
737
+ var _b = _a, { visible, children, fullscreen, displayDark, dismissLink, bgOpacity, onDismissed, dismissable = true, dismissOnBackdropClick = true, style } = _b, props = __objRest(_b, ["visible", "children", "fullscreen", "displayDark", "dismissLink", "bgOpacity", "onDismissed", "dismissable", "dismissOnBackdropClick", "style"]);
738
+ if (!visible) return null;
739
+ return /* @__PURE__ */ jsx16(Overlay_default, __spreadProps(__spreadValues({ visible, onClick: dismissOnBackdropClick ? onDismissed : void 0, isDark: displayDark, withContainer: true }, props), { children: /* @__PURE__ */ jsx16(
740
+ "div",
741
+ {
742
+ className: `${displayDark && "dark"} bg-slate-900/20 fixed inset-0 flex items-center justify-center`,
743
+ style: { zIndex: 1e4 },
744
+ children: /* @__PURE__ */ jsxs7("div", { className: ["relative mx-1 w-full md:mx-auto md:w-3/4 lg:w-1/2", fullscreen && `md:w-5/6 lg:w-5/6`].join(" "), children: [
745
+ /* @__PURE__ */ jsx16(Fragment2, { children: dismissLink ? /* @__PURE__ */ jsx16(
746
+ Link,
747
+ {
748
+ href: dismissLink,
749
+ scroll: false,
750
+ children: /* @__PURE__ */ jsx16("div", { onClick: onDismissed, children: /* @__PURE__ */ jsx16(XIcon_default, { className: "absolute h-5 w-5 top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500" }) })
751
+ }
752
+ ) : dismissable ? /* @__PURE__ */ jsx16(
753
+ "button",
754
+ {
755
+ className: "absolute top-5 sm:top-20 right-4 transition-colors cursor-pointer duration-75 hover:text-blue-500 dark:text-gray-200 dark:hover:text-blue-500",
756
+ type: "button",
757
+ onClick: onDismissed,
758
+ children: /* @__PURE__ */ jsx16(
759
+ XIcon_default,
760
+ {
761
+ className: "h-5 w-5"
762
+ }
763
+ )
764
+ }
765
+ ) : null }),
766
+ /* @__PURE__ */ jsx16(
767
+ "div",
768
+ {
769
+ className: "my-1 sm:mt-16 bg-white dark:bg-slate-900 shadow-lg border border-gray-100 dark:border-none rounded-xl overflow-x-visible overflow-y-visible no-scrollbar",
770
+ onClick: (e) => e.stopPropagation(),
771
+ style: __spreadValues({ maxHeight: "calc(100vh - 6rem)" }, style),
772
+ children: /* @__PURE__ */ jsx16("div", { className: "p-4 sm:p-10", children: /* @__PURE__ */ jsx16("div", { className: "mt-8 sm:mt-0", children }) })
773
+ }
774
+ )
775
+ ] })
776
+ }
777
+ ) }));
778
+ };
779
+ var Modal_default = Modal;
780
+
781
+ // src/Common/NoResults.tsx
782
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
783
+ var HEIGHT = 160;
784
+ var WIDTH = HEIGHT * (16 / 9);
785
+ var NoResults = ({ loading, message }) => {
786
+ return /* @__PURE__ */ jsxs8("div", { className: "relative w-full flex justify-center items-center", children: [
787
+ /* @__PURE__ */ jsxs8("div", { className: "flex justify-start w-full space-x-2 py-3 p-4 bg-slate-100 dark:bg-slate-800 rounded-md", children: [
788
+ /* @__PURE__ */ jsx17("div", { style: { width: `calc(${WIDTH}px + 1rem)`, height: 320 }, className: "rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-shadow duration-150 px-2 pt-2 bg-slate-200 dark:bg-slate-700 animate-pulse" }),
789
+ /* @__PURE__ */ jsx17("div", { style: { width: `calc(${WIDTH}px + 1rem)`, height: 320 }, className: "rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-shadow duration-150 px-2 pt-2 bg-slate-200 dark:bg-slate-700 animate-pulse" })
790
+ ] }),
791
+ !loading && /* @__PURE__ */ jsx17("div", { className: "absolute w-full h-full flex justify-center items-center m-auto", children: /* @__PURE__ */ jsx17("div", { className: "p-4 rounded-lg bg-white dark:bg-slate-700 shadow-xl", children: /* @__PURE__ */ jsx17("p", { className: "font-semibold text-lg text-gray-700 dark:text-gray-300", children: message || "No results" }) }) })
792
+ ] });
793
+ };
794
+ var NoResults_default = NoResults;
795
+
796
+ // src/Common/NoticeBox.tsx
797
+ import { useEffect as useEffect4, useMemo as useMemo4, useState as useState3 } from "react";
798
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
799
+ var NoticeBox = ({ children, type, isDismissible, isVisible, onDismiss }) => {
800
+ const [visible, setVisible] = useState3(true);
801
+ const styles = useMemo4(() => {
802
+ const base = "relative text-base rounded-md p-2 ";
803
+ if (!visible) return "hidden";
804
+ switch (type) {
805
+ case "error":
806
+ return base.concat("w-full absolute top-50 text-red-500 border-red-400 border-2");
807
+ case "info":
808
+ return base.concat("text-green-800 border-green-400 bg-green-100");
809
+ case "warning":
810
+ return base.concat("text-orange-500 border border-orange-400 bg-white");
811
+ default:
812
+ return base.concat("w-full absolute top-0 text-red-500 border-red-500 bg-white p-3 border-2");
813
+ }
814
+ }, [type, visible]);
815
+ useEffect4(() => {
816
+ setVisible(isVisible);
817
+ }, [isVisible]);
818
+ if (!isVisible) return null;
819
+ return /* @__PURE__ */ jsx18(
820
+ "div",
821
+ {
822
+ style: {
823
+ zIndex: 100
824
+ },
825
+ className: styles,
826
+ children: /* @__PURE__ */ jsxs9("div", { className: "relative", children: [
827
+ isDismissible && /* @__PURE__ */ jsx18(
828
+ "button",
829
+ {
830
+ type: "button",
831
+ onClick: () => {
832
+ setVisible((s) => !s);
833
+ onDismiss == null ? void 0 : onDismiss();
834
+ },
835
+ className: "absolute bottom-1 right-1 transition-colors cursor-pointer duration-75 hover:text-blue-500",
836
+ children: /* @__PURE__ */ jsx18(XIcon_default, { className: "h-5 w-5" })
837
+ }
838
+ ),
839
+ children
840
+ ] })
841
+ }
842
+ );
843
+ };
844
+ var NoticeBox_default = NoticeBox;
845
+
846
+ // src/Common/Pill.tsx
847
+ import { jsx as jsx19 } from "react/jsx-runtime";
848
+ var Pill = ({ text }) => {
849
+ return /* @__PURE__ */ jsx19("span", { className: "rounded-full px-3 py-1 text-sm font-header font-medium bg-white dark:bg-slate-900 text-gray-700 dark:text-gray-300 mr-2 mb-2", children: text });
850
+ };
851
+ var Pill_default = Pill;
852
+
853
+ // src/Icons/StarIcon.tsx
854
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
855
+ var StarIcon = ({ className, percentage, color }) => {
856
+ return /* @__PURE__ */ jsxs10("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: [
857
+ /* @__PURE__ */ jsx20("defs", { children: /* @__PURE__ */ jsxs10("linearGradient", { id: "grad", children: [
858
+ /* @__PURE__ */ jsx20("stop", { offset: `${(percentage || 0.5) * 100}%`, "stop-color": color ? color : "#4b5563" }),
859
+ /* @__PURE__ */ jsx20("stop", { offset: `${100 - (percentage || 0.5) * 100}%`, "stop-color": "white" })
860
+ ] }) }),
861
+ /* @__PURE__ */ jsx20("path", { fill: "url(#grad)", d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" })
862
+ ] });
863
+ };
864
+ var StarIcon_default = StarIcon;
865
+
866
+ // src/Icons/StarIconSolid.tsx
867
+ import { jsx as jsx21 } from "react/jsx-runtime";
868
+ var StartIconSolid = ({ className }) => {
869
+ return /* @__PURE__ */ jsx21("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx21("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
870
+ };
871
+ var StarIconSolid_default = StartIconSolid;
872
+
873
+ // src/Common/RatingStars.tsx
874
+ import { jsx as jsx22 } from "react/jsx-runtime";
875
+ var RatingStars = ({ avgRating, large }) => {
876
+ const icons = [1, 2, 3, 4, 5].map((el) => {
877
+ if (avgRating === 0) {
878
+ return /* @__PURE__ */ jsx22(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-gray-200 dark:text-gray-400` }, `rating_star_${el}`);
879
+ }
880
+ if (Number.isInteger(avgRating)) {
881
+ if (el <= avgRating) {
882
+ return /* @__PURE__ */ jsx22(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-blue-500` }, `rating_star_${el}`);
883
+ }
884
+ return /* @__PURE__ */ jsx22(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-gray-200 dark:text-gray-400` }, `rating_star_${el}`);
885
+ }
886
+ const whole = Math.floor(avgRating);
887
+ if (el <= whole) {
888
+ return /* @__PURE__ */ jsx22(StarIconSolid_default, { className: `${large ? "h-5 w-5" : "h-3 w-3"} text-blue-500` }, `rating_star_${el}`);
889
+ }
890
+ return /* @__PURE__ */ jsx22(StarIcon_default, { percentage: avgRating - whole, color: "#00b4d8", className: `${large ? "h-5 w-5" : "h-3 w-3"}` }, `rating_star_${el}`);
891
+ });
892
+ return /* @__PURE__ */ jsx22(
893
+ Tippy_default,
894
+ {
895
+ content: avgRating === 0 ? "No ratings" : "Average Rating " + avgRating,
896
+ className: "bg-gray-800 opacity-90 text-white rounded-md px-2 py-1 cursor-pointer h-fit",
897
+ children: /* @__PURE__ */ jsx22("div", { className: "flex items-center space-x-0 justify-start", children: icons })
898
+ }
899
+ );
900
+ };
901
+ var RatingStars_default = RatingStars;
902
+
903
+ // src/Common/Slider.tsx
904
+ import { useState as useState4 } from "react";
905
+ import { useDebouncedCallback } from "use-debounce";
906
+ import { jsx as jsx23 } from "react/jsx-runtime";
907
+ var Slider = ({ min, max, step, value, onChange }) => {
908
+ const handleChange = (event) => {
909
+ onChange(parseFloat(event.target.value));
910
+ };
911
+ return /* @__PURE__ */ jsx23(
912
+ "input",
913
+ {
914
+ type: "range",
915
+ min,
916
+ max,
917
+ step,
918
+ value,
919
+ onChange: handleChange,
920
+ className: `w-full h-2 rounded-lg range-input`
921
+ }
922
+ );
923
+ };
924
+ var DebouncedSlider = ({ min, max, handleUpdate, initialValue }) => {
925
+ const [value, setValue] = useState4(initialValue);
926
+ const debouncedUpdate = useDebouncedCallback((v) => {
927
+ handleUpdate(v);
928
+ }, 120, { trailing: true, leading: false });
929
+ return /* @__PURE__ */ jsx23(
930
+ Slider,
931
+ {
932
+ min,
933
+ max,
934
+ step: 1,
935
+ value,
936
+ onChange: (v) => {
937
+ setValue(v);
938
+ debouncedUpdate(v);
939
+ }
940
+ }
941
+ );
942
+ };
943
+ Slider.Debounced = DebouncedSlider;
944
+ var Slider_default = Slider;
945
+
946
+ // src/Common/StepsComponent.tsx
947
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
948
+ var StepsComponent = ({ steps, activeStep, onStepPress }) => {
949
+ return /* @__PURE__ */ jsx24("div", { className: "flex justify-between items-center w-full p-1 mb-2", children: steps.map((step, index) => {
950
+ return /* @__PURE__ */ jsx24("div", { className: "flex justify-center items-center space-x-2 w-full", children: /* @__PURE__ */ jsx24("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsx24(
951
+ "button",
952
+ {
953
+ type: "button",
954
+ onClick: () => onStepPress(index),
955
+ className: `flex items-center space-x-2 px-4 py-2 rounded-lg min-w-10 md:min-w-20 sm:min-w-40 font-header transition-all duration-150
956
+ ${activeStep === index ? "bg-primary text-white shadow-lg scale-110 border-2 border-primary" : "bg-gray-100 dark:bg-slate-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-slate-700 border-2 border-transparent hover:border-primary/30"}`,
957
+ children: /* @__PURE__ */ jsxs11("span", { className: "font-medium truncate", children: [
958
+ index + 1,
959
+ ". ",
960
+ step.label
961
+ ] })
962
+ }
963
+ ) }) }, `step_${index}_${step.label}`);
964
+ }) });
965
+ };
966
+ var StepsComponent_default = StepsComponent;
967
+
968
+ // src/Common/ToggleSwitch.tsx
969
+ import { useField as useField3 } from "formik";
970
+ import { motion as motion3 } from "framer-motion";
971
+ import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
972
+ var Formik = ({ label, name }) => {
973
+ const [{ value }, , { setValue }] = useField3(name);
974
+ const handleChange = (e) => {
975
+ setValue(e.target.checked);
976
+ };
977
+ return /* @__PURE__ */ jsxs12("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
978
+ /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
979
+ /* @__PURE__ */ jsx25(
980
+ "input",
981
+ {
982
+ type: "checkbox",
983
+ className: "opacity-0 absolute",
984
+ checked: value,
985
+ onChange: handleChange
986
+ }
987
+ ),
988
+ /* @__PURE__ */ jsx25("div", { className: `w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ${value ? "bg-[#00b4d8]" : "bg-[#64748b]"}`, children: /* @__PURE__ */ jsx25(
989
+ motion3.div,
990
+ {
991
+ className: "w-4 h-4 bg-white rounded-full absolute top-1",
992
+ initial: false,
993
+ animate: {
994
+ x: value ? 16 : 0
995
+ },
996
+ transition: { type: "spring", stiffness: 500, damping: 30 }
997
+ }
998
+ ) })
999
+ ] }),
1000
+ /* @__PURE__ */ jsx25("span", { className: "text-sm font-medium text-gray-800 dark:text-gray-200", children: label })
1001
+ ] });
1002
+ };
1003
+ var ToggleSwitch = ({ label, onChange, value }) => {
1004
+ const handleChange = (e) => {
1005
+ onChange(e.target.checked);
1006
+ };
1007
+ return /* @__PURE__ */ jsxs12("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
1008
+ /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
1009
+ /* @__PURE__ */ jsx25(
1010
+ "input",
1011
+ {
1012
+ type: "checkbox",
1013
+ className: "opacity-0 absolute",
1014
+ checked: value,
1015
+ onChange: handleChange
1016
+ }
1017
+ ),
1018
+ /* @__PURE__ */ jsx25("div", { className: `w-10 h-6 rounded-full p-[4px] transition-colors duration-300 ${value ? "bg-[#00b4d8]" : "bg-[#64748b]"}`, children: /* @__PURE__ */ jsx25(
1019
+ motion3.div,
1020
+ {
1021
+ className: "w-4 h-4 bg-white rounded-full absolute top-1",
1022
+ initial: false,
1023
+ animate: {
1024
+ x: value ? 16 : 0
1025
+ },
1026
+ transition: { type: "spring", stiffness: 500, damping: 30 }
1027
+ }
1028
+ ) })
1029
+ ] }),
1030
+ /* @__PURE__ */ jsx25("span", { className: "text-sm font-medium text-gray-800 dark:text-gray-200", children: label })
1031
+ ] });
1032
+ };
1033
+ ToggleSwitch.Formik = Formik;
1034
+ var ToggleSwitch_default = ToggleSwitch;
1035
+
1036
+ // src/Common/UserContentSwitcher.tsx
1037
+ import { motion as motion4 } from "framer-motion";
1038
+
1039
+ // src/Icons/PlusCircleIcon.tsx
1040
+ import { jsx as jsx26 } from "react/jsx-runtime";
1041
+ var PlusCircleIcon = ({ className }) => {
1042
+ return /* @__PURE__ */ jsx26("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx26("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
1043
+ };
1044
+ var PlusCircleIcon_default = PlusCircleIcon;
1045
+
1046
+ // src/Icons/ArrowCircleRight.tsx
1047
+ import { jsx as jsx27 } from "react/jsx-runtime";
1048
+ var StartIconSolid2 = ({ className }) => {
1049
+ return /* @__PURE__ */ jsx27("svg", { xmlns: "http://www.w3.org/2000/svg", className: className || "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx27("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z" }) });
1050
+ };
1051
+ var ArrowCircleRight_default = StartIconSolid2;
1052
+
1053
+ // src/Common/UserContentSwitcher.tsx
1054
+ import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
1055
+ var UserContentSwitcher = ({ icon1: Icon1, icon2: Icon2, setGalleryMode, galleryMode, title1, title2 }) => {
1056
+ return /* @__PURE__ */ jsxs13("div", { className: "relative flex flex-row items-center my-2 bg-slate-100 dark:bg-slate-900 w-full h-14 rounded-lg", children: [
1057
+ /* @__PURE__ */ jsx28(
1058
+ motion4.div,
1059
+ {
1060
+ className: "absolute w-1/2 h-11 rounded-md bg-white dark:bg-slate-600",
1061
+ animate: {
1062
+ x: galleryMode === title1.toLowerCase() ? "1%" : "99%"
1063
+ },
1064
+ transition: {
1065
+ type: "spring",
1066
+ damping: 20,
1067
+ stiffness: 200
1068
+ }
1069
+ }
1070
+ ),
1071
+ /* @__PURE__ */ jsxs13(
1072
+ "button",
1073
+ {
1074
+ onClick: () => setGalleryMode(title1.toLowerCase()),
1075
+ className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
1076
+ children: [
1077
+ /* @__PURE__ */ jsx28(
1078
+ "span",
1079
+ {
1080
+ className: `truncate ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
1081
+ children: title1.toLocaleUpperCase()
1082
+ }
1083
+ ),
1084
+ Icon1 ? /* @__PURE__ */ jsx28(
1085
+ Icon1,
1086
+ {
1087
+ className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
1088
+ }
1089
+ ) : /* @__PURE__ */ jsx28(
1090
+ PlusCircleIcon_default,
1091
+ {
1092
+ className: `h-5 w-5 ${galleryMode === title1.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
1093
+ }
1094
+ )
1095
+ ]
1096
+ }
1097
+ ),
1098
+ /* @__PURE__ */ jsxs13(
1099
+ "button",
1100
+ {
1101
+ onClick: () => setGalleryMode(title2.toLowerCase()),
1102
+ className: "py-2 flex flex-row w-1/2 justify-center items-center gap-1 z-10",
1103
+ children: [
1104
+ /* @__PURE__ */ jsx28(
1105
+ "span",
1106
+ {
1107
+ className: `truncate ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`,
1108
+ children: title2.toLocaleUpperCase()
1109
+ }
1110
+ ),
1111
+ Icon2 ? /* @__PURE__ */ jsx28(
1112
+ Icon2,
1113
+ {
1114
+ className: `h-5 w-5 ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
1115
+ }
1116
+ ) : /* @__PURE__ */ jsx28(
1117
+ ArrowCircleRight_default,
1118
+ {
1119
+ className: `h-5 w-5 ${galleryMode === title2.toLowerCase() ? "text-primary dark:text-blue-400" : "text-slate-500 dark:text-slate-400 opacity-90"}`
1120
+ }
1121
+ )
1122
+ ]
1123
+ }
1124
+ )
1125
+ ] });
1126
+ };
1127
+ var UserContentSwitcher_default = UserContentSwitcher;
1128
+
1129
+ // src/Fade/Fade.tsx
1130
+ import { jsx as jsx29 } from "react/jsx-runtime";
1131
+ var Fade = ({ children, inProp }) => {
1132
+ return /* @__PURE__ */ jsx29("div", { className: "animate-fade-in", children });
1133
+ };
1134
+ var Fade_default = Fade;
1135
+
1136
+ // src/ProgressBar/ProgressBarSimple.tsx
1137
+ import { jsx as jsx30 } from "react/jsx-runtime";
1138
+ var ProgressBarSimple = ({ progress, color, height = 10, backgroundColor = "#ccc" }) => {
1139
+ return /* @__PURE__ */ jsx30("div", { className: "w-full", children: /* @__PURE__ */ jsx30(
1140
+ "div",
1141
+ {
1142
+ className: "w-full overflow-hidden transition-all duration-150 ease-in-out",
1143
+ style: {
1144
+ backgroundColor,
1145
+ height: `${height}px`,
1146
+ borderRadius: `${height / 2}px`
1147
+ },
1148
+ children: /* @__PURE__ */ jsx30(
1149
+ "div",
1150
+ {
1151
+ className: "transition-all duration-150 ease-in-out",
1152
+ style: {
1153
+ width: `${progress}%`,
1154
+ backgroundColor: color,
1155
+ height: `${height}px`,
1156
+ borderRadius: `${height / 2}px`
1157
+ }
1158
+ }
1159
+ )
1160
+ }
1161
+ ) });
1162
+ };
1163
+ var ProgressBarSimple_default = ProgressBarSimple;
1164
+
1165
+ // src/ProgressBar/ProgressBar.tsx
1166
+ import { jsx as jsx31 } from "react/jsx-runtime";
1167
+ var ProgressBar = ({ progress }) => /* @__PURE__ */ jsx31("div", { children: /* @__PURE__ */ jsx31("div", { className: "-mt-2 mb-6", children: /* @__PURE__ */ jsx31("div", { className: "bg-gray-100 rounded-full h-2", children: /* @__PURE__ */ jsx31(
1168
+ "div",
1169
+ {
1170
+ className: `rounded-full h-2 ${progress === 100 ? "bg-green-400" : "bg-gray-100"}`,
1171
+ style: {
1172
+ width: `${progress}%`,
1173
+ minWidth: "100%",
1174
+ position: "absolute"
1175
+ }
1176
+ }
1177
+ ) }) }) });
1178
+ var ProgressStepBar = ({ steps, stepIndex, onStepClick, color }) => {
1179
+ return /* @__PURE__ */ jsx31("div", { className: "flex w-full items-center space-x-0.5 -mt-1 overflow-hidden", children: steps.map((el, i) => {
1180
+ return /* @__PURE__ */ jsx31("div", { className: "flex-1 relative", children: /* @__PURE__ */ jsx31(
1181
+ Tippy_default,
1182
+ {
1183
+ content: el.label,
1184
+ className: tippyClassname,
1185
+ children: /* @__PURE__ */ jsx31("div", { className: "mb-4", children: /* @__PURE__ */ jsx31(
1186
+ "div",
1187
+ {
1188
+ onClick: () => onStepClick == null ? void 0 : onStepClick(i),
1189
+ className: "cursor-pointer bg-gray-100 rounded-full h-2 overflow-hidden",
1190
+ children: /* @__PURE__ */ jsx31(
1191
+ "div",
1192
+ {
1193
+ className: `cursor-pointer rounded-full h-2 ${stepIndex >= i ? "bg-green-400" : "bg-gray-100"}`,
1194
+ style: {
1195
+ width: `${stepIndex >= i ? 100 : 0}%`,
1196
+ transition: "width 0.3s ease"
1197
+ }
1198
+ }
1199
+ )
1200
+ }
1201
+ ) })
1202
+ }
1203
+ ) }, `index_progress_${el.label}`);
1204
+ }) });
1205
+ };
1206
+ ProgressBar.Step = ProgressStepBar;
1207
+ var ProgressBar_default = ProgressBar;
1208
+
1209
+ // src/ProgressBar/CircleProgress.tsx
1210
+ import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
1211
+ var CircleProgress = ({ twColor, percentage, radius, fill, strokeWidth }) => {
1212
+ const r = radius;
1213
+ const cx = "50%";
1214
+ const cy = "50%";
1215
+ const w = Math.round(radius / 16);
1216
+ const strokeWidthCalc = strokeWidth ? strokeWidth : w < 8 ? 8 : w;
1217
+ const size = radius * 2 + strokeWidthCalc;
1218
+ return /* @__PURE__ */ jsx32("div", { style: { height: size, width: size }, children: /* @__PURE__ */ jsxs14("svg", { viewBox: `0 0 ${size} ${size}`, className: "-rotate-90", children: [
1219
+ /* @__PURE__ */ jsx32(
1220
+ "circle",
1221
+ {
1222
+ className: "text-white/50 dark:text-slate-200/50",
1223
+ strokeWidth: strokeWidthCalc - 0.5,
1224
+ stroke: "currentColor",
1225
+ fill: fill || "transparent",
1226
+ r,
1227
+ cx,
1228
+ cy
1229
+ }
1230
+ ),
1231
+ /* @__PURE__ */ jsx32(
1232
+ "circle",
1233
+ {
1234
+ strokeDasharray: 2 * Math.PI * r,
1235
+ strokeDashoffset: 2 * Math.PI * r - percentage / 100 * 2 * Math.PI * r,
1236
+ stroke: twColor || "white/50",
1237
+ strokeWidth: strokeWidthCalc,
1238
+ strokeLinecap: "round",
1239
+ fill: "transparent",
1240
+ r,
1241
+ cx,
1242
+ cy
1243
+ }
1244
+ )
1245
+ ] }) });
1246
+ };
1247
+ var CircleProgress_default = CircleProgress;
1248
+
1249
+ // src/ProgressBar/ScrollProgress.tsx
1250
+ import { useEffect as useEffect5, useState as useState5 } from "react";
1251
+ import { jsx as jsx33 } from "react/jsx-runtime";
1252
+ var PRIMARY_COLOR = "#00b4d8";
1253
+ var ScrollProgress = () => {
1254
+ const [scrollPercentage, setScrollPercentage] = useState5(0);
1255
+ useEffect5(() => {
1256
+ const handleScroll = () => {
1257
+ const windowHeight = window.innerHeight;
1258
+ const documentHeight = document.documentElement.scrollHeight;
1259
+ const scrollY = window.scrollY;
1260
+ const scrollPercent = scrollY / (documentHeight - windowHeight) * 100;
1261
+ setScrollPercentage(scrollPercent);
1262
+ };
1263
+ window.addEventListener("scroll", handleScroll);
1264
+ return () => {
1265
+ window.removeEventListener("scroll", handleScroll);
1266
+ };
1267
+ }, []);
1268
+ return /* @__PURE__ */ jsx33(
1269
+ "div",
1270
+ {
1271
+ style: {
1272
+ height: "4px",
1273
+ borderRadius: 2,
1274
+ width: "100%",
1275
+ // backgroundColor: '#d1dced',
1276
+ position: "fixed",
1277
+ top: "62px",
1278
+ left: "0px",
1279
+ right: "0px"
1280
+ },
1281
+ children: /* @__PURE__ */ jsx33(
1282
+ "div",
1283
+ {
1284
+ style: {
1285
+ height: "100%",
1286
+ backgroundColor: PRIMARY_COLOR,
1287
+ borderRadius: 2,
1288
+ width: `${scrollPercentage}%`
1289
+ }
1290
+ }
1291
+ )
1292
+ }
1293
+ );
1294
+ };
1295
+ var ScrollProgress_default = ScrollProgress;
1296
+
1297
+ // src/Icons/AnimateLogo.tsx
1298
+ import { useEffect as useEffect6, useState as useState6 } from "react";
1299
+ import { jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
1300
+ var AnimateLogo = () => {
1301
+ const [isFirefox, setIsFirefox] = useState6(false);
1302
+ useEffect6(() => {
1303
+ const userAgent = window.navigator.userAgent;
1304
+ setIsFirefox(userAgent.indexOf("Firefox") > -1);
1305
+ }, []);
1306
+ if (isFirefox) {
1307
+ return /* @__PURE__ */ jsx34("svg", { xmlns: "http://www.w3.org/2000/svg", className: "animate-pulse", viewBox: "0 0 600 600", children: /* @__PURE__ */ jsx34("g", { children: /* @__PURE__ */ jsxs15(
1308
+ "path",
1309
+ {
1310
+ className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
1311
+ stroke: "currentColor",
1312
+ fill: "none",
1313
+ strokeLinecap: "round",
1314
+ strokeMiterlimit: "10",
1315
+ strokeWidth: "82",
1316
+ strokeDasharray: "1600",
1317
+ d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
1318
+ children: [
1319
+ /* @__PURE__ */ jsx34(
1320
+ "animate",
1321
+ {
1322
+ attributeName: "stroke-dashoffset",
1323
+ to: "0",
1324
+ from: "1600",
1325
+ dur: "4s",
1326
+ fill: "freeze",
1327
+ repeatCount: "indefinite",
1328
+ calcMode: "cubic",
1329
+ keyTimes: "0;0.375;0.5;0.875;1",
1330
+ keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
1331
+ values: "1600;0;0;1600;1600"
1332
+ }
1333
+ ),
1334
+ /* @__PURE__ */ jsx34(
1335
+ "animateTransform",
1336
+ {
1337
+ attributeName: "transform",
1338
+ type: "rotate",
1339
+ from: "0 300 300",
1340
+ to: "360 300 300",
1341
+ dur: "2s",
1342
+ fill: "freeze",
1343
+ repeatCount: "indefinite",
1344
+ calcMode: "cubic",
1345
+ keyTimes: "0;0.75;1",
1346
+ keySplines: "0 0.26 0 1",
1347
+ values: "0 300 300;360 300 300;360 300 300;"
1348
+ }
1349
+ )
1350
+ ]
1351
+ }
1352
+ ) }) });
1353
+ }
1354
+ return /* @__PURE__ */ jsx34("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 600 600", children: /* @__PURE__ */ jsxs15(
1355
+ "g",
1356
+ {
1357
+ style: {
1358
+ transformOrigin: "center"
1359
+ },
1360
+ transform: "translate(300 300) rotate(0)",
1361
+ height: 176,
1362
+ width: 176,
1363
+ children: [
1364
+ /* @__PURE__ */ jsx34(
1365
+ "path",
1366
+ {
1367
+ className: "stroke-black dark:stroke-white text-gray-900 dark:text-gray-50",
1368
+ stroke: "currentColor",
1369
+ id: "motionPath",
1370
+ fill: "none",
1371
+ strokeLinecap: "round",
1372
+ height: 600,
1373
+ width: 600,
1374
+ style: {
1375
+ transformOrigin: "center"
1376
+ },
1377
+ strokeMiterlimit: "10",
1378
+ strokeWidth: "82",
1379
+ strokeDasharray: "1600",
1380
+ d: "M466.49 164.79c17.79 34.76 25.48 75.66 19.08 118.96-11.28 76.36-67.11 139.06-141.89 158.25-127.11 32.61-243.49-61.27-245.86-184.81C95.79 150.86 182.9 60.52 289.23 58.56c33.95-.63 66.08 7.48 94.22 22.29 0 0 15.68 6.34 10.14 23.19 0 0-68.52 219.82-352.61 268.06",
1381
+ children: /* @__PURE__ */ jsx34(
1382
+ "animate",
1383
+ {
1384
+ attributeName: "stroke-dashoffset",
1385
+ to: "0",
1386
+ from: "1600",
1387
+ dur: "4s",
1388
+ fill: "freeze",
1389
+ repeatCount: "indefinite",
1390
+ calcMode: "cubic",
1391
+ keyTimes: "0;0.375;0.5;0.875;1",
1392
+ keySplines: "0 0.26 0 1;0 0.26 0 1;0 0.26 0 1;0 0.26 0 1",
1393
+ values: "1600;0;0;1600;1600"
1394
+ }
1395
+ )
1396
+ }
1397
+ ),
1398
+ /* @__PURE__ */ jsx34(
1399
+ "animateTransform",
1400
+ {
1401
+ attributeName: "transform",
1402
+ type: "rotate",
1403
+ from: "0",
1404
+ to: "360",
1405
+ dur: "2s",
1406
+ fill: "freeze",
1407
+ repeatCount: "indefinite",
1408
+ calcMode: "cubic",
1409
+ keyTimes: "0;0.75;1",
1410
+ keySplines: "0 0.26 0 1",
1411
+ values: "0;360;360;"
1412
+ }
1413
+ )
1414
+ ]
1415
+ }
1416
+ ) });
1417
+ };
1418
+ var AnimateLogo_default = AnimateLogo;
1419
+
1420
+ // src/Spinners/OverlaySpinner.tsx
1421
+ import { useEffect as useEffect7, useState as useState7 } from "react";
1422
+ import { createPortal } from "react-dom";
1423
+ import { jsx as jsx35 } from "react/jsx-runtime";
1424
+ var OverlaySpinner = ({ visible }) => {
1425
+ const [mounted, setMounted] = useState7(false);
1426
+ useEffect7(() => setMounted(true), []);
1427
+ if (!mounted) return null;
1428
+ if (!visible) return null;
1429
+ return createPortal(
1430
+ /* @__PURE__ */ jsx35("div", { className: "animate-fade-in", children: /* @__PURE__ */ jsx35("div", { className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center z-50 dark:bg-black/70 bg-white/60", children: /* @__PURE__ */ jsx35("div", { className: "h-44 w-44 overflow-visible", children: /* @__PURE__ */ jsx35(AnimateLogo_default, {}) }) }) }),
1431
+ typeof window !== "undefined" ? document.body : {},
1432
+ "spinner"
1433
+ );
1434
+ };
1435
+ var OverlaySpinner_default = OverlaySpinner;
1436
+
1437
+ // src/constants.tsx
1438
+ var PRIMARY_COLOR2 = "#00b4d8";
1439
+ export {
1440
+ AnimateLogo_default as AnimateLogo,
1441
+ Backdrop_default as Backdrop,
1442
+ BottomAlert_default as BottomAlert,
1443
+ Breakpoint_default as Breakpoint,
1444
+ Button_default as Button,
1445
+ Checkbox_default as Checkbox,
1446
+ CircleProgress_default as CircleProgress,
1447
+ Container_default as Container,
1448
+ ErrorText_default as ErrorText,
1449
+ Fade_default as Fade,
1450
+ FunButton_default as FunButton,
1451
+ FunRoundButton_default as FunRoundButton,
1452
+ IconInfo_default as IconInfo,
1453
+ Modal_default as Modal,
1454
+ NoResults_default as NoResults,
1455
+ NoticeBox_default as NoticeBox,
1456
+ Overlay_default as Overlay,
1457
+ OverlaySpinner_default as OverlaySpinner,
1458
+ PRIMARY_COLOR2 as PRIMARY_COLOR,
1459
+ Pill_default as Pill,
1460
+ ProgressBar_default as ProgressBar,
1461
+ ProgressBarSimple_default as ProgressBarSimple,
1462
+ RadioOption_default as RadioOption,
1463
+ RatingStars_default as RatingStars,
1464
+ ScrollProgress_default as ScrollProgress,
1465
+ Slider_default as Slider,
1466
+ Spinner_default as Spinner,
1467
+ StepsComponent_default as StepsComponent,
1468
+ Tippy_default as Tippy,
1469
+ ToggleSwitch_default as ToggleSwitch,
1470
+ UserContentSwitcher_default as UserContentSwitcher,
1471
+ balsamicSans,
1472
+ baseFieldStyle,
1473
+ createExerciseElementStyle,
1474
+ exerciseDeleteButton,
1475
+ exerciseEditButton,
1476
+ headerButtonClass,
1477
+ headerTippyClass,
1478
+ openSans,
1479
+ parkinsans,
1480
+ tippyClassname,
1481
+ toolbarExerciseButton,
1482
+ ubuntu,
1483
+ xIconButton
1484
+ };