@stacksjs/stx 0.2.585 → 0.2.586
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-qhr1tkhj.js";import"./chunk-v8ze2q95.js";import"./chunk-pxw4edw8.js";import{Cr,eo,ra}from"./chunk-c6egfhy6.js";import"./chunk-mmbspaqh.js";import{nr,mn,He,rr,Rt,hn,yn,At,ar,n,o}from"./chunk-3qmx12d3.js";import"./chunk-03xsf9jm.js";import"./chunk-91pdg853.js";import"./chunk-k1szsenr.js";import"./chunk-45x4myqe.js";import"./chunk-82bttwqm.js";import"./chunk-k71e38fk.js";import{Me}from"./chunk-j7kcjgxy.js";import"./chunk-3y5tzxm6.js";import"./chunk-yhhfxx17.js";import{is}from"./chunk-cqr5cv7h.js";import"./chunk-w24qmxc3.js";import{existsSync as le,mkdirSync as Kn,readFileSync as Yn}from"fs";import X from"path";import{existsSync as Pe,mkdirSync as vt,realpathSync as Fn,rmSync as wt}from"fs";import P from"path";import{existsSync as Dn}from"fs";import ee from"path";var Tt="data-stx-b",De=new Set(eo),_t=new Set(Cr);function Et(r){if(r==="ref"||r==="data-stx-ref")return"ref";if(r.startsWith("::"))return null;if(r.startsWith("@bind:")||r.startsWith("x-bind:"))return"attr";if(r.startsWith("@")||r.startsWith(":")){let e=r.slice(1).split(".")[0];if(De.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(ra(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!_t.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return De.has(t)?t==="if"?"if":t:"attr"}return null}function It(r){let e=[];for(let[t,i]of r){let s=Et(t);if(s)e.push({name:t,value:i,kind:s})}return e}var Pt=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,fe=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function Le(r){let e=[],t=0;return{html:r.replace(Pt,(s,a,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let d=[];fe.lastIndex=0;for(let b=fe.exec(l);b;b=fe.exec(l))d.push([b[1],b[2]??b[3]??b[4]??""]);let f=It(d);if(!f.length)return s;let h={id:t++,bindings:f};if(f.some((b)=>b.kind==="for"))h.template=!0;e.push(h);let v=s.endsWith("/>");return`${s.slice(0,v?-2:-1).trimEnd()} ${Tt}="${h.id}"${v?"/>":">"}`}),manifest:{entries:e}}}var pe={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var $e={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Ve={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function Fe(r){return r==="role"||r==="aria-label"||r==="aria-valuetext"||r in $e}function Ct(r,e){if(e===void 0||e===null)return;let t=String(e).trim().toLowerCase();if(t==="mixed")return r==="aria-checked"?"mixed":!0;if(t==="undefined")return;return t===""||t==="true"}function Ot(r){if(r===void 0||r===null)return null;for(let e of String(r).trim().toLowerCase().split(/\s+/))if(Ve[e])return Ve[e];return null}function je(r,e,t){if(r==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(r==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(r==="role")return{accessibilityRole:Ot(e)};let i=$e[r];if(!i)return;let s=t.accessibilityState,a=s&&typeof s==="object"?{...s}:{},l=Ct(r,e);if(l===void 0)delete a[i];else a[i]=l;return{accessibilityState:Object.keys(a).length?a:null}}function We(r){let e=r.accessibilityState&&typeof r.accessibilityState==="object"?r.accessibilityState:void 0,t={};for(let[s,a]of Object.entries(r)){if(!Fe(s))continue;let l=je(s,a,t);if(l)Object.assign(t,l)}for(let s of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(r[s]===void 0&&t[s]!==void 0&&t[s]!==null)r[s]=t[s];let i=t.accessibilityState;if(i)r.accessibilityState={...i,...e}}var he={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},me=new Set(Object.values(he));var Ue=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),qe=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function M(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function G(r){return Math.round(r*1000)/1000}function ye(r){if(Array.isArray(r)&&r.length===4&&r.every((t)=>Number.isFinite(Number(t))))return r.map(Number);let e=String(r??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function Mt(r){let e=String(r??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var Xe=/[MLHVCSQTAZ]/i,ge=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Bt(r){let e=[],t=r,i=Xe.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let l=Xe.exec(t),d=l?t.slice(0,l.index):t,f;if(a==="A"||a==="a"){f=[];let h=0,v=d.trim(),y=0;while(y<v.length){let b=h%7,c=v.slice(y).replace(/^[\s,]+/,"");if(y=v.length-c.length,!c)break;if(b===3||b===4)f.push(c[0]==="1"?1:0),y+=1;else{ge.lastIndex=0;let m=ge.exec(c);if(!m||m.index!==0)break;f.push(Number.parseFloat(m[0])),y+=m[0].length}h++}}else f=(d.match(ge)||[]).map(Number.parseFloat);e.push({command:a,args:f}),i=l}return e}function Dt(r,e,t,i,s,a,l,d,f){if(r===d&&e===f)return[];let h=Math.abs(t),v=Math.abs(i);if(!h||!v)return[1,d,f];let y=s*Math.PI/180,b=Math.cos(y),c=Math.sin(y),m=(r-d)/2,u=(e-f)/2,p=b*m+c*u,S=-c*m+b*u,x=p*p/(h*h)+S*S/(v*v);if(x>1)h*=Math.sqrt(x),v*=Math.sqrt(x);let g=h*h*v*v-h*h*S*S-v*v*p*p,w=h*h*S*S+v*v*p*p,_=Math.sqrt(Math.max(0,g/w));if(a===l)_=-_;let R=_*(h*S)/v,V=_*-(v*p)/h,k=b*R-c*V+(r+d)/2,E=c*R+b*V+(e+f)/2,N=(O,L,F,Y)=>{let de=O*Y-L*F<0?-1:1,ue=(O*F+L*Y)/(Math.hypot(O,L)*Math.hypot(F,Y));return de*Math.acos(Math.min(1,Math.max(-1,ue)))},B=N(1,0,(p-R)/h,(S-V)/v),A=N((p-R)/h,(S-V)/v,(-p-R)/h,(-S-V)/v);if(!l&&A>0)A-=2*Math.PI;if(l&&A<0)A+=2*Math.PI;let T=Math.max(1,Math.ceil(Math.abs(A)/(Math.PI/2))),j=A/T,I=1.3333333333333333*Math.tan(j/4),D=[],H=(O)=>{let L=h*Math.cos(O),F=v*Math.sin(O);return[b*L-c*F+k,c*L+b*F+E]},U=(O)=>{let L=-h*Math.sin(O),F=v*Math.cos(O);return[b*L-c*F,c*L+b*F]},W=B;for(let O=0;O<T;O++){let L=W+j,[F,Y]=H(W),[de,ue]=U(W),[Oe,Be]=H(L),[Nt,kt]=U(L);D.push(2,F+I*de,Y+I*ue,Oe-I*Nt,Be-I*kt,O===T-1?d:Oe,O===T-1?f:Be),W=L}return D}function Lt(r){let e=[],t=0,i=0,s=0,a=0,l=0,d=0,f=0,h=0,v="";for(let{command:y,args:b}of Bt(String(r??""))){let c=y===y.toLowerCase(),m=y.toUpperCase(),u=()=>c?t:0,p=()=>c?i:0,S=0,x=(w)=>{if(S+w>b.length)return null;let _=b.slice(S,S+w);return S+=w,_};if(m==="Z"){e.push(4),t=s,i=a,v="Z";continue}let g=!0;while(S<b.length||g&&m==="Z"){switch(m){case"M":{let w=x(2);if(!w)return e;if(t=w[0]+u(),i=w[1]+p(),g)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);v=g?"M":"L";break}case"L":{let w=x(2);if(!w)return e;t=w[0]+u(),i=w[1]+p(),e.push(1,t,i),v="L";break}case"H":{let w=x(1);if(!w)return e;t=w[0]+u(),e.push(1,t,i),v="L";break}case"V":{let w=x(1);if(!w)return e;i=w[0]+p(),e.push(1,t,i),v="L";break}case"C":{let w=x(6);if(!w)return e;let _=w[0]+u(),R=w[1]+p();l=w[2]+u(),d=w[3]+p(),t=w[4]+u(),i=w[5]+p(),e.push(2,_,R,l,d,t,i),v="C";break}case"S":{let w=x(4);if(!w)return e;let _=v==="C"?2*t-l:t,R=v==="C"?2*i-d:i;l=w[0]+u(),d=w[1]+p(),t=w[2]+u(),i=w[3]+p(),e.push(2,_,R,l,d,t,i),v="C";break}case"Q":{let w=x(4);if(!w)return e;f=w[0]+u(),h=w[1]+p(),t=w[2]+u(),i=w[3]+p(),e.push(3,f,h,t,i),v="Q";break}case"T":{let w=x(2);if(!w)return e;f=v==="Q"?2*t-f:t,h=v==="Q"?2*i-h:i,t=w[0]+u(),i=w[1]+p(),e.push(3,f,h,t,i),v="Q";break}case"A":{let w=x(7);if(!w)return e;let _=w[5]+u(),R=w[6]+p();e.push(...Dt(t,i,w[0],w[1],w[2],w[3],w[4],_,R)),t=_,i=R,v="A";break}default:return e}g=!1}}return e.map((y)=>G(y))}function ze(r,e,t,i){if(t<=0||i<=0)return[];let s=0.5522847498;return[0,r+t,e,2,r+t,e+s*i,r+s*t,e+i,r,e+i,2,r-s*t,e+i,r-t,e+s*i,r-t,e,2,r-t,e-s*i,r-s*t,e-i,r,e-i,2,r+s*t,e-i,r+t,e-s*i,r+t,e,4].map(G)}function be(r,e){switch(r){case"Path":return Lt(String(e.d??""));case"Line":return[0,M(e.x1),M(e.y1),1,M(e.x2),M(e.y2)].map(G);case"Rect":{let t=M(e.x),i=M(e.y),s=M(e.width),a=M(e.height);if(s<=0||a<=0)return[];let l=e.rx===void 0?M(e.ry):M(e.rx),d=e.ry===void 0?l:M(e.ry);if(l=Math.min(Math.max(0,l),s/2),d=Math.min(Math.max(0,d),a/2),!l||!d)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(G);let f=0.5522847498;return[0,t+l,i,1,t+s-l,i,2,t+s-l+f*l,i,t+s,i+d-f*d,t+s,i+d,1,t+s,i+a-d,2,t+s,i+a-d+f*d,t+s-l+f*l,i+a,t+s-l,i+a,1,t+l,i+a,2,t+l-f*l,i+a,t,i+a-d+f*d,t,i+a-d,1,t,i+d,2,t,i+d-f*d,t+l-f*l,i,t+l,i,4].map(G)}case"Circle":return ze(M(e.cx),M(e.cy),M(e.r),M(e.r));case"Ellipse":return ze(M(e.cx),M(e.cy),M(e.rx),M(e.ry));case"Polyline":case"Polygon":{let t=Mt(e.points);if(t.length<4)return[];let i=[0,t[0],t[1]];for(let s=2;s<t.length;s+=2)i.push(1,t[s],t[s+1]);if(r==="Polygon")i.push(4);return i.map(G)}default:return null}}var Vt=[...qe,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],Ge=new Set(["animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture"]),$t=new Map(Vt.map((r)=>[Je(r),r]));function Je(r){return r.replace(/[-_]/g,"").toLowerCase()}function ve(r){return $t.get(Je(r))??r}var Ft={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function Ke(r){return Ft[r.toLowerCase()]||r}var jt={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bed:"bed.double",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function we(r,e=!1){let t=String(r??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),s=i?i[1]:"lucide",a=i?i[2]:t;if(s==="lucide"){let l=jt[a];if(l)return{symbol:l,iconify:`i-lucide-${a}`,known:!0};if(!i&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:i?t:`i-lucide-${a}`,known:!1}}var Qe=/^--[\w\u0080-\uFFFF-]+$/u;function Ye(r,e){if(!/var\(/i.test(r))return r;let t="",i="",s=!1;for(let a=0;a<r.length;a++){let l=r[a];if(l==="\\"){t+=r.slice(a,a+2),a++;continue}if(i){if(t+=l,l===i)i="";continue}if(l==='"'||l==="'"){i=l,t+=l;continue}if(r.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(r[a-1])){t+=l;continue}let d=1,f=-1,h="",v=a+4;for(;v<r.length;v++){let c=r[v];if(c==="\\"){v++;continue}if(h){if(c===h)h="";continue}if(c==='"'||c==="'"){h=c;continue}if(c==="(")d++;if(c===")"&&--d===0)break;if(c===","&&d===1&&f===-1)f=v}if(d!==0)return;let y=r.slice(a+4,f===-1?v:f).trim();if(!Qe.test(y))return;let b=e(y,f===-1?void 0:r.slice(f+1,v).trim());if(b===void 0||t.length+b.length>65536)return;t+=b,s=!0,a=v}return s&&t.length>65536?void 0:t}function Q(r,e){let t=new Map,i=new Set;for(let[u,p]of r){let S=u.trim();if(!Qe.test(S))continue;if(typeof p==="string"||typeof p==="number"&&Number.isFinite(p))t.set(S,String(p).trim())}let s=new Map,a=new Set;for(let[u,p]of t){let S=new Set,x=(g,w=0)=>w>64?void 0:Ye(g,(_,R)=>(S.add(_),R===void 0?"":x(R,w+1)));if(x(p)===void 0)a.add(u);s.set(u,S)}let l=new Map,d=new Map,f=[],h=new Set,v=0;function y(u,p=0){if(p>64){a.add(u);return}l.set(u,v),d.set(u,v++),f.push(u),h.add(u);for(let g of s.get(u)??[]){if(!t.has(g))continue;if(!l.has(g)){if(y(g,p+1),d.has(g))d.set(u,Math.min(d.get(u),d.get(g)))}else if(h.has(g))d.set(u,Math.min(d.get(u),l.get(g)))}if(d.get(u)!==l.get(u))return;let S=[],x;do x=f.pop(),h.delete(x),S.push(x);while(x!==u);if(S.length>1||s.get(u)?.has(u))S.forEach((g)=>a.add(g))}for(let u of t.keys())if(!l.has(u))y(u);let b=new Map;function c(u,p){if(i.add(u),b.has(u))return b.get(u);let S=t.get(u),x=S===void 0||/^(?:inherit|unset)$/i.test(S)?e?.get(u):a.has(u)||/^(?:initial|revert|revert-layer)$/i.test(S)?void 0:m(S,p+1);return b.set(u,x),x}function m(u,p=0){if(p>64)return;return Ye(u,(S,x)=>c(S,p)??(x===void 0?void 0:m(x,p+1)))}return{resolve:m,used:i,computed(){let u=new Map(e);for(let p of t.keys())u.set(p,c(p,0));return u}}}var Ze=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),Wt=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),et=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),Xt=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,zt=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Ht=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Ut=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function qt(r){if(typeof r!=="string")return r;let e=zt.exec(r);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):r}function J(r){return typeof r==="number"&&Number.isFinite(r)}function Gt(r,e){if(r==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:t,height:i}=e;return J(t)&&J(i)?{width:t,height:i}:void 0}if(r==="transform"&&Array.isArray(e)){let t=[];for(let i of e){if(!i||typeof i!=="object"||Array.isArray(i)||Object.keys(i).length!==1)return;let[s,a]=Object.entries(i)[0];if(Ut.has(s)&&J(a))t.push({[s]:a});else if(Ht.has(s)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))t.push({[s]:a});else return}return t}return}function Jt(r){let e=[],t=0,i=0,s="";for(let a=0;a<=r.length;a++){let l=r[a];if(l==="\\"){a++;continue}if(s){if(l===s)s="";continue}if(l==='"'||l==="'"){s=l;continue}if(l==="(")i++;if(l===")")i=Math.max(0,i-1);if(a!==r.length&&(l!==";"||i))continue;let d=r.slice(t,a),f=d.indexOf(":");if(f!==-1)e.push([d.slice(0,f).trim(),d.slice(f+1).trim()]);t=a+1}return e}function Kt(r,e){let t;if(typeof r==="string"){if(r=r.trim(),!r)return[];try{r=JSON.parse(r)}catch{}}if(typeof r==="string")t=Jt(r);else if(r&&typeof r==="object"&&!Array.isArray(r))t=Object.entries(r);else{if(r!=null&&r!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return t}function tt(r,e=()=>{},t={}){let i=Kt(r,e),s=Q(i,t.inheritedVariables);return t.onVariables?.(s.computed()),Yt(i,s,e)}function Yt(r,e,t){let i={},s=[];for(let[a,l]of r){if(a.trim().startsWith("--")){s.push(a.trim());continue}let d=Ze.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(v,y)=>y.toUpperCase());if(!Ze.has(d)){t({kind:"unknown-style",name:d});continue}if(l==null||l==="")continue;let f=typeof l==="string"?e.resolve(l.trim()):l;if(f===void 0){t({kind:"non-numeric-style",name:d});continue}if(f==="")continue;let h;if(Wt.has(d)||et.has(d)){if(h=qt(f),!J(h)&&!(et.has(d)&&typeof h==="string"&&h.endsWith("%")&&Xt.test(h.slice(0,-1))&&Number.isFinite(Number(h.slice(0,-1)))))h=void 0}else if(d==="shadowOffset"||d==="transform")h=Gt(d,f);else if(d==="gridTemplateColumns"||d==="gridTemplateRows")h=J(f)||typeof f==="string"?f:void 0;else if(d==="fontWeight"&&J(f))h=String(f);else if(typeof f==="string")h=f;if(h===void 0)t({kind:"non-numeric-style",name:d});else i[d]=h}for(let a of s)if(!e.used.has(a))t({kind:"unknown-style",name:a});return i}import{generate as Z,parse as nt}from"@stacksjs/ts-css/parse";async function rt(r,e){let t={light:new Map,dark:new Map},i=new Set,s=(y)=>{if(!i.has(y))i.add(y),e(y)},a=(y,b,c)=>{for(let m of c){let u=t[m].get(y);if(!u||Number(b.important)>Number(u.important)||b.important===u.important&&b.specificity>=u.specificity)t[m].set(y,b)}},l=(y)=>{if(y.type==="Declaration")return y.property.startsWith("--");if(y.type==="Rule"||y.type==="Atrule")return!!y.block&&[...y.block.children].some(l);return!1},d=(y)=>{let b=y.replace(/\s+/g,"").toLowerCase();if(!b||b==="all"||b==="screen")return["light","dark"];let c=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(b);return c?[c[1]]:void 0};function f(y,b){for(let c of y){if(!l(c))continue;if(c.type==="Atrule"){let u=c.prelude?Z(c.prelude):"",p=c.name.toLowerCase()==="media"?d(u):void 0;if(!p){s(`@${c.name} ${u}`.trim());continue}f(c.block.children,b.filter((S)=>p.includes(S)));continue}if(c.type!=="Rule")continue;let m=c.prelude.type==="SelectorList"?[...c.prelude.children].map(Z):[Z(c.prelude)];for(let u of m){let p=/^(html|:root)?(?:\.(dark|light))?$/.exec(u.trim());if(!p||!p[1]&&!p[2]){s(u);continue}let S=(p[1]===":root"?10:p[1]?1:0)+(p[2]?10:0);for(let x of c.block.children){if(x.type!=="Declaration"){if(l(x))s(`nested rule in ${u}`);continue}if(!x.property.startsWith("--"))continue;let g={value:Z(x.value),important:!!x.important,specificity:S};a(x.property,g,b.filter((w)=>!p[2]||p[2]===w))}}}}let h="",v;return await new HTMLRewriter().on("html",{element(y){let b=y.getAttribute("style");if(!b)return;try{let c=nt(b,{context:"declarationList"});if(c.type!=="DeclarationList")return;for(let m of c.children)if(m.type==="Declaration"&&m.property.startsWith("--"))a(m.property,{value:Z(m.value),important:!!m.important,specificity:1000},["light","dark"])}catch{s("invalid document inline theme")}}}).on("style",{element(y){h="";let b=y.getAttribute("type");v=!b||b.toLowerCase()==="text/css"?d(y.getAttribute("media")??""):void 0,y.onEndTag(()=>{try{let c=nt(h);if(c.type!=="StyleSheet")return;if(!v){if([...c.children].some(l))s("style type/media");return}f(c.children,v)}catch{s("invalid stylesheet")}})},text(y){h+=y.text}}).transform(new Response(r)).text(),{light:[...t.light].map(([y,b])=>[y,b.value]),dark:[...t.dark].map(([y,b])=>[y,b.value])}}function ne(r){let e=r&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(r.trim());if(!e)return;let t=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(t)?t:void 0}function Se(r,e){if(!He[r])return;return ne(e?.get(rr(r))??He[r].value)}function xe(r,e){let t=hn[r];if(!t)return;return ne(e?.get(At(t))??Rt[t]?.value)}function Ne(r,e){let t=yn[r];if(!t)return;let i=ne(e?.get(At(t.size))??Rt[t.size]?.value),s=ne(e?.get(At(t.leading))??Rt[t.leading]?.value);if(i===void 0||s===void 0)return;return{fontSize:i,lineHeight:s}}var Qt={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},at={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},it={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},st={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function K(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=K(r.slice(0,e)),s=r.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return Zt(i,a/100)}if(r==="transparent")return"transparent";if(r==="current")return"currentColor";if(r==="black")return"#000000";if(r==="white")return"#ffffff";let t=r.split("-");if(t.length===2){let[i,s]=t,a=Qt[i];if(a&&typeof a==="object")return a[s]}if(r.startsWith("[")&&r.endsWith("]")){let i=r.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function Zt(r,e){if(r==="transparent")return r;let t=r.startsWith("#")?r.slice(1):"";if(t.length===3)t=t.split("").map((s)=>s+s).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${i.toString(16).padStart(2,"0")}`}function ke(r,e=16){if(!r.startsWith("[")||!r.endsWith("]"))return;let t=r.slice(1,-1),i=Number.parseFloat(t);if(!Number.isFinite(i))return;if(t.endsWith("rem"))return i*16;if(t.endsWith("em"))return i*e;return i}function C(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return at[r]??xe(r)}function re(r){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(r);if(e)return`${Number.parseFloat(e[1])}%`;return C(r)}var en={flex:(r,e)=>(e.display="flex",!0),hidden:(r,e)=>(e.display="none",!0),grid:(r,e)=>(e.display="grid",!0),"flex-row":(r,e)=>(e.flexDirection="row",!0),"flex-col":(r,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(r,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(r,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(r,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(r,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(r,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(r,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(r,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(r,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(r,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(r,e)=>(e.flexGrow=1,!0),"grow-0":(r,e)=>(e.flexGrow=0,!0),shrink:(r,e)=>(e.flexShrink=1,!0),"shrink-0":(r,e)=>(e.flexShrink=0,!0),"justify-start":(r,e)=>(e.justifyContent="flex-start",!0),"justify-center":(r,e)=>(e.justifyContent="center",!0),"justify-end":(r,e)=>(e.justifyContent="flex-end",!0),"justify-between":(r,e)=>(e.justifyContent="space-between",!0),"justify-around":(r,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(r,e)=>(e.justifyContent="space-evenly",!0),"items-start":(r,e)=>(e.alignItems="flex-start",!0),"items-center":(r,e)=>(e.alignItems="center",!0),"items-end":(r,e)=>(e.alignItems="flex-end",!0),"items-stretch":(r,e)=>(e.alignItems="stretch",!0),"items-baseline":(r,e)=>(e.alignItems="baseline",!0),"self-auto":(r,e)=>(e.alignSelf="auto",!0),"self-start":(r,e)=>(e.alignSelf="flex-start",!0),"self-center":(r,e)=>(e.alignSelf="center",!0),"self-end":(r,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(r,e)=>(e.alignSelf="stretch",!0),"self-baseline":(r,e)=>(e.alignSelf="baseline",!0),"min-w-0":(r,e)=>(e.minWidth=0,!0),"aspect-square":(r,e)=>(e.aspectRatio=1,!0),"inset-0":(r,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(r,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(r,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(r,e)=>(e.letterSpacing=0,!0),"tracking-wide":(r,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(r,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(r,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(r,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(r,e)=>(e.position="relative",!0),absolute:(r,e)=>(e.position="absolute",!0),"overflow-visible":(r,e)=>(e.overflow="visible",!0),"overflow-hidden":(r,e)=>(e.overflow="hidden",!0),"overflow-scroll":(r,e)=>(e.overflow="scroll",!0),"font-thin":(r,e)=>(e.fontWeight="100",!0),"font-extralight":(r,e)=>(e.fontWeight="200",!0),"font-light":(r,e)=>(e.fontWeight="300",!0),"font-normal":(r,e)=>(e.fontWeight="400",!0),"font-medium":(r,e)=>(e.fontWeight="500",!0),"font-semibold":(r,e)=>(e.fontWeight="600",!0),"font-bold":(r,e)=>(e.fontWeight="bold",!0),"font-extrabold":(r,e)=>(e.fontWeight="800",!0),"font-black":(r,e)=>(e.fontWeight="900",!0),italic:(r,e)=>(e.fontStyle="italic",!0),"not-italic":(r,e)=>(e.fontStyle="normal",!0),"text-left":(r,e)=>(e.textAlign="left",!0),"text-center":(r,e)=>(e.textAlign="center",!0),"text-right":(r,e)=>(e.textAlign="right",!0),"text-justify":(r,e)=>(e.textAlign="justify",!0),uppercase:(r,e)=>(e.textTransform="uppercase",!0),lowercase:(r,e)=>(e.textTransform="lowercase",!0),capitalize:(r,e)=>(e.textTransform="capitalize",!0),"normal-case":(r,e)=>(e.textTransform="none",!0),underline:(r,e)=>(e.textDecorationLine="underline",!0),"line-through":(r,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(r,e)=>(e.textDecorationLine="none",!0)};function tn(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=K(t);if(i)return e.backgroundColor=i,!0;return!1}function nn(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5),i=Ne(t);if(i)return Object.assign(e,i),!0;if(it[t])return e.fontSize=it[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let a=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let l=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(l))return e.fontSize=l,!0}}let s=K(t);if(s)return e.color=s,!0;return!1}var rn=new Set(["t","tr","r","br","b","bl","l","tl"]);function sn(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&rn.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=K(i[2]);if(!s)return!1;if(i[1]==="from")e.gradientFrom=s;else if(i[1]==="via")e.gradientVia=s;else e.gradientTo=s;return!0}function on(r,e){for(let t of["fill","stroke"]){let i=`${t}-`;if(!r.startsWith(i))continue;let s=r.slice(i.length);if(s==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return e.strokeWidth=Number.parseFloat(s),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return e.strokeWidth=Number.parseFloat(s.slice(1)),!0;let a=K(s);if(a)return e[t]=a,!0}return!1}function an(r,e){if(r.startsWith("p-")){let t=C(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function ct(r,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(r)){let t={};if(!ct(r.slice(1),t))return!1;let i=Object.entries(t);if(i.some(([,s])=>typeof s!=="number"))return!1;for(let[s,a]of i)e[s]=-a;return!0}if(r.startsWith("m-")){let t=C(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=C(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=C(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=C(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=C(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=C(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=C(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function cn(r,e){if(!r.startsWith("w-"))return!1;let t=r.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[s,a]=t.split("/"),l=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${l}%`,!0}let i=re(t);if(i!==void 0)return e.width=i,!0;return!1}function ln(r,e){if(!r.startsWith("h-"))return!1;let t=r.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let i=re(t);if(i!==void 0)return e.height=i,!0;return!1}function dn(r,e){if(r==="rounded")return e.borderRadius=st.DEFAULT,!0;if(!r.startsWith("rounded-"))return!1;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(t),s=st[i[2]]??Se(i[2])??ke(i[2]);if(s===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let l of i[1]?a[i[1]]:["borderRadius"])e[l]=s;return!0}function un(r,e){if(!r.startsWith("border"))return!1;if(r==="border")return e.borderWidth=1,!0;let t=r.match(/^border-(\d+)$/);if(t)return e.borderWidth=Number.parseInt(t[1]),!0;let i=r.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,l=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=l;break;case"r":e.borderRightWidth=l;break;case"b":e.borderBottomWidth=l;break;case"l":e.borderLeftWidth=l;break}return!0}return!1}function fn(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=K(t);if(i)return e.borderColor=i,!0;return!1}function pn(r,e){if(!r.startsWith("opacity-"))return!1;let t=Number.parseInt(r.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function gn(r,e){if(r.startsWith("tracking-[")){let t=ke(r.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(r.startsWith("leading-")){let t=r.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*i:ke(t,i):s[t]!==void 0?s[t]*i:at[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function bn(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function vn(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":re(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var wn={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Sn(r,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(r);if(!t)return!1;let[,i,s,a]=t,l=a==="full"||a==="screen"?"100%":a==="none"?void 0:s==="w"&&i==="max"&&wn[a]||re(a);if(l===void 0&&a!=="none")return!1;let d=`${i}${s==="w"?"Width":"Height"}`;if(l===void 0)delete e[d];else e[d]=l;return!0}function xn(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":C(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Nn(r,e){let t=/^(-?)translate-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=t[3],s;if(i.startsWith("[")){let d=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(i);if(!d)return!1;s=Number(d[1])*(d[2]?.endsWith("em")?16:1)}else s=C(i);if(s===void 0||!Number.isFinite(s))return!1;if(t[1])s=-s;let a=t[2]==="x"?"translateX":"translateY",l=a==="translateX"?{translateX:s}:{translateY:s};return e.transform=[...(e.transform??[]).filter((d)=>!(a in d)),l],!0}function kn(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=C(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Tn(r,e){if(r.startsWith("gap-")){let t=C(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=C(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=C(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function Rn(r,e){let i={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[r];if(!i)return!1;let[s,a,l,d]=i;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:l,shadowRadius:s,shadowOffset:{width:0,height:a},elevation:d}),!0}function ie(r,e){let t=[],i=[],s=[],a=[],l=new Map;function d(c,m){let u=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(c),p=u&&nr[u[2]];if(p){let g=e?.get(mn(u[2]));return[`${u[1]}-${g===void 0?p[m]:`[${g}]`}${u[3]||""}`]}let S=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(c);if(S&&He[S[2]]){let g=Se(S[2],e);return g===void 0?void 0:[`rounded-${S[1]?`${S[1]}-`:""}[${g}px]`]}let x=c.startsWith("text-")?c.slice(5):"";if(yn[x]){let g=Ne(x,e);return g&&[`text-[${g.fontSize}px]`,`leading-[${g.lineHeight}px]`]}for(let g of Object.keys(hn)){if(!c.endsWith(`-${g}`))continue;let w=xe(g,e);return w===void 0?void 0:[`${c.slice(0,-g.length)}[${w}px]`]}return[c]}function f(c,m){if(!l.has(c))l.set(c,new Set);return l.get(c).add(m),c}for(let c of r.split(/\s+/).filter(Boolean))if(c.startsWith("dark:")){let m=d(c.slice(5),"dark");if(!m)a.push(c);else i.push(...m.map((u)=>f(u,c)))}else if(!c.includes(":")||c.startsWith("[")){let m=d(c,"light"),u=d(c,"dark");if(!m||!u){a.push(c);continue}if(t.push(...m.map((p)=>f(p,c))),u.join(" ")!==m.join(" "))s.push(...u.map((p)=>f(p,c)))}else a.push(c);let h=[],v=ot(t,h),y={style:v,unknown:h};if(i.length||s.length)y.dark=ot([...s,...i],h);if(v.transform&&y.dark?.transform){let c=new Set(y.dark.transform.flatMap((m)=>Object.keys(m)));y.dark.transform=[...v.transform.filter((m)=>!Object.keys(m).some((u)=>c.has(u))),...y.dark.transform]}for(let c of t){if(c==="truncate")y.numberOfLines=1;let m=/^line-clamp-(\d+)$/.exec(c);if(m)y.numberOfLines=Number(m[1]);if(!y.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(c))y.icon=c}let b=h.flatMap((c)=>[...l.get(c)??[c]]);return y.unknown=[...new Set([...b.filter((c)=>!/^line-clamp-\d+$/.test(c)),...a])],y}function ot(r,e){let t={},i=Array.isArray(r)?r:r.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=en[s];if(a){a("",t);continue}if(Rn(s,t))continue;if(sn(s,t))continue;if(tn(s,t))continue;if(on(s,t))continue;if(nn(s,t))continue;if(an(s,t))continue;if(ct(s,t))continue;if(cn(s,t))continue;if(ln(s,t))continue;if(dn(s,t))continue;if(un(s,t))continue;if(fn(s,t))continue;if(pn(s,t))continue;if(Tn(s,t))continue;if(gn(s,t))continue;if(vn(s,t))continue;if(Sn(s,t))continue;if(bn(s,t))continue;if(xn(s,t))continue;if(Nn(s,t))continue;if(kn(s,t))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return t}function z(r,e={},t={},i={},s=[]){return{type:r,props:e,style:t,events:i,children:s}}function lt(r,e,t={}){return{version:"1.0.0",root:r,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var dt=new Set(["script","style","head","meta","link","title","base","noscript"]),ut=new Set(["template","body","html","main","fragment"]),se=new Set,An=new Set(["onBlur","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),Te=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...me]),_n=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"],["listrole","listRole"]]),ft=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),En={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function q(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=En[t.toLowerCase()];if(i!==void 0)return i;if(t[0]==="#"){let s=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function pt(r,e,t,i={}){let s=i.inheritedVariables,a={},l={},d={},f="",h={};for(let[b,c]of e){let m=b.toLowerCase();if(m==="class"||m==="classname"){f=f?`${f} ${c}`:c;continue}if(m==="style"){h={...h,...In(r,c,t,{...i,onVariables(S){s=S,i.onVariables?.(S)}})};continue}if(m.startsWith(":")||m.startsWith("x-")&&m!=="x-cloak"){d[m.startsWith(":")?m.slice(1):m.slice(2)]=q(c);continue}if(m==="x-cloak")continue;if(m.startsWith("@")||m.startsWith("v-on:")){let S=m.startsWith("@")?m.slice(1):m.slice(5),[x]=S.split("."),g=pe[x]??(x.startsWith("on")?x:"");if(!g||!An.has(g)){t.push({kind:"unread-event",tag:r,name:b});continue}l[g]=q(c);continue}if(m==="key"){a.key=c;continue}let u=q(c),p=ve(b);if(u===""&&Ge.has(p)){a[p]=!0;continue}try{a[p]=JSON.parse(u)}catch{a[p]=u}}let v=f?ie(f,s):void 0;for(let b of new Set(v?.unknown??[]))t.push({kind:"unknown-class",tag:r,name:b});let y={...v?.style,...h};return{props:a,style:y,events:l,bindings:d,classes:f,inline:h}}function In(r,e,t,i){return tt(q(e),(s)=>t.push({...s,tag:r}),i)}function Re(r){return r.children.map((e)=>typeof e==="string"?e:Re(e)).join("").replace(/\s+/g," ").trim()}function Pn(r,e){let t=r.node,i=t.children.filter((a)=>typeof a!=="string"),s=t.children.filter((a)=>typeof a==="string").join("").trim();if(r.tag==="button"&&t.type==="Button"&&!r.declaredNative&&i.length>0)return t.type="Pressable",t.props.accessibilityRole??=t.props.role??"button",t.children=t.children.flatMap((a)=>typeof a==="string"?a.trim()?[z("Text",{},{},{},[a.trim()])]:[]:[a]),t;if(t.type==="Svg"||t.type==="G")return t.children=i,t;if(t.type==="SvgText"){let a=Re(t);return t.children=a?[a]:[],t}if(ft.has(t.type)&&i.length===0&&s)return t.type="Text",t.children=[s],t;if(t.type==="Text"&&!s&&i.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&i.length>0){if(i.some((l)=>l.type!=="Text"))return t.type="View",t.children=t.children.map((l)=>typeof l==="string"?z("Text",{},{},{},[l]):l),t;let a=Re(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if(ft.has(t.type)&&i.length>0)t.children=i;return t}async function Cn(r,e={}){let t=[],i=await rt(r,(c)=>t.push({kind:"unsupported-theme-rule",tag:"style",name:c})),s=Q(i.light).computed(),a=[],l=[],d=new Set;function f(c){let m=l[l.length-1];if(!m)a.push(c);else if(!m.dropped)m.node.children.push(c)}function h(c){let m=(p)=>{if(c.tag!=="html"&&c.node._styleSource)p._styleAncestors=[c.node._styleSource,...p._styleAncestors??[]]};if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let p=c.node.children,S=p.filter((g)=>typeof g!=="string"),x=S.length===1&&S.length===p.length?S[0]:z("View",{},{},{},p);if(x.bindings={...c.node.bindings,...x.bindings},x.bindingId===void 0&&c.node.bindingId!==void 0)x.bindingId=c.node.bindingId;m(x),f(x);return}let u=l[l.length-1];for(let p of c.node.children){if(typeof p==="string"){if(u&&!u.dropped)u.node.children.push(p);continue}if(m(p),!u)a.push(p);else if(!u.dropped)u.node.children.push(p)}}function v(c,m){let u=l[l.length-1];if(c==="svg"||u?.svg)return y(c,m,u);let p=dt.has(c)&&!se.has(c),S=l[l.length-1]?.dropped??!1,x=u?.variables??s,{props:g,style:w,events:_,bindings:R,classes:V,inline:k}=p||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:pt(c,m,t,{inheritedVariables:x,onVariables:(T)=>{x=T}});if(c==="html")x=s;let E=g["data-native"],N;if(typeof E==="string"&&Te.has(E))N=E,delete g["data-native"];else if(N=se.has(c)?"View":Ke(c),c==="input"){let T=String(g.type??"text").toLowerCase();if(T==="checkbox")N="Checkbox",g.formValue=g.value??"on",g.checked=g.checked===""||g.checked===!0||g.checked==="true",g.value=g.checked;else if(T==="hidden")N="View",w.display="none",k.display="none";else if(T==="radio")N="View",g.accessibilityRole="radio",t.push({kind:"unsupported-control",tag:c,name:"input:radio"})}if(N===c&&!Te.has(N)&&!dt.has(c)&&!ut.has(c)&&!d.has(c))d.add(c),t.push({kind:"unmapped-tag",tag:c});if((p||se.has(c))&&!d.has(`drop:${c}`))d.add(`drop:${c}`),t.push({kind:"dropped-subtree",tag:c});if(c==="form")g["data-stx-form"]=!0;if(c==="button"&&g.type===void 0)g.type="submit";if(N==="Video"&&g.source===void 0&&g.src!==void 0)g.source=g.src,delete g.src;if(N==="Icon"){let T=ie(V).icon,j=we(String(g.symbol||g.name||T||""),Boolean(g.symbol));if(g.symbol=j.symbol,j.iconify)g.iconify=j.iconify}if(N==="FlatList"||N==="SectionList"){let T=new Set([...Object.keys(g),...Object.keys(R)].map((j)=>j.toLowerCase()));for(let[j,I]of _n)if(T.has(j))t.push({kind:"unsupported-list-prop",tag:N,name:I})}We(g);let B=z(N,g,w,_);B._inlineStyle=k,B._styleSource=q(m.find(([T])=>T==="style")?.[1]??"");let A=g["data-stx-b"];if(typeof A==="number"&&Number.isInteger(A))B.bindingId=A;if(delete g["data-stx-b"],V)B._classes=V;if(Object.keys(R).length>0)B.bindings=R;if(typeof g.key==="string")B.key=g.key,delete g.key;return{tag:c,node:B,variables:x,declaredNative:typeof E==="string"&&Te.has(E),dropped:p||S||se.has(c),discard:p||S,unwrap:ut.has(c)}}function y(c,m,u){let p=u?.dropped??!1,S=he[c];if(p||!S){if(!p&&!d.has(`drop:${c}`))d.add(`drop:${c}`),t.push({kind:Ue.has(c)?"dropped-subtree":"unmapped-tag",tag:c});return{tag:c,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let x=u?.variables??s,{props:g,style:w,events:_,bindings:R,classes:V,inline:k}=pt(c,m,t,{inheritedVariables:x,onVariables:(A)=>{x=A}});if(S==="Svg"){let A=ye(g.viewBox);if(A)g.viewBox=A;else delete g.viewBox;for(let T of["width","height"]){if(typeof g[T]==="number"&&w[T]===void 0)w[T]=g[T];delete g[T]}}if(typeof g.strokeDasharray==="string"||typeof g.strokeDasharray==="number"){let A=String(g.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);g.strokeDasharray=A}let E=be(S,g);if(E)g.geometry=E;let N=z(S,g,w,_);N._inlineStyle=k,N._styleSource=q(m.find(([A])=>A==="style")?.[1]??"");let B=g["data-stx-b"];if(typeof B==="number"&&Number.isInteger(B))N.bindingId=B;if(delete g["data-stx-b"],V)N._classes=V;if(Object.keys(R).length>0)N.bindings=R;if(typeof g.key==="string")N.key=g.key,delete g.key;return{tag:c,node:N,variables:x,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(c){let m=c.tagName.toLowerCase(),u=v(m,[...c.attributes]),p=!0;try{c.onEndTag(()=>{if(l.pop(),u.discard)return;if(u.unwrap)h(u);else f(Pn(u,t))})}catch{p=!1}if(p)l.push(u);else if(!u.discard)f(u.node)},text(c){let m=l[l.length-1];if(!m||m.dropped)return;let u=q(c.text).replace(/\s+/g," ");if(!u.trim())return;m.node.children.push(u)}}).transform(new Response(r)).text(),a.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let b=a.length===1?a[0]:z("View",{},{},{},a);if(i.light.length||i.dark.length)b._stylesheetTheme=i;return{root:b,diagnostics:t}}async function gt(r,e={}){let{root:t,diagnostics:i}=await Cn(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:lt(t,s,{source:e.source??"unknown"}),diagnostics:i}}var ht=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,On=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Mn=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,mt=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Ae(r){let e=[];ht.lastIndex=0;for(let a of r.matchAll(ht)){let l=a[1]??"";if(/\bserver\b/.test(l))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
2
|
+
import"./chunk-qhr1tkhj.js";import"./chunk-v8ze2q95.js";import"./chunk-pxw4edw8.js";import{Cr,eo,ra}from"./chunk-c6egfhy6.js";import"./chunk-mmbspaqh.js";import{nr,mn,He,rr,Rt,hn,yn,At,ar,n,o}from"./chunk-3qmx12d3.js";import"./chunk-03xsf9jm.js";import"./chunk-91pdg853.js";import"./chunk-k1szsenr.js";import"./chunk-45x4myqe.js";import"./chunk-82bttwqm.js";import"./chunk-k71e38fk.js";import{Me}from"./chunk-j7kcjgxy.js";import"./chunk-3y5tzxm6.js";import"./chunk-yhhfxx17.js";import{is}from"./chunk-cqr5cv7h.js";import"./chunk-w24qmxc3.js";import{existsSync as le,mkdirSync as Kn,readFileSync as Yn}from"fs";import X from"path";import{existsSync as Pe,mkdirSync as vt,realpathSync as Fn,rmSync as wt}from"fs";import P from"path";import{existsSync as Dn}from"fs";import ee from"path";var Tt="data-stx-b",De=new Set(eo),_t=new Set(Cr);function Et(r){if(r==="ref"||r==="data-stx-ref")return"ref";if(r.startsWith("::"))return null;if(r.startsWith("@bind:")||r.startsWith("x-bind:"))return"attr";if(r.startsWith("@")||r.startsWith(":")){let e=r.slice(1).split(".")[0];if(De.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(ra(e))return"event";if(r.startsWith("@"))return"event";return"attr"}if(r.startsWith("x-")){let e=r.split(".")[0];if(!_t.has(e))return"attr";let t=e.slice(2);if(t==="cloak"||t==="data"||t==="bind")return null;if(t==="tooltip"||t==="tooltip-position")return null;return De.has(t)?t==="if"?"if":t:"attr"}return null}function It(r){let e=[];for(let[t,i]of r){let s=Et(t);if(s)e.push({name:t,value:i,kind:s})}return e}var Pt=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,fe=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function Le(r){let e=[],t=0;return{html:r.replace(Pt,(s,a,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let d=[];fe.lastIndex=0;for(let b=fe.exec(l);b;b=fe.exec(l))d.push([b[1],b[2]??b[3]??b[4]??""]);let f=It(d);if(!f.length)return s;let h={id:t++,bindings:f};if(f.some((b)=>b.kind==="for"))h.template=!0;e.push(h);let v=s.endsWith("/>");return`${s.slice(0,v?-2:-1).trimEnd()} ${Tt}="${h.id}"${v?"/>":">"}`}),manifest:{entries:e}}}var pe={"region-change-complete":"onRegionChangeComplete",regionchangecomplete:"onRegionChangeComplete",click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll","scroll-begin-drag":"onScrollBeginDrag",scrollbegindrag:"onScrollBeginDrag","scroll-end-drag":"onScrollEndDrag",scrollenddrag:"onScrollEndDrag","momentum-scroll-begin":"onMomentumScrollBegin",momentumscrollbegin:"onMomentumScrollBegin","momentum-scroll-end":"onMomentumScrollEnd",momentumscrollend:"onMomentumScrollEnd",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError",play:"onPlay",playing:"onPlay",pause:"onPause",ended:"onEnd",end:"onEnd",timeupdate:"onProgress",progress:"onProgress",loadedmetadata:"onLoad",enterpictureinpicture:"onPictureInPictureStart",leavepictureinpicture:"onPictureInPictureStop"};var $e={"aria-pressed":"selected","aria-selected":"selected","aria-checked":"checked","aria-disabled":"disabled","aria-expanded":"expanded","aria-busy":"busy"},Ve={alert:"alert",button:"button",checkbox:"checkbox",combobox:"combobox",header:"header",heading:"header",image:"image",img:"image",link:"link",menu:"menu",menubar:"menubar",menuitem:"menuitem",none:"none",presentation:"none",progressbar:"progressbar",radio:"radio",scrollbar:"scrollbar",search:"search",searchbox:"search",slider:"adjustable",spinbutton:"spinbutton",switch:"switch",tab:"tab",tablist:"tablist",timer:"timer",toolbar:"toolbar"};function Fe(r){return r==="role"||r==="aria-label"||r==="aria-valuetext"||r in $e}function Ct(r,e){if(e===void 0||e===null)return;let t=String(e).trim().toLowerCase();if(t==="mixed")return r==="aria-checked"?"mixed":!0;if(t==="undefined")return;return t===""||t==="true"}function Ot(r){if(r===void 0||r===null)return null;for(let e of String(r).trim().toLowerCase().split(/\s+/))if(Ve[e])return Ve[e];return null}function je(r,e,t){if(r==="aria-label")return{accessibilityLabel:e===void 0||e===null||e===""?null:String(e)};if(r==="aria-valuetext")return{accessibilityValue:e===void 0||e===null||e===""?null:String(e)};if(r==="role")return{accessibilityRole:Ot(e)};let i=$e[r];if(!i)return;let s=t.accessibilityState,a=s&&typeof s==="object"?{...s}:{},l=Ct(r,e);if(l===void 0)delete a[i];else a[i]=l;return{accessibilityState:Object.keys(a).length?a:null}}function We(r){let e=r.accessibilityState&&typeof r.accessibilityState==="object"?r.accessibilityState:void 0,t={};for(let[s,a]of Object.entries(r)){if(!Fe(s))continue;let l=je(s,a,t);if(l)Object.assign(t,l)}for(let s of["accessibilityLabel","accessibilityRole","accessibilityValue"])if(r[s]===void 0&&t[s]!==void 0&&t[s]!==null)r[s]=t[s];let i=t.accessibilityState;if(i)r.accessibilityState={...i,...e}}var he={svg:"Svg",g:"G",path:"Path",line:"Line",rect:"Rect",circle:"Circle",ellipse:"Ellipse",polyline:"Polyline",polygon:"Polygon",text:"SvgText",tspan:"SvgText"},me=new Set(Object.values(he));var Ue=new Set(["defs","title","desc","metadata","style","symbol","use","clippath","mask","lineargradient","radialgradient","stop","pattern","marker","filter","foreignobject"]),qe=["viewBox","preserveAspectRatio","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","fillOpacity","fillRule","vectorEffect","textAnchor","dominantBaseline","fontSize","fontWeight"];function M(r){let e=typeof r==="number"?r:Number.parseFloat(String(r??""));return Number.isFinite(e)?e:0}function G(r){return Math.round(r*1000)/1000}function ye(r){if(Array.isArray(r)&&r.length===4&&r.every((t)=>Number.isFinite(Number(t))))return r.map(Number);let e=String(r??"").trim().split(/[\s,]+/).map(Number);if(e.length!==4||e.some((t)=>!Number.isFinite(t))||e[2]<=0||e[3]<=0)return null;return e}function Mt(r){let e=String(r??"").trim().split(/[\s,]+/).filter(Boolean).map(Number).filter(Number.isFinite);return e.length%2?e.slice(0,-1):e}var Xe=/[MLHVCSQTAZ]/i,ge=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Bt(r){let e=[],t=r,i=Xe.exec(t);while(i){let s=i.index;t=t.slice(s);let a=t[0];t=t.slice(1);let l=Xe.exec(t),d=l?t.slice(0,l.index):t,f;if(a==="A"||a==="a"){f=[];let h=0,v=d.trim(),y=0;while(y<v.length){let b=h%7,c=v.slice(y).replace(/^[\s,]+/,"");if(y=v.length-c.length,!c)break;if(b===3||b===4)f.push(c[0]==="1"?1:0),y+=1;else{ge.lastIndex=0;let m=ge.exec(c);if(!m||m.index!==0)break;f.push(Number.parseFloat(m[0])),y+=m[0].length}h++}}else f=(d.match(ge)||[]).map(Number.parseFloat);e.push({command:a,args:f}),i=l}return e}function Dt(r,e,t,i,s,a,l,d,f){if(r===d&&e===f)return[];let h=Math.abs(t),v=Math.abs(i);if(!h||!v)return[1,d,f];let y=s*Math.PI/180,b=Math.cos(y),c=Math.sin(y),m=(r-d)/2,u=(e-f)/2,p=b*m+c*u,S=-c*m+b*u,x=p*p/(h*h)+S*S/(v*v);if(x>1)h*=Math.sqrt(x),v*=Math.sqrt(x);let g=h*h*v*v-h*h*S*S-v*v*p*p,w=h*h*S*S+v*v*p*p,_=Math.sqrt(Math.max(0,g/w));if(a===l)_=-_;let R=_*(h*S)/v,V=_*-(v*p)/h,k=b*R-c*V+(r+d)/2,E=c*R+b*V+(e+f)/2,N=(O,L,F,Y)=>{let de=O*Y-L*F<0?-1:1,ue=(O*F+L*Y)/(Math.hypot(O,L)*Math.hypot(F,Y));return de*Math.acos(Math.min(1,Math.max(-1,ue)))},B=N(1,0,(p-R)/h,(S-V)/v),A=N((p-R)/h,(S-V)/v,(-p-R)/h,(-S-V)/v);if(!l&&A>0)A-=2*Math.PI;if(l&&A<0)A+=2*Math.PI;let T=Math.max(1,Math.ceil(Math.abs(A)/(Math.PI/2))),j=A/T,I=1.3333333333333333*Math.tan(j/4),D=[],H=(O)=>{let L=h*Math.cos(O),F=v*Math.sin(O);return[b*L-c*F+k,c*L+b*F+E]},U=(O)=>{let L=-h*Math.sin(O),F=v*Math.cos(O);return[b*L-c*F,c*L+b*F]},W=B;for(let O=0;O<T;O++){let L=W+j,[F,Y]=H(W),[de,ue]=U(W),[Oe,Be]=H(L),[Nt,kt]=U(L);D.push(2,F+I*de,Y+I*ue,Oe-I*Nt,Be-I*kt,O===T-1?d:Oe,O===T-1?f:Be),W=L}return D}function Lt(r){let e=[],t=0,i=0,s=0,a=0,l=0,d=0,f=0,h=0,v="";for(let{command:y,args:b}of Bt(String(r??""))){let c=y===y.toLowerCase(),m=y.toUpperCase(),u=()=>c?t:0,p=()=>c?i:0,S=0,x=(w)=>{if(S+w>b.length)return null;let _=b.slice(S,S+w);return S+=w,_};if(m==="Z"){e.push(4),t=s,i=a,v="Z";continue}let g=!0;while(S<b.length||g&&m==="Z"){switch(m){case"M":{let w=x(2);if(!w)return e;if(t=w[0]+u(),i=w[1]+p(),g)e.push(0,t,i),s=t,a=i;else e.push(1,t,i);v=g?"M":"L";break}case"L":{let w=x(2);if(!w)return e;t=w[0]+u(),i=w[1]+p(),e.push(1,t,i),v="L";break}case"H":{let w=x(1);if(!w)return e;t=w[0]+u(),e.push(1,t,i),v="L";break}case"V":{let w=x(1);if(!w)return e;i=w[0]+p(),e.push(1,t,i),v="L";break}case"C":{let w=x(6);if(!w)return e;let _=w[0]+u(),R=w[1]+p();l=w[2]+u(),d=w[3]+p(),t=w[4]+u(),i=w[5]+p(),e.push(2,_,R,l,d,t,i),v="C";break}case"S":{let w=x(4);if(!w)return e;let _=v==="C"?2*t-l:t,R=v==="C"?2*i-d:i;l=w[0]+u(),d=w[1]+p(),t=w[2]+u(),i=w[3]+p(),e.push(2,_,R,l,d,t,i),v="C";break}case"Q":{let w=x(4);if(!w)return e;f=w[0]+u(),h=w[1]+p(),t=w[2]+u(),i=w[3]+p(),e.push(3,f,h,t,i),v="Q";break}case"T":{let w=x(2);if(!w)return e;f=v==="Q"?2*t-f:t,h=v==="Q"?2*i-h:i,t=w[0]+u(),i=w[1]+p(),e.push(3,f,h,t,i),v="Q";break}case"A":{let w=x(7);if(!w)return e;let _=w[5]+u(),R=w[6]+p();e.push(...Dt(t,i,w[0],w[1],w[2],w[3],w[4],_,R)),t=_,i=R,v="A";break}default:return e}g=!1}}return e.map((y)=>G(y))}function ze(r,e,t,i){if(t<=0||i<=0)return[];let s=0.5522847498;return[0,r+t,e,2,r+t,e+s*i,r+s*t,e+i,r,e+i,2,r-s*t,e+i,r-t,e+s*i,r-t,e,2,r-t,e-s*i,r-s*t,e-i,r,e-i,2,r+s*t,e-i,r+t,e-s*i,r+t,e,4].map(G)}function be(r,e){switch(r){case"Path":return Lt(String(e.d??""));case"Line":return[0,M(e.x1),M(e.y1),1,M(e.x2),M(e.y2)].map(G);case"Rect":{let t=M(e.x),i=M(e.y),s=M(e.width),a=M(e.height);if(s<=0||a<=0)return[];let l=e.rx===void 0?M(e.ry):M(e.rx),d=e.ry===void 0?l:M(e.ry);if(l=Math.min(Math.max(0,l),s/2),d=Math.min(Math.max(0,d),a/2),!l||!d)return[0,t,i,1,t+s,i,1,t+s,i+a,1,t,i+a,4].map(G);let f=0.5522847498;return[0,t+l,i,1,t+s-l,i,2,t+s-l+f*l,i,t+s,i+d-f*d,t+s,i+d,1,t+s,i+a-d,2,t+s,i+a-d+f*d,t+s-l+f*l,i+a,t+s-l,i+a,1,t+l,i+a,2,t+l-f*l,i+a,t,i+a-d+f*d,t,i+a-d,1,t,i+d,2,t,i+d-f*d,t+l-f*l,i,t+l,i,4].map(G)}case"Circle":return ze(M(e.cx),M(e.cy),M(e.r),M(e.r));case"Ellipse":return ze(M(e.cx),M(e.cy),M(e.rx),M(e.ry));case"Polyline":case"Polygon":{let t=Mt(e.points);if(t.length<4)return[];let i=[0,t[0],t[1]];for(let s=2;s<t.length;s+=2)i.push(1,t[s],t[s+1]);if(r==="Polygon")i.push(4);return i.map(G)}default:return null}}var Vt=[...qe,"accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoComplete","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumDate","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumDate","minimumTrackTintColor","minimumValue","minuteInterval","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","passwordRules","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","textContentType","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize","initialRegion","tileOverlay","edgePadding","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","mapType","strokeColor","pinColor","showsCompass","showsScale","cameraPitch","cameraHeading","autoScrollBottom","scrollKey","pictureInPicture","transitionID"],Ge=new Set(["animating","autoCorrect","autoFocus","autoplay","autoPlay","bounces","controls","disabled","editable","hidesWhenStopped","horizontal","loop","multiline","muted","pagingEnabled","paused","refreshing","scrollEnabled","secureTextEntry","selectTextOnFocus","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","transparent","visible","fitToBounds","showsUserLocation","zoomEnabled","rotateEnabled","pitchEnabled","showsCompass","showsScale","pictureInPicture"]),$t=new Map(Vt.map((r)=>[Je(r),r]));function Je(r){return r.replace(/[-_]/g,"").toLowerCase()}function ve(r){return $t.get(Je(r))??r}var Ft={view:"View",sidebar:"Sidebar",splitview:"SplitView",textinput:"TextInput",pressable:"Pressable",icon:"Icon",text:"Text",button:"Button",image:"Image",img:"Image",video:"Video",map:"Map",mappolyline:"MapPolyline",mapmarker:"MapMarker",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",checkbox:"Checkbox",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function Ke(r){return Ft[r.toLowerCase()]||r}var jt={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox",armchair:"sofa","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette",backpack:"backpack","badge-check":"checkmark.seal","badge-x":"xmark.seal",ban:"nosign","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100","battery-charging":"battery.100.bolt",bed:"bed.double",bell:"bell","bell-off":"bell.slash","bell-ring":"bell.and.waves.left.and.right",bike:"figure.outdoor.cycle",blocks:"square.grid.2x2",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",box:"shippingbox",brain:"brain",building:"building","building-2":"building.2",cable:"cable.connector",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-minus":"calendar.badge.minus","calendar-minus-2":"calendar.badge.minus","calendar-off":"calendar.badge.exclamationmark","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath","calendar-x":"calendar.badge.exclamationmark","calendar-x-2":"calendar.badge.exclamationmark",camera:"camera","chart-bar":"chart.bar","chart-column":"chart.bar","chart-line":"chart.xyaxis.line","chart-no-axes-gantt":"chart.bar.doc.horizontal",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-arrow-out-up-left":"arrow.uturn.backward.circle","circle-minus":"minus.circle","circle-arrow-down":"arrow.down.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-dot":"smallcircle.filled.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock","clock-12":"clock","clock-2":"clock","clock-3":"clock","clock-4":"clock","clock-8":"clock",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",cylinder:"cylinder",disc:"opticaldisc",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal","hand-fist":"hand.raised",heart:"heart","heart-off":"heart.slash","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",hourglass:"hourglass",house:"house","id-card":"person.text.rectangle",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-dashboard":"rectangle.3.group","layout-grid":"square.grid.2x2",leaf:"leaf",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",megaphone:"megaphone",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note","music-2":"music.note",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","rectangle-horizontal":"rectangle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass","scan-line":"barcode.viewfinder",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart",shuffle:"shuffle","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",sprout:"leaf",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront","stretch-horizontal":"rectangle.split.1x2",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis","triangle-alert":"exclamationmark.triangle",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-check":"person.crop.circle.badge.checkmark","user-minus":"person.badge.minus","user-plus":"person.badge.plus","user-round":"person","user-round-check":"person.crop.circle.badge.checkmark","user-round-minus":"person.crop.circle.badge.minus","user-round-plus":"person.crop.circle.badge.plus","user-round-x":"person.crop.circle.badge.xmark","user-x":"person.crop.circle.badge.xmark",users:"person.2","users-round":"person.2",video:"video","volume-2":"speaker.wave.2",warehouse:"building.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function we(r,e=!1){let t=String(r??"").trim();if(!t)return{symbol:"circle",known:!1};if(e)return{symbol:t,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(t)??/^([a-z0-9]+):(.+)$/.exec(t),s=i?i[1]:"lucide",a=i?i[2]:t;if(s==="lucide"){let l=jt[a];if(l)return{symbol:l,iconify:`i-lucide-${a}`,known:!0};if(!i&&t.includes("."))return{symbol:t,known:!0}}return{symbol:"circle",iconify:i?t:`i-lucide-${a}`,known:!1}}var Qe=/^--[\w\u0080-\uFFFF-]+$/u;function Ye(r,e){if(!/var\(/i.test(r))return r;let t="",i="",s=!1;for(let a=0;a<r.length;a++){let l=r[a];if(l==="\\"){t+=r.slice(a,a+2),a++;continue}if(i){if(t+=l,l===i)i="";continue}if(l==='"'||l==="'"){i=l,t+=l;continue}if(r.slice(a,a+4).toLowerCase()!=="var("||a>0&&/[\w-]/.test(r[a-1])){t+=l;continue}let d=1,f=-1,h="",v=a+4;for(;v<r.length;v++){let c=r[v];if(c==="\\"){v++;continue}if(h){if(c===h)h="";continue}if(c==='"'||c==="'"){h=c;continue}if(c==="(")d++;if(c===")"&&--d===0)break;if(c===","&&d===1&&f===-1)f=v}if(d!==0)return;let y=r.slice(a+4,f===-1?v:f).trim();if(!Qe.test(y))return;let b=e(y,f===-1?void 0:r.slice(f+1,v).trim());if(b===void 0||t.length+b.length>65536)return;t+=b,s=!0,a=v}return s&&t.length>65536?void 0:t}function Q(r,e){let t=new Map,i=new Set;for(let[u,p]of r){let S=u.trim();if(!Qe.test(S))continue;if(typeof p==="string"||typeof p==="number"&&Number.isFinite(p))t.set(S,String(p).trim())}let s=new Map,a=new Set;for(let[u,p]of t){let S=new Set,x=(g,w=0)=>w>64?void 0:Ye(g,(_,R)=>(S.add(_),R===void 0?"":x(R,w+1)));if(x(p)===void 0)a.add(u);s.set(u,S)}let l=new Map,d=new Map,f=[],h=new Set,v=0;function y(u,p=0){if(p>64){a.add(u);return}l.set(u,v),d.set(u,v++),f.push(u),h.add(u);for(let g of s.get(u)??[]){if(!t.has(g))continue;if(!l.has(g)){if(y(g,p+1),d.has(g))d.set(u,Math.min(d.get(u),d.get(g)))}else if(h.has(g))d.set(u,Math.min(d.get(u),l.get(g)))}if(d.get(u)!==l.get(u))return;let S=[],x;do x=f.pop(),h.delete(x),S.push(x);while(x!==u);if(S.length>1||s.get(u)?.has(u))S.forEach((g)=>a.add(g))}for(let u of t.keys())if(!l.has(u))y(u);let b=new Map;function c(u,p){if(i.add(u),b.has(u))return b.get(u);let S=t.get(u),x=S===void 0||/^(?:inherit|unset)$/i.test(S)?e?.get(u):a.has(u)||/^(?:initial|revert|revert-layer)$/i.test(S)?void 0:m(S,p+1);return b.set(u,x),x}function m(u,p=0){if(p>64)return;return Ye(u,(S,x)=>c(S,p)??(x===void 0?void 0:m(x,p+1)))}return{resolve:m,used:i,computed(){let u=new Map(e);for(let p of t.keys())u.set(p,c(p,0));return u}}}var Ze=new Set(["display","gridColumns","gridTemplateColumns","gridTemplateRows","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","tintColor","transform","overflow","fill","stroke","strokeWidth","gradientDirection","gradientFrom","gradientVia","gradientTo"]),Wt=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing","strokeWidth"]),et=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),Xt=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,zt=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(px|rem|em)?$/i,Ht=new Set(["rotate","rotateX","rotateY","rotateZ","skewX","skewY"]),Ut=new Set(["perspective","scale","scaleX","scaleY","translateX","translateY"]);function qt(r){if(typeof r!=="string")return r;let e=zt.exec(r);return e?Number(e[1])*(/^r?em$/i.test(e[2]||"")?16:1):r}function J(r){return typeof r==="number"&&Number.isFinite(r)}function Gt(r,e){if(r==="shadowOffset"&&e&&typeof e==="object"&&!Array.isArray(e)){let{width:t,height:i}=e;return J(t)&&J(i)?{width:t,height:i}:void 0}if(r==="transform"&&Array.isArray(e)){let t=[];for(let i of e){if(!i||typeof i!=="object"||Array.isArray(i)||Object.keys(i).length!==1)return;let[s,a]=Object.entries(i)[0];if(Ut.has(s)&&J(a))t.push({[s]:a});else if(Ht.has(s)&&typeof a==="string"&&/^[+-]?(?:\d+\.?\d*|\.\d+)(?:deg|rad)$/.test(a))t.push({[s]:a});else return}return t}return}function Jt(r){let e=[],t=0,i=0,s="";for(let a=0;a<=r.length;a++){let l=r[a];if(l==="\\"){a++;continue}if(s){if(l===s)s="";continue}if(l==='"'||l==="'"){s=l;continue}if(l==="(")i++;if(l===")")i=Math.max(0,i-1);if(a!==r.length&&(l!==";"||i))continue;let d=r.slice(t,a),f=d.indexOf(":");if(f!==-1)e.push([d.slice(0,f).trim(),d.slice(f+1).trim()]);t=a+1}return e}function Kt(r,e){let t;if(typeof r==="string"){if(r=r.trim(),!r)return[];try{r=JSON.parse(r)}catch{}}if(typeof r==="string")t=Jt(r);else if(r&&typeof r==="object"&&!Array.isArray(r))t=Object.entries(r);else{if(r!=null&&r!==!1)e({kind:"non-numeric-style",name:"style"});return[]}return t}function tt(r,e=()=>{},t={}){let i=Kt(r,e),s=Q(i,t.inheritedVariables);return t.onVariables?.(s.computed()),Yt(i,s,e)}function Yt(r,e,t){let i={},s=[];for(let[a,l]of r){if(a.trim().startsWith("--")){s.push(a.trim());continue}let d=Ze.has(a)||a.trim().startsWith("--")?a:a.trim().toLowerCase().replace(/-([a-z])/g,(v,y)=>y.toUpperCase());if(!Ze.has(d)){t({kind:"unknown-style",name:d});continue}if(l==null||l==="")continue;let f=typeof l==="string"?e.resolve(l.trim()):l;if(f===void 0){t({kind:"non-numeric-style",name:d});continue}if(f==="")continue;let h;if(Wt.has(d)||et.has(d)){if(h=qt(f),!J(h)&&!(et.has(d)&&typeof h==="string"&&h.endsWith("%")&&Xt.test(h.slice(0,-1))&&Number.isFinite(Number(h.slice(0,-1)))))h=void 0}else if(d==="shadowOffset"||d==="transform")h=Gt(d,f);else if(d==="gridTemplateColumns"||d==="gridTemplateRows")h=J(f)||typeof f==="string"?f:void 0;else if(d==="fontWeight"&&J(f))h=String(f);else if(typeof f==="string")h=f;if(h===void 0)t({kind:"non-numeric-style",name:d});else i[d]=h}for(let a of s)if(!e.used.has(a))t({kind:"unknown-style",name:a});return i}import{generate as Z,parse as nt}from"@stacksjs/ts-css/parse";async function rt(r,e){let t={light:new Map,dark:new Map},i=new Set,s=(y)=>{if(!i.has(y))i.add(y),e(y)},a=(y,b,c)=>{for(let m of c){let u=t[m].get(y);if(!u||Number(b.important)>Number(u.important)||b.important===u.important&&b.specificity>=u.specificity)t[m].set(y,b)}},l=(y)=>{if(y.type==="Declaration")return y.property.startsWith("--");if(y.type==="Rule"||y.type==="Atrule")return!!y.block&&[...y.block.children].some(l);return!1},d=(y)=>{let b=y.replace(/\s+/g,"").toLowerCase();if(!b||b==="all"||b==="screen")return["light","dark"];let c=/^(?:screenand)?\(prefers-color-scheme:(light|dark)\)$/.exec(b);return c?[c[1]]:void 0};function f(y,b){for(let c of y){if(!l(c))continue;if(c.type==="Atrule"){let u=c.prelude?Z(c.prelude):"",p=c.name.toLowerCase()==="media"?d(u):void 0;if(!p){s(`@${c.name} ${u}`.trim());continue}f(c.block.children,b.filter((S)=>p.includes(S)));continue}if(c.type!=="Rule")continue;let m=c.prelude.type==="SelectorList"?[...c.prelude.children].map(Z):[Z(c.prelude)];for(let u of m){let p=/^(html|:root)?(?:\.(dark|light))?$/.exec(u.trim());if(!p||!p[1]&&!p[2]){s(u);continue}let S=(p[1]===":root"?10:p[1]?1:0)+(p[2]?10:0);for(let x of c.block.children){if(x.type!=="Declaration"){if(l(x))s(`nested rule in ${u}`);continue}if(!x.property.startsWith("--"))continue;let g={value:Z(x.value),important:!!x.important,specificity:S};a(x.property,g,b.filter((w)=>!p[2]||p[2]===w))}}}}let h="",v;return await new HTMLRewriter().on("html",{element(y){let b=y.getAttribute("style");if(!b)return;try{let c=nt(b,{context:"declarationList"});if(c.type!=="DeclarationList")return;for(let m of c.children)if(m.type==="Declaration"&&m.property.startsWith("--"))a(m.property,{value:Z(m.value),important:!!m.important,specificity:1000},["light","dark"])}catch{s("invalid document inline theme")}}}).on("style",{element(y){h="";let b=y.getAttribute("type");v=!b||b.toLowerCase()==="text/css"?d(y.getAttribute("media")??""):void 0,y.onEndTag(()=>{try{let c=nt(h);if(c.type!=="StyleSheet")return;if(!v){if([...c.children].some(l))s("style type/media");return}f(c.children,v)}catch{s("invalid stylesheet")}})},text(y){h+=y.text}}).transform(new Response(r)).text(),{light:[...t.light].map(([y,b])=>[y,b.value]),dark:[...t.dark].map(([y,b])=>[y,b.value])}}function ne(r){let e=r&&/^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(r.trim());if(!e)return;let t=Number(e[1])*(e[2]==="rem"?16:1);return Number.isFinite(t)?t:void 0}function Se(r,e){if(!He[r])return;return ne(e?.get(rr(r))??He[r].value)}function xe(r,e){let t=hn[r];if(!t)return;return ne(e?.get(At(t))??Rt[t]?.value)}function Ne(r,e){let t=yn[r];if(!t)return;let i=ne(e?.get(At(t.size))??Rt[t.size]?.value),s=ne(e?.get(At(t.leading))??Rt[t.leading]?.value);if(i===void 0||s===void 0)return;return{fontSize:i,lineHeight:s}}var Qt={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},at={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},it={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},st={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function K(r){let e=r.lastIndexOf("/");if(e>0&&!r.endsWith("]")){let i=K(r.slice(0,e)),s=r.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return Zt(i,a/100)}if(r==="transparent")return"transparent";if(r==="current")return"currentColor";if(r==="black")return"#000000";if(r==="white")return"#ffffff";let t=r.split("-");if(t.length===2){let[i,s]=t,a=Qt[i];if(a&&typeof a==="object")return a[s]}if(r.startsWith("[")&&r.endsWith("]")){let i=r.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function Zt(r,e){if(r==="transparent")return r;let t=r.startsWith("#")?r.slice(1):"";if(t.length===3)t=t.split("").map((s)=>s+s).join("");if(t.length===8)t=t.slice(0,6);if(t.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${t}${i.toString(16).padStart(2,"0")}`}function ke(r,e=16){if(!r.startsWith("[")||!r.endsWith("]"))return;let t=r.slice(1,-1),i=Number.parseFloat(t);if(!Number.isFinite(i))return;if(t.endsWith("rem"))return i*16;if(t.endsWith("em"))return i*e;return i}function C(r){if(r.startsWith("[")&&r.endsWith("]")){let e=r.slice(1,-1);if(e.endsWith("%"))return;let t=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(t)?t:void 0}return at[r]??xe(r)}function re(r){let e=/^\[(-?\d*\.?\d+)%\]$/.exec(r);if(e)return`${Number.parseFloat(e[1])}%`;return C(r)}var en={flex:(r,e)=>(e.display="flex",!0),hidden:(r,e)=>(e.display="none",!0),grid:(r,e)=>(e.display="grid",!0),"flex-row":(r,e)=>(e.flexDirection="row",!0),"flex-col":(r,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(r,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(r,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(r,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(r,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(r,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(r,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(r,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(r,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(r,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(r,e)=>(e.flexGrow=1,!0),"grow-0":(r,e)=>(e.flexGrow=0,!0),shrink:(r,e)=>(e.flexShrink=1,!0),"shrink-0":(r,e)=>(e.flexShrink=0,!0),"justify-start":(r,e)=>(e.justifyContent="flex-start",!0),"justify-center":(r,e)=>(e.justifyContent="center",!0),"justify-end":(r,e)=>(e.justifyContent="flex-end",!0),"justify-between":(r,e)=>(e.justifyContent="space-between",!0),"justify-around":(r,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(r,e)=>(e.justifyContent="space-evenly",!0),"items-start":(r,e)=>(e.alignItems="flex-start",!0),"items-center":(r,e)=>(e.alignItems="center",!0),"items-end":(r,e)=>(e.alignItems="flex-end",!0),"items-stretch":(r,e)=>(e.alignItems="stretch",!0),"items-baseline":(r,e)=>(e.alignItems="baseline",!0),"self-auto":(r,e)=>(e.alignSelf="auto",!0),"self-start":(r,e)=>(e.alignSelf="flex-start",!0),"self-center":(r,e)=>(e.alignSelf="center",!0),"self-end":(r,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(r,e)=>(e.alignSelf="stretch",!0),"self-baseline":(r,e)=>(e.alignSelf="baseline",!0),"min-w-0":(r,e)=>(e.minWidth=0,!0),"aspect-square":(r,e)=>(e.aspectRatio=1,!0),"inset-0":(r,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(r,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(r,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(r,e)=>(e.letterSpacing=0,!0),"tracking-wide":(r,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(r,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(r,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(r,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(r,e)=>(e.position="relative",!0),absolute:(r,e)=>(e.position="absolute",!0),"overflow-visible":(r,e)=>(e.overflow="visible",!0),"overflow-hidden":(r,e)=>(e.overflow="hidden",!0),"overflow-scroll":(r,e)=>(e.overflow="scroll",!0),"font-thin":(r,e)=>(e.fontWeight="100",!0),"font-extralight":(r,e)=>(e.fontWeight="200",!0),"font-light":(r,e)=>(e.fontWeight="300",!0),"font-normal":(r,e)=>(e.fontWeight="400",!0),"font-medium":(r,e)=>(e.fontWeight="500",!0),"font-semibold":(r,e)=>(e.fontWeight="600",!0),"font-bold":(r,e)=>(e.fontWeight="bold",!0),"font-extrabold":(r,e)=>(e.fontWeight="800",!0),"font-black":(r,e)=>(e.fontWeight="900",!0),italic:(r,e)=>(e.fontStyle="italic",!0),"not-italic":(r,e)=>(e.fontStyle="normal",!0),"text-left":(r,e)=>(e.textAlign="left",!0),"text-center":(r,e)=>(e.textAlign="center",!0),"text-right":(r,e)=>(e.textAlign="right",!0),"text-justify":(r,e)=>(e.textAlign="justify",!0),uppercase:(r,e)=>(e.textTransform="uppercase",!0),lowercase:(r,e)=>(e.textTransform="lowercase",!0),capitalize:(r,e)=>(e.textTransform="capitalize",!0),"normal-case":(r,e)=>(e.textTransform="none",!0),underline:(r,e)=>(e.textDecorationLine="underline",!0),"line-through":(r,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(r,e)=>(e.textDecorationLine="none",!0)};function tn(r,e){if(!r.startsWith("bg-"))return!1;let t=r.slice(3),i=K(t);if(i)return e.backgroundColor=i,!0;return!1}function nn(r,e){if(!r.startsWith("text-"))return!1;let t=r.slice(5),i=Ne(t);if(i)return Object.assign(e,i),!0;if(it[t])return e.fontSize=it[t],!0;if(t.startsWith("[")&&t.endsWith("]")){let a=t.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(a)){let l=a.endsWith("rem")||a.endsWith("em")?Number.parseFloat(a)*16:Number.parseFloat(a);if(Number.isFinite(l))return e.fontSize=l,!0}}let s=K(t);if(s)return e.color=s,!0;return!1}var rn=new Set(["t","tr","r","br","b","bl","l","tl"]);function sn(r,e){let t=/^bg-(?:gradient|linear)-to-([a-z]+)$/.exec(r);if(t&&rn.has(t[1]))return e.gradientDirection=`to-${t[1]}`,!0;let i=/^(from|via|to)-(.+)$/.exec(r);if(!i)return!1;let s=K(i[2]);if(!s)return!1;if(i[1]==="from")e.gradientFrom=s;else if(i[1]==="via")e.gradientVia=s;else e.gradientTo=s;return!0}function on(r,e){for(let t of["fill","stroke"]){let i=`${t}-`;if(!r.startsWith(i))continue;let s=r.slice(i.length);if(s==="none")return e[t]="none",!0;if(t==="stroke"&&/^\d+(?:\.\d+)?$/.test(s))return e.strokeWidth=Number.parseFloat(s),!0;if(t==="stroke"&&/^\[\d+(?:\.\d+)?(?:px)?\]$/.test(s))return e.strokeWidth=Number.parseFloat(s.slice(1)),!0;let a=K(s);if(a)return e[t]=a,!0}return!1}function an(r,e){if(r.startsWith("p-")){let t=C(r.slice(2));if(t!==void 0)return e.padding=t,!0}if(r.startsWith("px-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingHorizontal=t,!0}if(r.startsWith("py-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingVertical=t,!0}if(r.startsWith("pt-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingTop=t,!0}if(r.startsWith("pr-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingRight=t,!0}if(r.startsWith("pb-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingBottom=t,!0}if(r.startsWith("pl-")){let t=C(r.slice(3));if(t!==void 0)return e.paddingLeft=t,!0}return!1}function ct(r,e){if(/^-(?:m|mx|my|mt|mr|mb|ml)-/.test(r)){let t={};if(!ct(r.slice(1),t))return!1;let i=Object.entries(t);if(i.some(([,s])=>typeof s!=="number"))return!1;for(let[s,a]of i)e[s]=-a;return!0}if(r.startsWith("m-")){let t=C(r.slice(2));if(t!==void 0)return e.margin=t,!0}if(r.startsWith("mx-")){let t=C(r.slice(3));if(t!==void 0)return e.marginHorizontal=t,!0}if(r.startsWith("my-")){let t=C(r.slice(3));if(t!==void 0)return e.marginVertical=t,!0}if(r.startsWith("mt-")){let t=C(r.slice(3));if(t!==void 0)return e.marginTop=t,!0}if(r.startsWith("mr-")){let t=C(r.slice(3));if(t!==void 0)return e.marginRight=t,!0}if(r.startsWith("mb-")){let t=C(r.slice(3));if(t!==void 0)return e.marginBottom=t,!0}if(r.startsWith("ml-")){let t=C(r.slice(3));if(t!==void 0)return e.marginLeft=t,!0}return!1}function cn(r,e){if(!r.startsWith("w-"))return!1;let t=r.slice(2);if(t==="full")return e.width="100%",!0;if(t==="screen")return e.width="100%",!0;if(t==="auto")return e.width="auto",!0;if(t.includes("/")){let[s,a]=t.split("/"),l=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${l}%`,!0}let i=re(t);if(i!==void 0)return e.width=i,!0;return!1}function ln(r,e){if(!r.startsWith("h-"))return!1;let t=r.slice(2);if(t==="full")return e.height="100%",!0;if(t==="screen")return e.height="100%",!0;if(t==="auto")return e.height="auto",!0;let i=re(t);if(i!==void 0)return e.height=i,!0;return!1}function dn(r,e){if(r==="rounded")return e.borderRadius=st.DEFAULT,!0;if(!r.startsWith("rounded-"))return!1;let t=r.slice(8);if(t==="")return!1;let i=/^(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(t),s=st[i[2]]??Se(i[2])??ke(i[2]);if(s===void 0)return!1;let a={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],tl:["borderTopLeftRadius"],tr:["borderTopRightRadius"],bl:["borderBottomLeftRadius"],br:["borderBottomRightRadius"]};for(let l of i[1]?a[i[1]]:["borderRadius"])e[l]=s;return!0}function un(r,e){if(!r.startsWith("border"))return!1;if(r==="border")return e.borderWidth=1,!0;let t=r.match(/^border-(\d+)$/);if(t)return e.borderWidth=Number.parseInt(t[1]),!0;let i=r.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,l=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=l;break;case"r":e.borderRightWidth=l;break;case"b":e.borderBottomWidth=l;break;case"l":e.borderLeftWidth=l;break}return!0}return!1}function fn(r,e){if(!r.startsWith("border-"))return!1;let t=r.slice(7),i=K(t);if(i)return e.borderColor=i,!0;return!1}function pn(r,e){if(!r.startsWith("opacity-"))return!1;let t=Number.parseInt(r.slice(8));if(!Number.isNaN(t))return e.opacity=t/100,!0;return!1}function gn(r,e){if(r.startsWith("tracking-[")){let t=ke(r.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(t===void 0)return!1;return e.letterSpacing=t,!0}if(r.startsWith("leading-")){let t=r.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=t.startsWith("[")?/^\[[\d.]+\]$/.test(t)?Number.parseFloat(t.slice(1,-1))*i:ke(t,i):s[t]!==void 0?s[t]*i:at[t];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function bn(r,e){let t=/^grid-cols-(\d+)$/.exec(r);if(!t)return!1;return e.gridColumns=Number(t[1]),!0}function vn(r,e){if(!r.startsWith("size-"))return!1;let t=r.slice(5),i=t==="full"?"100%":re(t);if(i===void 0)return!1;return e.width=i,e.height=i,!0}var wn={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};function Sn(r,e){let t=/^(min|max)-(w|h)-(.+)$/.exec(r);if(!t)return!1;let[,i,s,a]=t,l=a==="full"||a==="screen"?"100%":a==="none"?void 0:s==="w"&&i==="max"&&wn[a]||re(a);if(l===void 0&&a!=="none")return!1;let d=`${i}${s==="w"?"Width":"Height"}`;if(l===void 0)delete e[d];else e[d]=l;return!0}function xn(r,e){let t=/^(-?)(top|right|bottom|left)-(.+)$/.exec(r);if(!t)return!1;let i=t[3]==="full"?"100%":C(t[3]);if(i===void 0)return!1;return e[t[2]]=typeof i==="number"&&t[1]?-i:i,!0}function Nn(r,e){let t=/^(-?)translate-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=t[3],s;if(i.startsWith("[")){let d=/^\[([+-]?(?:\d+\.?\d*|\.\d+))(px|rem|em)?\]$/.exec(i);if(!d)return!1;s=Number(d[1])*(d[2]?.endsWith("em")?16:1)}else s=C(i);if(s===void 0||!Number.isFinite(s))return!1;if(t[1])s=-s;let a=t[2]==="x"?"translateX":"translateY",l=a==="translateX"?{translateX:s}:{translateY:s};return e.transform=[...(e.transform??[]).filter((d)=>!(a in d)),l],!0}function kn(r,e){let t=/^space-(x|y)-(.+)$/.exec(r);if(!t)return!1;let i=C(t[2]);if(i===void 0)return!1;return e.gap=i,!0}function Tn(r,e){if(r.startsWith("gap-")){let t=C(r.slice(4));if(t!==void 0)return e.gap=t,!0}if(r.startsWith("gap-x-")){let t=C(r.slice(6));if(t!==void 0)return e.columnGap=t,!0}if(r.startsWith("gap-y-")){let t=C(r.slice(6));if(t!==void 0)return e.rowGap=t,!0}return!1}function Rn(r,e){let i={"shadow-none":[0,0,0,0],"shadow-xs":[1,1,0.05,1],"shadow-sm":[2,1,0.1,2],shadow:[3,2,0.12,3],"shadow-md":[6,4,0.15,4],"shadow-lg":[10,6,0.18,8],"shadow-xl":[16,10,0.2,12],"shadow-2xl":[24,16,0.25,18]}[r];if(!i)return!1;let[s,a,l,d]=i;return Object.assign(e,{shadowColor:"#000000",shadowOpacity:l,shadowRadius:s,shadowOffset:{width:0,height:a},elevation:d}),!0}function ie(r,e){let t=[],i=[],s=[],a=[],l=new Map;function d(c,m){let u=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(c),p=u&&nr[u[2]];if(p){let g=e?.get(mn(u[2]));return[`${u[1]}-${g===void 0?p[m]:`[${g}]`}${u[3]||""}`]}let S=/^rounded-(?:(tl|tr|bl|br|t|b|l|r)-)?(.+)$/.exec(c);if(S&&He[S[2]]){let g=Se(S[2],e);return g===void 0?void 0:[`rounded-${S[1]?`${S[1]}-`:""}[${g}px]`]}let x=c.startsWith("text-")?c.slice(5):"";if(yn[x]){let g=Ne(x,e);return g&&[`text-[${g.fontSize}px]`,`leading-[${g.lineHeight}px]`]}for(let g of Object.keys(hn)){if(!c.endsWith(`-${g}`))continue;let w=xe(g,e);return w===void 0?void 0:[`${c.slice(0,-g.length)}[${w}px]`]}return[c]}function f(c,m){if(!l.has(c))l.set(c,new Set);return l.get(c).add(m),c}for(let c of r.split(/\s+/).filter(Boolean))if(c.startsWith("dark:")){let m=d(c.slice(5),"dark");if(!m)a.push(c);else i.push(...m.map((u)=>f(u,c)))}else if(!c.includes(":")||c.startsWith("[")){let m=d(c,"light"),u=d(c,"dark");if(!m||!u){a.push(c);continue}if(t.push(...m.map((p)=>f(p,c))),u.join(" ")!==m.join(" "))s.push(...u.map((p)=>f(p,c)))}else a.push(c);let h=[],v=ot(t,h),y={style:v,unknown:h};if(i.length||s.length)y.dark=ot([...s,...i],h);if(v.transform&&y.dark?.transform){let c=new Set(y.dark.transform.flatMap((m)=>Object.keys(m)));y.dark.transform=[...v.transform.filter((m)=>!Object.keys(m).some((u)=>c.has(u))),...y.dark.transform]}for(let c of t){if(c==="truncate")y.numberOfLines=1;let m=/^line-clamp-(\d+)$/.exec(c);if(m)y.numberOfLines=Number(m[1]);if(!y.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(c))y.icon=c}let b=h.flatMap((c)=>[...l.get(c)??[c]]);return y.unknown=[...new Set([...b.filter((c)=>!/^line-clamp-\d+$/.test(c)),...a])],y}function ot(r,e){let t={},i=Array.isArray(r)?r:r.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=en[s];if(a){a("",t);continue}if(Rn(s,t))continue;if(sn(s,t))continue;if(tn(s,t))continue;if(on(s,t))continue;if(nn(s,t))continue;if(an(s,t))continue;if(ct(s,t))continue;if(cn(s,t))continue;if(ln(s,t))continue;if(dn(s,t))continue;if(un(s,t))continue;if(fn(s,t))continue;if(pn(s,t))continue;if(Tn(s,t))continue;if(gn(s,t))continue;if(vn(s,t))continue;if(Sn(s,t))continue;if(bn(s,t))continue;if(xn(s,t))continue;if(Nn(s,t))continue;if(kn(s,t))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return t}function z(r,e={},t={},i={},s=[]){return{type:r,props:e,style:t,events:i,children:s}}function lt(r,e,t={}){return{version:"1.0.0",root:r,script:e,meta:{source:t.source||"unknown",compiledAt:t.compiledAt||Date.now(),headwindConfig:t.headwindConfig}}}var dt=new Set(["script","style","head","meta","link","title","base","noscript"]),ut=new Set(["template","body","html","main","fragment"]),se=new Set,An=new Set(["onBlur","onChangeText","onDismiss","onEnd","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onMomentumScrollBegin","onMomentumScrollEnd","onPause","onPictureInPictureStart","onPictureInPictureStop","onPlay","onPress","onPressIn","onPressOut","onProgress","onRequestClose","onRegionChangeComplete","onRefresh","onScroll","onScrollBeginDrag","onScrollEndDrag","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),Te=new Set(["Sidebar","SplitView","View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","Video","Map","MapPolyline","MapMarker","FlatList","SectionList","Switch","Checkbox","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl",...me]),_n=new Map([["data","data"],["sections","sections"],["renderitem","renderItem"],["rendersectionheader","renderSectionHeader"],["keyextractor","keyExtractor"],["listrole","listRole"]]),ft=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),En={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function q(r){return r.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,t)=>{let i=En[t.toLowerCase()];if(i!==void 0)return i;if(t[0]==="#"){let s=t[1]==="x"||t[1]==="X"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function pt(r,e,t,i={}){let s=i.inheritedVariables,a={},l={},d={},f="",h={};for(let[b,c]of e){let m=b.toLowerCase();if(m==="class"||m==="classname"){f=f?`${f} ${c}`:c;continue}if(m==="style"){h={...h,...In(r,c,t,{...i,onVariables(S){s=S,i.onVariables?.(S)}})};continue}if(m.startsWith(":")||m.startsWith("x-")&&m!=="x-cloak"){d[m.startsWith(":")?m.slice(1):m.slice(2)]=q(c);continue}if(m==="x-cloak")continue;if(m.startsWith("@")||m.startsWith("v-on:")){let S=m.startsWith("@")?m.slice(1):m.slice(5),[x]=S.split("."),g=pe[x]??(x.startsWith("on")?x:"");if(!g||!An.has(g)){t.push({kind:"unread-event",tag:r,name:b});continue}l[g]=q(c);continue}if(m==="key"){a.key=c;continue}let u=q(c),p=ve(b);if(u===""&&Ge.has(p)){a[p]=!0;continue}try{a[p]=JSON.parse(u)}catch{a[p]=u}}let v=f?ie(f,s):void 0;for(let b of new Set(v?.unknown??[]))t.push({kind:"unknown-class",tag:r,name:b});let y={...v?.style,...h};return{props:a,style:y,events:l,bindings:d,classes:f,inline:h}}function In(r,e,t,i){return tt(q(e),(s)=>t.push({...s,tag:r}),i)}function Re(r){return r.children.map((e)=>typeof e==="string"?e:Re(e)).join("").replace(/\s+/g," ").trim()}function Pn(r,e){let t=r.node,i=t.children.filter((a)=>typeof a!=="string"),s=t.children.filter((a)=>typeof a==="string").join("").trim();if(r.tag==="button"&&t.type==="Button"&&!r.declaredNative&&i.length>0)return t.type="Pressable",t.props.accessibilityRole??=t.props.role??"button",t.children=t.children.flatMap((a)=>typeof a==="string"?a.trim()?[z("Text",{},{},{},[a.trim()])]:[]:[a]),t;if(t.type==="Button"&&i.length===0)return t.children=s?[s]:[],t;if(t.type==="Svg"||t.type==="G")return t.children=i,t;if(t.type==="SvgText"){let a=Re(t);return t.children=a?[a]:[],t}if(ft.has(t.type)&&i.length===0&&s)return t.type="Text",t.children=[s],t;if(t.type==="Text"&&!s&&i.length===0&&typeof t.props.text==="string")return t.children=t.props.text?[t.props.text]:[],delete t.props.text,t;if(t.type==="Text"&&i.length>0){if(i.some((l)=>l.type!=="Text"))return t.type="View",t.children=t.children.map((l)=>typeof l==="string"?z("Text",{},{},{},[l]):l),t;let a=Re(t);return e.push({kind:"flattened-text",tag:r.tag}),t.children=a?[a]:[],t}if(ft.has(t.type)&&i.length>0)t.children=i;return t}async function Cn(r,e={}){let t=[],i=await rt(r,(c)=>t.push({kind:"unsupported-theme-rule",tag:"style",name:c})),s=Q(i.light).computed(),a=[],l=[],d=new Set;function f(c){let m=l[l.length-1];if(!m)a.push(c);else if(!m.dropped)m.node.children.push(c)}function h(c){let m=(p)=>{if(c.tag!=="html"&&c.node._styleSource)p._styleAncestors=[c.node._styleSource,...p._styleAncestors??[]]};if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let p=c.node.children,S=p.filter((g)=>typeof g!=="string"),x=S.length===1&&S.length===p.length?S[0]:z("View",{},{},{},p);if(x.bindings={...c.node.bindings,...x.bindings},x.bindingId===void 0&&c.node.bindingId!==void 0)x.bindingId=c.node.bindingId;m(x),f(x);return}let u=l[l.length-1];for(let p of c.node.children){if(typeof p==="string"){if(u&&!u.dropped)u.node.children.push(p);continue}if(m(p),!u)a.push(p);else if(!u.dropped)u.node.children.push(p)}}function v(c,m){let u=l[l.length-1];if(c==="svg"||u?.svg)return y(c,m,u);let p=dt.has(c)&&!se.has(c),S=l[l.length-1]?.dropped??!1,x=u?.variables??s,{props:g,style:w,events:_,bindings:R,classes:V,inline:k}=p||S?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:pt(c,m,t,{inheritedVariables:x,onVariables:(T)=>{x=T}});if(c==="html")x=s;let E=g["data-native"],N;if(typeof E==="string"&&Te.has(E))N=E,delete g["data-native"];else if(N=se.has(c)?"View":Ke(c),c==="input"){let T=String(g.type??"text").toLowerCase();if(T==="checkbox")N="Checkbox",g.formValue=g.value??"on",g.checked=g.checked===""||g.checked===!0||g.checked==="true",g.value=g.checked;else if(T==="hidden")N="View",w.display="none",k.display="none";else if(T==="radio")N="View",g.accessibilityRole="radio",t.push({kind:"unsupported-control",tag:c,name:"input:radio"})}if(N===c&&!Te.has(N)&&!dt.has(c)&&!ut.has(c)&&!d.has(c))d.add(c),t.push({kind:"unmapped-tag",tag:c});if((p||se.has(c))&&!d.has(`drop:${c}`))d.add(`drop:${c}`),t.push({kind:"dropped-subtree",tag:c});if(c==="form")g["data-stx-form"]=!0;if(c==="button"&&g.type===void 0)g.type="submit";if(N==="Video"&&g.source===void 0&&g.src!==void 0)g.source=g.src,delete g.src;if(N==="Icon"){let T=ie(V).icon,j=we(String(g.symbol||g.name||T||""),Boolean(g.symbol));if(g.symbol=j.symbol,j.iconify)g.iconify=j.iconify}if(N==="FlatList"||N==="SectionList"){let T=new Set([...Object.keys(g),...Object.keys(R)].map((j)=>j.toLowerCase()));for(let[j,I]of _n)if(T.has(j))t.push({kind:"unsupported-list-prop",tag:N,name:I})}We(g);let B=z(N,g,w,_);B._inlineStyle=k,B._styleSource=q(m.find(([T])=>T==="style")?.[1]??"");let A=g["data-stx-b"];if(typeof A==="number"&&Number.isInteger(A))B.bindingId=A;if(delete g["data-stx-b"],V)B._classes=V;if(Object.keys(R).length>0)B.bindings=R;if(typeof g.key==="string")B.key=g.key,delete g.key;return{tag:c,node:B,variables:x,declaredNative:typeof E==="string"&&Te.has(E),dropped:p||S||se.has(c),discard:p||S,unwrap:ut.has(c)}}function y(c,m,u){let p=u?.dropped??!1,S=he[c];if(p||!S){if(!p&&!d.has(`drop:${c}`))d.add(`drop:${c}`),t.push({kind:Ue.has(c)?"dropped-subtree":"unmapped-tag",tag:c});return{tag:c,node:z("G",{},{},{}),svg:!0,dropped:!0,discard:!0,unwrap:!1}}let x=u?.variables??s,{props:g,style:w,events:_,bindings:R,classes:V,inline:k}=pt(c,m,t,{inheritedVariables:x,onVariables:(A)=>{x=A}});if(S==="Svg"){let A=ye(g.viewBox);if(A)g.viewBox=A;else delete g.viewBox;for(let T of["width","height"]){if(typeof g[T]==="number"&&w[T]===void 0)w[T]=g[T];delete g[T]}}if(typeof g.strokeDasharray==="string"||typeof g.strokeDasharray==="number"){let A=String(g.strokeDasharray).split(/[\s,]+/).map(Number).filter(Number.isFinite);g.strokeDasharray=A}let E=be(S,g);if(E)g.geometry=E;let N=z(S,g,w,_);N._inlineStyle=k,N._styleSource=q(m.find(([A])=>A==="style")?.[1]??"");let B=g["data-stx-b"];if(typeof B==="number"&&Number.isInteger(B))N.bindingId=B;if(delete g["data-stx-b"],V)N._classes=V;if(Object.keys(R).length>0)N.bindings=R;if(typeof g.key==="string")N.key=g.key,delete g.key;return{tag:c,node:N,variables:x,svg:!0,dropped:!1,discard:!1,unwrap:!1}}if(await new HTMLRewriter().on("*",{element(c){let m=c.tagName.toLowerCase(),u=v(m,[...c.attributes]),p=!0;try{c.onEndTag(()=>{if(l.pop(),u.discard)return;if(u.unwrap)h(u);else f(Pn(u,t))})}catch{p=!1}if(p)l.push(u);else if(!u.discard)f(u.node)},text(c){let m=l[l.length-1];if(!m||m.dropped)return;let u=q(c.text).replace(/\s+/g," ");if(!u.trim())return;m.node.children.push(u)}}).transform(new Response(r)).text(),a.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);let b=a.length===1?a[0]:z("View",{},{},{},a);if(i.light.length||i.dark.length)b._stylesheetTheme=i;return{root:b,diagnostics:t}}async function gt(r,e={}){let{root:t,diagnostics:i}=await Cn(r,e),s=e.script??{exports:{},functions:[],code:""};return{document:lt(t,s,{source:e.source??"unknown"}),diagnostics:i}}var ht=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,On=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Mn=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,mt=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function Ae(r){let e=[];ht.lastIndex=0;for(let a of r.matchAll(ht)){let l=a[1]??"";if(/\bserver\b/.test(l))continue;e.push(a[2].trim())}let t=e.filter(Boolean).join(`
|
|
3
3
|
|
|
4
4
|
`),i=[];for(let a of[On,Mn]){a.lastIndex=0;for(let l of t.matchAll(a))if(!i.includes(l[1]))i.push(l[1])}let s={};mt.lastIndex=0;for(let a of t.matchAll(mt)){let l=a[2];try{s[a[1]]=JSON.parse(l.replace(/^'(.*)'$/,'"$1"'))}catch{s[a[1]]=l}}return{exports:s,functions:i,code:t}}var oe=/<script\b([^>]*\bdata-stx-scoped\b[^>]*)>([\s\S]*?)<\/script>/gi,yt=/function\s+(__stx_setup_[\w$]+)\s*\(/,Bn=/\bdata-stx-owner\s*=\s*["']([^"']+)["']/i;function _e(r){oe.lastIndex=0;for(let e of r.matchAll(oe)){let t=e[2].trim(),i=yt.exec(t)?.[1];if(i)return{name:i,code:t}}return null}function bt(r){let e=[];oe.lastIndex=0;for(let t of r.matchAll(oe)){let i=t[1],s=t[2].trim(),a=Bn.exec(i)?.[1],l=/\bdata-stx-component-factories\b/i.test(i);if(!s||!a&&!l&&!yt.test(s))continue;e.push(a?{code:s,owner:a}:{code:s})}return e}function Ln(){let r=[ee.join(import.meta.dir,"..","primitives"),ee.join(import.meta.dir,"native","primitives")];for(let e of r)if(Dn(ee.join(e,"View.stx")))return e;return r[0]}async function Vn(r,e,t={}){let i=t.root??ee.dirname(e),s=await o(i),a={root:i,componentsDir:t.componentsDir??s.componentsDir??ee.join(i,"components"),buildMode:"serve",cache:!1,_targetComponentDirs:[Ln()],_targetComponentFallbackNames:["Button"],_nativeHostAttrs:!0,_pluginComponentDirs:s._pluginComponentDirs??[]},l={...t.context??{},__stx_inject_css:!1},d=new Set([e]),f=await n(r,l,e,a,d),{html:h,manifest:v}=Le(f),{document:y,diagnostics:b}=await gt(h,{source:e,script:Ae(r)}),c=_e(h),m=bt(h);if(Ae(r).code.trim()){let u=await ar(r,e,t.context,{forceClientSetup:!0}),p=_e(u.setupCode??"");if(c=p??c,p&&!m.some((S)=>S.code===p.code))m.push({code:p.code})}return{document:y,manifest:v,setup:c,scripts:m,diagnostics:b,html:h,dependencies:[...d]}}async function ae(r,e={}){return Vn(await Bun.file(r).text(),r,e)}var te="__app";var ce="__runtime",jn="__messages";function Ee(r){let t=[P.join(import.meta.dir,"..","runtime",`${r}.ts`),P.join(import.meta.dir,"..","runtime",`${r}.js`),P.join(import.meta.dir,"native","runtime",`${r}.js`)].find((i)=>Pe(i));if(!t)throw Error(`Native runtime module ${r} is missing`);return t}async function Ie(r,e,t,i,s){let a={name:"stx-screen-inputs",setup(d){d.onLoad({filter:/.*/,namespace:"file"},({path:f})=>{i.add(f);let h=s?.get(f);return h===void 0?void 0:{contents:h,loader:"js"}})}},l=await Bun.build({entrypoints:[r],target:"browser",format:"iife",minify:t,plugins:[a,...e],define:{"process.env.NODE_ENV":JSON.stringify(t?"production":"development")}});if(!l.success){let d=l.logs.map((f)=>String(f.message??f)).join(`
|
|
5
5
|
`);throw Error(`Could not bundle ${r}:
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import"./chunk-qhr1tkhj.js";import"./chunk-v8ze2q95.js";import"./chunk-pxw4edw8.js";import"./chunk-c6egfhy6.js";import"./chunk-mmbspaqh.js";import{G}from"./chunk-3qmx12d3.js";import"./chunk-03xsf9jm.js";import"./chunk-91pdg853.js";import"./chunk-k1szsenr.js";import"./chunk-45x4myqe.js";import"./chunk-82bttwqm.js";import"./chunk-k71e38fk.js";import"./chunk-e556dvy4.js";import"./chunk-awgvt956.js";import"./chunk-7xw1e8t6.js";import"./chunk-048eyjyj.js";import"./chunk-bfbmdjh4.js";import"./chunk-haag5n42.js";import"./chunk-m7ddgrsm.js";import"./chunk-076h7nb9.js";import"./chunk-8s7zbhdd.js";import"./chunk-d0tmc6v5.js";import"./chunk-j7kcjgxy.js";import"./chunk-hsy9rhct.js";import"./chunk-hz11wmx9.js";import"./chunk-kfhghjh6.js";import"./chunk-4h58as2c.js";import"./chunk-751b5zv9.js";import"./chunk-y09g63k0.js";import"./chunk-yhhfxx17.js";import"./chunk-ww28zfwt.js";import"./chunk-wkrf41se.js";import"./chunk-h7atbtds.js";import"./chunk-q1cvef6b.js";import"./chunk-axz1x4r9.js";import"./chunk-3y5tzxm6.js";import{vt,wt}from"./chunk-cqr5cv7h.js";import"./chunk-mnnxa3r7.js";import"./chunk-cy07dhqh.js";import"./chunk-bsy10tz6.js";import"./chunk-htcptqtn.js";import"./chunk-33q5zka4.js";import"./chunk-6hgngmn0.js";import"./chunk-tnafnb23.js";import"./chunk-a30mtx17.js";import"./chunk-jtx74677.js";import{lo,uo,po,fo,Ir,go,mo,ho,Or,Dr,jn,Bn,Fn}from"./chunk-b217d16p.js";import"./chunk-6cg03r93.js";import"./chunk-zrw1zf54.js";import{Di}from"./chunk-w24qmxc3.js";import{d}from"./chunk-yn2d8x8m.js";import{spawn as R}from"child_process";import S from"fs";import f from"path";import s from"process";import{CLI as W}from"@stacksjs/clapp";var j="0.2.
|
|
3
|
+
import"./chunk-qhr1tkhj.js";import"./chunk-v8ze2q95.js";import"./chunk-pxw4edw8.js";import"./chunk-c6egfhy6.js";import"./chunk-mmbspaqh.js";import{G}from"./chunk-3qmx12d3.js";import"./chunk-03xsf9jm.js";import"./chunk-91pdg853.js";import"./chunk-k1szsenr.js";import"./chunk-45x4myqe.js";import"./chunk-82bttwqm.js";import"./chunk-k71e38fk.js";import"./chunk-e556dvy4.js";import"./chunk-awgvt956.js";import"./chunk-7xw1e8t6.js";import"./chunk-048eyjyj.js";import"./chunk-bfbmdjh4.js";import"./chunk-haag5n42.js";import"./chunk-m7ddgrsm.js";import"./chunk-076h7nb9.js";import"./chunk-8s7zbhdd.js";import"./chunk-d0tmc6v5.js";import"./chunk-j7kcjgxy.js";import"./chunk-hsy9rhct.js";import"./chunk-hz11wmx9.js";import"./chunk-kfhghjh6.js";import"./chunk-4h58as2c.js";import"./chunk-751b5zv9.js";import"./chunk-y09g63k0.js";import"./chunk-yhhfxx17.js";import"./chunk-ww28zfwt.js";import"./chunk-wkrf41se.js";import"./chunk-h7atbtds.js";import"./chunk-q1cvef6b.js";import"./chunk-axz1x4r9.js";import"./chunk-3y5tzxm6.js";import{vt,wt}from"./chunk-cqr5cv7h.js";import"./chunk-mnnxa3r7.js";import"./chunk-cy07dhqh.js";import"./chunk-bsy10tz6.js";import"./chunk-htcptqtn.js";import"./chunk-33q5zka4.js";import"./chunk-6hgngmn0.js";import"./chunk-tnafnb23.js";import"./chunk-a30mtx17.js";import"./chunk-jtx74677.js";import{lo,uo,po,fo,Ir,go,mo,ho,Or,Dr,jn,Bn,Fn}from"./chunk-b217d16p.js";import"./chunk-6cg03r93.js";import"./chunk-zrw1zf54.js";import{Di}from"./chunk-w24qmxc3.js";import{d}from"./chunk-yn2d8x8m.js";import{spawn as R}from"child_process";import S from"fs";import f from"path";import s from"process";import{CLI as W}from"@stacksjs/clapp";var j="0.2.586";var __dirname="/home/runner/work/stx/stx/packages/stx/bin",y=new W("stx");function B(h){let p=typeof h==="string"?Number.parseInt(h,10):h;if(Number.isNaN(p))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(p<1024||p>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function A(h){try{if(!S.existsSync(h)){let x=f.dirname(h),t=f.basename(h);if(S.existsSync(x)){let o=S.readdirSync(x).filter((n)=>n.toLowerCase().includes(t.toLowerCase().substring(0,3))||n.endsWith(".stx")||n.endsWith(".md")),i=o.length>0?`File not found. Similar files in ${x}: ${o.slice(0,3).join(", ")}`:`File not found. Directory ${x} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${h}`,suggestion:i}}return{isValid:!1,error:`File does not exist: ${h}`,suggestion:"Check the file path and try again"}}if(S.statSync(h).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${h}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(p){return{isValid:!1,error:`Cannot access file: ${h}`,suggestion:"Check file permissions and path"}}}function z(h){let p=typeof h==="string"?Number.parseInt(h,10):h;if(Number.isNaN(p))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(p<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(p>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var O=(h)=>h.includes("*")||h.includes("?")||h.includes("{")||h.includes("["),V=(h)=>h.endsWith(".stx")||h.endsWith(".md");function F(h,p=1){if(console.error(`\u274C ${h.error}`),h.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${h.suggestion}`);s.exit(p)}function U(h){if(!h)return;let p;try{p=JSON.parse(h)}catch(x){console.error(`\u274C --info-plist is not valid JSON: ${x.message}`),s.exit(1)}if(typeof p!=="object"||p===null||Array.isArray(p))console.error(`\u274C --info-plist must be a JSON object, e.g. '{"NSFocusStatusUsageDescription":"\u2026"}'`),s.exit(1);for(let[x,t]of Object.entries(p))if(typeof t!=="string"&&typeof t!=="number"&&typeof t!=="boolean")console.error(`\u274C --info-plist value for "${x}" must be a string, number or boolean`),s.exit(1);return p}async function H(h,p){try{let x=["test"],t=[];if(h&&h.length>0)for(let c of h)if(O(c))try{let r=await Array.fromAsync(new Bun.Glob(c).scan({onlyFiles:!0,absolute:!0}));if(r.length===0)console.warn(`Warning: No files found matching pattern: ${c}`);else if(t.push(...r),p.verbose)console.log(`Found ${r.length} file(s) matching pattern: ${c}`)}catch(r){return console.error(`Error expanding glob pattern ${c}:`,r),!1}else t.push(c);if(t.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(x.push(...t),p.filter)x.push("--pattern",p.filter);if(p.timeout)x.push("--timeout",p.timeout.toString());if(p.reporter&&p.reporter!=="default")if(p.reporter==="junit"){let c=f.resolve("stx-test-report.xml");x.push("--reporter",p.reporter),x.push("--reporter-outfile",c),console.log(`JUnit report: ${c}`)}else console.warn(`Warning: Reporter '${p.reporter}' is not supported. Using default reporter.`);if(p.coverage)x.push("--coverage");if(p.watch)x.push("--watch");x.push("--preload",f.join(__dirname,"../../../test-utils/happy-dom.ts"));let e={...s.env,STX_TEST_MODE:"true",STX_TEST_UI:p.ui?"true":"false",STX_TEST_VERBOSE:p.verbose?"true":"false"},o="bun";if(p.verbose)console.log(`Running: ${o} ${x.join(" ")}`);let i=performance.now(),n=R(o,x,{stdio:"inherit",shell:!1,env:e});return new Promise((c)=>{n.on("close",(r)=>{let u=((performance.now()-i)/1000).toFixed(2);if(r===0)c(!0);else c(!1)}),s.on("SIGINT",()=>{console.log(`
|
|
4
4
|
Test run interrupted`),n.kill("SIGINT"),s.exit(1)})})}catch(x){return console.error("Error running tests:",x instanceof Error?x.message:String(x)),!1}}var L=s.argv.length>=3&&(V(s.argv[2])&&S.existsSync(s.argv[2])||O(s.argv[2]));if(L){let h=s.argv[2],p={port:3000,watch:!0,cache:!0,markdown:{syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0}}};for(let x=3;x<s.argv.length;x++){let t=s.argv[x];if(t==="--port"&&x+1<s.argv.length){let e=B(s.argv[++x]);if(!e.isValid)F(e);p.port=Number.parseInt(s.argv[x],10)}else if(t==="--no-watch")p.watch=!1;else if(t==="--highlight-theme"&&x+1<s.argv.length){if(!p.markdown)p.markdown={};if(!p.markdown.syntaxHighlighting)p.markdown.syntaxHighlighting={};p.markdown.syntaxHighlighting.defaultTheme=s.argv[++x]}else if(t==="--no-highlight"){if(!p.markdown)p.markdown={};if(!p.markdown.syntaxHighlighting)p.markdown.syntaxHighlighting={};p.markdown.syntaxHighlighting.enabled=!1}else if(t==="--no-highlight-unknown"){if(!p.markdown)p.markdown={};if(!p.markdown.syntaxHighlighting)p.markdown.syntaxHighlighting={};p.markdown.syntaxHighlighting.highlightUnknownLanguages=!1}else if(t==="--no-cache")p.cache=!1;else if(t==="--native")p.native=!0}if(O(h))try{let x=await Array.fromAsync(new Bun.Glob(h).scan({onlyFiles:!0,absolute:!0})),t=h.endsWith(".stx")?x.filter((n)=>n.endsWith(".stx")):h.endsWith(".md")?x.filter((n)=>n.endsWith(".md")):x.filter((n)=>n.endsWith(".stx")||n.endsWith(".md")),e=h.split("*")[0].replace(/\/$/,"")||".",o=f.resolve(e);try{let n=new Bun.Glob("**/*.stx"),r=(await Array.fromAsync(n.scan({cwd:o,onlyFiles:!0,absolute:!0}))).filter((l)=>/\[.+\]/.test(f.basename(l)));for(let l of r)if(!t.includes(l))t.push(l)}catch{}if(t.length===0)console.error(`Error: No STX or Markdown files found matching pattern: ${h}`),s.exit(1);if(!await Bn(t,p))s.exit(1)}catch(x){console.error("Failed to process files:",x),s.exit(1)}else jn(h,p).catch((x)=>{console.error("Failed to start dev server:",x),s.exit(1)})}else{let h=function(t,e){let o=[];for(let i=0;i<=e.length;i++)o[i]=[i];for(let i=0;i<=t.length;i++)o[0][i]=i;for(let i=1;i<=e.length;i++)for(let n=1;n<=t.length;n++)if(e.charAt(i-1)===t.charAt(n-1))o[i][n]=o[i-1][n-1];else o[i][n]=Math.min(o[i-1][n-1]+1,o[i][n-1]+1,o[i-1][n]+1);return o[e.length][t.length]};y.command("docs","Generate documentation for components, templates, and directives").option("--output <dir>","Output directory for documentation",{default:"docs"}).option("--format <format>","Documentation format (markdown, html, json)",{default:"markdown"}).option("--components-dir <dir>","Components directory",{default:"components"}).option("--templates-dir <dir>","Templates directory",{default:"."}).option("--no-components","Disable components documentation").option("--no-templates","Disable templates documentation").option("--no-directives","Disable directives documentation").option("--extra-content <content>","Extra content to include in documentation").example("stx docs --output docs --format html").action(async(t)=>{try{if(await fo(t))console.log("Documentation generated successfully."),s.exit(0);else console.error("Documentation generation failed."),s.exit(1)}catch(e){console.error("Error generating documentation:",e),s.exit(1)}}),y.command("iconify <command>","Generate Iconify icon packages").option("--output <dir>","Output directory for generated packages",{default:"packages"}).option("--icons <icons>","Comma-separated list of specific icons to generate").example("stx iconify list").example("stx iconify generate mdi").example("stx iconify generate lucide --icons home,settings,user").action(async(t,e)=>{try{let{fetchCollections:o,generatePackage:i}=await import("./chunk-ktvr45qg.js");if(t==="list"){console.log(`
|
|
5
5
|
\uD83D\uDCDA Fetching available icon collections...
|
|
6
6
|
`);let n=await o(),c=Object.entries(n).sort((r,l)=>l[1].total-r[1].total);console.log(`Available collections:
|
|
@@ -164,7 +164,7 @@ Press Ctrl+C to stop watching...
|
|
|
164
164
|
\uD83D\uDD28 Building native app...`),console.log(` Input: ${t}`),console.log(` Target: ${l}`),console.log(` Format: ${e.format||"default"}`),console.log(` Output: ${e.output}
|
|
165
165
|
`);let a=await o({input:c,output:f.resolve(e.output),target:l,format:e.format,name:e.name,version:e.version,description:e.description,author:e.author,bundleId:e.bundleId,icon:e.icon?f.resolve(e.icon):void 0,window:{title:e.title,width:Number.parseInt(e.width,10),height:Number.parseInt(e.height,10),frameless:e.frameless,alwaysOnTop:e.alwaysOnTop},systemTray:e.systemTray,menubarOnly:e.menubarOnly,category:e.category,copyright:e.copyright,minimumSystemVersion:e.minSystemVersion,infoPlist:U(e.infoPlist),devTools:e.devTools,craftPath:e.craftPath,verbose:e.verbose});if(a.success){if(console.log("\u2705 Build successful!"),console.log(` Output: ${a.outputPath}`),a.duration)console.log(` Duration: ${(a.duration/1000).toFixed(2)}s`);if(l==="macos"&&a.format==="app")console.log(`
|
|
166
166
|
\uD83D\uDCA1 To run: open "${a.outputPath}"`);else if(l==="linux"&&a.format==="appimage")console.log(`
|
|
167
|
-
\uD83D\uDCA1 To run: chmod +x "${a.outputPath}" && "${a.outputPath}"`)}else console.error(`\u274C Build failed: ${a.error}`),s.exit(1)}catch(o){console.error(`\u274C Build error: ${o.message}`),s.exit(1)}}),y.command("story","Start component showcase and testing server").option("-p, --port <port>","Server port",{default:"6006"}).option("-o, --open","Open browser automatically",{default:!1}).option("--host <host>","Host to bind to",{default:"localhost"}).example("stx story").example("stx story --port 3000 --open").action(async(t)=>{try{let{devCommand:e}=await import("./chunk-s2h601k7.js");await e({port:t.port?Number.parseInt(t.port,10):6006,open:t.open,host:t.host})}catch(e){console.error(`\u274C Story error: ${e.message}`),s.exit(1)}}),y.command("story:build","Build static story site").option("-o, --outDir <dir>","Output directory",{default:".stx/dist/story"}).example("stx story:build").example("stx story:build --outDir ./docs/components").action(async(t)=>{try{let{buildCommand:e}=await import("./chunk-03qf2z4d.js");await e({outDir:t.outDir})}catch(e){console.error(`\u274C Story build error: ${e.message}`),s.exit(1)}}),y.command("story:test","Run visual regression tests").option("-u, --update","Update snapshots",{default:!1}).option("-f, --filter <name>","Filter components by name").example("stx story:test").example("stx story:test --update").example("stx story:test --filter Button").action(async(t)=>{try{let{createContext:e}=await import("./chunk-qd4snptd.js"),{runVisualTests:o,updateSnapshots:i,formatTestResults:n}=await import("./chunk-fkq55rh7.js"),c=await e({mode:"build"});if(t.update){let r=await i(c,{filter:t.filter?[t.filter]:void 0});console.log(`Updated ${r} snapshots`)}else{let r=await o(c,{filter:t.filter?[t.filter]:void 0});if(console.log(n(r)),r.failed>0)s.exit(1)}}catch(e){console.error(`\u274C Story test error: ${e.message}`),s.exit(1)}}),y.command("native <action> [file]","Compile .stx screens into the JavaScriptCore bundle Craft renders natively").option("--format <format>","bundle (the JavaScriptCore bundle) or ir (the template as JSON)",{default:"ir"}).option("--output <path>","Write to this file instead of stdout").option("--minify","Minify the bundle",{default:!1}).option("--config <file>","Screens config (default: native.config.json in the working directory)").example("stx native compile Screen.stx --format bundle --output native-screen.js").example("stx native compile --format bundle --output native-screen.js --minify").example("stx native compile Screen.stx").action(async(t,e,o)=>{if(t!=="compile")console.error(`Unknown native command: ${t}`),console.error("Usage: stx native compile [file.stx] --format bundle|ir [--output <file>] [--minify] [--config <file>]"),s.exit(1);try{let{runNativeCompile:i}=await import("./chunk-
|
|
167
|
+
\uD83D\uDCA1 To run: chmod +x "${a.outputPath}" && "${a.outputPath}"`)}else console.error(`\u274C Build failed: ${a.error}`),s.exit(1)}catch(o){console.error(`\u274C Build error: ${o.message}`),s.exit(1)}}),y.command("story","Start component showcase and testing server").option("-p, --port <port>","Server port",{default:"6006"}).option("-o, --open","Open browser automatically",{default:!1}).option("--host <host>","Host to bind to",{default:"localhost"}).example("stx story").example("stx story --port 3000 --open").action(async(t)=>{try{let{devCommand:e}=await import("./chunk-s2h601k7.js");await e({port:t.port?Number.parseInt(t.port,10):6006,open:t.open,host:t.host})}catch(e){console.error(`\u274C Story error: ${e.message}`),s.exit(1)}}),y.command("story:build","Build static story site").option("-o, --outDir <dir>","Output directory",{default:".stx/dist/story"}).example("stx story:build").example("stx story:build --outDir ./docs/components").action(async(t)=>{try{let{buildCommand:e}=await import("./chunk-03qf2z4d.js");await e({outDir:t.outDir})}catch(e){console.error(`\u274C Story build error: ${e.message}`),s.exit(1)}}),y.command("story:test","Run visual regression tests").option("-u, --update","Update snapshots",{default:!1}).option("-f, --filter <name>","Filter components by name").example("stx story:test").example("stx story:test --update").example("stx story:test --filter Button").action(async(t)=>{try{let{createContext:e}=await import("./chunk-qd4snptd.js"),{runVisualTests:o,updateSnapshots:i,formatTestResults:n}=await import("./chunk-fkq55rh7.js"),c=await e({mode:"build"});if(t.update){let r=await i(c,{filter:t.filter?[t.filter]:void 0});console.log(`Updated ${r} snapshots`)}else{let r=await o(c,{filter:t.filter?[t.filter]:void 0});if(console.log(n(r)),r.failed>0)s.exit(1)}}catch(e){console.error(`\u274C Story test error: ${e.message}`),s.exit(1)}}),y.command("native <action> [file]","Compile .stx screens into the JavaScriptCore bundle Craft renders natively").option("--format <format>","bundle (the JavaScriptCore bundle) or ir (the template as JSON)",{default:"ir"}).option("--output <path>","Write to this file instead of stdout").option("--minify","Minify the bundle",{default:!1}).option("--config <file>","Screens config (default: native.config.json in the working directory)").example("stx native compile Screen.stx --format bundle --output native-screen.js").example("stx native compile --format bundle --output native-screen.js --minify").example("stx native compile Screen.stx").action(async(t,e,o)=>{if(t!=="compile")console.error(`Unknown native command: ${t}`),console.error("Usage: stx native compile [file.stx] --format bundle|ir [--output <file>] [--minify] [--config <file>]"),s.exit(1);try{let{runNativeCompile:i}=await import("./chunk-a3d5g1ss.js"),n=await i(e,{format:o.format,output:o.output,minify:Boolean(o.minify),config:o.config});for(let c of n.diagnostics)console.warn(`${c.level}: ${c.message}`);if(n.written)console.log(`Compiled: ${e??"screens"} \u2192 ${f.relative(s.cwd(),n.written)||n.written}`);else console.log(n.output)}catch(i){console.error(i instanceof Error?i.message:String(i)),s.exit(1)}}),y.command("compile <input>","Compile stx template to native Craft component code").option("--target <platform>","Target platform: macos, windows, linux, ios, android, universal",{default:"universal"}).option("--format <format>","Output format: zig, typescript, json",{default:"zig"}).option("--output <path>","Output directory for compiled files",{default:"./dist"}).option("--optimize","Enable optimizations",{default:!0}).option("--tree-shake","Enable tree shaking",{default:!0}).option("--hot-reload","Enable hot reload support",{default:!1}).option("--sourcemaps","Generate source maps",{default:!1}).option("--bundle","Bundle all dependencies",{default:!0}).option("--minify","Minify output",{default:!1}).option("--verbose","Show detailed output",{default:!1}).example("stx compile app.stx").example("stx compile app.stx --target macos --format zig").example("stx compile app.stx --format typescript --output ./native").example("stx compile app.stx --optimize --tree-shake --minify").action(async(t,e)=>{try{let{compileToNative:o}=await import("./chunk-9j6hk72q.js"),i=f.resolve(t);if(!S.existsSync(i))console.error(`\u274C Input file not found: ${t}`),s.exit(1);let n=["macos","windows","linux","ios","android","universal"];if(!n.includes(e.target))console.error(`\u274C Invalid target: ${e.target}`),console.error(`\uD83D\uDCA1 Available targets: ${n.join(", ")}`),s.exit(1);let c=["zig","typescript","json"];if(!c.includes(e.format))console.error(`\u274C Invalid format: ${e.format}`),console.error(`\uD83D\uDCA1 Available formats: ${c.join(", ")}`),s.exit(1);console.log(`
|
|
168
168
|
\uD83D\uDD27 Compiling stx template to native code...`),console.log(` Input: ${t}`),console.log(` Target: ${e.target}`),console.log(` Format: ${e.format}`),console.log(` Output: ${e.output}
|
|
169
169
|
`);let r=S.readFileSync(i,"utf-8"),l=await o(r,{target:e.target,format:e.format,optimize:e.optimize,treeShake:e.treeShake,hotReload:e.hotReload,debug:e.verbose,sourceMaps:e.sourcemaps,bundle:e.bundle,minify:e.minify}),u=f.resolve(e.output);if(!S.existsSync(u))S.mkdirSync(u,{recursive:!0});let a=f.basename(t,f.extname(t)),m=e.format==="typescript"?"ts":e.format==="json"?"json":"zig",g=f.join(u,`${a}.${m}`);S.writeFileSync(g,l.code);let b=f.join(u,`${a}.manifest.json`);if(S.writeFileSync(b,JSON.stringify(l.manifest,null,2)),e.sourcemaps&&l.sourceMaps){let w=f.join(u,`${a}.${m}.map`);S.writeFileSync(w,l.sourceMaps)}if(e.target==="universal"&&l.platformCode.size>0)for(let[w,k]of l.platformCode){let v=f.join(u,`${a}.${w}.${m}`);S.writeFileSync(v,k)}if(console.log("\u2705 Compilation successful!"),console.log(` Output: ${g}`),console.log(` Manifest: ${b}`),console.log(`
|
|
170
170
|
\uD83D\uDCCA Statistics:`),console.log(` Compilation time: ${l.stats.compilationTime.toFixed(2)}ms`),console.log(` Total components: ${l.stats.totalComponents}`),console.log(` Native components: ${l.stats.nativeComponents}`),console.log(` Web fallback components: ${l.stats.webComponents}`),console.log(` Bundle size: ${(l.stats.bundleSize/1024).toFixed(2)}KB`),l.stats.warnings.length>0){console.log(`
|
|
@@ -173,6 +173,10 @@ function settle(frame, diagnostics) {
|
|
|
173
173
|
node.children = node.children.flatMap((child) => typeof child === "string" ? child.trim() ? [createNode("Text", {}, {}, {}, [child.trim()])] : [] : [child]);
|
|
174
174
|
return node;
|
|
175
175
|
}
|
|
176
|
+
if (node.type === "Button" && elements.length === 0) {
|
|
177
|
+
node.children = text ? [text] : [];
|
|
178
|
+
return node;
|
|
179
|
+
}
|
|
176
180
|
if (node.type === "Svg" || node.type === "G") {
|
|
177
181
|
node.children = elements;
|
|
178
182
|
return node;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.586",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/ts-css": "^0.3.11",
|
|
130
130
|
"@stacksjs/clapp": "^0.2.16",
|
|
131
|
-
"@stacksjs/desktop": "0.2.
|
|
132
|
-
"@stacksjs/sanitizer": "0.2.
|
|
131
|
+
"@stacksjs/desktop": "0.2.586",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.586",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.586",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.586",
|
|
137
137
|
"ts-broadcasting": "^0.0.11",
|
|
138
138
|
"ts-images": "^0.2.22",
|
|
139
139
|
"ts-syntax-highlighter": "^0.2.1"
|