@stacksjs/components 0.2.474 → 0.2.475
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/Pager-kh6s65t2.stx +232 -0
- package/dist/PagerDots-076w890y.stx +60 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -7
- package/dist/ui/pager/index.d.ts +21 -0
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/ui/pager/Pager.stx +232 -0
- package/src/ui/pager/PagerDots.stx +60 -0
- package/src/ui/pager/README.md +52 -0
- package/src/ui/pager/index.ts +31 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
/*
|
|
3
|
+
* A row of full-width pages you swipe or step through: the first-run tour,
|
|
4
|
+
* an onboarding questionnaire, a gallery of screenshots.
|
|
5
|
+
*
|
|
6
|
+
* The pages are the slot's elements, laid side by side in a native
|
|
7
|
+
* scroll-snap track, so a swipe is the browser's own (momentum, rubber band,
|
|
8
|
+
* the system's reduced-motion setting) and costs no script per frame. The
|
|
9
|
+
* page shown is a `v-model:index`, or `:index` with `@change`, which the page
|
|
10
|
+
* moves with its own buttons; Pager scrolls to follow and reports a swipe back.
|
|
11
|
+
*
|
|
12
|
+
* <Pager v-model:index="step" label="Welcome tour" dotsLabel="Tour pages">
|
|
13
|
+
* <section>…</section>
|
|
14
|
+
* <section :for="slide in slides" :key="slide.id">…</section>
|
|
15
|
+
* </Pager>
|
|
16
|
+
* <button @click="step.set(step() + 1)">Next</button>
|
|
17
|
+
*
|
|
18
|
+
* `swipe="false"` keeps the pages but leaves moving to the page's buttons: a
|
|
19
|
+
* questionnaire whose next page waits on an answer. `dots="false"` drops the
|
|
20
|
+
* built-in dots for a `<PagerDots>` placed elsewhere.
|
|
21
|
+
*
|
|
22
|
+
* Accessibility follows the APG carousel pattern: a named region with
|
|
23
|
+
* `aria-roledescription="carousel"`, each page a "slide" group labelled
|
|
24
|
+
* "2 of 5", pages off screen inert, and the arrow keys (outside a field)
|
|
25
|
+
* stepping between them.
|
|
26
|
+
*/
|
|
27
|
+
export const index = Math.max(0, Math.trunc($num($props.index) || 0))
|
|
28
|
+
export const label = $props.label || ''
|
|
29
|
+
export const swipe = $bool($props.swipe, true)
|
|
30
|
+
export const dots = $bool($props.dots, true)
|
|
31
|
+
export const dotsLabel = $props.dotsLabel || 'Pages'
|
|
32
|
+
export const slideLabel = $props.slideLabel || '{n} of {total}'
|
|
33
|
+
export const goToLabel = $props.goToLabel || 'Go to page {n}'
|
|
34
|
+
export const className = $props.className || ''
|
|
35
|
+
export const trackClass = $props.trackClass || ''
|
|
36
|
+
export const dotsClass = $props.dotsClass || ''
|
|
37
|
+
|
|
38
|
+
export const rootClasses = `stx-pager relative flex flex-col min-w-0 ${className}`.replace(/\s+/g, ' ').trim()
|
|
39
|
+
export const trackClasses = `stx-pager-track flex flex-1 min-h-0 ${swipe ? 'overflow-x-auto snap-x snap-mandatory' : 'overflow-x-hidden'} overflow-y-hidden overscroll-x-contain ${trackClass}`.replace(/\s+/g, ' ').trim()
|
|
40
|
+
export const dotRowClasses = `flex items-center justify-center gap-1.5 py-3 ${dotsClass}`.replace(/\s+/g, ' ').trim()
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<script client>
|
|
44
|
+
const emit = defineEmits()
|
|
45
|
+
const allowSwipe = {{ swipe }}
|
|
46
|
+
const slideWords = {{ slideLabel }}
|
|
47
|
+
const goToWords = {{ goToLabel }}
|
|
48
|
+
const selected = useModel('index', { default: {{ index }}, parse: v => Math.max(0, Math.trunc(Number(v)) || 0) })
|
|
49
|
+
const trackRef = useRef('trackRef')
|
|
50
|
+
const count = state(0)
|
|
51
|
+
const mounted = state(false)
|
|
52
|
+
const dotList = derived(() => Array.from({ length: count() }, (_, i) => i))
|
|
53
|
+
|
|
54
|
+
let observer = null
|
|
55
|
+
let resizer = null
|
|
56
|
+
let frame = 0
|
|
57
|
+
// A scroll the pager started itself, and the page it is heading for: the
|
|
58
|
+
// scroll events on the way there are not a swipe.
|
|
59
|
+
let steering = -1
|
|
60
|
+
let steerTimer = null
|
|
61
|
+
// The page a swipe just settled on, so following the model does not scroll
|
|
62
|
+
// back to where the finger already is.
|
|
63
|
+
let fromSwipe = -1
|
|
64
|
+
|
|
65
|
+
function words(template, n, total) {
|
|
66
|
+
return String(template).replace('{n}', String(n)).replace('{total}', String(total))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The slot's pages: the track's own elements, whatever rendered them. */
|
|
70
|
+
function pages() {
|
|
71
|
+
const track = trackRef.value
|
|
72
|
+
if (!track) return []
|
|
73
|
+
return Array.from(track.children).filter(el => !['TEMPLATE', 'SCRIPT', 'STYLE'].includes(el.tagName) && !el.hasAttribute('data-pager-ignore'))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function reducedMotion() {
|
|
77
|
+
return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Labels every page, and takes the ones off screen out of reach. */
|
|
81
|
+
function labelPages() {
|
|
82
|
+
const list = pages()
|
|
83
|
+
if (count() !== list.length) count.set(list.length)
|
|
84
|
+
const current = selected()
|
|
85
|
+
list.forEach((page, i) => {
|
|
86
|
+
page.setAttribute('role', 'group')
|
|
87
|
+
page.setAttribute('aria-roledescription', 'slide')
|
|
88
|
+
if (!page.hasAttribute('aria-labelledby')) page.setAttribute('aria-label', words(slideWords, i + 1, list.length))
|
|
89
|
+
if (i === current) { page.removeAttribute('inert'); page.removeAttribute('aria-hidden') }
|
|
90
|
+
else { page.setAttribute('inert', ''); page.setAttribute('aria-hidden', 'true') }
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function clamp(i) {
|
|
95
|
+
const total = count() || pages().length
|
|
96
|
+
return Math.min(Math.max(0, i), Math.max(0, total - 1))
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function scrollToPage(i, smooth) {
|
|
100
|
+
const track = trackRef.value
|
|
101
|
+
if (!track || !track.clientWidth) return
|
|
102
|
+
const left = i * track.clientWidth
|
|
103
|
+
if (Math.abs(track.scrollLeft - left) < 2) return
|
|
104
|
+
steering = i
|
|
105
|
+
if (steerTimer) clearTimeout(steerTimer)
|
|
106
|
+
steerTimer = setTimeout(() => { steering = -1 }, 800)
|
|
107
|
+
if (typeof track.scrollTo === 'function') track.scrollTo({ left, behavior: smooth && !reducedMotion() ? 'smooth' : 'auto' })
|
|
108
|
+
else track.scrollLeft = left
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function settle() {
|
|
112
|
+
frame = 0
|
|
113
|
+
const track = trackRef.value
|
|
114
|
+
if (!track || !track.clientWidth) return
|
|
115
|
+
const i = clamp(Math.round(track.scrollLeft / track.clientWidth))
|
|
116
|
+
if (steering !== -1) {
|
|
117
|
+
if (i === steering && Math.abs(track.scrollLeft - i * track.clientWidth) < 2) steering = -1
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
if (i === selected()) return
|
|
121
|
+
fromSwipe = i
|
|
122
|
+
selected.set(i)
|
|
123
|
+
emit('change', i)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function onScroll() {
|
|
127
|
+
if (frame) return
|
|
128
|
+
frame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame(settle) : setTimeout(settle, 16)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Moves to page `i` (clamped), as the page's own buttons do. */
|
|
132
|
+
function go(i) {
|
|
133
|
+
const next = clamp(Number(i) || 0)
|
|
134
|
+
if (next === selected()) return
|
|
135
|
+
selected.set(next)
|
|
136
|
+
emit('change', next)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function next() { go(selected() + 1) }
|
|
140
|
+
function prev() { go(selected() - 1) }
|
|
141
|
+
|
|
142
|
+
function onKey(event) {
|
|
143
|
+
if (!allowSwipe || event.defaultPrevented) return
|
|
144
|
+
// The arrows already mean something in a field, a tab strip, a radio group
|
|
145
|
+
// and a slider: they stay theirs.
|
|
146
|
+
const target = event.target
|
|
147
|
+
const tag = target && target.tagName
|
|
148
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || (target && target.isContentEditable)) return
|
|
149
|
+
if (target && target.closest && target.closest('[role="tablist"], [role="radiogroup"], [role="slider"]')) return
|
|
150
|
+
const rtl = !!(trackRef.value && trackRef.value.closest('[dir="rtl"]'))
|
|
151
|
+
if (event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')) { event.preventDefault(); next() }
|
|
152
|
+
else if (event.key === (rtl ? 'ArrowRight' : 'ArrowLeft')) { event.preventDefault(); prev() }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function isCurrent(i) { return i === selected() }
|
|
156
|
+
function dotClass(i) {
|
|
157
|
+
return i === selected()
|
|
158
|
+
? 'stx-pager-dot block h-1.5 w-5 rounded-full bg-current transition-all duration-300'
|
|
159
|
+
: 'stx-pager-dot block h-1.5 w-1.5 rounded-full bg-current opacity-35 transition-all duration-300'
|
|
160
|
+
}
|
|
161
|
+
function dotLabel(i) { return words(goToWords, i + 1, count()) }
|
|
162
|
+
|
|
163
|
+
effect(() => {
|
|
164
|
+
const i = selected()
|
|
165
|
+
if (!mounted()) return
|
|
166
|
+
labelPages()
|
|
167
|
+
if (fromSwipe === i) { fromSwipe = -1; return }
|
|
168
|
+
fromSwipe = -1
|
|
169
|
+
scrollToPage(i, true)
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
onMount(() => {
|
|
173
|
+
mounted.set(true)
|
|
174
|
+
labelPages()
|
|
175
|
+
const track = trackRef.value
|
|
176
|
+
if (!track) return
|
|
177
|
+
// Where the page asked to start, without a slide in from the first page.
|
|
178
|
+
track.scrollLeft = clamp(selected()) * track.clientWidth
|
|
179
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
180
|
+
observer = new MutationObserver(() => labelPages())
|
|
181
|
+
observer.observe(track, { childList: true })
|
|
182
|
+
}
|
|
183
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
184
|
+
// A rotation or a resized window changes the page width under the
|
|
185
|
+
// current page: put it back square rather than half way to the next.
|
|
186
|
+
resizer = new ResizeObserver(() => {
|
|
187
|
+
if (track.clientWidth) track.scrollLeft = clamp(selected()) * track.clientWidth
|
|
188
|
+
})
|
|
189
|
+
resizer.observe(track)
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
onDestroy(() => {
|
|
194
|
+
if (observer) observer.disconnect()
|
|
195
|
+
if (resizer) resizer.disconnect()
|
|
196
|
+
if (steerTimer) clearTimeout(steerTimer)
|
|
197
|
+
observer = null
|
|
198
|
+
resizer = null
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
defineExpose({ selected, count, go, next, prev })
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<section class="{{ rootClasses }}" aria-roledescription="carousel" @if(label)aria-label="{{ label }}"@endif @keydown="onKey($event)">
|
|
205
|
+
<div x-ref="trackRef" class="{{ trackClasses }}" aria-live="polite" @scroll="onScroll()">
|
|
206
|
+
<slot />
|
|
207
|
+
</div>
|
|
208
|
+
@if(dots)
|
|
209
|
+
<div class="{{ dotRowClasses }}" role="group" aria-label="{{ dotsLabel }}">
|
|
210
|
+
<button
|
|
211
|
+
:for="i in dotList"
|
|
212
|
+
:key="i"
|
|
213
|
+
type="button"
|
|
214
|
+
class="flex items-center justify-center h-6 min-w-6 px-0.5"
|
|
215
|
+
:aria-label="dotLabel(i)"
|
|
216
|
+
:aria-current="isCurrent(i) ? 'step' : null"
|
|
217
|
+
@click="go(i)"
|
|
218
|
+
><span aria-hidden="true" :class="dotClass(i)"></span></button>
|
|
219
|
+
</div>
|
|
220
|
+
@endif
|
|
221
|
+
</section>
|
|
222
|
+
|
|
223
|
+
<style>
|
|
224
|
+
/* Every page takes the whole width and snaps to it; the scrollbar is the
|
|
225
|
+
swipe itself, so it is not drawn. */
|
|
226
|
+
.stx-pager-track { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
|
|
227
|
+
.stx-pager-track::-webkit-scrollbar { display: none; }
|
|
228
|
+
.stx-pager-track > * { flex: 0 0 100%; width: 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
|
|
229
|
+
@media (prefers-reduced-motion: reduce) {
|
|
230
|
+
.stx-pager-dot { transition: none; }
|
|
231
|
+
}
|
|
232
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
/*
|
|
3
|
+
* A pager's dots, placed wherever the page wants them: above a tour's
|
|
4
|
+
* "Next" button rather than under the pages, where <Pager> draws its own.
|
|
5
|
+
*
|
|
6
|
+
* <Pager v-model:index="step" dots="false">…</Pager>
|
|
7
|
+
* <PagerDots v-model:index="step" :count="slides.length" label="Tour pages" />
|
|
8
|
+
*
|
|
9
|
+
* The current page is a wider pill; each dot is a button that moves there.
|
|
10
|
+
* Colour comes from the text colour (`className="text-white"`).
|
|
11
|
+
*/
|
|
12
|
+
export const index = Math.max(0, Math.trunc($num($props.index) || 0))
|
|
13
|
+
export const count = Math.max(0, Math.trunc($num($props.count) || 0))
|
|
14
|
+
export const label = $props.label || 'Pages'
|
|
15
|
+
export const goToLabel = $props.goToLabel || 'Go to page {n}'
|
|
16
|
+
export const className = $props.className || ''
|
|
17
|
+
|
|
18
|
+
export const rowClasses = `flex items-center justify-center gap-1.5 ${className}`.replace(/\s+/g, ' ').trim()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script client>
|
|
22
|
+
const emit = defineEmits()
|
|
23
|
+
const goToWords = {{ goToLabel }}
|
|
24
|
+
const selected = useModel('index', { default: {{ index }}, parse: v => Math.max(0, Math.trunc(Number(v)) || 0) })
|
|
25
|
+
const total = useReactiveProp('count', {{ count }})
|
|
26
|
+
const dotList = derived(() => Array.from({ length: Math.max(0, Number(total()) || 0) }, (_, i) => i))
|
|
27
|
+
|
|
28
|
+
function go(i) {
|
|
29
|
+
if (i === selected()) return
|
|
30
|
+
selected.set(i)
|
|
31
|
+
emit('change', i)
|
|
32
|
+
}
|
|
33
|
+
function isCurrent(i) { return i === selected() }
|
|
34
|
+
function dotClass(i) {
|
|
35
|
+
return i === selected()
|
|
36
|
+
? 'stx-pager-dot block h-1.5 w-5 rounded-full bg-current transition-all duration-300'
|
|
37
|
+
: 'stx-pager-dot block h-1.5 w-1.5 rounded-full bg-current opacity-35 transition-all duration-300'
|
|
38
|
+
}
|
|
39
|
+
function dotLabel(i) { return String(goToWords).replace('{n}', String(i + 1)) }
|
|
40
|
+
|
|
41
|
+
defineExpose({ selected, go })
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<div class="{{ rowClasses }}" role="group" aria-label="{{ label }}">
|
|
45
|
+
<button
|
|
46
|
+
:for="i in dotList"
|
|
47
|
+
:key="i"
|
|
48
|
+
type="button"
|
|
49
|
+
class="flex items-center justify-center h-6 min-w-6 px-0.5"
|
|
50
|
+
:aria-label="dotLabel(i)"
|
|
51
|
+
:aria-current="isCurrent(i) ? 'step' : null"
|
|
52
|
+
@click="go(i)"
|
|
53
|
+
><span aria-hidden="true" :class="dotClass(i)"></span></button>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.stx-pager-dot { transition: none; }
|
|
59
|
+
}
|
|
60
|
+
</style>
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './ui/listbox/index';
|
|
|
65
65
|
export * from './ui/mobile/index';
|
|
66
66
|
export * from './ui/navigator/index';
|
|
67
67
|
export * from './ui/notification/index';
|
|
68
|
+
export * from './ui/pager/index';
|
|
68
69
|
export * from './ui/pagination/index';
|
|
69
70
|
export * from './ui/payment/index';
|
|
70
71
|
export * from './ui/popover/index';
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Ke={__stx:!0,src:"./components/CodeBlock.stx"};var _e={__stx:!0,src:"./components/Footer.stx"};var Ue={__stx:!0,src:"./components/Hero.stx"};var Je={__stx:!0,src:"./components/Installation.stx"};function
|
|
3
|
-
`)}function N(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function
|
|
2
|
+
var Ke={__stx:!0,src:"./components/CodeBlock.stx"};var _e={__stx:!0,src:"./components/Footer.stx"};var Ue={__stx:!0,src:"./components/Hero.stx"};var Je={__stx:!0,src:"./components/Installation.stx"};function mr(e){let{code:t,onSuccess:s,onError:o,timeout:n=2000}=e,a=!1,r=null;return{copied:a,copy:async()=>{try{if(!navigator.clipboard)throw Error("Clipboard API not available");await navigator.clipboard.writeText(t),a=!0,s?.(),r=setTimeout(()=>{a=!1,r=null},n)}catch(p){let u=p instanceof Error?p:Error("Failed to copy code");o?.(u),console.error("Failed to copy code:",u)}},reset:()=>{if(a=!1,r)clearTimeout(r),r=null}}}async function gr(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function Ge(){if(typeof window>"u")return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function be(e){return e==="system"?Ge():e}function xr(e={}){let{storageKey:t="theme",defaultTheme:s="system"}=e,o=s;if(typeof window<"u"&&typeof localStorage<"u"){let c=localStorage.getItem(t);if(c)o=c}let n=be(o)==="dark",a=(c)=>{let p=be(c);if(typeof document<"u")if(p==="dark")document.documentElement.classList.add("dark");else document.documentElement.classList.remove("dark");if(typeof localStorage<"u")localStorage.setItem(t,c)},r=(c)=>{o=c,a(c)},i=()=>{let p=be(o)==="dark"?"light":"dark";r(p)};if(a(o),typeof window<"u"&&o==="system")window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(c)=>{if(o==="system")a("system")});return{isDark:n,theme:o,toggle:i,setTheme:r}}function Ye(e,t){if(typeof document>"u")return;document.title=t?t.replace("%s",e):e}function O(e,t,s=!1){if(typeof document>"u")return;let o=s?"property":"name",n=document.querySelector(`meta[${o}="${e}"]`);if(!n)n=document.createElement("meta"),n.setAttribute(o,e),document.head.appendChild(n);n.setAttribute("content",t)}function Xe(e,t){if(typeof document>"u")return;let s=document.querySelector(`link[rel="${e}"]`);if(!s)s=document.createElement("link"),s.setAttribute("rel",e),document.head.appendChild(s);s.setAttribute("href",t)}function wr(e){let{title:t,description:s,author:o,keywords:n,ogImage:a,ogImageWidth:r,ogImageHeight:i,twitterCard:c="summary_large_image",twitterSite:p,twitterCreator:u,canonical:d}=e;if(t)Ye(t),O("og:title",t,!0),O("twitter:title",t);if(s)O("description",s),O("og:description",s,!0),O("twitter:description",s);if(o)O("author",o);if(n&&n.length>0)O("keywords",n.join(", "));if(a)O("og:image",a,!0),O("twitter:image",a);if(r)O("og:image:width",r,!0);if(i)O("og:image:height",i,!0);if(O("twitter:card",c),p)O("twitter:site",p);if(u)O("twitter:creator",u);if(d)Xe("canonical",d);if(O("og:type","website",!0),typeof window<"u")O("og:url",window.location.href,!0)}function yr(e){let t=[],{title:s,description:o,author:n,keywords:a,ogImage:r,ogImageWidth:i,ogImageHeight:c,twitterCard:p="summary_large_image",twitterSite:u,twitterCreator:d,canonical:g}=e;if(s)t.push(`<title>${N(s)}</title>`),t.push(`<meta property="og:title" content="${N(s)}" />`),t.push(`<meta name="twitter:title" content="${N(s)}" />`);if(o)t.push(`<meta name="description" content="${N(o)}" />`),t.push(`<meta property="og:description" content="${N(o)}" />`),t.push(`<meta name="twitter:description" content="${N(o)}" />`);if(n)t.push(`<meta name="author" content="${N(n)}" />`);if(a&&a.length>0)t.push(`<meta name="keywords" content="${N(a.join(", "))}" />`);if(r)t.push(`<meta property="og:image" content="${N(r)}" />`),t.push(`<meta name="twitter:image" content="${N(r)}" />`);if(i)t.push(`<meta property="og:image:width" content="${N(i)}" />`);if(c)t.push(`<meta property="og:image:height" content="${N(c)}" />`);if(t.push(`<meta name="twitter:card" content="${N(p)}" />`),u)t.push(`<meta name="twitter:site" content="${N(u)}" />`);if(d)t.push(`<meta name="twitter:creator" content="${N(d)}" />`);if(g)t.push(`<link rel="canonical" href="${N(g)}" />`);return t.push('<meta property="og:type" content="website" />'),t.join(`
|
|
3
|
+
`)}function N(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Cr(e,t,s={}){let{enabled:o=!0,ignore:n=[]}=s,a=(r)=>{if(!o||!e)return;let i=r.target;if(!e.contains(i)){if(!n.some((p)=>{let u=document.querySelectorAll(p);return Array.from(u).some((d)=>d.contains(i))}))t(r)}};if(typeof document<"u")document.addEventListener("mousedown",a),document.addEventListener("touchstart",a);return()=>{if(typeof document<"u")document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}}function Sr(e,t={}){let{enabled:s=!0,initialFocus:o=null,returnFocus:n=!0,fallbackFocus:a=null}=t,r=null,i=!1;function c(){if(!e)return[];let f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(f))}function p(f){if(!s||!i||!e)return;let y=c();if(y.length===0){f.preventDefault();return}let C=y[0],k=y[y.length-1];if(f.shiftKey){if(document.activeElement===C||document.activeElement===e)f.preventDefault(),k.focus()}else if(document.activeElement===k)f.preventDefault(),C.focus()}function u(f){if(f.key==="Escape"&&s&&i)g()}function d(){if(!s||!e||i)return;if(r=document.activeElement,o)o.focus();else{let f=c();if(f.length>0)f[0].focus();else if(a)a.focus();else e.focus()}document.addEventListener("keydown",p),document.addEventListener("keydown",u),i=!0}function g(){if(!i)return;if(document.removeEventListener("keydown",p),document.removeEventListener("keydown",u),n&&r)r.focus();i=!1}return{activate:d,deactivate:g}}function Er(e,t={}){let{enabled:s=!0,preventDefault:o=!0,stopPropagation:n=!1,target:a=typeof document<"u"?document:null}=t,r=Array.isArray(e)?e:[e],i=(c)=>{if(!s)return;r.forEach((p)=>{if(!(Array.isArray(p.key)?p.key:[p.key]).some((g)=>g.toLowerCase()===c.key.toLowerCase()))return;if(p.ctrl!==void 0&&p.ctrl!==c.ctrlKey)return;if(p.shift!==void 0&&p.shift!==c.shiftKey)return;if(p.alt!==void 0&&p.alt!==c.altKey)return;if(p.meta!==void 0&&p.meta!==c.metaKey)return;if(o)c.preventDefault();if(n)c.stopPropagation();p.handler(c)})};if(a)a.addEventListener("keydown",i);return()=>{if(a)a.removeEventListener("keydown",i)}}var Ir={ESCAPE:"Escape",ENTER:"Enter",SPACE:" ",TAB:"Tab",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",HOME:"Home",END:"End",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"};function Pr(e,t,s={}){let{serializer:o=JSON.stringify,deserializer:n=JSON.parse,onError:a=console.error}=s,r=t;try{if(typeof window<"u"){let d=window.localStorage.getItem(e);if(d!==null)r=n(d)}}catch(d){a(d)}let i=r,c=new Set;function p(d){try{let g=typeof d==="function"?d(i):d;if(i=g,typeof window<"u")window.localStorage.setItem(e,o(g));c.forEach((f)=>f(g))}catch(g){a(g)}}function u(){try{if(i=t,typeof window<"u")window.localStorage.removeItem(e);c.forEach((d)=>d(t))}catch(d){a(d)}}if(typeof window<"u"){let d=(g)=>{if(g.key===e&&g.newValue!==null)try{let f=n(g.newValue);i=f,c.forEach((y)=>y(f))}catch(f){a(f)}else if(g.key===e&&g.newValue===null)i=t,c.forEach((f)=>f(t))};window.addEventListener("storage",d)}return{value:i,setValue:p,removeValue:u}}function Y(e,t={}){let{defaultValue:s=!1}=t,o=s,n=null;if(typeof window<"u"&&"matchMedia"in window){n=window.matchMedia(e),o=n.matches;let r=(i)=>{o=i.matches};if(n.addEventListener)n.addEventListener("change",r);else n.addListener(r)}function a(){if(n)o=n.matches}return{matches:o,updateMatches:a}}var X={xs:"(min-width: 320px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)",mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)",reducedMotion:"(prefers-reduced-motion: reduce)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function Or(e){return Y(X[e])}function Nr(){return Y(X.mobile)}function Dr(){return Y(X.desktop)}function Mr(){return Y(X.dark)}function Rr(){return Y(X.reducedMotion)}function te(){return globalThis.stx?.overlays}function jr(e,t){te()?.open(e,t)}function Hr(e){te()?.close(e)}function Fr(e){return te()?.isTop(e)??!1}function Vr(){return te()?.list()??[]}var Ee=["gray","neutral","slate","zinc","red","green","yellow","blue","indigo"],qr="--stx-color";function Qe(e,t){return t===void 0?`var(${e})`:`var(${e}, ${t})`}function Wr(e={}){let t={};for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;let n={};for(let[a,r]of Object.entries(o))n[a]=Qe(`--stx-color-${s}-${a}`,r);t[s]=n}return t}function Kr(e={}){let t=[];for(let s of Ee){let o=e[s];if(!o||typeof o==="string")continue;for(let n of Object.keys(o))t.push(`--stx-color-${s}-${n}`)}return t}var et="./Accordion-ehpymjam.stx";var st="./AccordionItem-fc4ekdqf.stx";var nt="./Audio-byv8kkvt.stx";var rt="./Login-4666t7j4.stx";var lt="./Signup-pm2r0f2m.stx";var dt="./TwoFactorChallenge-3tsbfdsd.stx";var ut="./Avatar-6gexb2xv.stx";var ft="./Badge-33phrqza.stx";var gt="./Breadcrumb-cgw1bb6s.stx";class R extends Error{component;context;constructor(e,t,s={}){let o=R.formatMessage(e,t,s);super(o);if(this.name="ComponentError",this.component=e,this.context={component:e,...s},Error.captureStackTrace)Error.captureStackTrace(this,R)}static formatMessage(e,t,s){let o=`[${e}] ${t}`;if(s.prop)o+=`
|
|
4
4
|
Prop: "${s.prop}"`;if(s.received!==void 0)o+=`
|
|
5
5
|
Received: ${JSON.stringify(s.received)}`;if(s.expected!==void 0){let n=Array.isArray(s.expected)?s.expected.map((a)=>JSON.stringify(a)).join(", "):JSON.stringify(s.expected);o+=`
|
|
6
6
|
Expected: ${n}`}if(s.details)o+=`
|
|
7
7
|
Details: ${s.details}`;if(s.docsUrl)o+=`
|
|
8
8
|
Documentation: ${s.docsUrl}`;else if(e)o+=`
|
|
9
|
-
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new R(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new R(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new R(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new R("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new R(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new R(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new R(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new R(e,"Failed to render component",{details:t.message})}},se=null;function
|
|
9
|
+
Documentation: https://stacksjs.com/components/${e.toLowerCase()}`;return o}toJSON(){return{name:this.name,message:this.message,component:this.component,context:this.context,stack:this.stack}}}var J={invalidProp(e,t,s,o){return new R(e,`Invalid prop value for "${t}"`,{prop:t,received:s,expected:o,details:Array.isArray(o)?`The "${t}" prop must be one of the allowed values`:`The "${t}" prop does not match the expected type`})},requiredProp(e,t){return new R(e,`Required prop "${t}" is missing`,{prop:t,details:`The "${t}" prop is required for ${e} to function correctly`})},invalidType(e,t,s,o){return new R(e,`Invalid type for prop "${t}"`,{prop:t,received:typeof s,expected:o,details:`Expected "${t}" to be of type ${o}, but received ${typeof s}`})},componentNotFound(e){return new R("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new R(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new R(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new R(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new R(e,"Failed to render component",{details:t.message})}},se=null;function bi(e){se=e}function xi(){se=null}function oe(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof R)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(se)try{se(e)}catch(n){console.error("Error in error handler:",n)}if(s)throw e}function Ie(e,t,s){return(...o)=>{try{let n=e(...o);if(n instanceof Promise)return n.catch((a)=>{let r=J.eventHandler(t,s,a);throw oe(r,{throwError:!1}),r});return n}catch(n){let a=J.eventHandler(t,s,n);throw oe(a,{throwError:!1}),a}}}function bt(e,t){if(!e)throw t}function xt(e,t,s={}){let o=R.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function vi(e,t){bt(e,t)}function wi(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){xt(e,s,o)},error(s,o){let n=new R(e,s,o);oe(n,{throwError:!1})}}}function yi(e,t,s){try{return t()}catch(o){let n=J.render(e,o);return oe(n,{throwError:!1}),s}}class L{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new L(this.validate,this.message,!0)}}var l={string:new L((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new L((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new L((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new L((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new L((e)=>typeof e==="object"&&e!==null&&!Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`object\`.`),array:new L((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new L(()=>!0,()=>""),oneOf(e){return new L((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((n)=>JSON.stringify(n)).join(", ")}].`)},oneOfType(e){return new L((t,s,o)=>e.some((n)=>n.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new L((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((n,a)=>e.validate(n,`${s}[${a}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new L((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[n,a]of Object.entries(e)){if(a.isRequired&&!(n in t))return!1;if(n in t&&!a.validate(t[n],`${s}.${n}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new L((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new L(e,typeof t==="string"?()=>t:t)},min(e){return new L((t)=>typeof t==="number"&&t>=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value >= ${e}.`)},max(e){return new L((t)=>typeof t==="number"&&t<=e,(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value <= ${e}.`)},range(e,t){return new L((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,n)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${n}\`, expected value between ${e} and ${t}.`)},pattern(e){return new L((t)=>typeof t==="string"&&e.test(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected value matching pattern ${e}.`)},email:new L((e)=>typeof e==="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid email address.`),url:new L((e)=>{if(typeof e!=="string")return!1;try{let t=new URL(e);return!0}catch{return!1}},(e,t,s)=>`Invalid prop \`${t}\` of value \`${e}\` supplied to \`${s}\`, expected valid URL.`)};function vt(e,t,s,o={}){let{throwOnError:n=!1,logWarnings:a=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let p=t[i],u=p===void 0;if(c.isRequired&&u){let d=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(d);continue}if(u)continue;if(!c.validate(p,i,e)){let d=c.message(p,i,e);r.push(d)}}if(r.length>0){if(a)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(n)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>vt(e,o,t,s)}function vi(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function wi(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var yt="./Button-bpjmfkq6.stx";var kt={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Si=H("Button",kt);function Ti(e){return Ie(e,"Button","onClick")}function Ei(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Ii(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var $t="./Calendar-5vs6x7gj.stx";var Tt="./DateRangePicker-4zmf34e4.stx";var It="./EmptyState-s790dbym.stx";var Pt="./ThemeToggle-4wm9zare.stx";var Lt="./Card-r55zpjqh.stx";var Dt="./Checkbox-kepzk3h5.stx";var Rt="./Combobox-9n04ec5w.stx";var jt="./ComboboxButton-4r6a45s1.stx";var Ft="./ComboboxInput-1gyfpnca.stx";var Bt="./ComboboxOption-wkw70js7.stx";var Wt="./ComboboxOptions-zhr9b6rx.stx";var _t="./CommandPalette-qqjdbcyg.stx";var Jt="./CommandPaletteItem-7290ce1z.stx";var Yt="./Dialog-pdq8rxvy.stx";var Qt="./DialogBackdrop-de5m5m4w.stx";var es="./DialogDescription-gth4c2kx.stx";var ss="./DialogPanel-vhdqymc2.stx";var ns="./DialogTitle-ke58hh68.stx";var rs="./Drawer-nmq100vy.stx";var ls="./Dropdown-hb8ks69x.stx";var ds="./DropdownButton-wxc25hsy.stx";var us="./DropdownItem-af0vzc8a.stx";var fs="./DropdownItems-bkz7jkyz.stx";var gs="./Form-ewzy10ye.stx";var bs={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},Rl=H("Form",bs);var vs="./Image-6d7ssp75.stx";var ys="./EmailInput-57626391.stx";var Cs="./NumberInput-pq4k2k4k.stx";var Ss="./PasswordInput-dg41ktgd.stx";var Es="./SearchInput-w15r5t95.stx";var As="./TextInput-nknmz9md.stx";var Ps={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Os={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},Ls={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Ns={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Ds={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Jl=H("TextInput",Os),Gl=H("EmailInput",Ps),Yl=H("PasswordInput",Ns),Xl=H("NumberInput",Ls),Ql=H("SearchInput",Ds);var Rs="./Listbox-83j2q4x6.stx";var js="./ListboxButton-gan8e3nw.stx";var Fs="./ListboxLabel-ka0hfm7b.stx";var Bs="./ListboxOption-gpaqvk3s.stx";var Ws="./ListboxOptions-2928864k.stx";var _s="./FilterChip-00ja5jhz.stx";var Js="./FilterChips-7pnzycfd.stx";var Ys="./ListRow-8d3e1yxh.stx";var Qs="./NavBar-qqrrhdnk.stx";var eo="./SectionCard-8ctdacjr.stx";var so="./TabBar-8143650x.stx";var no="./TabBarItem-kddfnhk3.stx";var ro="./Navigator-1yk1c3pp.stx";var lo="./Notification-b3cz24f0.stx";var po="./Pagination-8bhbkpcp.stx";var ho="./Checkout-crbegxyv.stx";var mo="./DefaultPaymentMethod-ss3x61tr.stx";var bo="./PaymentMethods-z4hhr0kv.stx";var vo="./SubscriptionCheckout-rdcv32n1.stx";var yo="./Popover-khtvagcs.stx";var Co="./PopoverButton-3w6550hv.stx";var So="./PopoverPanel-d84gk1w1.stx";var Eo="./Portal-m73vz879.stx";var Ao="./Progress-2qzb77kc.stx";var Oo="./Radio-8153x74w.stx";var No="./RadioGroup-smqcqgds.stx";var Mo="./RadioGroupDescription-z34r9avr.stx";var zo="./RadioGroupLabel-ka0hfm7b.stx";var Ho="./RadioGroupOption-twcw1b2a.stx";var Vo="./Select-61zv5tr7.stx";var qo="./Sidebar-8dygywjv.stx";var Ko="./SidebarFooter-s7skj92y.stx";var Uo="./SidebarHeader-x7jdhmyr.stx";var Go="./SidebarItem-r4f2pref.stx";var Xo="./SidebarPinned-48kyk193.stx";var Zo="./SidebarSection-5sqza2j6.stx";var tn="./SidebarSpace-bwv98azf.stx";var on="./SidebarSpaces-mdtrynr2.stx";var an="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},rn={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},ln={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},cn={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},dn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},pn={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},un={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ae={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:cn,workspace:rn,desktop:ln,solid:dn,transparent:pn,vibrancy:un};function Ld(e){return Ae[e||"macos"]||Ae.macos}function Nd(e){if(!e)return;return ne[e]||e}var hn=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Pe(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Rd(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function fn(e){if(!e)return Pe(hn);if(typeof e!=="string")return e;return Pe(ne[e]||e)}function mn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Oe(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function gn(e){let t=fn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Oe(e.action,e.id,"action","i-f7-plus"),clear:Oe(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:mn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function zd(e){return(e||[]).map(gn)}function jd(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Hd(e){return e.map((t)=>t.tint)}var xn="./Skeleton-m4p66zcs.stx";var wn="./Spinner-vhnc3y03.stx";var kn="./Stepper-68gxcmej.stx";var $n="./StepperStep-zf4pq1s0.stx";class ae{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var pp={local:new ae("local"),session:new ae("session")};function up(e="local",t){return new ae(e,t)}var Tn="./Switch-acwd7n07.stx";var In="./Table-0a4y46vd.stx";var Pn="./TableBody-y49bqb1p.stx";var Ln="./TableCell-jhvsxw8b.stx";var Dn="./TableHead-e9xvjx2j.stx";var Rn="./TableHeader-krzcx4sv.stx";var jn="./TableRow-dt8e11aj.stx";var Fn="./Tab-46mxm7f8.stx";var Bn="./TabList-76bpx5fp.stx";var Wn="./TabPanel-5htevsq6.stx";var _n="./Tabs-1swcxmfb.stx";var Jn="./Teleport-vqs75x36.stx";var Yn="./Textarea-9xmhjqp8.stx";var Qn="./Tooltip-rg1c2zrc.stx";var ea="./Transition-7m0mk45s.stx";var sa="./Video-rhy7dskw.stx";var na="./VirtualList-fa7v5a3h.stx";var ra="./VirtualTable-kp7b3wyv.stx";var ia=0;function Le(e="a11y"){return`${e}-${++ia}-${Date.now()}`}function ru(e,t,s={}){let{visible:o=!1,id:n=Le("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function iu(e,t){let s=Le("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function lu(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function xe(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function cu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(x)=>{if(u)return;if(n&&x.key==="Escape"){x.preventDefault(),C();return}if(x.key==="Tab"){let E=xe(e);if(E.length===0){x.preventDefault();return}let A=E[0],S=E[E.length-1];if(x.shiftKey){if(document.activeElement===A)x.preventDefault(),S.focus()}else if(document.activeElement===S)x.preventDefault(),A.focus()}},f=(x)=>{if(u)return;if(!e.contains(x.target)){if(typeof r==="function"){if(!r(x)&&a)C()}else if(!r&&a)C()}};function y(){if(p)return;p=!0,d=document.activeElement;let x=s||xe(e)[0];if(x&&typeof x.focus==="function")x.focus();document.addEventListener("keydown",g),document.addEventListener("click",f),i?.()}function C(){if(!p)return;p=!1;let x=o||d;if(x&&typeof x.focus==="function")x.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",f),c?.()}function k(){u=!0}function b(){u=!1}return{activate:y,deactivate:C,pause:k,unpause:b}}function du(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((f,y)=>{if(y===d){if(f.setAttribute("tabindex","0"),typeof f.focus==="function")f.focus()}else f.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let f=c().length-1,y=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"Home":C=0,y=!0;break;case"End":C=f,y=!0;break}if(y)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var pu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function uu(e){return document.activeElement===e}function hu(e,t){let s=t||document.activeElement,o=xe(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function fu(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var mu={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function gu(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function bu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function xu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function vu(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function wu(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function yu(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var la=(e,t,s,o)=>s*e/o+t,ca=(e,t,s,o)=>(e/=o,s*e*e+t),da=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),pa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},ua=(e,t,s,o)=>(e/=o,s*e*e*e+t),ha=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),fa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},ma=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),ga=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ba=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},xa=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),va=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),wa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},ya=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,ka=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,Ca=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,$a=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Sa=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,Ta=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},Ea=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Ia=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Aa=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Pa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Oa=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},La=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},Na=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),Da=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Ma=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},ve=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ne=(e,t,s,o)=>s-ve(o-e,0,s,o)+t,Ra=(e,t,s,o)=>{if(e<o/2)return Ne(e*2,0,s,o)*0.5+t;return ve(e*2-o,0,s,o)*0.5+s*0.5+t},Cu={linear:la,easeInQuad:ca,easeOutQuad:da,easeInOutQuad:pa,easeInCubic:ua,easeOutCubic:ha,easeInOutCubic:fa,easeInQuart:ma,easeOutQuart:ga,easeInOutQuart:ba,easeInQuint:xa,easeOutQuint:va,easeInOutQuint:wa,easeInSine:ya,easeOutSine:ka,easeInOutSine:Ca,easeInExpo:$a,easeOutExpo:Sa,easeInOutExpo:Ta,easeInCirc:Ea,easeOutCirc:Ia,easeInOutCirc:Aa,easeInElastic:Pa,easeOutElastic:Oa,easeInOutElastic:La,easeInBack:Na,easeOutBack:Da,easeInOutBack:Ma,easeInBounce:Ne,easeOutBounce:ve,easeInOutBounce:Ra};function za(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function De(e,t,s={}){e.style.animation=za(t,s)}function Su(e){e.style.animation=""}function ja(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Tu(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;De(a,t,{...n,delay:i})})}async function Eu(e,t){for(let s of t)De(e,s.name,s.options),await ja(e)}var Iu={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function Au(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Pu(e,t){let s=`
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function H(e,t,s){return(o)=>vt(e,o,t,s)}function Ci(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function $i(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var yt="./Button-bpjmfkq6.stx";var kt={variant:l.oneOf(["primary","secondary","outline","ghost","danger"]),size:l.oneOf(["xs","sm","md","lg","xl"]),disabled:l.boolean,loading:l.boolean,type:l.oneOf(["button","submit","reset"]),fullWidth:l.boolean,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Ai=H("Button",kt);function Pi(e){return Ie(e,"Button","onClick")}function Li(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function Oi(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var $t="./Calendar-5vs6x7gj.stx";var Tt="./DateRangePicker-4zmf34e4.stx";var It="./EmptyState-s790dbym.stx";var Pt="./ThemeToggle-4wm9zare.stx";var Ot="./Card-r55zpjqh.stx";var Dt="./Checkbox-kepzk3h5.stx";var Rt="./Combobox-9n04ec5w.stx";var jt="./ComboboxButton-4r6a45s1.stx";var Ft="./ComboboxInput-1gyfpnca.stx";var Bt="./ComboboxOption-wkw70js7.stx";var Wt="./ComboboxOptions-zhr9b6rx.stx";var _t="./CommandPalette-qqjdbcyg.stx";var Jt="./CommandPaletteItem-7290ce1z.stx";var Yt="./Dialog-pdq8rxvy.stx";var Qt="./DialogBackdrop-de5m5m4w.stx";var es="./DialogDescription-gth4c2kx.stx";var ss="./DialogPanel-vhdqymc2.stx";var ns="./DialogTitle-ke58hh68.stx";var rs="./Drawer-nmq100vy.stx";var ls="./Dropdown-hb8ks69x.stx";var ds="./DropdownButton-wxc25hsy.stx";var us="./DropdownItem-af0vzc8a.stx";var fs="./DropdownItems-bkz7jkyz.stx";var gs="./Form-ewzy10ye.stx";var bs={action:l.string,method:l.oneOf(["GET","POST","PUT","DELETE","PATCH"]),validationSchema:l.object,initialValues:l.object,validateOnChange:l.boolean,validateOnBlur:l.boolean,onSubmit:l.func,onError:l.func,className:l.string},Fl=H("Form",bs);var vs="./Image-6d7ssp75.stx";var ys="./EmailInput-57626391.stx";var Cs="./NumberInput-pq4k2k4k.stx";var Ss="./PasswordInput-dg41ktgd.stx";var Es="./SearchInput-w15r5t95.stx";var As="./TextInput-nknmz9md.stx";var Ps={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string},Ls={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,leftIcon:l.string,rightIcon:l.string,clearable:l.boolean,maxLength:l.number,showCount:l.boolean,type:l.oneOf(["text","date","time","datetime-local","month","week","url","tel","color","search","email","number","password"]),pattern:l.string,list:l.string,minLength:l.number,htmlSize:l.number,autofocus:l.boolean},Os={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,min:l.number,max:l.number,step:l.number,showControls:l.boolean},Ns={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,showStrength:l.boolean},Ds={value:l.string,onChange:l.func,placeholder:l.string,disabled:l.boolean,readonly:l.boolean,size:l.oneOf(["sm","md","lg"]),error:l.boolean,label:l.string,helperText:l.string,required:l.boolean,className:l.string,inputClassName:l.string,onSearch:l.func,loading:l.boolean},Ql=H("TextInput",Ls),Zl=H("EmailInput",Ps),ec=H("PasswordInput",Ns),tc=H("NumberInput",Os),sc=H("SearchInput",Ds);var Rs="./Listbox-83j2q4x6.stx";var js="./ListboxButton-gan8e3nw.stx";var Fs="./ListboxLabel-ka0hfm7b.stx";var Bs="./ListboxOption-gpaqvk3s.stx";var Ws="./ListboxOptions-2928864k.stx";var _s="./FilterChip-00ja5jhz.stx";var Js="./FilterChips-7pnzycfd.stx";var Ys="./ListRow-8d3e1yxh.stx";var Qs="./NavBar-qqrrhdnk.stx";var eo="./SectionCard-8ctdacjr.stx";var so="./TabBar-8143650x.stx";var no="./TabBarItem-kddfnhk3.stx";var ro="./Navigator-1yk1c3pp.stx";var lo="./Notification-b3cz24f0.stx";var po="./Pager-kh6s65t2.stx";var ho="./PagerDots-076w890y.stx";var mo="./Pagination-8bhbkpcp.stx";var bo="./Checkout-crbegxyv.stx";var vo="./DefaultPaymentMethod-ss3x61tr.stx";var yo="./PaymentMethods-z4hhr0kv.stx";var Co="./SubscriptionCheckout-rdcv32n1.stx";var So="./Popover-khtvagcs.stx";var Eo="./PopoverButton-3w6550hv.stx";var Ao="./PopoverPanel-d84gk1w1.stx";var Lo="./Portal-m73vz879.stx";var No="./Progress-2qzb77kc.stx";var Mo="./Radio-8153x74w.stx";var zo="./RadioGroup-smqcqgds.stx";var Ho="./RadioGroupDescription-z34r9avr.stx";var Vo="./RadioGroupLabel-ka0hfm7b.stx";var qo="./RadioGroupOption-twcw1b2a.stx";var Ko="./Select-61zv5tr7.stx";var Uo="./Sidebar-8dygywjv.stx";var Go="./SidebarFooter-s7skj92y.stx";var Xo="./SidebarHeader-x7jdhmyr.stx";var Zo="./SidebarItem-r4f2pref.stx";var tn="./SidebarPinned-48kyk193.stx";var on="./SidebarSection-5sqza2j6.stx";var an="./SidebarSpace-bwv98azf.stx";var ln="./SidebarSpaces-mdtrynr2.stx";var dn="./SidebarSpaceSwitcher-1mycft2g.stx";var ne={blue:"#0088ff",red:"#ff383c",pink:"#ff2d55",orange:"#ff8d28",yellow:"#ffcc00",green:"#34c759",teal:"#00c3d0",cyan:"#00c0e8",indigo:"#6155f5",purple:"#cb30e0",brown:"#ac7f5e",gray:"#8e8e93"},_={pane:["bg-[#f2f2f4]/90 dark:bg-[#1c1c1e]/88","backdrop-blur-[50px] backdrop-saturate-[180%]","text-black dark:text-white","select-none"].join(" "),selection:"accent",layers:{shimmerRim:!0},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[10px] pb-[10px]",sectionHeader:["group/section flex w-full items-center","pl-[8px] pr-[6px] pt-[16px] pb-[5px]","text-[11px] font-semibold leading-[13px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/45 dark:text-[#ebebf5]/45","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col",item:{base:["flex w-full items-center","h-[32px] rounded-[8px] pl-[4px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-black dark:text-white","transition-colors duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-black/4 dark:hover:bg-white/6",active:"",pressed:"active:bg-black/10 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[18px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[11px] w-[11px]","text-[#3c3c43]/55 dark:text-[#ebebf5]/55","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[20px] w-[22px] shrink-0 items-center justify-center mr-[7px]",icon:"h-[17px] w-[17px]",image:"h-[20px] w-[20px] rounded-[4px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[13px] leading-[16px]","text-[#3c3c43]/60 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},pn={selection:"classes",pane:"bg-[#f4f4f3] dark:bg-neutral-950 text-zinc-950 dark:text-white select-none",layers:{},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-5",sectionHeader:"group/section flex w-full items-center gap-2.5 px-4 pb-2 pt-5 text-[13px] font-semibold uppercase tracking-[0.12em] text-zinc-400 dark:text-zinc-500",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[16px] px-3.5 py-2 text-[14px] leading-tight transition-colors duration-150",hover:"hover:bg-[#ececea] hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e7e7e5] text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-[#e2e2e0] dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-500 dark:text-zinc-500",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/70 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},un={selection:"classes",pane:"bg-[#f3f3f1]/48 dark:bg-neutral-950/32 backdrop-blur-3xl backdrop-saturate-150 text-zinc-950 dark:text-white select-none",layers:{tint:"bg-[linear-gradient(112deg,rgba(255,255,255,0.20)_0%,rgba(255,255,255,0.04)_45%,rgba(226,226,222,0.16)_100%)] dark:bg-[linear-gradient(112deg,rgba(255,255,255,0.08)_0%,rgba(255,255,255,0.02)_46%,rgba(255,255,255,0.06)_100%)]"},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-5 py-2",sectionHeader:"group/section flex w-full items-center gap-2.5 px-3 pb-1.5 pt-3 rounded-[14px] text-[12px] font-semibold uppercase tracking-[0.10em] text-zinc-500/80 dark:text-zinc-400/80",sectionChevron:"i-f7-chevron-down h-3 w-3 ml-auto opacity-0 group-hover/section:opacity-100 transition-opacity duration-150 transition-transform duration-200",sectionGroup:"flex flex-col space-y-1",item:{base:"flex w-full items-center gap-3 rounded-[14px] px-3 py-1.5 text-[13.5px] leading-tight transition-colors duration-150",hover:"hover:bg-white/38 hover:text-zinc-950 dark:hover:bg-white/10",active:"bg-[#e8e8e6]/90 text-zinc-950 dark:bg-white/12 dark:text-white",pressed:"active:bg-white/50 dark:active:bg-white/15",disabled:"opacity-50 pointer-events-none",disclosure:"flex h-4 w-4 shrink-0 items-center justify-center",chevron:"i-f7-chevron-right h-3 w-3 opacity-50 transition-transform duration-200",iconSlot:"flex h-5 w-5 shrink-0 items-center justify-center",icon:"h-[18px] w-[18px] text-zinc-600 dark:text-zinc-400",image:"h-5 w-5 rounded object-cover",label:"flex-1 truncate text-left text-zinc-700 dark:text-zinc-300",count:"ml-auto grid h-5 min-w-5 place-items-center rounded-full bg-white/72 px-1.5 text-[11px] font-medium text-zinc-500 shadow-sm dark:bg-white/10 dark:text-zinc-400",indentPerLevel:12}},hn={selection:"classes",pane:["bg-[#f7f5f1]/92 dark:bg-[#1a1a1c]/92","backdrop-blur-[40px] backdrop-saturate-[160%]","text-[#2c2a28] dark:text-[#ededf0]","select-none"].join(" "),layers:{tint:["bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,251,242,0.55))_0%,rgba(255,255,255,0)_38%)]","dark:bg-[linear-gradient(180deg,var(--stx-sidebar-tint,rgba(255,255,255,0.05))_0%,rgba(255,255,255,0)_42%)]"].join(" ")},scrollArea:"flex-1 overflow-y-auto overflow-x-hidden px-[16px] pb-[8px]",sectionHeader:["group/section flex w-full items-center","px-[8px] pt-[14px] pb-[4px]","text-[11px] font-medium leading-[13px]","opacity-55"].join(" "),sectionChevron:["i-f7-chevron-down h-[10px] w-[10px] ml-auto","opacity-0 group-hover/section:opacity-100 transition-opacity duration-150","transition-transform duration-200"].join(" "),sectionGroup:"flex flex-col space-y-[2px]",item:{base:["flex w-full items-center","h-[30px] rounded-[8px] pl-[6px] pr-[8px]","text-[13px] leading-[16px] font-normal","text-current","transition-[background-color,box-shadow,color] duration-150 ease-out","cursor-default"].join(" "),hover:"hover:bg-white/55 dark:hover:bg-white/8",active:["bg-white dark:bg-white/14","font-medium","shadow-[0_1px_2px_rgba(0,0,0,0.08)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.35)]","ring-1 ring-black/5 dark:ring-white/8"].join(" "),pressed:"active:bg-white/80 dark:active:bg-white/18",disabled:"opacity-40 pointer-events-none",disclosure:"flex h-[16px] w-[16px] shrink-0 items-center justify-center",chevron:["i-f7-chevron-right h-[10px] w-[10px] opacity-45","transition-transform duration-200 ease-out"].join(" "),iconSlot:"flex h-[18px] w-[18px] shrink-0 items-center justify-center mr-[8px]",icon:"h-[16px] w-[16px]",image:"h-[18px] w-[18px] rounded-[5px] object-cover shadow-sm",label:"flex-1 truncate text-left",count:["ml-[8px] shrink-0 tabular-nums","text-[12px] leading-[16px] opacity-45"].join(" "),indentPerLevel:14}},fn={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},mn={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},gn={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Ae={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:hn,workspace:pn,desktop:un,solid:fn,transparent:mn,vibrancy:gn};function Vd(e){return Ae[e||"macos"]||Ae.macos}function Bd(e){if(!e)return;return ne[e]||e}var bn=ne.gray;function q(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Pe(e){return{light:{from:q(e,35,"#ffffff"),to:q(e,12.5,"#ffffff"),ink:q(e,22,"#17171b"),accent:q(e,88,"#2a2a30")},dark:{from:q(e,27,"#101014"),to:q(e,10,"#08080b"),ink:q(e,12,"#f4f4f7"),accent:q(e,74,"#ffffff")}}}function Kd(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function xn(e){if(!e)return Pe(bn);if(typeof e!=="string")return e;return Pe(ne[e]||e)}function vn(e){return[`--stx-space-light-from: ${e.light.from}`,`--stx-space-light-to: ${e.light.to}`,`--stx-space-light-ink: ${e.light.ink}`,`--stx-space-light-accent: ${e.light.accent}`,`--stx-space-dark-from: ${e.dark.from}`,`--stx-space-dark-to: ${e.dark.to}`,`--stx-space-dark-ink: ${e.dark.ink}`,`--stx-space-dark-accent: ${e.dark.accent}`].join("; ")}function Le(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function wn(e){let t=xn(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:Le(e.action,e.id,"action","i-f7-plus"),clear:Le(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:vn(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function _d(e){return(e||[]).map(wn)}function Ud(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function Jd(e){return e.map((t)=>t.tint)}var kn="./Skeleton-m4p66zcs.stx";var $n="./Spinner-vhnc3y03.stx";var Tn="./Stepper-68gxcmej.stx";var In="./StepperStep-zf4pq1s0.stx";class ae{storage;namespace;watchers=new Map;encryptionKey="stx-storage-key";constructor(e="local",t=""){if(this.storage=e==="local"?globalThis.localStorage:globalThis.sessionStorage,this.namespace=t,typeof window<"u")window.addEventListener("storage",this.handleStorageEvent.bind(this))}handleStorageEvent(e){if(!e.key)return;let t=this.namespace&&e.key.startsWith(`${this.namespace}:`)?e.key.slice(this.namespace.length+1):e.key,s=this.watchers.get(t);if(s){let o=e.oldValue?JSON.parse(e.oldValue).value:null,n=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((a)=>a(n,o,t))}}encrypt(e){let t="";for(let s=0;s<e.length;s++)t+=String.fromCharCode(e.charCodeAt(s)^this.encryptionKey.charCodeAt(s%this.encryptionKey.length));return btoa(t)}decrypt(e){try{let t=atob(e),s="";for(let o=0;o<t.length;o++)s+=String.fromCharCode(t.charCodeAt(o)^this.encryptionKey.charCodeAt(o%this.encryptionKey.length));return s}catch{return e}}compress(e){if(e.length<100)return e;let t={},s=256,o=[],n="";for(let a=0;a<e.length;a++){let r=e.charAt(a),i=n+r;if(t[i]!==void 0)n=i;else o.push(n.length>1?t[n]:n.charCodeAt(0)),t[i]=s++,n=r}if(n!=="")o.push(n.length>1?t[n]:n.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,n=String.fromCharCode(t[0]),a=n;for(let r=1;r<t.length;r++){let i=t[r],c;if(s[i]!==void 0)c=s[i];else if(i===o)c=n+n.charAt(0);else return e;a+=c,s[o++]=n+c.charAt(0),n=c}return a}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),n=this.get(e),a={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(a);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,n)}catch(r){console.error("Storage set error:",r)}}get(e){let t=this.getKey(e);try{let s=this.storage.getItem(t);if(!s)return null;if(s.match(/^[A-Z0-9+/]+=*$/i))try{s=this.decrypt(s)}catch{}if(s.startsWith("["))try{s=this.decompress(s)}catch{}let o=JSON.parse(s);if(o.expire&&Date.now()-o.timestamp>o.expire)return this.remove(e),null;return o.value}catch(s){return console.error("Storage get error:",s),null}}watch(e,t){if(!this.watchers.has(e))this.watchers.set(e,new Set);return this.watchers.get(e).add(t),()=>{let s=this.watchers.get(e);if(s){if(s.delete(t),s.size===0)this.watchers.delete(e)}}}notifyWatchers(e,t,s){let o=this.watchers.get(e);if(o)o.forEach((n)=>n(t,s,e))}remove(e){let t=this.getKey(e),s=this.get(e);this.storage.removeItem(t),this.notifyWatchers(e,null,s)}clear(){if(this.namespace)this.keys().forEach((t)=>this.remove(t));else this.storage.clear()}has(e){return this.get(e)!==null}keys(){let e=Object.keys(this.storage);if(this.namespace){let t=`${this.namespace}:`;return e.filter((s)=>s.startsWith(t)).map((s)=>s.slice(t.length))}return e}size(){return this.keys().length}getQuota(){if("storage"in navigator&&"estimate"in navigator.storage)return null;try{let e=0;for(let s=0;s<this.storage.length;s++){let o=this.storage.key(s);if(o){let n=this.storage.getItem(o)||"";e+=o.length+n.length}}let t=5242880;return{usage:e*2,quota:t,percentage:e*2/t*100}}catch{return null}}setMany(e,t){Object.entries(e).forEach(([s,o])=>{this.set(s,o,t)})}getMany(e){let t={};return e.forEach((s)=>{t[s]=this.get(s)}),t}removeMany(e){e.forEach((t)=>this.remove(t))}}var wp={local:new ae("local"),session:new ae("session")};function yp(e="local",t){return new ae(e,t)}var Pn="./Switch-acwd7n07.stx";var On="./Table-0a4y46vd.stx";var Dn="./TableBody-y49bqb1p.stx";var Rn="./TableCell-jhvsxw8b.stx";var jn="./TableHead-e9xvjx2j.stx";var Fn="./TableHeader-krzcx4sv.stx";var Bn="./TableRow-dt8e11aj.stx";var Wn="./Tab-46mxm7f8.stx";var _n="./TabList-76bpx5fp.stx";var Jn="./TabPanel-5htevsq6.stx";var Yn="./Tabs-1swcxmfb.stx";var Qn="./Teleport-vqs75x36.stx";var ea="./Textarea-9xmhjqp8.stx";var sa="./Tooltip-rg1c2zrc.stx";var na="./Transition-7m0mk45s.stx";var ra="./Video-rhy7dskw.stx";var la="./VirtualList-fa7v5a3h.stx";var da="./VirtualTable-kp7b3wyv.stx";var pa=0;function Oe(e="a11y"){return`${e}-${++pa}-${Date.now()}`}function mu(e,t,s={}){let{visible:o=!1,id:n=Oe("label")}=s,a=document.createElement(o?"label":"span");if(a.id=n,a.textContent=e,!o)Object.assign(a.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"});if(t)if(t.setAttribute("aria-labelledby",n),t.parentElement)t.parentElement.insertBefore(a,t);else document.body.appendChild(a);return n}function gu(e,t){let s=Oe("desc"),o=document.createElement("span");if(o.id=s,o.textContent=e,Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t)if(t.setAttribute("aria-describedby",s),t.parentElement)t.parentElement.insertBefore(o,t);else document.body.appendChild(o);return s}function bu(e,t="polite"){let s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live",t),s.setAttribute("aria-atomic","true"),Object.assign(s.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(s),setTimeout(()=>{s.textContent=e},100),setTimeout(()=>{s.parentNode?.removeChild(s)},1000)}function xe(e){let t=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(e.querySelectorAll(t)).filter((s)=>s.offsetParent!==null)}function xu(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:n=!0,clickOutsideDeactivates:a=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,p=!1,u=!1,d=null,g=(x)=>{if(u)return;if(n&&x.key==="Escape"){x.preventDefault(),C();return}if(x.key==="Tab"){let E=xe(e);if(E.length===0){x.preventDefault();return}let A=E[0],S=E[E.length-1];if(x.shiftKey){if(document.activeElement===A)x.preventDefault(),S.focus()}else if(document.activeElement===S)x.preventDefault(),A.focus()}},f=(x)=>{if(u)return;if(!e.contains(x.target)){if(typeof r==="function"){if(!r(x)&&a)C()}else if(!r&&a)C()}};function y(){if(p)return;p=!0,d=document.activeElement;let x=s||xe(e)[0];if(x&&typeof x.focus==="function")x.focus();document.addEventListener("keydown",g),document.addEventListener("click",f),i?.()}function C(){if(!p)return;p=!1;let x=o||d;if(x&&typeof x.focus==="function")x.focus();document.removeEventListener("keydown",g),document.removeEventListener("click",f),c?.()}function k(){u=!0}function b(){u=!1}return{activate:y,deactivate:C,pause:k,unpause:b}}function vu(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:n="both",loop:a=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),p=(d)=>{let g=c();if(d<0||d>=g.length)return;g.forEach((f,y)=>{if(y===d){if(f.setAttribute("tabindex","0"),typeof f.focus==="function")f.focus()}else f.setAttribute("tabindex","-1")}),i=d,r?.(d,g[d])},u=(d)=>{let f=c().length-1,y=!1,C=i;switch(d.key){case"ArrowRight":if(n==="horizontal"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowLeft":if(n==="horizontal"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"ArrowDown":if(n==="vertical"||n==="both"){if(C=i+1,C>f)C=a?0:f;y=!0}break;case"ArrowUp":if(n==="vertical"||n==="both"){if(C=i-1,C<0)C=a?f:0;y=!0}break;case"Home":C=0,y=!0;break;case"End":C=f,y=!0;break}if(y)d.preventDefault(),p(C)};return p(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var wu={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function yu(e){return document.activeElement===e}function ku(e,t){let s=t||document.activeElement,o=xe(document.body),n=o.indexOf(s);if(n===-1)return;let a=e==="next"?n+1:n-1,r=o[a];if(r)r.focus()}function Cu(e){if(e.getAttribute("aria-hidden")==="true")return!1;let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1;return!0}var $u={setExpanded(e,t){e.setAttribute("aria-expanded",String(t))},setSelected(e,t){e.setAttribute("aria-selected",String(t))},setChecked(e,t){e.setAttribute("aria-checked",String(t))},setDisabled(e,t){if(e.setAttribute("aria-disabled",String(t)),t)e.setAttribute("tabindex","-1");else e.removeAttribute("tabindex")},setHidden(e,t){if(t)e.setAttribute("aria-hidden","true");else e.removeAttribute("aria-hidden")},setPressed(e,t){e.setAttribute("aria-pressed",String(t))},setInvalid(e,t){e.setAttribute("aria-invalid",String(t))},setRequired(e,t){e.setAttribute("aria-required",String(t))},setLive(e,t){e.setAttribute("aria-live",t)},setBusy(e,t){e.setAttribute("aria-busy",String(t))}};function Su(e){let t=document.createElement("span");return t.textContent=e,t.className="sr-only",Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}),t}function Tu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Eu(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Iu(){if(typeof window.matchMedia==="function"){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}return null}function Au(e,t="Skip to main content"){let s=document.createElement("a");return s.href=`#${e}`,s.textContent=t,s.className="skip-link",Object.assign(s.style,{position:"absolute",top:"-40px",left:"0",background:"#000",color:"#fff",padding:"8px",textDecoration:"none",zIndex:"100"}),s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),s}function Pu(e){let t=[],s=(o)=>{let n=e.getAttribute(o);if(n){let a=n.split(" ");for(let r of a)if(!document.getElementById(r))t.push(`${o} references non-existent ID: ${r}`)}};return s("aria-labelledby"),s("aria-describedby"),s("aria-controls"),s("aria-owns"),s("aria-activedescendant"),t}var ua=(e,t,s,o)=>s*e/o+t,ha=(e,t,s,o)=>(e/=o,s*e*e+t),fa=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),ma=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e+t;return e--,-s/2*(e*(e-2)-1)+t},ga=(e,t,s,o)=>(e/=o,s*e*e*e+t),ba=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),xa=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e+t;return e-=2,s/2*(e*e*e+2)+t},va=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),wa=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ya=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e+t;return e-=2,-s/2*(e*e*e*e-2)+t},ka=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),Ca=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),$a=(e,t,s,o)=>{if(e/=o/2,e<1)return s/2*e*e*e*e*e+t;return e-=2,s/2*(e*e*e*e*e+2)+t},Sa=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,Ta=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,Ea=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,Ia=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,Aa=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,Pa=(e,t,s,o)=>{if(e===0)return t;if(e===o)return t+s;if(e/=o/2,e<1)return s/2*2**(10*(e-1))+t;return e--,s/2*(-(2**(-10*e))+2)+t},La=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),Oa=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),Na=(e,t,s,o)=>{if(e/=o/2,e<1)return-s/2*(Math.sqrt(1-e*e)-1)+t;return e-=2,s/2*(Math.sqrt(1-e*e)+1)+t},Da=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t},Ma=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!a)a=o*0.3;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)+s+t},Ra=(e,t,s,o)=>{let n=1.70158,a=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!a)a=o*0.44999999999999996;if(r<Math.abs(s))r=s,n=a/4;else n=a/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-n)*(2*Math.PI)/a))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-n)*(2*Math.PI)/a)*0.5+s+t},za=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),ja=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),Ha=(e,t,s,o)=>{let n=1.70158;if(e/=o/2,e<1)return n*=1.525,s/2*(e*e*((n+1)*e-n))+t;return e-=2,n*=1.525,s/2*(e*e*((n+1)*e+n)+2)+t},ve=(e,t,s,o)=>{if(e/=o,e<0.36363636363636365)return s*(7.5625*e*e)+t;else if(e<0.7272727272727273)return e-=0.5454545454545454,s*(7.5625*e*e+0.75)+t;else if(e<0.9090909090909091)return e-=0.8181818181818182,s*(7.5625*e*e+0.9375)+t;else return e-=0.9545454545454546,s*(7.5625*e*e+0.984375)+t},Ne=(e,t,s,o)=>s-ve(o-e,0,s,o)+t,Fa=(e,t,s,o)=>{if(e<o/2)return Ne(e*2,0,s,o)*0.5+t;return ve(e*2-o,0,s,o)*0.5+s*0.5+t},Ou={linear:ua,easeInQuad:ha,easeOutQuad:fa,easeInOutQuad:ma,easeInCubic:ga,easeOutCubic:ba,easeInOutCubic:xa,easeInQuart:va,easeOutQuart:wa,easeInOutQuart:ya,easeInQuint:ka,easeOutQuint:Ca,easeInOutQuint:$a,easeInSine:Sa,easeOutSine:Ta,easeInOutSine:Ea,easeInExpo:Ia,easeOutExpo:Aa,easeInOutExpo:Pa,easeInCirc:La,easeOutCirc:Oa,easeInOutCirc:Na,easeInElastic:Da,easeOutElastic:Ma,easeInOutElastic:Ra,easeInBack:za,easeOutBack:ja,easeInOutBack:Ha,easeInBounce:Ne,easeOutBounce:ve,easeInOutBounce:Fa};function Va(e,t={}){let{duration:s="1s",timing:o="ease",delay:n="0s",iteration:a="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${n} ${a} ${r} ${i} ${c}`}function De(e,t,s={}){e.style.animation=Va(t,s)}function Du(e){e.style.animation=""}function Ba(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function Mu(e,t,s={}){let{stagger:o=100,...n}=s;e.forEach((a,r)=>{let i=`${r*o}ms`;De(a,t,{...n,delay:i})})}async function Ru(e,t){for(let s of t)De(e,s.name,s.options),await Ba(e)}var zu={fadeIn:"animate-fade-in",fadeOut:"animate-fade-out",slideInUp:"animate-slide-in-up",slideInDown:"animate-slide-in-down",slideInLeft:"animate-slide-in-left",slideInRight:"animate-slide-in-right",zoomIn:"animate-zoom-in",zoomOut:"animate-zoom-out",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping",pulse:"animate-pulse"};function ju(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function Hu(e,t){let s=`
|
|
12
12
|
@keyframes ${e} {
|
|
13
13
|
${Object.entries(t).map(([n,a])=>{let r=Object.entries(a).map(([i,c])=>`${i}: ${c};`).join(" ");return`${n} { ${r} }`}).join(`
|
|
14
14
|
`)}
|
|
15
15
|
}
|
|
16
|
-
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function
|
|
16
|
+
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function qa(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:o=1000,easing:n="ease",delay:a=0,iterations:r=1,direction:i="normal",fill:c="both"}=s;return e.animate([...t],{duration:o,easing:n,delay:a,iterations:r,direction:i,fill:c})}var Wa={fadeIn:[{offset:0,opacity:0},{offset:1,opacity:1}],fadeOut:[{offset:0,opacity:1},{offset:1,opacity:0}],slideInUp:[{offset:0,transform:"translateY(100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInDown:[{offset:0,transform:"translateY(-100%)",opacity:0},{offset:1,transform:"translateY(0)",opacity:1}],slideInLeft:[{offset:0,transform:"translateX(-100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideInRight:[{offset:0,transform:"translateX(100%)",opacity:0},{offset:1,transform:"translateX(0)",opacity:1}],slideOutUp:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(-100%)",opacity:0}],slideOutDown:[{offset:0,transform:"translateY(0)",opacity:1},{offset:1,transform:"translateY(100%)",opacity:0}],slideOutLeft:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(-100%)",opacity:0}],slideOutRight:[{offset:0,transform:"translateX(0)",opacity:1},{offset:1,transform:"translateX(100%)",opacity:0}],zoomIn:[{offset:0,transform:"scale(0)",opacity:0},{offset:0.5,opacity:1},{offset:1,transform:"scale(1)"}],zoomOut:[{offset:0,transform:"scale(1)",opacity:1},{offset:0.5,opacity:1},{offset:1,transform:"scale(0)",opacity:0}],rotate:[{offset:0,transform:"rotate(0deg)"},{offset:1,transform:"rotate(360deg)"}],bounce:[{offset:0,transform:"translateY(0)"},{offset:0.2,transform:"translateY(0)"},{offset:0.4,transform:"translateY(-30px)"},{offset:0.43,transform:"translateY(-30px)"},{offset:0.53,transform:"translateY(0)"},{offset:0.7,transform:"translateY(-15px)"},{offset:0.8,transform:"translateY(0)"},{offset:0.9,transform:"translateY(-4px)"},{offset:1,transform:"translateY(0)"}],pulse:[{offset:0,transform:"scale(1)"},{offset:0.5,transform:"scale(1.05)"},{offset:1,transform:"scale(1)"}],shake:[{offset:0,transform:"translateX(0)"},{offset:0.1,transform:"translateX(-10px)"},{offset:0.2,transform:"translateX(10px)"},{offset:0.3,transform:"translateX(-10px)"},{offset:0.4,transform:"translateX(10px)"},{offset:0.5,transform:"translateX(-10px)"},{offset:0.6,transform:"translateX(10px)"},{offset:0.7,transform:"translateX(-10px)"},{offset:0.8,transform:"translateX(10px)"},{offset:0.9,transform:"translateX(-10px)"},{offset:1,transform:"translateX(0)"}],swing:[{offset:0,transform:"rotate(0deg)"},{offset:0.2,transform:"rotate(15deg)"},{offset:0.4,transform:"rotate(-10deg)"},{offset:0.6,transform:"rotate(5deg)"},{offset:0.8,transform:"rotate(-5deg)"},{offset:1,transform:"rotate(0deg)"}],flip:[{offset:0,transform:"perspective(400px) rotateY(0)",animationTimingFunction:"ease-out"},{offset:0.4,transform:"perspective(400px) translateZ(150px) rotateY(170deg)",animationTimingFunction:"ease-out"},{offset:0.5,transform:"perspective(400px) translateZ(150px) rotateY(190deg)",animationTimingFunction:"ease-in"},{offset:0.8,transform:"perspective(400px) rotateY(360deg)",animationTimingFunction:"ease-in"},{offset:1,transform:"perspective(400px)",animationTimingFunction:"ease-in"}],rubberBand:[{offset:0,transform:"scale(1)"},{offset:0.3,transform:"scaleX(1.25) scaleY(0.75)"},{offset:0.4,transform:"scaleX(0.75) scaleY(1.25)"},{offset:0.5,transform:"scaleX(1.15) scaleY(0.85)"},{offset:0.65,transform:"scaleX(0.95) scaleY(1.05)"},{offset:0.75,transform:"scaleX(1.05) scaleY(0.95)"},{offset:1,transform:"scale(1)"}],heartbeat:[{offset:0,transform:"scale(1)"},{offset:0.14,transform:"scale(1.3)"},{offset:0.28,transform:"scale(1)"},{offset:0.42,transform:"scale(1.3)"},{offset:0.7,transform:"scale(1)"}]};function Vu(e,t,s={}){return qa(e,Wa[t],s)}async function Ka(){try{let e=await import("ts-syntax-highlighter");return e.createHighlighter}catch{return null}}var we=null,Re="github-light",ze="github-dark";function ye(e){return`<pre class="syntax"><code>${e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</code></pre>`}async function _a(){if(!we){let e=await Ka();if(!e)throw Error("ts-syntax-highlighter could not be loaded");we=await e({theme:"github-light"})}return we}var Ua=/<span class="([^"]*)"[^>]*style="([^"]*)"/g,je=/^token\s+(\S.*)$/;function Me(e){let t=[];for(let s of e.matchAll(Ua)){let o=je.exec(s[1]??"");if(o)t.push([o[1].trim(),s[2]??""])}return t}function Ja(e){return/^[\w-]+$/.test(e)}async function Ga(e,t,s){let o,n;try{o=await e.highlight(t,s,{theme:Re}),n=await e.highlight(t,s,{theme:ze})}catch{return null}let a=o?.html,r=n?.html;if(!a||!r)return null;let i=Me(a),c=Me(r);if(i.length===0||i.length!==c.length)return null;let p=new Map;for(let k=0;k<i.length;k++){let[b,x]=i[k],E=c[k][1];if(!b||!x||!E||p.has(b)||!Ja(b))continue;p.set(b,{light:x,dark:E})}if(p.size===0)return null;let u=[],d=[];for(let[k,{light:b,dark:x}]of p)u.push(`.syntax .token.${k} { ${b} }`),d.push(`.syntax .token.${k} { ${x} }`);let g=/\.syntax\s*\{([^}]*)\}/.exec(n.css??"")?.[1],f=g?g.split(";").map((k)=>k.trim()).filter((k)=>/^(?:background-color|color)\s*:/.test(k)).join("; "):"";if(f)d.unshift(`.syntax { ${f} }`);let y=[o.css??"",u.join(`
|
|
17
17
|
`),`@media (prefers-color-scheme: dark) {
|
|
18
18
|
:root:not(.light) ${d.join(`
|
|
19
19
|
:root:not(.light) `)}
|
|
20
20
|
}`,d.map((k)=>`.dark ${k}`).join(`
|
|
21
21
|
`)].filter(Boolean).join(`
|
|
22
|
-
`);return{html:a.replace(/(<span class="[^"]*")[^>]*?\s+style="[^"]*"/g,(k,b)=>je.test(/class="([^"]*)"/.exec(b)?.[1]??"")?b:k),css:y}}async function Du(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:n=!1,wrapLines:a=!0}=t,r=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?ze:Re,i;try{i=await Ba()}catch{return{html:ye(e),css:"",language:o,theme:r}}if(s==="auto"){let d=await Ka(i,e,o);if(d)return{html:d.html,css:d.css,language:o,theme:"auto"}}let c;try{c=await i.highlight(e,o,{theme:r})}catch{return{html:ye(e),css:"",language:o,theme:r}}let p=c,u=typeof p==="string"?{html:p,css:""}:{html:p?.html??ye(e),css:p?.css??""};return{html:u.html,css:u.css,language:o,theme:r}}function Mu(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function Ru(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var F=null,_a=(e)=>e===1?0:1;function re(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function ke(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function ju(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:n={},dateTimeFormats:a={},numberFormats:r={},missing:i,warnMissing:c=!0}=e;function p(b,x={}){let E=re(o[t],b);if(E===void 0&&s)E=re(o[s],b);if(E===void 0){if(i){let A=i(t,b);if(A)return ke(A,x)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${b}" in locale "${t}"`);return b}if(typeof E==="string")return ke(E,x);return String(E)}function u(b,x,E={}){let A=p(b,{...E,count:x});if(A.includes("|")){let S=A.split("|").map((K)=>K.trim()),z=(n[t]||_a)(x,t),B=S[z]||S[S.length-1];return ke(B,{...E,count:x})}return A}function d(b,x="default"){let E=typeof b==="number"?new Date(b):b,A=a[x]||a.default||{};return new Intl.DateTimeFormat(t,A).format(E)}function g(b,x="default"){let E=r[x]||r.default||{};return new Intl.NumberFormat(t,E).format(b)}function f(b){if(re(o[t],b)!==void 0)return!0;if(s)return re(o[s],b)!==void 0;return!1}function y(b){if(!o[b]){console.warn(`[i18n] Locale "${b}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=b}function C(b,x){if(!o[b])o[b]={};o[b]={...o[b],...x}}function k(b){delete o[b]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:y,t:p,tc:u,d,n:g,te:f,addMessages:C,removeLocale:k}}function Hu(e){F=e}function Fu(){return F}function Vu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return F.t(e,t)}function Bu(e,t,s){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return F.tc(e,t,s)}function qu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.d(e,t)}function Wu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.n(e,t)}var Ku={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},_u={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},Uu={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function Ju(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function Gu(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var Yu={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function Qu(e={}){let{max:t=10,ttl:s=0,include:o,exclude:n,hooks:a,debug:r=!1}=e,i=new Map,c=0,p=0;function u(...h){if(r)console.log("[KeepAlive]",...h)}function d(h){if(n){if(n instanceof RegExp&&n.test(h))return!1;if(Array.isArray(n)&&n.includes(h))return!1}if(o){if(o instanceof RegExp&&!o.test(h))return!1;if(Array.isArray(o)&&!o.includes(h))return!1}return!0}function g(h){if(!s||!h.expiresAt)return!1;return Date.now()>h.expiresAt}function f(h){let m=i.get(h);if(m)m.lastAccessedAt=Date.now(),m.accessCount++,m.instance.lastAccessedAt=m.lastAccessedAt,i.delete(h),i.set(h,m),u(`Touched: ${h} (access count: ${m.accessCount})`)}function y(){if(i.size===0)return!1;let h=i.keys().next().value;if(!h)return!1;let m=i.get(h);if(m){u(`Evicting LRU: ${h}`);let T=m.instance.hooks;if(T?.onDeactivate)T.onDeactivate(m.instance);if(a?.onDeactivate)a.onDeactivate(m.instance);return i.delete(h),!0}return!1}function C(h,m,T){if(!d(m.type))return u(`Type not cacheable: ${m.type}`),m;if(i.size>=t)y();let M=Date.now(),U={instance:{...m,hooks:T||m.hooks,createdAt:m.createdAt||M,lastAccessedAt:M},accessCount:0,createdAt:M,lastAccessedAt:M,expiresAt:s?M+s:void 0};if(i.set(h,U),u(`Cached: ${h} (size: ${i.size}/${t})`),T?.onMount)T.onMount(U.instance);if(a?.onMount)a.onMount(U.instance);return U.instance}function k(h){let m=i.get(h);if(!m)return p++,u(`Miss: ${h}`),null;if(g(m))return u(`Expired: ${h}`),i.delete(h),p++,null;return c++,f(h),u(`Hit: ${h}`),m.instance}function b(h){let m=i.get(h);if(!m)return!1;if(g(m))return i.delete(h),!1;return!0}function x(h){let m=i.get(h);if(!m)return!1;u(`Removing: ${h}`);let T=m.instance.hooks;if(T?.onUnmount)T.onUnmount(m.instance);if(a?.onUnmount)a.onUnmount(m.instance);return i.delete(h)}function E(){u("Clearing cache"),i.forEach((h)=>{let m=h.instance.hooks;if(m?.onUnmount)m.onUnmount(h.instance);if(a?.onUnmount)a.onUnmount(h.instance)}),i.clear(),c=0,p=0}function A(){let h=0,m=Date.now();for(let[T,M]of i.entries())if(g(M))u(`Pruning expired: ${T}`),x(T),h++;while(i.size>t)if(y())h++;else break;if(h>0)u(`Pruned ${h} entries`);return h}function S(h){let m=k(h);if(!m)return null;u(`Activating: ${h}`);let T=m.hooks;if(T?.onActivate)T.onActivate(m);if(a?.onActivate)a.onActivate(m);if(m.state&&T?.onRestore)T.onRestore(m,m.state);return m}function V(h){let m=i.get(h);if(!m)return!1;u(`Deactivating: ${h}`);let T=m.instance,M=T.hooks;if(M?.onSave)T.state=M.onSave(T);if(M?.onDeactivate)M.onDeactivate(T);if(a?.onDeactivate)a.onDeactivate(T);return!0}function z(){let h=c+p;return{hits:c,misses:p,size:i.size,max:t,hitRate:h>0?c/h:0,keys:Array.from(i.keys())}}function B(){return Array.from(i.keys())}function K(){return i.size}return{cache:C,get:k,has:b,remove:x,clear:E,prune:A,activate:S,deactivate:V,getStats:z,keys:B,size:K}}function Zu(e){let t=new Map;return{set(s,o){if(t.has(s))t.delete(s);if(t.set(s,o),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let o=t.get(s);return t.delete(s),t.set(s,o),o},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function eh(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function th(e,t={}){let{maxSize:s=100,reset:o}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(a){if(n.length<s){if(o)o(a);n.push(a)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var W=new Map;async function ie(e,t){let s=t||e.toString();if(W.has(s))return W.get(s);let o=e();W.set(s,o);try{return await o}catch(n){throw W.delete(s),n}}function oh(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:n,onLoaded:a,onError:r}=t,i="idle",c,p,u=async(d=0)=>{try{if(i==="loading"||i==="loaded"){if(c)return c}i="loading",n?.();let g=await ie(e);return c=g,i="loaded",a?.(g),g}catch(g){let f=g;if(d<s)return await new Promise((y)=>setTimeout(y,o*(d+1))),u(d+1);throw i="error",p=f,r?.(f),f}};return{get state(){return i},get module(){return c},get error(){return p},load:()=>u(),preload:()=>u()}}function Ua(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:n="0px",threshold:a=0.01,placeholder:r,errorContent:i,onLoading:c,onLoaded:p,onError:u}=s,d=!1,g=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return g=new IntersectionObserver(async(y)=>{for(let C of y)if(C.isIntersecting&&!d){d=!0,g?.disconnect();try{c?.();let k=await ie(t);if(p?.(k),k&&typeof k.default?.render==="function"){let b=await k.default.render();e.innerHTML=b}}catch(k){let b=k;if(u?.(b),i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);else e.innerHTML=`<div style="color: red;">Failed to load component: ${b.message}</div>`}}},{root:o,rootMargin:n,threshold:a}),g.observe(e),()=>{g?.disconnect(),g=null}}function nh(e,t,s={}){let o=[],n=Array.from(e);for(let a of n){let r=typeof t==="function"&&t.length>0?()=>t(a):t,i=Ua(a,r,s);o.push(i)}return()=>{o.forEach((a)=>a())}}function Ja(e){return ie(e)}function ah(e){return Promise.all(e.map((t)=>Ja(t)))}function rh(e){if(e)W.delete(e);else W.clear()}function ih(){return{size:W.size,keys:Array.from(W.keys())}}function lh(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ie(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Ga(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:n="50px",threshold:a=0.01,placeholder:r,onLoading:i,onLoaded:c,onError:p}=s;if(r&&typeof r==="string")e.src=r;let u=!1,d=null;return d=new IntersectionObserver((f)=>{for(let y of f)if(y.isIntersecting&&!u)u=!0,d?.disconnect(),i?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(C)=>{let k=Error(`Failed to load image: ${t}`);p?.(k),e.classList.add("error")},{once:!0})},{root:o,rootMargin:n,threshold:a}),d.observe(e),()=>{d?.disconnect(),d=null}}function ch(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((n)=>{let a=n.getAttribute("data-lazy-src");if(a){let r=Ga(n,a,t);o.push(r)}}),()=>{o.forEach((n)=>n())}}var Ce={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function He(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=He(e[o],t[o]);else s[o]=t[o];return s}function Q(e){return He(Ce,e)}var le=Ce;function ph(){return le}function Ya(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,o])=>{if(o)t.push(`--color-${s}: ${o};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,o])=>{if(o)t.push(`--font-${s}: ${o};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,o])=>{if(o)t.push(`--text-${s}: ${o};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,o])=>{if(o)t.push(`--font-weight-${s}: ${o};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,o])=>{if(o)t.push(`--leading-${s}: ${o};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,o])=>{if(o)t.push(`--spacing-${s}: ${o};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,o])=>{if(o)t.push(`--radius-${s}: ${o};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,o])=>{if(o)t.push(`--shadow-${s}: ${o};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,o])=>{if(o)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,o])=>{if(o)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,o])=>{if(o)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});return`:root {
|
|
22
|
+
`);return{html:a.replace(/(<span class="[^"]*")[^>]*?\s+style="[^"]*"/g,(k,b)=>je.test(/class="([^"]*)"/.exec(b)?.[1]??"")?b:k),css:y}}async function qu(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:n=!1,wrapLines:a=!0}=t,r=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?ze:Re,i;try{i=await _a()}catch{return{html:ye(e),css:"",language:o,theme:r}}if(s==="auto"){let d=await Ga(i,e,o);if(d)return{html:d.html,css:d.css,language:o,theme:"auto"}}let c;try{c=await i.highlight(e,o,{theme:r})}catch{return{html:ye(e),css:"",language:o,theme:r}}let p=c,u=typeof p==="string"?{html:p,css:""}:{html:p?.html??ye(e),css:p?.css??""};return{html:u.html,css:u.css,language:o,theme:r}}function Wu(e){if(e.includes("<!DOCTYPE")||e.includes("<html"))return"html";if(e.includes("<?php"))return"php";if(e.includes("import")&&e.includes("from"))return"typescript";if(e.includes("function")||e.includes("const"))return"javascript";if(e.includes("{")&&e.includes("}"))return"json";if(e.includes("$")&&e.includes("|"))return"bash";if(e.includes("#")&&e.includes("##"))return"markdown";return"typescript"}function Ku(e,t){return`<div class="${t?`rounded-md overflow-auto text-sm leading-relaxed font-mono ${t}`:"rounded-md overflow-auto text-sm leading-relaxed font-mono"}">${e}</div>`}var F=null,Ya=(e)=>e===1?0:1;function re(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function ke(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function Uu(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:n={},dateTimeFormats:a={},numberFormats:r={},missing:i,warnMissing:c=!0}=e;function p(b,x={}){let E=re(o[t],b);if(E===void 0&&s)E=re(o[s],b);if(E===void 0){if(i){let A=i(t,b);if(A)return ke(A,x)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${b}" in locale "${t}"`);return b}if(typeof E==="string")return ke(E,x);return String(E)}function u(b,x,E={}){let A=p(b,{...E,count:x});if(A.includes("|")){let S=A.split("|").map((K)=>K.trim()),z=(n[t]||Ya)(x,t),B=S[z]||S[S.length-1];return ke(B,{...E,count:x})}return A}function d(b,x="default"){let E=typeof b==="number"?new Date(b):b,A=a[x]||a.default||{};return new Intl.DateTimeFormat(t,A).format(E)}function g(b,x="default"){let E=r[x]||r.default||{};return new Intl.NumberFormat(t,E).format(b)}function f(b){if(re(o[t],b)!==void 0)return!0;if(s)return re(o[s],b)!==void 0;return!1}function y(b){if(!o[b]){console.warn(`[i18n] Locale "${b}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=b}function C(b,x){if(!o[b])o[b]={};o[b]={...o[b],...x}}function k(b){delete o[b]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:y,t:p,tc:u,d,n:g,te:f,addMessages:C,removeLocale:k}}function Ju(e){F=e}function Gu(){return F}function Yu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return F.t(e,t)}function Xu(e,t,s){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return F.tc(e,t,s)}function Qu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.d(e,t)}function Zu(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.n(e,t)}var eh={en:(e)=>e===1?0:1,de:(e)=>e===1?0:1,nl:(e)=>e===1?0:1,sv:(e)=>e===1?0:1,fr:(e)=>e===0||e===1?0:1,pt_BR:(e)=>e===0||e===1?0:1,ru:(e)=>{if(e%10===1&&e%100!==11)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},pl:(e)=>{if(e===1)return 0;if(e%10>=2&&e%10<=4&&(e%100<10||e%100>=20))return 1;return 2},cs:(e)=>{if(e===1)return 0;if(e>=2&&e<=4)return 1;return 2},ar:(e)=>{if(e===0)return 0;if(e===1)return 1;if(e===2)return 2;if(e%100>=3&&e%100<=10)return 3;if(e%100>=11)return 4;return 5},ja:()=>0,ko:()=>0,zh:()=>0,th:()=>0,vi:()=>0},th={short:{year:"numeric",month:"numeric",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{weekday:"long",year:"numeric",month:"long",day:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}},sh={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function oh(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function nh(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var ah={en:{common:{loading:"Loading...",error:"Error",retry:"Retry",cancel:"Cancel",confirm:"Confirm",close:"Close",save:"Save",delete:"Delete",edit:"Edit",search:"Search",clear:"Clear",submit:"Submit",reset:"Reset"},form:{required:"This field is required",invalid:"Invalid value",tooShort:"Value is too short (minimum {min} characters)",tooLong:"Value is too long (maximum {max} characters)",invalidEmail:"Invalid email address",invalidUrl:"Invalid URL"},pagination:{previous:"Previous",next:"Next",page:"Page {page}",of:"of {total}"}},es:{common:{loading:"Cargando...",error:"Error",retry:"Reintentar",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",save:"Guardar",delete:"Eliminar",edit:"Editar",search:"Buscar",clear:"Limpiar",submit:"Enviar",reset:"Restablecer"},form:{required:"Este campo es obligatorio",invalid:"Valor inv\xE1lido",tooShort:"El valor es demasiado corto (m\xEDnimo {min} caracteres)",tooLong:"El valor es demasiado largo (m\xE1ximo {max} caracteres)",invalidEmail:"Direcci\xF3n de correo electr\xF3nico inv\xE1lida",invalidUrl:"URL inv\xE1lida"},pagination:{previous:"Anterior",next:"Siguiente",page:"P\xE1gina {page}",of:"de {total}"}},fr:{common:{loading:"Chargement...",error:"Erreur",retry:"R\xE9essayer",cancel:"Annuler",confirm:"Confirmer",close:"Fermer",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",search:"Rechercher",clear:"Effacer",submit:"Soumettre",reset:"R\xE9initialiser"},form:{required:"Ce champ est obligatoire",invalid:"Valeur invalide",tooShort:"La valeur est trop courte (minimum {min} caract\xE8res)",tooLong:"La valeur est trop longue (maximum {max} caract\xE8res)",invalidEmail:"Adresse e-mail invalide",invalidUrl:"URL invalide"},pagination:{previous:"Pr\xE9c\xE9dent",next:"Suivant",page:"Page {page}",of:"sur {total}"}}};function ih(e={}){let{max:t=10,ttl:s=0,include:o,exclude:n,hooks:a,debug:r=!1}=e,i=new Map,c=0,p=0;function u(...h){if(r)console.log("[KeepAlive]",...h)}function d(h){if(n){if(n instanceof RegExp&&n.test(h))return!1;if(Array.isArray(n)&&n.includes(h))return!1}if(o){if(o instanceof RegExp&&!o.test(h))return!1;if(Array.isArray(o)&&!o.includes(h))return!1}return!0}function g(h){if(!s||!h.expiresAt)return!1;return Date.now()>h.expiresAt}function f(h){let m=i.get(h);if(m)m.lastAccessedAt=Date.now(),m.accessCount++,m.instance.lastAccessedAt=m.lastAccessedAt,i.delete(h),i.set(h,m),u(`Touched: ${h} (access count: ${m.accessCount})`)}function y(){if(i.size===0)return!1;let h=i.keys().next().value;if(!h)return!1;let m=i.get(h);if(m){u(`Evicting LRU: ${h}`);let T=m.instance.hooks;if(T?.onDeactivate)T.onDeactivate(m.instance);if(a?.onDeactivate)a.onDeactivate(m.instance);return i.delete(h),!0}return!1}function C(h,m,T){if(!d(m.type))return u(`Type not cacheable: ${m.type}`),m;if(i.size>=t)y();let M=Date.now(),U={instance:{...m,hooks:T||m.hooks,createdAt:m.createdAt||M,lastAccessedAt:M},accessCount:0,createdAt:M,lastAccessedAt:M,expiresAt:s?M+s:void 0};if(i.set(h,U),u(`Cached: ${h} (size: ${i.size}/${t})`),T?.onMount)T.onMount(U.instance);if(a?.onMount)a.onMount(U.instance);return U.instance}function k(h){let m=i.get(h);if(!m)return p++,u(`Miss: ${h}`),null;if(g(m))return u(`Expired: ${h}`),i.delete(h),p++,null;return c++,f(h),u(`Hit: ${h}`),m.instance}function b(h){let m=i.get(h);if(!m)return!1;if(g(m))return i.delete(h),!1;return!0}function x(h){let m=i.get(h);if(!m)return!1;u(`Removing: ${h}`);let T=m.instance.hooks;if(T?.onUnmount)T.onUnmount(m.instance);if(a?.onUnmount)a.onUnmount(m.instance);return i.delete(h)}function E(){u("Clearing cache"),i.forEach((h)=>{let m=h.instance.hooks;if(m?.onUnmount)m.onUnmount(h.instance);if(a?.onUnmount)a.onUnmount(h.instance)}),i.clear(),c=0,p=0}function A(){let h=0,m=Date.now();for(let[T,M]of i.entries())if(g(M))u(`Pruning expired: ${T}`),x(T),h++;while(i.size>t)if(y())h++;else break;if(h>0)u(`Pruned ${h} entries`);return h}function S(h){let m=k(h);if(!m)return null;u(`Activating: ${h}`);let T=m.hooks;if(T?.onActivate)T.onActivate(m);if(a?.onActivate)a.onActivate(m);if(m.state&&T?.onRestore)T.onRestore(m,m.state);return m}function V(h){let m=i.get(h);if(!m)return!1;u(`Deactivating: ${h}`);let T=m.instance,M=T.hooks;if(M?.onSave)T.state=M.onSave(T);if(M?.onDeactivate)M.onDeactivate(T);if(a?.onDeactivate)a.onDeactivate(T);return!0}function z(){let h=c+p;return{hits:c,misses:p,size:i.size,max:t,hitRate:h>0?c/h:0,keys:Array.from(i.keys())}}function B(){return Array.from(i.keys())}function K(){return i.size}return{cache:C,get:k,has:b,remove:x,clear:E,prune:A,activate:S,deactivate:V,getStats:z,keys:B,size:K}}function lh(e){let t=new Map;return{set(s,o){if(t.has(s))t.delete(s);if(t.set(s,o),t.size>e){let n=t.keys().next().value;if(n)t.delete(n)}},get(s){if(!t.has(s))return;let o=t.get(s);return t.delete(s),t.set(s,o),o},has(s){return t.has(s)},delete(s){return t.delete(s)},clear(){t.clear()},get size(){return t.size},keys(){return Array.from(t.keys())},values(){return Array.from(t.values())},forEach(s){t.forEach(s)}}}function ch(){let e=new Map;return{save(t,s){e.set(t,JSON.parse(JSON.stringify(s)))},restore(t){let s=e.get(t);return s?JSON.parse(JSON.stringify(s)):null},has(t){return e.has(t)},remove(t){return e.delete(t)},clear(){e.clear()},keys(){return Array.from(e.keys())},get size(){return e.size}}}function dh(e,t={}){let{maxSize:s=100,reset:o}=t,n=[];return{acquire(){if(n.length>0)return n.pop();return e()},release(a){if(n.length<s){if(o)o(a);n.push(a)}},clear(){n.length=0},get size(){return n.length},get maxSize(){return s}}}var W=new Map;async function ie(e,t){let s=t||e.toString();if(W.has(s))return W.get(s);let o=e();W.set(s,o);try{return await o}catch(n){throw W.delete(s),n}}function uh(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:n,onLoaded:a,onError:r}=t,i="idle",c,p,u=async(d=0)=>{try{if(i==="loading"||i==="loaded"){if(c)return c}i="loading",n?.();let g=await ie(e);return c=g,i="loaded",a?.(g),g}catch(g){let f=g;if(d<s)return await new Promise((y)=>setTimeout(y,o*(d+1))),u(d+1);throw i="error",p=f,r?.(f),f}};return{get state(){return i},get module(){return c},get error(){return p},load:()=>u(),preload:()=>u()}}function Xa(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:n="0px",threshold:a=0.01,placeholder:r,errorContent:i,onLoading:c,onLoaded:p,onError:u}=s,d=!1,g=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return g=new IntersectionObserver(async(y)=>{for(let C of y)if(C.isIntersecting&&!d){d=!0,g?.disconnect();try{c?.();let k=await ie(t);if(p?.(k),k&&typeof k.default?.render==="function"){let b=await k.default.render();e.innerHTML=b}}catch(k){let b=k;if(u?.(b),i)if(typeof i==="string")e.innerHTML=i;else e.innerHTML="",e.appendChild(i);else e.innerHTML=`<div style="color: red;">Failed to load component: ${b.message}</div>`}}},{root:o,rootMargin:n,threshold:a}),g.observe(e),()=>{g?.disconnect(),g=null}}function hh(e,t,s={}){let o=[],n=Array.from(e);for(let a of n){let r=typeof t==="function"&&t.length>0?()=>t(a):t,i=Xa(a,r,s);o.push(i)}return()=>{o.forEach((a)=>a())}}function Qa(e){return ie(e)}function fh(e){return Promise.all(e.map((t)=>Qa(t)))}function mh(e){if(e)W.delete(e);else W.clear()}function gh(){return{size:W.size,keys:Array.from(W.keys())}}function bh(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ie(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Za(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:n="50px",threshold:a=0.01,placeholder:r,onLoading:i,onLoaded:c,onError:p}=s;if(r&&typeof r==="string")e.src=r;let u=!1,d=null;return d=new IntersectionObserver((f)=>{for(let y of f)if(y.isIntersecting&&!u)u=!0,d?.disconnect(),i?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(C)=>{let k=Error(`Failed to load image: ${t}`);p?.(k),e.classList.add("error")},{once:!0})},{root:o,rootMargin:n,threshold:a}),d.observe(e),()=>{d?.disconnect(),d=null}}function xh(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((n)=>{let a=n.getAttribute("data-lazy-src");if(a){let r=Za(n,a,t);o.push(r)}}),()=>{o.forEach((n)=>n())}}var Ce={colors:{primary:"#3b82f6",secondary:"#8b5cf6",success:"#10b981",warning:"#f59e0b",danger:"#ef4444",info:"#06b6d4",gray:"#6b7280",white:"#ffffff",black:"#000000"},typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{light:"300",normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem"},borderRadius:{none:"0",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",none:"none"},components:{button:{borderRadius:"0.375rem",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500"},input:{borderRadius:"0.375rem",padding:"0.5rem 0.75rem",fontSize:"0.875rem",borderWidth:"1px"},card:{borderRadius:"0.5rem",padding:"1.5rem",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}}};function He(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=He(e[o],t[o]);else s[o]=t[o];return s}function Q(e){return He(Ce,e)}var le=Ce;function wh(){return le}function er(e){let t=[];if(e.colors)Object.entries(e.colors).forEach(([s,o])=>{if(o)t.push(`--color-${s}: ${o};`)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([s,o])=>{if(o)t.push(`--font-${s}: ${o};`)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([s,o])=>{if(o)t.push(`--text-${s}: ${o};`)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([s,o])=>{if(o)t.push(`--font-weight-${s}: ${o};`)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([s,o])=>{if(o)t.push(`--leading-${s}: ${o};`)});if(e.spacing)Object.entries(e.spacing).forEach(([s,o])=>{if(o)t.push(`--spacing-${s}: ${o};`)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([s,o])=>{if(o)t.push(`--radius-${s}: ${o};`)});if(e.shadows)Object.entries(e.shadows).forEach(([s,o])=>{if(o)t.push(`--shadow-${s}: ${o};`)});if(e.components?.button)Object.entries(e.components.button).forEach(([s,o])=>{if(o)t.push(`--button-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.input)Object.entries(e.components.input).forEach(([s,o])=>{if(o)t.push(`--input-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});if(e.components?.card)Object.entries(e.components.card).forEach(([s,o])=>{if(o)t.push(`--card-${s.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`)});return`:root {
|
|
23
23
|
${t.join(`
|
|
24
24
|
`)}
|
|
25
|
-
}`}function uh(e,t){if(le=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,n])=>{if(n)s.style.setProperty(`--color-${o}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-${o}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,n])=>{if(n)s.style.setProperty(`--text-${o}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-weight-${o}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--leading-${o}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([o,n])=>{if(n)s.style.setProperty(`--spacing-${o}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,n])=>{if(n)s.style.setProperty(`--radius-${o}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([o,n])=>{if(n)s.style.setProperty(`--shadow-${o}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,n])=>{if(n)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,n])=>{if(n)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,n])=>{if(n)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function hh(){return le}function fh(e){let t=e.split("."),s=le;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var mh={default:Ce,purple:Q({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Q({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Q({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Q({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Q({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function gh(e){return Ya(e)}var Qa="./ChatInbox-wpg039q7.stx";var er="./ChatMessage-rj37tdgn.stx";import{derived as ce,effect as tr,state as D}from"@stacksjs/stx";import{useBroadcastStream as sr}from"@stacksjs/stx/composables/use-broadcast-stream";function kh(e){let t=e.endpoint??"/messages",s=D([]),o=D([]),n=D(null),a=D(""),r=D([]),i=D(!1),c=D(!1),p=D(!1),u=D(""),d=D(""),g=D(""),f=D(!1),y=D(!1),C=D(4000),k=D(!1),b=new Set,x=null,E=null,A="",S=0,V=new Map,z=null,B=!1,K=0;function h(){S++,s.set([]),o.set([]),n.set(null),a.set(""),r.set([]),d.set(""),u.set(""),i.set(!1),c.set(!1),p.set(!1),V=new Map,z=null,K=0,y.set(!1),x?.close(),x=null}function m(){let w=e.scopeKey();if(w!==A)h(),A=w;return qe(),S}async function T(w,v){let I=await e.request(`${t}${w}`,{...v,cache:"no-store"}),P=await I.json().catch(()=>({}));if(!I.ok)throw Error(P.error||"Could not load messages. Try again.");return P}let M=ce(()=>{let w=g().toLowerCase().trim();return s().map((v)=>({...v,conversation:o().find((I)=>I.recipient_id===v.id)})).filter((v)=>(!w||`${v.name} ${v.role}`.toLowerCase().includes(w))&&(!f()||(v.conversation?.unread??0)>0)).sort((v,I)=>(I.conversation?.last_message?.id??0)-(v.conversation?.last_message?.id??0)||v.name.localeCompare(I.name))}),U=ce(()=>o().reduce((w,v)=>w+v.unread,0)),$e=ce(()=>!!a()&&!!d().trim()&&d().trim().length<=C()&&!p()&&!c()),Fe=ce(e.selfId);function G(w){u.set(w instanceof Error?w.message:"Could not load messages. Try again.")}async function de(w,v,I=!0){let P=await T(`/conversations/${v}`);if(w!==S||v!==a()||e.scopeKey()!==A)return;let j=P.messages[0]?.id;if(r.set([...r().filter((me)=>j&&me.id<j),...P.messages]),r().length===P.messages.length)y.set(P.has_more);let ee=P.messages.at(-1);if(I&&ee){if(await T(`/conversations/${v}/read`,{method:"POST",body:JSON.stringify({through_id:ee.id})}),w===S&&v===a())o.update((me)=>me.map((ge)=>ge.id===v?{...ge,unread:0}:ge))}}async function pe(){let w=m();i.set(!0),u.set("");try{let v=await T("");if(w!==S||e.scopeKey()!==A)return;s.set(v.contacts),o.set(v.conversations),C.set(v.max_length),i.set(!1);let I=n()?v.contacts.find((j)=>j.id===n().id):null;if(n()&&!I){let j=n().id;Se(),V.delete(j),d.set(""),z=null}else if(I)n.set(I);let P=e.initialRecipient?.()??0;if(P>0&&P!==K){let j=v.contacts.find((ee)=>ee.id===P);if(j)K=P,await ue(j)}}catch(v){if(w===S)G(v)}finally{if(w===S)i.set(!1)}}async function ue(w){if(m(),n())V.set(n().id,d());let v=++S;p.set(!1),n.set(w),d.set(V.get(w.id)??""),a.set(""),r.set([]),y.set(!1),u.set(""),c.set(!0);try{let I=await T("/conversations",{method:"POST",body:JSON.stringify({recipient_id:w.id})});if(v!==S||e.scopeKey()!==A)return;a.set(I.id),await de(v,I.id)}catch(I){if(v===S)G(I)}finally{if(v===S)c.set(!1);Z()}}function Se(){if(n())V.set(n().id,d());S++,p.set(!1),c.set(!1),n.set(null),a.set(""),r.set([]),u.set("")}async function Ve(){if(m(),!$e())return;let w=a(),v=d().trim(),I=S,P=z?.body===v&&z.thread===w?z.key:crypto.randomUUID();z={body:v,key:P,thread:w},p.set(!0),u.set("");try{if(await T(`/conversations/${w}/messages`,{method:"POST",body:JSON.stringify({body:v,client_key:P})}),I!==S||e.scopeKey()!==A)return;if(d().trim()===v)d.set("");V.delete(n().id),z=null,await de(I,w),await pe()}catch(j){if(I===S)G(j)}finally{if(I===S)p.set(!1);Z()}}async function Be(){let w=a(),v=r()[0]?.id,I=S;if(!w||!v||c())return;c.set(!0);try{let P=await T(`/conversations/${w}?before=${v}`);if(I===S&&w===a())r.set([...P.messages,...r()]),y.set(P.has_more)}catch(P){if(I===S)G(P)}finally{if(I===S)c.set(!1);Z()}}async function Te(w=!1){if(B||p()||c())return;B=!0;try{if(await pe(),w&&n()&&!a())await ue(n());else if(w&&a())await de(S,a())}catch(v){G(v)}finally{B=!1,Z()}}let he=!1;async function fe(){if(B||p()||c()){he=!0;return}await Te([...b].some((w)=>w()))}function qe(){if(x||!b.size||!e.selfId()||!e.broadcastEndpoint)return;let w=A;x=sr({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(v)=>k.set(v),onConnected:()=>{if(w===e.scopeKey())fe()},onMessage:(v)=>{if(w===e.scopeKey()&&v.event.startsWith("messaging."))fe()}})}function We(w=()=>!1){if(b.add(w),m(),!E)E=tr(()=>{m()});return()=>{if(b.delete(w),!b.size)x?.close(),x=null,E?.(),E=null}}function Z(){if(he)he=!1,fe()}return{contacts:s,conversations:o,selected:n,threadId:a,messages:r,loading:i,threadLoading:c,sending:p,error:u,draft:d,search:g,unreadOnly:f,hasMore:y,maxLength:C,rows:M,unread:U,canSend:$e,selfId:Fe,load:pe,open:ue,back:Se,send:Ve,older:Be,refresh:Te,reset:h,observe:We,connected:k}}var nr="./ChatUnreadBadge-3vq0t8d2.stx";var rr="./ChatLauncher-3zph4trh.stx";export{et as Accordion,st as AccordionItem,Iu as AnimationClasses,nt as Audio,ut as Avatar,ft as Badge,gt as Breadcrumb,X as Breakpoints,yt as Button,$t as Calendar,Lt as Card,Qa as ChatInbox,rr as ChatLauncher,er as ChatMessage,nr as ChatUnreadBadge,Dt as Checkbox,ho as Checkout,Ke as CodeBlock,Rt as Combobox,jt as ComboboxButton,Ft as ComboboxInput,Bt as ComboboxOption,Wt as ComboboxOptions,_t as CommandPalette,Jt as CommandPaletteItem,R as ComponentError,Tt as DateRangePicker,mo as DefaultPaymentMethod,Yt as Dialog,Qt as DialogBackdrop,es as DialogDescription,ss as DialogPanel,ns as DialogTitle,rs as Drawer,ls as Dropdown,ds as DropdownButton,us as DropdownItem,fs as DropdownItems,Cu as Easing,ys as EmailInput,It as EmptyState,J as ErrorTypes,_s as FilterChip,Js as FilterChips,_e as Footer,gs as Form,Ue as Hero,vs as Image,Je as Installation,pu as KeyboardKeys,$r as KeyboardShortcuts,Fa as KeyframeAnimations,Ys as ListRow,Rs as Listbox,js as ListboxButton,Fs as ListboxLabel,Bs as ListboxOption,Ws as ListboxOptions,rt as Login,Qs as NavBar,ro as Navigator,lo as Notification,Cs as NumberInput,po as Pagination,Ss as PasswordInput,bo as PaymentMethods,yo as Popover,Co as PopoverButton,So as PopoverPanel,Eo as Portal,Ao as Progress,l as PropTypes,Oo as Radio,No as RadioGroup,Mo as RadioGroupDescription,zo as RadioGroupLabel,Ho as RadioGroupOption,Hr as SHADE_VAR_PREFIX,Es as SearchInput,eo as SectionCard,Vo as Select,qo as Sidebar,Ko as SidebarFooter,Uo as SidebarHeader,Go as SidebarItem,Xo as SidebarPinned,Zo as SidebarSection,tn as SidebarSpace,an as SidebarSpaceSwitcher,on as SidebarSpaces,lt as Signup,xn as Skeleton,wn as Spinner,kn as Stepper,$n as StepperStep,ae as StorageManager,vo as SubscriptionCheckout,Tn as Switch,Ee as THEMED_FAMILIES,Fn as Tab,so as TabBar,no as TabBarItem,Bn as TabList,Wn as TabPanel,In as Table,Pn as TableBody,Ln as TableCell,Dn as TableHead,Rn as TableHeader,jn as TableRow,_n as Tabs,Jn as Teleport,As as TextInput,Yn as Textarea,Pt as ThemeToggle,Qn as Tooltip,ea as Transition,dt as TwoFactorChallenge,sa as Video,na as VirtualList,ra as VirtualTable,Lu as animate,Au as animateWithClass,lu as announceToScreenReader,De as applyAnimation,Ru as applyHeadwindClasses,uh as applyTheme,mu as aria,bt as assert,vi as assertProp,kt as buttonPropSchema,fi as clearErrorHandler,rh as clearModuleCache,Mr as closeOverlay,Yu as componentMessages,ur as copyToClipboard,iu as createAriaDescription,ru as createAriaLabel,kh as createChat,th as createComponentPool,gi as createDebugger,cu as createFocusTrap,ju as createI18n,Qu as createKeepAlive,Ha as createKeyframeAnimation,Pu as createKeyframes,Zu as createLRUCache,H as createPropValidator,lh as createRouteLoader,du as createRovingTabindex,Ti as createSafeClickHandler,gu as createScreenReaderText,wu as createSkipLink,eh as createStateManager,up as createStorage,Q as createTheme,za as cssAnimation,qu as d,_u as dateTimeFormats,Ce as defaultTheme,Pe as deriveSpaceTint,Mu as detectLanguage,mi as devAssert,Na as easeInBack,Ne as easeInBounce,Ea as easeInCirc,ua as easeInCubic,Pa as easeInElastic,$a as easeInExpo,Ma as easeInOutBack,Ra as easeInOutBounce,Aa as easeInOutCirc,fa as easeInOutCubic,La as easeInOutElastic,Ta as easeInOutExpo,pa as easeInOutQuad,ba as easeInOutQuart,wa as easeInOutQuint,Ca as easeInOutSine,ca as easeInQuad,ma as easeInQuart,xa as easeInQuint,ya as easeInSine,Da as easeOutBack,ve as easeOutBounce,Ia as easeOutCirc,ha as easeOutCubic,Oa as easeOutElastic,Sa as easeOutExpo,da as easeOutQuad,ga as easeOutQuart,va as easeOutQuint,ka as easeOutSine,bi as errorBoundary,bs as formPropSchema,Le as generateId,br as generateSEOTags,gh as generateThemeCSS,ih as getCacheStats,vu as getColorSchemePreference,be as getEffectiveTheme,xe as getFocusableElements,Ba as getHighlighter,Fu as getI18n,Ge as getSystemTheme,ph as getTheme,fh as getThemeValue,oe as handleError,uu as hasFocus,Du as highlight,Ju as isRTL,Rr as isTopOverlay,fu as isVisibleToScreenReader,Ua as lazyLoad,nh as lazyLoadAll,oh as lazyLoadComponent,Ga as lazyLoadImage,ch as lazyLoadImages,ie as lazyLoadModule,la as linear,Gu as loadLocaleMessages,ne as macosColors,hu as moveFocus,Wu as n,gn as normalizeSpace,zd as normalizeSpaces,Uu as numberFormats,Ls as numberInputPropSchema,Dr as openOverlay,zr as openOverlays,Ku as pluralRules,xu as prefersHighContrast,bu as prefersReducedMotion,Ja as preloadModule,ah as preloadModules,Su as removeAnimation,Nd as resolveIconColor,Ld as resolveSidebarTheme,fn as resolveSpaceTint,Eu as sequenceAnimations,hi as setErrorHandler,Hu as setI18n,Xe as setLink,L as setMeta,Ye as setTitle,Ae as sidebarThemes,jd as spaceIndexOf,Hd as spaceTintPayload,mn as spaceTintVars,Rd as spaceWashGradient,Tu as staggerAnimation,pp as storage,Fr as stxThemePreset,Vu as t,Bu as tc,Os as textInputPropSchema,mh as themePresets,Ya as themeToCSSProperties,Vr as themeVariableNames,Ir as useBreakpoint,vr as useClickOutside,pr as useCopyCode,fr as useDarkMode,yr as useFocusTrap,Or as useIsDarkMode,Pr as useIsDesktop,Ar as useIsMobile,Cr as useKeyboard,Tr as useLocalStorage,Y as useMediaQuery,Lr as usePrefersReducedMotion,gr as useSEO,hh as useTheme,yu as validateAriaRelationships,Si as validateButtonProps,Gl as validateEmailInputProps,Rl as validateFormProps,Xl as validateNumberInputProps,Yl as validatePasswordInputProps,vt as validateProps,Ql as validateSearchInputProps,Ii as validateSize,Jl as validateTextInputProps,Ei as validateVariant,ja as waitForAnimation,xt as warn,wi as warnProp,Ie as wrapErrorHandler};
|
|
25
|
+
}`}function yh(e,t){if(le=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,n])=>{if(n)s.style.setProperty(`--color-${o}`,n)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-${o}`,n)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,n])=>{if(n)s.style.setProperty(`--text-${o}`,n)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--font-weight-${o}`,n)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,n])=>{if(n)s.style.setProperty(`--leading-${o}`,n)});if(e.spacing)Object.entries(e.spacing).forEach(([o,n])=>{if(n)s.style.setProperty(`--spacing-${o}`,n)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,n])=>{if(n)s.style.setProperty(`--radius-${o}`,n)});if(e.shadows)Object.entries(e.shadows).forEach(([o,n])=>{if(n)s.style.setProperty(`--shadow-${o}`,n)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,n])=>{if(n)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,n])=>{if(n)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,n])=>{if(n)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,n)})}function kh(){return le}function Ch(e){let t=e.split("."),s=le;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var $h={default:Ce,purple:Q({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Q({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Q({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Q({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Q({borderRadius:{none:"0",sm:"0",md:"0.125rem",lg:"0.25rem",full:"0.25rem"},shadows:{sm:"none",md:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",lg:"0 1px 3px 0 rgba(0, 0, 0, 0.1)",xl:"0 4px 6px -1px rgba(0, 0, 0, 0.1)","2xl":"0 10px 15px -3px rgba(0, 0, 0, 0.1)",none:"none"}})};function Sh(e){return er(e)}var sr="./ChatInbox-wpg039q7.stx";var nr="./ChatMessage-rj37tdgn.stx";import{derived as ce,effect as ar,state as D}from"@stacksjs/stx";import{useBroadcastStream as rr}from"@stacksjs/stx/composables/use-broadcast-stream";function Lh(e){let t=e.endpoint??"/messages",s=D([]),o=D([]),n=D(null),a=D(""),r=D([]),i=D(!1),c=D(!1),p=D(!1),u=D(""),d=D(""),g=D(""),f=D(!1),y=D(!1),C=D(4000),k=D(!1),b=new Set,x=null,E=null,A="",S=0,V=new Map,z=null,B=!1,K=0;function h(){S++,s.set([]),o.set([]),n.set(null),a.set(""),r.set([]),d.set(""),u.set(""),i.set(!1),c.set(!1),p.set(!1),V=new Map,z=null,K=0,y.set(!1),x?.close(),x=null}function m(){let w=e.scopeKey();if(w!==A)h(),A=w;return qe(),S}async function T(w,v){let I=await e.request(`${t}${w}`,{...v,cache:"no-store"}),P=await I.json().catch(()=>({}));if(!I.ok)throw Error(P.error||"Could not load messages. Try again.");return P}let M=ce(()=>{let w=g().toLowerCase().trim();return s().map((v)=>({...v,conversation:o().find((I)=>I.recipient_id===v.id)})).filter((v)=>(!w||`${v.name} ${v.role}`.toLowerCase().includes(w))&&(!f()||(v.conversation?.unread??0)>0)).sort((v,I)=>(I.conversation?.last_message?.id??0)-(v.conversation?.last_message?.id??0)||v.name.localeCompare(I.name))}),U=ce(()=>o().reduce((w,v)=>w+v.unread,0)),$e=ce(()=>!!a()&&!!d().trim()&&d().trim().length<=C()&&!p()&&!c()),Fe=ce(e.selfId);function G(w){u.set(w instanceof Error?w.message:"Could not load messages. Try again.")}async function de(w,v,I=!0){let P=await T(`/conversations/${v}`);if(w!==S||v!==a()||e.scopeKey()!==A)return;let j=P.messages[0]?.id;if(r.set([...r().filter((me)=>j&&me.id<j),...P.messages]),r().length===P.messages.length)y.set(P.has_more);let ee=P.messages.at(-1);if(I&&ee){if(await T(`/conversations/${v}/read`,{method:"POST",body:JSON.stringify({through_id:ee.id})}),w===S&&v===a())o.update((me)=>me.map((ge)=>ge.id===v?{...ge,unread:0}:ge))}}async function pe(){let w=m();i.set(!0),u.set("");try{let v=await T("");if(w!==S||e.scopeKey()!==A)return;s.set(v.contacts),o.set(v.conversations),C.set(v.max_length),i.set(!1);let I=n()?v.contacts.find((j)=>j.id===n().id):null;if(n()&&!I){let j=n().id;Se(),V.delete(j),d.set(""),z=null}else if(I)n.set(I);let P=e.initialRecipient?.()??0;if(P>0&&P!==K){let j=v.contacts.find((ee)=>ee.id===P);if(j)K=P,await ue(j)}}catch(v){if(w===S)G(v)}finally{if(w===S)i.set(!1)}}async function ue(w){if(m(),n())V.set(n().id,d());let v=++S;p.set(!1),n.set(w),d.set(V.get(w.id)??""),a.set(""),r.set([]),y.set(!1),u.set(""),c.set(!0);try{let I=await T("/conversations",{method:"POST",body:JSON.stringify({recipient_id:w.id})});if(v!==S||e.scopeKey()!==A)return;a.set(I.id),await de(v,I.id)}catch(I){if(v===S)G(I)}finally{if(v===S)c.set(!1);Z()}}function Se(){if(n())V.set(n().id,d());S++,p.set(!1),c.set(!1),n.set(null),a.set(""),r.set([]),u.set("")}async function Ve(){if(m(),!$e())return;let w=a(),v=d().trim(),I=S,P=z?.body===v&&z.thread===w?z.key:crypto.randomUUID();z={body:v,key:P,thread:w},p.set(!0),u.set("");try{if(await T(`/conversations/${w}/messages`,{method:"POST",body:JSON.stringify({body:v,client_key:P})}),I!==S||e.scopeKey()!==A)return;if(d().trim()===v)d.set("");V.delete(n().id),z=null,await de(I,w),await pe()}catch(j){if(I===S)G(j)}finally{if(I===S)p.set(!1);Z()}}async function Be(){let w=a(),v=r()[0]?.id,I=S;if(!w||!v||c())return;c.set(!0);try{let P=await T(`/conversations/${w}?before=${v}`);if(I===S&&w===a())r.set([...P.messages,...r()]),y.set(P.has_more)}catch(P){if(I===S)G(P)}finally{if(I===S)c.set(!1);Z()}}async function Te(w=!1){if(B||p()||c())return;B=!0;try{if(await pe(),w&&n()&&!a())await ue(n());else if(w&&a())await de(S,a())}catch(v){G(v)}finally{B=!1,Z()}}let he=!1;async function fe(){if(B||p()||c()){he=!0;return}await Te([...b].some((w)=>w()))}function qe(){if(x||!b.size||!e.selfId()||!e.broadcastEndpoint)return;let w=A;x=rr({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(v)=>k.set(v),onConnected:()=>{if(w===e.scopeKey())fe()},onMessage:(v)=>{if(w===e.scopeKey()&&v.event.startsWith("messaging."))fe()}})}function We(w=()=>!1){if(b.add(w),m(),!E)E=ar(()=>{m()});return()=>{if(b.delete(w),!b.size)x?.close(),x=null,E?.(),E=null}}function Z(){if(he)he=!1,fe()}return{contacts:s,conversations:o,selected:n,threadId:a,messages:r,loading:i,threadLoading:c,sending:p,error:u,draft:d,search:g,unreadOnly:f,hasMore:y,maxLength:C,rows:M,unread:U,canSend:$e,selfId:Fe,load:pe,open:ue,back:Se,send:Ve,older:Be,refresh:Te,reset:h,observe:We,connected:k}}var lr="./ChatUnreadBadge-3vq0t8d2.stx";var dr="./ChatLauncher-3zph4trh.stx";export{et as Accordion,st as AccordionItem,zu as AnimationClasses,nt as Audio,ut as Avatar,ft as Badge,gt as Breadcrumb,X as Breakpoints,yt as Button,$t as Calendar,Ot as Card,sr as ChatInbox,dr as ChatLauncher,nr as ChatMessage,lr as ChatUnreadBadge,Dt as Checkbox,bo as Checkout,Ke as CodeBlock,Rt as Combobox,jt as ComboboxButton,Ft as ComboboxInput,Bt as ComboboxOption,Wt as ComboboxOptions,_t as CommandPalette,Jt as CommandPaletteItem,R as ComponentError,Tt as DateRangePicker,vo as DefaultPaymentMethod,Yt as Dialog,Qt as DialogBackdrop,es as DialogDescription,ss as DialogPanel,ns as DialogTitle,rs as Drawer,ls as Dropdown,ds as DropdownButton,us as DropdownItem,fs as DropdownItems,Ou as Easing,ys as EmailInput,It as EmptyState,J as ErrorTypes,_s as FilterChip,Js as FilterChips,_e as Footer,gs as Form,Ue as Hero,vs as Image,Je as Installation,wu as KeyboardKeys,Ir as KeyboardShortcuts,Wa as KeyframeAnimations,Ys as ListRow,Rs as Listbox,js as ListboxButton,Fs as ListboxLabel,Bs as ListboxOption,Ws as ListboxOptions,rt as Login,Qs as NavBar,ro as Navigator,lo as Notification,Cs as NumberInput,po as Pager,ho as PagerDots,mo as Pagination,Ss as PasswordInput,yo as PaymentMethods,So as Popover,Eo as PopoverButton,Ao as PopoverPanel,Lo as Portal,No as Progress,l as PropTypes,Mo as Radio,zo as RadioGroup,Ho as RadioGroupDescription,Vo as RadioGroupLabel,qo as RadioGroupOption,qr as SHADE_VAR_PREFIX,Es as SearchInput,eo as SectionCard,Ko as Select,Uo as Sidebar,Go as SidebarFooter,Xo as SidebarHeader,Zo as SidebarItem,tn as SidebarPinned,on as SidebarSection,an as SidebarSpace,dn as SidebarSpaceSwitcher,ln as SidebarSpaces,lt as Signup,kn as Skeleton,$n as Spinner,Tn as Stepper,In as StepperStep,ae as StorageManager,Co as SubscriptionCheckout,Pn as Switch,Ee as THEMED_FAMILIES,Wn as Tab,so as TabBar,no as TabBarItem,_n as TabList,Jn as TabPanel,On as Table,Dn as TableBody,Rn as TableCell,jn as TableHead,Fn as TableHeader,Bn as TableRow,Yn as Tabs,Qn as Teleport,As as TextInput,ea as Textarea,Pt as ThemeToggle,sa as Tooltip,na as Transition,dt as TwoFactorChallenge,ra as Video,la as VirtualList,da as VirtualTable,Vu as animate,ju as animateWithClass,bu as announceToScreenReader,De as applyAnimation,Ku as applyHeadwindClasses,yh as applyTheme,$u as aria,bt as assert,Ci as assertProp,kt as buttonPropSchema,xi as clearErrorHandler,mh as clearModuleCache,Hr as closeOverlay,ah as componentMessages,gr as copyToClipboard,gu as createAriaDescription,mu as createAriaLabel,Lh as createChat,dh as createComponentPool,wi as createDebugger,xu as createFocusTrap,Uu as createI18n,ih as createKeepAlive,qa as createKeyframeAnimation,Hu as createKeyframes,lh as createLRUCache,H as createPropValidator,bh as createRouteLoader,vu as createRovingTabindex,Pi as createSafeClickHandler,Su as createScreenReaderText,Au as createSkipLink,ch as createStateManager,yp as createStorage,Q as createTheme,Va as cssAnimation,Qu as d,th as dateTimeFormats,Ce as defaultTheme,Pe as deriveSpaceTint,Wu as detectLanguage,vi as devAssert,za as easeInBack,Ne as easeInBounce,La as easeInCirc,ga as easeInCubic,Da as easeInElastic,Ia as easeInExpo,Ha as easeInOutBack,Fa as easeInOutBounce,Na as easeInOutCirc,xa as easeInOutCubic,Ra as easeInOutElastic,Pa as easeInOutExpo,ma as easeInOutQuad,ya as easeInOutQuart,$a as easeInOutQuint,Ea as easeInOutSine,ha as easeInQuad,va as easeInQuart,ka as easeInQuint,Sa as easeInSine,ja as easeOutBack,ve as easeOutBounce,Oa as easeOutCirc,ba as easeOutCubic,Ma as easeOutElastic,Aa as easeOutExpo,fa as easeOutQuad,wa as easeOutQuart,Ca as easeOutQuint,Ta as easeOutSine,yi as errorBoundary,bs as formPropSchema,Oe as generateId,yr as generateSEOTags,Sh as generateThemeCSS,gh as getCacheStats,Iu as getColorSchemePreference,be as getEffectiveTheme,xe as getFocusableElements,_a as getHighlighter,Gu as getI18n,Ge as getSystemTheme,wh as getTheme,Ch as getThemeValue,oe as handleError,yu as hasFocus,qu as highlight,oh as isRTL,Fr as isTopOverlay,Cu as isVisibleToScreenReader,Xa as lazyLoad,hh as lazyLoadAll,uh as lazyLoadComponent,Za as lazyLoadImage,xh as lazyLoadImages,ie as lazyLoadModule,ua as linear,nh as loadLocaleMessages,ne as macosColors,ku as moveFocus,Zu as n,wn as normalizeSpace,_d as normalizeSpaces,sh as numberFormats,Os as numberInputPropSchema,jr as openOverlay,Vr as openOverlays,eh as pluralRules,Eu as prefersHighContrast,Tu as prefersReducedMotion,Qa as preloadModule,fh as preloadModules,Du as removeAnimation,Bd as resolveIconColor,Vd as resolveSidebarTheme,xn as resolveSpaceTint,Ru as sequenceAnimations,bi as setErrorHandler,Ju as setI18n,Xe as setLink,O as setMeta,Ye as setTitle,Ae as sidebarThemes,Ud as spaceIndexOf,Jd as spaceTintPayload,vn as spaceTintVars,Kd as spaceWashGradient,Mu as staggerAnimation,wp as storage,Wr as stxThemePreset,Yu as t,Xu as tc,Ls as textInputPropSchema,$h as themePresets,er as themeToCSSProperties,Kr as themeVariableNames,Or as useBreakpoint,Cr as useClickOutside,mr as useCopyCode,xr as useDarkMode,Sr as useFocusTrap,Mr as useIsDarkMode,Dr as useIsDesktop,Nr as useIsMobile,Er as useKeyboard,Pr as useLocalStorage,Y as useMediaQuery,Rr as usePrefersReducedMotion,wr as useSEO,kh as useTheme,Pu as validateAriaRelationships,Ai as validateButtonProps,Zl as validateEmailInputProps,Fl as validateFormProps,tc as validateNumberInputProps,ec as validatePasswordInputProps,vt as validateProps,sc as validateSearchInputProps,Oi as validateSize,Ql as validateTextInputProps,Li as validateVariant,Ba as waitForAnimation,xt as warn,$i as warnProp,Ie as wrapErrorHandler};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare interface PagerProps {
|
|
2
|
+
index?: number
|
|
3
|
+
label?: string
|
|
4
|
+
swipe?: boolean
|
|
5
|
+
dots?: boolean
|
|
6
|
+
dotsLabel?: string
|
|
7
|
+
slideLabel?: string
|
|
8
|
+
goToLabel?: string
|
|
9
|
+
className?: string
|
|
10
|
+
trackClass?: string
|
|
11
|
+
dotsClass?: string
|
|
12
|
+
}
|
|
13
|
+
export declare interface PagerDotsProps {
|
|
14
|
+
index?: number
|
|
15
|
+
count: number
|
|
16
|
+
label?: string
|
|
17
|
+
goToLabel?: string
|
|
18
|
+
className?: string
|
|
19
|
+
}
|
|
20
|
+
export { default as Pager } from './Pager.stx';
|
|
21
|
+
export { default as PagerDots } from './PagerDots.stx';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.475",
|
|
5
5
|
"description": "A modern component library built with STX, featuring headwind utility classes and TypeScript syntax highlighting.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@iconify-json/f7": "^1.2.2",
|
|
79
79
|
"@stacksjs/ts-css": "^0.3.2",
|
|
80
|
-
"@stacksjs/stx": "0.2.
|
|
81
|
-
"bun-plugin-stx": "0.2.
|
|
80
|
+
"@stacksjs/stx": "0.2.475",
|
|
81
|
+
"bun-plugin-stx": "0.2.475",
|
|
82
82
|
"ts-syntax-highlighter": "^0.2.17"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
/*
|
|
3
|
+
* A row of full-width pages you swipe or step through: the first-run tour,
|
|
4
|
+
* an onboarding questionnaire, a gallery of screenshots.
|
|
5
|
+
*
|
|
6
|
+
* The pages are the slot's elements, laid side by side in a native
|
|
7
|
+
* scroll-snap track, so a swipe is the browser's own (momentum, rubber band,
|
|
8
|
+
* the system's reduced-motion setting) and costs no script per frame. The
|
|
9
|
+
* page shown is a `v-model:index`, or `:index` with `@change`, which the page
|
|
10
|
+
* moves with its own buttons; Pager scrolls to follow and reports a swipe back.
|
|
11
|
+
*
|
|
12
|
+
* <Pager v-model:index="step" label="Welcome tour" dotsLabel="Tour pages">
|
|
13
|
+
* <section>…</section>
|
|
14
|
+
* <section :for="slide in slides" :key="slide.id">…</section>
|
|
15
|
+
* </Pager>
|
|
16
|
+
* <button @click="step.set(step() + 1)">Next</button>
|
|
17
|
+
*
|
|
18
|
+
* `swipe="false"` keeps the pages but leaves moving to the page's buttons: a
|
|
19
|
+
* questionnaire whose next page waits on an answer. `dots="false"` drops the
|
|
20
|
+
* built-in dots for a `<PagerDots>` placed elsewhere.
|
|
21
|
+
*
|
|
22
|
+
* Accessibility follows the APG carousel pattern: a named region with
|
|
23
|
+
* `aria-roledescription="carousel"`, each page a "slide" group labelled
|
|
24
|
+
* "2 of 5", pages off screen inert, and the arrow keys (outside a field)
|
|
25
|
+
* stepping between them.
|
|
26
|
+
*/
|
|
27
|
+
export const index = Math.max(0, Math.trunc($num($props.index) || 0))
|
|
28
|
+
export const label = $props.label || ''
|
|
29
|
+
export const swipe = $bool($props.swipe, true)
|
|
30
|
+
export const dots = $bool($props.dots, true)
|
|
31
|
+
export const dotsLabel = $props.dotsLabel || 'Pages'
|
|
32
|
+
export const slideLabel = $props.slideLabel || '{n} of {total}'
|
|
33
|
+
export const goToLabel = $props.goToLabel || 'Go to page {n}'
|
|
34
|
+
export const className = $props.className || ''
|
|
35
|
+
export const trackClass = $props.trackClass || ''
|
|
36
|
+
export const dotsClass = $props.dotsClass || ''
|
|
37
|
+
|
|
38
|
+
export const rootClasses = `stx-pager relative flex flex-col min-w-0 ${className}`.replace(/\s+/g, ' ').trim()
|
|
39
|
+
export const trackClasses = `stx-pager-track flex flex-1 min-h-0 ${swipe ? 'overflow-x-auto snap-x snap-mandatory' : 'overflow-x-hidden'} overflow-y-hidden overscroll-x-contain ${trackClass}`.replace(/\s+/g, ' ').trim()
|
|
40
|
+
export const dotRowClasses = `flex items-center justify-center gap-1.5 py-3 ${dotsClass}`.replace(/\s+/g, ' ').trim()
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<script client>
|
|
44
|
+
const emit = defineEmits()
|
|
45
|
+
const allowSwipe = {{ swipe }}
|
|
46
|
+
const slideWords = {{ slideLabel }}
|
|
47
|
+
const goToWords = {{ goToLabel }}
|
|
48
|
+
const selected = useModel('index', { default: {{ index }}, parse: v => Math.max(0, Math.trunc(Number(v)) || 0) })
|
|
49
|
+
const trackRef = useRef('trackRef')
|
|
50
|
+
const count = state(0)
|
|
51
|
+
const mounted = state(false)
|
|
52
|
+
const dotList = derived(() => Array.from({ length: count() }, (_, i) => i))
|
|
53
|
+
|
|
54
|
+
let observer = null
|
|
55
|
+
let resizer = null
|
|
56
|
+
let frame = 0
|
|
57
|
+
// A scroll the pager started itself, and the page it is heading for: the
|
|
58
|
+
// scroll events on the way there are not a swipe.
|
|
59
|
+
let steering = -1
|
|
60
|
+
let steerTimer = null
|
|
61
|
+
// The page a swipe just settled on, so following the model does not scroll
|
|
62
|
+
// back to where the finger already is.
|
|
63
|
+
let fromSwipe = -1
|
|
64
|
+
|
|
65
|
+
function words(template, n, total) {
|
|
66
|
+
return String(template).replace('{n}', String(n)).replace('{total}', String(total))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The slot's pages: the track's own elements, whatever rendered them. */
|
|
70
|
+
function pages() {
|
|
71
|
+
const track = trackRef.value
|
|
72
|
+
if (!track) return []
|
|
73
|
+
return Array.from(track.children).filter(el => !['TEMPLATE', 'SCRIPT', 'STYLE'].includes(el.tagName) && !el.hasAttribute('data-pager-ignore'))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function reducedMotion() {
|
|
77
|
+
return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Labels every page, and takes the ones off screen out of reach. */
|
|
81
|
+
function labelPages() {
|
|
82
|
+
const list = pages()
|
|
83
|
+
if (count() !== list.length) count.set(list.length)
|
|
84
|
+
const current = selected()
|
|
85
|
+
list.forEach((page, i) => {
|
|
86
|
+
page.setAttribute('role', 'group')
|
|
87
|
+
page.setAttribute('aria-roledescription', 'slide')
|
|
88
|
+
if (!page.hasAttribute('aria-labelledby')) page.setAttribute('aria-label', words(slideWords, i + 1, list.length))
|
|
89
|
+
if (i === current) { page.removeAttribute('inert'); page.removeAttribute('aria-hidden') }
|
|
90
|
+
else { page.setAttribute('inert', ''); page.setAttribute('aria-hidden', 'true') }
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function clamp(i) {
|
|
95
|
+
const total = count() || pages().length
|
|
96
|
+
return Math.min(Math.max(0, i), Math.max(0, total - 1))
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function scrollToPage(i, smooth) {
|
|
100
|
+
const track = trackRef.value
|
|
101
|
+
if (!track || !track.clientWidth) return
|
|
102
|
+
const left = i * track.clientWidth
|
|
103
|
+
if (Math.abs(track.scrollLeft - left) < 2) return
|
|
104
|
+
steering = i
|
|
105
|
+
if (steerTimer) clearTimeout(steerTimer)
|
|
106
|
+
steerTimer = setTimeout(() => { steering = -1 }, 800)
|
|
107
|
+
if (typeof track.scrollTo === 'function') track.scrollTo({ left, behavior: smooth && !reducedMotion() ? 'smooth' : 'auto' })
|
|
108
|
+
else track.scrollLeft = left
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function settle() {
|
|
112
|
+
frame = 0
|
|
113
|
+
const track = trackRef.value
|
|
114
|
+
if (!track || !track.clientWidth) return
|
|
115
|
+
const i = clamp(Math.round(track.scrollLeft / track.clientWidth))
|
|
116
|
+
if (steering !== -1) {
|
|
117
|
+
if (i === steering && Math.abs(track.scrollLeft - i * track.clientWidth) < 2) steering = -1
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
if (i === selected()) return
|
|
121
|
+
fromSwipe = i
|
|
122
|
+
selected.set(i)
|
|
123
|
+
emit('change', i)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function onScroll() {
|
|
127
|
+
if (frame) return
|
|
128
|
+
frame = typeof requestAnimationFrame === 'function' ? requestAnimationFrame(settle) : setTimeout(settle, 16)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Moves to page `i` (clamped), as the page's own buttons do. */
|
|
132
|
+
function go(i) {
|
|
133
|
+
const next = clamp(Number(i) || 0)
|
|
134
|
+
if (next === selected()) return
|
|
135
|
+
selected.set(next)
|
|
136
|
+
emit('change', next)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function next() { go(selected() + 1) }
|
|
140
|
+
function prev() { go(selected() - 1) }
|
|
141
|
+
|
|
142
|
+
function onKey(event) {
|
|
143
|
+
if (!allowSwipe || event.defaultPrevented) return
|
|
144
|
+
// The arrows already mean something in a field, a tab strip, a radio group
|
|
145
|
+
// and a slider: they stay theirs.
|
|
146
|
+
const target = event.target
|
|
147
|
+
const tag = target && target.tagName
|
|
148
|
+
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || (target && target.isContentEditable)) return
|
|
149
|
+
if (target && target.closest && target.closest('[role="tablist"], [role="radiogroup"], [role="slider"]')) return
|
|
150
|
+
const rtl = !!(trackRef.value && trackRef.value.closest('[dir="rtl"]'))
|
|
151
|
+
if (event.key === (rtl ? 'ArrowLeft' : 'ArrowRight')) { event.preventDefault(); next() }
|
|
152
|
+
else if (event.key === (rtl ? 'ArrowRight' : 'ArrowLeft')) { event.preventDefault(); prev() }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function isCurrent(i) { return i === selected() }
|
|
156
|
+
function dotClass(i) {
|
|
157
|
+
return i === selected()
|
|
158
|
+
? 'stx-pager-dot block h-1.5 w-5 rounded-full bg-current transition-all duration-300'
|
|
159
|
+
: 'stx-pager-dot block h-1.5 w-1.5 rounded-full bg-current opacity-35 transition-all duration-300'
|
|
160
|
+
}
|
|
161
|
+
function dotLabel(i) { return words(goToWords, i + 1, count()) }
|
|
162
|
+
|
|
163
|
+
effect(() => {
|
|
164
|
+
const i = selected()
|
|
165
|
+
if (!mounted()) return
|
|
166
|
+
labelPages()
|
|
167
|
+
if (fromSwipe === i) { fromSwipe = -1; return }
|
|
168
|
+
fromSwipe = -1
|
|
169
|
+
scrollToPage(i, true)
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
onMount(() => {
|
|
173
|
+
mounted.set(true)
|
|
174
|
+
labelPages()
|
|
175
|
+
const track = trackRef.value
|
|
176
|
+
if (!track) return
|
|
177
|
+
// Where the page asked to start, without a slide in from the first page.
|
|
178
|
+
track.scrollLeft = clamp(selected()) * track.clientWidth
|
|
179
|
+
if (typeof MutationObserver !== 'undefined') {
|
|
180
|
+
observer = new MutationObserver(() => labelPages())
|
|
181
|
+
observer.observe(track, { childList: true })
|
|
182
|
+
}
|
|
183
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
184
|
+
// A rotation or a resized window changes the page width under the
|
|
185
|
+
// current page: put it back square rather than half way to the next.
|
|
186
|
+
resizer = new ResizeObserver(() => {
|
|
187
|
+
if (track.clientWidth) track.scrollLeft = clamp(selected()) * track.clientWidth
|
|
188
|
+
})
|
|
189
|
+
resizer.observe(track)
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
onDestroy(() => {
|
|
194
|
+
if (observer) observer.disconnect()
|
|
195
|
+
if (resizer) resizer.disconnect()
|
|
196
|
+
if (steerTimer) clearTimeout(steerTimer)
|
|
197
|
+
observer = null
|
|
198
|
+
resizer = null
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
defineExpose({ selected, count, go, next, prev })
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<section class="{{ rootClasses }}" aria-roledescription="carousel" @if(label)aria-label="{{ label }}"@endif @keydown="onKey($event)">
|
|
205
|
+
<div x-ref="trackRef" class="{{ trackClasses }}" aria-live="polite" @scroll="onScroll()">
|
|
206
|
+
<slot />
|
|
207
|
+
</div>
|
|
208
|
+
@if(dots)
|
|
209
|
+
<div class="{{ dotRowClasses }}" role="group" aria-label="{{ dotsLabel }}">
|
|
210
|
+
<button
|
|
211
|
+
:for="i in dotList"
|
|
212
|
+
:key="i"
|
|
213
|
+
type="button"
|
|
214
|
+
class="flex items-center justify-center h-6 min-w-6 px-0.5"
|
|
215
|
+
:aria-label="dotLabel(i)"
|
|
216
|
+
:aria-current="isCurrent(i) ? 'step' : null"
|
|
217
|
+
@click="go(i)"
|
|
218
|
+
><span aria-hidden="true" :class="dotClass(i)"></span></button>
|
|
219
|
+
</div>
|
|
220
|
+
@endif
|
|
221
|
+
</section>
|
|
222
|
+
|
|
223
|
+
<style>
|
|
224
|
+
/* Every page takes the whole width and snaps to it; the scrollbar is the
|
|
225
|
+
swipe itself, so it is not drawn. */
|
|
226
|
+
.stx-pager-track { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
|
|
227
|
+
.stx-pager-track::-webkit-scrollbar { display: none; }
|
|
228
|
+
.stx-pager-track > * { flex: 0 0 100%; width: 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
|
|
229
|
+
@media (prefers-reduced-motion: reduce) {
|
|
230
|
+
.stx-pager-dot { transition: none; }
|
|
231
|
+
}
|
|
232
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
/*
|
|
3
|
+
* A pager's dots, placed wherever the page wants them: above a tour's
|
|
4
|
+
* "Next" button rather than under the pages, where <Pager> draws its own.
|
|
5
|
+
*
|
|
6
|
+
* <Pager v-model:index="step" dots="false">…</Pager>
|
|
7
|
+
* <PagerDots v-model:index="step" :count="slides.length" label="Tour pages" />
|
|
8
|
+
*
|
|
9
|
+
* The current page is a wider pill; each dot is a button that moves there.
|
|
10
|
+
* Colour comes from the text colour (`className="text-white"`).
|
|
11
|
+
*/
|
|
12
|
+
export const index = Math.max(0, Math.trunc($num($props.index) || 0))
|
|
13
|
+
export const count = Math.max(0, Math.trunc($num($props.count) || 0))
|
|
14
|
+
export const label = $props.label || 'Pages'
|
|
15
|
+
export const goToLabel = $props.goToLabel || 'Go to page {n}'
|
|
16
|
+
export const className = $props.className || ''
|
|
17
|
+
|
|
18
|
+
export const rowClasses = `flex items-center justify-center gap-1.5 ${className}`.replace(/\s+/g, ' ').trim()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script client>
|
|
22
|
+
const emit = defineEmits()
|
|
23
|
+
const goToWords = {{ goToLabel }}
|
|
24
|
+
const selected = useModel('index', { default: {{ index }}, parse: v => Math.max(0, Math.trunc(Number(v)) || 0) })
|
|
25
|
+
const total = useReactiveProp('count', {{ count }})
|
|
26
|
+
const dotList = derived(() => Array.from({ length: Math.max(0, Number(total()) || 0) }, (_, i) => i))
|
|
27
|
+
|
|
28
|
+
function go(i) {
|
|
29
|
+
if (i === selected()) return
|
|
30
|
+
selected.set(i)
|
|
31
|
+
emit('change', i)
|
|
32
|
+
}
|
|
33
|
+
function isCurrent(i) { return i === selected() }
|
|
34
|
+
function dotClass(i) {
|
|
35
|
+
return i === selected()
|
|
36
|
+
? 'stx-pager-dot block h-1.5 w-5 rounded-full bg-current transition-all duration-300'
|
|
37
|
+
: 'stx-pager-dot block h-1.5 w-1.5 rounded-full bg-current opacity-35 transition-all duration-300'
|
|
38
|
+
}
|
|
39
|
+
function dotLabel(i) { return String(goToWords).replace('{n}', String(i + 1)) }
|
|
40
|
+
|
|
41
|
+
defineExpose({ selected, go })
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<div class="{{ rowClasses }}" role="group" aria-label="{{ label }}">
|
|
45
|
+
<button
|
|
46
|
+
:for="i in dotList"
|
|
47
|
+
:key="i"
|
|
48
|
+
type="button"
|
|
49
|
+
class="flex items-center justify-center h-6 min-w-6 px-0.5"
|
|
50
|
+
:aria-label="dotLabel(i)"
|
|
51
|
+
:aria-current="isCurrent(i) ? 'step' : null"
|
|
52
|
+
@click="go(i)"
|
|
53
|
+
><span aria-hidden="true" :class="dotClass(i)"></span></button>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.stx-pager-dot { transition: none; }
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Pager
|
|
2
|
+
|
|
3
|
+
Full-width pages you swipe or step through: a first-run tour, an onboarding
|
|
4
|
+
questionnaire, a gallery of screenshots.
|
|
5
|
+
|
|
6
|
+
The pages are the slot's elements in a native scroll-snap track, so a swipe is
|
|
7
|
+
the browser's own (momentum, rubber band, reduced motion) and costs no script
|
|
8
|
+
per frame. The page shown is a model the page drives with its own buttons.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```stx
|
|
13
|
+
<script client>
|
|
14
|
+
const step = state(0)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Pager v-model:index="step" label="Welcome tour" dotsLabel="Tour pages">
|
|
18
|
+
<section>Welcome</section>
|
|
19
|
+
<section :for="slide in slides" :key="slide.id">{{ slide.title }}</section>
|
|
20
|
+
</Pager>
|
|
21
|
+
<button @click="step.set(step() + 1)">Next</button>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
A questionnaire whose next page waits on an answer turns swiping off, and puts
|
|
25
|
+
its dots above the button:
|
|
26
|
+
|
|
27
|
+
```stx
|
|
28
|
+
<Pager v-model:index="question" swipe="false" dots="false" label="About you">…</Pager>
|
|
29
|
+
<PagerDots v-model:index="question" :count="questions.length" label="Questions" className="text-white" />
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
| Prop | Default | |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `index` | `0` | The page shown. `v-model:index`, or `:index` with `@change`. |
|
|
37
|
+
| `label` | | The carousel's accessible name. |
|
|
38
|
+
| `swipe` | `true` | Swiping and the arrow keys. Off leaves moving to the page's buttons. |
|
|
39
|
+
| `dots` | `true` | The built-in dots under the pages. |
|
|
40
|
+
| `dotsLabel` | `Pages` | The dots' group name. |
|
|
41
|
+
| `slideLabel` | `{n} of {total}` | Each page's label. |
|
|
42
|
+
| `goToLabel` | `Go to page {n}` | Each dot's label. |
|
|
43
|
+
| `className`, `trackClass`, `dotsClass` | | Extra classes. Dots take the text colour. |
|
|
44
|
+
|
|
45
|
+
Exposed: `selected`, `count`, `go(i)`, `next()`, `prev()`.
|
|
46
|
+
|
|
47
|
+
## Accessibility
|
|
48
|
+
|
|
49
|
+
The APG carousel pattern: a region with `aria-roledescription="carousel"`, each
|
|
50
|
+
page a group with `aria-roledescription="slide"` labelled "2 of 5", the pages
|
|
51
|
+
off screen `inert`, the current dot `aria-current="step"`, and the arrow keys
|
|
52
|
+
(outside a field, tab strip, radio group or slider) stepping between pages.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { default as Pager } from './Pager.stx'
|
|
2
|
+
export { default as PagerDots } from './PagerDots.stx'
|
|
3
|
+
|
|
4
|
+
export interface PagerProps {
|
|
5
|
+
/** The page shown, from 0. Use `v-model:index`, or `:index` with `@change`. */
|
|
6
|
+
index?: number
|
|
7
|
+
/** The carousel's accessible name. */
|
|
8
|
+
label?: string
|
|
9
|
+
/** Swiping (and the arrow keys) between pages. Off leaves moving to the page's own buttons. */
|
|
10
|
+
swipe?: boolean
|
|
11
|
+
/** The built-in dots under the pages. Off for a `<PagerDots>` placed elsewhere. */
|
|
12
|
+
dots?: boolean
|
|
13
|
+
dotsLabel?: string
|
|
14
|
+
/** Each page's label, `{n}` and `{total}` filled in. Default "{n} of {total}". */
|
|
15
|
+
slideLabel?: string
|
|
16
|
+
/** Each dot's label, `{n}` filled in. Default "Go to page {n}". */
|
|
17
|
+
goToLabel?: string
|
|
18
|
+
className?: string
|
|
19
|
+
trackClass?: string
|
|
20
|
+
dotsClass?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface PagerDotsProps {
|
|
24
|
+
/** The page shown, from 0. Use `v-model:index`, or `:index` with `@change`. */
|
|
25
|
+
index?: number
|
|
26
|
+
count: number
|
|
27
|
+
label?: string
|
|
28
|
+
/** Each dot's label, `{n}` filled in. Default "Go to page {n}". */
|
|
29
|
+
goToLabel?: string
|
|
30
|
+
className?: string
|
|
31
|
+
}
|