@townco/gui-template 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons-xaawVwTw.js +1 -0
- package/dist/assets/index-BWewCaGI.css +1 -0
- package/dist/assets/index-D2656GiI.js +6 -0
- package/dist/assets/radix-BwF8w229.js +5 -0
- package/dist/index.html +4 -4
- package/package.json +4 -4
- package/src/ChatView.tsx +57 -77
- package/dist/assets/icons-Bzkdnur-.js +0 -1
- package/dist/assets/index-Cw8eb9HS.js +0 -6
- package/dist/assets/index-O3uTI1gQ.css +0 -1
- package/dist/assets/radix-Dd4nMefT.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as s,R as vt,j as u,a as ht,b as pe,c as vr,d as gt}from"./react-BxIc-aOD.js";import{h as hr,i as gr,j as xr,k as wr,m as yr,p as Cr,q as Er,t as Sr,v as br,w as xt}from"./vendor-CDPxlbZ6.js";function Ht(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ie(...e){return t=>{let n=!1;const o=e.map(r=>{const a=Ht(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():Ht(e[r],null)}}}}function M(...e){return s.useCallback(Ie(...e),e)}var Rr=Symbol.for("react.lazy"),Oe=vt[" use ".trim().toString()];function Pr(e){return typeof e=="object"&&e!==null&&"then"in e}function Jt(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Rr&&"_payload"in e&&Pr(e._payload)}function Qt(e){const t=Tr(e),n=s.forwardRef((o,r)=>{let{children:a,...i}=o;Jt(a)&&typeof Oe=="function"&&(a=Oe(a._payload));const c=s.Children.toArray(a),l=c.find(_r);if(l){const d=l.props.children,f=c.map(p=>p===l?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return u.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return u.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}var ki=Qt("Slot");function Tr(e){const t=s.forwardRef((n,o)=>{let{children:r,...a}=n;if(Jt(r)&&typeof Oe=="function"&&(r=Oe(r._payload)),s.isValidElement(r)){const i=Nr(r),c=Mr(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Ie(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ir=Symbol("radix.slottable");function _r(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ir}function Mr(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const l=a(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Nr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function E(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ar(e,t){const n=s.createContext(t),o=a=>{const{children:i,...c}=a,l=s.useMemo(()=>c,Object.values(c));return u.jsx(n.Provider,{value:l,children:i})};o.displayName=e+"Provider";function r(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function ce(e,t=[]){let n=[];function o(a,i){const c=s.createContext(i),l=n.length;n=[...n,i];const d=p=>{const{scope:v,children:g,...x}=p,m=v?.[e]?.[l]||c,h=s.useMemo(()=>x,Object.values(x));return u.jsx(m.Provider,{value:h,children:g})};d.displayName=a+"Provider";function f(p,v){const g=v?.[e]?.[l]||c,x=s.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(i=>s.createContext(i));return function(c){const l=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Dr(r,...t)]}function Dr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:l,scopeName:d})=>{const p=l(a)[`__scope${d}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var U=globalThis?.document?s.useLayoutEffect:()=>{},Or=vt[" useInsertionEffect ".trim().toString()]||U;function $e({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=jr({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,o])}const d=s.useCallback(f=>{if(c){const p=Lr(f)?f(e):f;p!==e&&i.current?.(p)}else a(f)},[c,e,a,i]);return[l,d]}function jr({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return Or(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function Lr(e){return typeof e=="function"}function we(e){const t=Fr(e),n=s.forwardRef((o,r)=>{const{children:a,...i}=o,c=s.Children.toArray(a),l=c.find($r);if(l){const d=l.props.children,f=c.map(p=>p===l?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return u.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return u.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function Fr(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const i=Ur(r),c=Br(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Ie(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var en=Symbol("radix.slottable");function kr(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=en,t}function $r(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===en}function Br(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const l=a(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Ur(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Hr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],T=Hr.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function tn(e,t){e&&ht.flushSync(()=>e.dispatchEvent(t))}function wt(e){const t=e+"CollectionProvider",[n,o]=ce(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:h,children:y}=m,w=pe.useRef(null),C=pe.useRef(new Map).current;return u.jsx(r,{scope:h,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const c=e+"CollectionSlot",l=we(c),d=pe.forwardRef((m,h)=>{const{scope:y,children:w}=m,C=a(c,y),R=M(h,C.collectionRef);return u.jsx(l,{ref:R,children:w})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",v=we(f),g=pe.forwardRef((m,h)=>{const{scope:y,children:w,...C}=m,R=pe.useRef(null),_=M(h,R),O=a(f,y);return pe.useEffect(()=>(O.itemMap.set(R,{ref:R,...C}),()=>void O.itemMap.delete(R))),u.jsx(v,{[p]:"",ref:_,children:w})});g.displayName=f;function x(m){const h=a(e+"CollectionConsumer",m);return pe.useCallback(()=>{const w=h.collectionRef.current;if(!w)return[];const C=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((O,P)=>C.indexOf(O.ref.current)-C.indexOf(P.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},x,o]}var Kr=s.createContext(void 0);function yt(e){const t=s.useContext(Kr);return e||t||"ltr"}function re(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function Gr(e,t=globalThis?.document){const n=re(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Wr="DismissableLayer",st="dismissableLayer.update",Vr="dismissableLayer.pointerDownOutside",zr="dismissableLayer.focusOutside",Kt,nn=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_e=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...l}=e,d=s.useContext(nn),[f,p]=s.useState(null),v=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),x=M(t,P=>p(P)),m=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(h),w=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,R=w>=y,_=qr(P=>{const I=P.target,$=[...d.branches].some(F=>F.contains(I));!R||$||(r?.(P),i?.(P),P.defaultPrevented||c?.())},v),O=Zr(P=>{const I=P.target;[...d.branches].some(F=>F.contains(I))||(a?.(P),i?.(P),P.defaultPrevented||c?.())},v);return Gr(P=>{w===d.layers.size-1&&(o?.(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},v),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kt=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Gt(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Kt)}},[f,v,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Gt())},[f,d]),s.useEffect(()=>{const P=()=>g({});return document.addEventListener(st,P),()=>document.removeEventListener(st,P)},[]),u.jsx(T.div,{...l,ref:x,style:{pointerEvents:C?R?"auto":"none":void 0,...e.style},onFocusCapture:E(e.onFocusCapture,O.onFocusCapture),onBlurCapture:E(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:E(e.onPointerDownCapture,_.onPointerDownCapture)})});_e.displayName=Wr;var Yr="DismissableLayerBranch",Xr=s.forwardRef((e,t)=>{const n=s.useContext(nn),o=s.useRef(null),r=M(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(T.div,{...e,ref:r})});Xr.displayName=Yr;function qr(e,t=globalThis?.document){const n=re(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let l=function(){on(Vr,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Zr(e,t=globalThis?.document){const n=re(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&on(zr,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Gt(){const e=new CustomEvent(st);document.dispatchEvent(e)}function on(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?tn(r,a):r.dispatchEvent(a)}var tt=0;function Ct(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wt()),document.body.insertAdjacentElement("beforeend",e[1]??Wt()),tt++,()=>{tt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tt--}},[])}function Wt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nt="focusScope.autoFocusOnMount",ot="focusScope.autoFocusOnUnmount",Vt={bubbles:!1,cancelable:!0},Jr="FocusScope",Be=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,l]=s.useState(null),d=re(r),f=re(a),p=s.useRef(null),v=M(t,m=>l(m)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(C){if(g.paused||!c)return;const R=C.target;c.contains(R)?p.current=R:le(p.current,{select:!0})},h=function(C){if(g.paused||!c)return;const R=C.relatedTarget;R!==null&&(c.contains(R)||le(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&le(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",h);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",h),w.disconnect()}}},[o,c,g.paused]),s.useEffect(()=>{if(c){Yt.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(nt,Vt);c.addEventListener(nt,d),c.dispatchEvent(y),y.defaultPrevented||(Qr(rs(rn(c)),{select:!0}),document.activeElement===m&&le(c))}return()=>{c.removeEventListener(nt,d),setTimeout(()=>{const y=new CustomEvent(ot,Vt);c.addEventListener(ot,f),c.dispatchEvent(y),y.defaultPrevented||le(m??document.body,{select:!0}),c.removeEventListener(ot,f),Yt.remove(g)},0)}}},[c,d,f,g]);const x=s.useCallback(m=>{if(!n&&!o||g.paused)return;const h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(h&&y){const w=m.currentTarget,[C,R]=es(w);C&&R?!m.shiftKey&&y===R?(m.preventDefault(),n&&le(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),n&&le(R,{select:!0})):y===w&&m.preventDefault()}},[n,o,g.paused]);return u.jsx(T.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});Be.displayName=Jr;function Qr(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(le(o,{select:t}),document.activeElement!==n)return}function es(e){const t=rn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function rn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!ts(n,{upTo:t}))return n}function ts(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ns(e){return e instanceof HTMLInputElement&&"select"in e}function le(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ns(e)&&t&&e.select()}}var Yt=os();function os(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Xt(e,t),e.unshift(t)},remove(t){e=Xt(e,t),e[0]?.resume()}}}function Xt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function rs(e){return e.filter(t=>t.tagName!=="A")}var ss=vt[" useId ".trim().toString()]||(()=>{}),as=0;function me(e){const[t,n]=s.useState(ss());return U(()=>{n(o=>o??String(as++))},[e]),t?`radix-${t}`:""}var is="Arrow",sn=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return u.jsx(T.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});sn.displayName=is;var cs=sn;function ls(e){const[t,n]=s.useState(void 0);return U(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const l=a.borderBoxSize,d=Array.isArray(l)?l[0]:l;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Et="Popper",[an,Ce]=ce(Et),[us,cn]=an(Et),ln=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return u.jsx(us,{scope:t,anchor:o,onAnchorChange:r,children:n})};ln.displayName=Et;var un="PopperAnchor",dn=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=cn(un,n),i=s.useRef(null),c=M(t,i),l=s.useRef(null);return s.useEffect(()=>{const d=l.current;l.current=o?.current||i.current,d!==l.current&&a.onAnchorChange(l.current)}),o?null:u.jsx(T.div,{...r,ref:c})});dn.displayName=un;var St="PopperContent",[ds,fs]=an(St),fn=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:x,...m}=e,h=cn(St,n),[y,w]=s.useState(null),C=M(t,S=>w(S)),[R,_]=s.useState(null),O=ls(R),P=O?.width??0,I=O?.height??0,$=o+(a!=="center"?"-"+a:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(d)?d:[d],H=B.length>0,K={padding:F,boundary:B.filter(ms),altBoundary:H},{refs:Y,floatingStyles:z,placement:k,isPositioned:X,middlewareData:j}=hr({strategy:"fixed",placement:$,whileElementsMounted:(...S)=>br(...S,{animationFrame:g==="always"}),elements:{reference:h.anchor},middleware:[gr({mainAxis:r+I,alignmentAxis:i}),l&&xr({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Sr():void 0,...K}),l&&wr({...K}),yr({...K,apply:({elements:S,rects:N,availableWidth:W,availableHeight:A})=>{const{width:D,height:L}=N.reference,Q=S.floating.style;Q.setProperty("--radix-popper-available-width",`${W}px`),Q.setProperty("--radix-popper-available-height",`${A}px`),Q.setProperty("--radix-popper-anchor-width",`${D}px`),Q.setProperty("--radix-popper-anchor-height",`${L}px`)}}),R&&Cr({element:R,padding:c}),vs({arrowWidth:P,arrowHeight:I}),v&&Er({strategy:"referenceHidden",...K})]}),[b,Z]=vn(k),G=re(x);U(()=>{X&&G?.()},[X,G]);const te=j.arrow?.x,ae=j.arrow?.y,J=j.arrow?.centerOffset!==0,[ie,q]=s.useState();return U(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:X?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(ds,{scope:n,placedSide:b,onArrowChange:_,arrowX:te,arrowY:ae,shouldHideArrow:J,children:u.jsx(T.div,{"data-side":b,"data-align":Z,...m,ref:C,style:{...m.style,animation:X?void 0:"none"}})})})});fn.displayName=St;var pn="PopperArrow",ps={top:"bottom",right:"left",bottom:"top",left:"right"},mn=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=fs(pn,o),i=ps[a.placedSide];return u.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:u.jsx(cs,{...r,ref:n,style:{...r.style,display:"block"}})})});mn.displayName=pn;function ms(e){return e!==null}var vs=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[d,f]=vn(n),p={start:"0%",center:"50%",end:"100%"}[f],v=(r.arrow?.x??0)+c/2,g=(r.arrow?.y??0)+l/2;let x="",m="";return d==="bottom"?(x=i?p:`${v}px`,m=`${-l}px`):d==="top"?(x=i?p:`${v}px`,m=`${o.floating.height+l}px`):d==="right"?(x=`${-l}px`,m=i?p:`${g}px`):d==="left"&&(x=`${o.floating.width+l}px`,m=i?p:`${g}px`),{data:{x,y:m}}}});function vn(e){const[t,n="center"]=e.split("-");return[t,n]}var hn=ln,bt=dn,Rt=fn,Pt=mn,hs="Portal",Ue=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);U(()=>a(!0),[]);const i=n||r&&globalThis?.document?.body;return i?vr.createPortal(u.jsx(T.div,{...o,ref:t}),i):null});Ue.displayName=hs;function gs(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var se=e=>{const{present:t,children:n}=e,o=xs(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=M(o.ref,ws(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};se.displayName="Presence";function xs(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,l]=gs(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=De(o.current);a.current=c==="mounted"?d:"none"},[c]),U(()=>{const d=o.current,f=r.current;if(f!==e){const v=a.current,g=De(d);e?l("MOUNT"):g==="none"||d?.display==="none"?l("UNMOUNT"):l(f&&v!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),U(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=g=>{const m=De(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(l("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=g=>{g.target===t&&(a.current=De(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function De(e){return e?.animationName||"none"}function ws(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rt="rovingFocusGroup.onEntryFocus",ys={bubbles:!1,cancelable:!0},Me="RovingFocusGroup",[at,gn,Cs]=wt(Me),[Es,He]=ce(Me,[Cs]),[Ss,bs]=Es(Me),xn=s.forwardRef((e,t)=>u.jsx(at.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(at.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Rs,{...e,ref:t})})}));xn.displayName=Me;var Rs=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,v=s.useRef(null),g=M(t,v),x=yt(a),[m,h]=$e({prop:i,defaultProp:c??null,onChange:l,caller:Me}),[y,w]=s.useState(!1),C=re(d),R=gn(n),_=s.useRef(!1),[O,P]=s.useState(0);return s.useEffect(()=>{const I=v.current;if(I)return I.addEventListener(rt,C),()=>I.removeEventListener(rt,C)},[C]),u.jsx(Ss,{scope:n,orientation:o,dir:x,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(I=>h(I),[h]),onItemShiftTab:s.useCallback(()=>w(!0),[]),onFocusableItemAdd:s.useCallback(()=>P(I=>I+1),[]),onFocusableItemRemove:s.useCallback(()=>P(I=>I-1),[]),children:u.jsx(T.div,{tabIndex:y||O===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:E(e.onMouseDown,()=>{_.current=!0}),onFocus:E(e.onFocus,I=>{const $=!_.current;if(I.target===I.currentTarget&&$&&!y){const F=new CustomEvent(rt,ys);if(I.currentTarget.dispatchEvent(F),!F.defaultPrevented){const B=R().filter(k=>k.focusable),H=B.find(k=>k.active),K=B.find(k=>k.id===m),z=[H,K,...B].filter(Boolean).map(k=>k.ref.current);Cn(z,f)}}_.current=!1}),onBlur:E(e.onBlur,()=>w(!1))})})}),wn="RovingFocusGroupItem",yn=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,children:i,...c}=e,l=me(),d=a||l,f=bs(wn,n),p=f.currentTabStopId===d,v=gn(n),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:m}=f;return s.useEffect(()=>{if(o)return g(),()=>x()},[o,g,x]),u.jsx(at.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:u.jsx(T.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:E(e.onMouseDown,h=>{o?f.onItemFocus(d):h.preventDefault()}),onFocus:E(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:E(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Is(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let C=v().filter(R=>R.focusable).map(R=>R.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const R=C.indexOf(h.currentTarget);C=f.loop?_s(C,R+1):C.slice(R+1)}setTimeout(()=>Cn(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});yn.displayName=wn;var Ps={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ts(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Is(e,t,n){const o=Ts(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Ps[o]}function Cn(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function _s(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var En=xn,Sn=yn,it=["Enter"," "],Ms=["ArrowDown","PageUp","Home"],bn=["ArrowUp","PageDown","End"],Ns=[...Ms,...bn],As={ltr:[...it,"ArrowRight"],rtl:[...it,"ArrowLeft"]},Ds={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ne="Menu",[Re,Os,js]=wt(Ne),[ge,Rn]=ce(Ne,[js,Ce,He]),Ke=Ce(),Pn=He(),[Ls,xe]=ge(Ne),[Fs,Ae]=ge(Ne),Tn=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=Ke(t),[l,d]=s.useState(null),f=s.useRef(!1),p=re(a),v=yt(r);return s.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),u.jsx(hn,{...c,children:u.jsx(Ls,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:d,children:u.jsx(Fs,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:v,modal:i,children:o})})})};Tn.displayName=Ne;var ks="MenuAnchor",Tt=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ke(n);return u.jsx(bt,{...r,...o,ref:t})});Tt.displayName=ks;var It="MenuPortal",[$s,In]=ge(It,{forceMount:void 0}),_n=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=xe(It,t);return u.jsx($s,{scope:t,forceMount:n,children:u.jsx(se,{present:n||a.open,children:u.jsx(Ue,{asChild:!0,container:r,children:o})})})};_n.displayName=It;var ee="MenuContent",[Bs,_t]=ge(ee),Mn=s.forwardRef((e,t)=>{const n=In(ee,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=xe(ee,e.__scopeMenu),i=Ae(ee,e.__scopeMenu);return u.jsx(Re.Provider,{scope:e.__scopeMenu,children:u.jsx(se,{present:o||a.open,children:u.jsx(Re.Slot,{scope:e.__scopeMenu,children:i.modal?u.jsx(Us,{...r,ref:t}):u.jsx(Hs,{...r,ref:t})})})})}),Us=s.forwardRef((e,t)=>{const n=xe(ee,e.__scopeMenu),o=s.useRef(null),r=M(t,o);return s.useEffect(()=>{const a=o.current;if(a)return xt(a)},[]),u.jsx(Mt,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:E(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Hs=s.forwardRef((e,t)=>{const n=xe(ee,e.__scopeMenu);return u.jsx(Mt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ks=we("MenuContent.ScrollLock"),Mt=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:g,disableOutsideScroll:x,...m}=e,h=xe(ee,n),y=Ae(ee,n),w=Ke(n),C=Pn(n),R=Os(n),[_,O]=s.useState(null),P=s.useRef(null),I=M(t,P,h.onContentChange),$=s.useRef(0),F=s.useRef(""),B=s.useRef(0),H=s.useRef(null),K=s.useRef("right"),Y=s.useRef(0),z=x?gt:s.Fragment,k=x?{as:Ks,allowPinchZoom:!0}:void 0,X=b=>{const Z=F.current+b,G=R().filter(S=>!S.disabled),te=document.activeElement,ae=G.find(S=>S.ref.current===te)?.textValue,J=G.map(S=>S.textValue),ie=ta(J,Z,ae),q=G.find(S=>S.textValue===ie)?.ref.current;(function S(N){F.current=N,window.clearTimeout($.current),N!==""&&($.current=window.setTimeout(()=>S(""),1e3))})(Z),q&&setTimeout(()=>q.focus())};s.useEffect(()=>()=>window.clearTimeout($.current),[]),Ct();const j=s.useCallback(b=>K.current===H.current?.side&&oa(b,H.current?.area),[]);return u.jsx(Bs,{scope:n,searchRef:F,onItemEnter:s.useCallback(b=>{j(b)&&b.preventDefault()},[j]),onItemLeave:s.useCallback(b=>{j(b)||(P.current?.focus(),O(null))},[j]),onTriggerLeave:s.useCallback(b=>{j(b)&&b.preventDefault()},[j]),pointerGraceTimerRef:B,onPointerGraceIntentChange:s.useCallback(b=>{H.current=b},[]),children:u.jsx(z,{...k,children:u.jsx(Be,{asChild:!0,trapped:r,onMountAutoFocus:E(a,b=>{b.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:u.jsx(_e,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:v,onDismiss:g,children:u.jsx(En,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:O,onEntryFocus:E(l,b=>{y.isUsingKeyboardRef.current||b.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Rt,{role:"menu","aria-orientation":"vertical","data-state":Vn(h.open),"data-radix-menu-content":"",dir:y.dir,...w,...m,ref:I,style:{outline:"none",...m.style},onKeyDown:E(m.onKeyDown,b=>{const G=b.target.closest("[data-radix-menu-content]")===b.currentTarget,te=b.ctrlKey||b.altKey||b.metaKey,ae=b.key.length===1;G&&(b.key==="Tab"&&b.preventDefault(),!te&&ae&&X(b.key));const J=P.current;if(b.target!==J||!Ns.includes(b.key))return;b.preventDefault();const q=R().filter(S=>!S.disabled).map(S=>S.ref.current);bn.includes(b.key)&&q.reverse(),Qs(q)}),onBlur:E(e.onBlur,b=>{b.currentTarget.contains(b.target)||(window.clearTimeout($.current),F.current="")}),onPointerMove:E(e.onPointerMove,Pe(b=>{const Z=b.target,G=Y.current!==b.clientX;if(b.currentTarget.contains(Z)&&G){const te=b.clientX>Y.current?"right":"left";K.current=te,Y.current=b.clientX}}))})})})})})})});Mn.displayName=ee;var Gs="MenuGroup",Nt=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return u.jsx(T.div,{role:"group",...o,ref:t})});Nt.displayName=Gs;var Ws="MenuLabel",Nn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return u.jsx(T.div,{...o,ref:t})});Nn.displayName=Ws;var je="MenuItem",qt="menu.itemSelect",Ge=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=s.useRef(null),i=Ae(je,e.__scopeMenu),c=_t(je,e.__scopeMenu),l=M(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const v=new CustomEvent(qt,{bubbles:!0,cancelable:!0});p.addEventListener(qt,g=>o?.(g),{once:!0}),tn(p,v),v.defaultPrevented?d.current=!1:i.onClose()}};return u.jsx(An,{...r,ref:l,disabled:n,onClick:E(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:E(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:E(e.onKeyDown,p=>{const v=c.searchRef.current!=="";n||v&&p.key===" "||it.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Ge.displayName=je;var An=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,i=_t(je,n),c=Pn(n),l=s.useRef(null),d=M(t,l),[f,p]=s.useState(!1),[v,g]=s.useState("");return s.useEffect(()=>{const x=l.current;x&&g((x.textContent??"").trim())},[a.children]),u.jsx(Re.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:u.jsx(Sn,{asChild:!0,...c,focusable:!o,children:u.jsx(T.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:E(e.onPointerMove,Pe(x=>{o?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:E(e.onPointerLeave,Pe(x=>i.onItemLeave(x))),onFocus:E(e.onFocus,()=>p(!0)),onBlur:E(e.onBlur,()=>p(!1))})})})}),Vs="MenuCheckboxItem",Dn=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return u.jsx(kn,{scope:e.__scopeMenu,checked:n,children:u.jsx(Ge,{role:"menuitemcheckbox","aria-checked":Le(n)?"mixed":n,...r,ref:t,"data-state":Dt(n),onSelect:E(r.onSelect,()=>o?.(Le(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Dn.displayName=Vs;var On="MenuRadioGroup",[zs,Ys]=ge(On,{value:void 0,onValueChange:()=>{}}),jn=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=re(o);return u.jsx(zs,{scope:e.__scopeMenu,value:n,onValueChange:a,children:u.jsx(Nt,{...r,ref:t})})});jn.displayName=On;var Ln="MenuRadioItem",Fn=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=Ys(Ln,e.__scopeMenu),a=n===r.value;return u.jsx(kn,{scope:e.__scopeMenu,checked:a,children:u.jsx(Ge,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":Dt(a),onSelect:E(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Fn.displayName=Ln;var At="MenuItemIndicator",[kn,Xs]=ge(At,{checked:!1}),$n=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=Xs(At,n);return u.jsx(se,{present:o||Le(a.checked)||a.checked===!0,children:u.jsx(T.span,{...r,ref:t,"data-state":Dt(a.checked)})})});$n.displayName=At;var qs="MenuSeparator",Bn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return u.jsx(T.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Bn.displayName=qs;var Zs="MenuArrow",Un=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ke(n);return u.jsx(Pt,{...r,...o,ref:t})});Un.displayName=Zs;var Js="MenuSub",[$i,Hn]=ge(Js),Se="MenuSubTrigger",Kn=s.forwardRef((e,t)=>{const n=xe(Se,e.__scopeMenu),o=Ae(Se,e.__scopeMenu),r=Hn(Se,e.__scopeMenu),a=_t(Se,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),l(null)}},[c,l]),u.jsx(Tt,{asChild:!0,...d,children:u.jsx(An,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Vn(n.open),...e,ref:Ie(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:E(e.onPointerMove,Pe(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:E(e.onPointerLeave,Pe(p=>{f();const v=n.content?.getBoundingClientRect();if(v){const g=n.content?.dataset.side,x=g==="right",m=x?-5:5,h=v[x?"left":"right"],y=v[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:h,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:h,y:v.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:E(e.onKeyDown,p=>{const v=a.searchRef.current!=="";e.disabled||v&&p.key===" "||As[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Kn.displayName=Se;var Gn="MenuSubContent",Wn=s.forwardRef((e,t)=>{const n=In(ee,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=xe(ee,e.__scopeMenu),i=Ae(ee,e.__scopeMenu),c=Hn(Gn,e.__scopeMenu),l=s.useRef(null),d=M(t,l);return u.jsx(Re.Provider,{scope:e.__scopeMenu,children:u.jsx(se,{present:o||a.open,children:u.jsx(Re.Slot,{scope:e.__scopeMenu,children:u.jsx(Mt,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:E(e.onFocusOutside,f=>{f.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:E(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:E(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),v=Ds[i.dir].includes(f.key);p&&v&&(a.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});Wn.displayName=Gn;function Vn(e){return e?"open":"closed"}function Le(e){return e==="indeterminate"}function Dt(e){return Le(e)?"indeterminate":e?"checked":"unchecked"}function Qs(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ea(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function ta(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=ea(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const l=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function na(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],l=t[i],d=c.x,f=c.y,p=l.x,v=l.y;f>o!=v>o&&n<(p-d)*(o-f)/(v-f)+d&&(r=!r)}return r}function oa(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return na(n,t)}function Pe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ra=Tn,sa=Tt,aa=_n,ia=Mn,ca=Nt,la=Nn,ua=Ge,da=Dn,fa=jn,pa=Fn,ma=$n,va=Bn,ha=Un,ga=Kn,xa=Wn,We="DropdownMenu",[wa]=ce(We,[Rn]),V=Rn(),[ya,zn]=wa(We),Yn=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,l=V(t),d=s.useRef(null),[f,p]=$e({prop:r,defaultProp:a??!1,onChange:i,caller:We});return u.jsx(ya,{scope:t,triggerId:me(),triggerRef:d,contentId:me(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(v=>!v),[p]),modal:c,children:u.jsx(ra,{...l,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};Yn.displayName=We;var Xn="DropdownMenuTrigger",qn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=zn(Xn,n),i=V(n);return u.jsx(sa,{asChild:!0,...i,children:u.jsx(T.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ie(t,a.triggerRef),onPointerDown:E(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:E(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});qn.displayName=Xn;var Ca="DropdownMenuPortal",Zn=e=>{const{__scopeDropdownMenu:t,...n}=e,o=V(t);return u.jsx(aa,{...o,...n})};Zn.displayName=Ca;var Jn="DropdownMenuContent",Qn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=zn(Jn,n),a=V(n),i=s.useRef(!1);return u.jsx(ia,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:E(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:E(e.onInteractOutside,c=>{const l=c.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0,f=l.button===2||d;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qn.displayName=Jn;var Ea="DropdownMenuGroup",Sa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(ca,{...r,...o,ref:t})});Sa.displayName=Ea;var ba="DropdownMenuLabel",eo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(la,{...r,...o,ref:t})});eo.displayName=ba;var Ra="DropdownMenuItem",to=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(ua,{...r,...o,ref:t})});to.displayName=Ra;var Pa="DropdownMenuCheckboxItem",no=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(da,{...r,...o,ref:t})});no.displayName=Pa;var Ta="DropdownMenuRadioGroup",Ia=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(fa,{...r,...o,ref:t})});Ia.displayName=Ta;var _a="DropdownMenuRadioItem",oo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(pa,{...r,...o,ref:t})});oo.displayName=_a;var Ma="DropdownMenuItemIndicator",ro=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(ma,{...r,...o,ref:t})});ro.displayName=Ma;var Na="DropdownMenuSeparator",so=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(va,{...r,...o,ref:t})});so.displayName=Na;var Aa="DropdownMenuArrow",Da=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(ha,{...r,...o,ref:t})});Da.displayName=Aa;var Oa="DropdownMenuSubTrigger",ao=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(ga,{...r,...o,ref:t})});ao.displayName=Oa;var ja="DropdownMenuSubContent",io=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=V(n);return u.jsx(xa,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});io.displayName=ja;var Bi=Yn,Ui=qn,Hi=Zn,Ki=Qn,Gi=eo,Wi=to,Vi=no,zi=oo,Yi=ro,Xi=so,qi=ao,Zi=io,Ve="Tabs",[La]=ce(Ve,[He]),co=He(),[Fa,Ot]=La(Ve),lo=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:l="automatic",...d}=e,f=yt(c),[p,v]=$e({prop:o,onChange:r,defaultProp:a??"",caller:Ve});return u.jsx(Fa,{scope:n,baseId:me(),value:p,onValueChange:v,orientation:i,dir:f,activationMode:l,children:u.jsx(T.div,{dir:f,"data-orientation":i,...d,ref:t})})});lo.displayName=Ve;var uo="TabsList",fo=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=Ot(uo,n),i=co(n);return u.jsx(En,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:u.jsx(T.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});fo.displayName=uo;var po="TabsTrigger",mo=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,i=Ot(po,n),c=co(n),l=go(i.baseId,o),d=xo(i.baseId,o),f=o===i.value;return u.jsx(Sn,{asChild:!0,...c,focusable:!r,active:f,children:u.jsx(T.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:E(e.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?i.onValueChange(o):p.preventDefault()}),onKeyDown:E(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(o)}),onFocus:E(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!r&&p&&i.onValueChange(o)})})})});mo.displayName=po;var vo="TabsContent",ho=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:a,...i}=e,c=Ot(vo,n),l=go(c.baseId,o),d=xo(c.baseId,o),f=o===c.value,p=s.useRef(f);return s.useEffect(()=>{const v=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(v)},[]),u.jsx(se,{present:r||f,children:({present:v})=>u.jsx(T.div,{"data-state":f?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!v,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:v&&a})})});ho.displayName=vo;function go(e,t){return`${e}-trigger-${t}`}function xo(e,t){return`${e}-content-${t}`}var Ji=lo,Qi=fo,ec=mo,tc=ho,wo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ka="VisuallyHidden",yo=s.forwardRef((e,t)=>u.jsx(T.span,{...e,ref:t,style:{...wo,...e.style}}));yo.displayName=ka;var $a=yo,[ze]=ce("Tooltip",[Ce]),Ye=Ce(),Co="TooltipProvider",Ba=700,ct="tooltip.open",[Ua,jt]=ze(Co),Eo=e=>{const{__scopeTooltip:t,delayDuration:n=Ba,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),l=s.useRef(0);return s.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),u.jsx(Ua,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:a})};Eo.displayName=Co;var Te="Tooltip",[Ha,Xe]=ze(Te),So=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,l=jt(Te,e.__scopeTooltip),d=Ye(t),[f,p]=s.useState(null),v=me(),g=s.useRef(0),x=i??l.disableHoverableContent,m=c??l.delayDuration,h=s.useRef(!1),[y,w]=$e({prop:o,defaultProp:r??!1,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(ct))):l.onClose(),a?.(P)},caller:Te}),C=s.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),R=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,h.current=!1,w(!0)},[w]),_=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),O=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{h.current=!0,w(!0),g.current=0},m)},[m,w]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),u.jsx(hn,{...d,children:u.jsx(Ha,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{l.isOpenDelayedRef.current?O():R()},[l.isOpenDelayedRef,O,R]),onTriggerLeave:s.useCallback(()=>{x?_():(window.clearTimeout(g.current),g.current=0)},[_,x]),onOpen:R,onClose:_,disableHoverableContent:x,children:n})})};So.displayName=Te;var lt="TooltipTrigger",bo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Xe(lt,n),a=jt(lt,n),i=Ye(n),c=s.useRef(null),l=M(t,c,r.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(bt,{asChild:!0,...i,children:u.jsx(T.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:E(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:E(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:E(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:E(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:E(e.onBlur,r.onClose),onClick:E(e.onClick,r.onClose)})})});bo.displayName=lt;var Ka="TooltipPortal",[nc,Ga]=ze(Ka,{forceMount:void 0}),ye="TooltipContent",Ro=s.forwardRef((e,t)=>{const n=Ga(ye,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=Xe(ye,e.__scopeTooltip);return u.jsx(se,{present:o||i.open,children:i.disableHoverableContent?u.jsx(Po,{side:r,...a,ref:t}):u.jsx(Wa,{side:r,...a,ref:t})})}),Wa=s.forwardRef((e,t)=>{const n=Xe(ye,e.__scopeTooltip),o=jt(ye,e.__scopeTooltip),r=s.useRef(null),a=M(t,r),[i,c]=s.useState(null),{trigger:l,onClose:d}=n,f=r.current,{onPointerInTransitChange:p}=o,v=s.useCallback(()=>{c(null),p(!1)},[p]),g=s.useCallback((x,m)=>{const h=x.currentTarget,y={x:x.clientX,y:x.clientY},w=qa(y,h.getBoundingClientRect()),C=Za(y,w),R=Ja(m.getBoundingClientRect()),_=ei([...C,...R]);c(_),p(!0)},[p]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(l&&f){const x=h=>g(h,f),m=h=>g(h,l);return l.addEventListener("pointerleave",x),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",m)}}},[l,f,g,v]),s.useEffect(()=>{if(i){const x=m=>{const h=m.target,y={x:m.clientX,y:m.clientY},w=l?.contains(h)||f?.contains(h),C=!Qa(y,i);w?v():C&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,f,i,d,v]),u.jsx(Po,{...e,ref:a})}),[Va,za]=ze(Te,{isInside:!1}),Ya=kr("TooltipContent"),Po=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,l=Xe(ye,n),d=Ye(n),{onClose:f}=l;return s.useEffect(()=>(document.addEventListener(ct,f),()=>document.removeEventListener(ct,f)),[f]),s.useEffect(()=>{if(l.trigger){const p=v=>{v.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),u.jsx(_e,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:u.jsxs(Rt,{"data-state":l.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Ya,{children:o}),u.jsx(Va,{scope:n,isInside:!0,children:u.jsx($a,{id:l.contentId,role:"tooltip",children:r||o})})]})})});Ro.displayName=ye;var To="TooltipArrow",Xa=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ye(n);return za(To,n).isInside?null:u.jsx(Pt,{...r,...o,ref:t})});Xa.displayName=To;function qa(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Za(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Ja(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Qa(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],l=t[i],d=c.x,f=c.y,p=l.x,v=l.y;f>o!=v>o&&n<(p-d)*(o-f)/(v-f)+d&&(r=!r)}return r}function ei(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),ti(t)}function ti(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oc=Eo,rc=So,sc=bo,ac=Ro,Io="Dialog",[_o]=ce(Io),[ic,oe]=_o(Io),Mo="DialogTrigger",ni=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=oe(Mo,n),a=M(t,r.triggerRef);return u.jsx(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":kt(r.open),...o,ref:a,onClick:E(e.onClick,r.onOpenToggle)})});ni.displayName=Mo;var Lt="DialogPortal",[oi,No]=_o(Lt,{forceMount:void 0}),Ao=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=oe(Lt,t);return u.jsx(oi,{scope:t,forceMount:n,children:s.Children.map(o,i=>u.jsx(se,{present:n||a.open,children:u.jsx(Ue,{asChild:!0,container:r,children:i})}))})};Ao.displayName=Lt;var Fe="DialogOverlay",Do=s.forwardRef((e,t)=>{const n=No(Fe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=oe(Fe,e.__scopeDialog);return a.modal?u.jsx(se,{present:o||a.open,children:u.jsx(si,{...r,ref:t})}):null});Do.displayName=Fe;var ri=we("DialogOverlay.RemoveScroll"),si=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=oe(Fe,n);return u.jsx(gt,{as:ri,allowPinchZoom:!0,shards:[r.contentRef],children:u.jsx(T.div,{"data-state":kt(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),ve="DialogContent",Oo=s.forwardRef((e,t)=>{const n=No(ve,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=oe(ve,e.__scopeDialog);return u.jsx(se,{present:o||a.open,children:a.modal?u.jsx(ai,{...r,ref:t}):u.jsx(ii,{...r,ref:t})})});Oo.displayName=ve;var ai=s.forwardRef((e,t)=>{const n=oe(ve,e.__scopeDialog),o=s.useRef(null),r=M(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return xt(a)},[]),u.jsx(jo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:E(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:E(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:E(e.onFocusOutside,a=>a.preventDefault())})}),ii=s.forwardRef((e,t)=>{const n=oe(ve,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return u.jsx(jo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),jo=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,c=oe(ve,n),l=s.useRef(null),d=M(t,l);return Ct(),u.jsxs(u.Fragment,{children:[u.jsx(Be,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:u.jsx(_e,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":kt(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(ci,{titleId:c.titleId}),u.jsx(ui,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Ft="DialogTitle",Lo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=oe(Ft,n);return u.jsx(T.h2,{id:r.titleId,...o,ref:t})});Lo.displayName=Ft;var Fo="DialogDescription",ko=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=oe(Fo,n);return u.jsx(T.p,{id:r.descriptionId,...o,ref:t})});ko.displayName=Fo;var $o="DialogClose",Bo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=oe($o,n);return u.jsx(T.button,{type:"button",...o,ref:t,onClick:E(e.onClick,()=>r.onOpenChange(!1))})});Bo.displayName=$o;function kt(e){return e?"open":"closed"}var Uo="DialogTitleWarning",[cc,Ho]=Ar(Uo,{contentName:ve,titleName:Ft,docsSlug:"dialog"}),ci=({titleId:e})=>{const t=Ho(Uo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},li="DialogDescriptionWarning",ui=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ho(li).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},lc=Ao,uc=Do,dc=Oo,fc=Lo,pc=ko,mc=Bo,di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fi=di.reduce((e,t)=>{const n=Qt(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),pi="Label",Ko=s.forwardRef((e,t)=>u.jsx(fi.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ko.displayName=pi;var vc=Ko;function Zt(e,[t,n]){return Math.min(n,Math.max(t,e))}function mi(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vi=[" ","Enter","ArrowUp","ArrowDown"],hi=[" ","Enter"],qe="Select",[$t,Ze,gi]=wt(qe),[Ee]=ce(qe,[gi,Ce]),Bt=Ce(),[hc,ue]=Ee(qe),[gc,xi]=Ee(qe),Go="SelectTrigger",Wo=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=Bt(n),i=ue(Go,n),c=i.disabled||o,l=M(t,i.onTriggerChange),d=Ze(n),f=s.useRef("touch"),[p,v,g]=pr(m=>{const h=d().filter(C=>!C.disabled),y=h.find(C=>C.value===i.value),w=mr(h,m,y);w!==void 0&&i.onValueChange(w.value)}),x=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return u.jsx(bt,{asChild:!0,...a,children:u.jsx(T.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":fr(i.value)?"":void 0,...r,ref:l,onClick:E(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&x(m)}),onPointerDown:E(r.onPointerDown,m=>{f.current=m.pointerType;const h=m.target;h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(x(m),m.preventDefault())}),onKeyDown:E(r.onKeyDown,m=>{const h=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&v(m.key),!(h&&m.key===" ")&&vi.includes(m.key)&&(x(),m.preventDefault())})})})});Wo.displayName=Go;var Vo="SelectValue",wi=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:i="",...c}=e,l=ue(Vo,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,p=M(t,l.onValueNodeChange);return U(()=>{d(f)},[d,f]),u.jsx(T.span,{...c,ref:p,style:{pointerEvents:"none"},children:fr(l.value)?u.jsx(u.Fragment,{children:i}):a})});wi.displayName=Vo;var yi="SelectIcon",zo=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return u.jsx(T.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});zo.displayName=yi;var Ci="SelectPortal",Yo=e=>u.jsx(Ue,{asChild:!0,...e});Yo.displayName=Ci;var he="SelectContent",Xo=s.forwardRef((e,t)=>{const n=ue(he,e.__scopeSelect),[o,r]=s.useState();if(U(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?ht.createPortal(u.jsx(qo,{scope:e.__scopeSelect,children:u.jsx($t.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),a):null}return u.jsx(Zo,{...e,ref:t})});Xo.displayName=he;var ne=10,[qo,de]=Ee(he),Ei="SelectContentImpl",Si=we("SelectContent.RemoveScroll"),Zo=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:l,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:g,sticky:x,hideWhenDetached:m,avoidCollisions:h,...y}=e,w=ue(he,n),[C,R]=s.useState(null),[_,O]=s.useState(null),P=M(t,S=>R(S)),[I,$]=s.useState(null),[F,B]=s.useState(null),H=Ze(n),[K,Y]=s.useState(!1),z=s.useRef(!1);s.useEffect(()=>{if(C)return xt(C)},[C]),Ct();const k=s.useCallback(S=>{const[N,...W]=H().map(L=>L.ref.current),[A]=W.slice(-1),D=document.activeElement;for(const L of S)if(L===D||(L?.scrollIntoView({block:"nearest"}),L===N&&_&&(_.scrollTop=0),L===A&&_&&(_.scrollTop=_.scrollHeight),L?.focus(),document.activeElement!==D))return},[H,_]),X=s.useCallback(()=>k([I,C]),[k,I,C]);s.useEffect(()=>{K&&X()},[K,X]);const{onOpenChange:j,triggerPointerDownPosRef:b}=w;s.useEffect(()=>{if(C){let S={x:0,y:0};const N=A=>{S={x:Math.abs(Math.round(A.pageX)-(b.current?.x??0)),y:Math.abs(Math.round(A.pageY)-(b.current?.y??0))}},W=A=>{S.x<=10&&S.y<=10?A.preventDefault():C.contains(A.target)||j(!1),document.removeEventListener("pointermove",N),b.current=null};return b.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",W,{capture:!0})}}},[C,j,b]),s.useEffect(()=>{const S=()=>j(!1);return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[j]);const[Z,G]=pr(S=>{const N=H().filter(D=>!D.disabled),W=N.find(D=>D.ref.current===document.activeElement),A=mr(N,S,W);A&&setTimeout(()=>A.ref.current.focus())}),te=s.useCallback((S,N,W)=>{const A=!z.current&&!W;(w.value!==void 0&&w.value===N||A)&&($(S),A&&(z.current=!0))},[w.value]),ae=s.useCallback(()=>C?.focus(),[C]),J=s.useCallback((S,N,W)=>{const A=!z.current&&!W;(w.value!==void 0&&w.value===N||A)&&B(S)},[w.value]),ie=o==="popper"?ut:Jo,q=ie===ut?{side:c,sideOffset:l,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:g,sticky:x,hideWhenDetached:m,avoidCollisions:h}:{};return u.jsx(qo,{scope:n,content:C,viewport:_,onViewportChange:O,itemRefCallback:te,selectedItem:I,onItemLeave:ae,itemTextRefCallback:J,focusSelectedItem:X,selectedItemText:F,position:o,isPositioned:K,searchRef:Z,children:u.jsx(gt,{as:Si,allowPinchZoom:!0,children:u.jsx(Be,{asChild:!0,trapped:w.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:E(r,S=>{w.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(_e,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:u.jsx(ie,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:S=>S.preventDefault(),...y,...q,onPlaced:()=>Y(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:E(y.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&G(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let A=H().filter(D=>!D.disabled).map(D=>D.ref.current);if(["ArrowUp","End"].includes(S.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const D=S.target,L=A.indexOf(D);A=A.slice(L+1)}setTimeout(()=>k(A)),S.preventDefault()}})})})})})})});Zo.displayName=Ei;var bi="SelectItemAlignedPosition",Jo=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=ue(he,n),i=de(he,n),[c,l]=s.useState(null),[d,f]=s.useState(null),p=M(t,P=>f(P)),v=Ze(n),g=s.useRef(!1),x=s.useRef(!0),{viewport:m,selectedItem:h,selectedItemText:y,focusSelectedItem:w}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&m&&h&&y){const P=a.trigger.getBoundingClientRect(),I=d.getBoundingClientRect(),$=a.valueNode.getBoundingClientRect(),F=y.getBoundingClientRect();if(a.dir!=="rtl"){const D=F.left-I.left,L=$.left-D,Q=P.left-L,fe=P.width+Q,Je=Math.max(fe,I.width),Qe=window.innerWidth-ne,et=Zt(L,[ne,Math.max(ne,Qe-Je)]);c.style.minWidth=fe+"px",c.style.left=et+"px"}else{const D=I.right-F.right,L=window.innerWidth-$.right-D,Q=window.innerWidth-P.right-L,fe=P.width+Q,Je=Math.max(fe,I.width),Qe=window.innerWidth-ne,et=Zt(L,[ne,Math.max(ne,Qe-Je)]);c.style.minWidth=fe+"px",c.style.right=et+"px"}const B=v(),H=window.innerHeight-ne*2,K=m.scrollHeight,Y=window.getComputedStyle(d),z=parseInt(Y.borderTopWidth,10),k=parseInt(Y.paddingTop,10),X=parseInt(Y.borderBottomWidth,10),j=parseInt(Y.paddingBottom,10),b=z+k+K+j+X,Z=Math.min(h.offsetHeight*5,b),G=window.getComputedStyle(m),te=parseInt(G.paddingTop,10),ae=parseInt(G.paddingBottom,10),J=P.top+P.height/2-ne,ie=H-J,q=h.offsetHeight/2,S=h.offsetTop+q,N=z+k+S,W=b-N;if(N<=J){const D=B.length>0&&h===B[B.length-1].ref.current;c.style.bottom="0px";const L=d.clientHeight-m.offsetTop-m.offsetHeight,Q=Math.max(ie,q+(D?ae:0)+L+X),fe=N+Q;c.style.height=fe+"px"}else{const D=B.length>0&&h===B[0].ref.current;c.style.top="0px";const Q=Math.max(J,z+m.offsetTop+(D?te:0)+q)+W;c.style.height=Q+"px",m.scrollTop=N-J+m.offsetTop}c.style.margin=`${ne}px 0`,c.style.minHeight=Z+"px",c.style.maxHeight=H+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[v,a.trigger,a.valueNode,c,d,m,h,y,a.dir,o]);U(()=>C(),[C]);const[R,_]=s.useState();U(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const O=s.useCallback(P=>{P&&x.current===!0&&(C(),w?.(),x.current=!1)},[C,w]);return u.jsx(Pi,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:O,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(T.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Jo.displayName=bi;var Ri="SelectPopperPosition",ut=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=ne,...a}=e,i=Bt(n);return u.jsx(Rt,{...i,...a,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...a.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)"}})});ut.displayName=Ri;var[Pi,Ut]=Ee(he,{}),dt="SelectViewport",Qo=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=de(dt,n),i=Ut(dt,n),c=M(t,a.onViewportChange),l=s.useRef(0);return u.jsxs(u.Fragment,{children:[u.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:o}),u.jsx($t.Slot,{scope:n,children:u.jsx(T.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:E(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=i;if(v?.current&&p){const g=Math.abs(l.current-f.scrollTop);if(g>0){const x=window.innerHeight-ne*2,m=parseFloat(p.style.minHeight),h=parseFloat(p.style.height),y=Math.max(m,h);if(y<x){const w=y+g,C=Math.min(x,w),R=w-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Qo.displayName=dt;var er="SelectGroup",[Ti,Ii]=Ee(er),_i=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=me();return u.jsx(Ti,{scope:n,id:r,children:u.jsx(T.div,{role:"group","aria-labelledby":r,...o,ref:t})})});_i.displayName=er;var tr="SelectLabel",nr=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ii(tr,n);return u.jsx(T.div,{id:r.id,...o,ref:t})});nr.displayName=tr;var ke="SelectItem",[Mi,or]=Ee(ke),rr=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...i}=e,c=ue(ke,n),l=de(ke,n),d=c.value===o,[f,p]=s.useState(a??""),[v,g]=s.useState(!1),x=M(t,w=>l.itemRefCallback?.(w,o,r)),m=me(),h=s.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")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 u.jsx(Mi,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:s.useCallback(w=>{p(C=>C||(w?.textContent??"").trim())},[]),children:u.jsx($t.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:u.jsx(T.div,{role:"option","aria-labelledby":m,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:x,onFocus:E(i.onFocus,()=>g(!0)),onBlur:E(i.onBlur,()=>g(!1)),onClick:E(i.onClick,()=>{h.current!=="mouse"&&y()}),onPointerUp:E(i.onPointerUp,()=>{h.current==="mouse"&&y()}),onPointerDown:E(i.onPointerDown,w=>{h.current=w.pointerType}),onPointerMove:E(i.onPointerMove,w=>{h.current=w.pointerType,r?l.onItemLeave?.():h.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:E(i.onKeyDown,w=>{l.searchRef?.current!==""&&w.key===" "||(hi.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});rr.displayName=ke;var be="SelectItemText",sr=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,i=ue(be,n),c=de(be,n),l=or(be,n),d=xi(be,n),[f,p]=s.useState(null),v=M(t,y=>p(y),l.onItemTextChange,y=>c.itemTextRefCallback?.(y,l.value,l.disabled)),g=f?.textContent,x=s.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:h}=d;return U(()=>(m(x),()=>h(x)),[m,h,x]),u.jsxs(u.Fragment,{children:[u.jsx(T.span,{id:l.textId,...a,ref:v}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ht.createPortal(a.children,i.valueNode):null]})});sr.displayName=be;var ar="SelectItemIndicator",ir=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return or(ar,n).isSelected?u.jsx(T.span,{"aria-hidden":!0,...o,ref:t}):null});ir.displayName=ar;var ft="SelectScrollUpButton",cr=s.forwardRef((e,t)=>{const n=de(ft,e.__scopeSelect),o=Ut(ft,e.__scopeSelect),[r,a]=s.useState(!1),i=M(t,o.onScrollButtonChange);return U(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?u.jsx(ur,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});cr.displayName=ft;var pt="SelectScrollDownButton",lr=s.forwardRef((e,t)=>{const n=de(pt,e.__scopeSelect),o=Ut(pt,e.__scopeSelect),[r,a]=s.useState(!1),i=M(t,o.onScrollButtonChange);return U(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?u.jsx(ur,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});lr.displayName=pt;var ur=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=de("SelectScrollButton",n),i=s.useRef(null),c=Ze(n),l=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>l(),[l]),U(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),u.jsx(T.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:E(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:E(r.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:E(r.onPointerLeave,()=>{l()})})}),Ni="SelectSeparator",dr=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return u.jsx(T.div,{"aria-hidden":!0,...o,ref:t})});dr.displayName=Ni;var mt="SelectArrow",Ai=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Bt(n),a=ue(mt,n),i=de(mt,n);return a.open&&i.position==="popper"?u.jsx(Pt,{...r,...o,ref:t}):null});Ai.displayName=mt;var Di="SelectBubbleInput",Oi=s.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=s.useRef(null),a=M(o,r),i=mi(t);return s.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(p)}},[i,t]),u.jsx(T.select,{...n,style:{...wo,...n.style},ref:a,defaultValue:t})});Oi.displayName=Di;function fr(e){return e===""||e===void 0}function pr(e){const t=re(e),n=s.useRef(""),o=s.useRef(0),r=s.useCallback(i=>{const c=n.current+i;t(c),(function l(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function mr(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=ji(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const l=i.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function ji(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var xc=Wo,wc=zo,yc=Yo,Cc=Xo,Ec=Qo,Sc=nr,bc=rr,Rc=sr,Pc=ir,Tc=cr,Ic=lr,_c=dr;export{bc as A,Pc as B,Ki as C,pc as D,Rc as E,_c as F,Wi as I,Gi as L,uc as O,Hi as P,zi as R,ki as S,Ui as T,Ec as V,qi as a,Zi as b,Vi as c,Yi as d,Xi as e,Bi as f,Qi as g,ec as h,tc as i,Ji as j,ac as k,oc as l,rc as m,sc as n,lc as o,dc as p,mc as q,fc as r,vc as s,xc as t,wc as u,Tc as v,Ic as w,yc as x,Cc as y,Sc as z};
|
package/dist/index.html
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Agent Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-D2656GiI.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="/assets/vendor-CDPxlbZ6.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/react-BxIc-aOD.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/acp-sdk-CrD5QpoU.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/radix-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/icons-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/radix-BwF8w229.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/icons-xaawVwTw.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/markdown-PIOGdvNw.js">
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BWewCaGI.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/gui-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"check": "tsc --noEmit"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@townco/core": "0.0.
|
|
23
|
-
"@townco/ui": "0.1.
|
|
22
|
+
"@townco/core": "0.0.17",
|
|
23
|
+
"@townco/ui": "0.1.39",
|
|
24
24
|
"lucide-react": "^0.552.0",
|
|
25
25
|
"react": "^19.2.0",
|
|
26
26
|
"react-dom": "^19.2.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@tailwindcss/postcss": "^4.1.17",
|
|
30
|
-
"@townco/tsconfig": "0.1.
|
|
30
|
+
"@townco/tsconfig": "0.1.36",
|
|
31
31
|
"@types/react": "^19.2.2",
|
|
32
32
|
"@types/react-dom": "^19.2.2",
|
|
33
33
|
"@vitejs/plugin-react": "^5.1.0",
|
package/src/ChatView.tsx
CHANGED
|
@@ -24,11 +24,9 @@ import {
|
|
|
24
24
|
Message,
|
|
25
25
|
MessageContent,
|
|
26
26
|
PanelTabsHeader,
|
|
27
|
-
type SourceItem,
|
|
28
27
|
SourcesTabContent,
|
|
29
28
|
Tabs,
|
|
30
29
|
TabsContent,
|
|
31
|
-
type TodoItem,
|
|
32
30
|
TodoTabContent,
|
|
33
31
|
} from "@townco/ui/gui";
|
|
34
32
|
import {
|
|
@@ -43,6 +41,22 @@ import { useEffect, useState } from "react";
|
|
|
43
41
|
|
|
44
42
|
const logger = createLogger("gui");
|
|
45
43
|
|
|
44
|
+
// Helper component to provide openFiles callback
|
|
45
|
+
function OpenFilesButton({
|
|
46
|
+
children,
|
|
47
|
+
}: {
|
|
48
|
+
children: (props: { openFiles: () => void }) => React.ReactNode;
|
|
49
|
+
}) {
|
|
50
|
+
const { setPanelSize, setActiveTab } = ChatLayout.useChatLayoutContext();
|
|
51
|
+
|
|
52
|
+
const openFiles = () => {
|
|
53
|
+
setPanelSize("small");
|
|
54
|
+
setActiveTab("files");
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return <>{children({ openFiles })}</>;
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
export interface ChatViewProps {
|
|
47
61
|
client: AcpClient | null;
|
|
48
62
|
initialSessionId?: string | null;
|
|
@@ -86,13 +100,9 @@ function MobileHeader({
|
|
|
86
100
|
// Header component that uses ChatLayout context (must be inside ChatLayout.Root)
|
|
87
101
|
function AppChatHeader({
|
|
88
102
|
agentName,
|
|
89
|
-
todos,
|
|
90
|
-
sources,
|
|
91
103
|
showHeader,
|
|
92
104
|
}: {
|
|
93
105
|
agentName: string;
|
|
94
|
-
todos: TodoItem[];
|
|
95
|
-
sources: SourceItem[];
|
|
96
106
|
showHeader: boolean;
|
|
97
107
|
}) {
|
|
98
108
|
const { panelSize, setPanelSize } = ChatLayout.useChatLayoutContext();
|
|
@@ -143,13 +153,13 @@ function AppChatHeader({
|
|
|
143
153
|
variant="default"
|
|
144
154
|
/>
|
|
145
155
|
<TabsContent value="todo" className="mt-4">
|
|
146
|
-
<TodoTabContent
|
|
156
|
+
<TodoTabContent />
|
|
147
157
|
</TabsContent>
|
|
148
158
|
<TabsContent value="files" className="mt-4">
|
|
149
159
|
<FilesTabContent />
|
|
150
160
|
</TabsContent>
|
|
151
161
|
<TabsContent value="sources" className="mt-4">
|
|
152
|
-
<SourcesTabContent
|
|
162
|
+
<SourcesTabContent />
|
|
153
163
|
</TabsContent>
|
|
154
164
|
</Tabs>
|
|
155
165
|
</ChatHeader.ExpandablePanel>
|
|
@@ -170,6 +180,9 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
170
180
|
const [isLargeScreen, setIsLargeScreen] = useState(
|
|
171
181
|
typeof window !== "undefined" ? window.innerWidth >= 1024 : true,
|
|
172
182
|
);
|
|
183
|
+
const [placeholder, setPlaceholder] = useState<string>(
|
|
184
|
+
"Type a message or / for commands...",
|
|
185
|
+
);
|
|
173
186
|
|
|
174
187
|
// Log connection status changes
|
|
175
188
|
useEffect(() => {
|
|
@@ -209,48 +222,15 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
209
222
|
};
|
|
210
223
|
}, []);
|
|
211
224
|
|
|
212
|
-
//
|
|
213
|
-
const
|
|
225
|
+
// Handle prompt hover - temporarily show the full prompt as placeholder
|
|
226
|
+
const handlePromptHover = (prompt: string) => {
|
|
227
|
+
setPlaceholder(prompt);
|
|
228
|
+
};
|
|
214
229
|
|
|
215
|
-
//
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
title: "Boeing Scores Early Wins at Dubai Airshow",
|
|
220
|
-
sourceName: "Reuters",
|
|
221
|
-
url: "https://www.reuters.com/markets/companies/BA.N",
|
|
222
|
-
snippet:
|
|
223
|
-
"DUBAI, Nov 17 (Reuters) - Boeing (BA.N), opens new tab took centre stage at day one of the Dubai Airshow on Monday, booking a $38 billion order from host carrier Emirates and clinching more deals with African carriers, while China displayed its C919 in the Middle East for the first time.",
|
|
224
|
-
favicon: "https://www.google.com/s2/favicons?domain=reuters.com&sz=32",
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
id: "2",
|
|
228
|
-
title: "Boeing's Sustainable Aviation Goals Take Flight",
|
|
229
|
-
sourceName: "Forbes",
|
|
230
|
-
url: "https://www.forbes.com",
|
|
231
|
-
snippet:
|
|
232
|
-
"SEATTLE, Nov 18 (Reuters) - Boeing is making headway towards its sustainability targets, unveiling plans for a new eco-friendly aircraft design aimed at reducing emissions by 50% by 2030.",
|
|
233
|
-
favicon: "https://www.google.com/s2/favicons?domain=forbes.com&sz=32",
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
id: "3",
|
|
237
|
-
title: "Boeing Faces Increased Competition in Global Aviation Market",
|
|
238
|
-
sourceName: "Reuters",
|
|
239
|
-
url: "https://www.reuters.com",
|
|
240
|
-
snippet:
|
|
241
|
-
"CHICAGO, Nov 19 (Reuters) - As the global aviation industry rebounds post-pandemic, Boeing is grappling with intensified competition from rival manufacturers, particularly in the Asian market.",
|
|
242
|
-
favicon: "https://www.google.com/s2/favicons?domain=reuters.com&sz=32",
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
id: "4",
|
|
246
|
-
title: "Boeing's Starliner Successfully Completes Orbital Test Flight",
|
|
247
|
-
sourceName: "The Verge",
|
|
248
|
-
url: "https://www.theverge.com",
|
|
249
|
-
snippet:
|
|
250
|
-
"NASA, Nov 20 (Reuters) - Boeing's CST-100 Starliner spacecraft achieves a significant milestone, successfully completing its orbital test flight, paving the way for future crewed missions to the International Space Station.",
|
|
251
|
-
favicon: "https://www.google.com/s2/favicons?domain=theverge.com&sz=32",
|
|
252
|
-
},
|
|
253
|
-
];
|
|
230
|
+
// Handle prompt leave - restore the default placeholder
|
|
231
|
+
const handlePromptLeave = () => {
|
|
232
|
+
setPlaceholder("Type a message or / for commands...");
|
|
233
|
+
};
|
|
254
234
|
|
|
255
235
|
// Command menu items for chat input
|
|
256
236
|
const commandMenuItems: CommandMenuItem[] = [
|
|
@@ -301,12 +281,7 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
301
281
|
{/* Main: Vertical container for Messages + Footer */}
|
|
302
282
|
<ChatLayout.Main>
|
|
303
283
|
{/* Top Row */}
|
|
304
|
-
<AppChatHeader
|
|
305
|
-
agentName={agentName}
|
|
306
|
-
todos={todos}
|
|
307
|
-
sources={sources}
|
|
308
|
-
showHeader={messages.length > 0}
|
|
309
|
-
/>
|
|
284
|
+
<AppChatHeader agentName={agentName} showHeader={messages.length > 0} />
|
|
310
285
|
|
|
311
286
|
{/* Connection Error Banner */}
|
|
312
287
|
{connectionStatus === "error" && error && (
|
|
@@ -336,22 +311,30 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
336
311
|
{/* Messages: Scrollable message area */}
|
|
337
312
|
<ChatLayout.Messages>
|
|
338
313
|
{messages.length === 0 ? (
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
314
|
+
<OpenFilesButton>
|
|
315
|
+
{({ openFiles }) => (
|
|
316
|
+
<div className="flex flex-1 items-center px-4">
|
|
317
|
+
<ChatEmptyState
|
|
318
|
+
title={agentName}
|
|
319
|
+
description="This agent can help you with your tasks. Start a conversation by typing a message below."
|
|
320
|
+
suggestedPrompts={[
|
|
321
|
+
"Search the web for the latest news on top tech company earnings, produce a summary for each company, and then a macro trend analysis of the tech industry. Use your todo list",
|
|
322
|
+
"Explain how this works",
|
|
323
|
+
"Create a new feature",
|
|
324
|
+
"Review my changes",
|
|
325
|
+
]}
|
|
326
|
+
onPromptClick={(prompt) => {
|
|
327
|
+
sendMessage(prompt);
|
|
328
|
+
setPlaceholder("Type a message or / for commands...");
|
|
329
|
+
logger.info("Prompt clicked", { prompt });
|
|
330
|
+
}}
|
|
331
|
+
onPromptHover={handlePromptHover}
|
|
332
|
+
onPromptLeave={handlePromptLeave}
|
|
333
|
+
onOpenFiles={openFiles}
|
|
334
|
+
/>
|
|
335
|
+
</div>
|
|
336
|
+
)}
|
|
337
|
+
</OpenFilesButton>
|
|
355
338
|
) : (
|
|
356
339
|
<div className="flex flex-col px-4">
|
|
357
340
|
{messages.map((message, index) => {
|
|
@@ -395,10 +378,7 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
395
378
|
<ChatLayout.Footer>
|
|
396
379
|
<ChatInputRoot client={client}>
|
|
397
380
|
<ChatInputCommandMenu commands={commandMenuItems} />
|
|
398
|
-
<ChatInputField
|
|
399
|
-
placeholder="Type a message or / for commands..."
|
|
400
|
-
autoFocus
|
|
401
|
-
/>
|
|
381
|
+
<ChatInputField placeholder={placeholder} autoFocus />
|
|
402
382
|
<ChatInputToolbar>
|
|
403
383
|
<div className="flex items-center gap-1">
|
|
404
384
|
<ChatInputActions />
|
|
@@ -438,13 +418,13 @@ export function ChatView({ client, initialSessionId }: ChatViewProps) {
|
|
|
438
418
|
|
|
439
419
|
{/* Desktop sidebar content */}
|
|
440
420
|
<TabsContent value="todo" className="flex-1 p-4 mt-0">
|
|
441
|
-
<TodoTabContent
|
|
421
|
+
<TodoTabContent />
|
|
442
422
|
</TabsContent>
|
|
443
423
|
<TabsContent value="files" className="flex-1 p-4 mt-0">
|
|
444
424
|
<FilesTabContent />
|
|
445
425
|
</TabsContent>
|
|
446
426
|
<TabsContent value="sources" className="flex-1 p-4 mt-0">
|
|
447
|
-
<SourcesTabContent
|
|
427
|
+
<SourcesTabContent />
|
|
448
428
|
</TabsContent>
|
|
449
429
|
</Tabs>
|
|
450
430
|
</ChatLayout.Aside>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n}from"./react-BxIc-aOD.js";const _=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,a,c)=>c?c.toUpperCase():a.toLowerCase()),i=t=>{const o=m(t);return o.charAt(0).toUpperCase()+o.slice(1)},h=(...t)=>t.filter((o,a,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===a).join(" ").trim(),w=t=>{for(const o in t)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var g={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const v=n.forwardRef(({color:t="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:r="",children:s,iconNode:l,...d},p)=>n.createElement("svg",{ref:p,...g,width:o,height:o,stroke:t,strokeWidth:c?Number(a)*24/Number(o):a,className:h("lucide",r),...!s&&!w(d)&&{"aria-hidden":"true"},...d},[...l.map(([y,k])=>n.createElement(y,k)),...Array.isArray(s)?s:[s]]));const e=(t,o)=>{const a=n.forwardRef(({className:c,...r},s)=>n.createElement(v,{ref:s,iconNode:o,className:h(`lucide-${_(i(t))}`,`lucide-${t}`,c),...r}));return a.displayName=i(t),a};const x=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],T=e("arrow-down",x);const f=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],X=e("arrow-up",f);const u=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],G=e("check",u);const $=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],J=e("chevron-down",$);const M=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Q=e("chevron-right",M);const N=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Y=e("chevron-up",N);const C=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],e1=e("chevrons-up-down",C);const b=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],o1=e("circle-check",b);const A=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],t1=e("circle",A);const j=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],a1=e("code",j);const z=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],c1=e("database",z);const q=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],s1=e("ellipsis-vertical",q);const L=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],n1=e("file-code",L);const V=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],r1=e("file-text",V);const H=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],d1=e("folder-open",H);const E=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],i1=e("folder",E);const S=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],h1=e("link-2",S);const D=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],l1=e("loader-circle",D);const F=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],p1=e("mic",F);const P=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],y1=e("panel-right",P);const U=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],k1=e("paperclip",U);const R=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_1=e("settings",R);const W=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],m1=e("sparkles",W);const B=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],w1=e("square-check-big",B);const Z=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],g1=e("square-slash",Z);const I=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],v1=e("wrench",I);const O=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],x1=e("x",O);export{T as A,Q as C,c1 as D,s1 as E,d1 as F,h1 as L,p1 as M,k1 as P,g1 as S,v1 as W,x1 as X,G as a,t1 as b,i1 as c,n1 as d,J as e,w1 as f,r1 as g,m1 as h,_1 as i,a1 as j,X as k,y1 as l,Y as m,l1 as n,e1 as o,o1 as p};
|