Files
oikos/web/dist/assets/select-trigger-BFw7c3mx.js
dtoro d4d99a7473
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled
feat: Phase 1 — extract the client (web SPA + desktop) to dtoro/oikos-web
Problem: the hexagonal refactor churns the backend tree for nine more
phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper,
compose/web image) must move to its own repo first so doc/layout
rewrites land once on a backend-only tree.

Change:
- New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/
  (updateURL repointed to oikos-web releases), compose/, own CI (web +
  desktop jobs), own deploy script (CI-green gate, TOCTOU guard,
  version-tagged images, prune-to-3), own webhook receiver on :9798 +
  launchd unit, own compose project publishing the same 8091:80.
- Cutover executed on mac-mini in order: oikos stack's web service
  stopped+removed, oikos-web project brought up on 8091; outer Caddy
  untouched (targets the published port) — serving + Authentik flow +
  /wails 404 quirk verified post-cutover.
- Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI
  workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install
  targets, the compose web service, oikos-web from deploy.sh's fallback
  prune list; wails + go-keyring dropped from go.mod, vendor synced.
- README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now
  point at the new repo; mbse + mascot design docs carry a path note.

Risk: production SPA serving depends on the new pipeline now; rollback
is versioned-image re-up of the old web service from a pre-split
checkout (port 8091). Desktop builds installed before the split still
check dtoro/oikos releases — one manual reinstall, noted in the
oikos-web release notes.

Verification: go vet, make test (race), make generate-check, golangci
(no new findings; baseline down 400→365); post-cutover curls —
localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
2026-08-15 22:27:52 +02:00

2 lines
37 KiB
JavaScript

var Ge=Object.defineProperty;var He=i=>{throw TypeError(i)};var Ye=(i,t,e)=>t in i?Ge(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var a=(i,t,e)=>Ye(i,typeof t!="symbol"?t+"":t,e),ne=(i,t,e)=>t.has(i)||He("Cannot "+e);var o=(i,t,e)=>(ne(i,t,"read from private field"),e?e.call(i):t.get(i)),p=(i,t,e)=>t.has(i)?He("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),ht=(i,t,e,r)=>(ne(i,t,"write to private field"),r?r.call(i,e):t.set(i,e),e),dt=(i,t,e)=>(ne(i,t,"access private method"),e);import{u as v,g as s,bq as Je,br as Qe,G as Me,H as ee,bs as be,bt as Xe,bu as ut,bv as mt,I as Ae,S as le,bw as ke,bx as De,by as Re,bz as Be,bA as Ee,bB as Ze,bC as $e,bD as to,bE as eo,J as Ue,aR as Ke,L as oo,D as y,y as B,aQ as ro,aO as W,bF as so,aN as io,bG as no,bH as we,Y as et,af as ye,bI as lo,bJ as ze,aP as ao,Z as C,bK as ho,O as uo,bL as co,N as Oe,p as U,W as d,Q as T,j as _,R as E,a as f,b as K,U as q,V as gt,X as ft,bM as po,bN as go,a1 as st,a2 as F,_ as M,$ as tt,a0 as X,f as L,c as J,s as it,bO as fo,i as vo,a7 as ot,bP as mo,a3 as bo,a4 as pt,bb as wo,a8 as yo,t as So,e as _o,b0 as No,ae as Fe}from"./index-B5w8gw75.js";import{H as Co}from"./hidden-input-CbX2doyK.js";import{o as xo}from"./on-mount-effect.svelte-Lpx0iWhb.js";var bt,re;class Po{constructor(t,e){p(this,bt,()=>{});p(this,re,v(()=>o(this,bt).call(this)));let r;e!==void 0&&(r=e),ht(this,bt,()=>{try{return r}finally{r=t()}})}get current(){return s(o(this,re))}}bt=new WeakMap,re=new WeakMap;var $,lt,rt;class Io{constructor(t){p(this,$);p(this,lt,v(()=>o(this,$).candidateValues()));p(this,rt);ht(this,$,t),ht(this,rt,Je("",{afterMs:1e3,getWindow:o(this,$).getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!o(this,$).enabled()||!s(o(this,lt)).length)return;o(this,rt).current=o(this,rt).current+t;const e=o(this,$).getCurrentItem(),r=s(o(this,lt)).find(h=>h===e)??"",l=s(o(this,lt)).map(h=>h??""),c=Qe(l,o(this,rt).current,r),n=s(o(this,lt)).find(h=>h===c);return n&&o(this,$).onMatch(n),n}resetTypeahead(){o(this,rt).current=""}}$=new WeakMap,lt=new WeakMap,rt=new WeakMap;const To=[mt,De,Re],Ho=[ut,Be,Ee],Ao=[...To,...Ho],ko=uo({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),oe=new Me("Select.Root | Combobox.Root"),ie=new Me("Select.Content | Combobox.Content");var wt,yt,St,_t,Nt,Ct,xt,Pt,It,Tt,Ht,At;class Le{constructor(t){a(this,"opts");p(this,wt,B(!1));p(this,yt,B(null));p(this,St,B(null));a(this,"contentPresence");p(this,_t,B(null));p(this,Nt,B(null));p(this,Ct,B(null));p(this,xt,B(""));p(this,Pt,B(null));p(this,It,v(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));p(this,Tt,v(()=>{if(this.highlightedNode)return this.highlightedNode.id}));p(this,Ht,v(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));p(this,At,B(!1));a(this,"isUsingKeyboard",!1);a(this,"isCombobox",!1);a(this,"domContext",new be(()=>null));a(this,"getBitsAttr",t=>ko.getAttr(t,this.isCombobox?"combobox":void 0));this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new ao({ref:C(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),ho(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return s(o(this,wt))}set touchedInput(t){y(o(this,wt),t,!0)}get inputNode(){return s(o(this,yt))}set inputNode(t){y(o(this,yt),t,!0)}get contentNode(){return s(o(this,St))}set contentNode(t){y(o(this,St),t,!0)}get viewportNode(){return s(o(this,_t))}set viewportNode(t){y(o(this,_t),t,!0)}get triggerNode(){return s(o(this,Nt))}set triggerNode(t){y(o(this,Nt),t,!0)}get valueNode(){return s(o(this,Ct))}set valueNode(t){y(o(this,Ct),t,!0)}get valueId(){return s(o(this,xt))}set valueId(t){y(o(this,xt),t,!0)}get highlightedNode(){return s(o(this,Pt))}set highlightedNode(t){y(o(this,Pt),t,!0)}get highlightedValue(){return s(o(this,It))}set highlightedValue(t){y(o(this,It),t)}get highlightedId(){return s(o(this,Tt))}set highlightedId(t){y(o(this,Tt),t)}get highlightedLabel(){return s(o(this,Ht))}set highlightedLabel(t){y(o(this,Ht),t)}get contentIsPositioned(){return s(o(this,At))}set contentIsPositioned(t){y(o(this,At),t,!0)}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const r=this.viewportNode.getBoundingClientRect();e=e.filter(l=>{if(!this.viewportNode)return!1;const c=l.getBoundingClientRect();return c.right<=r.right&&c.left>=r.left&&c.bottom<=r.bottom&&c.top>=r.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(r=>r.dataset.value===t)??null}getLabelForValue(t){var l,c;if(t==="")return"";const e=(l=this.opts.items.current.find(n=>n.value===t))==null?void 0:l.label;if(e!==void 0)return e;const r=this.getNodeByValue(t);if(r){const n=r.getAttribute("data-label");return n!==null&&n!==""?n:((c=r.textContent)==null?void 0:c.trim())??t}return t}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}wt=new WeakMap,yt=new WeakMap,St=new WeakMap,_t=new WeakMap,Nt=new WeakMap,Ct=new WeakMap,xt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Tt=new WeakMap,Ht=new WeakMap,At=new WeakMap;var kt,Ot,Vt,Mt;class Oo extends Le{constructor(e){super(e);a(this,"opts");a(this,"isMulti",!1);p(this,kt,v(()=>this.opts.value.current!==""));p(this,Ot,v(()=>{var e;return this.opts.items.current.length?((e=this.opts.items.current.find(r=>r.value===this.opts.value.current))==null?void 0:e.label)??"":""}));p(this,Vt,v(()=>this.opts.items.current.length?this.opts.items.current.filter(r=>!r.disabled).map(r=>r.label):[]));p(this,Mt,v(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=e,ye(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),W(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return s(o(this,kt))}set hasValue(e){y(o(this,kt),e)}get currentLabel(){return s(o(this,Ot))}set currentLabel(e){y(o(this,Ot),e)}get candidateLabels(){return s(o(this,Vt))}set candidateLabels(e){y(o(this,Vt),e)}get dataTypeaheadEnabled(){return s(o(this,Mt))}set dataTypeaheadEnabled(e){y(o(this,Mt),e)}includesItem(e){return this.opts.value.current===e}toggleItem(e,r=e){const l=this.includesItem(e)?"":e;this.opts.value.current=l,l!==""&&(this.opts.inputValue.current=r)}setInitialHighlightedNode(){ze(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}kt=new WeakMap,Ot=new WeakMap,Vt=new WeakMap,Mt=new WeakMap;var Dt;class Vo extends Le{constructor(e){super(e);a(this,"opts");a(this,"isMulti",!0);p(this,Dt,v(()=>this.opts.value.current.length>0));this.opts=e,ye(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),W(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return s(o(this,Dt))}set hasValue(e){y(o(this,Dt),e)}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,r=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(l=>l!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=r}setInitialHighlightedNode(){ze(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}Dt=new WeakMap;class Mo{static create(t){const{type:e,...r}=t,l=e==="single"?new Oo(r):new Vo(r);return oe.set(l)}}var at,ct,Z,We,de,ue,Rt;const _e=class _e{constructor(t,e){p(this,Z);a(this,"opts");a(this,"root");a(this,"attachment");p(this,at);p(this,ct);p(this,Rt,v(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":oo(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ke(this.root.opts.open.current),"data-disabled":Ue(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=ee(t.ref,r=>this.root.triggerNode=r),this.root.domContext=new be(t.ref),ht(this,at,new Xe({getCurrentItem:()=>this.root.highlightedNode,onMatch:r=>{this.root.setHighlightedNode(r)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()})),ht(this,ct,new Io({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:r=>{if(this.root.isMulti||!this.root.opts.items.current)return;const l=this.root.opts.items.current.find(c=>c.label===r);l&&(this.root.opts.value.current=l.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}static create(t){return new _e(t,oe.get())}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===ut||t.key===mt)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Ae||t.key===le||t.key===mt||t.key===ut)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){o(this,ct).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const n=this.root.getCandidateNodes();if(!n.length)return;if(t.key===mt){const h=n[0];this.root.setHighlightedNode(h)}else if(t.key===ut){const h=n[n.length-1];this.root.setHighlightedNode(h)}return}if(t.key===ke){this.root.handleClose();return}if((t.key===Ae||t.key===le&&o(this,at).search==="")&&!t.isComposing&&(t.preventDefault(),dt(this,Z,ue).call(this)))return;if(t.key===ut&&t.altKey&&this.root.handleClose(),Ao.includes(t.key)){t.preventDefault();const n=this.root.getCandidateNodes(),h=this.root.highlightedNode,w=h?n.indexOf(h):-1,u=this.root.opts.loop.current;let m;if(t.key===mt?m=Ze(n,w,u):t.key===ut?m=$e(n,w,u):t.key===Be?m=to(n,w,10,u):t.key===De?m=eo(n,w,10,u):t.key===Re?m=n[0]:t.key===Ee&&(m=n[n.length-1]),!m)return;this.root.setHighlightedNode(m);return}const e=t.ctrlKey||t.altKey||t.metaKey,r=t.key.length===1,l=t.key===le,c=this.root.getCandidateNodes();if(t.key!==ke){if(!e&&(r||l)){!o(this,at).handleTypeaheadSearch(t.key,c)&&l&&(t.preventDefault(),dt(this,Z,ue).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e!=null&&e.hasPointerCapture(t.pointerId)&&(e==null||e.releasePointerCapture(t.pointerId)),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?dt(this,Z,de).call(this,t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?dt(this,Z,de).call(this,t):this.root.handleClose()))}get props(){return s(o(this,Rt))}set props(t){y(o(this,Rt),t)}};at=new WeakMap,ct=new WeakMap,Z=new WeakSet,We=function(){this.root.opts.open.current=!0,o(this,ct).resetTypeahead(),o(this,at).resetTypeahead()},de=function(t){dt(this,Z,We).call(this)},ue=function(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)},Rt=new WeakMap;let he=_e;var Bt,se,Et,Ut;const Ne=class Ne{constructor(t,e){a(this,"opts");a(this,"root");a(this,"attachment");p(this,Bt,B(!1));a(this,"domContext");p(this,se,v(()=>so(this.root.isCombobox?"combobox":"select")));a(this,"onInteractOutside",t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()});a(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});a(this,"onOpenAutoFocus",t=>{t.preventDefault()});a(this,"onCloseAutoFocus",t=>{t.preventDefault()});p(this,Et,v(()=>({open:this.root.opts.open.current})));p(this,Ut,v(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ke(this.root.opts.open.current),...io(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...s(o(this,se))},onpointermove:this.onpointermove,...this.attachment})));a(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}});this.opts=t,this.root=e,this.attachment=ee(t.ref,r=>this.root.contentNode=r),this.domContext=new be(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),ro(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),W(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),W([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}static create(t){return ie.set(new Ne(t,oe.get()))}get isPositioned(){return s(o(this,Bt))}set isPositioned(t){y(o(this,Bt),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get shouldRender(){return this.root.contentPresence.shouldRender}get snippetProps(){return s(o(this,Et))}set snippetProps(t){y(o(this,Et),t)}get props(){return s(o(this,Ut))}set props(t){y(o(this,Ut),t)}};Bt=new WeakMap,se=new WeakMap,Et=new WeakMap,Ut=new WeakMap;let ce=Ne;var Kt,zt,Ft,Lt,Wt;const Ce=class Ce{constructor(t,e){a(this,"opts");a(this,"root");a(this,"attachment");p(this,Kt,v(()=>this.root.includesItem(this.opts.value.current)));p(this,zt,v(()=>this.root.highlightedValue===this.opts.value.current));a(this,"prevHighlighted",new Po(()=>this.isHighlighted));p(this,Ft,B(!1));p(this,Lt,v(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));p(this,Wt,v(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Ue(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=ee(t.ref),W([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),W(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(t){return new Ce(t,oe.get())}get isSelected(){return s(o(this,Kt))}set isSelected(t){y(o(this,Kt),t)}get isHighlighted(){return s(o(this,zt))}set isHighlighted(t){y(o(this,zt),t)}get mounted(){return s(o(this,Ft))}set mounted(t){y(o(this,Ft),t,!0)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}get snippetProps(){return s(o(this,Lt))}set snippetProps(t){y(o(this,Lt),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!no){we(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return s(o(this,Wt))}set props(t){y(o(this,Wt),t)}};Kt=new WeakMap,zt=new WeakMap,Ft=new WeakMap,Lt=new WeakMap,Wt=new WeakMap;let pe=Ce;var qt,jt;const xe=class xe{constructor(t,e){a(this,"opts");a(this,"root");p(this,qt,v(()=>this.root.opts.name.current!==""));p(this,jt,v(()=>({disabled:Oe(this.root.opts.disabled.current),required:Oe(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}static create(t){return new xe(t,oe.get())}get shouldRender(){return s(o(this,qt))}set shouldRender(t){y(o(this,qt),t)}onfocus(t){var e,r;t.preventDefault(),this.root.isCombobox?(r=this.root.inputNode)==null||r.focus():(e=this.root.triggerNode)==null||e.focus()}get props(){return s(o(this,jt))}set props(t){y(o(this,jt),t)}};qt=new WeakMap,jt=new WeakMap;let ge=xe;var Gt,Yt;const Pe=class Pe{constructor(t,e){a(this,"opts");a(this,"content");a(this,"root");a(this,"attachment");p(this,Gt,B(0));p(this,Yt,v(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment})));this.opts=t,this.content=e,this.root=e.root,this.attachment=ee(t.ref,r=>{this.root.viewportNode=r})}static create(t){return new Pe(t,ie.get())}get prevScrollTop(){return s(o(this,Gt))}set prevScrollTop(t){y(o(this,Gt),t,!0)}get props(){return s(o(this,Yt))}set props(t){y(o(this,Yt),t)}};Gt=new WeakMap,Yt=new WeakMap;let fe=Pe;var Jt,Qt;class qe{constructor(t,e){a(this,"opts");a(this,"content");a(this,"root");a(this,"attachment");a(this,"autoScrollTimer",null);a(this,"userScrollTimer",-1);a(this,"isUserScrolling",!1);a(this,"onAutoScroll",et);p(this,Jt,B(!1));p(this,Qt,v(()=>({id:this.opts.id.current,"aria-hidden":lo(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment})));this.opts=t,this.content=e,this.root=e.root,this.attachment=ee(t.ref),W([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),ye(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}get mounted(){return s(o(this,Jt))}set mounted(t){y(o(this,Jt),t,!0)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const e=r=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>e(r+1),this.opts.delay.current(r))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>e(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}get props(){return s(o(this,Qt))}set props(t){y(o(this,Qt),t)}}Jt=new WeakMap,Qt=new WeakMap;var Xt,Zt;const Ie=class Ie{constructor(t){a(this,"scrollButtonState");a(this,"content");a(this,"root");p(this,Xt,B(!1));a(this,"scrollIntoViewTimer",null);a(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const e=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,r=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<e-r});a(this,"handleAutoScroll",()=>{const t=this.root.viewportNode,e=this.root.highlightedNode;!t||!e||(t.scrollTop=t.scrollTop+e.offsetHeight)});p(this,Zt,v(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,W([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),we(this.root.viewportNode,"scroll",()=>this.handleScroll())}),W([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),W(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=co(5,()=>{const e=this.root.highlightedNode;e&&this.root.scrollHighlightedNodeIntoView(e)}))})}static create(t){return new Ie(new qe(t,ie.get()))}get canScrollDown(){return s(o(this,Xt))}set canScrollDown(t){y(o(this,Xt),t,!0)}get props(){return s(o(this,Zt))}set props(t){y(o(this,Zt),t)}};Xt=new WeakMap,Zt=new WeakMap;let ve=Ie;var $t,te;const Te=class Te{constructor(t){a(this,"scrollButtonState");a(this,"content");a(this,"root");p(this,$t,B(!1));a(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const e=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-e>.1});a(this,"handleAutoScroll",()=>{!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});p(this,te,v(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,W([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),we(this.root.viewportNode,"scroll",()=>this.handleScroll())})}static create(t){return new Te(new qe(t,ie.get()))}get canScrollUp(){return s(o(this,$t))}set canScrollUp(t){y(o(this,$t),t,!0)}get props(){return s(o(this,te))}set props(t){y(o(this,te),t)}};$t=new WeakMap,te=new WeakMap;let me=Te;function ae(i,t){U(t,!0);let e=d(t,"value",15);const r=ge.create({value:C(()=>e())});var l=T(),c=_(l);{var n=h=>{Co(h,q(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return e()},set value(w){e(w)}}))};E(c,h=>{r.shouldRender&&h(n)})}f(i,l),K()}var Do=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),Ve=L("<div><div><!></div></div>");function Ro(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=d(t,"forceMount",3,!1),n=d(t,"side",3,"bottom"),h=d(t,"onInteractOutside",3,et),w=d(t,"onEscapeKeydown",3,et),u=d(t,"preventScroll",3,!1),m=F(t,Do);const x=ce.create({id:C(()=>r()),ref:C(()=>l(),P=>l(P)),onInteractOutside:C(()=>h()),onEscapeKeydown:C(()=>w())}),b=v(()=>st(m,x.props));var I=T(),A=_(I);{var V=P=>{po(P,q(()=>s(b),()=>x.popperProps,{get ref(){return x.opts.ref},get side(){return n()},get enabled(){return x.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!0,get shouldRender(){return x.shouldRender},popper:(N,g)=>{let D=()=>(g==null?void 0:g()).props,j=()=>(g==null?void 0:g()).wrapperProps;const H=v(()=>st(D(),{style:x.props.style},{style:t.style}));var z=T(),Q=_(z);{var nt=O=>{var R=T(),G=_(R);{let Y=v(()=>({props:s(H),wrapperProps:j(),...x.snippetProps}));M(G,()=>t.child,()=>s(Y))}f(O,R)},vt=O=>{var R=Ve();tt(R,()=>({...j()}));var G=J(R);tt(G,()=>({...s(H)}));var Y=J(G);M(Y,()=>t.children??X),f(O,R)};E(Q,O=>{t.child?O(nt):O(vt,-1)})}f(N,z)},$$slots:{popper:!0}}))},k=P=>{go(P,q(()=>s(b),()=>x.popperProps,{get ref(){return x.opts.ref},get side(){return n()},get open(){return x.root.opts.open.current},get id(){return r()},get preventScroll(){return u()},forceMount:!1,get shouldRender(){return x.shouldRender},popper:(N,g)=>{let D=()=>(g==null?void 0:g()).props,j=()=>(g==null?void 0:g()).wrapperProps;const H=v(()=>st(D(),{style:x.props.style},{style:t.style}));var z=T(),Q=_(z);{var nt=O=>{var R=T(),G=_(R);{let Y=v(()=>({props:s(H),wrapperProps:j(),...x.snippetProps}));M(G,()=>t.child,()=>s(Y))}f(O,R)},vt=O=>{var R=Ve();tt(R,()=>({...j()}));var G=J(R);tt(G,()=>({...s(H)}));var Y=J(G);M(Y,()=>t.children??X),f(O,R)};E(Q,O=>{t.child?O(nt):O(vt,-1)})}f(N,z)},$$slots:{popper:!0}}))};E(A,P=>{c()?P(V):c()||P(k,1)})}f(i,I),K()}function Se(i,t){U(t,!0);let e=d(t,"mounted",15,!1),r=d(t,"onMountedChange",3,et);xo(()=>(e(!0),r()(!0),()=>{e(!1),r()(!1)})),K()}var Bo=new Set(["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]),Eo=L("<div><!></div>"),Uo=L("<!> <!>",1);function Ko(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=d(t,"label",19,()=>t.value),n=d(t,"disabled",3,!1),h=d(t,"onHighlight",3,et),w=d(t,"onUnhighlight",3,et),u=F(t,Bo);const m=pe.create({id:C(()=>r()),ref:C(()=>l(),P=>l(P)),value:C(()=>t.value),disabled:C(()=>n()),label:C(()=>c()),onHighlight:C(()=>h()),onUnhighlight:C(()=>w())}),x=v(()=>st(u,m.props));var b=Uo(),I=_(b);{var A=P=>{var S=T(),N=_(S);{let g=v(()=>({props:s(x),...m.snippetProps}));M(N,()=>t.child,()=>s(g))}f(P,S)},V=P=>{var S=Eo();tt(S,()=>({...s(x)}));var N=J(S);M(N,()=>t.children??X,()=>m.snippetProps),f(P,S)};E(I,P=>{t.child?P(A):P(V,-1)})}var k=it(I,2);Se(k,{get mounted(){return m.mounted},set mounted(P){m.mounted=P}}),f(i,b),K()}var zo=new Set(["$$slots","$$events","$$legacy","id","ref","children","child"]),Fo=L("<div><!></div>");function Lo(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=F(t,zo);const n=fe.create({id:C(()=>r()),ref:C(()=>l(),b=>l(b))}),h=v(()=>st(c,n.props));var w=T(),u=_(w);{var m=b=>{var I=T(),A=_(I);M(A,()=>t.child,()=>({props:s(h)})),f(b,I)},x=b=>{var I=Fo();tt(I,()=>({...s(h)}));var A=J(I);M(A,()=>t.children??X),f(b,I)};E(u,b=>{t.child?b(m):b(x,-1)})}f(i,w),K()}var Wo=new Set(["$$slots","$$events","$$legacy","id","ref","delay","child","children"]),qo=L("<div><!></div>"),jo=L("<!> <!>",1);function Go(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=d(t,"delay",3,()=>50),n=F(t,Wo);const h=ve.create({id:C(()=>r()),ref:C(()=>l(),b=>l(b)),delay:C(()=>c())}),w=v(()=>st(n,h.props));var u=T(),m=_(u);{var x=b=>{var I=jo(),A=_(I);Se(A,{get mounted(){return h.scrollButtonState.mounted},set mounted(S){h.scrollButtonState.mounted=S}});var V=it(A,2);{var k=S=>{var N=T(),g=_(N);M(g,()=>t.child,()=>({props:n})),f(S,N)},P=S=>{var N=qo();tt(N,()=>({...s(w)}));var g=J(N);M(g,()=>t.children??X),f(S,N)};E(V,S=>{t.child?S(k):S(P,-1)})}f(b,I)};E(m,b=>{h.canScrollDown&&b(x)})}f(i,u),K()}var Yo=new Set(["$$slots","$$events","$$legacy","id","ref","delay","child","children"]),Jo=L("<div><!></div>"),Qo=L("<!> <!>",1);function Xo(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=d(t,"delay",3,()=>50),n=F(t,Yo);const h=me.create({id:C(()=>r()),ref:C(()=>l(),b=>l(b)),delay:C(()=>c())}),w=v(()=>st(n,h.props));var u=T(),m=_(u);{var x=b=>{var I=Qo(),A=_(I);Se(A,{get mounted(){return h.scrollButtonState.mounted},set mounted(S){h.scrollButtonState.mounted=S}});var V=it(A,2);{var k=S=>{var N=T(),g=_(N);M(g,()=>t.child,()=>({props:n})),f(S,N)},P=S=>{var N=Jo();tt(N,()=>({...s(w)}));var g=J(N);M(g,()=>t.children??X),f(S,N)};E(V,S=>{t.child?S(k):S(P,-1)})}f(b,I)};E(m,b=>{h.canScrollUp&&b(x)})}f(i,u),K()}var Zo=L("<!> <!>",1);function $o(i,t){U(t,!0);let e=d(t,"value",15),r=d(t,"onValueChange",3,et),l=d(t,"name",3,""),c=d(t,"disabled",3,!1),n=d(t,"open",15,!1),h=d(t,"onOpenChange",3,et),w=d(t,"onOpenChangeComplete",3,et),u=d(t,"loop",3,!1),m=d(t,"scrollAlignment",3,"nearest"),x=d(t,"required",3,!1),b=d(t,"items",19,()=>[]),I=d(t,"allowDeselect",3,!1);function A(){e()===void 0&&e(t.type==="single"?"":[])}A(),W.pre(()=>e(),()=>{A()});let V=B("");const k=Mo.create({type:t.type,value:C(()=>e(),H=>{e(H),r()(H)}),disabled:C(()=>c()),required:C(()=>x()),open:C(()=>n(),H=>{n(H),h()(H)}),loop:C(()=>u()),scrollAlignment:C(()=>m()),name:C(()=>l()),isCombobox:!1,items:C(()=>b()),allowDeselect:C(()=>I()),inputValue:C(()=>s(V),H=>y(V,H,!0)),onOpenChangeComplete:C(()=>w())});var P=Zo(),S=_(P);fo(S,{children:(H,z)=>{var Q=T(),nt=_(Q);M(nt,()=>t.children??X),f(H,Q)},$$slots:{default:!0}});var N=it(S,2);{var g=H=>{var z=T(),Q=_(z);{var nt=O=>{ae(O,{get autocomplete(){return t.autocomplete}})},vt=O=>{var R=T(),G=_(R);vo(G,16,()=>k.opts.value.current,Y=>Y,(Y,je)=>{ae(Y,{get value(){return je},get autocomplete(){return t.autocomplete}})}),f(O,R)};E(Q,O=>{k.opts.value.current.length===0?O(nt):O(vt,-1)})}f(H,z)},D=v(()=>Array.isArray(k.opts.value.current)),j=H=>{ae(H,{get autocomplete(){return t.autocomplete},get value(){return k.opts.value.current},set value(z){k.opts.value.current=z}})};E(N,H=>{s(D)?H(g):H(j,-1)})}f(i,P),K()}var tr=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","type"]),er=L("<button><!></button>");function or(i,t){const e=gt();U(t,!0);let r=d(t,"id",19,()=>ft(e)),l=d(t,"ref",15,null),c=d(t,"type",3,"button"),n=F(t,tr);const h=he.create({id:C(()=>r()),ref:C(()=>l(),x=>l(x))}),w=v(()=>st(n,h.props,{type:c()}));var u=T(),m=_(u);ot(m,()=>mo,(x,b)=>{b(x,{get id(){return r()},get ref(){return h.opts.ref},children:(I,A)=>{var V=T(),k=_(V);{var P=N=>{var g=T(),D=_(g);M(D,()=>t.child,()=>({props:s(w)})),f(N,g)},S=N=>{var g=er();tt(g,()=>({...s(w)}));var D=J(g);M(D,()=>t.children??X),f(N,g)};E(k,N=>{t.child?N(P):N(S,-1)})}f(I,V)},$$slots:{default:!0}})}),f(i,u),K()}var rr=new Set(["$$slots","$$events","$$legacy"]);function sr(i,t){let e=F(t,rr);const r=[["path",{d:"m18 15-6-6-6 6"}]];bo(i,q({name:"chevron-up"},()=>e,{get iconNode(){return r}}))}var ir=new Set(["$$slots","$$events","$$legacy","open","value"]);function _r(i,t){U(t,!0);let e=d(t,"open",15,!1),r=d(t,"value",15),l=F(t,ir);var c=T(),n=_(c);ot(n,()=>$o,(h,w)=>{w(h,q(()=>l,{get open(){return e()},set open(u){e(u)},get value(){return r()},set value(u){r(u)}}))}),f(i,c),K()}var nr=new Set(["$$slots","$$events","$$legacy","ref","class","value","label","children"]),lr=L('<span class="absolute end-2 flex size-3.5 items-center justify-center"><!></span> <span class="flex flex-1 gap-2 shrink-0 whitespace-nowrap"><!></span>',1);function Nr(i,t){U(t,!0);let e=d(t,"ref",15,null),r=F(t,nr);var l=T(),c=_(l);{const n=(w,u)=>{let m=()=>(u==null?void 0:u()).selected,x=()=>(u==null?void 0:u()).highlighted;var b=lr(),I=_(b),A=J(I);{var V=g=>{wo(g,{class:"cn-select-item-indicator-icon"})};E(A,g=>{m()&&g(V)})}var k=it(I,2),P=J(k);{var S=g=>{var D=T(),j=_(D);M(j,()=>t.children,()=>({selected:m(),highlighted:x()})),f(g,D)},N=g=>{var D=yo();So(()=>_o(D,t.label||t.value)),f(g,D)};E(P,g=>{t.children?g(S):g(N,-1)})}f(w,b)};let h=v(()=>pt("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 focus:bg-accent data-highlighted:bg-accent data-highlighted:text-accent-foreground focus:text-accent-foreground relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",t.class));ot(c,()=>Ko,(w,u)=>{u(w,q({get value(){return t.value},"data-slot":"select-item",get class(){return s(h)}},()=>r,{get ref(){return e()},set ref(m){e(m)},children:n,$$slots:{default:!0}}))})}f(i,l),K()}var ar=new Set(["$$slots","$$events","$$legacy"]);function hr(i,t){let e=F(t,ar);var r=T(),l=_(r);ot(l,()=>No,(c,n)=>{n(c,q(()=>e))}),f(i,r)}var dr=new Set(["$$slots","$$events","$$legacy","ref","class"]);function ur(i,t){U(t,!0);let e=d(t,"ref",15,null),r=F(t,dr);var l=T(),c=_(l);{let n=v(()=>pt("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",t.class));ot(c,()=>Xo,(h,w)=>{w(h,q({"data-slot":"select-scroll-up-button",get class(){return s(n)}},()=>r,{get ref(){return e()},set ref(u){e(u)},children:(u,m)=>{sr(u,{})},$$slots:{default:!0}}))})}f(i,l),K()}var cr=new Set(["$$slots","$$events","$$legacy","ref","class"]);function pr(i,t){U(t,!0);let e=d(t,"ref",15,null),r=F(t,cr);var l=T(),c=_(l);{let n=v(()=>pt("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",t.class));ot(c,()=>Go,(h,w)=>{w(h,q({"data-slot":"select-scroll-down-button",get class(){return s(n)}},()=>r,{get ref(){return e()},set ref(u){e(u)},children:(u,m)=>{Fe(u,{})},$$slots:{default:!0}}))})}f(i,l),K()}var gr=new Set(["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children","preventScroll"]),fr=L("<!> <!> <!>",1);function Cr(i,t){U(t,!0);let e=d(t,"ref",15,null),r=d(t,"sideOffset",3,4),l=d(t,"preventScroll",3,!0),c=F(t,gr);hr(i,q(()=>t.portalProps,{children:(n,h)=>{var w=T(),u=_(w);{let m=v(()=>pt("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 relative isolate z-50 overflow-x-hidden overflow-y-auto",t.class));ot(u,()=>Ro,(x,b)=>{b(x,q({get sideOffset(){return r()},get preventScroll(){return l()},"data-slot":"select-content",get class(){return s(m)}},()=>c,{get ref(){return e()},set ref(I){e(I)},children:(I,A)=>{var V=fr(),k=_(V);ur(k,{});var P=it(k,2);{let N=v(()=>pt("h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1"));ot(P,()=>Lo,(g,D)=>{D(g,{get class(){return s(N)},children:(j,H)=>{var z=T(),Q=_(z);M(Q,()=>t.children??X),f(j,z)},$$slots:{default:!0}})})}var S=it(P,2);pr(S,{}),f(I,V)},$$slots:{default:!0}}))})}f(n,w)},$$slots:{default:!0}})),K()}var vr=new Set(["$$slots","$$events","$$legacy","ref","class","children","size"]),mr=L("<!> <!>",1);function xr(i,t){U(t,!0);let e=d(t,"ref",15,null),r=d(t,"size",3,"default"),l=F(t,vr);var c=T(),n=_(c);{let h=v(()=>pt("border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",t.class));ot(n,()=>or,(w,u)=>{u(w,q({"data-slot":"select-trigger",get"data-size"(){return r()},get class(){return s(h)}},()=>l,{get ref(){return e()},set ref(m){e(m)},children:(m,x)=>{var b=mr(),I=_(b);M(I,()=>t.children??X);var A=it(I,2);Fe(A,{class:"text-muted-foreground size-4 pointer-events-none"}),f(m,b)},$$slots:{default:!0}}))})}f(i,c),K()}export{xr as S,Cr as a,Nr as b,_r as c};