@stacksjs/components 0.2.814 → 0.2.816
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/{Button-gmct2gvq.stx → Button-k3j4cc3h.stx} +18 -1
- package/dist/{Video-9p1pncwt.stx → Video-acyn10qv.stx} +38 -6
- package/dist/index.js +5 -5
- package/dist/ui/button/Button.d.ts +16 -1
- package/dist/ui/video/Video.d.ts +40 -7
- package/package.json +9 -3
- package/src/ui/button/Button.stx +18 -1
- package/src/ui/video/Video.stx +38 -6
|
@@ -19,7 +19,22 @@ export const fullWidth = $bool($props.fullWidth)
|
|
|
19
19
|
* one, the button renders it in a span that tracks the parent's binding; given
|
|
20
20
|
* none, the slot behaves exactly as before. See stacksjs/stx#1997.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Desktop and native callers name a button's words `title` and its glyph
|
|
24
|
+
* `symbol`, with `iconOnly` meaning "draw the glyph alone". Accepting them is
|
|
25
|
+
* what lets such a call select this component rather than the native
|
|
26
|
+
* primitive (stacksjs/stx#2091).
|
|
27
|
+
*
|
|
28
|
+
* `title` supplies the words ONLY when nothing else does. It is also the web's
|
|
29
|
+
* tooltip attribute, so a caller writing both a tooltip and content keeps
|
|
30
|
+
* both: folding it into the label unconditionally would replace the slot with
|
|
31
|
+
* the tooltip text.
|
|
32
|
+
*/
|
|
33
|
+
export const symbol = $props.symbol || ''
|
|
34
|
+
export const iconOnly = $bool($props.iconOnly)
|
|
35
|
+
const slotWords = String($slots?.default ?? '').trim()
|
|
36
|
+
const titleWords = !$props.label && !slotWords ? ($props.title || '') : ''
|
|
37
|
+
export const label = $props.label || titleWords
|
|
23
38
|
export const hasLabel = label !== ''
|
|
24
39
|
|
|
25
40
|
/*
|
|
@@ -193,6 +208,8 @@ function onClick(event) {
|
|
|
193
208
|
type="{{ type }}"
|
|
194
209
|
class="{{ nativeButtonClasses }}"
|
|
195
210
|
activeOpacity="0.6"
|
|
211
|
+
@if(symbol)symbol="{{ symbol }}"@endif
|
|
212
|
+
@if(iconOnly)iconOnly="true"@endif
|
|
196
213
|
@if(isDisabled)disabled@endif
|
|
197
214
|
:disabled="isDisabled()"
|
|
198
215
|
aria-busy="{{ loading ? 'true' : 'false' }}"
|
|
@@ -20,13 +20,40 @@
|
|
|
20
20
|
* The controls speak the page's language (`<html lang>`): ts-video-player
|
|
21
21
|
* names its buttons and announces playback in it.
|
|
22
22
|
*
|
|
23
|
-
* On native, src calls using the shared media events select this
|
|
24
|
-
* when installed. Legacy
|
|
25
|
-
* retain the native primitive
|
|
23
|
+
* On native, src and source calls using the shared media events select this
|
|
24
|
+
* component when installed. Legacy-event calls (for example @progress rather
|
|
25
|
+
* than @timeupdate) retain the native primitive, because the two names mean
|
|
26
|
+
* different things on the web and collapse to one on a host. This is the
|
|
27
|
+
* host's Video control: `src`
|
|
26
28
|
* must be a media URL the platform supports, not a YouTube/Vimeo page.
|
|
27
29
|
* Browser source selection, tracks and DRM configuration remain web-only.
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* `source` is the native primitive's name for the same media URL, and both
|
|
33
|
+
* hosts accept either a string or a `{ uri }` payload. Accepting it here is
|
|
34
|
+
* what lets a legacy native call select this component instead of the
|
|
35
|
+
* primitive (stacksjs/stx#2091); `src` wins a mixed call, being this
|
|
36
|
+
* component's own API.
|
|
37
|
+
*/
|
|
38
|
+
function mediaUrl(value) {
|
|
39
|
+
if (typeof value === 'string') return value
|
|
40
|
+
if (value && typeof value === 'object') return String(value.uri ?? '')
|
|
41
|
+
return ''
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* How the frame fills its box. `resizeMode` is the native name and the host
|
|
45
|
+
* interprets it; `object-fit` is the web's, and the four native values map
|
|
46
|
+
* onto it, so one call works on both (stacksjs/stx#2091).
|
|
47
|
+
*
|
|
48
|
+
* Unset keeps this component's existing contain behaviour rather than
|
|
49
|
+
* adopting the primitive's cover default, so no shared caller changes.
|
|
50
|
+
*/
|
|
51
|
+
const RESIZE_FIT = { contain: 'contain', cover: 'cover', stretch: 'fill', center: 'none' }
|
|
52
|
+
export const resizeMode = typeof $props.resizeMode === 'string' ? $props.resizeMode.trim().toLowerCase() : ''
|
|
53
|
+
export const objectFit = RESIZE_FIT[resizeMode] || 'contain'
|
|
54
|
+
export const srcProp = $props.src || ''
|
|
55
|
+
export const sourceUrl = mediaUrl($props.source)
|
|
56
|
+
export const src = srcProp || sourceUrl
|
|
30
57
|
export const poster = $props.poster || ''
|
|
31
58
|
/** The accessible name of the player. Follows a binding. */
|
|
32
59
|
export const label = $props.label || $props.title || ''
|
|
@@ -83,7 +110,11 @@ const nativeVideo = !!window.stx._host.isNative
|
|
|
83
110
|
if (!nativeVideo)
|
|
84
111
|
registerElements()
|
|
85
112
|
|
|
86
|
-
|
|
113
|
+
// Tracked separately so a parent driving either name keeps working: holding
|
|
114
|
+
// one merged initial value would leave the other stale when it changed.
|
|
115
|
+
const liveSrcProp = useReactiveProp('src', {{ srcProp }})
|
|
116
|
+
const liveSourceProp = useReactiveProp('source', {{ sourceUrl }})
|
|
117
|
+
const liveSrc = derived(() => liveSrcProp() || liveSourceProp() || '')
|
|
87
118
|
const livePoster = useReactiveProp('poster', {{ poster }})
|
|
88
119
|
const liveLabel = useReactiveProp('label', {{ label }})
|
|
89
120
|
const liveRatio = useReactiveProp('aspectRatio', {{ aspectRatio }})
|
|
@@ -139,6 +170,7 @@ effect(() => {
|
|
|
139
170
|
<video-player
|
|
140
171
|
data-native="Video"
|
|
141
172
|
data-stx-native-host-root
|
|
173
|
+
@if(resizeMode) resizeMode="{{ resizeMode }}" @endif
|
|
142
174
|
ref="player"
|
|
143
175
|
@play="forwardNative('play', $event)"
|
|
144
176
|
@pause="forwardNative('pause', $event)"
|
|
@@ -177,7 +209,7 @@ effect(() => {
|
|
|
177
209
|
@if(isPage)
|
|
178
210
|
<span data-native-fallback class="block h-full w-full"></span>
|
|
179
211
|
@else
|
|
180
|
-
<video data-native-fallback @if(src) src="{{ src }}" @endif @if(poster) poster="{{ poster }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif :controls="playerControls()" :loop="playerLoop()" :muted="playerMuted()" @if(playsinline) playsinline @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif controlslist="{{ controlslist }}" @if(disablePictureInPicture) disablepictureinpicture @endif @if(label) aria-label="{{ label }}" @endif class="object-
|
|
212
|
+
<video data-native-fallback @if(src) src="{{ src }}" @endif @if(poster) poster="{{ poster }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif :controls="playerControls()" :loop="playerLoop()" :muted="playerMuted()" @if(playsinline) playsinline @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif controlslist="{{ controlslist }}" @if(disablePictureInPicture) disablepictureinpicture @endif @if(label) aria-label="{{ label }}" @endif class="object-{{ objectFit }} h-full w-full"></video>
|
|
181
213
|
@endif
|
|
182
214
|
<video-skin>
|
|
183
215
|
<media-seek-button slot="left" seconds="-10"></media-seek-button>
|
package/dist/index.js
CHANGED
|
@@ -6,20 +6,20 @@ var Qe={__stx:!0,src:"./components/CodeBlock.stx"};var Ze={__stx:!0,src:"./compo
|
|
|
6
6
|
Expected: ${a}`}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 z(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 z(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 z(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 z("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new z(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new z(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new z(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new z(e,"Failed to render component",{details:t.message})}},ae=null;function Cl(e){ae=e}function $l(){ae=null}function ne(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof z)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(ae)try{ae(e)}catch(a){console.error("Error in error handler:",a)}if(s)throw e}function Le(e,t,s){return(...o)=>{try{let a=e(...o);if(a instanceof Promise)return a.catch((n)=>{let r=J.eventHandler(t,s,n);throw ne(r,{throwError:!1}),r});return a}catch(a){let n=J.eventHandler(t,s,a);throw ne(n,{throwError:!1}),n}}}function Ht(e,t){if(!e)throw t}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 z(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 z(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 z(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 z("ComponentLoader",`Component "${e}" not found`,{component:e,details:"Make sure the component is properly imported and registered"})},invalidChildren(e,t,s){return new z(e,"Invalid children",{received:typeof t,expected:s,details:`${e} expects ${s} as children`})},stateUpdate(e,t,s){return new z(e,`Failed to update state "${t}"`,{details:s.message})},eventHandler(e,t,s){return new z(e,`Error in "${t}" event handler`,{details:s.message})},render(e,t){return new z(e,"Failed to render component",{details:t.message})}},ae=null;function Cl(e){ae=e}function $l(){ae=null}function ne(e,t={}){let{throwError:s=!0,logError:o=!0}=t;if(o){if(console.error("Component Error:",e),e instanceof z)console.group("Error Details"),console.log("Component:",e.component),console.log("Context:",e.context),console.groupEnd()}if(ae)try{ae(e)}catch(a){console.error("Error in error handler:",a)}if(s)throw e}function Le(e,t,s){return(...o)=>{try{let a=e(...o);if(a instanceof Promise)return a.catch((n)=>{let r=J.eventHandler(t,s,n);throw ne(r,{throwError:!1}),r});return a}catch(a){let n=J.eventHandler(t,s,a);throw ne(n,{throwError:!1}),n}}}function Ht(e,t){if(!e)throw t}function Ft(e,t,s={}){let o=z.formatMessage(e,t,s);console.warn(`\u26A0\uFE0F ${o}`)}function Sl(e,t){Ht(e,t)}function Tl(e){let t=typeof process<"u"&&process.env.DEBUG==="true";return{log(...s){if(t)console.log(`[${e}]`,...s)},warn(s,o){Ft(e,s,o)},error(s,o){let a=new z(e,s,o);ne(a,{throwError:!1})}}}function Il(e,t,s){try{return t()}catch(o){let a=J.render(e,o);return ne(a,{throwError:!1}),s}}class A{validate;message;isRequired;constructor(e,t,s=!1){this.validate=e;this.message=t;this.isRequired=s}get required(){return new A(this.validate,this.message,!0)}}var l={string:new A((e)=>typeof e==="string",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`string\`.`),number:new A((e)=>typeof e==="number"&&!Number.isNaN(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`number\`.`),boolean:new A((e)=>typeof e==="boolean",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`boolean\`.`),func:new A((e)=>typeof e==="function",(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`function\`.`),object:new A((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 A((e)=>Array.isArray(e),(e,t,s)=>`Invalid prop \`${t}\` of type \`${typeof e}\` supplied to \`${s}\`, expected \`array\`.`),any:new A(()=>!0,()=>""),oneOf(e){return new A((t)=>e.includes(t),(t,s,o)=>`Invalid prop \`${s}\` of value \`${t}\` supplied to \`${o}\`, expected one of [${e.map((a)=>JSON.stringify(a)).join(", ")}].`)},oneOfType(e){return new A((t,s,o)=>e.some((a)=>a.validate(t,s,o)),(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected one of the specified types.`)},arrayOf(e){return new A((t,s,o)=>{if(!Array.isArray(t))return!1;return t.every((a,n)=>e.validate(a,`${s}[${n}]`,o))},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected array of specified type.`)},shape(e){return new A((t,s,o)=>{if(typeof t!=="object"||t===null||Array.isArray(t))return!1;for(let[a,n]of Object.entries(e)){if(n.isRequired&&!(a in t))return!1;if(a in t&&!n.validate(t[a],`${s}.${a}`,o))return!1}return!0},(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected object matching specified shape.`)},instanceOf(e){return new A((t)=>t instanceof e,(t,s,o)=>`Invalid prop \`${s}\` supplied to \`${o}\`, expected instance of \`${e.name}\`.`)},custom(e,t){return new A(e,typeof t==="string"?()=>t:t)},min(e){return new A((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 A((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 A((s)=>typeof s==="number"&&s>=e&&s<=t,(s,o,a)=>`Invalid prop \`${o}\` of value \`${s}\` supplied to \`${a}\`, expected value between ${e} and ${t}.`)},pattern(e){return new A((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 A((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 A((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 Bt(e,t,s,o={}){let{throwOnError:a=!1,logWarnings:n=!0}=o,r=[];for(let[i,c]of Object.entries(s)){let d=t[i],u=d===void 0;if(c.isRequired&&u){let p=`Required prop \`${i}\` was not specified in \`${e}\`.`;r.push(p);continue}if(u)continue;if(!c.validate(d,i,e)){let p=c.message(d,i,e);r.push(p)}}if(r.length>0){if(n)console.group(`\u26A0\uFE0F Prop validation failed for \`${e}\``),r.forEach((i)=>console.warn(i)),console.groupEnd();if(a)throw Error(`Prop validation failed for \`${e}\`:
|
|
10
10
|
${r.join(`
|
|
11
|
-
`)}`)}return{valid:r.length===0,errors:r}}function B(e,t,s){return(o)=>Ft(e,o,t,s)}function Pl(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Al(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Wt="./Button-gmct2gvq.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,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Dl=B("Button",Kt);function Ml(e){return Le(e,"Button","onClick")}function zl(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function jl(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Ut="./Calendar-5vs6x7gj.stx";var Jt="./DateRangePicker-4zmf34e4.stx";var Xt="./EmptyState-snj7gbsn.stx";var Zt="./ErrorState-qb7af5zb.stx";var ts="./ThemeToggle-4wm9zare.stx";var os="./Card-r55zpjqh.stx";var ns="./Checkbox-80myyzzm.stx";var is="./ChoiceChips-8dcf172n.stx";var cs="./Combobox-9n04ec5w.stx";var ps="./ComboboxButton-4r6a45s1.stx";var hs="./ComboboxInput-1gyfpnca.stx";var ms="./ComboboxOption-wkw70js7.stx";var bs="./ComboboxOptions-zhr9b6rx.stx";var vs="./CommandPalette-qqjdbcyg.stx";var ys="./CommandPaletteItem-7290ce1z.stx";var Cs="./Dialog-wm7zjqnb.stx";var Ss="./DialogBackdrop-de5m5m4w.stx";var Is="./DialogDescription-yd2jgt2m.stx";var Ps="./DialogPanel-v972ztcc.stx";var Os="./DialogTitle-nw0pw114.stx";var Rs="./Drawer-d78cdr6d.stx";var Ds="./Dropdown-hb8ks69x.stx";var zs="./DropdownButton-wxc25hsy.stx";var Vs="./DropdownItem-af0vzc8a.stx";var Bs="./DropdownItems-bkz7jkyz.stx";var qs="./Form-cybgg9ym.stx";var Ws={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},Qc=B("Form",Ws);var _s="./GroupedList-j3sxv5pb.stx";var Gs="./GroupedListRow-v52zmzpk.stx";var Ys="./Image-ndt0d1dq.stx";var Qs="./EmailInput-sf9jfrgz.stx";var eo="./NumberInput-pq4k2k4k.stx";var so="./PasswordInput-r51qzgc0.stx";var ao="./SearchInput-w15r5t95.stx";var ro="./TextInput-1kvx4pte.stx";var io={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},lo={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},co={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},po={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},uo={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},md=B("TextInput",lo),gd=B("EmailInput",io),bd=B("PasswordInput",po),xd=B("NumberInput",co),vd=B("SearchInput",uo);var fo="./List-q8ff8gdr.stx";var go="./Listbox-83j2q4x6.stx";var xo="./ListboxButton-gan8e3nw.stx";var wo="./ListboxLabel-ka0hfm7b.stx";var ko="./ListboxOption-gpaqvk3s.stx";var $o="./ListboxOptions-2928864k.stx";var To="./FilterChip-bynt5maa.stx";var Eo="./FilterChips-mpmev5v5.stx";var Ao="./ListRow-nvyg2fwb.stx";var Lo="./NavBar-ky8tedjb.stx";var No="./SectionCard-8b5fyrjd.stx";var Mo="./TabBar-6m1ajm1d.stx";var jo="./TabBarItem-kddfnhk3.stx";var Ho="./Navigator-1yk1c3pp.stx";var Fo="./Notification-b3cz24f0.stx";var Wo="./Pager-5e7knyqh.stx";var _o="./PagerDots-076w890y.stx";var Go="./Pagination-8bhbkpcp.stx";var Yo="./Checkout-crbegxyv.stx";var Qo="./DefaultPaymentMethod-ss3x61tr.stx";var ea="./PaymentMethods-z4hhr0kv.stx";var sa="./SubscriptionCheckout-rdcv32n1.stx";var aa="./Popover-jjt7p7sn.stx";var ra="./PopoverButton-ks3cttd9.stx";var la="./PopoverPanel-ddgj4gz3.stx";var da="./Portal-m73vz879.stx";var ua="./Progress-2qzb77kc.stx";var fa="./Radio-8153x74w.stx";var ga="./RadioGroup-smqcqgds.stx";var xa="./RadioGroupDescription-z34r9avr.stx";var wa="./RadioGroupLabel-ka0hfm7b.stx";var ka="./RadioGroupOption-twcw1b2a.stx";var $a="./SegmentedControl-9b1vh960.stx";var Ta="./Select-1cnqbcmg.stx";var Ea="./Sidebar-8dygywjv.stx";var Aa="./SidebarFooter-s7skj92y.stx";var La="./SidebarHeader-x7jdhmyr.stx";var Na="./SidebarItem-64sjb2fe.stx";var Ma="./SidebarPinned-48kyk193.stx";var ja="./SidebarSection-vx5bahsk.stx";var Ha="./SidebarSpace-bwv98azf.stx";var Fa="./SidebarSpaces-mdtrynr2.stx";var Wa="./SidebarSpaceSwitcher-1mycft2g.stx";var re={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]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 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"].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]/60 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]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ka={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}},_a={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}},Ua={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"].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}},Ga={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ja={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Ya={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Re={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ua,workspace:Ka,desktop:_a,solid:Ga,transparent:Ja,vibrancy:Ya};function du(e){return Re[e||"macos"]||Re.macos}function pu(e){if(!e)return;return re[e]||e}var Xa=re.gray;function W(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ne(e){return{light:{from:W(e,35,"#ffffff"),to:W(e,12.5,"#ffffff"),ink:W(e,22,"#17171b"),accent:W(e,88,"#2a2a30")},dark:{from:W(e,27,"#101014"),to:W(e,10,"#08080b"),ink:W(e,12,"#f4f4f7"),accent:W(e,74,"#ffffff")}}}function fu(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qa(e){if(!e)return Ne(Xa);if(typeof e!=="string")return e;return Ne(re[e]||e)}function Za(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 De(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function en(e){let t=Qa(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:De(e.action,e.id,"action","i-f7-plus"),clear:De(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Za(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function mu(e){return(e||[]).map(en)}function gu(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function bu(e){return e.map((t)=>t.tint)}var sn="./Skeleton-m4p66zcs.stx";var an="./Spinner-vhnc3y03.stx";var rn="./Stepper-68gxcmej.stx";var cn="./StepperStep-zf4pq1s0.stx";class ie{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,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,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=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;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=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}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((a)=>a(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 a=this.storage.getItem(o)||"";e+=o.length+a.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 qu={local:new ie("local"),session:new ie("session")};function Wu(e="local",t){return new ie(e,t)}var pn="./Switch-s8yf2rvm.stx";var hn="./Table-0a4y46vd.stx";var mn="./TableBody-y49bqb1p.stx";var bn="./TableCell-jhvsxw8b.stx";var vn="./TableHead-e9xvjx2j.stx";var yn="./TableHeader-krzcx4sv.stx";var Cn="./TableRow-dt8e11aj.stx";var Sn="./Tab-j9f4t166.stx";var In="./TabList-r1pc87xs.stx";var Pn="./TabPanel-5htevsq6.stx";var On="./Tabs-psm5wj7c.stx";var Rn="./Teleport-vqs75x36.stx";var Dn="./Textarea-40qrctpw.stx";var zn="./AiTextarea-bg6xq5wc.stx";var Vn="./Tooltip-pev702hb.stx";var Bn="./Transition-7m0mk45s.stx";var qn="./Video-9p1pncwt.stx";var Kn="./VirtualList-fa7v5a3h.stx";var Un="./VirtualTable-kp7b3wyv.stx";var Gn=0;function Me(e="a11y"){return`${e}-${++Gn}-${Date.now()}`}function Hh(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.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",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Bh(e,t){let s=Me("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 Fh(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 ve(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 qh(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,d=!1,u=!1,p=null,h=(w)=>{if(u)return;if(a&&w.key==="Escape"){w.preventDefault(),k();return}if(w.key==="Tab"){let S=ve(e);if(S.length===0){w.preventDefault();return}let L=S[0],R=S[S.length-1];if(w.shiftKey){if(document.activeElement===L)w.preventDefault(),R.focus()}else if(document.activeElement===R)w.preventDefault(),L.focus()}},m=(w)=>{if(u)return;if(!e.contains(w.target)){if(typeof r==="function"){if(!r(w)&&n)k()}else if(!r&&n)k()}};function C(){if(d)return;d=!0,p=document.activeElement;let w=s||ve(e)[0];if(w&&typeof w.focus==="function")w.focus();document.addEventListener("keydown",h),document.addEventListener("click",m),i?.()}function k(){if(!d)return;d=!1;let w=o||p;if(w&&typeof w.focus==="function")w.focus();document.removeEventListener("keydown",h),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:C,deactivate:k,pause:y,unpause:b}}function Wh(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),d=(p)=>{let h=c();if(p<0||p>=h.length)return;h.forEach((m,C)=>{if(C===p){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=p,r?.(p,h[p])},u=(p)=>{let m=c().length-1,C=!1,k=i;switch(p.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"Home":k=0,C=!0;break;case"End":k=m,C=!0;break}if(C)p.preventDefault(),d(k)};return d(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Kh={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function _h(e){return document.activeElement===e}function Uh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function Gh(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 Jh={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 Yh(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 Xh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Qh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Zh(){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 ef(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 tf(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)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 Jn=(e,t,s,o)=>s*e/o+t,Yn=(e,t,s,o)=>(e/=o,s*e*e+t),Xn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),Qn=(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},Zn=(e,t,s,o)=>(e/=o,s*e*e*e+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),tr=(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},sr=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),or=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ar=(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},nr=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),rr=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),ir=(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},lr=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,cr=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,dr=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,pr=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,ur=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,hr=(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},fr=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),mr=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),gr=(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},br=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},xr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},vr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},wr=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),yr=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),kr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(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},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,Cr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},of={linear:Jn,easeInQuad:Yn,easeOutQuad:Xn,easeInOutQuad:Qn,easeInCubic:Zn,easeOutCubic:er,easeInOutCubic:tr,easeInQuart:sr,easeOutQuart:or,easeInOutQuart:ar,easeInQuint:nr,easeOutQuint:rr,easeInOutQuint:ir,easeInSine:lr,easeOutSine:cr,easeInOutSine:dr,easeInExpo:pr,easeOutExpo:ur,easeInOutExpo:hr,easeInCirc:fr,easeOutCirc:mr,easeInOutCirc:gr,easeInElastic:br,easeOutElastic:xr,easeInOutElastic:vr,easeInBack:wr,easeOutBack:yr,easeInOutBack:kr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:Cr};function $r(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=$r(t,s)}function nf(e){e.style.animation=""}function Sr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function rf(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function lf(e,t){for(let s of t)je(e,s.name,s.options),await Sr(e)}var cf={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 df(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function pf(e,t){let s=`
|
|
11
|
+
`)}`)}return{valid:r.length===0,errors:r}}function F(e,t,s){return(o)=>Bt(e,o,t,s)}function Pl(e,t,s="value"){if(!t.validate(e,s,"assertion"))throw Error(t.message(e,s,"assertion"))}function Al(e,t,s="value"){if(!t.validate(e,s,"warning"))console.warn(t.message(e,s,"warning"))}var Wt="./Button-k3j4cc3h.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,label:l.string,text:l.string,leftIcon:l.string,rightIcon:l.string,className:l.string,onClick:l.func},Dl=F("Button",Kt);function Ml(e){return Le(e,"Button","onClick")}function zl(e){if(e&&!["primary","secondary","outline","ghost","danger"].includes(e))throw J.invalidProp("Button","variant",e,["primary","secondary","outline","ghost","danger"])}function jl(e){if(e&&!["xs","sm","md","lg","xl"].includes(e))throw J.invalidProp("Button","size",e,["xs","sm","md","lg","xl"])}var Ut="./Calendar-5vs6x7gj.stx";var Jt="./DateRangePicker-4zmf34e4.stx";var Xt="./EmptyState-snj7gbsn.stx";var Zt="./ErrorState-qb7af5zb.stx";var ts="./ThemeToggle-4wm9zare.stx";var os="./Card-r55zpjqh.stx";var ns="./Checkbox-80myyzzm.stx";var is="./ChoiceChips-8dcf172n.stx";var cs="./Combobox-9n04ec5w.stx";var ps="./ComboboxButton-4r6a45s1.stx";var hs="./ComboboxInput-1gyfpnca.stx";var ms="./ComboboxOption-wkw70js7.stx";var bs="./ComboboxOptions-zhr9b6rx.stx";var vs="./CommandPalette-qqjdbcyg.stx";var ys="./CommandPaletteItem-7290ce1z.stx";var Cs="./Dialog-wm7zjqnb.stx";var Ss="./DialogBackdrop-de5m5m4w.stx";var Is="./DialogDescription-yd2jgt2m.stx";var Ps="./DialogPanel-v972ztcc.stx";var Os="./DialogTitle-nw0pw114.stx";var Rs="./Drawer-d78cdr6d.stx";var Ds="./Dropdown-hb8ks69x.stx";var zs="./DropdownButton-wxc25hsy.stx";var Vs="./DropdownItem-af0vzc8a.stx";var Fs="./DropdownItems-bkz7jkyz.stx";var qs="./Form-cybgg9ym.stx";var Ws={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},Qc=F("Form",Ws);var _s="./GroupedList-j3sxv5pb.stx";var Gs="./GroupedListRow-v52zmzpk.stx";var Ys="./Image-ndt0d1dq.stx";var Qs="./EmailInput-sf9jfrgz.stx";var eo="./NumberInput-pq4k2k4k.stx";var so="./PasswordInput-r51qzgc0.stx";var ao="./SearchInput-w15r5t95.stx";var ro="./TextInput-1kvx4pte.stx";var io={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},lo={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},co={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},po={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},uo={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},md=F("TextInput",lo),gd=F("EmailInput",io),bd=F("PasswordInput",po),xd=F("NumberInput",co),vd=F("SearchInput",uo);var fo="./List-q8ff8gdr.stx";var go="./Listbox-83j2q4x6.stx";var xo="./ListboxButton-gan8e3nw.stx";var wo="./ListboxLabel-ka0hfm7b.stx";var ko="./ListboxOption-gpaqvk3s.stx";var $o="./ListboxOptions-2928864k.stx";var To="./FilterChip-bynt5maa.stx";var Eo="./FilterChips-mpmev5v5.stx";var Ao="./ListRow-nvyg2fwb.stx";var Lo="./NavBar-ky8tedjb.stx";var No="./SectionCard-8b5fyrjd.stx";var Mo="./TabBar-6m1ajm1d.stx";var jo="./TabBarItem-kddfnhk3.stx";var Ho="./Navigator-1yk1c3pp.stx";var Bo="./Notification-b3cz24f0.stx";var Wo="./Pager-5e7knyqh.stx";var _o="./PagerDots-076w890y.stx";var Go="./Pagination-8bhbkpcp.stx";var Yo="./Checkout-crbegxyv.stx";var Qo="./DefaultPaymentMethod-ss3x61tr.stx";var ea="./PaymentMethods-z4hhr0kv.stx";var sa="./SubscriptionCheckout-rdcv32n1.stx";var aa="./Popover-jjt7p7sn.stx";var ra="./PopoverButton-ks3cttd9.stx";var la="./PopoverPanel-ddgj4gz3.stx";var da="./Portal-m73vz879.stx";var ua="./Progress-2qzb77kc.stx";var fa="./Radio-8153x74w.stx";var ga="./RadioGroup-smqcqgds.stx";var xa="./RadioGroupDescription-z34r9avr.stx";var wa="./RadioGroupLabel-ka0hfm7b.stx";var ka="./RadioGroupOption-twcw1b2a.stx";var $a="./SegmentedControl-9b1vh960.stx";var Ta="./Select-1cnqbcmg.stx";var Ea="./Sidebar-8dygywjv.stx";var Aa="./SidebarFooter-s7skj92y.stx";var La="./SidebarHeader-x7jdhmyr.stx";var Na="./SidebarItem-64sjb2fe.stx";var Ma="./SidebarPinned-48kyk193.stx";var ja="./SidebarSection-vx5bahsk.stx";var Ha="./SidebarSpace-bwv98azf.stx";var Ba="./SidebarSpaces-mdtrynr2.stx";var Wa="./SidebarSpaceSwitcher-1mycft2g.stx";var re={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]/75 dark:text-[#ebebf5]/60"].join(" "),sectionChevron:["i-f7-chevron-down h-[11px] w-[11px] ml-auto","text-[#3c3c43]/60 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"].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]/60 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]/75 dark:text-[#ebebf5]/60"].join(" "),indentPerLevel:16}},Ka={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}},_a={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}},Ua={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"].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}},Ga={..._,pane:"bg-stone-100 dark:bg-neutral-900 text-black dark:text-white select-none",layers:{}},Ja={..._,pane:"bg-transparent text-black dark:text-white select-none",layers:{}},Ya={..._,pane:"bg-white/50 dark:bg-black/40 backdrop-blur-3xl backdrop-saturate-200 text-black dark:text-white select-none",layers:{}},Re={macos:_,tahoe:_,"macos-tahoe":_,"macos-latest":_,arc:Ua,workspace:Ka,desktop:_a,solid:Ga,transparent:Ja,vibrancy:Ya};function du(e){return Re[e||"macos"]||Re.macos}function pu(e){if(!e)return;return re[e]||e}var Xa=re.gray;function W(e,t,s){return`color-mix(in oklab, ${e} ${t}%, ${s})`}function Ne(e){return{light:{from:W(e,35,"#ffffff"),to:W(e,12.5,"#ffffff"),ink:W(e,22,"#17171b"),accent:W(e,88,"#2a2a30")},dark:{from:W(e,27,"#101014"),to:W(e,10,"#08080b"),ink:W(e,12,"#f4f4f7"),accent:W(e,74,"#ffffff")}}}function fu(e,t){return`linear-gradient(180deg, ${e} 0%, ${t} 100%)`}function Qa(e){if(!e)return Ne(Xa);if(typeof e!=="string")return e;return Ne(re[e]||e)}function Za(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 De(e,t,s,o){if(!e||!e.label)return null;return{id:e.id||`${t}-${s}`,label:e.label,icon:e.icon||o}}function en(e){let t=Qa(e.tint);return{id:e.id,label:e.label||"",icon:e.icon||"",pinned:e.pinned||[],sections:e.sections||[],action:De(e.action,e.id,"action","i-f7-plus"),clear:De(e.clear,e.id,"clear","i-f7-arrow-down"),tint:t,style:Za(t),deferred:e.deferred===!0,showTitle:e.showTitle??!0}}function mu(e){return(e||[]).map(en)}function gu(e,t){if(!t)return 0;let s=e.findIndex((o)=>o.id===t);return s===-1?0:s}function bu(e){return e.map((t)=>t.tint)}var sn="./Skeleton-m4p66zcs.stx";var an="./Spinner-vhnc3y03.stx";var rn="./Stepper-68gxcmej.stx";var cn="./StepperStep-zf4pq1s0.stx";class ie{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,a=e.newValue?JSON.parse(e.newValue).value:null;s.forEach((n)=>n(a,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=[],a="";for(let n=0;n<e.length;n++){let r=e.charAt(n),i=a+r;if(t[i]!==void 0)a=i;else o.push(a.length>1?t[a]:a.charCodeAt(0)),t[i]=s++,a=r}if(a!=="")o.push(a.length>1?t[a]:a.charCodeAt(0));return JSON.stringify(o)}decompress(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return e;let s={},o=256,a=String.fromCharCode(t[0]),n=a;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=a+a.charAt(0);else return e;n+=c,s[o++]=a+c.charAt(0),a=c}return n}catch{return e}}getKey(e){return this.namespace?`${this.namespace}:${e}`:e}set(e,t,s){let o=this.getKey(e),a=this.get(e),n={value:t,timestamp:Date.now(),expire:s?.expire,encrypted:s?.encrypt||!1,compressed:s?.compress||!1};try{let r=JSON.stringify(n);if(s?.compress)r=this.compress(r);if(s?.encrypt)r=this.encrypt(r);this.storage.setItem(o,r),this.notifyWatchers(e,t,a)}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((a)=>a(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 a=this.storage.getItem(o)||"";e+=o.length+a.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 qu={local:new ie("local"),session:new ie("session")};function Wu(e="local",t){return new ie(e,t)}var pn="./Switch-s8yf2rvm.stx";var hn="./Table-0a4y46vd.stx";var mn="./TableBody-y49bqb1p.stx";var bn="./TableCell-jhvsxw8b.stx";var vn="./TableHead-e9xvjx2j.stx";var yn="./TableHeader-krzcx4sv.stx";var Cn="./TableRow-dt8e11aj.stx";var Sn="./Tab-j9f4t166.stx";var In="./TabList-r1pc87xs.stx";var Pn="./TabPanel-5htevsq6.stx";var On="./Tabs-psm5wj7c.stx";var Rn="./Teleport-vqs75x36.stx";var Dn="./Textarea-40qrctpw.stx";var zn="./AiTextarea-bg6xq5wc.stx";var Vn="./Tooltip-pev702hb.stx";var Fn="./Transition-7m0mk45s.stx";var qn="./Video-acyn10qv.stx";var Kn="./VirtualList-fa7v5a3h.stx";var Un="./VirtualTable-kp7b3wyv.stx";var Gn=0;function Me(e="a11y"){return`${e}-${++Gn}-${Date.now()}`}function Hh(e,t,s={}){let{visible:o=!1,id:a=Me("label")}=s,n=document.createElement(o?"label":"span");if(n.id=a,n.textContent=e,!o)Object.assign(n.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",a),t.parentElement)t.parentElement.insertBefore(n,t);else document.body.appendChild(n);return a}function Fh(e,t){let s=Me("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 Bh(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 ve(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 qh(e,t={}){let{initialFocus:s,returnFocus:o,escapeDeactivates:a=!0,clickOutsideDeactivates:n=!0,allowOutsideClick:r=!1,onActivate:i,onDeactivate:c}=t,d=!1,u=!1,p=null,h=(w)=>{if(u)return;if(a&&w.key==="Escape"){w.preventDefault(),k();return}if(w.key==="Tab"){let S=ve(e);if(S.length===0){w.preventDefault();return}let L=S[0],R=S[S.length-1];if(w.shiftKey){if(document.activeElement===L)w.preventDefault(),R.focus()}else if(document.activeElement===R)w.preventDefault(),L.focus()}},m=(w)=>{if(u)return;if(!e.contains(w.target)){if(typeof r==="function"){if(!r(w)&&n)k()}else if(!r&&n)k()}};function C(){if(d)return;d=!0,p=document.activeElement;let w=s||ve(e)[0];if(w&&typeof w.focus==="function")w.focus();document.addEventListener("keydown",h),document.addEventListener("click",m),i?.()}function k(){if(!d)return;d=!1;let w=o||p;if(w&&typeof w.focus==="function")w.focus();document.removeEventListener("keydown",h),document.removeEventListener("click",m),c?.()}function y(){u=!0}function b(){u=!1}return{activate:C,deactivate:k,pause:y,unpause:b}}function Wh(e,t={}){let{selector:s='[role="option"], [role="menuitem"], [role="tab"], button',initialIndex:o=0,orientation:a="both",loop:n=!0,onFocusChange:r}=t,i=o,c=()=>Array.from(e.querySelectorAll(s)),d=(p)=>{let h=c();if(p<0||p>=h.length)return;h.forEach((m,C)=>{if(C===p){if(m.setAttribute("tabindex","0"),typeof m.focus==="function")m.focus()}else m.setAttribute("tabindex","-1")}),i=p,r?.(p,h[p])},u=(p)=>{let m=c().length-1,C=!1,k=i;switch(p.key){case"ArrowRight":if(a==="horizontal"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"ArrowDown":if(a==="vertical"||a==="both"){if(k=i+1,k>m)k=n?0:m;C=!0}break;case"ArrowUp":if(a==="vertical"||a==="both"){if(k=i-1,k<0)k=n?m:0;C=!0}break;case"Home":k=0,C=!0;break;case"End":k=m,C=!0;break}if(C)p.preventDefault(),d(k)};return d(o),e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}}var Kh={Enter:"Enter",Space:" ",Escape:"Escape",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Tab:"Tab",Home:"Home",End:"End",PageUp:"PageUp",PageDown:"PageDown"};function _h(e){return document.activeElement===e}function Uh(e,t){let s=t||document.activeElement,o=ve(document.body),a=o.indexOf(s);if(a===-1)return;let n=e==="next"?a+1:a-1,r=o[n];if(r)r.focus()}function Gh(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 Jh={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 Yh(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 Xh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-reduced-motion: reduce)").matches;return!1}function Qh(){if(typeof window.matchMedia==="function")return window.matchMedia("(prefers-contrast: high)").matches;return!1}function Zh(){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 ef(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 tf(e){let t=[],s=(o)=>{let a=e.getAttribute(o);if(a){let n=a.split(" ");for(let r of n)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 Jn=(e,t,s,o)=>s*e/o+t,Yn=(e,t,s,o)=>(e/=o,s*e*e+t),Xn=(e,t,s,o)=>(e/=o,-s*e*(e-2)+t),Qn=(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},Zn=(e,t,s,o)=>(e/=o,s*e*e*e+t),er=(e,t,s,o)=>(e/=o,e--,s*(e*e*e+1)+t),tr=(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},sr=(e,t,s,o)=>(e/=o,s*e*e*e*e+t),or=(e,t,s,o)=>(e/=o,e--,-s*(e*e*e*e-1)+t),ar=(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},nr=(e,t,s,o)=>(e/=o,s*e*e*e*e*e+t),rr=(e,t,s,o)=>(e/=o,e--,s*(e*e*e*e*e+1)+t),ir=(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},lr=(e,t,s,o)=>-s*Math.cos(e/o*(Math.PI/2))+s+t,cr=(e,t,s,o)=>s*Math.sin(e/o*(Math.PI/2))+t,dr=(e,t,s,o)=>-s/2*(Math.cos(Math.PI*e/o)-1)+t,pr=(e,t,s,o)=>e===0?t:s*2**(10*(e/o-1))+t,ur=(e,t,s,o)=>e===o?t+s:s*(-(2**(-10*e/o))+1)+t,hr=(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},fr=(e,t,s,o)=>(e/=o,-s*(Math.sqrt(1-e*e)-1)+t),mr=(e,t,s,o)=>(e/=o,e--,s*Math.sqrt(1-e*e)+t),gr=(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},br=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return e-=1,-(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t},xr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o,e===1)return t+s;if(!n)n=o*0.3;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);return r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)+s+t},vr=(e,t,s,o)=>{let a=1.70158,n=0,r=s;if(e===0)return t;if(e/=o/2,e===2)return t+s;if(!n)n=o*0.44999999999999996;if(r<Math.abs(s))r=s,a=n/4;else a=n/(2*Math.PI)*Math.asin(s/r);if(e<1)return e-=1,-0.5*(r*2**(10*e)*Math.sin((e*o-a)*(2*Math.PI)/n))+t;return e-=1,r*2**(-10*e)*Math.sin((e*o-a)*(2*Math.PI)/n)*0.5+s+t},wr=(e,t,s,o)=>(e/=o,s*e*e*(2.70158*e-1.70158)+t),yr=(e,t,s,o)=>(e/=o,e--,s*(e*e*(2.70158*e+1.70158)+1)+t),kr=(e,t,s,o)=>{let a=1.70158;if(e/=o/2,e<1)return a*=1.525,s/2*(e*e*((a+1)*e-a))+t;return e-=2,a*=1.525,s/2*(e*e*((a+1)*e+a)+2)+t},we=(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},ze=(e,t,s,o)=>s-we(o-e,0,s,o)+t,Cr=(e,t,s,o)=>{if(e<o/2)return ze(e*2,0,s,o)*0.5+t;return we(e*2-o,0,s,o)*0.5+s*0.5+t},of={linear:Jn,easeInQuad:Yn,easeOutQuad:Xn,easeInOutQuad:Qn,easeInCubic:Zn,easeOutCubic:er,easeInOutCubic:tr,easeInQuart:sr,easeOutQuart:or,easeInOutQuart:ar,easeInQuint:nr,easeOutQuint:rr,easeInOutQuint:ir,easeInSine:lr,easeOutSine:cr,easeInOutSine:dr,easeInExpo:pr,easeOutExpo:ur,easeInOutExpo:hr,easeInCirc:fr,easeOutCirc:mr,easeInOutCirc:gr,easeInElastic:br,easeOutElastic:xr,easeInOutElastic:vr,easeInBack:wr,easeOutBack:yr,easeInOutBack:kr,easeInBounce:ze,easeOutBounce:we,easeInOutBounce:Cr};function $r(e,t={}){let{duration:s="1s",timing:o="ease",delay:a="0s",iteration:n="1",direction:r="normal",fill:i="both",playState:c="running"}=t;return`${e} ${s} ${o} ${a} ${n} ${r} ${i} ${c}`}function je(e,t,s={}){e.style.animation=$r(t,s)}function nf(e){e.style.animation=""}function Sr(e){return new Promise((t)=>{let s=()=>{e.removeEventListener("animationend",s),t()};e.addEventListener("animationend",s)})}function rf(e,t,s={}){let{stagger:o=100,...a}=s;e.forEach((n,r)=>{let i=`${r*o}ms`;je(n,t,{...a,delay:i})})}async function lf(e,t){for(let s of t)je(e,s.name,s.options),await Sr(e)}var cf={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 df(e,t,s=1000){return new Promise((o)=>{e.classList.add(t),setTimeout(()=>{e.classList.remove(t),o()},s)})}function pf(e,t){let s=`
|
|
12
12
|
@keyframes ${e} {
|
|
13
13
|
${Object.entries(t).map(([a,n])=>{let r=Object.entries(n).map(([i,c])=>`${i}: ${c};`).join(" ");return`${a} { ${r} }`}).join(`
|
|
14
14
|
`)}
|
|
15
15
|
}
|
|
16
|
-
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function Tr(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:o=1000,easing:a="ease",delay:n=0,iterations:r=1,direction:i="normal",fill:c="both"}=s;return e.animate([...t],{duration:o,easing:a,delay:n,iterations:r,direction:i,fill:c})}var Ir={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 hf(e,t,s={}){return Tr(e,Ir[t],s)}async function Er(){try{let e=await import("ts-syntax-highlighter");return e.createHighlighter}catch{return null}}var ye=null,He="github-light",
|
|
16
|
+
`,o=document.createElement("style");o.textContent=s,document.head.appendChild(o)}function Tr(e,t,s={}){if(typeof e.animate!=="function")return console.warn("Web Animations API not supported"),null;let{duration:o=1000,easing:a="ease",delay:n=0,iterations:r=1,direction:i="normal",fill:c="both"}=s;return e.animate([...t],{duration:o,easing:a,delay:n,iterations:r,direction:i,fill:c})}var Ir={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 hf(e,t,s={}){return Tr(e,Ir[t],s)}async function Er(){try{let e=await import("ts-syntax-highlighter");return e.createHighlighter}catch{return null}}var ye=null,He="github-light",Fe="github-dark";function ke(e){return`<pre class="syntax"><code>${e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</code></pre>`}async function Pr(){if(!ye){let e=await Er();if(!e)throw Error("ts-syntax-highlighter could not be loaded");ye=await e({theme:"github-light"})}return ye}var Ar=/<span class="([^"]*)"[^>]*style="([^"]*)"/g,Be=/^token\s+(\S.*)$/;function Ve(e){let t=[];for(let s of e.matchAll(Ar)){let o=Be.exec(s[1]??"");if(o)t.push([o[1].trim(),s[2]??""])}return t}function Or(e){return/^[\w-]+$/.test(e)}async function Lr(e,t,s){let o,a;try{o=await e.highlight(t,s,{theme:He}),a=await e.highlight(t,s,{theme:Fe})}catch{return null}let n=o?.html,r=a?.html;if(!n||!r)return null;let i=Ve(n),c=Ve(r);if(i.length===0||i.length!==c.length)return null;let d=new Map;for(let y=0;y<i.length;y++){let[b,w]=i[y],S=c[y][1];if(!b||!w||!S||d.has(b)||!Or(b))continue;d.set(b,{light:w,dark:S})}if(d.size===0)return null;let u=[],p=[];for(let[y,{light:b,dark:w}]of d)u.push(`.syntax .token.${y} { ${b} }`),p.push(`.syntax .token.${y} { ${w} }`);let h=/\.syntax\s*\{([^}]*)\}/.exec(a.css??"")?.[1],m=h?h.split(";").map((y)=>y.trim()).filter((y)=>/^(?:background-color|color)\s*:/.test(y)).join("; "):"";if(m)p.unshift(`.syntax { ${m} }`);let C=[o.css??"",u.join(`
|
|
17
17
|
`),`@media (prefers-color-scheme: dark) {
|
|
18
18
|
:root:not(.light) ${p.join(`
|
|
19
19
|
:root:not(.light) `)}
|
|
20
20
|
}`,p.map((y)=>`.dark ${y}`).join(`
|
|
21
21
|
`)].filter(Boolean).join(`
|
|
22
|
-
`);return{html:n.replace(/(<span class="[^"]*")[^>]*?\s+style="[^"]*"/g,(y,b)=>Fe.test(/class="([^"]*)"/.exec(b)?.[1]??"")?b:y),css:C}}async function mf(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:a=!1,wrapLines:n=!0}=t,r=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?Be:He,i;try{i=await Pr()}catch{return{html:ke(e),css:"",language:o,theme:r}}if(s==="auto"){let p=await Lr(i,e,o);if(p)return{html:p.html,css:p.css,language:o,theme:"auto"}}let c;try{c=await i.highlight(e,o,{theme:r})}catch{return{html:ke(e),css:"",language:o,theme:r}}let d=c,u=typeof d==="string"?{html:d,css:""}:{html:d?.html??ke(e),css:d?.css??""};return{html:u.html,css:u.css,language:o,theme:r}}function gf(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 bf(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,Rr=(e)=>e===1?0:1;function le(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function Ce(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function vf(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:a={},dateTimeFormats:n={},numberFormats:r={},missing:i,warnMissing:c=!0}=e;function d(b,w={}){let S=le(o[t],b);if(S===void 0&&s)S=le(o[s],b);if(S===void 0){if(i){let L=i(t,b);if(L)return Ce(L,w)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${b}" in locale "${t}"`);return b}if(typeof S==="string")return Ce(S,w);return String(S)}function u(b,w,S={}){let L=d(b,{...S,count:w});if(L.includes("|")){let R=L.split("|").map((q)=>q.trim()),H=(a[t]||Rr)(w,t),j=R[H]||R[R.length-1];return Ce(j,{...S,count:w})}return L}function p(b,w="default"){let S=typeof b==="number"?new Date(b):b,L=n[w]||n.default||{};return new Intl.DateTimeFormat(t,L).format(S)}function h(b,w="default"){let S=r[w]||r.default||{};return new Intl.NumberFormat(t,S).format(b)}function m(b){if(le(o[t],b)!==void 0)return!0;if(s)return le(o[s],b)!==void 0;return!1}function C(b){if(!o[b]){console.warn(`[i18n] Locale "${b}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=b}function k(b,w){if(!o[b])o[b]={};o[b]={...o[b],...w}}function y(b){delete o[b]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:C,t:d,tc:u,d:p,n:h,te:m,addMessages:k,removeLocale:y}}function wf(e){F=e}function yf(){return F}function kf(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return F.t(e,t)}function Cf(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 $f(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.d(e,t)}function Sf(e,t){if(!F)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return F.n(e,t)}var Tf={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},If={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"}},Ef={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function Pf(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function Af(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var Of={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 Rf(e={}){let{max:t=10,ttl:s=0,include:o,exclude:a,hooks:n,debug:r=!1}=e,i=new Map,c=0,d=0;function u(...f){if(r)console.log("[KeepAlive]",...f)}function p(f){if(a){if(a instanceof RegExp&&a.test(f))return!1;if(Array.isArray(a)&&a.includes(f))return!1}if(o){if(o instanceof RegExp&&!o.test(f))return!1;if(Array.isArray(o)&&!o.includes(f))return!1}return!0}function h(f){if(!s||!f.expiresAt)return!1;return Date.now()>f.expiresAt}function m(f){let x=i.get(f);if(x)x.lastAccessedAt=Date.now(),x.accessCount++,x.instance.lastAccessedAt=x.lastAccessedAt,i.delete(f),i.set(f,x),u(`Touched: ${f} (access count: ${x.accessCount})`)}function C(){if(i.size===0)return!1;let f=i.keys().next().value;if(!f)return!1;let x=i.get(f);if(x){u(`Evicting LRU: ${f}`);let T=x.instance.hooks;if(T?.onDeactivate)T.onDeactivate(x.instance);if(n?.onDeactivate)n.onDeactivate(x.instance);return i.delete(f),!0}return!1}function k(f,x,T){if(!p(x.type))return u(`Type not cacheable: ${x.type}`),x;if(i.size>=t)C();let O=Date.now(),U={instance:{...x,hooks:T||x.hooks,createdAt:x.createdAt||O,lastAccessedAt:O},accessCount:0,createdAt:O,lastAccessedAt:O,expiresAt:s?O+s:void 0};if(i.set(f,U),u(`Cached: ${f} (size: ${i.size}/${t})`),T?.onMount)T.onMount(U.instance);if(n?.onMount)n.onMount(U.instance);return U.instance}function y(f){let x=i.get(f);if(!x)return d++,u(`Miss: ${f}`),null;if(h(x))return u(`Expired: ${f}`),i.delete(f),d++,null;return c++,m(f),u(`Hit: ${f}`),x.instance}function b(f){let x=i.get(f);if(!x)return!1;if(h(x))return i.delete(f),!1;return!0}function w(f){let x=i.get(f);if(!x)return!1;u(`Removing: ${f}`);let T=x.instance.hooks;if(T?.onUnmount)T.onUnmount(x.instance);if(n?.onUnmount)n.onUnmount(x.instance);return i.delete(f)}function S(){u("Clearing cache"),i.forEach((f)=>{let x=f.instance.hooks;if(x?.onUnmount)x.onUnmount(f.instance);if(n?.onUnmount)n.onUnmount(f.instance)}),i.clear(),c=0,d=0}function L(){let f=0,x=Date.now();for(let[T,O]of i.entries())if(h(O))u(`Pruning expired: ${T}`),w(T),f++;while(i.size>t)if(C())f++;else break;if(f>0)u(`Pruned ${f} entries`);return f}function R(f){let x=y(f);if(!x)return null;u(`Activating: ${f}`);let T=x.hooks;if(T?.onActivate)T.onActivate(x);if(n?.onActivate)n.onActivate(x);if(x.state&&T?.onRestore)T.onRestore(x,x.state);return x}function E(f){let x=i.get(f);if(!x)return!1;u(`Deactivating: ${f}`);let T=x.instance,O=T.hooks;if(O?.onSave)T.state=O.onSave(T);if(O?.onDeactivate)O.onDeactivate(T);if(n?.onDeactivate)n.onDeactivate(T);return!0}function H(){let f=c+d;return{hits:c,misses:d,size:i.size,max:t,hitRate:f>0?c/f:0,keys:Array.from(i.keys())}}function j(){return Array.from(i.keys())}function q(){return i.size}return{cache:k,get:y,has:b,remove:w,clear:S,prune:L,activate:R,deactivate:E,getStats:H,keys:j,size:q}}function Nf(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 a=t.keys().next().value;if(a)t.delete(a)}},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 Df(){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 Mf(e,t={}){let{maxSize:s=100,reset:o}=t,a=[];return{acquire(){if(a.length>0)return a.pop();return e()},release(n){if(a.length<s){if(o)o(n);a.push(n)}},clear(){a.length=0},get size(){return a.length},get maxSize(){return s}}}var K=new Map;async function ce(e,t){let s=t||e.toString();if(K.has(s))return K.get(s);let o=e();K.set(s,o);try{return await o}catch(a){throw K.delete(s),a}}function jf(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:a,onLoaded:n,onError:r}=t,i="idle",c,d,u=async(p=0)=>{try{if(i==="loading"||i==="loaded"){if(c)return c}i="loading",a?.();let h=await ce(e);return c=h,i="loaded",n?.(h),h}catch(h){let m=h;if(p<s)return await new Promise((C)=>setTimeout(C,o*(p+1))),u(p+1);throw i="error",d=m,r?.(m),m}};return{get state(){return i},get module(){return c},get error(){return d},load:()=>u(),preload:()=>u()}}function Nr(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:a="0px",threshold:n=0.01,placeholder:r,errorContent:i,onLoading:c,onLoaded:d,onError:u}=s,p=!1,h=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return h=new IntersectionObserver(async(C)=>{for(let k of C)if(k.isIntersecting&&!p){p=!0,h?.disconnect();try{c?.();let y=await ce(t);if(d?.(y),y&&typeof y.default?.render==="function"){let b=await y.default.render();e.innerHTML=b}}catch(y){let b=y;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:a,threshold:n}),h.observe(e),()=>{h?.disconnect(),h=null}}function Vf(e,t,s={}){let o=[],a=Array.from(e);for(let n of a){let r=typeof t==="function"&&t.length>0?()=>t(n):t,i=Nr(n,r,s);o.push(i)}return()=>{o.forEach((n)=>n())}}function Dr(e){return ce(e)}function Hf(e){return Promise.all(e.map((t)=>Dr(t)))}function Bf(e){if(e)K.delete(e);else K.clear()}function Ff(){return{size:K.size,keys:Array.from(K.keys())}}function qf(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ce(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Mr(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:a="50px",threshold:n=0.01,placeholder:r,onLoading:i,onLoaded:c,onError:d}=s;if(r&&typeof r==="string")e.src=r;let u=!1,p=null;return p=new IntersectionObserver((m)=>{for(let C of m)if(C.isIntersecting&&!u)u=!0,p?.disconnect(),i?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(k)=>{let y=Error(`Failed to load image: ${t}`);d?.(y),e.classList.add("error")},{once:!0})},{root:o,rootMargin:a,threshold:n}),p.observe(e),()=>{p?.disconnect(),p=null}}function Wf(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((a)=>{let n=a.getAttribute("data-lazy-src");if(n){let r=Mr(a,n,t);o.push(r)}}),()=>{o.forEach((a)=>a())}}var $e={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 qe(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=qe(e[o],t[o]);else s[o]=t[o];return s}function Z(e){return qe($e,e)}var de=$e;function _f(){return de}function zr(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:n.replace(/(<span class="[^"]*")[^>]*?\s+style="[^"]*"/g,(y,b)=>Be.test(/class="([^"]*)"/.exec(b)?.[1]??"")?b:y),css:C}}async function mf(e,t={}){let{theme:s="auto",language:o="typescript",lineNumbers:a=!1,wrapLines:n=!0}=t,r=s==="auto"?globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches?"github-dark":"github-light":s==="dark"?Fe:He,i;try{i=await Pr()}catch{return{html:ke(e),css:"",language:o,theme:r}}if(s==="auto"){let p=await Lr(i,e,o);if(p)return{html:p.html,css:p.css,language:o,theme:"auto"}}let c;try{c=await i.highlight(e,o,{theme:r})}catch{return{html:ke(e),css:"",language:o,theme:r}}let d=c,u=typeof d==="string"?{html:d,css:""}:{html:d?.html??ke(e),css:d?.css??""};return{html:u.html,css:u.css,language:o,theme:r}}function gf(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 bf(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 B=null,Rr=(e)=>e===1?0:1;function le(e,t){return t.split(".").reduce((s,o)=>s?.[o],e)}function Ce(e,t={}){return e.replace(/\{(\w+)\}/g,(s,o)=>t[o]!==void 0?String(t[o]):s)}function vf(e){let{locale:t,fallbackLocale:s="en",messages:o,pluralRules:a={},dateTimeFormats:n={},numberFormats:r={},missing:i,warnMissing:c=!0}=e;function d(b,w={}){let S=le(o[t],b);if(S===void 0&&s)S=le(o[s],b);if(S===void 0){if(i){let L=i(t,b);if(L)return Ce(L,w)}if(c&&typeof console<"u")console.warn(`[i18n] Missing translation for key "${b}" in locale "${t}"`);return b}if(typeof S==="string")return Ce(S,w);return String(S)}function u(b,w,S={}){let L=d(b,{...S,count:w});if(L.includes("|")){let R=L.split("|").map((q)=>q.trim()),H=(a[t]||Rr)(w,t),j=R[H]||R[R.length-1];return Ce(j,{...S,count:w})}return L}function p(b,w="default"){let S=typeof b==="number"?new Date(b):b,L=n[w]||n.default||{};return new Intl.DateTimeFormat(t,L).format(S)}function h(b,w="default"){let S=r[w]||r.default||{};return new Intl.NumberFormat(t,S).format(b)}function m(b){if(le(o[t],b)!==void 0)return!0;if(s)return le(o[s],b)!==void 0;return!1}function C(b){if(!o[b]){console.warn(`[i18n] Locale "${b}" not found. Available locales: ${Object.keys(o).join(", ")}`);return}t=b}function k(b,w){if(!o[b])o[b]={};o[b]={...o[b],...w}}function y(b){delete o[b]}return{get locale(){return t},get availableLocales(){return Object.keys(o)},setLocale:C,t:d,tc:u,d:p,n:h,te:m,addMessages:k,removeLocale:y}}function wf(e){B=e}function yf(){return B}function kf(e,t){if(!B)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return B.t(e,t)}function Cf(e,t,s){if(!B)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),e;return B.tc(e,t,s)}function $f(e,t){if(!B)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return B.d(e,t)}function Sf(e,t){if(!B)return console.warn("[i18n] No global i18n instance set. Call setI18n() first."),String(e);return B.n(e,t)}var Tf={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},If={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"}},Ef={decimal:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2},currency:{style:"currency",currency:"USD"},percent:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2},compact:{notation:"compact"}};function Pf(e){let t=["ar","he","fa","ur","yi"],s=e.split("-")[0].toLowerCase();return t.includes(s)}async function Af(e,t){try{return await t()}catch(s){return console.error(`[i18n] Failed to load messages for locale "${e}":`,s),{}}}var Of={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 Rf(e={}){let{max:t=10,ttl:s=0,include:o,exclude:a,hooks:n,debug:r=!1}=e,i=new Map,c=0,d=0;function u(...f){if(r)console.log("[KeepAlive]",...f)}function p(f){if(a){if(a instanceof RegExp&&a.test(f))return!1;if(Array.isArray(a)&&a.includes(f))return!1}if(o){if(o instanceof RegExp&&!o.test(f))return!1;if(Array.isArray(o)&&!o.includes(f))return!1}return!0}function h(f){if(!s||!f.expiresAt)return!1;return Date.now()>f.expiresAt}function m(f){let x=i.get(f);if(x)x.lastAccessedAt=Date.now(),x.accessCount++,x.instance.lastAccessedAt=x.lastAccessedAt,i.delete(f),i.set(f,x),u(`Touched: ${f} (access count: ${x.accessCount})`)}function C(){if(i.size===0)return!1;let f=i.keys().next().value;if(!f)return!1;let x=i.get(f);if(x){u(`Evicting LRU: ${f}`);let T=x.instance.hooks;if(T?.onDeactivate)T.onDeactivate(x.instance);if(n?.onDeactivate)n.onDeactivate(x.instance);return i.delete(f),!0}return!1}function k(f,x,T){if(!p(x.type))return u(`Type not cacheable: ${x.type}`),x;if(i.size>=t)C();let O=Date.now(),U={instance:{...x,hooks:T||x.hooks,createdAt:x.createdAt||O,lastAccessedAt:O},accessCount:0,createdAt:O,lastAccessedAt:O,expiresAt:s?O+s:void 0};if(i.set(f,U),u(`Cached: ${f} (size: ${i.size}/${t})`),T?.onMount)T.onMount(U.instance);if(n?.onMount)n.onMount(U.instance);return U.instance}function y(f){let x=i.get(f);if(!x)return d++,u(`Miss: ${f}`),null;if(h(x))return u(`Expired: ${f}`),i.delete(f),d++,null;return c++,m(f),u(`Hit: ${f}`),x.instance}function b(f){let x=i.get(f);if(!x)return!1;if(h(x))return i.delete(f),!1;return!0}function w(f){let x=i.get(f);if(!x)return!1;u(`Removing: ${f}`);let T=x.instance.hooks;if(T?.onUnmount)T.onUnmount(x.instance);if(n?.onUnmount)n.onUnmount(x.instance);return i.delete(f)}function S(){u("Clearing cache"),i.forEach((f)=>{let x=f.instance.hooks;if(x?.onUnmount)x.onUnmount(f.instance);if(n?.onUnmount)n.onUnmount(f.instance)}),i.clear(),c=0,d=0}function L(){let f=0,x=Date.now();for(let[T,O]of i.entries())if(h(O))u(`Pruning expired: ${T}`),w(T),f++;while(i.size>t)if(C())f++;else break;if(f>0)u(`Pruned ${f} entries`);return f}function R(f){let x=y(f);if(!x)return null;u(`Activating: ${f}`);let T=x.hooks;if(T?.onActivate)T.onActivate(x);if(n?.onActivate)n.onActivate(x);if(x.state&&T?.onRestore)T.onRestore(x,x.state);return x}function E(f){let x=i.get(f);if(!x)return!1;u(`Deactivating: ${f}`);let T=x.instance,O=T.hooks;if(O?.onSave)T.state=O.onSave(T);if(O?.onDeactivate)O.onDeactivate(T);if(n?.onDeactivate)n.onDeactivate(T);return!0}function H(){let f=c+d;return{hits:c,misses:d,size:i.size,max:t,hitRate:f>0?c/f:0,keys:Array.from(i.keys())}}function j(){return Array.from(i.keys())}function q(){return i.size}return{cache:k,get:y,has:b,remove:w,clear:S,prune:L,activate:R,deactivate:E,getStats:H,keys:j,size:q}}function Nf(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 a=t.keys().next().value;if(a)t.delete(a)}},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 Df(){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 Mf(e,t={}){let{maxSize:s=100,reset:o}=t,a=[];return{acquire(){if(a.length>0)return a.pop();return e()},release(n){if(a.length<s){if(o)o(n);a.push(n)}},clear(){a.length=0},get size(){return a.length},get maxSize(){return s}}}var K=new Map;async function ce(e,t){let s=t||e.toString();if(K.has(s))return K.get(s);let o=e();K.set(s,o);try{return await o}catch(a){throw K.delete(s),a}}function jf(e,t={}){let{retryAttempts:s=3,retryDelay:o=1000,onLoading:a,onLoaded:n,onError:r}=t,i="idle",c,d,u=async(p=0)=>{try{if(i==="loading"||i==="loaded"){if(c)return c}i="loading",a?.();let h=await ce(e);return c=h,i="loaded",n?.(h),h}catch(h){let m=h;if(p<s)return await new Promise((C)=>setTimeout(C,o*(p+1))),u(p+1);throw i="error",d=m,r?.(m),m}};return{get state(){return i},get module(){return c},get error(){return d},load:()=>u(),preload:()=>u()}}function Nr(e,t,s={}){if(!e)return console.warn("lazyLoad: element is null"),()=>{};let{root:o=null,rootMargin:a="0px",threshold:n=0.01,placeholder:r,errorContent:i,onLoading:c,onLoaded:d,onError:u}=s,p=!1,h=null;if(r)if(typeof r==="string")e.innerHTML=r;else e.innerHTML="",e.appendChild(r);return h=new IntersectionObserver(async(C)=>{for(let k of C)if(k.isIntersecting&&!p){p=!0,h?.disconnect();try{c?.();let y=await ce(t);if(d?.(y),y&&typeof y.default?.render==="function"){let b=await y.default.render();e.innerHTML=b}}catch(y){let b=y;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:a,threshold:n}),h.observe(e),()=>{h?.disconnect(),h=null}}function Vf(e,t,s={}){let o=[],a=Array.from(e);for(let n of a){let r=typeof t==="function"&&t.length>0?()=>t(n):t,i=Nr(n,r,s);o.push(i)}return()=>{o.forEach((n)=>n())}}function Dr(e){return ce(e)}function Hf(e){return Promise.all(e.map((t)=>Dr(t)))}function Ff(e){if(e)K.delete(e);else K.clear()}function Bf(){return{size:K.size,keys:Array.from(K.keys())}}function qf(e){return{async load(t){let s=e[t];if(!s)throw Error(`No route found for path: ${t}`);return ce(s,`route:${t}`)},async preload(t){return this.load(t)},async preloadRoutes(t){return Promise.all(t.map((s)=>this.preload(s)))}}}function Mr(e,t,s={}){if(!e)return()=>{};let{root:o=null,rootMargin:a="50px",threshold:n=0.01,placeholder:r,onLoading:i,onLoaded:c,onError:d}=s;if(r&&typeof r==="string")e.src=r;let u=!1,p=null;return p=new IntersectionObserver((m)=>{for(let C of m)if(C.isIntersecting&&!u)u=!0,p?.disconnect(),i?.(),e.src=t,e.addEventListener("load",()=>{c?.(e),e.classList.add("loaded")},{once:!0}),e.addEventListener("error",(k)=>{let y=Error(`Failed to load image: ${t}`);d?.(y),e.classList.add("error")},{once:!0})},{root:o,rootMargin:a,threshold:n}),p.observe(e),()=>{p?.disconnect(),p=null}}function Wf(e=document,t={}){let s=e.querySelectorAll("img[data-lazy-src]"),o=[];return s.forEach((a)=>{let n=a.getAttribute("data-lazy-src");if(n){let r=Mr(a,n,t);o.push(r)}}),()=>{o.forEach((a)=>a())}}var $e={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 qe(e,t){let s={...e};for(let o in t)if(t[o]instanceof Object&&o in e)s[o]=qe(e[o],t[o]);else s[o]=t[o];return s}function Z(e){return qe($e,e)}var de=$e;function _f(){return de}function zr(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 Uf(e,t){if(de=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,a])=>{if(a)s.style.setProperty(`--color-${o}`,a)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,a])=>{if(a)s.style.setProperty(`--font-${o}`,a)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,a])=>{if(a)s.style.setProperty(`--text-${o}`,a)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,a])=>{if(a)s.style.setProperty(`--font-weight-${o}`,a)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,a])=>{if(a)s.style.setProperty(`--leading-${o}`,a)});if(e.spacing)Object.entries(e.spacing).forEach(([o,a])=>{if(a)s.style.setProperty(`--spacing-${o}`,a)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,a])=>{if(a)s.style.setProperty(`--radius-${o}`,a)});if(e.shadows)Object.entries(e.shadows).forEach(([o,a])=>{if(a)s.style.setProperty(`--shadow-${o}`,a)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,a])=>{if(a)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,a])=>{if(a)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,a])=>{if(a)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)})}function Gf(){return de}function Jf(e){let t=e.split("."),s=de;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var Yf={default:$e,purple:Z({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Z({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Z({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Z({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Z({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 Xf(e){return zr(e)}var Vr="./ChatInbox-3cz5tt0d.stx";var Br="./ChatMessage-rj37tdgn.stx";var qr="./ConversationListItem-fjha2cgq.stx";var Kr="./MessageBubble-v5m96g43.stx";function om(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let o=!1,a=t.replace(/\{(\w+)\}/g,(n,r)=>{let i=s[r];if(i==null||i==="")return o=!0,"";return encodeURIComponent(String(i))});return o?"":a}import{derived as ee,effect as _r,sharedRequest as Ur,state as M}from"@stacksjs/stx";import{useBroadcastStream as Gr}from"@stacksjs/stx/composables/use-broadcast-stream";var Jr=1500;function im(e){let t=e.endpoint??"/messages",s=ee(e.scopeKey),o=M([]),a=M([]),n=M(null),r=M(""),i=M([]),c=M(!1),d=M(!1),u=M(!1),p=M(""),h=M(""),m=M(""),C=M(!1),k=M(!1),y=M(4000),b=M(!1),w=new Set,S=null,L=null,R="",E=0,H=new Map,j=null,q=!1,f=0;function x(){E++,o.set([]),a.set([]),n.set(null),r.set(""),i.set([]),h.set(""),p.set(""),c.set(!1),d.set(!1),u.set(!1),H=new Map,j=null,f=0,k.set(!1),S?.close(),S=null}function T(){let v=e.scopeKey();if(v!==R)x(),R=v;return Ye(),E}async function O(v,g){let I=await e.request(`${t}${v}`,{...g,cache:"no-store"}),P=await I.json().catch(()=>({}));if(!I.ok)throw Error(P.error||"Could not load messages. Try again.");return P}let U=ee(()=>{let v=m().toLowerCase().trim();return o().map((g)=>({...g,conversation:a().find((I)=>I.recipient_id===g.id)})).filter((g)=>(!v||`${g.name} ${g.role}`.toLowerCase().includes(v))&&(!C()||(g.conversation?.unread??0)>0)).sort((g,I)=>(I.conversation?.last_message?.id??0)-(g.conversation?.last_message?.id??0)||g.name.localeCompare(I.name))}),We=ee(()=>a().reduce((v,g)=>v+g.unread,0)),Se=ee(()=>!!r()&&!!h().trim()&&h().trim().length<=y()&&!u()&&!d()),Ke=ee(e.selfId);function Y(v){p.set(v instanceof Error?v.message:"Could not load messages. Try again.")}async function pe(v,g,I=!0){let P=await O(`/conversations/${g}`);if(v!==E||g!==r()||e.scopeKey()!==R)return;let V=P.messages[0]?.id;if(i.set([...i().filter((ge)=>V&&ge.id<V),...P.messages]),i().length===P.messages.length)k.set(P.has_more);let se=P.messages.at(-1);if(I&&se){if(await O(`/conversations/${g}/read`,{method:"POST",body:JSON.stringify({through_id:se.id})}),v===E&&g===r())a.update((ge)=>ge.map((be)=>be.id===g?{...be,unread:0}:be))}}let ue=Ur(),te=new Set;function _e(){if(!e.broadcastEndpoint||!e.selfId()||b())return Promise.resolve();return new Promise((v)=>{let g=()=>{clearTimeout(I),te.delete(g),v()},I=setTimeout(g,Jr);te.add(g)})}function Te(){if(!te.size)return!1;for(let v of[...te])v();return!0}function Ie(){return T(),ue.run(E,()=>_e().then(Ee)).finally(G)}async function Ue(){T(),await ue.fresh(E,()=>Ee()).finally(G)}async function Ee(){let v=T();c.set(!0),p.set("");try{let g=await O("");if(v!==E||e.scopeKey()!==R)return;o.set(g.contacts),a.set(g.conversations),y.set(g.max_length),c.set(!1);let I=n()?g.contacts.find((V)=>V.id===n().id):null;if(n()&&!I){let V=n().id;Pe(),H.delete(V),h.set(""),j=null}else if(I)n.set(I);let P=e.initialRecipient?.()??0;if(P>0&&P!==f){let V=g.contacts.find((se)=>se.id===P);if(V)f=P,await he(V)}}catch(g){if(v===E)Y(g)}finally{if(v===E)c.set(!1)}}async function he(v){if(T(),n())H.set(n().id,h());let g=++E;u.set(!1),n.set(v),h.set(H.get(v.id)??""),r.set(""),i.set([]),k.set(!1),p.set(""),d.set(!0);try{let I=await O("/conversations",{method:"POST",body:JSON.stringify({recipient_id:v.id})});if(g!==E||e.scopeKey()!==R)return;r.set(I.id),await pe(g,I.id)}catch(I){if(g===E)Y(I)}finally{if(g===E)d.set(!1);G()}}function Pe(){if(n())H.set(n().id,h());E++,u.set(!1),d.set(!1),n.set(null),r.set(""),i.set([]),p.set("")}async function Ge(){if(T(),!Se())return;let v=r(),g=h().trim(),I=E,P=j?.body===g&&j.thread===v?j.key:crypto.randomUUID();j={body:g,key:P,thread:v},u.set(!0),p.set("");try{if(await O(`/conversations/${v}/messages`,{method:"POST",body:JSON.stringify({body:g,client_key:P})}),I!==E||e.scopeKey()!==R)return;if(h().trim()===g)h.set("");H.delete(n().id),j=null,await pe(I,v),await Ue()}catch(V){if(I===E)Y(V)}finally{if(I===E)u.set(!1);G()}}async function Je(){let v=r(),g=i()[0]?.id,I=E;if(!v||!g||d())return;d.set(!0);try{let P=await O(`/conversations/${v}?before=${g}`);if(I===E&&v===r())i.set([...P.messages,...i()]),k.set(P.has_more)}catch(P){if(I===E)Y(P)}finally{if(I===E)d.set(!1);G()}}async function Ae(v=!1){if(q||u()||d())return;q=!0;try{if(await Ie(),v&&n()&&!r())await he(n());else if(v&&r())await pe(E,r())}catch(g){Y(g)}finally{q=!1,G()}}let fe=!1;async function me(){if(q||ue.busy||u()||d()){fe=!0;return}await Ae([...w].some((v)=>v()))}function Ye(){if(S||!w.size||!e.selfId()||!e.broadcastEndpoint)return;let v=R;S=Gr({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(g)=>{if(b.set(g),!g)Te()},onConnected:()=>{if(!Te()&&v===e.scopeKey())me()},onMessage:(g)=>{if(v===e.scopeKey()&&g.event.startsWith("messaging."))me()}})}function Xe(v=()=>!1){if(w.add(v),T(),!L)L=_r(()=>{T()});return()=>{if(w.delete(v),!w.size)S?.close(),S=null,L?.(),L=null}}function G(){if(fe)fe=!1,me()}return{contacts:o,conversations:a,selected:n,threadId:r,messages:i,loading:c,threadLoading:d,sending:u,error:p,draft:h,search:m,unreadOnly:C,hasMore:k,maxLength:y,rows:U,unread:We,canSend:Se,selfId:Ke,scopeKey:s,load:Ie,open:he,back:Pe,send:Ge,older:Je,refresh:Ae,reset:x,observe:Xe,connected:b}}var Xr="./ChatUnreadBadge-3vq0t8d2.stx";var Zr="./ChatLauncher-3zph4trh.stx";export{it as Accordion,ct as AccordionItem,pt as AddressField,zn as AiTextarea,cf as AnimationClasses,It as Audio,Dt as Avatar,zt as Badge,Vt as Breadcrumb,Q as Breakpoints,Wt as Button,Ut as Calendar,os as Card,Vr as ChatInbox,Zr as ChatLauncher,Br as ChatMessage,Xr as ChatUnreadBadge,ns as Checkbox,Yo as Checkout,is as ChoiceChips,Qe as CodeBlock,cs as Combobox,ps as ComboboxButton,hs as ComboboxInput,ms as ComboboxOption,bs as ComboboxOptions,ht as CommandBar,vs as CommandPalette,ys as CommandPaletteItem,z as ComponentError,mt as ContentCard,qr as ConversationListItem,Jt as DateRangePicker,Qo as DefaultPaymentMethod,Cs as Dialog,Ss as DialogBackdrop,Is as DialogDescription,Ps as DialogPanel,Os as DialogTitle,Rs as Drawer,Ds as Dropdown,zs as DropdownButton,Vs as DropdownItem,Bs as DropdownItems,of as Easing,Qs as EmailInput,Xt as EmptyState,Zt as ErrorState,J as ErrorTypes,To as FilterChip,Eo as FilterChips,bt as FloatingPanel,Ze as Footer,qs as Form,_s as GroupedList,Gs as GroupedListRow,et as Hero,Ys as Image,tt as Installation,Kh as KeyboardKeys,bi as KeyboardShortcuts,Ir as KeyframeAnimations,fo as List,Ao as ListRow,go as Listbox,xo as ListboxButton,wo as ListboxLabel,ko as ListboxOption,$o as ListboxOptions,Pt as Login,Kr as MessageBubble,Lo as NavBar,Ho as Navigator,Fo as Notification,eo as NumberInput,Wo as Pager,_o as PagerDots,Go as Pagination,so as PasswordInput,ea as PaymentMethods,aa as Popover,ra as PopoverButton,la as PopoverPanel,da as Portal,ua as Progress,l as PropTypes,fa as Radio,ga as RadioGroup,xa as RadioGroupDescription,wa as RadioGroupLabel,ka as RadioGroupOption,Li as SHADE_VAR_PREFIX,ao as SearchInput,No as SectionCard,$a as SegmentedControl,Ta as Select,Ea as Sidebar,vt as SidebarDivider,Aa as SidebarFooter,La as SidebarHeader,Na as SidebarItem,Ma as SidebarPinned,yt as SidebarRow,ja as SidebarSection,Ha as SidebarSpace,Wa as SidebarSpaceSwitcher,Fa as SidebarSpaces,Ot as Signup,sn as Skeleton,Ct as SpaceSwitcher,an as Spinner,rn as Stepper,cn as StepperStep,ie as StorageManager,sa as SubscriptionCheckout,pn as Switch,Oe as THEMED_FAMILIES,Sn as Tab,Mo as TabBar,jo as TabBarItem,In as TabList,Pn as TabPanel,hn as Table,mn as TableBody,bn as TableCell,vn as TableHead,yn as TableHeader,Cn as TableRow,On as Tabs,Rn as Teleport,ro as TextInput,Dn as Textarea,ts as ThemeToggle,St as TileGrid,Vn as Tooltip,Bn as Transition,Rt as TwoFactorChallenge,qn as Video,Kn as VirtualList,Un as VirtualTable,hf as animate,df as animateWithClass,Fh as announceToScreenReader,je as applyAnimation,bf as applyHeadwindClasses,Uf as applyTheme,Jh as aria,Ht as assert,Pl as assertProp,Kt as buttonPropSchema,$l as clearErrorHandler,Bf as clearModuleCache,Ei as closeOverlay,Of as componentMessages,om as contactLink,ni as copyToClipboard,Bh as createAriaDescription,Hh as createAriaLabel,im as createChat,Mf as createComponentPool,Tl as createDebugger,qh as createFocusTrap,vf as createI18n,Rf as createKeepAlive,Tr as createKeyframeAnimation,pf as createKeyframes,Nf as createLRUCache,B as createPropValidator,qf as createRouteLoader,Wh as createRovingTabindex,Ml as createSafeClickHandler,Yh as createScreenReaderText,ef as createSkipLink,Df as createStateManager,Wu as createStorage,Z as createTheme,$r as cssAnimation,$f as d,If as dateTimeFormats,$e as defaultTheme,Ne as deriveSpaceTint,gf as detectLanguage,Sl as devAssert,wr as easeInBack,ze as easeInBounce,fr as easeInCirc,Zn as easeInCubic,br as easeInElastic,pr as easeInExpo,kr as easeInOutBack,Cr as easeInOutBounce,gr as easeInOutCirc,tr as easeInOutCubic,vr as easeInOutElastic,hr as easeInOutExpo,Qn as easeInOutQuad,ar as easeInOutQuart,ir as easeInOutQuint,dr as easeInOutSine,Yn as easeInQuad,sr as easeInQuart,nr as easeInQuint,lr as easeInSine,yr as easeOutBack,we as easeOutBounce,mr as easeOutCirc,er as easeOutCubic,xr as easeOutElastic,ur as easeOutExpo,Xn as easeOutQuad,or as easeOutQuart,rr as easeOutQuint,cr as easeOutSine,Il as errorBoundary,Ws as formPropSchema,Me as generateId,di as generateSEOTags,Xf as generateThemeCSS,Ff as getCacheStats,Zh as getColorSchemePreference,xe as getEffectiveTheme,ve as getFocusableElements,Pr as getHighlighter,yf as getI18n,st as getSystemTheme,_f as getTheme,Jf as getThemeValue,ne as handleError,_h as hasFocus,mf as highlight,Pf as isRTL,Pi as isTopOverlay,Gh as isVisibleToScreenReader,Nr as lazyLoad,Vf as lazyLoadAll,jf as lazyLoadComponent,Mr as lazyLoadImage,Wf as lazyLoadImages,ce as lazyLoadModule,Jn as linear,Af as loadLocaleMessages,re as macosColors,Uh as moveFocus,Sf as n,en as normalizeSpace,mu as normalizeSpaces,Ef as numberFormats,co as numberInputPropSchema,Ii as openOverlay,Ai as openOverlays,Tf as pluralRules,Qh as prefersHighContrast,Xh as prefersReducedMotion,Dr as preloadModule,Hf as preloadModules,nf as removeAnimation,pu as resolveIconColor,du as resolveSidebarTheme,Qa as resolveSpaceTint,lf as sequenceAnimations,Cl as setErrorHandler,wf as setI18n,at as setLink,N as setMeta,ot as setTitle,Re as sidebarThemes,gu as spaceIndexOf,bu as spaceTintPayload,Za as spaceTintVars,fu as spaceWashGradient,rf as staggerAnimation,qu as storage,Ri as stxThemePreset,kf as t,Cf as tc,lo as textInputPropSchema,Yf as themePresets,zr as themeToCSSProperties,Ni as themeVariableNames,yi as useBreakpoint,ui as useClickOutside,ai as useCopyCode,ii as useDarkMode,fi as useFocusTrap,$i as useIsDarkMode,Ci as useIsDesktop,ki as useIsMobile,gi as useKeyboard,vi as useLocalStorage,X as useMediaQuery,Si as usePrefersReducedMotion,ci as useSEO,Gf as useTheme,tf as validateAriaRelationships,Dl as validateButtonProps,gd as validateEmailInputProps,Qc as validateFormProps,xd as validateNumberInputProps,bd as validatePasswordInputProps,Ft as validateProps,vd as validateSearchInputProps,jl as validateSize,md as validateTextInputProps,zl as validateVariant,Sr as waitForAnimation,Bt as warn,Al as warnProp,Le as wrapErrorHandler};
|
|
25
|
+
}`}function Uf(e,t){if(de=e,typeof document>"u")return;let s=t||document.documentElement;if(e.colors)Object.entries(e.colors).forEach(([o,a])=>{if(a)s.style.setProperty(`--color-${o}`,a)});if(e.typography?.fontFamily)Object.entries(e.typography.fontFamily).forEach(([o,a])=>{if(a)s.style.setProperty(`--font-${o}`,a)});if(e.typography?.fontSize)Object.entries(e.typography.fontSize).forEach(([o,a])=>{if(a)s.style.setProperty(`--text-${o}`,a)});if(e.typography?.fontWeight)Object.entries(e.typography.fontWeight).forEach(([o,a])=>{if(a)s.style.setProperty(`--font-weight-${o}`,a)});if(e.typography?.lineHeight)Object.entries(e.typography.lineHeight).forEach(([o,a])=>{if(a)s.style.setProperty(`--leading-${o}`,a)});if(e.spacing)Object.entries(e.spacing).forEach(([o,a])=>{if(a)s.style.setProperty(`--spacing-${o}`,a)});if(e.borderRadius)Object.entries(e.borderRadius).forEach(([o,a])=>{if(a)s.style.setProperty(`--radius-${o}`,a)});if(e.shadows)Object.entries(e.shadows).forEach(([o,a])=>{if(a)s.style.setProperty(`--shadow-${o}`,a)});if(e.components?.button)Object.entries(e.components.button).forEach(([o,a])=>{if(a)s.style.setProperty(`--button-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)});if(e.components?.input)Object.entries(e.components.input).forEach(([o,a])=>{if(a)s.style.setProperty(`--input-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)});if(e.components?.card)Object.entries(e.components.card).forEach(([o,a])=>{if(a)s.style.setProperty(`--card-${o.replace(/([A-Z])/g,"-$1").toLowerCase()}`,a)})}function Gf(){return de}function Jf(e){let t=e.split("."),s=de;for(let o of t)if(s&&typeof s==="object"&&o in s)s=s[o];else return;return s}var Yf={default:$e,purple:Z({colors:{primary:"#8b5cf6",secondary:"#a78bfa"}}),green:Z({colors:{primary:"#10b981",secondary:"#34d399"}}),orange:Z({colors:{primary:"#f97316",secondary:"#fb923c"}}),dark:Z({colors:{primary:"#60a5fa",secondary:"#a78bfa",gray:"#9ca3af",white:"#1f2937",black:"#f9fafb"}}),minimal:Z({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 Xf(e){return zr(e)}var Vr="./ChatInbox-3cz5tt0d.stx";var Fr="./ChatMessage-rj37tdgn.stx";var qr="./ConversationListItem-fjha2cgq.stx";var Kr="./MessageBubble-v5m96g43.stx";function om(e,t=""){if(!e)return"";let s=e;if(typeof s.href==="string"&&s.href)return s.href;if(!t)return"";let o=!1,a=t.replace(/\{(\w+)\}/g,(n,r)=>{let i=s[r];if(i==null||i==="")return o=!0,"";return encodeURIComponent(String(i))});return o?"":a}import{derived as ee,effect as _r,sharedRequest as Ur,state as M}from"@stacksjs/stx";import{useBroadcastStream as Gr}from"@stacksjs/stx/composables/use-broadcast-stream";var Jr=1500;function im(e){let t=e.endpoint??"/messages",s=ee(e.scopeKey),o=M([]),a=M([]),n=M(null),r=M(""),i=M([]),c=M(!1),d=M(!1),u=M(!1),p=M(""),h=M(""),m=M(""),C=M(!1),k=M(!1),y=M(4000),b=M(!1),w=new Set,S=null,L=null,R="",E=0,H=new Map,j=null,q=!1,f=0;function x(){E++,o.set([]),a.set([]),n.set(null),r.set(""),i.set([]),h.set(""),p.set(""),c.set(!1),d.set(!1),u.set(!1),H=new Map,j=null,f=0,k.set(!1),S?.close(),S=null}function T(){let v=e.scopeKey();if(v!==R)x(),R=v;return Ye(),E}async function O(v,g){let I=await e.request(`${t}${v}`,{...g,cache:"no-store"}),P=await I.json().catch(()=>({}));if(!I.ok)throw Error(P.error||"Could not load messages. Try again.");return P}let U=ee(()=>{let v=m().toLowerCase().trim();return o().map((g)=>({...g,conversation:a().find((I)=>I.recipient_id===g.id)})).filter((g)=>(!v||`${g.name} ${g.role}`.toLowerCase().includes(v))&&(!C()||(g.conversation?.unread??0)>0)).sort((g,I)=>(I.conversation?.last_message?.id??0)-(g.conversation?.last_message?.id??0)||g.name.localeCompare(I.name))}),We=ee(()=>a().reduce((v,g)=>v+g.unread,0)),Se=ee(()=>!!r()&&!!h().trim()&&h().trim().length<=y()&&!u()&&!d()),Ke=ee(e.selfId);function Y(v){p.set(v instanceof Error?v.message:"Could not load messages. Try again.")}async function pe(v,g,I=!0){let P=await O(`/conversations/${g}`);if(v!==E||g!==r()||e.scopeKey()!==R)return;let V=P.messages[0]?.id;if(i.set([...i().filter((ge)=>V&&ge.id<V),...P.messages]),i().length===P.messages.length)k.set(P.has_more);let se=P.messages.at(-1);if(I&&se){if(await O(`/conversations/${g}/read`,{method:"POST",body:JSON.stringify({through_id:se.id})}),v===E&&g===r())a.update((ge)=>ge.map((be)=>be.id===g?{...be,unread:0}:be))}}let ue=Ur(),te=new Set;function _e(){if(!e.broadcastEndpoint||!e.selfId()||b())return Promise.resolve();return new Promise((v)=>{let g=()=>{clearTimeout(I),te.delete(g),v()},I=setTimeout(g,Jr);te.add(g)})}function Te(){if(!te.size)return!1;for(let v of[...te])v();return!0}function Ie(){return T(),ue.run(E,()=>_e().then(Ee)).finally(G)}async function Ue(){T(),await ue.fresh(E,()=>Ee()).finally(G)}async function Ee(){let v=T();c.set(!0),p.set("");try{let g=await O("");if(v!==E||e.scopeKey()!==R)return;o.set(g.contacts),a.set(g.conversations),y.set(g.max_length),c.set(!1);let I=n()?g.contacts.find((V)=>V.id===n().id):null;if(n()&&!I){let V=n().id;Pe(),H.delete(V),h.set(""),j=null}else if(I)n.set(I);let P=e.initialRecipient?.()??0;if(P>0&&P!==f){let V=g.contacts.find((se)=>se.id===P);if(V)f=P,await he(V)}}catch(g){if(v===E)Y(g)}finally{if(v===E)c.set(!1)}}async function he(v){if(T(),n())H.set(n().id,h());let g=++E;u.set(!1),n.set(v),h.set(H.get(v.id)??""),r.set(""),i.set([]),k.set(!1),p.set(""),d.set(!0);try{let I=await O("/conversations",{method:"POST",body:JSON.stringify({recipient_id:v.id})});if(g!==E||e.scopeKey()!==R)return;r.set(I.id),await pe(g,I.id)}catch(I){if(g===E)Y(I)}finally{if(g===E)d.set(!1);G()}}function Pe(){if(n())H.set(n().id,h());E++,u.set(!1),d.set(!1),n.set(null),r.set(""),i.set([]),p.set("")}async function Ge(){if(T(),!Se())return;let v=r(),g=h().trim(),I=E,P=j?.body===g&&j.thread===v?j.key:crypto.randomUUID();j={body:g,key:P,thread:v},u.set(!0),p.set("");try{if(await O(`/conversations/${v}/messages`,{method:"POST",body:JSON.stringify({body:g,client_key:P})}),I!==E||e.scopeKey()!==R)return;if(h().trim()===g)h.set("");H.delete(n().id),j=null,await pe(I,v),await Ue()}catch(V){if(I===E)Y(V)}finally{if(I===E)u.set(!1);G()}}async function Je(){let v=r(),g=i()[0]?.id,I=E;if(!v||!g||d())return;d.set(!0);try{let P=await O(`/conversations/${v}?before=${g}`);if(I===E&&v===r())i.set([...P.messages,...i()]),k.set(P.has_more)}catch(P){if(I===E)Y(P)}finally{if(I===E)d.set(!1);G()}}async function Ae(v=!1){if(q||u()||d())return;q=!0;try{if(await Ie(),v&&n()&&!r())await he(n());else if(v&&r())await pe(E,r())}catch(g){Y(g)}finally{q=!1,G()}}let fe=!1;async function me(){if(q||ue.busy||u()||d()){fe=!0;return}await Ae([...w].some((v)=>v()))}function Ye(){if(S||!w.size||!e.selfId()||!e.broadcastEndpoint)return;let v=R;S=Gr({endpoint:e.broadcastEndpoint,request:e.request,onStatus:(g)=>{if(b.set(g),!g)Te()},onConnected:()=>{if(!Te()&&v===e.scopeKey())me()},onMessage:(g)=>{if(v===e.scopeKey()&&g.event.startsWith("messaging."))me()}})}function Xe(v=()=>!1){if(w.add(v),T(),!L)L=_r(()=>{T()});return()=>{if(w.delete(v),!w.size)S?.close(),S=null,L?.(),L=null}}function G(){if(fe)fe=!1,me()}return{contacts:o,conversations:a,selected:n,threadId:r,messages:i,loading:c,threadLoading:d,sending:u,error:p,draft:h,search:m,unreadOnly:C,hasMore:k,maxLength:y,rows:U,unread:We,canSend:Se,selfId:Ke,scopeKey:s,load:Ie,open:he,back:Pe,send:Ge,older:Je,refresh:Ae,reset:x,observe:Xe,connected:b}}var Xr="./ChatUnreadBadge-3vq0t8d2.stx";var Zr="./ChatLauncher-3zph4trh.stx";export{it as Accordion,ct as AccordionItem,pt as AddressField,zn as AiTextarea,cf as AnimationClasses,It as Audio,Dt as Avatar,zt as Badge,Vt as Breadcrumb,Q as Breakpoints,Wt as Button,Ut as Calendar,os as Card,Vr as ChatInbox,Zr as ChatLauncher,Fr as ChatMessage,Xr as ChatUnreadBadge,ns as Checkbox,Yo as Checkout,is as ChoiceChips,Qe as CodeBlock,cs as Combobox,ps as ComboboxButton,hs as ComboboxInput,ms as ComboboxOption,bs as ComboboxOptions,ht as CommandBar,vs as CommandPalette,ys as CommandPaletteItem,z as ComponentError,mt as ContentCard,qr as ConversationListItem,Jt as DateRangePicker,Qo as DefaultPaymentMethod,Cs as Dialog,Ss as DialogBackdrop,Is as DialogDescription,Ps as DialogPanel,Os as DialogTitle,Rs as Drawer,Ds as Dropdown,zs as DropdownButton,Vs as DropdownItem,Fs as DropdownItems,of as Easing,Qs as EmailInput,Xt as EmptyState,Zt as ErrorState,J as ErrorTypes,To as FilterChip,Eo as FilterChips,bt as FloatingPanel,Ze as Footer,qs as Form,_s as GroupedList,Gs as GroupedListRow,et as Hero,Ys as Image,tt as Installation,Kh as KeyboardKeys,bi as KeyboardShortcuts,Ir as KeyframeAnimations,fo as List,Ao as ListRow,go as Listbox,xo as ListboxButton,wo as ListboxLabel,ko as ListboxOption,$o as ListboxOptions,Pt as Login,Kr as MessageBubble,Lo as NavBar,Ho as Navigator,Bo as Notification,eo as NumberInput,Wo as Pager,_o as PagerDots,Go as Pagination,so as PasswordInput,ea as PaymentMethods,aa as Popover,ra as PopoverButton,la as PopoverPanel,da as Portal,ua as Progress,l as PropTypes,fa as Radio,ga as RadioGroup,xa as RadioGroupDescription,wa as RadioGroupLabel,ka as RadioGroupOption,Li as SHADE_VAR_PREFIX,ao as SearchInput,No as SectionCard,$a as SegmentedControl,Ta as Select,Ea as Sidebar,vt as SidebarDivider,Aa as SidebarFooter,La as SidebarHeader,Na as SidebarItem,Ma as SidebarPinned,yt as SidebarRow,ja as SidebarSection,Ha as SidebarSpace,Wa as SidebarSpaceSwitcher,Ba as SidebarSpaces,Ot as Signup,sn as Skeleton,Ct as SpaceSwitcher,an as Spinner,rn as Stepper,cn as StepperStep,ie as StorageManager,sa as SubscriptionCheckout,pn as Switch,Oe as THEMED_FAMILIES,Sn as Tab,Mo as TabBar,jo as TabBarItem,In as TabList,Pn as TabPanel,hn as Table,mn as TableBody,bn as TableCell,vn as TableHead,yn as TableHeader,Cn as TableRow,On as Tabs,Rn as Teleport,ro as TextInput,Dn as Textarea,ts as ThemeToggle,St as TileGrid,Vn as Tooltip,Fn as Transition,Rt as TwoFactorChallenge,qn as Video,Kn as VirtualList,Un as VirtualTable,hf as animate,df as animateWithClass,Bh as announceToScreenReader,je as applyAnimation,bf as applyHeadwindClasses,Uf as applyTheme,Jh as aria,Ht as assert,Pl as assertProp,Kt as buttonPropSchema,$l as clearErrorHandler,Ff as clearModuleCache,Ei as closeOverlay,Of as componentMessages,om as contactLink,ni as copyToClipboard,Fh as createAriaDescription,Hh as createAriaLabel,im as createChat,Mf as createComponentPool,Tl as createDebugger,qh as createFocusTrap,vf as createI18n,Rf as createKeepAlive,Tr as createKeyframeAnimation,pf as createKeyframes,Nf as createLRUCache,F as createPropValidator,qf as createRouteLoader,Wh as createRovingTabindex,Ml as createSafeClickHandler,Yh as createScreenReaderText,ef as createSkipLink,Df as createStateManager,Wu as createStorage,Z as createTheme,$r as cssAnimation,$f as d,If as dateTimeFormats,$e as defaultTheme,Ne as deriveSpaceTint,gf as detectLanguage,Sl as devAssert,wr as easeInBack,ze as easeInBounce,fr as easeInCirc,Zn as easeInCubic,br as easeInElastic,pr as easeInExpo,kr as easeInOutBack,Cr as easeInOutBounce,gr as easeInOutCirc,tr as easeInOutCubic,vr as easeInOutElastic,hr as easeInOutExpo,Qn as easeInOutQuad,ar as easeInOutQuart,ir as easeInOutQuint,dr as easeInOutSine,Yn as easeInQuad,sr as easeInQuart,nr as easeInQuint,lr as easeInSine,yr as easeOutBack,we as easeOutBounce,mr as easeOutCirc,er as easeOutCubic,xr as easeOutElastic,ur as easeOutExpo,Xn as easeOutQuad,or as easeOutQuart,rr as easeOutQuint,cr as easeOutSine,Il as errorBoundary,Ws as formPropSchema,Me as generateId,di as generateSEOTags,Xf as generateThemeCSS,Bf as getCacheStats,Zh as getColorSchemePreference,xe as getEffectiveTheme,ve as getFocusableElements,Pr as getHighlighter,yf as getI18n,st as getSystemTheme,_f as getTheme,Jf as getThemeValue,ne as handleError,_h as hasFocus,mf as highlight,Pf as isRTL,Pi as isTopOverlay,Gh as isVisibleToScreenReader,Nr as lazyLoad,Vf as lazyLoadAll,jf as lazyLoadComponent,Mr as lazyLoadImage,Wf as lazyLoadImages,ce as lazyLoadModule,Jn as linear,Af as loadLocaleMessages,re as macosColors,Uh as moveFocus,Sf as n,en as normalizeSpace,mu as normalizeSpaces,Ef as numberFormats,co as numberInputPropSchema,Ii as openOverlay,Ai as openOverlays,Tf as pluralRules,Qh as prefersHighContrast,Xh as prefersReducedMotion,Dr as preloadModule,Hf as preloadModules,nf as removeAnimation,pu as resolveIconColor,du as resolveSidebarTheme,Qa as resolveSpaceTint,lf as sequenceAnimations,Cl as setErrorHandler,wf as setI18n,at as setLink,N as setMeta,ot as setTitle,Re as sidebarThemes,gu as spaceIndexOf,bu as spaceTintPayload,Za as spaceTintVars,fu as spaceWashGradient,rf as staggerAnimation,qu as storage,Ri as stxThemePreset,kf as t,Cf as tc,lo as textInputPropSchema,Yf as themePresets,zr as themeToCSSProperties,Ni as themeVariableNames,yi as useBreakpoint,ui as useClickOutside,ai as useCopyCode,ii as useDarkMode,fi as useFocusTrap,$i as useIsDarkMode,Ci as useIsDesktop,ki as useIsMobile,gi as useKeyboard,vi as useLocalStorage,X as useMediaQuery,Si as usePrefersReducedMotion,ci as useSEO,Gf as useTheme,tf as validateAriaRelationships,Dl as validateButtonProps,gd as validateEmailInputProps,Qc as validateFormProps,xd as validateNumberInputProps,bd as validatePasswordInputProps,Bt as validateProps,vd as validateSearchInputProps,jl as validateSize,md as validateTextInputProps,zl as validateVariant,Sr as waitForAnimation,Ft as warn,Al as warnProp,Le as wrapErrorHandler};
|
|
@@ -20,6 +20,21 @@ export declare const fullWidth: ReturnType<typeof $bool>;
|
|
|
20
20
|
* one, the button renders it in a span that tracks the parent's binding; given
|
|
21
21
|
* none, the slot behaves exactly as before. See stacksjs/stx#1997.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* Desktop and native callers name a button's words `title` and its glyph
|
|
25
|
+
* `symbol`, with `iconOnly` meaning "draw the glyph alone". Accepting them is
|
|
26
|
+
* what lets such a call select this component rather than the native
|
|
27
|
+
* primitive (stacksjs/stx#2091).
|
|
28
|
+
*
|
|
29
|
+
* `title` supplies the words ONLY when nothing else does. It is also the web's
|
|
30
|
+
* tooltip attribute, so a caller writing both a tooltip and content keeps
|
|
31
|
+
* both: folding it into the label unconditionally would replace the slot with
|
|
32
|
+
* the tooltip text.
|
|
33
|
+
*/
|
|
34
|
+
export declare const symbol: unknown;
|
|
35
|
+
export declare const iconOnly: ReturnType<typeof $bool>;
|
|
36
|
+
declare const slotWords: unknown;
|
|
37
|
+
declare const titleWords: unknown;
|
|
23
38
|
export declare const label: unknown;
|
|
24
39
|
export declare const hasLabel: boolean;
|
|
25
40
|
/*
|
|
@@ -155,5 +170,5 @@ export declare const nativeButtonClasses: unknown;
|
|
|
155
170
|
export declare const nativeTextClasses: string;
|
|
156
171
|
export declare const legacyNativeTint: boolean;
|
|
157
172
|
export declare const nativeTintClass: unknown;
|
|
158
|
-
declare type __DtsxStxComponentType = DefineComponent<{ variant?: string, size?: string, disabled?: unknown, loading?: unknown, type?: string, fullWidth?: unknown, label?: string, ariaLabel?: unknown, "aria-label"?: string, leftIcon?: string, rightIcon?: string, className?: string }>;
|
|
173
|
+
declare type __DtsxStxComponentType = DefineComponent<{ variant?: string, size?: string, disabled?: unknown, loading?: unknown, type?: string, fullWidth?: unknown, symbol?: string, iconOnly?: unknown, label?: unknown, title?: string, ariaLabel?: unknown, "aria-label"?: string, leftIcon?: string, rightIcon?: string, className?: string }>;
|
|
159
174
|
export default __dtsx_component__;
|
package/dist/ui/video/Video.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { DefineComponent } from '@stacksjs/stx';
|
|
2
|
-
/** Width over height as CSS takes it: "16/9", "4/3", 0.5625. */
|
|
3
|
-
declare function ratio(value: unknown): string | unknown | unknown | string;
|
|
4
|
-
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
5
2
|
/*
|
|
6
3
|
* A video player: ts-video-player's <video-player>, with its own controls,
|
|
7
4
|
* for a file, an HLS or DASH stream, a YouTube link (played from
|
|
@@ -23,12 +20,48 @@ declare const __dtsx_component__: __DtsxStxComponentType;
|
|
|
23
20
|
* The controls speak the page's language (`<html lang>`): ts-video-player
|
|
24
21
|
* names its buttons and announces playback in it.
|
|
25
22
|
*
|
|
26
|
-
* On native, src calls using the shared media events select this
|
|
27
|
-
* when installed. Legacy
|
|
28
|
-
* retain the native primitive
|
|
23
|
+
* On native, src and source calls using the shared media events select this
|
|
24
|
+
* component when installed. Legacy-event calls (for example @progress rather
|
|
25
|
+
* than @timeupdate) retain the native primitive, because the two names mean
|
|
26
|
+
* different things on the web and collapse to one on a host. This is the
|
|
27
|
+
* host's Video control: `src`
|
|
29
28
|
* must be a media URL the platform supports, not a YouTube/Vimeo page.
|
|
30
29
|
* Browser source selection, tracks and DRM configuration remain web-only.
|
|
31
30
|
*/
|
|
31
|
+
/**
|
|
32
|
+
* `source` is the native primitive's name for the same media URL, and both
|
|
33
|
+
* hosts accept either a string or a `{ uri }` payload. Accepting it here is
|
|
34
|
+
* what lets a legacy native call select this component instead of the
|
|
35
|
+
* primitive (stacksjs/stx#2091); `src` wins a mixed call, being this
|
|
36
|
+
* component's own API.
|
|
37
|
+
*/
|
|
38
|
+
declare function mediaUrl(value: unknown): unknown;
|
|
39
|
+
/** Width over height as CSS takes it: "16/9", "4/3", 0.5625. */
|
|
40
|
+
declare function ratio(value: unknown): string | unknown | unknown | string;
|
|
41
|
+
declare const __dtsx_component__: __DtsxStxComponentType;
|
|
42
|
+
/**
|
|
43
|
+
* How the frame fills its box. `resizeMode` is the native name and the host
|
|
44
|
+
* interprets it; `object-fit` is the web's, and the four native values map
|
|
45
|
+
* onto it, so one call works on both (stacksjs/stx#2091).
|
|
46
|
+
*
|
|
47
|
+
* Unset keeps this component's existing contain behaviour rather than
|
|
48
|
+
* adopting the primitive's cover default, so no shared caller changes.
|
|
49
|
+
* @defaultValue `{ contain: 'contain', cover: 'cover', stretch: 'fill', center: 'none' }`
|
|
50
|
+
*/
|
|
51
|
+
declare const RESIZE_FIT: {
|
|
52
|
+
/** @defaultValue 'contain' */
|
|
53
|
+
contain: string;
|
|
54
|
+
/** @defaultValue 'cover' */
|
|
55
|
+
cover: string;
|
|
56
|
+
/** @defaultValue 'fill' */
|
|
57
|
+
stretch: string;
|
|
58
|
+
/** @defaultValue 'none' */
|
|
59
|
+
center: string
|
|
60
|
+
};
|
|
61
|
+
export declare const resizeMode: boolean;
|
|
62
|
+
export declare const objectFit: unknown;
|
|
63
|
+
export declare const srcProp: unknown;
|
|
64
|
+
export declare const sourceUrl: ReturnType<typeof mediaUrl>;
|
|
32
65
|
export declare const src: unknown;
|
|
33
66
|
export declare const poster: unknown;
|
|
34
67
|
/** The accessible name of the player. Follows a binding. */
|
|
@@ -64,5 +97,5 @@ export declare const playerConfig: unknown;
|
|
|
64
97
|
*/
|
|
65
98
|
export declare const isPage: unknown;
|
|
66
99
|
export declare const containerClasses: unknown;
|
|
67
|
-
declare type __DtsxStxComponentType = DefineComponent<{ src?: string, poster?: string, label?: unknown, title?: string, autoplay?: unknown, loop?: unknown, muted?: unknown, controls?: unknown, playsinline?: unknown, disablePictureInPicture?: unknown, autofocus?: unknown, preload?: string, crossorigin?: string, controlslist?: string, width?: string, height?: string, className?: unknown, class?: string, aspectRatio?: unknown, sources?: unknown, tracks?: unknown, drm?: unknown }> & { readonly __stxEmits?: ["play", "pause", "ended", "timeupdate", "loadedmetadata", "loadstart", "error"] }
|
|
100
|
+
declare type __DtsxStxComponentType = DefineComponent<{ resizeMode?: unknown, src?: string, source?: unknown, poster?: string, label?: unknown, title?: string, autoplay?: unknown, loop?: unknown, muted?: unknown, controls?: unknown, playsinline?: unknown, disablePictureInPicture?: unknown, autofocus?: unknown, preload?: string, crossorigin?: string, controlslist?: string, width?: string, height?: string, className?: unknown, class?: string, aspectRatio?: unknown, sources?: unknown, tracks?: unknown, drm?: unknown }> & { readonly __stxEmits?: ["play", "pause", "ended", "timeupdate", "loadedmetadata", "loadstart", "error"] }
|
|
68
101
|
export default __dtsx_component__;
|
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.816",
|
|
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",
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
"bun",
|
|
24
24
|
"component-library"
|
|
25
25
|
],
|
|
26
|
+
"stx": {
|
|
27
|
+
"components": [
|
|
28
|
+
"./src/ui",
|
|
29
|
+
"./src/components"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
26
32
|
"sideEffects": [
|
|
27
33
|
"**/*.css"
|
|
28
34
|
],
|
|
@@ -77,8 +83,8 @@
|
|
|
77
83
|
"dependencies": {
|
|
78
84
|
"@iconify-json/f7": "^1.2.2",
|
|
79
85
|
"@stacksjs/ts-css": "^0.3.11",
|
|
80
|
-
"@stacksjs/stx": "0.2.
|
|
81
|
-
"bun-plugin-stx": "0.2.
|
|
86
|
+
"@stacksjs/stx": "0.2.816",
|
|
87
|
+
"bun-plugin-stx": "0.2.816",
|
|
82
88
|
"ts-syntax-highlighter": "^0.2.17",
|
|
83
89
|
"ts-video-player": "^0.1.11"
|
|
84
90
|
},
|
package/src/ui/button/Button.stx
CHANGED
|
@@ -19,7 +19,22 @@ export const fullWidth = $bool($props.fullWidth)
|
|
|
19
19
|
* one, the button renders it in a span that tracks the parent's binding; given
|
|
20
20
|
* none, the slot behaves exactly as before. See stacksjs/stx#1997.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Desktop and native callers name a button's words `title` and its glyph
|
|
24
|
+
* `symbol`, with `iconOnly` meaning "draw the glyph alone". Accepting them is
|
|
25
|
+
* what lets such a call select this component rather than the native
|
|
26
|
+
* primitive (stacksjs/stx#2091).
|
|
27
|
+
*
|
|
28
|
+
* `title` supplies the words ONLY when nothing else does. It is also the web's
|
|
29
|
+
* tooltip attribute, so a caller writing both a tooltip and content keeps
|
|
30
|
+
* both: folding it into the label unconditionally would replace the slot with
|
|
31
|
+
* the tooltip text.
|
|
32
|
+
*/
|
|
33
|
+
export const symbol = $props.symbol || ''
|
|
34
|
+
export const iconOnly = $bool($props.iconOnly)
|
|
35
|
+
const slotWords = String($slots?.default ?? '').trim()
|
|
36
|
+
const titleWords = !$props.label && !slotWords ? ($props.title || '') : ''
|
|
37
|
+
export const label = $props.label || titleWords
|
|
23
38
|
export const hasLabel = label !== ''
|
|
24
39
|
|
|
25
40
|
/*
|
|
@@ -193,6 +208,8 @@ function onClick(event) {
|
|
|
193
208
|
type="{{ type }}"
|
|
194
209
|
class="{{ nativeButtonClasses }}"
|
|
195
210
|
activeOpacity="0.6"
|
|
211
|
+
@if(symbol)symbol="{{ symbol }}"@endif
|
|
212
|
+
@if(iconOnly)iconOnly="true"@endif
|
|
196
213
|
@if(isDisabled)disabled@endif
|
|
197
214
|
:disabled="isDisabled()"
|
|
198
215
|
aria-busy="{{ loading ? 'true' : 'false' }}"
|
package/src/ui/video/Video.stx
CHANGED
|
@@ -20,13 +20,40 @@
|
|
|
20
20
|
* The controls speak the page's language (`<html lang>`): ts-video-player
|
|
21
21
|
* names its buttons and announces playback in it.
|
|
22
22
|
*
|
|
23
|
-
* On native, src calls using the shared media events select this
|
|
24
|
-
* when installed. Legacy
|
|
25
|
-
* retain the native primitive
|
|
23
|
+
* On native, src and source calls using the shared media events select this
|
|
24
|
+
* component when installed. Legacy-event calls (for example @progress rather
|
|
25
|
+
* than @timeupdate) retain the native primitive, because the two names mean
|
|
26
|
+
* different things on the web and collapse to one on a host. This is the
|
|
27
|
+
* host's Video control: `src`
|
|
26
28
|
* must be a media URL the platform supports, not a YouTube/Vimeo page.
|
|
27
29
|
* Browser source selection, tracks and DRM configuration remain web-only.
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
/**
|
|
32
|
+
* `source` is the native primitive's name for the same media URL, and both
|
|
33
|
+
* hosts accept either a string or a `{ uri }` payload. Accepting it here is
|
|
34
|
+
* what lets a legacy native call select this component instead of the
|
|
35
|
+
* primitive (stacksjs/stx#2091); `src` wins a mixed call, being this
|
|
36
|
+
* component's own API.
|
|
37
|
+
*/
|
|
38
|
+
function mediaUrl(value) {
|
|
39
|
+
if (typeof value === 'string') return value
|
|
40
|
+
if (value && typeof value === 'object') return String(value.uri ?? '')
|
|
41
|
+
return ''
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* How the frame fills its box. `resizeMode` is the native name and the host
|
|
45
|
+
* interprets it; `object-fit` is the web's, and the four native values map
|
|
46
|
+
* onto it, so one call works on both (stacksjs/stx#2091).
|
|
47
|
+
*
|
|
48
|
+
* Unset keeps this component's existing contain behaviour rather than
|
|
49
|
+
* adopting the primitive's cover default, so no shared caller changes.
|
|
50
|
+
*/
|
|
51
|
+
const RESIZE_FIT = { contain: 'contain', cover: 'cover', stretch: 'fill', center: 'none' }
|
|
52
|
+
export const resizeMode = typeof $props.resizeMode === 'string' ? $props.resizeMode.trim().toLowerCase() : ''
|
|
53
|
+
export const objectFit = RESIZE_FIT[resizeMode] || 'contain'
|
|
54
|
+
export const srcProp = $props.src || ''
|
|
55
|
+
export const sourceUrl = mediaUrl($props.source)
|
|
56
|
+
export const src = srcProp || sourceUrl
|
|
30
57
|
export const poster = $props.poster || ''
|
|
31
58
|
/** The accessible name of the player. Follows a binding. */
|
|
32
59
|
export const label = $props.label || $props.title || ''
|
|
@@ -83,7 +110,11 @@ const nativeVideo = !!window.stx._host.isNative
|
|
|
83
110
|
if (!nativeVideo)
|
|
84
111
|
registerElements()
|
|
85
112
|
|
|
86
|
-
|
|
113
|
+
// Tracked separately so a parent driving either name keeps working: holding
|
|
114
|
+
// one merged initial value would leave the other stale when it changed.
|
|
115
|
+
const liveSrcProp = useReactiveProp('src', {{ srcProp }})
|
|
116
|
+
const liveSourceProp = useReactiveProp('source', {{ sourceUrl }})
|
|
117
|
+
const liveSrc = derived(() => liveSrcProp() || liveSourceProp() || '')
|
|
87
118
|
const livePoster = useReactiveProp('poster', {{ poster }})
|
|
88
119
|
const liveLabel = useReactiveProp('label', {{ label }})
|
|
89
120
|
const liveRatio = useReactiveProp('aspectRatio', {{ aspectRatio }})
|
|
@@ -139,6 +170,7 @@ effect(() => {
|
|
|
139
170
|
<video-player
|
|
140
171
|
data-native="Video"
|
|
141
172
|
data-stx-native-host-root
|
|
173
|
+
@if(resizeMode) resizeMode="{{ resizeMode }}" @endif
|
|
142
174
|
ref="player"
|
|
143
175
|
@play="forwardNative('play', $event)"
|
|
144
176
|
@pause="forwardNative('pause', $event)"
|
|
@@ -177,7 +209,7 @@ effect(() => {
|
|
|
177
209
|
@if(isPage)
|
|
178
210
|
<span data-native-fallback class="block h-full w-full"></span>
|
|
179
211
|
@else
|
|
180
|
-
<video data-native-fallback @if(src) src="{{ src }}" @endif @if(poster) poster="{{ poster }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif :controls="playerControls()" :loop="playerLoop()" :muted="playerMuted()" @if(playsinline) playsinline @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif controlslist="{{ controlslist }}" @if(disablePictureInPicture) disablepictureinpicture @endif @if(label) aria-label="{{ label }}" @endif class="object-
|
|
212
|
+
<video data-native-fallback @if(src) src="{{ src }}" @endif @if(poster) poster="{{ poster }}" @endif @if(controls) controls @endif @if(loop) loop @endif @if(muted) muted @endif :controls="playerControls()" :loop="playerLoop()" :muted="playerMuted()" @if(playsinline) playsinline @endif preload="none" @if(crossorigin) crossorigin="{{ crossorigin }}" @endif controlslist="{{ controlslist }}" @if(disablePictureInPicture) disablepictureinpicture @endif @if(label) aria-label="{{ label }}" @endif class="object-{{ objectFit }} h-full w-full"></video>
|
|
181
213
|
@endif
|
|
182
214
|
<video-skin>
|
|
183
215
|
<media-seek-button slot="left" seconds="-10"></media-seek-button>
|