@frequencyads/components 0.1.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.js ADDED
@@ -0,0 +1,1562 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/index.ts
60
+ var index_exports = {};
61
+ __export(index_exports, {
62
+ AnimatedCounter: () => AnimatedCounter,
63
+ AnimatedWaveform: () => AnimatedWaveform,
64
+ AudioPlayer: () => AudioPlayer,
65
+ AudioWaveform: () => AudioWaveform,
66
+ CodeBlock: () => CodeBlock,
67
+ ColorPalette: () => ColorPalette,
68
+ ColorSwatch: () => ColorSwatch,
69
+ Copyable: () => Copyable,
70
+ DosDonts: () => DosDonts,
71
+ ExpandableCard: () => ExpandableCard,
72
+ FadeInSection: () => FadeInSection,
73
+ FrequencyWave: () => FrequencyWave,
74
+ GradientSwatch: () => GradientSwatch,
75
+ Hero: () => Hero,
76
+ HintBadge: () => HintBadge,
77
+ MiniAudioPlayer: () => MiniAudioPlayer,
78
+ PrincipleCard: () => PrincipleCard,
79
+ SpeedDial: () => SpeedDial,
80
+ SplitSection: () => SplitSection,
81
+ VideoBackground: () => VideoBackground
82
+ });
83
+ module.exports = __toCommonJS(index_exports);
84
+
85
+ // src/AnimatedCounter/AnimatedCounter.tsx
86
+ var import_react = require("react");
87
+ var import_core = require("@mantine/core");
88
+ var import_jsx_runtime = require("react/jsx-runtime");
89
+ function AnimatedCounter(_a) {
90
+ var _b = _a, {
91
+ value,
92
+ suffix = "",
93
+ prefix = "",
94
+ duration = 2e3,
95
+ threshold = 0.5,
96
+ abbreviate = true,
97
+ decimals
98
+ } = _b, textProps = __objRest(_b, [
99
+ "value",
100
+ "suffix",
101
+ "prefix",
102
+ "duration",
103
+ "threshold",
104
+ "abbreviate",
105
+ "decimals"
106
+ ]);
107
+ const [count, setCount] = (0, import_react.useState)(0);
108
+ const [hasTriggered, setHasTriggered] = (0, import_react.useState)(false);
109
+ const ref = (0, import_react.useRef)(null);
110
+ (0, import_react.useEffect)(() => {
111
+ const el = ref.current;
112
+ if (!el) return;
113
+ const observer = new IntersectionObserver(
114
+ ([entry]) => {
115
+ if (entry.isIntersecting && !hasTriggered) {
116
+ setHasTriggered(true);
117
+ }
118
+ },
119
+ { threshold }
120
+ );
121
+ observer.observe(el);
122
+ return () => observer.disconnect();
123
+ }, [hasTriggered, threshold]);
124
+ (0, import_react.useEffect)(() => {
125
+ if (!hasTriggered) return;
126
+ let startTime;
127
+ let raf;
128
+ const animate = (timestamp) => {
129
+ if (!startTime) startTime = timestamp;
130
+ const progress = Math.min((timestamp - startTime) / duration, 1);
131
+ const eased = 1 - Math.pow(1 - progress, 3);
132
+ setCount(eased * value);
133
+ if (progress < 1) {
134
+ raf = requestAnimationFrame(animate);
135
+ }
136
+ };
137
+ raf = requestAnimationFrame(animate);
138
+ return () => cancelAnimationFrame(raf);
139
+ }, [hasTriggered, value, duration]);
140
+ const formatValue = () => {
141
+ if (abbreviate && value >= 1e3) {
142
+ const kValue = count / 1e3;
143
+ return kValue % 1 === 0 ? `${Math.round(kValue)}K` : `${kValue.toFixed(1)}K`;
144
+ }
145
+ if (decimals !== void 0) {
146
+ return count.toFixed(decimals);
147
+ }
148
+ if (value !== Math.floor(value)) {
149
+ return count.toFixed(1);
150
+ }
151
+ return Math.round(count).toString();
152
+ };
153
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
154
+ import_core.Text,
155
+ __spreadProps(__spreadValues({
156
+ component: "span",
157
+ ref,
158
+ style: { fontVariantNumeric: "tabular-nums" }
159
+ }, textProps), {
160
+ children: [
161
+ prefix,
162
+ formatValue(),
163
+ suffix
164
+ ]
165
+ })
166
+ );
167
+ }
168
+
169
+ // src/AnimatedWaveform/AnimatedWaveform.tsx
170
+ var import_react2 = require("react");
171
+ var import_framer_motion = require("framer-motion");
172
+
173
+ // src/AnimatedWaveform/AnimatedWaveform.module.css
174
+ var AnimatedWaveform_default = {};
175
+
176
+ // src/AnimatedWaveform/AnimatedWaveform.tsx
177
+ var import_jsx_runtime2 = require("react/jsx-runtime");
178
+ var BAR_COUNT = 140;
179
+ var BAR_WIDTH = 3;
180
+ var BAR_GAP = 10;
181
+ var VIEW_HEIGHT = 150;
182
+ var MIDLINE = VIEW_HEIGHT / 2;
183
+ function AnimatedWaveform({
184
+ barCount = BAR_COUNT,
185
+ duration = 3,
186
+ repeatDelay = 3
187
+ }) {
188
+ const [mounted, setMounted] = (0, import_react2.useState)(false);
189
+ (0, import_react2.useEffect)(() => {
190
+ setMounted(true);
191
+ }, []);
192
+ if (!mounted) return null;
193
+ const viewWidth = barCount * BAR_GAP;
194
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: AnimatedWaveform_default.root, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
195
+ "svg",
196
+ {
197
+ className: AnimatedWaveform_default.svg,
198
+ viewBox: `0 0 ${viewWidth} ${VIEW_HEIGHT}`,
199
+ preserveAspectRatio: "none",
200
+ children: [
201
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("linearGradient", { id: "waveformBarGradient", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "0%", stopColor: "white", stopOpacity: "0" }),
203
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "15%", stopColor: "white", stopOpacity: "0.15" }),
204
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "50%", stopColor: "white", stopOpacity: "0.25" }),
205
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "85%", stopColor: "white", stopOpacity: "0.15" }),
206
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("stop", { offset: "100%", stopColor: "white", stopOpacity: "0" })
207
+ ] }) }),
208
+ [...Array(barCount)].map((_, i) => {
209
+ const x = i * BAR_GAP;
210
+ const baseHeight = 18 + Math.sin(i * 0.4) * 6 + Math.cos(i * 0.7) * 4;
211
+ const staggerDelay = Math.min(i, barCount - 1 - i) * 0.04;
212
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
214
+ import_framer_motion.motion.rect,
215
+ {
216
+ x,
217
+ width: BAR_WIDTH,
218
+ rx: "1.5",
219
+ fill: "url(#waveformBarGradient)",
220
+ initial: { height: baseHeight / 2, y: MIDLINE - baseHeight / 4 },
221
+ animate: {
222
+ height: [baseHeight / 2, baseHeight * 2, baseHeight / 2, baseHeight * 1.2, baseHeight / 2],
223
+ y: [
224
+ MIDLINE - baseHeight / 4,
225
+ MIDLINE - baseHeight,
226
+ MIDLINE - baseHeight / 4,
227
+ MIDLINE - baseHeight * 0.6,
228
+ MIDLINE - baseHeight / 4
229
+ ]
230
+ },
231
+ transition: {
232
+ duration,
233
+ repeat: Infinity,
234
+ ease: "easeInOut",
235
+ delay: staggerDelay,
236
+ repeatDelay
237
+ }
238
+ }
239
+ ),
240
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
241
+ import_framer_motion.motion.rect,
242
+ {
243
+ x,
244
+ y: MIDLINE,
245
+ width: BAR_WIDTH,
246
+ rx: "1.5",
247
+ fill: "url(#waveformBarGradient)",
248
+ initial: { height: baseHeight / 2 },
249
+ animate: {
250
+ height: [baseHeight / 2, baseHeight * 2, baseHeight / 2, baseHeight * 1.2, baseHeight / 2]
251
+ },
252
+ transition: {
253
+ duration,
254
+ repeat: Infinity,
255
+ ease: "easeInOut",
256
+ delay: staggerDelay,
257
+ repeatDelay
258
+ }
259
+ }
260
+ )
261
+ ] }, i);
262
+ })
263
+ ]
264
+ }
265
+ ) });
266
+ }
267
+
268
+ // src/AudioPlayer/AudioPlayer.tsx
269
+ var import_react4 = require("react");
270
+ var import_core3 = require("@mantine/core");
271
+ var import_icons_react = require("@tabler/icons-react");
272
+
273
+ // src/AudioWaveform/AudioWaveform.tsx
274
+ var import_react3 = require("react");
275
+ var import_core2 = require("@mantine/core");
276
+
277
+ // src/AudioWaveform/AudioWaveform.module.css
278
+ var AudioWaveform_default = {};
279
+
280
+ // src/AudioWaveform/AudioWaveform.tsx
281
+ var import_jsx_runtime3 = require("react/jsx-runtime");
282
+ function generateWaveformData(barCount = 100) {
283
+ const data = [];
284
+ for (let i = 0; i < barCount; i++) {
285
+ const progress = i / (barCount - 1);
286
+ const baseHeight = 20 + Math.sin(i * 0.1) * 15;
287
+ const noise = (Math.random() - 0.5) * 20;
288
+ const envelope = Math.sin(progress * Math.PI) * 30;
289
+ const midBoost = progress > 0.2 && progress < 0.8 ? Math.random() * 10 : 0;
290
+ const endTaper = progress < 0.05 || progress > 0.95 ? Math.min(progress / 0.05, (1 - progress) / 0.05) : 1;
291
+ data.push(Math.max(5, Math.min(90, (baseHeight + noise + envelope + midBoost) * endTaper)));
292
+ }
293
+ return data;
294
+ }
295
+ var AudioWaveform = (0, import_react3.forwardRef)(
296
+ ({
297
+ audioRef,
298
+ currentTime = 0,
299
+ onSeek,
300
+ loading = false,
301
+ waveColor = "#CCCCCC",
302
+ progressColor = "#169bde",
303
+ height = 60,
304
+ barWidth = 2,
305
+ barGap = 1
306
+ }, ref) => {
307
+ const containerRef = (0, import_react3.useRef)(null);
308
+ const [waveformData] = (0, import_react3.useState)(() => generateWaveformData());
309
+ const [duration, setDuration] = (0, import_react3.useState)(0);
310
+ const [progress, setProgress] = (0, import_react3.useState)(0);
311
+ (0, import_react3.useImperativeHandle)(ref, () => ({
312
+ seekTo: (time) => {
313
+ if (duration > 0) {
314
+ setProgress(Math.max(0, Math.min(100, time / duration * 100)));
315
+ }
316
+ },
317
+ getCurrentTime: () => progress / 100 * duration,
318
+ getDuration: () => duration
319
+ }));
320
+ (0, import_react3.useEffect)(() => {
321
+ const audio = audioRef.current;
322
+ if (!audio) return;
323
+ const handleMeta = () => {
324
+ if (audio.duration && !isNaN(audio.duration)) setDuration(audio.duration);
325
+ };
326
+ const handleTime = () => {
327
+ if (audio.duration > 0) setProgress(audio.currentTime / audio.duration * 100);
328
+ };
329
+ if (audio.duration && !isNaN(audio.duration)) setDuration(audio.duration);
330
+ audio.addEventListener("loadedmetadata", handleMeta);
331
+ audio.addEventListener("timeupdate", handleTime);
332
+ return () => {
333
+ audio.removeEventListener("loadedmetadata", handleMeta);
334
+ audio.removeEventListener("timeupdate", handleTime);
335
+ };
336
+ }, [audioRef]);
337
+ (0, import_react3.useEffect)(() => {
338
+ if (duration > 0 && typeof currentTime === "number") {
339
+ setProgress(currentTime / duration * 100);
340
+ }
341
+ }, [currentTime, duration]);
342
+ const handleClick = (0, import_react3.useCallback)(
343
+ (e) => {
344
+ if (!containerRef.current || !onSeek || duration === 0) return;
345
+ const rect = containerRef.current.getBoundingClientRect();
346
+ const seekTime = (e.clientX - rect.left) / rect.width * duration;
347
+ onSeek(seekTime);
348
+ },
349
+ [onSeek, duration]
350
+ );
351
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
352
+ import_core2.Box,
353
+ {
354
+ ref: containerRef,
355
+ className: AudioWaveform_default.root,
356
+ style: { height },
357
+ onClick: handleClick,
358
+ children: [
359
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
360
+ "div",
361
+ {
362
+ className: AudioWaveform_default.progressOverlay,
363
+ style: { width: `${progress}%`, backgroundColor: `${progressColor}15` }
364
+ }
365
+ ),
366
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: AudioWaveform_default.bars, style: { gap: barGap }, children: waveformData.map((barHeight, i) => {
367
+ const isActive = i / waveformData.length * 100 <= progress;
368
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
369
+ "div",
370
+ {
371
+ className: AudioWaveform_default.bar,
372
+ style: {
373
+ width: barWidth,
374
+ height: `${barHeight}%`,
375
+ backgroundColor: isActive ? progressColor : waveColor
376
+ }
377
+ },
378
+ i
379
+ );
380
+ }) }),
381
+ loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: AudioWaveform_default.loading, children: "Loading waveform..." })
382
+ ]
383
+ }
384
+ );
385
+ }
386
+ );
387
+ AudioWaveform.displayName = "AudioWaveform";
388
+
389
+ // src/AudioPlayer/AudioPlayer.module.css
390
+ var AudioPlayer_default = {};
391
+
392
+ // src/AudioPlayer/AudioPlayer.tsx
393
+ var import_jsx_runtime4 = require("react/jsx-runtime");
394
+ function formatTime(seconds) {
395
+ const m = Math.floor(seconds / 60);
396
+ const s = Math.floor(seconds % 60);
397
+ return `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
398
+ }
399
+ function AudioPlayer({
400
+ src,
401
+ filename = "audio",
402
+ playButtonColor,
403
+ playButtonSize = 32,
404
+ waveColor = "#D0D0D0",
405
+ progressColor = "#a8a8a8",
406
+ waveHeight = 64,
407
+ barWidth = 3,
408
+ barGap = 2,
409
+ showVolume = true,
410
+ showDownload = true
411
+ }) {
412
+ const audioRef = (0, import_react4.useRef)(null);
413
+ const [isPlaying, setIsPlaying] = (0, import_react4.useState)(false);
414
+ const [currentTime, setCurrentTime] = (0, import_react4.useState)(0);
415
+ const [currentTimeFormatted, setCurrentTimeFormatted] = (0, import_react4.useState)("00:00");
416
+ const [totalDuration, setTotalDuration] = (0, import_react4.useState)("00:00");
417
+ const [volume, setVolume] = (0, import_react4.useState)(50);
418
+ const [prevVolume, setPrevVolume] = (0, import_react4.useState)(50);
419
+ const [isMuted, setIsMuted] = (0, import_react4.useState)(false);
420
+ (0, import_react4.useEffect)(() => {
421
+ const audio = audioRef.current;
422
+ if (!audio) return;
423
+ audio.volume = volume / 100;
424
+ const handleTimeUpdate = () => {
425
+ setCurrentTime(audio.currentTime);
426
+ setCurrentTimeFormatted(formatTime(audio.currentTime));
427
+ };
428
+ const handleMeta = () => setTotalDuration(formatTime(audio.duration));
429
+ const handleEnded = () => {
430
+ setTimeout(() => {
431
+ setCurrentTime(0);
432
+ setCurrentTimeFormatted("00:00");
433
+ setIsPlaying(false);
434
+ }, 500);
435
+ };
436
+ const handlePlay = () => setIsPlaying(true);
437
+ const handlePause = () => setIsPlaying(false);
438
+ audio.addEventListener("timeupdate", handleTimeUpdate);
439
+ audio.addEventListener("loadedmetadata", handleMeta);
440
+ audio.addEventListener("ended", handleEnded);
441
+ audio.addEventListener("play", handlePlay);
442
+ audio.addEventListener("pause", handlePause);
443
+ return () => {
444
+ audio.removeEventListener("timeupdate", handleTimeUpdate);
445
+ audio.removeEventListener("loadedmetadata", handleMeta);
446
+ audio.removeEventListener("ended", handleEnded);
447
+ audio.removeEventListener("play", handlePlay);
448
+ audio.removeEventListener("pause", handlePause);
449
+ };
450
+ }, [src]);
451
+ const togglePlay = (0, import_react4.useCallback)(() => {
452
+ const audio = audioRef.current;
453
+ if (!audio) return;
454
+ if (isPlaying) {
455
+ audio.pause();
456
+ } else {
457
+ audio.play().catch(() => {
458
+ });
459
+ }
460
+ }, [isPlaying]);
461
+ const handleSeek = (0, import_react4.useCallback)((time) => {
462
+ const audio = audioRef.current;
463
+ if (audio && !isNaN(time) && isFinite(time)) {
464
+ audio.currentTime = time;
465
+ setCurrentTime(time);
466
+ setCurrentTimeFormatted(formatTime(time));
467
+ }
468
+ }, []);
469
+ const handleVolumeChange = (0, import_react4.useCallback)(
470
+ (value) => {
471
+ const audio = audioRef.current;
472
+ if (!audio) return;
473
+ audio.volume = value / 100;
474
+ setVolume(value);
475
+ if (value > 0) {
476
+ setPrevVolume(value);
477
+ setIsMuted(false);
478
+ } else {
479
+ setIsMuted(true);
480
+ }
481
+ },
482
+ []
483
+ );
484
+ const toggleMute = (0, import_react4.useCallback)(() => {
485
+ const audio = audioRef.current;
486
+ if (!audio) return;
487
+ if (isMuted) {
488
+ const restore = prevVolume || 50;
489
+ audio.volume = restore / 100;
490
+ setVolume(restore);
491
+ setIsMuted(false);
492
+ } else {
493
+ setPrevVolume(volume);
494
+ audio.volume = 0;
495
+ setVolume(0);
496
+ setIsMuted(true);
497
+ }
498
+ }, [isMuted, volume, prevVolume]);
499
+ const handleDownload = (0, import_react4.useCallback)(() => {
500
+ fetch(src).then((r) => r.blob()).then((blob) => {
501
+ const url = URL.createObjectURL(blob);
502
+ const a = document.createElement("a");
503
+ a.href = url;
504
+ a.download = filename;
505
+ document.body.appendChild(a);
506
+ a.click();
507
+ document.body.removeChild(a);
508
+ URL.revokeObjectURL(url);
509
+ }).catch(() => window.open(src, "_blank"));
510
+ }, [src, filename]);
511
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core3.Group, { gap: "sm", wrap: "nowrap", className: AudioPlayer_default.root, children: [
512
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("audio", { ref: audioRef, src, preload: "metadata" }),
513
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
514
+ import_core3.ActionIcon,
515
+ {
516
+ variant: "filled",
517
+ radius: "xl",
518
+ size: playButtonSize,
519
+ color: playButtonColor,
520
+ onClick: togglePlay,
521
+ "aria-label": isPlaying ? "Pause" : "Play",
522
+ className: AudioPlayer_default.playButton,
523
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons_react.IconPlayerPauseFilled, { size: playButtonSize * 0.5 }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons_react.IconPlayerPlayFilled, { size: playButtonSize * 0.5 })
524
+ }
525
+ ),
526
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core3.Text, { size: "xs", ff: "monospace", c: "dimmed", className: AudioPlayer_default.time, children: currentTimeFormatted }),
527
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core3.Box, { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
528
+ AudioWaveform,
529
+ {
530
+ audioRef,
531
+ currentTime,
532
+ onSeek: handleSeek,
533
+ waveColor,
534
+ progressColor,
535
+ height: waveHeight,
536
+ barWidth,
537
+ barGap
538
+ }
539
+ ) }),
540
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core3.Text, { size: "xs", ff: "monospace", c: "dimmed", className: AudioPlayer_default.time, children: totalDuration }),
541
+ showVolume && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_core3.Group, { gap: 4, wrap: "nowrap", className: AudioPlayer_default.volumeGroup, children: [
542
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
543
+ import_core3.ActionIcon,
544
+ {
545
+ variant: "subtle",
546
+ size: "sm",
547
+ onClick: toggleMute,
548
+ "aria-label": isMuted ? "Unmute" : "Mute",
549
+ children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons_react.IconVolumeOff, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons_react.IconVolume, { size: 16 })
550
+ }
551
+ ),
552
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
553
+ import_core3.Slider,
554
+ {
555
+ value: volume,
556
+ onChange: handleVolumeChange,
557
+ size: "xs",
558
+ w: 80,
559
+ "aria-label": "Volume"
560
+ }
561
+ )
562
+ ] }),
563
+ showDownload && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_core3.ActionIcon, { variant: "subtle", size: "sm", onClick: handleDownload, "aria-label": "Download", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons_react.IconDownload, { size: 16 }) })
564
+ ] });
565
+ }
566
+
567
+ // src/CodeBlock/CodeBlock.tsx
568
+ var import_react5 = require("react");
569
+ var import_core4 = require("@mantine/core");
570
+
571
+ // src/CodeBlock/CodeBlock.module.css
572
+ var CodeBlock_default = {};
573
+
574
+ // src/CodeBlock/CodeBlock.tsx
575
+ var import_jsx_runtime5 = require("react/jsx-runtime");
576
+ function CodeBlock({ code, filename, height = 384 }) {
577
+ const [copied, setCopied] = (0, import_react5.useState)(false);
578
+ const handleCopy = (0, import_react5.useCallback)(async () => {
579
+ try {
580
+ await navigator.clipboard.writeText(code);
581
+ setCopied(true);
582
+ setTimeout(() => setCopied(false), 2e3);
583
+ } catch (e) {
584
+ }
585
+ }, [code]);
586
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core4.Box, { className: CodeBlock_default.root, children: [
587
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_core4.Group, { justify: "space-between", mb: "xs", children: [
588
+ filename && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_core4.Text, { size: "sm", fw: 500, c: "dimmed", children: filename }),
589
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
590
+ import_core4.Button,
591
+ {
592
+ size: "xs",
593
+ radius: "md",
594
+ color: copied ? "green" : "blue",
595
+ onClick: handleCopy,
596
+ children: copied ? "Copied!" : "Copy"
597
+ }
598
+ )
599
+ ] }),
600
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
601
+ "textarea",
602
+ {
603
+ readOnly: true,
604
+ value: code,
605
+ className: CodeBlock_default.textarea,
606
+ style: { height }
607
+ }
608
+ )
609
+ ] });
610
+ }
611
+
612
+ // src/ColorPalette/ColorPalette.tsx
613
+ var import_core6 = require("@mantine/core");
614
+
615
+ // src/Copyable/Copyable.tsx
616
+ var import_react6 = require("react");
617
+ var import_core5 = require("@mantine/core");
618
+
619
+ // src/Copyable/Copyable.module.css
620
+ var Copyable_default = {};
621
+
622
+ // src/Copyable/Copyable.tsx
623
+ var import_jsx_runtime6 = require("react/jsx-runtime");
624
+ function Copyable({ value, children }) {
625
+ const [toast, setToast] = (0, import_react6.useState)(null);
626
+ const handleCopy = (0, import_react6.useCallback)(() => {
627
+ navigator.clipboard.writeText(value).then(() => {
628
+ setToast(`Copied ${value}`);
629
+ setTimeout(() => setToast(null), 1800);
630
+ });
631
+ }, [value]);
632
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
633
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
634
+ "span",
635
+ {
636
+ onClick: handleCopy,
637
+ className: Copyable_default.root,
638
+ title: `Click to copy ${value}`,
639
+ children
640
+ }
641
+ ),
642
+ toast && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
643
+ import_core5.Notification,
644
+ {
645
+ withCloseButton: false,
646
+ className: Copyable_default.toast,
647
+ color: "blue",
648
+ children: toast
649
+ }
650
+ ) })
651
+ ] });
652
+ }
653
+
654
+ // src/ColorPalette/ColorPalette.module.css
655
+ var ColorPalette_default = {};
656
+
657
+ // src/ColorPalette/ColorPalette.tsx
658
+ var import_jsx_runtime7 = require("react/jsx-runtime");
659
+ function ColorPalette({ name, shades, mainIndex = 5 }) {
660
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: ColorPalette_default.root, children: [
661
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Title, { order: 4, size: "lg", tt: "capitalize", mb: "xs", children: name }),
662
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.SimpleGrid, { cols: 10, spacing: 4, children: shades.map((hex, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Copyable, { value: hex, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: ColorPalette_default.shade, children: [
663
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
664
+ "div",
665
+ {
666
+ className: `${ColorPalette_default.color} ${i === mainIndex ? ColorPalette_default.main : ""}`,
667
+ style: { backgroundColor: hex }
668
+ }
669
+ ),
670
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Text, { size: "xs", c: "dimmed", ta: "center", mt: 4, children: i }),
671
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core6.Text, { size: "xs", c: "dimmed", ta: "center", ff: "monospace", children: hex })
672
+ ] }) }, i)) })
673
+ ] });
674
+ }
675
+
676
+ // src/ColorSwatch/ColorSwatch.tsx
677
+ var import_core7 = require("@mantine/core");
678
+
679
+ // src/ColorSwatch/ColorSwatch.module.css
680
+ var ColorSwatch_default = {};
681
+
682
+ // src/ColorSwatch/ColorSwatch.tsx
683
+ var import_jsx_runtime8 = require("react/jsx-runtime");
684
+ function ColorSwatch({ name, hex, label }) {
685
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Copyable, { value: hex, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core7.Paper, { className: ColorSwatch_default.root, shadow: "lg", radius: "md", withBorder: false, children: [
686
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: ColorSwatch_default.preview, style: { backgroundColor: hex } }),
687
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: ColorSwatch_default.info, children: [
688
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Text, { fw: 600, size: "sm", children: name }),
689
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Text, { size: "xs", c: "dimmed", ff: "monospace", children: hex }),
690
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core7.Text, { size: "xs", c: "dimmed", children: label })
691
+ ] })
692
+ ] }) });
693
+ }
694
+
695
+ // src/DosDonts/DosDonts.tsx
696
+ var import_core8 = require("@mantine/core");
697
+ var import_icons_react2 = require("@tabler/icons-react");
698
+
699
+ // src/DosDonts/DosDonts.module.css
700
+ var DosDonts_default = {};
701
+
702
+ // src/DosDonts/DosDonts.tsx
703
+ var import_jsx_runtime9 = require("react/jsx-runtime");
704
+ function DosDonts({ items }) {
705
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: DosDonts_default.root, children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.SimpleGrid, { cols: { base: 1, sm: 2 }, spacing: "md", children: [
706
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Paper, { className: DosDonts_default.dont, p: "md", radius: "md", children: [
707
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { gap: 6, mb: 6, children: [
708
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react2.IconX, { size: 16, className: DosDonts_default.dontIcon }),
709
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", fw: 600, className: DosDonts_default.dontLabel, children: "Don't" })
710
+ ] }),
711
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", children: item.dont })
712
+ ] }),
713
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Paper, { className: DosDonts_default.do, p: "md", radius: "md", children: [
714
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core8.Group, { gap: 6, mb: 6, children: [
715
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react2.IconCheck, { size: 16, className: DosDonts_default.doIcon }),
716
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", fw: 600, className: DosDonts_default.doLabel, children: "Do" })
717
+ ] }),
718
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core8.Text, { size: "sm", children: item.do })
719
+ ] })
720
+ ] }, i)) });
721
+ }
722
+
723
+ // src/ExpandableCard/ExpandableCard.tsx
724
+ var import_react7 = require("react");
725
+ var import_core9 = require("@mantine/core");
726
+ var import_framer_motion2 = require("framer-motion");
727
+
728
+ // src/ExpandableCard/ExpandableCard.module.css
729
+ var ExpandableCard_default = {};
730
+
731
+ // src/ExpandableCard/ExpandableCard.tsx
732
+ var import_jsx_runtime10 = require("react/jsx-runtime");
733
+ function ExpandableCard({
734
+ title,
735
+ description,
736
+ expandedContent,
737
+ icon: Icon,
738
+ color = "blue",
739
+ iconSize = "lg",
740
+ collapsedHeight = 120,
741
+ threshold = 0.5,
742
+ delay = 300,
743
+ expanded: controlledExpanded,
744
+ onExpandedChange
745
+ }) {
746
+ const ref = (0, import_react7.useRef)(null);
747
+ const [internalExpanded, setInternalExpanded] = (0, import_react7.useState)(false);
748
+ const isControlled = controlledExpanded !== void 0;
749
+ const isExpanded = isControlled ? controlledExpanded : internalExpanded;
750
+ (0, import_react7.useEffect)(() => {
751
+ if (isControlled) return;
752
+ const el = ref.current;
753
+ if (!el) return;
754
+ const observer = new IntersectionObserver(
755
+ ([entry]) => {
756
+ if (entry.isIntersecting) {
757
+ setTimeout(() => {
758
+ setInternalExpanded(true);
759
+ onExpandedChange == null ? void 0 : onExpandedChange(true);
760
+ }, delay);
761
+ }
762
+ },
763
+ { threshold }
764
+ );
765
+ observer.observe(el);
766
+ return () => observer.disconnect();
767
+ }, [isControlled, threshold, delay, onExpandedChange]);
768
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
769
+ import_core9.Paper,
770
+ __spreadProps(__spreadValues({
771
+ ref,
772
+ radius: 4,
773
+ className: ExpandableCard_default.root,
774
+ component: import_framer_motion2.motion.div
775
+ }, {
776
+ animate: { height: isExpanded ? "auto" : collapsedHeight },
777
+ transition: { duration: 0.5, ease: "easeOut" }
778
+ }), {
779
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: ExpandableCard_default.inner, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Group, { align: "flex-start", justify: "space-between", gap: "lg", wrap: "nowrap", children: [
780
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core9.Stack, { gap: "xs", style: { flex: 1 }, children: [
781
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { fw: 700, size: "xl", lh: 1.3, children: title }),
782
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "md", c: "dimmed", children: description }),
783
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
784
+ import_framer_motion2.motion.div,
785
+ {
786
+ initial: { opacity: 0, height: 0 },
787
+ animate: {
788
+ opacity: isExpanded ? 1 : 0,
789
+ height: isExpanded ? "auto" : 0
790
+ },
791
+ transition: { duration: 0.4, delay: 0.2 },
792
+ style: { overflow: "hidden" },
793
+ children: typeof expandedContent === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.Text, { size: "sm", c: "dimmed", mt: "sm", children: expandedContent }) : expandedContent
794
+ }
795
+ )
796
+ ] }),
797
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
798
+ import_framer_motion2.motion.div,
799
+ {
800
+ animate: { scale: isExpanded ? 1.1 : 1 },
801
+ transition: { duration: 0.3 },
802
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core9.ThemeIcon, { size: iconSize, radius: 4, color, variant: "filled", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { size: 20, stroke: 1.5 }) })
803
+ }
804
+ )
805
+ ] }) })
806
+ })
807
+ );
808
+ }
809
+
810
+ // src/FadeInSection/FadeInSection.tsx
811
+ var import_react8 = require("react");
812
+ var import_core10 = require("@mantine/core");
813
+
814
+ // src/FadeInSection/FadeInSection.module.css
815
+ var FadeInSection_default = {};
816
+
817
+ // src/FadeInSection/FadeInSection.tsx
818
+ var import_jsx_runtime11 = require("react/jsx-runtime");
819
+ function FadeInSection(_a) {
820
+ var _b = _a, {
821
+ children,
822
+ delay = 0,
823
+ threshold = 0.1,
824
+ className
825
+ } = _b, props = __objRest(_b, [
826
+ "children",
827
+ "delay",
828
+ "threshold",
829
+ "className"
830
+ ]);
831
+ const ref = (0, import_react8.useRef)(null);
832
+ const [isVisible, setIsVisible] = (0, import_react8.useState)(false);
833
+ (0, import_react8.useEffect)(() => {
834
+ const el = ref.current;
835
+ if (!el) return;
836
+ const observer = new IntersectionObserver(
837
+ ([entry]) => {
838
+ if (entry.isIntersecting) {
839
+ if (delay > 0) {
840
+ setTimeout(() => setIsVisible(true), delay);
841
+ } else {
842
+ setIsVisible(true);
843
+ }
844
+ }
845
+ },
846
+ { threshold }
847
+ );
848
+ observer.observe(el);
849
+ return () => observer.disconnect();
850
+ }, [delay, threshold]);
851
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
852
+ import_core10.Box,
853
+ __spreadProps(__spreadValues({
854
+ ref,
855
+ className: `${FadeInSection_default.root} ${isVisible ? FadeInSection_default.visible : ""} ${className != null ? className : ""}`
856
+ }, props), {
857
+ children
858
+ })
859
+ );
860
+ }
861
+
862
+ // src/FrequencyWave/FrequencyWave.tsx
863
+ var import_react9 = require("react");
864
+ var import_core11 = require("@mantine/core");
865
+ var import_jsx_runtime12 = require("react/jsx-runtime");
866
+ function FrequencyWave({ isActive = false, height = 60 }) {
867
+ const canvasRef = (0, import_react9.useRef)(null);
868
+ const animationRef = (0, import_react9.useRef)(void 0);
869
+ const [isPulsing, setIsPulsing] = (0, import_react9.useState)(false);
870
+ const lastPulseRef = (0, import_react9.useRef)(null);
871
+ const randomSpikeRef = (0, import_react9.useRef)(null);
872
+ const { colorScheme } = (0, import_core11.useMantineColorScheme)();
873
+ const isDark = colorScheme === "dark";
874
+ const colors = {
875
+ start: isDark ? "#7950F2" : "#9775FA",
876
+ mid: isDark ? "#BE4BDB" : "#DA77F2",
877
+ end: isDark ? "#15AABF" : "#22B8CF"
878
+ };
879
+ const drawWave = (0, import_react9.useCallback)(
880
+ (ctx, width, canvasHeight, time) => {
881
+ var _a;
882
+ ctx.clearRect(0, 0, width, canvasHeight);
883
+ const isAnimating = isActive || isPulsing;
884
+ const waveY = canvasHeight * 0.65;
885
+ const baseAmplitude = isActive ? 5 : isPulsing ? 7 : 1.5;
886
+ if (isAnimating) {
887
+ if (randomSpikeRef.current === null) {
888
+ randomSpikeRef.current = Math.random();
889
+ }
890
+ if (Math.floor(time / 500) !== Math.floor((time - 16) / 500)) {
891
+ randomSpikeRef.current = Math.random();
892
+ }
893
+ }
894
+ const gradient = ctx.createLinearGradient(0, 0, width, 0);
895
+ gradient.addColorStop(0, colors.start);
896
+ gradient.addColorStop(0.5, colors.mid);
897
+ gradient.addColorStop(1, colors.end);
898
+ ctx.strokeStyle = gradient;
899
+ ctx.lineWidth = isAnimating ? 2.5 : 1.5;
900
+ ctx.lineCap = "round";
901
+ ctx.lineJoin = "round";
902
+ if (isAnimating) {
903
+ ctx.shadowColor = colors.mid;
904
+ ctx.shadowBlur = isPulsing ? 12 : 8;
905
+ } else {
906
+ ctx.shadowBlur = 0;
907
+ }
908
+ ctx.beginPath();
909
+ const segments = 300;
910
+ const segmentWidth = width / segments;
911
+ const speed = isActive ? 0.02 : isPulsing ? 0.025 : 3e-3;
912
+ for (let i = 0; i <= segments; i++) {
913
+ const x = i * segmentWidth;
914
+ const normalizedX = x / width;
915
+ let y = waveY;
916
+ if (isAnimating) {
917
+ const wave1 = Math.sin(normalizedX * Math.PI * 6 + time * speed) * baseAmplitude;
918
+ const wave2 = Math.sin(normalizedX * Math.PI * 12 + time * speed * 1.3) * (baseAmplitude * 0.4);
919
+ const wave3 = Math.sin(normalizedX * Math.PI * 18 + time * speed * 0.8) * (baseAmplitude * 0.2);
920
+ const spikePosition = (_a = randomSpikeRef.current) != null ? _a : 0.5;
921
+ const distToSpike = Math.abs(normalizedX - spikePosition);
922
+ const spikeAmplitude = distToSpike < 0.15 ? (1 - distToSpike / 0.15) * baseAmplitude * 1 : 0;
923
+ const spikeWave = Math.sin(normalizedX * Math.PI * 20 + time * speed * 2) * spikeAmplitude;
924
+ let aggressiveWave = 0;
925
+ if (isPulsing) {
926
+ aggressiveWave = Math.sin(normalizedX * Math.PI * 30 + time * 0.03) * baseAmplitude * 0.4;
927
+ aggressiveWave += Math.sin(normalizedX * Math.PI * 8 + time * 0.015) * baseAmplitude * 0.5;
928
+ }
929
+ const combinedWave = wave1 + wave2 + wave3 + spikeWave + aggressiveWave;
930
+ const envelope = Math.sin(normalizedX * Math.PI);
931
+ y = waveY + combinedWave * envelope;
932
+ } else {
933
+ y += Math.sin(normalizedX * Math.PI * 2 + time * speed) * baseAmplitude;
934
+ }
935
+ if (i === 0) {
936
+ ctx.moveTo(x, y);
937
+ } else {
938
+ ctx.lineTo(x, y);
939
+ }
940
+ }
941
+ ctx.stroke();
942
+ if (isActive) {
943
+ const barCount = 80;
944
+ const barWidth = 2;
945
+ const barGap = width / barCount;
946
+ const maxBarHeight = 16;
947
+ ctx.shadowBlur = 3;
948
+ for (let i = 0; i < barCount; i++) {
949
+ const x = i * barGap + barGap / 2;
950
+ const normalizedX = x / width;
951
+ const baseBarHeight = Math.sin(normalizedX * Math.PI * 8 + time * 0.025) * 0.5 + Math.sin(normalizedX * Math.PI * 14 + time * 0.018) * 0.3 + Math.sin(normalizedX * Math.PI * 4 + time * 0.03) * 0.2;
952
+ const envelope = Math.sin(normalizedX * Math.PI);
953
+ const barHeight = Math.abs(baseBarHeight) * maxBarHeight * envelope;
954
+ const barGradient = ctx.createLinearGradient(
955
+ x,
956
+ waveY - barHeight / 2,
957
+ x,
958
+ waveY + barHeight / 2
959
+ );
960
+ barGradient.addColorStop(0, colors.start + "90");
961
+ barGradient.addColorStop(0.5, colors.mid + "70");
962
+ barGradient.addColorStop(1, colors.end + "50");
963
+ ctx.fillStyle = barGradient;
964
+ ctx.fillRect(x - barWidth / 2, waveY - barHeight / 2, barWidth, barHeight);
965
+ }
966
+ }
967
+ if (isPulsing) {
968
+ const particleCount = 15;
969
+ for (let i = 0; i < particleCount; i++) {
970
+ const px = (Math.sin(time * 1e-3 + i * 1.5) * 0.5 + 0.5) * width;
971
+ const py = waveY + Math.sin(time * 2e-3 + i) * 8;
972
+ const radius = 1.5 + Math.sin(time * 3e-3 + i * 2) * 0.5;
973
+ ctx.beginPath();
974
+ ctx.arc(px, py, radius, 0, Math.PI * 2);
975
+ ctx.fillStyle = i % 2 === 0 ? colors.start + "80" : colors.end + "80";
976
+ ctx.fill();
977
+ }
978
+ }
979
+ },
980
+ [isActive, isPulsing, colors.start, colors.mid, colors.end]
981
+ );
982
+ (0, import_react9.useEffect)(() => {
983
+ const canvas = canvasRef.current;
984
+ if (!canvas) return;
985
+ const ctx = canvas.getContext("2d");
986
+ if (!ctx) return;
987
+ const updateSize = () => {
988
+ const dpr = window.devicePixelRatio || 1;
989
+ const rect = canvas.getBoundingClientRect();
990
+ canvas.width = rect.width * dpr;
991
+ canvas.height = rect.height * dpr;
992
+ ctx.scale(dpr, dpr);
993
+ };
994
+ updateSize();
995
+ window.addEventListener("resize", updateSize);
996
+ const startTime = performance.now();
997
+ const animate = (currentTime) => {
998
+ const elapsed = currentTime - startTime;
999
+ const rect = canvas.getBoundingClientRect();
1000
+ drawWave(ctx, rect.width, rect.height, elapsed);
1001
+ animationRef.current = requestAnimationFrame(animate);
1002
+ };
1003
+ animationRef.current = requestAnimationFrame(animate);
1004
+ return () => {
1005
+ window.removeEventListener("resize", updateSize);
1006
+ if (animationRef.current) {
1007
+ cancelAnimationFrame(animationRef.current);
1008
+ }
1009
+ };
1010
+ }, [drawWave]);
1011
+ (0, import_react9.useEffect)(() => {
1012
+ if (isActive) {
1013
+ queueMicrotask(() => setIsPulsing(false));
1014
+ lastPulseRef.current = Date.now();
1015
+ return;
1016
+ }
1017
+ const checkForPulse = () => {
1018
+ const now = Date.now();
1019
+ if (lastPulseRef.current === null) {
1020
+ lastPulseRef.current = now;
1021
+ }
1022
+ const timeSinceLastPulse = now - lastPulseRef.current;
1023
+ const pulseInterval = 12e4 + Math.random() * 6e4;
1024
+ if (timeSinceLastPulse >= pulseInterval && !isPulsing) {
1025
+ setIsPulsing(true);
1026
+ lastPulseRef.current = now;
1027
+ setTimeout(() => setIsPulsing(false), 4e3);
1028
+ }
1029
+ };
1030
+ const intervalId = setInterval(checkForPulse, 5e3);
1031
+ return () => clearInterval(intervalId);
1032
+ }, [isActive, isPulsing]);
1033
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1034
+ import_core11.Box,
1035
+ {
1036
+ style: {
1037
+ position: "relative",
1038
+ width: "100%",
1039
+ height,
1040
+ overflow: "hidden",
1041
+ pointerEvents: "none",
1042
+ opacity: isDark ? 1 : 0.8
1043
+ },
1044
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1045
+ "canvas",
1046
+ {
1047
+ ref: canvasRef,
1048
+ style: {
1049
+ width: "100%",
1050
+ height: "100%",
1051
+ display: "block"
1052
+ }
1053
+ }
1054
+ )
1055
+ }
1056
+ );
1057
+ }
1058
+
1059
+ // src/GradientSwatch/GradientSwatch.tsx
1060
+ var import_core12 = require("@mantine/core");
1061
+
1062
+ // src/GradientSwatch/GradientSwatch.module.css
1063
+ var GradientSwatch_default = {};
1064
+
1065
+ // src/GradientSwatch/GradientSwatch.tsx
1066
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1067
+ function GradientSwatch({ name, colors, description }) {
1068
+ const css = `linear-gradient(135deg, ${colors[0]} 0%, ${colors[1]} 100%)`;
1069
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Copyable, { value: css, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Paper, { className: GradientSwatch_default.root, shadow: "lg", radius: "md", children: [
1070
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: GradientSwatch_default.preview, style: { background: css } }),
1071
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: GradientSwatch_default.info, children: [
1072
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { fw: 600, size: "sm", children: name }),
1073
+ description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "xs", c: "dimmed", children: description }),
1074
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Text, { size: "xs", c: "dimmed", ff: "monospace", children: [
1075
+ colors[0],
1076
+ " \u2192 ",
1077
+ colors[1]
1078
+ ] })
1079
+ ] })
1080
+ ] }) });
1081
+ }
1082
+
1083
+ // src/Hero/Hero.tsx
1084
+ var import_core13 = require("@mantine/core");
1085
+ var import_frequency_mark_white = __toESM(require("@frequencyads/brand/assets/frequency-mark-white.svg"));
1086
+ var import_colors = require("@frequencyads/brand/colors");
1087
+
1088
+ // src/VideoBackground/VideoBackground.module.css
1089
+ var VideoBackground_default = {};
1090
+
1091
+ // src/VideoBackground/VideoBackground.tsx
1092
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1093
+ function VideoBackground({ src, opacity = 0.3 }) {
1094
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1095
+ "video",
1096
+ {
1097
+ autoPlay: true,
1098
+ muted: true,
1099
+ loop: true,
1100
+ playsInline: true,
1101
+ className: VideoBackground_default.root,
1102
+ style: { opacity },
1103
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("source", { src, type: "video/mp4" })
1104
+ }
1105
+ );
1106
+ }
1107
+
1108
+ // src/Hero/Hero.module.css
1109
+ var Hero_default = {};
1110
+
1111
+ // src/Hero/Hero.tsx
1112
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1113
+ function Hero({
1114
+ variant = "logo",
1115
+ heading,
1116
+ tagline,
1117
+ logoSrc = import_frequency_mark_white.default,
1118
+ gradient: gradientName = "frequencyAlive",
1119
+ shimmer = true,
1120
+ primaryAction,
1121
+ secondaryAction,
1122
+ backgroundVideoSrc,
1123
+ showWaveform
1124
+ }) {
1125
+ const resolvedHeading = heading != null ? heading : variant === "text" ? "Frequency" : void 0;
1126
+ const hasActions = primaryAction || secondaryAction;
1127
+ const waveformVisible = showWaveform != null ? showWaveform : true;
1128
+ const grad = import_colors.gradients[gradientName];
1129
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Box, { className: Hero_default.root, children: [
1130
+ backgroundVideoSrc && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VideoBackground, { src: backgroundVideoSrc }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Stack, { className: Hero_default.content, align: "center", gap: "lg", children: [
1132
+ variant === "logo" && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: Hero_default.logoWrapper, children: [
1133
+ waveformVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AnimatedWaveform, {}),
1134
+ waveformVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Hero_default.vignette }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1136
+ import_core13.Image,
1137
+ {
1138
+ src: logoSrc,
1139
+ alt: resolvedHeading != null ? resolvedHeading : "Frequency",
1140
+ className: Hero_default.logo,
1141
+ fit: "contain"
1142
+ }
1143
+ ),
1144
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Hero_default.glow })
1145
+ ] }),
1146
+ variant === "text" && resolvedHeading && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: Hero_default.textWrapper, children: [
1147
+ waveformVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AnimatedWaveform, {}),
1148
+ waveformVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: Hero_default.vignette }),
1149
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1150
+ import_core13.Title,
1151
+ {
1152
+ order: 1,
1153
+ className: `${Hero_default.heading} ${shimmer ? Hero_default.shimmer : ""}`,
1154
+ style: {
1155
+ backgroundImage: `linear-gradient(135deg, ${grad.from}, ${grad.to}, ${grad.from})`,
1156
+ backgroundSize: shimmer ? "200% 100%" : void 0
1157
+ },
1158
+ children: resolvedHeading
1159
+ }
1160
+ )
1161
+ ] }),
1162
+ tagline && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_core13.Text, { className: Hero_default.tagline, children: tagline }),
1163
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_core13.Group, { gap: "md", justify: "center", wrap: "wrap", children: [
1164
+ primaryAction && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1165
+ import_core13.Button,
1166
+ {
1167
+ component: "a",
1168
+ href: primaryAction.href,
1169
+ size: "lg",
1170
+ radius: 4,
1171
+ className: Hero_default.primaryButton,
1172
+ children: primaryAction.label
1173
+ }
1174
+ ),
1175
+ secondaryAction && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1176
+ import_core13.Button,
1177
+ {
1178
+ component: "a",
1179
+ href: secondaryAction.href,
1180
+ size: "lg",
1181
+ radius: 4,
1182
+ variant: "outline",
1183
+ className: Hero_default.secondaryButton,
1184
+ children: secondaryAction.label
1185
+ }
1186
+ )
1187
+ ] })
1188
+ ] })
1189
+ ] });
1190
+ }
1191
+
1192
+ // src/HintBadge/HintBadge.tsx
1193
+ var import_core14 = require("@mantine/core");
1194
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1195
+ function HintBadge({ variant, children }) {
1196
+ const isDo = variant === "do";
1197
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1198
+ import_core14.Badge,
1199
+ {
1200
+ variant: "light",
1201
+ color: isDo ? "green" : "red",
1202
+ size: "lg",
1203
+ radius: "sm",
1204
+ styles: {
1205
+ root: { textTransform: "none", fontWeight: 400 },
1206
+ label: { whiteSpace: "normal", lineHeight: 1.4 }
1207
+ },
1208
+ children: [
1209
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("strong", { children: [
1210
+ isDo ? "Do" : "Don't",
1211
+ ":"
1212
+ ] }),
1213
+ " ",
1214
+ children
1215
+ ]
1216
+ }
1217
+ );
1218
+ }
1219
+
1220
+ // src/MiniAudioPlayer/MiniAudioPlayer.tsx
1221
+ var import_react10 = require("react");
1222
+ var import_core15 = require("@mantine/core");
1223
+ var import_icons_react3 = require("@tabler/icons-react");
1224
+
1225
+ // src/MiniAudioPlayer/MiniAudioPlayer.module.css
1226
+ var MiniAudioPlayer_default = {};
1227
+
1228
+ // src/MiniAudioPlayer/MiniAudioPlayer.tsx
1229
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1230
+ var SIZE_CONFIG = {
1231
+ mini: { height: 24, buttonSize: 20, iconSize: 14, waveHeight: 16, barWidth: 1, barGap: 0 },
1232
+ small: { height: 32, buttonSize: 28, iconSize: 16, waveHeight: 20, barWidth: 1, barGap: 0 },
1233
+ compact: { height: 40, buttonSize: 32, iconSize: 18, waveHeight: 24, barWidth: 2, barGap: 1 }
1234
+ };
1235
+ var MiniAudioPlayer = (0, import_react10.forwardRef)(
1236
+ ({
1237
+ audioUrl,
1238
+ size = "mini",
1239
+ waveColor = "#CCCCCC",
1240
+ progressColor = "#169bde",
1241
+ onPlay,
1242
+ onPause,
1243
+ className,
1244
+ style
1245
+ }, ref) => {
1246
+ const audioRef = (0, import_react10.useRef)(null);
1247
+ const [isPlaying, setIsPlaying] = (0, import_react10.useState)(false);
1248
+ const [currentTime, setCurrentTime] = (0, import_react10.useState)(0);
1249
+ const config = SIZE_CONFIG[size];
1250
+ (0, import_react10.useEffect)(() => {
1251
+ const audio = audioRef.current;
1252
+ if (!audio) return;
1253
+ const handleTimeUpdate = () => setCurrentTime(audio.currentTime);
1254
+ const handleEnded = () => {
1255
+ setIsPlaying(false);
1256
+ setCurrentTime(0);
1257
+ };
1258
+ const handlePause = () => setIsPlaying(false);
1259
+ const handlePlay = () => setIsPlaying(true);
1260
+ audio.addEventListener("timeupdate", handleTimeUpdate);
1261
+ audio.addEventListener("ended", handleEnded);
1262
+ audio.addEventListener("pause", handlePause);
1263
+ audio.addEventListener("play", handlePlay);
1264
+ return () => {
1265
+ audio.removeEventListener("timeupdate", handleTimeUpdate);
1266
+ audio.removeEventListener("ended", handleEnded);
1267
+ audio.removeEventListener("pause", handlePause);
1268
+ audio.removeEventListener("play", handlePlay);
1269
+ };
1270
+ }, [audioUrl]);
1271
+ const handlePlayPause = (0, import_react10.useCallback)(() => {
1272
+ const audio = audioRef.current;
1273
+ if (!audio) return;
1274
+ if (isPlaying) {
1275
+ audio.pause();
1276
+ onPause == null ? void 0 : onPause();
1277
+ } else {
1278
+ audio.play().catch(() => {
1279
+ });
1280
+ onPlay == null ? void 0 : onPlay();
1281
+ }
1282
+ }, [isPlaying, onPlay, onPause]);
1283
+ const handleSeek = (0, import_react10.useCallback)((time) => {
1284
+ const audio = audioRef.current;
1285
+ if (audio && !isNaN(time) && isFinite(time)) {
1286
+ audio.currentTime = time;
1287
+ setCurrentTime(time);
1288
+ }
1289
+ }, []);
1290
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1291
+ import_core15.Group,
1292
+ {
1293
+ ref,
1294
+ gap: size === "mini" ? 6 : size === "small" ? 8 : 10,
1295
+ wrap: "nowrap",
1296
+ className: `${MiniAudioPlayer_default.root} ${className != null ? className : ""}`,
1297
+ style: __spreadValues({ height: config.height }, style),
1298
+ children: [
1299
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("audio", { ref: audioRef, src: audioUrl, preload: "metadata" }),
1300
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1301
+ import_core15.ActionIcon,
1302
+ {
1303
+ variant: "filled",
1304
+ color: "blue",
1305
+ radius: "xl",
1306
+ size: config.buttonSize,
1307
+ onClick: handlePlayPause,
1308
+ "aria-label": isPlaying ? "Pause" : "Play",
1309
+ className: MiniAudioPlayer_default.playButton,
1310
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react3.IconPlayerPauseFilled, { size: config.iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_react3.IconPlayerPlayFilled, { size: config.iconSize })
1311
+ }
1312
+ ),
1313
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core15.Box, { style: { flex: 1, minWidth: 80 }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1314
+ AudioWaveform,
1315
+ {
1316
+ audioRef,
1317
+ currentTime,
1318
+ onSeek: handleSeek,
1319
+ waveColor,
1320
+ progressColor,
1321
+ height: config.waveHeight,
1322
+ barWidth: config.barWidth,
1323
+ barGap: config.barGap
1324
+ }
1325
+ ) })
1326
+ ]
1327
+ }
1328
+ );
1329
+ }
1330
+ );
1331
+ MiniAudioPlayer.displayName = "MiniAudioPlayer";
1332
+
1333
+ // src/PrincipleCard/PrincipleCard.tsx
1334
+ var import_core16 = require("@mantine/core");
1335
+
1336
+ // src/PrincipleCard/PrincipleCard.module.css
1337
+ var PrincipleCard_default = {};
1338
+
1339
+ // src/PrincipleCard/PrincipleCard.tsx
1340
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1341
+ function PrincipleCard({
1342
+ accentColor,
1343
+ title,
1344
+ description,
1345
+ doHint,
1346
+ dontHint
1347
+ }) {
1348
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1349
+ import_core16.Paper,
1350
+ {
1351
+ className: PrincipleCard_default.root,
1352
+ p: "lg",
1353
+ radius: "md",
1354
+ style: { borderLeftColor: accentColor },
1355
+ children: [
1356
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Title, { order: 3, size: "h4", mb: "xs", children: title }),
1357
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_core16.Text, { c: "dimmed", children: description }),
1358
+ (doHint || dontHint) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_core16.Group, { gap: "sm", mt: "md", wrap: "wrap", children: [
1359
+ doHint && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HintBadge, { variant: "do", children: doHint }),
1360
+ dontHint && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HintBadge, { variant: "dont", children: dontHint })
1361
+ ] })
1362
+ ]
1363
+ }
1364
+ );
1365
+ }
1366
+
1367
+ // src/SpeedDial/SpeedDial.tsx
1368
+ var import_react11 = require("react");
1369
+ var import_core17 = require("@mantine/core");
1370
+ var import_icons_react4 = require("@tabler/icons-react");
1371
+
1372
+ // src/SpeedDial/SpeedDial.module.css
1373
+ var SpeedDial_default = {};
1374
+
1375
+ // src/SpeedDial/SpeedDial.tsx
1376
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1377
+ function SpeedDial({
1378
+ actions,
1379
+ icon,
1380
+ openIcon,
1381
+ direction = "up",
1382
+ color = "blue",
1383
+ size = 56,
1384
+ defaultOpen = false,
1385
+ open: controlledOpen,
1386
+ onOpenChange,
1387
+ style,
1388
+ className
1389
+ }) {
1390
+ var _a;
1391
+ const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react11.useState)(defaultOpen);
1392
+ const isOpen = controlledOpen != null ? controlledOpen : uncontrolledOpen;
1393
+ const toggle = (0, import_react11.useCallback)(() => {
1394
+ const next = !isOpen;
1395
+ setUncontrolledOpen(next);
1396
+ onOpenChange == null ? void 0 : onOpenChange(next);
1397
+ }, [isOpen, onOpenChange]);
1398
+ const close = (0, import_react11.useCallback)(() => {
1399
+ setUncontrolledOpen(false);
1400
+ onOpenChange == null ? void 0 : onOpenChange(false);
1401
+ }, [onOpenChange]);
1402
+ const isVertical = direction === "up" || direction === "down";
1403
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1404
+ import_core17.Box,
1405
+ {
1406
+ className: `${SpeedDial_default.root} ${className != null ? className : ""}`,
1407
+ style,
1408
+ "data-direction": direction,
1409
+ children: [
1410
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SpeedDial_default.actions, "data-direction": direction, children: actions.map((action, i) => {
1411
+ const index = direction === "up" || direction === "left" ? actions.length - 1 - i : i;
1412
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1413
+ import_core17.Transition,
1414
+ {
1415
+ mounted: isOpen,
1416
+ transition: isVertical ? "slide-up" : "slide-right",
1417
+ duration: 200,
1418
+ timingFunction: "ease",
1419
+ enterDelay: index * 40,
1420
+ children: (transitionStyles) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_core17.Tooltip, { label: action.label, position: isVertical ? "left" : "top", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1421
+ import_core17.ActionIcon,
1422
+ {
1423
+ variant: "filled",
1424
+ color: "gray",
1425
+ radius: "xl",
1426
+ size: size * 0.7,
1427
+ style: transitionStyles,
1428
+ className: SpeedDial_default.actionButton,
1429
+ onClick: () => {
1430
+ action.onClick();
1431
+ close();
1432
+ },
1433
+ "aria-label": action.label,
1434
+ children: action.icon
1435
+ }
1436
+ ) })
1437
+ },
1438
+ action.label
1439
+ );
1440
+ }) }),
1441
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1442
+ import_core17.ActionIcon,
1443
+ {
1444
+ variant: "filled",
1445
+ color,
1446
+ radius: "xl",
1447
+ size,
1448
+ onClick: toggle,
1449
+ className: SpeedDial_default.fab,
1450
+ "data-open": isOpen || void 0,
1451
+ "aria-label": isOpen ? "Close actions" : "Open actions",
1452
+ children: isOpen ? (_a = openIcon != null ? openIcon : icon) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react4.IconPlus, { size: size * 0.45 }) : icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react4.IconPlus, { size: size * 0.45 })
1453
+ }
1454
+ )
1455
+ ]
1456
+ }
1457
+ );
1458
+ }
1459
+
1460
+ // src/SplitSection/SplitSection.tsx
1461
+ var import_core18 = require("@mantine/core");
1462
+
1463
+ // src/SplitSection/SplitSection.module.css
1464
+ var SplitSection_default = {};
1465
+
1466
+ // src/SplitSection/SplitSection.tsx
1467
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1468
+ function SplitSection({
1469
+ badge,
1470
+ badgeColor = "violet",
1471
+ subtitle,
1472
+ title,
1473
+ titleColor = "blue",
1474
+ preTitle,
1475
+ description,
1476
+ actions,
1477
+ heading,
1478
+ children,
1479
+ stickyHeading = false,
1480
+ py,
1481
+ reversed = false,
1482
+ id,
1483
+ className
1484
+ }) {
1485
+ const headingContent = heading != null ? heading : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core18.Stack, { gap: "sm", children: [
1486
+ badge && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core18.Box, { children: [
1487
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1488
+ import_core18.Badge,
1489
+ {
1490
+ color: badgeColor,
1491
+ variant: "filled",
1492
+ size: "sm",
1493
+ radius: 4,
1494
+ tt: "uppercase",
1495
+ fw: 700,
1496
+ children: badge
1497
+ }
1498
+ ),
1499
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Text, { size: "sm", c: "dimmed", mt: "xs", tt: "uppercase", style: { letterSpacing: "0.05em" }, children: subtitle })
1500
+ ] }),
1501
+ !badge && subtitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Text, { size: "sm", c: "dimmed", tt: "uppercase", style: { letterSpacing: "0.05em" }, children: subtitle }),
1502
+ (preTitle || title) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core18.Title, { order: 2, className: SplitSection_default.title, children: [
1503
+ preTitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: SplitSection_default.preTitle, children: preTitle }),
1504
+ preTitle && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("br", {}),
1505
+ title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1506
+ import_core18.Text,
1507
+ {
1508
+ component: "span",
1509
+ inherit: true,
1510
+ className: SplitSection_default.titleHighlight,
1511
+ c: titleColor,
1512
+ children: title
1513
+ }
1514
+ )
1515
+ ] }),
1516
+ description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Text, { size: "lg", c: "dimmed", lh: 1.7, className: SplitSection_default.description, children: description }),
1517
+ actions && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Box, { mt: "md", children: actions })
1518
+ ] });
1519
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1520
+ import_core18.Box,
1521
+ {
1522
+ component: "section",
1523
+ py: py != null ? py : "calc(var(--mantine-spacing-xl) * 3)",
1524
+ pos: "relative",
1525
+ id,
1526
+ className,
1527
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Box, { className: SplitSection_default.container, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core18.Box, { className: `${SplitSection_default.layout} ${reversed ? SplitSection_default.reversed : ""}`, children: [
1528
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1529
+ import_core18.Box,
1530
+ {
1531
+ className: `${SplitSection_default.headingSide} ${stickyHeading ? SplitSection_default.sticky : ""}`,
1532
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Box, { className: stickyHeading ? SplitSection_default.stickyInner : void 0, children: headingContent })
1533
+ }
1534
+ ),
1535
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core18.Box, { className: SplitSection_default.contentSide, children })
1536
+ ] }) })
1537
+ }
1538
+ );
1539
+ }
1540
+ // Annotate the CommonJS export names for ESM import in node:
1541
+ 0 && (module.exports = {
1542
+ AnimatedCounter,
1543
+ AnimatedWaveform,
1544
+ AudioPlayer,
1545
+ AudioWaveform,
1546
+ CodeBlock,
1547
+ ColorPalette,
1548
+ ColorSwatch,
1549
+ Copyable,
1550
+ DosDonts,
1551
+ ExpandableCard,
1552
+ FadeInSection,
1553
+ FrequencyWave,
1554
+ GradientSwatch,
1555
+ Hero,
1556
+ HintBadge,
1557
+ MiniAudioPlayer,
1558
+ PrincipleCard,
1559
+ SpeedDial,
1560
+ SplitSection,
1561
+ VideoBackground
1562
+ });