@nextclaw/ui 0.6.7 → 0.6.9

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/assets/{ChannelsList-Dz8AGmaQ.js → ChannelsList-DACqpUYZ.js} +1 -1
  3. package/dist/assets/ChatPage-iji0RkTR.js +34 -0
  4. package/dist/assets/{DocBrowser-CkKvzF7m.js → DocBrowser-D7mjKkGe.js} +1 -1
  5. package/dist/assets/{LogoBadge-C_ygxoGB.js → LogoBadge-BlDT-g9R.js} +1 -1
  6. package/dist/assets/{MarketplacePage-DEvRs-Jc.js → MarketplacePage-CZq3jVgg.js} +3 -3
  7. package/dist/assets/{ModelConfig-BGfliN2Z.js → ModelConfig-DwRU5qrw.js} +1 -1
  8. package/dist/assets/{ProvidersList-BHLGLSvs.js → ProvidersList-DFxN3pjx.js} +1 -1
  9. package/dist/assets/{RuntimeConfig-Clltld_h.js → RuntimeConfig-C7BRLGSC.js} +1 -1
  10. package/dist/assets/{SecretsConfig-CaJLf7oJ.js → SecretsConfig-D5xZh7VF.js} +1 -1
  11. package/dist/assets/{SessionsConfig-3QF7K9wm.js → SessionsConfig-ovpj_otA.js} +1 -1
  12. package/dist/assets/{card-DXo3NsaB.js → card-Bf4CtrW8.js} +1 -1
  13. package/dist/assets/index-C_DhisNo.css +1 -0
  14. package/dist/assets/{index-CGo5Vnh0.js → index-dKTqKCJo.js} +5 -5
  15. package/dist/assets/{input-CzTldMKo.js → input-CaKJyoWZ.js} +1 -1
  16. package/dist/assets/{label-De__vsU7.js → label-BaXSWTKI.js} +1 -1
  17. package/dist/assets/{page-layout-BOgLC2tK.js → page-layout-DA6PFRtQ.js} +1 -1
  18. package/dist/assets/{session-run-status-DQVCDxTb.js → session-run-status-CllIZxNf.js} +1 -1
  19. package/dist/assets/{switch-pMrS4heA.js → switch-Cvd5wZs-.js} +1 -1
  20. package/dist/assets/{tabs-custom-DhOxWfCb.js → tabs-custom-0PybLkXs.js} +1 -1
  21. package/dist/assets/{useConfirmDialog-CseKBGh5.js → useConfirmDialog-DdtpSju1.js} +2 -2
  22. package/dist/assets/{vendor-D33xZtEC.js → vendor-C--HHaLf.js} +1 -1
  23. package/dist/index.html +3 -3
  24. package/package.json +1 -1
  25. package/src/api/types.ts +22 -4
  26. package/src/components/chat/ChatInputBar.tsx +341 -24
  27. package/src/components/chat/ChatPage.tsx +13 -5
  28. package/src/components/chat/useChatStreamController.ts +18 -3
  29. package/src/components/marketplace/MarketplacePage.tsx +48 -44
  30. package/src/lib/i18n.ts +11 -1
  31. package/dist/assets/ChatPage-BXDyt7BL.js +0 -34
  32. package/dist/assets/index-DcxYzrFm.css +0 -1
@@ -1 +1 @@
1
- import{r as s,j as o}from"./vendor-D33xZtEC.js";import{c as t}from"./index-CGo5Vnh0.js";const l=s.forwardRef(({className:e,...a},r)=>o.jsx("label",{ref:r,className:t("text-sm font-medium leading-none text-gray-700 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a}));l.displayName="Label";export{l as L};
1
+ import{r as s,j as o}from"./vendor-C--HHaLf.js";import{c as t}from"./index-dKTqKCJo.js";const l=s.forwardRef(({className:e,...a},r)=>o.jsx("label",{ref:r,className:t("text-sm font-medium leading-none text-gray-700 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a}));l.displayName="Label";export{l as L};
@@ -1 +1 @@
1
- import{c as p,r as N,j as n}from"./vendor-D33xZtEC.js";import{c as v}from"./index-CGo5Vnh0.js";const y=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,f=p,w=(r,t)=>e=>{var i;if((t==null?void 0:t.variants)==null)return f(r,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:u,defaultVariants:o}=t,g=Object.keys(u).map(a=>{const s=e==null?void 0:e[a],d=o==null?void 0:o[a];if(s===null)return null;const l=y(s)||y(d);return u[a][l]}),m=e&&Object.entries(e).reduce((a,s)=>{let[d,l]=s;return l===void 0||(a[d]=l),a},{}),b=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((a,s)=>{let{class:d,className:l,...h}=s;return Object.entries(h).every(j=>{let[x,c]=j;return Array.isArray(c)?c.includes({...o,...m}[x]):{...o,...m}[x]===c})?[...a,d,l]:a},[]);return f(r,g,b,e==null?void 0:e.class,e==null?void 0:e.className)},V=w("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-all duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-gray-200 bg-white hover:bg-gray-50 hover:text-gray-800 text-gray-600",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200/80",ghost:"hover:bg-gray-100/80 hover:text-gray-800",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm",subtle:"bg-gray-100 text-gray-600 hover:bg-gray-200/80","primary-outline":"border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"h-11 px-5 text-[14px]",xl:"h-12 px-6 text-[15px]",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),k=N.forwardRef(({className:r,variant:t,size:e,...i},u)=>n.jsx("button",{className:v(V({variant:t,size:e,className:r})),ref:u,...i}));k.displayName="Button";function O({children:r,fullHeight:t=!1,className:e}){return n.jsx("div",{className:v("animate-fade-in",t?"h-[calc(100vh-80px)] w-full flex flex-col":"pb-16",e),children:r})}function B({title:r,description:t,actions:e,className:i}){return n.jsxs("div",{className:v("flex items-center justify-between mb-6 shrink-0",i),children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r}),t&&n.jsx("p",{className:"text-sm text-gray-500 mt-1",children:t})]}),e&&n.jsx("div",{className:"flex items-center gap-2 shrink-0",children:e})]})}export{k as B,O as P,B as a};
1
+ import{c as p,r as N,j as n}from"./vendor-C--HHaLf.js";import{c as v}from"./index-dKTqKCJo.js";const y=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,f=p,w=(r,t)=>e=>{var i;if((t==null?void 0:t.variants)==null)return f(r,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:u,defaultVariants:o}=t,g=Object.keys(u).map(a=>{const s=e==null?void 0:e[a],d=o==null?void 0:o[a];if(s===null)return null;const l=y(s)||y(d);return u[a][l]}),m=e&&Object.entries(e).reduce((a,s)=>{let[d,l]=s;return l===void 0||(a[d]=l),a},{}),b=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((a,s)=>{let{class:d,className:l,...h}=s;return Object.entries(h).every(j=>{let[x,c]=j;return Array.isArray(c)?c.includes({...o,...m}[x]):{...o,...m}[x]===c})?[...a,d,l]:a},[]);return f(r,g,b,e==null?void 0:e.class,e==null?void 0:e.className)},V=w("inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-all duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-gray-200 bg-white hover:bg-gray-50 hover:text-gray-800 text-gray-600",secondary:"bg-gray-100 text-gray-700 hover:bg-gray-200/80",ghost:"hover:bg-gray-100/80 hover:text-gray-800",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm",subtle:"bg-gray-100 text-gray-600 hover:bg-gray-200/80","primary-outline":"border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"h-11 px-5 text-[14px]",xl:"h-12 px-6 text-[15px]",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),k=N.forwardRef(({className:r,variant:t,size:e,...i},u)=>n.jsx("button",{className:v(V({variant:t,size:e,className:r})),ref:u,...i}));k.displayName="Button";function O({children:r,fullHeight:t=!1,className:e}){return n.jsx("div",{className:v("animate-fade-in",t?"h-[calc(100vh-80px)] w-full flex flex-col":"pb-16",e),children:r})}function B({title:r,description:t,actions:e,className:i}){return n.jsxs("div",{className:v("flex items-center justify-between mb-6 shrink-0",i),children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r}),t&&n.jsx("p",{className:"text-sm text-gray-500 mt-1",children:t})]}),e&&n.jsx("div",{className:"flex items-center gap-2 shrink-0",children:e})]})}export{k as B,O as P,B as a};
@@ -1,4 +1,4 @@
1
- import{j as h,_ as C}from"./vendor-D33xZtEC.js";import{t as b,c as N}from"./index-CGo5Vnh0.js";function L({status:t,className:n}){const e=t==="running"?b("sessionsRunStatusRunning"):b("sessionsRunStatusQueued");return h.jsxs("span",{className:N("inline-flex h-3.5 w-3.5 items-center justify-center text-gray-400",n),title:e,"aria-label":e,children:[h.jsx(C,{className:"h-3 w-3 animate-spin"}),h.jsx("span",{className:"sr-only",children:e})]})}const j=["cmd","command","query","q","path","url","to","channel","agentId","sessionKey"];function d(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function x(t,n=2400){return t.length<=n?t:`${t.slice(0,n)}
1
+ import{j as h,_ as C}from"./vendor-C--HHaLf.js";import{t as b,c as N}from"./index-dKTqKCJo.js";function L({status:t,className:n}){const e=t==="running"?b("sessionsRunStatusRunning"):b("sessionsRunStatusQueued");return h.jsxs("span",{className:N("inline-flex h-3.5 w-3.5 items-center justify-center text-gray-400",n),title:e,"aria-label":e,children:[h.jsx(C,{className:"h-3 w-3 animate-spin"}),h.jsx("span",{className:"sr-only",children:e})]})}const j=["cmd","command","query","q","path","url","to","channel","agentId","sessionKey"];function d(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function x(t,n=2400){return t.length<=n?t:`${t.slice(0,n)}
2
2
  …`}function S(t){if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(t==null)return"";try{return x(JSON.stringify(t,null,2))}catch{return String(t)}}function w(t){if(d(t))return t;if(typeof t!="string")return null;const n=t.trim();if(!n.startsWith("{")&&!n.startsWith("["))return null;try{const e=JSON.parse(n);return d(e)?e:null}catch{return null}}function F(t){const n=w(t);if(!n){const s=S(t).trim();return s?x(s,120):void 0}const e=[];for(const s of j){const i=n[s];if(typeof i=="string"&&i.trim()?e.push(`${s}: ${i.trim()}`):(typeof i=="number"||typeof i=="boolean")&&e.push(`${s}: ${String(i)}`),e.length>=2)break}return e.length>0?e.join(" · "):x(S(n),140)}function T(t){return typeof t!="string"||!t.trim()?"tool":t.trim()}function q(t){return Array.isArray(t.tool_calls)&&t.tool_calls.length>0}function A(t){const n=t.role.toLowerCase().trim();return n==="user"?"user":n==="assistant"?"assistant":n==="system"?"system":n==="tool"||n==="tool_result"||n==="toolresult"||n==="function"||typeof t.tool_call_id=="string"||Array.isArray(t.tool_calls)||typeof t.name=="string"?"tool":"other"}function y(t){if(typeof t=="string")return t;if(Array.isArray(t)){const n=[];for(const e of t){if(typeof e=="string"){n.push(e);continue}if(d(e)){if(typeof e.text=="string"){n.push(e.text);continue}typeof e.content=="string"&&n.push(e.content)}}if(n.length>0)return n.join(`
3
3
  `)}return S(t)}function k(t){const n=[],e=Array.isArray(t.tool_calls)?t.tool_calls:[];for(const s of e){if(!d(s))continue;const i=d(s.function)?s.function:null,c=T((i==null?void 0:i.name)??s.name),_=(i==null?void 0:i.arguments)??s.arguments;n.push({kind:"call",name:c,detail:F(_),callId:typeof s.id=="string"&&s.id.trim()?s.id:void 0,hasResult:!1})}return n}function z(t){var s;const n=k(t);return(A(t)==="tool"||typeof t.tool_call_id=="string")&&n.push({kind:"result",name:T(t.name??((s=n[0])==null?void 0:s.name)),text:y(t.content).trim(),callId:typeof t.tool_call_id=="string"?t.tool_call_id:void 0,hasResult:!0}),n}function M(t,n){var i;const e=Number.isFinite(t.seq)&&t.seq>0?Math.trunc(t.seq):n+1,s=typeof t.timestamp=="string"&&t.timestamp?t.timestamp:((i=t.message)==null?void 0:i.timestamp)??new Date().toISOString();return{...t,timestamp:s,_idx:n,_seq:e}}function B(t){const n=A(t);return n==="assistant"&&q(t)?"assistant.tool_call":n==="tool"?"tool.result":`message.${n}`}function P(t){return t.map((n,e)=>({seq:e+1,type:B(n),timestamp:n.timestamp,message:n}))}function O(t,n){return n?t?`${t}
4
4
 
@@ -1 +1 @@
1
- import{r as e,j as i}from"./vendor-D33xZtEC.js";import{c as t}from"./index-CGo5Vnh0.js";const l=e.forwardRef(({className:o,checked:r=!1,onCheckedChange:s,...a},n)=>i.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:n,className:t("peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",r?"bg-primary":"bg-gray-200/80 hover:bg-gray-300/80",o),onClick:()=>s==null?void 0:s(!r),...a,children:i.jsx("span",{className:t("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform duration-fast",r?"translate-x-5":"translate-x-0")})}));l.displayName="Switch";export{l as S};
1
+ import{r as e,j as i}from"./vendor-C--HHaLf.js";import{c as t}from"./index-dKTqKCJo.js";const l=e.forwardRef(({className:o,checked:r=!1,onCheckedChange:s,...a},n)=>i.jsx("button",{type:"button",role:"switch","aria-checked":r,ref:n,className:t("peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",r?"bg-primary":"bg-gray-200/80 hover:bg-gray-300/80",o),onClick:()=>s==null?void 0:s(!r),...a,children:i.jsx("span",{className:t("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-md ring-0 transition-transform duration-fast",r?"translate-x-5":"translate-x-0")})}));l.displayName="Switch";export{l as S};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-D33xZtEC.js";import{U as m,c as s}from"./index-CGo5Vnh0.js";function c({tabs:a,activeTab:i,onChange:o,className:n}){return e.jsx("div",{className:s("flex items-center gap-6 border-b border-gray-200/60 mb-6",n),children:a.map(t=>{const r=i===t.id;return e.jsxs("button",{onClick:()=>o(t.id),className:s("relative pb-3 text-[14px] font-medium transition-all duration-fast flex items-center gap-1.5",r?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[t.label,t.count!==void 0&&e.jsx("span",{className:s("text-[11px] font-medium","text-gray-500"),children:m(t.count)}),r&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-primary rounded-full"})]},t.id)})})}export{c as T};
1
+ import{j as e}from"./vendor-C--HHaLf.js";import{U as m,c as s}from"./index-dKTqKCJo.js";function c({tabs:a,activeTab:i,onChange:o,className:n}){return e.jsx("div",{className:s("flex items-center gap-6 border-b border-gray-200/60 mb-6",n),children:a.map(t=>{const r=i===t.id;return e.jsxs("button",{onClick:()=>o(t.id),className:s("relative pb-3 text-[14px] font-medium transition-all duration-fast flex items-center gap-1.5",r?"text-gray-900":"text-gray-600 hover:text-gray-900"),children:[t.label,t.count!==void 0&&e.jsx("span",{className:s("text-[11px] font-medium","text-gray-500"),children:m(t.count)}),r&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-primary rounded-full"})]},t.id)})})}export{c as T};
@@ -1,5 +1,5 @@
1
- import{r as i,ag as b,aU as I,ad as ie,j as s,af as A,al as le,ah as h,ai as D,am as ce,an as de,ao as ue,aq as fe,ar as ge,as as me,ap as pe,aV as ve,ax as xe}from"./vendor-D33xZtEC.js";import{c as N,t as x}from"./index-CGo5Vnh0.js";import{B as w}from"./page-layout-BOgLC2tK.js";function Ne(e,t){return i.useReducer((o,a)=>t[o][a]??o,e)}var E=e=>{const{present:t,children:o}=e,a=De(t),r=typeof o=="function"?o({present:a.isPresent}):i.Children.only(o),n=b(a.ref,he(r));return typeof o=="function"||a.isPresent?i.cloneElement(r,{ref:n}):null};E.displayName="Presence";function De(e){const[t,o]=i.useState(),a=i.useRef(null),r=i.useRef(e),n=i.useRef("none"),l=e?"mounted":"unmounted",[c,u]=Ne(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=y(a.current);n.current=c==="mounted"?d:"none"},[c]),I(()=>{const d=a.current,f=r.current;if(f!==e){const C=n.current,p=y(d);e?u("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&C!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),I(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const re=y(a.current).includes(CSS.escape(p.animationName));if(p.target===t&&re&&(u("ANIMATION_END"),!r.current)){const se=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=se)})}},C=p=>{p.target===t&&(n.current=y(a.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(d=>{a.current=d?getComputedStyle(d):null,o(d)},[])}}function y(e){return(e==null?void 0:e.animationName)||"none"}function he(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var O="Dialog",[M]=ce(O),[Ce,g]=M(O),T=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:r,onOpenChange:n,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d,f]=ie({prop:a,defaultProp:r??!1,onChange:n,caller:O});return s.jsx(Ce,{scope:t,triggerRef:c,contentRef:u,contentId:A(),titleId:A(),descriptionId:A(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),modal:l,children:o})};T.displayName=O;var S="DialogTrigger",ye=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(S,o),n=b(t,r.triggerRef);return s.jsx(h.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":_(r.open),...a,ref:n,onClick:D(e.onClick,r.onOpenToggle)})});ye.displayName=S;var j="DialogPortal",[Re,F]=M(j,{forceMount:void 0}),L=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:r}=e,n=g(j,t);return s.jsx(Re,{scope:t,forceMount:o,children:i.Children.map(a,l=>s.jsx(E,{present:o||n.open,children:s.jsx(le,{asChild:!0,container:r,children:l})}))})};L.displayName=j;var R="DialogOverlay",W=i.forwardRef((e,t)=>{const o=F(R,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(R,e.__scopeDialog);return n.modal?s.jsx(E,{present:a||n.open,children:s.jsx(Ee,{...r,ref:t})}):null});W.displayName=R;var be=pe("DialogOverlay.RemoveScroll"),Ee=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(R,o);return s.jsx(ue,{as:be,allowPinchZoom:!0,shards:[r.contentRef],children:s.jsx(h.div,{"data-state":_(r.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),v="DialogContent",k=i.forwardRef((e,t)=>{const o=F(v,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(v,e.__scopeDialog);return s.jsx(E,{present:a||n.open,children:n.modal?s.jsx(Oe,{...r,ref:t}):s.jsx(Ae,{...r,ref:t})})});k.displayName=v;var Oe=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(null),r=b(t,o.contentRef,a);return i.useEffect(()=>{const n=a.current;if(n)return de(n)},[]),s.jsx(U,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,n=>{var l;n.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:D(e.onFocusOutside,n=>n.preventDefault())})}),Ae=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(!1),r=i.useRef(!1);return s.jsx(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,n),n.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),n.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:n=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,n),n.defaultPrevented||(a.current=!0,n.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=n.target;((d=o.triggerRef.current)==null?void 0:d.contains(l))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&r.current&&n.preventDefault()}})}),U=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:n,...l}=e,c=g(v,o),u=i.useRef(null),d=b(t,u);return fe(),s.jsxs(s.Fragment,{children:[s.jsx(ge,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:n,children:s.jsx(me,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":_(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(je,{titleId:c.titleId}),s.jsx(_e,{contentRef:u,descriptionId:c.descriptionId})]})]})}),P="DialogTitle",$=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(P,o);return s.jsx(h.h2,{id:r.titleId,...a,ref:t})});$.displayName=P;var G="DialogDescription",B=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(G,o);return s.jsx(h.p,{id:r.descriptionId,...a,ref:t})});B.displayName=G;var z="DialogClose",H=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(z,o);return s.jsx(h.button,{type:"button",...a,ref:t,onClick:D(e.onClick,()=>r.onOpenChange(!1))})});H.displayName=z;function _(e){return e?"open":"closed"}var V="DialogTitleWarning",[$e,q]=ve(V,{contentName:v,titleName:P,docsSlug:"dialog"}),je=({titleId:e})=>{const t=q(V),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ import{r as i,aj as b,aU as I,ad as ie,j as s,af as j,ai as le,ak as h,al as D,am as ce,an as de,ao as ue,aq as fe,ar as ge,as as me,ap as pe,aV as ve,ax as xe}from"./vendor-C--HHaLf.js";import{c as N,t as x}from"./index-dKTqKCJo.js";import{B as w}from"./page-layout-DA6PFRtQ.js";function Ne(e,t){return i.useReducer((o,a)=>t[o][a]??o,e)}var E=e=>{const{present:t,children:o}=e,a=De(t),r=typeof o=="function"?o({present:a.isPresent}):i.Children.only(o),n=b(a.ref,he(r));return typeof o=="function"||a.isPresent?i.cloneElement(r,{ref:n}):null};E.displayName="Presence";function De(e){const[t,o]=i.useState(),a=i.useRef(null),r=i.useRef(e),n=i.useRef("none"),l=e?"mounted":"unmounted",[c,u]=Ne(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=y(a.current);n.current=c==="mounted"?d:"none"},[c]),I(()=>{const d=a.current,f=r.current;if(f!==e){const C=n.current,p=y(d);e?u("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&C!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),I(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=p=>{const re=y(a.current).includes(CSS.escape(p.animationName));if(p.target===t&&re&&(u("ANIMATION_END"),!r.current)){const se=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=se)})}},C=p=>{p.target===t&&(n.current=y(a.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(d=>{a.current=d?getComputedStyle(d):null,o(d)},[])}}function y(e){return(e==null?void 0:e.animationName)||"none"}function he(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var O="Dialog",[M]=ce(O),[Ce,g]=M(O),T=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:r,onOpenChange:n,modal:l=!0}=e,c=i.useRef(null),u=i.useRef(null),[d,f]=ie({prop:a,defaultProp:r??!1,onChange:n,caller:O});return s.jsx(Ce,{scope:t,triggerRef:c,contentRef:u,contentId:j(),titleId:j(),descriptionId:j(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),modal:l,children:o})};T.displayName=O;var S="DialogTrigger",ye=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(S,o),n=b(t,r.triggerRef);return s.jsx(h.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":_(r.open),...a,ref:n,onClick:D(e.onClick,r.onOpenToggle)})});ye.displayName=S;var A="DialogPortal",[Re,F]=M(A,{forceMount:void 0}),L=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:r}=e,n=g(A,t);return s.jsx(Re,{scope:t,forceMount:o,children:i.Children.map(a,l=>s.jsx(E,{present:o||n.open,children:s.jsx(le,{asChild:!0,container:r,children:l})}))})};L.displayName=A;var R="DialogOverlay",k=i.forwardRef((e,t)=>{const o=F(R,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(R,e.__scopeDialog);return n.modal?s.jsx(E,{present:a||n.open,children:s.jsx(Ee,{...r,ref:t})}):null});k.displayName=R;var be=pe("DialogOverlay.RemoveScroll"),Ee=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(R,o);return s.jsx(ue,{as:be,allowPinchZoom:!0,shards:[r.contentRef],children:s.jsx(h.div,{"data-state":_(r.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),v="DialogContent",W=i.forwardRef((e,t)=>{const o=F(v,e.__scopeDialog),{forceMount:a=o.forceMount,...r}=e,n=g(v,e.__scopeDialog);return s.jsx(E,{present:a||n.open,children:n.modal?s.jsx(Oe,{...r,ref:t}):s.jsx(je,{...r,ref:t})})});W.displayName=v;var Oe=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(null),r=b(t,o.contentRef,a);return i.useEffect(()=>{const n=a.current;if(n)return de(n)},[]),s.jsx(U,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,n=>{var l;n.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:D(e.onFocusOutside,n=>n.preventDefault())})}),je=i.forwardRef((e,t)=>{const o=g(v,e.__scopeDialog),a=i.useRef(!1),r=i.useRef(!1);return s.jsx(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,n),n.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),n.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:n=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,n),n.defaultPrevented||(a.current=!0,n.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=n.target;((d=o.triggerRef.current)==null?void 0:d.contains(l))&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&r.current&&n.preventDefault()}})}),U=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:n,...l}=e,c=g(v,o),u=i.useRef(null),d=b(t,u);return fe(),s.jsxs(s.Fragment,{children:[s.jsx(ge,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:n,children:s.jsx(me,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":_(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(Ae,{titleId:c.titleId}),s.jsx(_e,{contentRef:u,descriptionId:c.descriptionId})]})]})}),P="DialogTitle",$=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(P,o);return s.jsx(h.h2,{id:r.titleId,...a,ref:t})});$.displayName=P;var G="DialogDescription",B=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(G,o);return s.jsx(h.p,{id:r.descriptionId,...a,ref:t})});B.displayName=G;var z="DialogClose",H=i.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,r=g(z,o);return s.jsx(h.button,{type:"button",...a,ref:t,onClick:D(e.onClick,()=>r.onOpenChange(!1))})});H.displayName=z;function _(e){return e?"open":"closed"}var V="DialogTitleWarning",[$e,q]=ve(V,{contentName:v,titleName:P,docsSlug:"dialog"}),Ae=({titleId:e})=>{const t=q(V),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4
 
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},Pe="DialogDescriptionWarning",_e=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q(Pe).contentName}}.`;return i.useEffect(()=>{var n;const r=(n=e.current)==null?void 0:n.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ie=T,we=L,K=W,X=k,Y=$,Z=B,Me=H;const Te=Ie,Se=we,J=i.forwardRef(({className:e,...t},o)=>s.jsx(K,{ref:o,className:N("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));J.displayName=K.displayName;const Q=i.forwardRef(({className:e,children:t,...o},a)=>s.jsxs(Se,{children:[s.jsx(J,{}),s.jsxs(X,{ref:a,className:N("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200/50 bg-white p-6 shadow-xl duration-base data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-2xl",e),...o,children:[t,s.jsxs(Me,{className:"absolute right-4 top-4 rounded-lg p-1 opacity-70 ring-offset-white transition-all duration-fast hover:opacity-100 hover:bg-gray-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(xe,{className:"h-4 w-4 text-gray-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Q.displayName=X.displayName;const ee=({className:e,...t})=>s.jsx("div",{className:N("flex flex-col space-y-2 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";const te=({className:e,...t})=>s.jsx("div",{className:N("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-3",e),...t});te.displayName="DialogFooter";const ne=i.forwardRef(({className:e,...t},o)=>s.jsx(Y,{ref:o,className:N("text-lg font-semibold leading-tight tracking-tight text-gray-900",e),...t}));ne.displayName=Y.displayName;const oe=i.forwardRef(({className:e,...t},o)=>s.jsx(Z,{ref:o,className:N("text-sm text-gray-500 leading-relaxed",e),...t}));oe.displayName=Z.displayName;const Fe=({open:e,onOpenChange:t,title:o,description:a,confirmLabel:r=x("confirm"),cancelLabel:n=x("cancel"),variant:l="default",onConfirm:c,onCancel:u})=>{const d=()=>{c(),t(!1)},f=()=>{u(),t(!1)};return s.jsx(Te,{open:e,onOpenChange:t,children:s.jsxs(Q,{className:"[&>:last-child]:hidden",onCloseAutoFocus:m=>m.preventDefault(),children:[s.jsxs(ee,{children:[s.jsx(ne,{children:o}),a?s.jsx(oe,{children:a}):null]}),s.jsxs(te,{className:"gap-2 sm:gap-0",children:[s.jsx(w,{type:"button",variant:"outline",onClick:f,children:n}),s.jsx(w,{type:"button",variant:l==="destructive"?"destructive":"default",onClick:d,children:r})]})]})})},Le={open:!1,title:"",description:"",confirmLabel:x("confirm"),cancelLabel:x("cancel"),variant:"default",resolve:null};function Ge(){const[e,t]=i.useState(Le),o=i.useCallback(n=>new Promise(l=>{t({open:!0,title:n.title,description:n.description??"",confirmLabel:n.confirmLabel??x("confirm"),cancelLabel:n.cancelLabel??x("cancel"),variant:n.variant??"default",resolve:c=>{l(c),t(u=>({...u,open:!1,resolve:null}))}})}),[]),a=i.useCallback(n=>{t(l=>(!n&&l.resolve&&l.resolve(!1),{...l,open:n,resolve:n?l.resolve:null}))},[]),r=i.useCallback(()=>s.jsx(Fe,{open:e.open,onOpenChange:a,title:e.title,description:e.description||void 0,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant,onConfirm:()=>{var n;return(n=e.resolve)==null?void 0:n.call(e,!0)},onCancel:()=>{var n;return(n=e.resolve)==null?void 0:n.call(e,!1)}}),[e,a]);return{confirm:o,ConfirmDialog:r}}export{E as P,Ge as u};
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},Pe="DialogDescriptionWarning",_e=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q(Pe).contentName}}.`;return i.useEffect(()=>{var n;const r=(n=e.current)==null?void 0:n.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ie=T,we=L,K=k,X=W,Y=$,Z=B,Me=H;const Te=Ie,Se=we,J=i.forwardRef(({className:e,...t},o)=>s.jsx(K,{ref:o,className:N("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));J.displayName=K.displayName;const Q=i.forwardRef(({className:e,children:t,...o},a)=>s.jsxs(Se,{children:[s.jsx(J,{}),s.jsxs(X,{ref:a,className:N("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200/50 bg-white p-6 shadow-xl duration-base data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-2xl",e),...o,children:[t,s.jsxs(Me,{className:"absolute right-4 top-4 rounded-lg p-1 opacity-70 ring-offset-white transition-all duration-fast hover:opacity-100 hover:bg-gray-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(xe,{className:"h-4 w-4 text-gray-500"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Q.displayName=X.displayName;const ee=({className:e,...t})=>s.jsx("div",{className:N("flex flex-col space-y-2 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";const te=({className:e,...t})=>s.jsx("div",{className:N("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-3",e),...t});te.displayName="DialogFooter";const ne=i.forwardRef(({className:e,...t},o)=>s.jsx(Y,{ref:o,className:N("text-lg font-semibold leading-tight tracking-tight text-gray-900",e),...t}));ne.displayName=Y.displayName;const oe=i.forwardRef(({className:e,...t},o)=>s.jsx(Z,{ref:o,className:N("text-sm text-gray-500 leading-relaxed",e),...t}));oe.displayName=Z.displayName;const Fe=({open:e,onOpenChange:t,title:o,description:a,confirmLabel:r=x("confirm"),cancelLabel:n=x("cancel"),variant:l="default",onConfirm:c,onCancel:u})=>{const d=()=>{c(),t(!1)},f=()=>{u(),t(!1)};return s.jsx(Te,{open:e,onOpenChange:t,children:s.jsxs(Q,{className:"[&>:last-child]:hidden",onCloseAutoFocus:m=>m.preventDefault(),children:[s.jsxs(ee,{children:[s.jsx(ne,{children:o}),a?s.jsx(oe,{children:a}):null]}),s.jsxs(te,{className:"gap-2 sm:gap-0",children:[s.jsx(w,{type:"button",variant:"outline",onClick:f,children:n}),s.jsx(w,{type:"button",variant:l==="destructive"?"destructive":"default",onClick:d,children:r})]})]})})},Le={open:!1,title:"",description:"",confirmLabel:x("confirm"),cancelLabel:x("cancel"),variant:"default",resolve:null};function Ge(){const[e,t]=i.useState(Le),o=i.useCallback(n=>new Promise(l=>{t({open:!0,title:n.title,description:n.description??"",confirmLabel:n.confirmLabel??x("confirm"),cancelLabel:n.cancelLabel??x("cancel"),variant:n.variant??"default",resolve:c=>{l(c),t(u=>({...u,open:!1,resolve:null}))}})}),[]),a=i.useCallback(n=>{t(l=>(!n&&l.resolve&&l.resolve(!1),{...l,open:n,resolve:n?l.resolve:null}))},[]),r=i.useCallback(()=>s.jsx(Fe,{open:e.open,onOpenChange:a,title:e.title,description:e.description||void 0,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant,onConfirm:()=>{var n;return(n=e.resolve)==null?void 0:n.call(e,!0)},onCancel:()=>{var n;return(n=e.resolve)==null?void 0:n.call(e,!1)}}),[e,a]);return{confirm:o,ConfirmDialog:r}}export{E as P,Ge as u};
@@ -399,4 +399,4 @@ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}
399
399
  `)},Kh=function(){var n=parseInt(document.body.getAttribute(ei)||"0",10);return isFinite(n)?n:0},oC=function(){g.useEffect(function(){return document.body.setAttribute(ei,(Kh()+1).toString()),function(){var n=Kh()-1;n<=0?document.body.removeAttribute(ei):document.body.setAttribute(ei,n.toString())}},[])},iC=function(n){var r=n.noRelative,i=n.noImportant,l=n.gapMode,u=l===void 0?"margin":l;oC();var c=g.useMemo(function(){return tC(u)},[u]);return g.createElement(nC,{styles:rC(c,!r,u,i?"":"!important")})},zc=!1;if(typeof window<"u")try{var $l=Object.defineProperty({},"passive",{get:function(){return zc=!0,!0}});window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{zc=!1}var qo=zc?{passive:!1}:!1,sC=function(n){return n.tagName==="TEXTAREA"},Av=function(n,r){if(!(n instanceof Element))return!1;var i=window.getComputedStyle(n);return i[r]!=="hidden"&&!(i.overflowY===i.overflowX&&!sC(n)&&i[r]==="visible")},lC=function(n){return Av(n,"overflowY")},aC=function(n){return Av(n,"overflowX")},Yh=function(n,r){var i=r.ownerDocument,l=r;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var u=Dv(n,l);if(u){var c=Fv(n,l),f=c[1],p=c[2];if(f>p)return!0}l=l.parentNode}while(l&&l!==i.body);return!1},uC=function(n){var r=n.scrollTop,i=n.scrollHeight,l=n.clientHeight;return[r,i,l]},cC=function(n){var r=n.scrollLeft,i=n.scrollWidth,l=n.clientWidth;return[r,i,l]},Dv=function(n,r){return n==="v"?lC(r):aC(r)},Fv=function(n,r){return n==="v"?uC(r):cC(r)},dC=function(n,r){return n==="h"&&r==="rtl"?-1:1},fC=function(n,r,i,l,u){var c=dC(n,window.getComputedStyle(r).direction),f=c*l,p=i.target,h=r.contains(p),v=!1,w=f>0,x=0,E=0;do{if(!p)break;var y=Fv(n,p),O=y[0],S=y[1],C=y[2],P=S-C-c*O;(O||P)&&Dv(n,p)&&(x+=P,E+=O);var T=p.parentNode;p=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&p!==document.body||h&&(r.contains(p)||r===p));return(w&&Math.abs(x)<1||!w&&Math.abs(E)<1)&&(v=!0),v},Wl=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Gh=function(n){return[n.deltaX,n.deltaY]},qh=function(n){return n&&"current"in n?n.current:n},pC=function(n,r){return n[0]===r[0]&&n[1]===r[1]},hC=function(n){return`
400
400
  .block-interactivity-`.concat(n,` {pointer-events: none;}
401
401
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
402
- `)},mC=0,Xo=[];function vC(n){var r=g.useRef([]),i=g.useRef([0,0]),l=g.useRef(),u=g.useState(mC++)[0],c=g.useState(Iv)[0],f=g.useRef(n);g.useEffect(function(){f.current=n},[n]),g.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var S=F2([n.lockRef.current],(n.shards||[]).map(qh),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var p=g.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var P=Wl(S),T=i.current,R="deltaX"in S?S.deltaX:T[0]-P[0],L="deltaY"in S?S.deltaY:T[1]-P[1],z,U=S.target,H=Math.abs(R)>Math.abs(L)?"h":"v";if("touches"in S&&H==="h"&&U.type==="range")return!1;var Y=window.getSelection(),Z=Y&&Y.anchorNode,te=Z?Z===U||Z.contains(U):!1;if(te)return!1;var he=Yh(H,U);if(!he)return!0;if(he?z=H:(z=H==="v"?"h":"v",he=Yh(H,U)),!he)return!1;if(!l.current&&"changedTouches"in S&&(R||L)&&(l.current=z),!z)return!0;var X=l.current||z;return fC(X,C,S,X==="h"?R:L)},[]),h=g.useCallback(function(S){var C=S;if(!(!Xo.length||Xo[Xo.length-1]!==c)){var P="deltaY"in C?Gh(C):Wl(C),T=r.current.filter(function(z){return z.name===C.type&&(z.target===C.target||C.target===z.shadowParent)&&pC(z.delta,P)})[0];if(T&&T.should){C.cancelable&&C.preventDefault();return}if(!T){var R=(f.current.shards||[]).map(qh).filter(Boolean).filter(function(z){return z.contains(C.target)}),L=R.length>0?p(C,R[0]):!f.current.noIsolation;L&&C.cancelable&&C.preventDefault()}}},[]),v=g.useCallback(function(S,C,P,T){var R={name:S,delta:C,target:P,should:T,shadowParent:yC(P)};r.current.push(R),setTimeout(function(){r.current=r.current.filter(function(L){return L!==R})},1)},[]),w=g.useCallback(function(S){i.current=Wl(S),l.current=void 0},[]),x=g.useCallback(function(S){v(S.type,Gh(S),S.target,p(S,n.lockRef.current))},[]),E=g.useCallback(function(S){v(S.type,Wl(S),S.target,p(S,n.lockRef.current))},[]);g.useEffect(function(){return Xo.push(c),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:E}),document.addEventListener("wheel",h,qo),document.addEventListener("touchmove",h,qo),document.addEventListener("touchstart",w,qo),function(){Xo=Xo.filter(function(S){return S!==c}),document.removeEventListener("wheel",h,qo),document.removeEventListener("touchmove",h,qo),document.removeEventListener("touchstart",w,qo)}},[]);var y=n.removeScrollBar,O=n.inert;return g.createElement(g.Fragment,null,O?g.createElement(c,{styles:hC(u)}):null,y?g.createElement(iC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function yC(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const gC=Q2(Lv,vC);var zv=g.forwardRef(function(n,r){return g.createElement(fa,Ln({},n,{ref:r,sideCar:gC}))});zv.classNames=fa.classNames;var wC=[" ","Enter","ArrowUp","ArrowDown"],xC=[" ","Enter"],xo="Select",[pa,ha,SC]=Ix(xo),[Si]=id(xo,[SC,gv]),ma=gv(),[CC,$r]=Si(xo),[EC,kC]=Si(xo),jv=n=>{const{__scopeSelect:r,children:i,open:l,defaultOpen:u,onOpenChange:c,value:f,defaultValue:p,onValueChange:h,dir:v,name:w,autoComplete:x,disabled:E,required:y,form:O}=n,S=ma(r),[C,P]=g.useState(null),[T,R]=g.useState(null),[L,z]=g.useState(!1),U=Dx(v),[H,Y]=Vh({prop:l,defaultProp:u??!1,onChange:c,caller:xo}),[Z,te]=Vh({prop:f,defaultProp:p,onChange:h,caller:xo}),he=g.useRef(null),X=C?O||!!C.closest("form"):!0,[ye,ce]=g.useState(new Set),xe=Array.from(ye).map(ae=>ae.props.value).join(";");return ee.jsx(E2,{...S,children:ee.jsxs(CC,{required:y,scope:r,trigger:C,onTriggerChange:P,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:L,onValueNodeHasChildrenChange:z,contentId:sd(),value:Z,onValueChange:te,open:H,onOpenChange:Y,dir:U,triggerPointerDownPosRef:he,disabled:E,children:[ee.jsx(pa.Provider,{scope:r,children:ee.jsx(EC,{scope:n.__scopeSelect,onNativeOptionAdd:g.useCallback(ae=>{ce(ie=>new Set(ie).add(ae))},[]),onNativeOptionRemove:g.useCallback(ae=>{ce(ie=>{const j=new Set(ie);return j.delete(ae),j})},[]),children:i})}),X?ee.jsxs(uy,{"aria-hidden":!0,required:y,tabIndex:-1,name:w,autoComplete:x,value:Z,onChange:ae=>te(ae.target.value),disabled:E,form:O,children:[Z===void 0?ee.jsx("option",{value:""}):null,Array.from(ye)]},xe):null]})})};jv.displayName=xo;var Bv="SelectTrigger",Uv=g.forwardRef((n,r)=>{const{__scopeSelect:i,disabled:l=!1,...u}=n,c=ma(i),f=$r(Bv,i),p=f.disabled||l,h=ct(r,f.onTriggerChange),v=ha(i),w=g.useRef("touch"),[x,E,y]=dy(S=>{const C=v().filter(R=>!R.disabled),P=C.find(R=>R.value===f.value),T=fy(C,S,P);T!==void 0&&f.onValueChange(T.value)}),O=S=>{p||(f.onOpenChange(!0),y()),S&&(f.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return ee.jsx(k2,{asChild:!0,...c,children:ee.jsx(Xe.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:p,"data-disabled":p?"":void 0,"data-placeholder":cy(f.value)?"":void 0,...u,ref:h,onClick:Je(u.onClick,S=>{S.currentTarget.focus(),w.current!=="mouse"&&O(S)}),onPointerDown:Je(u.onPointerDown,S=>{w.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(O(S),S.preventDefault())}),onKeyDown:Je(u.onKeyDown,S=>{const C=x.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&E(S.key),!(C&&S.key===" ")&&wC.includes(S.key)&&(O(),S.preventDefault())})})})});Uv.displayName=Bv;var Hv="SelectValue",$v=g.forwardRef((n,r)=>{const{__scopeSelect:i,className:l,style:u,children:c,placeholder:f="",...p}=n,h=$r(Hv,i),{onValueNodeHasChildrenChange:v}=h,w=c!==void 0,x=ct(r,h.onValueNodeChange);return It(()=>{v(w)},[v,w]),ee.jsx(Xe.span,{...p,ref:x,style:{pointerEvents:"none"},children:cy(h.value)?ee.jsx(ee.Fragment,{children:f}):c})});$v.displayName=Hv;var bC="SelectIcon",Wv=g.forwardRef((n,r)=>{const{__scopeSelect:i,children:l,...u}=n;return ee.jsx(Xe.span,{"aria-hidden":!0,...u,ref:r,children:l||"▼"})});Wv.displayName=bC;var RC="SelectPortal",Vv=n=>ee.jsx(Pv,{asChild:!0,...n});Vv.displayName=RC;var So="SelectContent",Qv=g.forwardRef((n,r)=>{const i=$r(So,n.__scopeSelect),[l,u]=g.useState();if(It(()=>{u(new DocumentFragment)},[]),!i.open){const c=l;return c?xs.createPortal(ee.jsx(Kv,{scope:n.__scopeSelect,children:ee.jsx(pa.Slot,{scope:n.__scopeSelect,children:ee.jsx("div",{children:n.children})})}),c):null}return ee.jsx(Yv,{...n,ref:r})});Qv.displayName=So;var cn=10,[Kv,Wr]=Si(So),PC="SelectContentImpl",MC=ea("SelectContent.RemoveScroll"),Yv=g.forwardRef((n,r)=>{const{__scopeSelect:i,position:l="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:c,onPointerDownOutside:f,side:p,sideOffset:h,align:v,alignOffset:w,arrowPadding:x,collisionBoundary:E,collisionPadding:y,sticky:O,hideWhenDetached:S,avoidCollisions:C,...P}=n,T=$r(So,i),[R,L]=g.useState(null),[z,U]=g.useState(null),H=ct(r,K=>L(K)),[Y,Z]=g.useState(null),[te,he]=g.useState(null),X=ha(i),[ye,ce]=g.useState(!1),xe=g.useRef(!1);g.useEffect(()=>{if(R)return D2(R)},[R]),Kx();const ae=g.useCallback(K=>{const[fe,...Ce]=X().map(Oe=>Oe.ref.current),[be]=Ce.slice(-1),Me=document.activeElement;for(const Oe of K)if(Oe===Me||(Oe==null||Oe.scrollIntoView({block:"nearest"}),Oe===fe&&z&&(z.scrollTop=0),Oe===be&&z&&(z.scrollTop=z.scrollHeight),Oe==null||Oe.focus(),document.activeElement!==Me))return},[X,z]),ie=g.useCallback(()=>ae([Y,R]),[ae,Y,R]);g.useEffect(()=>{ye&&ie()},[ye,ie]);const{onOpenChange:j,triggerPointerDownPosRef:B}=T;g.useEffect(()=>{if(R){let K={x:0,y:0};const fe=be=>{var Me,Oe;K={x:Math.abs(Math.round(be.pageX)-(((Me=B.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Oe=B.current)==null?void 0:Oe.y)??0))}},Ce=be=>{K.x<=10&&K.y<=10?be.preventDefault():R.contains(be.target)||j(!1),document.removeEventListener("pointermove",fe),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[R,j,B]),g.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[V,N]=dy(K=>{const fe=X().filter(Me=>!Me.disabled),Ce=fe.find(Me=>Me.ref.current===document.activeElement),be=fy(fe,K,Ce);be&&setTimeout(()=>be.ref.current.focus())}),F=g.useCallback((K,fe,Ce)=>{const be=!xe.current&&!Ce;(T.value!==void 0&&T.value===fe||be)&&(Z(K),be&&(xe.current=!0))},[T.value]),ne=g.useCallback(()=>R==null?void 0:R.focus(),[R]),re=g.useCallback((K,fe,Ce)=>{const be=!xe.current&&!Ce;(T.value!==void 0&&T.value===fe||be)&&he(K)},[T.value]),ve=l==="popper"?jc:Gv,Se=ve===jc?{side:p,sideOffset:h,align:v,alignOffset:w,arrowPadding:x,collisionBoundary:E,collisionPadding:y,sticky:O,hideWhenDetached:S,avoidCollisions:C}:{};return ee.jsx(Kv,{scope:i,content:R,viewport:z,onViewportChange:U,itemRefCallback:F,selectedItem:Y,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:ie,selectedItemText:te,position:l,isPositioned:ye,searchRef:V,children:ee.jsx(zv,{as:MC,allowPinchZoom:!0,children:ee.jsx(rv,{asChild:!0,trapped:T.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Je(u,K=>{var fe;(fe=T.trigger)==null||fe.focus({preventScroll:!0}),K.preventDefault()}),children:ee.jsx(tv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:ee.jsx(ve,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:K=>K.preventDefault(),...P,...Se,onPlaced:()=>ce(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...P.style},onKeyDown:Je(P.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&N(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let be=X().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(K.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const Me=K.target,Oe=be.indexOf(Me);be=be.slice(Oe+1)}setTimeout(()=>ae(be)),K.preventDefault()}})})})})})})});Yv.displayName=PC;var TC="SelectItemAlignedPosition",Gv=g.forwardRef((n,r)=>{const{__scopeSelect:i,onPlaced:l,...u}=n,c=$r(So,i),f=Wr(So,i),[p,h]=g.useState(null),[v,w]=g.useState(null),x=ct(r,H=>w(H)),E=ha(i),y=g.useRef(!1),O=g.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:P,focusSelectedItem:T}=f,R=g.useCallback(()=>{if(c.trigger&&c.valueNode&&p&&v&&S&&C&&P){const H=c.trigger.getBoundingClientRect(),Y=v.getBoundingClientRect(),Z=c.valueNode.getBoundingClientRect(),te=P.getBoundingClientRect();if(c.dir!=="rtl"){const Me=te.left-Y.left,Oe=Z.left-Me,Ye=H.left-Oe,dt=H.width+Ye,yn=Math.max(dt,Y.width),Xt=window.innerWidth-cn,Zt=bh(Oe,[cn,Math.max(cn,Xt-yn)]);p.style.minWidth=dt+"px",p.style.left=Zt+"px"}else{const Me=Y.right-te.right,Oe=window.innerWidth-Z.right-Me,Ye=window.innerWidth-H.right-Oe,dt=H.width+Ye,yn=Math.max(dt,Y.width),Xt=window.innerWidth-cn,Zt=bh(Oe,[cn,Math.max(cn,Xt-yn)]);p.style.minWidth=dt+"px",p.style.right=Zt+"px"}const he=E(),X=window.innerHeight-cn*2,ye=S.scrollHeight,ce=window.getComputedStyle(v),xe=parseInt(ce.borderTopWidth,10),ae=parseInt(ce.paddingTop,10),ie=parseInt(ce.borderBottomWidth,10),j=parseInt(ce.paddingBottom,10),B=xe+ae+ye+j+ie,V=Math.min(C.offsetHeight*5,B),N=window.getComputedStyle(S),F=parseInt(N.paddingTop,10),ne=parseInt(N.paddingBottom,10),re=H.top+H.height/2-cn,ve=X-re,Se=C.offsetHeight/2,K=C.offsetTop+Se,fe=xe+ae+K,Ce=B-fe;if(fe<=re){const Me=he.length>0&&C===he[he.length-1].ref.current;p.style.bottom="0px";const Oe=v.clientHeight-S.offsetTop-S.offsetHeight,Ye=Math.max(ve,Se+(Me?ne:0)+Oe+ie),dt=fe+Ye;p.style.height=dt+"px"}else{const Me=he.length>0&&C===he[0].ref.current;p.style.top="0px";const Ye=Math.max(re,xe+S.offsetTop+(Me?F:0)+Se)+Ce;p.style.height=Ye+"px",S.scrollTop=fe-re+S.offsetTop}p.style.margin=`${cn}px 0`,p.style.minHeight=V+"px",p.style.maxHeight=X+"px",l==null||l(),requestAnimationFrame(()=>y.current=!0)}},[E,c.trigger,c.valueNode,p,v,S,C,P,c.dir,l]);It(()=>R(),[R]);const[L,z]=g.useState();It(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]);const U=g.useCallback(H=>{H&&O.current===!0&&(R(),T==null||T(),O.current=!1)},[R,T]);return ee.jsx(NC,{scope:i,contentWrapper:p,shouldExpandOnScrollRef:y,onScrollButtonChange:U,children:ee.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:ee.jsx(Xe.div,{...u,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});Gv.displayName=TC;var OC="SelectPopperPosition",jc=g.forwardRef((n,r)=>{const{__scopeSelect:i,align:l="start",collisionPadding:u=cn,...c}=n,f=ma(i);return ee.jsx(b2,{...f,...c,ref:r,align:l,collisionPadding:u,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jc.displayName=OC;var[NC,md]=Si(So,{}),Bc="SelectViewport",qv=g.forwardRef((n,r)=>{const{__scopeSelect:i,nonce:l,...u}=n,c=Wr(Bc,i),f=md(Bc,i),p=ct(r,c.onViewportChange),h=g.useRef(0);return ee.jsxs(ee.Fragment,{children:[ee.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),ee.jsx(pa.Slot,{scope:i,children:ee.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:p,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:Je(u.onScroll,v=>{const w=v.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:E}=f;if(E!=null&&E.current&&x){const y=Math.abs(h.current-w.scrollTop);if(y>0){const O=window.innerHeight-cn*2,S=parseFloat(x.style.minHeight),C=parseFloat(x.style.height),P=Math.max(S,C);if(P<O){const T=P+y,R=Math.min(O,T),L=T-R;x.style.height=R+"px",x.style.bottom==="0px"&&(w.scrollTop=L>0?L:0,x.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});qv.displayName=Bc;var Xv="SelectGroup",[_C,LC]=Si(Xv),IC=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=sd();return ee.jsx(_C,{scope:i,id:u,children:ee.jsx(Xe.div,{role:"group","aria-labelledby":u,...l,ref:r})})});IC.displayName=Xv;var Zv="SelectLabel",Jv=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=LC(Zv,i);return ee.jsx(Xe.div,{id:u.id,...l,ref:r})});Jv.displayName=Zv;var ia="SelectItem",[AC,ey]=Si(ia),ty=g.forwardRef((n,r)=>{const{__scopeSelect:i,value:l,disabled:u=!1,textValue:c,...f}=n,p=$r(ia,i),h=Wr(ia,i),v=p.value===l,[w,x]=g.useState(c??""),[E,y]=g.useState(!1),O=ct(r,T=>{var R;return(R=h.itemRefCallback)==null?void 0:R.call(h,T,l,u)}),S=sd(),C=g.useRef("touch"),P=()=>{u||(p.onValueChange(l),p.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return ee.jsx(AC,{scope:i,value:l,disabled:u,textId:S,isSelected:v,onItemTextChange:g.useCallback(T=>{x(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:ee.jsx(pa.ItemSlot,{scope:i,value:l,disabled:u,textValue:w,children:ee.jsx(Xe.div,{role:"option","aria-labelledby":S,"data-highlighted":E?"":void 0,"aria-selected":v&&E,"data-state":v?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:O,onFocus:Je(f.onFocus,()=>y(!0)),onBlur:Je(f.onBlur,()=>y(!1)),onClick:Je(f.onClick,()=>{C.current!=="mouse"&&P()}),onPointerUp:Je(f.onPointerUp,()=>{C.current==="mouse"&&P()}),onPointerDown:Je(f.onPointerDown,T=>{C.current=T.pointerType}),onPointerMove:Je(f.onPointerMove,T=>{var R;C.current=T.pointerType,u?(R=h.onItemLeave)==null||R.call(h):C.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(f.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=h.onItemLeave)==null||R.call(h))}),onKeyDown:Je(f.onKeyDown,T=>{var L;((L=h.searchRef)==null?void 0:L.current)!==""&&T.key===" "||(xC.includes(T.key)&&P(),T.key===" "&&T.preventDefault())})})})})});ty.displayName=ia;var us="SelectItemText",ny=g.forwardRef((n,r)=>{const{__scopeSelect:i,className:l,style:u,...c}=n,f=$r(us,i),p=Wr(us,i),h=ey(us,i),v=kC(us,i),[w,x]=g.useState(null),E=ct(r,P=>x(P),h.onItemTextChange,P=>{var T;return(T=p.itemTextRefCallback)==null?void 0:T.call(p,P,h.value,h.disabled)}),y=w==null?void 0:w.textContent,O=g.useMemo(()=>ee.jsx("option",{value:h.value,disabled:h.disabled,children:y},h.value),[h.disabled,h.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=v;return It(()=>(S(O),()=>C(O)),[S,C,O]),ee.jsxs(ee.Fragment,{children:[ee.jsx(Xe.span,{id:h.textId,...c,ref:E}),h.isSelected&&f.valueNode&&!f.valueNodeHasChildren?xs.createPortal(c.children,f.valueNode):null]})});ny.displayName=us;var ry="SelectItemIndicator",oy=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n;return ey(ry,i).isSelected?ee.jsx(Xe.span,{"aria-hidden":!0,...l,ref:r}):null});oy.displayName=ry;var Uc="SelectScrollUpButton",iy=g.forwardRef((n,r)=>{const i=Wr(Uc,n.__scopeSelect),l=md(Uc,n.__scopeSelect),[u,c]=g.useState(!1),f=ct(r,l.onScrollButtonChange);return It(()=>{if(i.viewport&&i.isPositioned){let p=function(){const v=h.scrollTop>0;c(v)};const h=i.viewport;return p(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),u?ee.jsx(ly,{...n,ref:f,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop-h.offsetHeight)}}):null});iy.displayName=Uc;var Hc="SelectScrollDownButton",sy=g.forwardRef((n,r)=>{const i=Wr(Hc,n.__scopeSelect),l=md(Hc,n.__scopeSelect),[u,c]=g.useState(!1),f=ct(r,l.onScrollButtonChange);return It(()=>{if(i.viewport&&i.isPositioned){let p=function(){const v=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)<v;c(w)};const h=i.viewport;return p(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),u?ee.jsx(ly,{...n,ref:f,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop+h.offsetHeight)}}):null});sy.displayName=Hc;var ly=g.forwardRef((n,r)=>{const{__scopeSelect:i,onAutoScroll:l,...u}=n,c=Wr("SelectScrollButton",i),f=g.useRef(null),p=ha(i),h=g.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return g.useEffect(()=>()=>h(),[h]),It(()=>{var w;const v=p().find(x=>x.ref.current===document.activeElement);(w=v==null?void 0:v.ref.current)==null||w.scrollIntoView({block:"nearest"})},[p]),ee.jsx(Xe.div,{"aria-hidden":!0,...u,ref:r,style:{flexShrink:0,...u.style},onPointerDown:Je(u.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(l,50))}),onPointerMove:Je(u.onPointerMove,()=>{var v;(v=c.onItemLeave)==null||v.call(c),f.current===null&&(f.current=window.setInterval(l,50))}),onPointerLeave:Je(u.onPointerLeave,()=>{h()})})}),DC="SelectSeparator",ay=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n;return ee.jsx(Xe.div,{"aria-hidden":!0,...l,ref:r})});ay.displayName=DC;var $c="SelectArrow",FC=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=ma(i),c=$r($c,i),f=Wr($c,i);return c.open&&f.position==="popper"?ee.jsx(R2,{...u,...l,ref:r}):null});FC.displayName=$c;var zC="SelectBubbleInput",uy=g.forwardRef(({__scopeSelect:n,value:r,...i},l)=>{const u=g.useRef(null),c=ct(l,u),f=N2(r);return g.useEffect(()=>{const p=u.current;if(!p)return;const h=window.HTMLSelectElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==r&&w){const x=new Event("change",{bubbles:!0});w.call(p,r),p.dispatchEvent(x)}},[f,r]),ee.jsx(Xe.select,{...i,style:{...Mv,...i.style},ref:c,defaultValue:r})});uy.displayName=zC;function cy(n){return n===""||n===void 0}function dy(n){const r=go(n),i=g.useRef(""),l=g.useRef(0),u=g.useCallback(f=>{const p=i.current+f;r(p),(function h(v){i.current=v,window.clearTimeout(l.current),v!==""&&(l.current=window.setTimeout(()=>h(""),1e3))})(p)},[r]),c=g.useCallback(()=>{i.current="",window.clearTimeout(l.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(l.current),[]),[i,u,c]}function fy(n,r,i){const u=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,c=i?n.indexOf(i):-1;let f=jC(n,Math.max(c,0));u.length===1&&(f=f.filter(v=>v!==i));const h=f.find(v=>v.textValue.toLowerCase().startsWith(u.toLowerCase()));return h!==i?h:void 0}function jC(n,r){return n.map((i,l)=>n[(r+l)%n.length])}var dk=jv,fk=Uv,pk=$v,hk=Wv,mk=Vv,vk=Qv,yk=qv,gk=Jv,wk=ty,xk=ny,Sk=oy,Ck=iy,Ek=sy,kk=ay;const Xh=n=>{let r;const i=new Set,l=(v,w)=>{const x=typeof v=="function"?v(r):v;if(!Object.is(x,r)){const E=r;r=w??(typeof x!="object"||x===null)?x:Object.assign({},r,x),i.forEach(y=>y(r,E))}},u=()=>r,p={setState:l,getState:u,getInitialState:()=>h,subscribe:v=>(i.add(v),()=>i.delete(v))},h=r=n(l,u,p);return p},BC=(n=>n?Xh(n):Xh),UC=n=>n;function HC(n,r=UC){const i=q.useSyncExternalStore(n.subscribe,q.useCallback(()=>r(n.getState()),[n,r]),q.useCallback(()=>r(n.getInitialState()),[n,r]));return q.useDebugValue(i),i}const Zh=n=>{const r=BC(n),i=l=>HC(r,l);return Object.assign(i,r),i},bk=(n=>n?Zh(n):Zh);export{lk as $,nE as A,lE as B,uE as C,Hr as D,bk as E,XC as F,CE as G,RE as H,hk as I,KC as J,ME as K,gk as L,LE as M,I1 as N,u1 as O,mk as P,qC as Q,dk as R,Ck as S,fk as T,QC as U,yk as V,WC as W,YC as X,dE as Y,SE as Z,OE as _,$m as a,HE as a0,KE as a1,IE as a2,cm as a3,rk as a4,sE as a5,ok as a6,mE as a7,ek as a8,EE as a9,GE as aA,nk as aB,VE as aC,BE as aD,$E as aE,Em as aF,VC as aG,gE as aH,wE as aI,qE as aJ,fE as aK,NE as aL,bE as aM,tk as aN,QE as aO,PE as aP,hE as aQ,ck as aR,uk as aS,DE as aT,It as aU,ak as aV,_E as aW,zE as aX,oE as aY,kE as aZ,xE as aa,YE as ab,pE as ac,Vh as ad,E2 as ae,sd as af,ct as ag,Xe as ah,Je as ai,k2 as aj,gv as ak,Pv as al,id as am,D2 as an,zv as ao,ea as ap,Kx as aq,rv as ar,tv as as,b2 as at,R2 as au,WE as av,yE as aw,ik as ax,jE as ay,JE as az,JC as b,eE as c,sk as d,cE as e,Ek as f,vk as g,wk as h,Sk as i,ee as j,aE as k,xk as l,kk as m,pk as n,vE as o,ZE as p,AE as q,g as r,UE as s,tE as t,ZC as u,rE as v,XE as w,FE as x,TE as y,iE as z};
402
+ `)},mC=0,Xo=[];function vC(n){var r=g.useRef([]),i=g.useRef([0,0]),l=g.useRef(),u=g.useState(mC++)[0],c=g.useState(Iv)[0],f=g.useRef(n);g.useEffect(function(){f.current=n},[n]),g.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var S=F2([n.lockRef.current],(n.shards||[]).map(qh),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var p=g.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var P=Wl(S),T=i.current,R="deltaX"in S?S.deltaX:T[0]-P[0],L="deltaY"in S?S.deltaY:T[1]-P[1],z,U=S.target,H=Math.abs(R)>Math.abs(L)?"h":"v";if("touches"in S&&H==="h"&&U.type==="range")return!1;var Y=window.getSelection(),Z=Y&&Y.anchorNode,te=Z?Z===U||Z.contains(U):!1;if(te)return!1;var he=Yh(H,U);if(!he)return!0;if(he?z=H:(z=H==="v"?"h":"v",he=Yh(H,U)),!he)return!1;if(!l.current&&"changedTouches"in S&&(R||L)&&(l.current=z),!z)return!0;var X=l.current||z;return fC(X,C,S,X==="h"?R:L)},[]),h=g.useCallback(function(S){var C=S;if(!(!Xo.length||Xo[Xo.length-1]!==c)){var P="deltaY"in C?Gh(C):Wl(C),T=r.current.filter(function(z){return z.name===C.type&&(z.target===C.target||C.target===z.shadowParent)&&pC(z.delta,P)})[0];if(T&&T.should){C.cancelable&&C.preventDefault();return}if(!T){var R=(f.current.shards||[]).map(qh).filter(Boolean).filter(function(z){return z.contains(C.target)}),L=R.length>0?p(C,R[0]):!f.current.noIsolation;L&&C.cancelable&&C.preventDefault()}}},[]),v=g.useCallback(function(S,C,P,T){var R={name:S,delta:C,target:P,should:T,shadowParent:yC(P)};r.current.push(R),setTimeout(function(){r.current=r.current.filter(function(L){return L!==R})},1)},[]),w=g.useCallback(function(S){i.current=Wl(S),l.current=void 0},[]),x=g.useCallback(function(S){v(S.type,Gh(S),S.target,p(S,n.lockRef.current))},[]),E=g.useCallback(function(S){v(S.type,Wl(S),S.target,p(S,n.lockRef.current))},[]);g.useEffect(function(){return Xo.push(c),n.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:E}),document.addEventListener("wheel",h,qo),document.addEventListener("touchmove",h,qo),document.addEventListener("touchstart",w,qo),function(){Xo=Xo.filter(function(S){return S!==c}),document.removeEventListener("wheel",h,qo),document.removeEventListener("touchmove",h,qo),document.removeEventListener("touchstart",w,qo)}},[]);var y=n.removeScrollBar,O=n.inert;return g.createElement(g.Fragment,null,O?g.createElement(c,{styles:hC(u)}):null,y?g.createElement(iC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function yC(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const gC=Q2(Lv,vC);var zv=g.forwardRef(function(n,r){return g.createElement(fa,Ln({},n,{ref:r,sideCar:gC}))});zv.classNames=fa.classNames;var wC=[" ","Enter","ArrowUp","ArrowDown"],xC=[" ","Enter"],xo="Select",[pa,ha,SC]=Ix(xo),[Si]=id(xo,[SC,gv]),ma=gv(),[CC,$r]=Si(xo),[EC,kC]=Si(xo),jv=n=>{const{__scopeSelect:r,children:i,open:l,defaultOpen:u,onOpenChange:c,value:f,defaultValue:p,onValueChange:h,dir:v,name:w,autoComplete:x,disabled:E,required:y,form:O}=n,S=ma(r),[C,P]=g.useState(null),[T,R]=g.useState(null),[L,z]=g.useState(!1),U=Dx(v),[H,Y]=Vh({prop:l,defaultProp:u??!1,onChange:c,caller:xo}),[Z,te]=Vh({prop:f,defaultProp:p,onChange:h,caller:xo}),he=g.useRef(null),X=C?O||!!C.closest("form"):!0,[ye,ce]=g.useState(new Set),xe=Array.from(ye).map(ae=>ae.props.value).join(";");return ee.jsx(E2,{...S,children:ee.jsxs(CC,{required:y,scope:r,trigger:C,onTriggerChange:P,valueNode:T,onValueNodeChange:R,valueNodeHasChildren:L,onValueNodeHasChildrenChange:z,contentId:sd(),value:Z,onValueChange:te,open:H,onOpenChange:Y,dir:U,triggerPointerDownPosRef:he,disabled:E,children:[ee.jsx(pa.Provider,{scope:r,children:ee.jsx(EC,{scope:n.__scopeSelect,onNativeOptionAdd:g.useCallback(ae=>{ce(ie=>new Set(ie).add(ae))},[]),onNativeOptionRemove:g.useCallback(ae=>{ce(ie=>{const j=new Set(ie);return j.delete(ae),j})},[]),children:i})}),X?ee.jsxs(uy,{"aria-hidden":!0,required:y,tabIndex:-1,name:w,autoComplete:x,value:Z,onChange:ae=>te(ae.target.value),disabled:E,form:O,children:[Z===void 0?ee.jsx("option",{value:""}):null,Array.from(ye)]},xe):null]})})};jv.displayName=xo;var Bv="SelectTrigger",Uv=g.forwardRef((n,r)=>{const{__scopeSelect:i,disabled:l=!1,...u}=n,c=ma(i),f=$r(Bv,i),p=f.disabled||l,h=ct(r,f.onTriggerChange),v=ha(i),w=g.useRef("touch"),[x,E,y]=dy(S=>{const C=v().filter(R=>!R.disabled),P=C.find(R=>R.value===f.value),T=fy(C,S,P);T!==void 0&&f.onValueChange(T.value)}),O=S=>{p||(f.onOpenChange(!0),y()),S&&(f.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return ee.jsx(k2,{asChild:!0,...c,children:ee.jsx(Xe.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:p,"data-disabled":p?"":void 0,"data-placeholder":cy(f.value)?"":void 0,...u,ref:h,onClick:Je(u.onClick,S=>{S.currentTarget.focus(),w.current!=="mouse"&&O(S)}),onPointerDown:Je(u.onPointerDown,S=>{w.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(O(S),S.preventDefault())}),onKeyDown:Je(u.onKeyDown,S=>{const C=x.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&E(S.key),!(C&&S.key===" ")&&wC.includes(S.key)&&(O(),S.preventDefault())})})})});Uv.displayName=Bv;var Hv="SelectValue",$v=g.forwardRef((n,r)=>{const{__scopeSelect:i,className:l,style:u,children:c,placeholder:f="",...p}=n,h=$r(Hv,i),{onValueNodeHasChildrenChange:v}=h,w=c!==void 0,x=ct(r,h.onValueNodeChange);return It(()=>{v(w)},[v,w]),ee.jsx(Xe.span,{...p,ref:x,style:{pointerEvents:"none"},children:cy(h.value)?ee.jsx(ee.Fragment,{children:f}):c})});$v.displayName=Hv;var bC="SelectIcon",Wv=g.forwardRef((n,r)=>{const{__scopeSelect:i,children:l,...u}=n;return ee.jsx(Xe.span,{"aria-hidden":!0,...u,ref:r,children:l||"▼"})});Wv.displayName=bC;var RC="SelectPortal",Vv=n=>ee.jsx(Pv,{asChild:!0,...n});Vv.displayName=RC;var So="SelectContent",Qv=g.forwardRef((n,r)=>{const i=$r(So,n.__scopeSelect),[l,u]=g.useState();if(It(()=>{u(new DocumentFragment)},[]),!i.open){const c=l;return c?xs.createPortal(ee.jsx(Kv,{scope:n.__scopeSelect,children:ee.jsx(pa.Slot,{scope:n.__scopeSelect,children:ee.jsx("div",{children:n.children})})}),c):null}return ee.jsx(Yv,{...n,ref:r})});Qv.displayName=So;var cn=10,[Kv,Wr]=Si(So),PC="SelectContentImpl",MC=ea("SelectContent.RemoveScroll"),Yv=g.forwardRef((n,r)=>{const{__scopeSelect:i,position:l="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:c,onPointerDownOutside:f,side:p,sideOffset:h,align:v,alignOffset:w,arrowPadding:x,collisionBoundary:E,collisionPadding:y,sticky:O,hideWhenDetached:S,avoidCollisions:C,...P}=n,T=$r(So,i),[R,L]=g.useState(null),[z,U]=g.useState(null),H=ct(r,K=>L(K)),[Y,Z]=g.useState(null),[te,he]=g.useState(null),X=ha(i),[ye,ce]=g.useState(!1),xe=g.useRef(!1);g.useEffect(()=>{if(R)return D2(R)},[R]),Kx();const ae=g.useCallback(K=>{const[fe,...Ce]=X().map(Oe=>Oe.ref.current),[be]=Ce.slice(-1),Me=document.activeElement;for(const Oe of K)if(Oe===Me||(Oe==null||Oe.scrollIntoView({block:"nearest"}),Oe===fe&&z&&(z.scrollTop=0),Oe===be&&z&&(z.scrollTop=z.scrollHeight),Oe==null||Oe.focus(),document.activeElement!==Me))return},[X,z]),ie=g.useCallback(()=>ae([Y,R]),[ae,Y,R]);g.useEffect(()=>{ye&&ie()},[ye,ie]);const{onOpenChange:j,triggerPointerDownPosRef:B}=T;g.useEffect(()=>{if(R){let K={x:0,y:0};const fe=be=>{var Me,Oe;K={x:Math.abs(Math.round(be.pageX)-(((Me=B.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Oe=B.current)==null?void 0:Oe.y)??0))}},Ce=be=>{K.x<=10&&K.y<=10?be.preventDefault():R.contains(be.target)||j(!1),document.removeEventListener("pointermove",fe),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[R,j,B]),g.useEffect(()=>{const K=()=>j(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[j]);const[V,N]=dy(K=>{const fe=X().filter(Me=>!Me.disabled),Ce=fe.find(Me=>Me.ref.current===document.activeElement),be=fy(fe,K,Ce);be&&setTimeout(()=>be.ref.current.focus())}),F=g.useCallback((K,fe,Ce)=>{const be=!xe.current&&!Ce;(T.value!==void 0&&T.value===fe||be)&&(Z(K),be&&(xe.current=!0))},[T.value]),ne=g.useCallback(()=>R==null?void 0:R.focus(),[R]),re=g.useCallback((K,fe,Ce)=>{const be=!xe.current&&!Ce;(T.value!==void 0&&T.value===fe||be)&&he(K)},[T.value]),ve=l==="popper"?jc:Gv,Se=ve===jc?{side:p,sideOffset:h,align:v,alignOffset:w,arrowPadding:x,collisionBoundary:E,collisionPadding:y,sticky:O,hideWhenDetached:S,avoidCollisions:C}:{};return ee.jsx(Kv,{scope:i,content:R,viewport:z,onViewportChange:U,itemRefCallback:F,selectedItem:Y,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:ie,selectedItemText:te,position:l,isPositioned:ye,searchRef:V,children:ee.jsx(zv,{as:MC,allowPinchZoom:!0,children:ee.jsx(rv,{asChild:!0,trapped:T.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Je(u,K=>{var fe;(fe=T.trigger)==null||fe.focus({preventScroll:!0}),K.preventDefault()}),children:ee.jsx(tv,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:ee.jsx(ve,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:K=>K.preventDefault(),...P,...Se,onPlaced:()=>ce(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...P.style},onKeyDown:Je(P.onKeyDown,K=>{const fe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!fe&&K.key.length===1&&N(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let be=X().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(K.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const Me=K.target,Oe=be.indexOf(Me);be=be.slice(Oe+1)}setTimeout(()=>ae(be)),K.preventDefault()}})})})})})})});Yv.displayName=PC;var TC="SelectItemAlignedPosition",Gv=g.forwardRef((n,r)=>{const{__scopeSelect:i,onPlaced:l,...u}=n,c=$r(So,i),f=Wr(So,i),[p,h]=g.useState(null),[v,w]=g.useState(null),x=ct(r,H=>w(H)),E=ha(i),y=g.useRef(!1),O=g.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:P,focusSelectedItem:T}=f,R=g.useCallback(()=>{if(c.trigger&&c.valueNode&&p&&v&&S&&C&&P){const H=c.trigger.getBoundingClientRect(),Y=v.getBoundingClientRect(),Z=c.valueNode.getBoundingClientRect(),te=P.getBoundingClientRect();if(c.dir!=="rtl"){const Me=te.left-Y.left,Oe=Z.left-Me,Ye=H.left-Oe,dt=H.width+Ye,yn=Math.max(dt,Y.width),Xt=window.innerWidth-cn,Zt=bh(Oe,[cn,Math.max(cn,Xt-yn)]);p.style.minWidth=dt+"px",p.style.left=Zt+"px"}else{const Me=Y.right-te.right,Oe=window.innerWidth-Z.right-Me,Ye=window.innerWidth-H.right-Oe,dt=H.width+Ye,yn=Math.max(dt,Y.width),Xt=window.innerWidth-cn,Zt=bh(Oe,[cn,Math.max(cn,Xt-yn)]);p.style.minWidth=dt+"px",p.style.right=Zt+"px"}const he=E(),X=window.innerHeight-cn*2,ye=S.scrollHeight,ce=window.getComputedStyle(v),xe=parseInt(ce.borderTopWidth,10),ae=parseInt(ce.paddingTop,10),ie=parseInt(ce.borderBottomWidth,10),j=parseInt(ce.paddingBottom,10),B=xe+ae+ye+j+ie,V=Math.min(C.offsetHeight*5,B),N=window.getComputedStyle(S),F=parseInt(N.paddingTop,10),ne=parseInt(N.paddingBottom,10),re=H.top+H.height/2-cn,ve=X-re,Se=C.offsetHeight/2,K=C.offsetTop+Se,fe=xe+ae+K,Ce=B-fe;if(fe<=re){const Me=he.length>0&&C===he[he.length-1].ref.current;p.style.bottom="0px";const Oe=v.clientHeight-S.offsetTop-S.offsetHeight,Ye=Math.max(ve,Se+(Me?ne:0)+Oe+ie),dt=fe+Ye;p.style.height=dt+"px"}else{const Me=he.length>0&&C===he[0].ref.current;p.style.top="0px";const Ye=Math.max(re,xe+S.offsetTop+(Me?F:0)+Se)+Ce;p.style.height=Ye+"px",S.scrollTop=fe-re+S.offsetTop}p.style.margin=`${cn}px 0`,p.style.minHeight=V+"px",p.style.maxHeight=X+"px",l==null||l(),requestAnimationFrame(()=>y.current=!0)}},[E,c.trigger,c.valueNode,p,v,S,C,P,c.dir,l]);It(()=>R(),[R]);const[L,z]=g.useState();It(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]);const U=g.useCallback(H=>{H&&O.current===!0&&(R(),T==null||T(),O.current=!1)},[R,T]);return ee.jsx(NC,{scope:i,contentWrapper:p,shouldExpandOnScrollRef:y,onScrollButtonChange:U,children:ee.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:ee.jsx(Xe.div,{...u,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});Gv.displayName=TC;var OC="SelectPopperPosition",jc=g.forwardRef((n,r)=>{const{__scopeSelect:i,align:l="start",collisionPadding:u=cn,...c}=n,f=ma(i);return ee.jsx(b2,{...f,...c,ref:r,align:l,collisionPadding:u,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jc.displayName=OC;var[NC,md]=Si(So,{}),Bc="SelectViewport",qv=g.forwardRef((n,r)=>{const{__scopeSelect:i,nonce:l,...u}=n,c=Wr(Bc,i),f=md(Bc,i),p=ct(r,c.onViewportChange),h=g.useRef(0);return ee.jsxs(ee.Fragment,{children:[ee.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),ee.jsx(pa.Slot,{scope:i,children:ee.jsx(Xe.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:p,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:Je(u.onScroll,v=>{const w=v.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:E}=f;if(E!=null&&E.current&&x){const y=Math.abs(h.current-w.scrollTop);if(y>0){const O=window.innerHeight-cn*2,S=parseFloat(x.style.minHeight),C=parseFloat(x.style.height),P=Math.max(S,C);if(P<O){const T=P+y,R=Math.min(O,T),L=T-R;x.style.height=R+"px",x.style.bottom==="0px"&&(w.scrollTop=L>0?L:0,x.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});qv.displayName=Bc;var Xv="SelectGroup",[_C,LC]=Si(Xv),IC=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=sd();return ee.jsx(_C,{scope:i,id:u,children:ee.jsx(Xe.div,{role:"group","aria-labelledby":u,...l,ref:r})})});IC.displayName=Xv;var Zv="SelectLabel",Jv=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=LC(Zv,i);return ee.jsx(Xe.div,{id:u.id,...l,ref:r})});Jv.displayName=Zv;var ia="SelectItem",[AC,ey]=Si(ia),ty=g.forwardRef((n,r)=>{const{__scopeSelect:i,value:l,disabled:u=!1,textValue:c,...f}=n,p=$r(ia,i),h=Wr(ia,i),v=p.value===l,[w,x]=g.useState(c??""),[E,y]=g.useState(!1),O=ct(r,T=>{var R;return(R=h.itemRefCallback)==null?void 0:R.call(h,T,l,u)}),S=sd(),C=g.useRef("touch"),P=()=>{u||(p.onValueChange(l),p.onOpenChange(!1))};if(l==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return ee.jsx(AC,{scope:i,value:l,disabled:u,textId:S,isSelected:v,onItemTextChange:g.useCallback(T=>{x(R=>R||((T==null?void 0:T.textContent)??"").trim())},[]),children:ee.jsx(pa.ItemSlot,{scope:i,value:l,disabled:u,textValue:w,children:ee.jsx(Xe.div,{role:"option","aria-labelledby":S,"data-highlighted":E?"":void 0,"aria-selected":v&&E,"data-state":v?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:O,onFocus:Je(f.onFocus,()=>y(!0)),onBlur:Je(f.onBlur,()=>y(!1)),onClick:Je(f.onClick,()=>{C.current!=="mouse"&&P()}),onPointerUp:Je(f.onPointerUp,()=>{C.current==="mouse"&&P()}),onPointerDown:Je(f.onPointerDown,T=>{C.current=T.pointerType}),onPointerMove:Je(f.onPointerMove,T=>{var R;C.current=T.pointerType,u?(R=h.onItemLeave)==null||R.call(h):C.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Je(f.onPointerLeave,T=>{var R;T.currentTarget===document.activeElement&&((R=h.onItemLeave)==null||R.call(h))}),onKeyDown:Je(f.onKeyDown,T=>{var L;((L=h.searchRef)==null?void 0:L.current)!==""&&T.key===" "||(xC.includes(T.key)&&P(),T.key===" "&&T.preventDefault())})})})})});ty.displayName=ia;var us="SelectItemText",ny=g.forwardRef((n,r)=>{const{__scopeSelect:i,className:l,style:u,...c}=n,f=$r(us,i),p=Wr(us,i),h=ey(us,i),v=kC(us,i),[w,x]=g.useState(null),E=ct(r,P=>x(P),h.onItemTextChange,P=>{var T;return(T=p.itemTextRefCallback)==null?void 0:T.call(p,P,h.value,h.disabled)}),y=w==null?void 0:w.textContent,O=g.useMemo(()=>ee.jsx("option",{value:h.value,disabled:h.disabled,children:y},h.value),[h.disabled,h.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=v;return It(()=>(S(O),()=>C(O)),[S,C,O]),ee.jsxs(ee.Fragment,{children:[ee.jsx(Xe.span,{id:h.textId,...c,ref:E}),h.isSelected&&f.valueNode&&!f.valueNodeHasChildren?xs.createPortal(c.children,f.valueNode):null]})});ny.displayName=us;var ry="SelectItemIndicator",oy=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n;return ey(ry,i).isSelected?ee.jsx(Xe.span,{"aria-hidden":!0,...l,ref:r}):null});oy.displayName=ry;var Uc="SelectScrollUpButton",iy=g.forwardRef((n,r)=>{const i=Wr(Uc,n.__scopeSelect),l=md(Uc,n.__scopeSelect),[u,c]=g.useState(!1),f=ct(r,l.onScrollButtonChange);return It(()=>{if(i.viewport&&i.isPositioned){let p=function(){const v=h.scrollTop>0;c(v)};const h=i.viewport;return p(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),u?ee.jsx(ly,{...n,ref:f,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop-h.offsetHeight)}}):null});iy.displayName=Uc;var Hc="SelectScrollDownButton",sy=g.forwardRef((n,r)=>{const i=Wr(Hc,n.__scopeSelect),l=md(Hc,n.__scopeSelect),[u,c]=g.useState(!1),f=ct(r,l.onScrollButtonChange);return It(()=>{if(i.viewport&&i.isPositioned){let p=function(){const v=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)<v;c(w)};const h=i.viewport;return p(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,i.isPositioned]),u?ee.jsx(ly,{...n,ref:f,onAutoScroll:()=>{const{viewport:p,selectedItem:h}=i;p&&h&&(p.scrollTop=p.scrollTop+h.offsetHeight)}}):null});sy.displayName=Hc;var ly=g.forwardRef((n,r)=>{const{__scopeSelect:i,onAutoScroll:l,...u}=n,c=Wr("SelectScrollButton",i),f=g.useRef(null),p=ha(i),h=g.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return g.useEffect(()=>()=>h(),[h]),It(()=>{var w;const v=p().find(x=>x.ref.current===document.activeElement);(w=v==null?void 0:v.ref.current)==null||w.scrollIntoView({block:"nearest"})},[p]),ee.jsx(Xe.div,{"aria-hidden":!0,...u,ref:r,style:{flexShrink:0,...u.style},onPointerDown:Je(u.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(l,50))}),onPointerMove:Je(u.onPointerMove,()=>{var v;(v=c.onItemLeave)==null||v.call(c),f.current===null&&(f.current=window.setInterval(l,50))}),onPointerLeave:Je(u.onPointerLeave,()=>{h()})})}),DC="SelectSeparator",ay=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n;return ee.jsx(Xe.div,{"aria-hidden":!0,...l,ref:r})});ay.displayName=DC;var $c="SelectArrow",FC=g.forwardRef((n,r)=>{const{__scopeSelect:i,...l}=n,u=ma(i),c=$r($c,i),f=Wr($c,i);return c.open&&f.position==="popper"?ee.jsx(R2,{...u,...l,ref:r}):null});FC.displayName=$c;var zC="SelectBubbleInput",uy=g.forwardRef(({__scopeSelect:n,value:r,...i},l)=>{const u=g.useRef(null),c=ct(l,u),f=N2(r);return g.useEffect(()=>{const p=u.current;if(!p)return;const h=window.HTMLSelectElement.prototype,w=Object.getOwnPropertyDescriptor(h,"value").set;if(f!==r&&w){const x=new Event("change",{bubbles:!0});w.call(p,r),p.dispatchEvent(x)}},[f,r]),ee.jsx(Xe.select,{...i,style:{...Mv,...i.style},ref:c,defaultValue:r})});uy.displayName=zC;function cy(n){return n===""||n===void 0}function dy(n){const r=go(n),i=g.useRef(""),l=g.useRef(0),u=g.useCallback(f=>{const p=i.current+f;r(p),(function h(v){i.current=v,window.clearTimeout(l.current),v!==""&&(l.current=window.setTimeout(()=>h(""),1e3))})(p)},[r]),c=g.useCallback(()=>{i.current="",window.clearTimeout(l.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(l.current),[]),[i,u,c]}function fy(n,r,i){const u=r.length>1&&Array.from(r).every(v=>v===r[0])?r[0]:r,c=i?n.indexOf(i):-1;let f=jC(n,Math.max(c,0));u.length===1&&(f=f.filter(v=>v!==i));const h=f.find(v=>v.textValue.toLowerCase().startsWith(u.toLowerCase()));return h!==i?h:void 0}function jC(n,r){return n.map((i,l)=>n[(r+l)%n.length])}var dk=jv,fk=Uv,pk=$v,hk=Wv,mk=Vv,vk=Qv,yk=qv,gk=Jv,wk=ty,xk=ny,Sk=oy,Ck=iy,Ek=sy,kk=ay;const Xh=n=>{let r;const i=new Set,l=(v,w)=>{const x=typeof v=="function"?v(r):v;if(!Object.is(x,r)){const E=r;r=w??(typeof x!="object"||x===null)?x:Object.assign({},r,x),i.forEach(y=>y(r,E))}},u=()=>r,p={setState:l,getState:u,getInitialState:()=>h,subscribe:v=>(i.add(v),()=>i.delete(v))},h=r=n(l,u,p);return p},BC=(n=>n?Xh(n):Xh),UC=n=>n;function HC(n,r=UC){const i=q.useSyncExternalStore(n.subscribe,q.useCallback(()=>r(n.getState()),[n,r]),q.useCallback(()=>r(n.getInitialState()),[n,r]));return q.useDebugValue(i),i}const Zh=n=>{const r=BC(n),i=l=>HC(r,l);return Object.assign(i,r),i},bk=(n=>n?Zh(n):Zh);export{lk as $,nE as A,lE as B,uE as C,Hr as D,bk as E,XC as F,CE as G,RE as H,hk as I,KC as J,ME as K,gk as L,LE as M,I1 as N,u1 as O,mk as P,qC as Q,dk as R,Ck as S,fk as T,QC as U,yk as V,WC as W,YC as X,dE as Y,SE as Z,OE as _,$m as a,HE as a0,KE as a1,IE as a2,cm as a3,rk as a4,sE as a5,ok as a6,mE as a7,ek as a8,EE as a9,GE as aA,nk as aB,VE as aC,BE as aD,$E as aE,Em as aF,VC as aG,gE as aH,wE as aI,qE as aJ,fE as aK,NE as aL,bE as aM,tk as aN,QE as aO,PE as aP,hE as aQ,ck as aR,uk as aS,DE as aT,It as aU,ak as aV,_E as aW,zE as aX,oE as aY,kE as aZ,xE as aa,YE as ab,pE as ac,Vh as ad,E2 as ae,sd as af,k2 as ag,gv as ah,Pv as ai,ct as aj,Xe as ak,Je as al,id as am,D2 as an,zv as ao,ea as ap,Kx as aq,rv as ar,tv as as,b2 as at,R2 as au,WE as av,yE as aw,ik as ax,jE as ay,JE as az,JC as b,eE as c,sk as d,cE as e,Ek as f,vk as g,wk as h,Sk as i,ee as j,aE as k,xk as l,kk as m,pk as n,vE as o,ZE as p,AE as q,g as r,UE as s,tE as t,ZC as u,rE as v,XE as w,FE as x,TE as y,iE as z};
package/dist/index.html CHANGED
@@ -6,9 +6,9 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/logo.svg" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>NextClaw - 系统配置</title>
9
- <script type="module" crossorigin src="/assets/index-CGo5Vnh0.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/vendor-D33xZtEC.js">
11
- <link rel="stylesheet" crossorigin href="/assets/index-DcxYzrFm.css">
9
+ <script type="module" crossorigin src="/assets/index-dKTqKCJo.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/vendor-C--HHaLf.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/index-C_DhisNo.css">
12
12
  </head>
13
13
 
14
14
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/ui",
3
- "version": "0.6.7",
3
+ "version": "0.6.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/api/types.ts CHANGED
@@ -208,6 +208,24 @@ export type ChatCapabilitiesView = {
208
208
  stopReason?: string;
209
209
  };
210
210
 
211
+ export type ChatCommandOptionView = {
212
+ name: string;
213
+ description: string;
214
+ type: 'string' | 'boolean' | 'number';
215
+ required?: boolean;
216
+ };
217
+
218
+ export type ChatCommandView = {
219
+ name: string;
220
+ description: string;
221
+ options?: ChatCommandOptionView[];
222
+ };
223
+
224
+ export type ChatCommandsView = {
225
+ commands: ChatCommandView[];
226
+ total: number;
227
+ };
228
+
211
229
  export type ChatTurnStopRequest = {
212
230
  runId: string;
213
231
  sessionKey?: string;
@@ -550,7 +568,9 @@ export type MarketplaceItemType = 'plugin' | 'skill';
550
568
 
551
569
  export type MarketplaceSort = 'relevance' | 'updated';
552
570
 
553
- export type MarketplaceInstallKind = 'npm' | 'clawhub' | 'git' | 'builtin';
571
+ export type MarketplacePluginInstallKind = 'npm';
572
+ export type MarketplaceSkillInstallKind = 'builtin' | 'marketplace';
573
+ export type MarketplaceInstallKind = MarketplacePluginInstallKind | MarketplaceSkillInstallKind;
554
574
 
555
575
  export type MarketplaceInstallSpec = {
556
576
  kind: MarketplaceInstallKind;
@@ -586,7 +606,7 @@ export type MarketplaceSkillContentView = {
586
606
  slug: string;
587
607
  name: string;
588
608
  install: MarketplaceInstallSpec;
589
- source: 'workspace' | 'builtin' | 'git' | 'remote';
609
+ source: 'builtin' | 'marketplace' | 'remote';
590
610
  raw: string;
591
611
  metadataRaw?: string;
592
612
  bodyRaw: string;
@@ -652,8 +672,6 @@ export type MarketplaceInstallRequest = {
652
672
  kind?: MarketplaceInstallKind;
653
673
  skill?: string;
654
674
  installPath?: string;
655
- version?: string;
656
- registry?: string;
657
675
  force?: boolean;
658
676
  };
659
677