@cotal-ai/web 0.163.4 → 0.163.5
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/web/assets/{AgentPage-BO-a5SVf.js → AgentPage-OQYeLRkK.js} +1 -1
- package/dist/web/assets/{controller-BaMk71YT.js → controller-BJZKC9Sf.js} +1 -1
- package/dist/web/assets/{index-BebiP5PA.js → index-C1HUdk9w.js} +3 -3
- package/dist/web/assets/{index-BBa-4iuW.css → index-CNIubIs4.css} +1 -1
- package/dist/web/index.html +3 -3
- package/dist/web.js +1 -1
- package/dist/web.js.map +1 -1
- package/package.json +3 -3
|
@@ -39,7 +39,7 @@ import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.f
|
|
|
39
39
|
`},pa=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ma=function(){o.useEffect(function(){return document.body.setAttribute(da,(pa()+1).toString()),function(){var e=pa()-1;e<=0?document.body.removeAttribute(da):document.body.setAttribute(da,e.toString())}},[])},ha=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ma();var a=o.useMemo(function(){return la(i)},[i]);return o.createElement(ua,{styles:fa(a,!t,i,n?``:`!important`)})},ga=!1;if(typeof window<`u`)try{var _a=Object.defineProperty({},"passive",{get:function(){return ga=!0,!0}});window.addEventListener(`test`,_a,_a),window.removeEventListener(`test`,_a,_a)}catch{ga=!1}var va=ga?{passive:!1}:!1,ya=function(e){return e.tagName===`TEXTAREA`},ba=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ya(e)&&n[t]===`visible`)},xa=function(e){return ba(e,`overflowY`)},Sa=function(e){return ba(e,`overflowX`)},Ca=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ea(e,r)){var i=Da(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wa=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ta=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ea=function(e,t){return e===`v`?xa(t):Sa(t)},Da=function(e,t){return e===`v`?wa(t):Ta(t)},Oa=function(e,t){return e===`h`&&t===`rtl`?-1:1},ka=function(e,t,n,r,i){var a=Oa(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Da(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ea(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Aa=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ja=function(e){return[e.deltaX,e.deltaY]},Ma=function(e){return e&&`current`in e?e.current:e},Na=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pa=function(e){return`
|
|
40
40
|
.block-interactivity-${e} {pointer-events: none;}
|
|
41
41
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
42
|
-
`},Fa=0,Ia=[];function La(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Fa++)[0],a=o.useState(aa)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Fi([e.lockRef.current],(e.shards||[]).map(Ma),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Aa(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ca(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ca(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ka(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(Ia.length&&Ia[Ia.length-1]===a){var r=`deltaY`in n?ja(n):Aa(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Na(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var o=(s.current.shards||[]).map(Ma).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ra(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=Aa(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,ja(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,Aa(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return Ia.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,va),document.addEventListener(`touchmove`,l,va),document.addEventListener(`touchstart`,d,va),function(){Ia=Ia.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,va),document.removeEventListener(`touchmove`,l,va),document.removeEventListener(`touchstart`,d,va)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Pa(i)}):null,m?o.createElement(ha,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ra(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var za=Yi(Xi,La),Ba=o.forwardRef(function(e,t){return o.createElement(Qi,Ni({},e,{ref:t,sideCar:za}))});Ba.classNames=Qi.classNames;var Va=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ha=new WeakMap,Ua=new WeakMap,Wa={},Ga=0,Ka=function(e){return e&&(e.host||Ka(e.parentNode))},qa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ka(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ja=function(e,t,n,r){var i=qa(t,Array.isArray(e)?e:[e]);Wa[n]||(Wa[n]=new WeakMap);var a=Wa[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ha.get(e)||0)+1,l=(a.get(e)||0)+1;Ha.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ua.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ga++,function(){o.forEach(function(e){var t=Ha.get(e)-1,i=a.get(e)-1;Ha.set(e,t),a.set(e,i),t||(Ua.has(e)||e.removeAttribute(r),Ua.delete(e)),i||e.removeAttribute(n)}),Ga--,Ga||(Ha=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Wa={})}},Ya=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Va(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ja(r,i,n,`aria-hidden`)):function(){return null}},Xa=Object.defineProperty,Za=(e,t)=>Xa(e,`name`,{value:t,configurable:!0}),Qa=`Dialog`,[$a,eo]=Cn(Qa),[to,no]=$a(Qa),ro=Za(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),l=o.useRef(null),{nodes:u,registry:d}=di(),[f,p]=tr({prop:r,defaultProp:i??!1,onChange:a,caller:Qa}),[m,h]=o.useState(0),[g,_]=o.useState(0);return(0,q.jsx)(to,{scope:t,triggerRef:c,contentRef:l,contentId:yr(),titleId:yr(),descriptionId:yr(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),modal:s,branchNodes:u,branchRegistry:d,children:n})},`Dialog`),io=`DialogTrigger`,ao=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(io,n),a=Gt(t,i.triggerRef);return(0,q.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":To(i.open),...r,ref:a,onClick:Y(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),oo=`DialogPortal`,[so,co]=$a(oo,{forceMount:void 0}),lo=Za(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=no(oo,t);return(0,q.jsx)(so,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,q.jsx)(lr,{present:n||a.open,children:(0,q.jsx)(Ti,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),uo=`DialogOverlay`,fo=o.forwardRef(Za(function(e,t){let n=co(uo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=no(uo,e.__scopeDialog);return a.modal?(0,q.jsx)(lr,{present:r||a.open,children:(0,q.jsx)(mo,{...i,ref:t})}):null},`DialogOverlay`)),po=Jt(`DialogOverlay.RemoveScroll`),mo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(uo,n),a=Gt(t,Zr());return(0,q.jsx)(Ba,{as:po,allowPinchZoom:!0,shards:o.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,q.jsx)(J.div,{"data-state":To(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),ho=`DialogContent`,go=o.forwardRef(Za(function(e,t){let n=co(ho,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=no(ho,e.__scopeDialog);return(0,q.jsx)(lr,{present:r||a.open,children:a.modal?(0,q.jsx)(_o,{...i,ref:t}):(0,q.jsx)(vo,{...i,ref:t})})},`DialogContent`)),_o=o.forwardRef(Za(function(e,t){let n=no(ho,e.__scopeDialog),r=o.useRef(null),i=Gt(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return Ya(e)},[]),(0,q.jsx)(yo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),vo=o.forwardRef(Za(function(e,t){let n=no(ho,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,q.jsx)(yo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),yo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=no(ho,n);return ji(),(0,q.jsx)(ui,{registry:l.branchRegistry,children:(0,q.jsx)(ci,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,q.jsx)(Xr,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?wo(o,l.descriptionId):o,"data-state":To(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),bo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(`DialogTitle`,n),{setTitleCount:a}=i;return Tn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,q.jsx)(J.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),xo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(`DialogDescription`,n),{setDescriptionCount:a}=i;return Tn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,q.jsx)(J.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),So=`DialogClose`,Co=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(So,n);return(0,q.jsx)(J.button,{type:`button`,...r,ref:t,onClick:Y(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function wo(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Za(wo,`concatAriaDescribedby`);function To(e){return e?`open`:`closed`}Za(To,`getState`);var Eo=Object.defineProperty,Do=(e,t)=>Eo(e,`name`,{value:t,configurable:!0}),Oo=`Avatar`,[ko,Ao]=Cn(Oo),jo={Idle:`idle`,Loading:`loading`,Loaded:`loaded`,Error:`error`},Mo=[0,()=>void 0],[No,Po]=ko(Oo),Fo=o.forwardRef(Do(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=o.useState(jo.Idle),[s,c]=Bo();return(0,q.jsx)(No,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:s,setImageCount:c,children:(0,q.jsx)(J.span,{...r,ref:t})})},`Avatar`)),Io=`AvatarFallback`,Lo=o.forwardRef(Do(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=Po(Io,n),[s,c]=o.useState(r===void 0);return o.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(e)}},[r]),s&&a.imageLoadingStatus!==jo.Loaded?(0,q.jsx)(J.span,{...i,ref:t}):null},`AvatarFallback`));function Ro(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return Tn(()=>{if(!e){n(jo.Error);return}let t=new window.Image,a=Do(e=>{let t=e.currentTarget;n(zo(t))},`handleLoad`),o=Do(()=>n(jo.Error),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(zo(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(jo.Idle)}},[e,i,r,n]),t}Do(Ro,`useImageLoadingStatus`);function zo(e){return e.complete?e.naturalWidth>0?jo.Loaded:jo.Error:jo.Loading}Do(zo,`getImageLoadingStatus`);function Bo(){return Mo}Do(Bo,`useImageCount`);function Vo(e){}Do(Vo,`useUpdateImageCount`);var Ho=Object.defineProperty,Uo=(e,t)=>Ho(e,`name`,{value:t,configurable:!0});function Wo(e){let[t,n]=o.useState(void 0);return Tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}Uo(Wo,`useSize`);var Go=[`top`,`right`,`bottom`,`left`],Ko=Math.min,qo=Math.max,Jo=Math.round,Yo=Math.floor,Xo=e=>({x:e,y:e}),Zo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qo(e,t,n){return qo(e,Ko(t,n))}function $o(e,t){return typeof e==`function`?e(t):e}function es(e){return e.split(`-`)[0]}function ts(e){return e.split(`-`)[1]}function ns(e){return e===`x`?`y`:`x`}function rs(e){return e===`y`?`height`:`width`}function is(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function as(e){return ns(is(e))}function os(e,t,n){n===void 0&&(n=!1);let r=ts(e),i=as(e),a=rs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hs(o)),[o,hs(o)]}function ss(e){let t=hs(e);return[cs(e),t,cs(t)]}function cs(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ls=[`left`,`right`],us=[`right`,`left`],ds=[`top`,`bottom`],fs=[`bottom`,`top`];function ps(e,t,n){switch(e){case`top`:case`bottom`:return n?t?us:ls:t?ls:us;case`left`:case`right`:return t?ds:fs;default:return[]}}function ms(e,t,n,r){let i=ts(e),a=ps(es(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(cs)))),a}function hs(e){let t=es(e);return Zo[t]+e.slice(t.length)}function gs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function _s(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gs(e)}function vs(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ys(e,t,n){let{reference:r,floating:i}=e,a=is(t),o=as(t),s=rs(o),c=es(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ts(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function bs(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$o(t,e),p=_s(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vs(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xs=50,Ss=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:bs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ys(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xs&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ys(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Cs=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=$o(e,t)||{};if(l==null)return{};let d=_s(u),f={x:n,y:r},p=as(i),m=rs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ko(d[_],T),D=Ko(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Qo(E,k,O),j=!c.arrow&&ts(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),ws=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=$o(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=es(r),_=is(o),v=es(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hs(o)]:ss(o)),x=p!==`none`;!d&&x&&b.push(...ms(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=os(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===is(t)||T.every(e=>is(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=is(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Es(e){return Go.some(t=>e[t]>=0)}var Ds=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$o(e,t);switch(i){case`referenceHidden`:{let e=Ts(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Es(e)}}}case`escaped`:{let e=Ts(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Es(e)}}}default:return{}}}}},Os=new Set([`left`,`top`]);async function ks(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=es(n),s=ts(n),c=is(n)===`y`,l=Os.has(o)?-1:1,u=a&&c?-1:1,d=$o(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var As=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ks(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},js=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$o(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=is(i),p=ns(f),m=u[p],h=u[f],g=(e,t)=>Qo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ms=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$o(e,t),u={x:n,y:r},d=is(i),f=ns(d),p=u[f],m=u[d],h=$o(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Os.has(es(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ns=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$o(e,t),c=await i.detectOverflow(t,s),l=es(n),u=ts(n),d=is(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ko(p-c[m],g),y=Ko(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qo(c.left,c.right):S=p-2*qo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ps(){return typeof window<`u`}function Fs(e){return Rs(e)?(e.nodeName||``).toLowerCase():`#document`}function Is(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ls(e){return((Rs(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rs(e){return Ps()?e instanceof Node||e instanceof Is(e).Node:!1}function zs(e){return Ps()?e instanceof Element||e instanceof Is(e).Element:!1}function Bs(e){return Ps()?e instanceof HTMLElement||e instanceof Is(e).HTMLElement:!1}function Vs(e){return!Ps()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot}function Hs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$s(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Us(e){return/^(table|td|th)$/.test(Fs(e))}function Ws(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Gs=/transform|translate|scale|rotate|perspective|filter/,Ks=/paint|layout|strict|content/,qs=e=>!!e&&e!==`none`,Js;function Ys(e){let t=zs(e)?$s(e):e;return qs(t.transform)||qs(t.translate)||qs(t.scale)||qs(t.rotate)||qs(t.perspective)||!Zs()&&(qs(t.backdropFilter)||qs(t.filter))||Gs.test(t.willChange||``)||Ks.test(t.contain||``)}function Xs(e){let t=tc(e);for(;Bs(t)&&!Qs(t);){if(Ys(t))return t;if(Ws(t))return null;t=tc(t)}return null}function Zs(){return Js??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Js}function Qs(e){return/^(html|body|#document)$/.test(Fs(e))}function $s(e){return Is(e).getComputedStyle(e)}function ec(e){return zs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tc(e){if(Fs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ls(e);return Vs(t)?t.host:t}function nc(e){let t=tc(e);return Qs(t)?(e.ownerDocument||e).body:Bs(t)&&Hs(t)?t:nc(t)}function rc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nc(e),i=r===e.ownerDocument?.body,a=Is(r);if(i){let e=ic(a);return t.concat(a,a.visualViewport||[],Hs(r)?r:[],e&&n?rc(e):[])}return t.concat(r,rc(r,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ac(e){let t=$s(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jo(n)!==a||Jo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oc(e){return zs(e)?e:e.contextElement}function sc(e){let t=oc(e);if(!Bs(t))return Xo(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ac(t),o=(a?Jo(n.width):n.width)/r,s=(a?Jo(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var cc=Xo(0);function lc(e){let t=Is(e);return!Zs()||!t.visualViewport?cc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Is(e)}function dc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oc(e),o=Xo(1);t&&(r?zs(r)&&(o=sc(r)):o=sc(e));let s=uc(a,n,r)?lc(a):Xo(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Is(a),t=zs(r)?Is(r):r,n=e,i=ic(n);for(;i&&t!==n;){let e=sc(i),t=i.getBoundingClientRect(),r=$s(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Is(i),i=ic(n)}}return vs({width:u,height:d,x:c,y:l})}function fc(e,t){let n=ec(e).scrollLeft;return t?t.left+n:dc(Ls(e)).left+n}function pc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fc(e,n),y:n.top+t.scrollTop}}function mc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ls(r),s=t?Ws(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xo(1),u=Xo(0),d=Bs(r);if((d||!a)&&((Fs(r)!==`body`||Hs(o))&&(c=ec(r)),d)){let e=dc(r);l=sc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?pc(o,c):Xo(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function hc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function gc(e){let t=ec(e),n=e.ownerDocument.body,r=qo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+fc(e),o=-t.scrollTop;return $s(n).direction===`rtl`&&(a+=qo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var _c=25;function vc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Is(e),a=Ls(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Zs()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(fc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=_c&&(s-=o)}return{width:s,height:c,x:l,y:u}}function yc(e,t){let n=dc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=sc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function bc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=vc(e,n,t);else if(t===`document`)r=gc(Ls(e));else if(zs(t))r=yc(t,n);else{let n=lc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vs(r)}function xc(e,t){let n=t.get(e);if(n)return n;let r=rc(e,[],!1).filter(e=>zs(e)&&Fs(e)!==`body`),i=null,a=$s(e).position===`fixed`,o=a?tc(e):e;for(;zs(o)&&!Qs(o);){let e=$s(o),t=Ys(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=tc(o)}return t.set(e,r),r}function Sc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ws(t)?[]:xc(t,this._c):[].concat(n),r],o=bc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=bc(t,a[e],i);s=qo(n.top,s),c=Ko(n.right,c),l=Ko(n.bottom,l),u=qo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Cc(e){let{width:t,height:n}=ac(e);return{width:t,height:n}}function wc(e,t,n){let r=Bs(t),i=Ls(t),a=n===`fixed`,o=dc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xo(0);if((r||!a)&&((Fs(t)!==`body`||Hs(i))&&(s=ec(t)),r)){let e=dc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=fc(i));let l=i&&!r&&!a?pc(i,s):Xo(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Tc(e){return $s(e).position===`static`}function Ec(e,t){if(!Bs(e)||$s(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ls(e)===n&&(n=n.ownerDocument.body),n}function Dc(e,t){let n=Is(e);if(Ws(e))return n;if(!Bs(e)){let t=tc(e);for(;t&&!Qs(t);){if(zs(t)&&!Tc(t))return t;t=tc(t)}return n}let r=Ec(e,t);for(;r&&Us(r)&&Tc(r);)r=Ec(r,t);return r&&Qs(r)&&Tc(r)&&!Ys(r)?n:r||Xs(e)||n}var Oc=async function(e){let t=this.getOffsetParent||Dc,n=this.getDimensions,r=await n(e.floating);return{reference:wc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kc(e){return $s(e).direction===`rtl`}var Ac={convertOffsetParentRelativeRectToViewportRelativeRect:mc,getDocumentElement:Ls,getClippingRect:Sc,getOffsetParent:Dc,getElementRects:Oc,getClientRects:hc,getDimensions:Cc,getScale:sc,isElement:zs,isRTL:kc};function jc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mc(e,t,n){let r=null,i,a=Ls(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Yo(d),h=Yo(a.clientWidth-(u+f)),g=Yo(a.clientHeight-(d+p)),_=Yo(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qo(0,Ko(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!jc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Is(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Nc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=oc(e),u=i||a?[...l?rc(l):[],...t?rc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Mc(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?dc(e):null;c&&g();function g(){let t=dc(e);h&&!jc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Pc=As,Fc=js,Ic=ws,Lc=Ns,Rc=Ds,zc=Cs,Bc=Ms,Vc=(e,t,n)=>{let r=new Map,i=n??{},a={...Ac,...i.platform,_c:r};return Ss(e,t,{...i,platform:a})},Hc=typeof document<`u`?o.useLayoutEffect:function(){};function Uc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Uc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Wc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gc(e,t){let n=Wc(e);return Math.round(t*n)/n}function Kc(e){let t=o.useRef(e);return Hc(()=>{t.current=e}),t}function qc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=o.useState(r);Uc(m,r)||h(r);let[g,_]=o.useState(null),[v,y]=o.useState(null),b=o.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=o.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=c||v,w=o.useRef(null),T=o.useRef(null),E=o.useRef(f),D=u!=null,O=Kc(u),k=Kc(i),A=Kc(d),j=o.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),Vc(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Uc(E.current,t)&&(E.current=t,s.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);Hc(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=o.useRef(!1);Hc(()=>(M.current=!0,()=>{M.current=!1}),[]),Hc(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=o.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=o.useMemo(()=>({reference:S,floating:C}),[S,C]),F=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Gc(P.floating,f.x),r=Gc(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Wc(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,l,P.floating,f.x,f.y]);return o.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var Jc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:zc({element:r.current,padding:i}).fn(n):r?zc({element:r,padding:i}).fn(n):{}}}},Yc=(e,t)=>{let n=Pc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xc=(e,t)=>{let n=Fc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zc=(e,t)=>({fn:Bc(e).fn,options:[e,t]}),Qc=(e,t)=>{let n=Ic(e);return{name:n.name,fn:n.fn,options:[e,t]}},$c=(e,t)=>{let n=Lc(e);return{name:n.name,fn:n.fn,options:[e,t]}},el=(e,t)=>{let n=Rc(e);return{name:n.name,fn:n.fn,options:[e,t]}},tl=(e,t)=>{let n=Jc(e);return{name:n.name,fn:n.fn,options:[e,t]}},nl=Object.defineProperty,rl=o.forwardRef(((e,t)=>nl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,q.jsx)(J.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,q.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),il=Object.defineProperty,al=(e,t)=>il(e,`name`,{value:t,configurable:!0}),ol={Partial:`partial`,Always:`always`},sl={Optimized:`optimized`,Always:`always`},cl=`Popper`,[ll,ul]=Cn(cl),[dl,fl]=ll(cl),pl=al(e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null),[a,s]=o.useState(void 0);return(0,q.jsx)(dl,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:s,children:n})},`Popper`),ml=`PopperAnchor`,hl=o.forwardRef(al(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=fl(ml,n),s=o.useRef(null),c=a.onAnchorChange,l=Gt(t,o.useCallback(e=>{s.current=e,e&&c(e)},[c])),u=o.useRef(null);o.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let d=a.placementState&&Tl(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,q.jsx)(J.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),gl=`PopperContent`,[_l,vl]=ll(gl),yl=o.forwardRef(al(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=ol.Partial,hideWhenDetached:p=!1,updatePositionStrategy:m=sl.Optimized,onPlaced:h,...g}=e,_=fl(gl,n),[v,y]=o.useState(null),b=Gt(t,y),[x,S]=o.useState(null),C=Wo(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,A={padding:D,boundary:O.filter(Cl),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=qc({strategy:`fixed`,placement:E,whileElementsMounted:al((...e)=>Nc(...e,{animationFrame:m===sl.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Yc({mainAxis:i+T,alignmentAxis:s}),l&&Xc({mainAxis:!0,crossAxis:!1,...f===ol.Partial?{limiter:Zc()}:{},...A}),l&&Qc({...A}),$c({...A,apply:al(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&tl({element:x,padding:c}),wl({arrowWidth:w,arrowHeight:T}),p&&el(k?{strategy:`referenceHidden`,...A}:{strategy:`referenceHidden`,padding:A.padding,altBoundary:A.altBoundary})]}),I=_.setPlacementState;Tn(()=>(I(N),()=>{I(void 0)}),[N,I]);let[ee,L]=Tl(N),te=Hr(h);Tn(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,re=F.arrow?.y,ie=F.arrow?.centerOffset!==0,[R,z]=o.useState();return Tn(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]),(0,q.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,q.jsx)(_l,{scope:n,placedSide:ee,placedAlign:L,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,q.jsx)(J.div,{"data-side":ee,"data-align":L,...g,ref:b,style:{...g.style,animation:P?g.style?.animation:`none`}})})})},`PopperContent`)),bl=`PopperArrow`,xl={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Sl=o.forwardRef(al(function(e,t){let{__scopePopper:n,...r}=e,i=vl(bl,n),a=xl[i.placedSide];return(0,q.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,q.jsx)(rl,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Cl(e){return e!==null}al(Cl,`isNotNull`);var wl=al(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Tl(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Tl(e){let[t,n=`center`]=e.split(`-`);return[t,n]}al(Tl,`getSideAndAlignFromPlacement`);var El=Object.defineProperty,Dl=(e,t)=>El(e,`name`,{value:t,configurable:!0}),Ol=!1;function kl(){let[e,t]=o.useState(Ol);return o.useEffect(()=>{Ol||(Ol=!0,t(!0))},[]),e}Dl(kl,`useIsHydrated`);var Al=o.useSyncExternalStore;function jl(){return()=>{}}Dl(jl,`subscribe`);function Ml(){return Al(jl,()=>!0,()=>!1)}Dl(Ml,`useIsHydratedModern`);var Nl=typeof Al==`function`?Ml:kl,Pl=Object.defineProperty,Fl=(e,t)=>Pl(e,`name`,{value:t,configurable:!0}),Il=`rovingFocusGroup.onEntryFocus`,Ll={bubbles:!1,cancelable:!0},Rl=`RovingFocusGroup`,[zl,Bl,Vl]=On(Rl),[Hl,Ul]=Cn(Rl,[Vl]),Wl={Vertical:`vertical`,Horizontal:`horizontal`},Gl={LTR:`ltr`,RTL:`rtl`},[Kl,ql]=Hl(Rl),Jl=o.forwardRef(Fl(function(e,t){return(0,q.jsx)(zl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,q.jsx)(zl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,q.jsx)(Yl,{...e,ref:t})})})},`RovingFocusGroup`)),Yl=o.forwardRef(Fl(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=o.useRef(null),m=Gt(t,p),h=Rr(a),[g,_]=tr({prop:s,defaultProp:c??null,onChange:l,caller:Rl}),[v,y]=o.useState(!1),b=Hr(u),x=Bl(n),S=o.useRef(!1),[C,w]=o.useState(0);return o.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(Il,b),()=>e.removeEventListener(Il,b)},[b]),(0,q.jsx)(Kl,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:o.useCallback(e=>_(e),[_]),onItemShiftTab:o.useCallback(()=>y(!0),[]),onFocusableItemAdd:o.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>w(e=>e-1),[]),children:(0,q.jsx)(J.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:Y(e.onMouseDown,()=>{S.current=!0}),onFocus:Y(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(Il,Ll);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);tu([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}S.current=!1}),onBlur:Y(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),Xl=`RovingFocusGroupItem`,Zl=o.forwardRef(Fl(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:s,...c}=e,l=yr(),u=a||l,d=ql(Xl,n),f=d.currentTabStopId===u,p=Bl(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=Nl();return Tn(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),o.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,q.jsx)(zl.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,q.jsx)(J.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:Y(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eu(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?nu(n,r+1):n.slice(r+1)}setTimeout(()=>tu(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})},`RovingFocusGroupItem`)),Ql={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $l(e,t){return t===Gl.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Fl($l,`getDirectionAwareKey`);function eu(e,t,n){let r=$l(e.key,n);if(!(t===Wl.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Wl.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ql[r]}Fl(eu,`getFocusIntent`);function tu(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Fl(tu,`focusFirst`);function nu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Fl(nu,`wrapArray`);var ru=Object.defineProperty,iu=o.forwardRef(((e,t)=>ru(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,q.jsx)(J.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),au=Object.defineProperty,ou=(e,t)=>au(e,`name`,{value:t,configurable:!0}),su={Horizontal:`horizontal`,Vertical:`vertical`},cu=su.Horizontal,lu=Object.values(su),uu=o.forwardRef(ou(function(e,t){let{decorative:n,orientation:r=cu,...i}=e,a=du(r)?r:cu,o=a===su.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,q.jsx)(J.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function du(e){return lu.includes(e)}ou(du,`isValidOrientation`);var fu=Object.defineProperty,pu=(e,t)=>fu(e,`name`,{value:t,configurable:!0}),mu={Automatic:`automatic`,Manual:`manual`},hu=`Tabs`,[gu,_u]=Cn(hu,[Ul]),vu=Ul(),[yu,bu]=gu(hu),xu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=mu.Automatic,...l}=e,u=Rr(s),[d,f]=tr({prop:r,onChange:i,defaultProp:a??``,caller:hu});return(0,q.jsx)(yu,{scope:n,baseId:yr(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,q.jsx)(J.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Su=`TabsList`,Cu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=bu(Su,n),o=vu(n);return(0,q.jsx)(Jl,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,q.jsx)(J.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),wu=`TabsTrigger`,Tu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=bu(wu,n),s=vu(n),c=Ou(o.baseId,r),l=ku(o.baseId,r),u=r===o.value;return(0,q.jsx)(Zl,{asChild:!0,...s,focusable:!i,active:u,children:(0,q.jsx)(J.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Y(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:Y(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{let e=o.activationMode!==mu.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),Eu=`TabsContent`,Du=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=bu(Eu,n),l=Ou(c.baseId,r),u=ku(c.baseId,r),d=r===c.value,f=o.useRef(d);return o.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,q.jsx)(lr,{present:i||d,children:({present:n})=>(0,q.jsx)(J.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Ou(e,t){return`${e}-trigger-${t}`}pu(Ou,`makeTriggerId`);function ku(e,t){return`${e}-content-${t}`}pu(ku,`makeContentId`);var Au=Object.defineProperty,ju=(e,t)=>Au(e,`name`,{value:t,configurable:!0}),Mu=`Toggle`,Nu=o.forwardRef(ju(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=tr({prop:n,onChange:i,defaultProp:r??!1,caller:Mu});return(0,q.jsx)(J.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:Y(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),Pu=Object.defineProperty,Fu=(e,t)=>Pu(e,`name`,{value:t,configurable:!0}),[Iu,Lu]=Cn(`Tooltip`,[ul]),Ru=ul(),zu=`TooltipProvider`,Bu=700,Vu=`tooltip.open`,[Hu,Uu]=Iu(zu),Wu=Fu(e=>{let{__scopeTooltip:t,delayDuration:n=Bu,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=o.useRef(!0),c=o.useRef(!1),l=o.useRef(0);return o.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,q.jsx)(Hu,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:o.useCallback(()=>{r<=0||(window.clearTimeout(l.current),s.current=!1)},[r]),onClose:o.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:c,onPointerInTransitChange:o.useCallback(e=>{c.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Gu=`Tooltip`,[Ku,qu]=Iu(Gu),Ju=Fu(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=Uu(Gu,e.__scopeTooltip),u=Ru(t),[d,f]=o.useState(null),[p,m]=o.useState(void 0),h=yr(),g=o.useRef(0),_=s??l.disableHoverableContent,v=c??l.delayDuration,y=o.useRef(!1),[b,x]=tr({prop:r,defaultProp:i??!1,onChange:Fu(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vu))):l.onClose(),a?.(e)},`onChange`),caller:Gu}),S=o.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=o.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=o.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=o.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);o.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=p??h;return(0,q.jsx)(pl,{...u,children:(0,q.jsx)(Ku,{scope:t,contentId:E,setContentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:o.useCallback(()=>{l.isOpenDelayedRef.current?T():C()},[l.isOpenDelayedRef,T,C]),onTriggerLeave:o.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),Yu=`TooltipTrigger`,Xu=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=qu(Yu,n),s=Uu(Yu,n),c=Ru(n),l=Gt(t,o.useRef(null),a.onTriggerChange),u=o.useRef(!1),d=o.useRef(!1),f=o.useCallback(()=>u.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,q.jsx)(hl,{asChild:!0,...c,children:(0,q.jsx)(J.button,{"aria-describedby":a.open?pd(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:l,onPointerMove:Y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:Y(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:Y(e.onBlur,a.onClose),onClick:Y(e.onClick,a.onClose)})})},`TooltipTrigger`)),Zu=`TooltipPortal`,[Qu,$u]=Iu(Zu,{forceMount:void 0}),ed=Fu(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=qu(Zu,t);return(0,q.jsx)(Qu,{scope:t,forceMount:n,children:(0,q.jsx)(lr,{present:n||a.open,children:(0,q.jsx)(Ti,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),td=`TooltipContent`,nd=o.forwardRef(Fu(function(e,t){let n=$u(td,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=qu(td,e.__scopeTooltip);return(0,q.jsx)(lr,{present:r||o.open,children:o.disableHoverableContent?(0,q.jsx)(ad,{side:i,...a,ref:t}):(0,q.jsx)(rd,{side:i,...a,ref:t})})},`TooltipContent`)),rd=o.forwardRef(Fu(function(e,t){let n=qu(td,e.__scopeTooltip),r=Uu(td,e.__scopeTooltip),i=o.useRef(null),a=Gt(t,i),[s,c]=o.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=o.useCallback(()=>{c(null),f(!1)},[f]),m=o.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=cd(r,sd(r,n.getBoundingClientRect())),a=ld(t.getBoundingClientRect()),o=dd([...i,...a]);c(o),f(!0)},[f]);return o.useEffect(()=>()=>p(),[p]),o.useEffect(()=>{if(l&&d){let e=Fu(e=>m(e,d),`handleTriggerLeave`),t=Fu(e=>m(e,l),`handleContentLeave`);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),o.useEffect(()=>{if(s){let e=Fu(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!ud(n,s);r?p():i&&(p(),u())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,q.jsx)(ad,{...e,ref:a})},`TooltipContentHoverable`)),id=Zt(`TooltipContent`),ad=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=qu(td,n),d=Ru(n),{onClose:f}=u,[p,m]=o.useState(null),h=Gt(t,m);fi(p),o.useEffect(()=>(document.addEventListener(Vu,f),()=>document.removeEventListener(Vu,f)),[f]),o.useEffect(()=>{if(u.trigger){let e=Fu(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:g}=u;return Tn(()=>(g(a),()=>{g(void 0)}),[a,g]),(0,q.jsx)(Xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,q.jsxs)(yl,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:h,style:{...l.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:[(0,q.jsx)(id,{children:r}),i?(0,q.jsx)(yn,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),od=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,...r}=e,i=Ru(n);return(0,q.jsx)(Sl,{...i,...r,ref:t})},`TooltipArrow`));function sd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Fu(sd,`getExitSideFromRect`);function cd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Fu(cd,`getPaddedExitPoints`);function ld(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Fu(ld,`getPointsFromRect`);function ud(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Fu(ud,`isPointInPolygon`);function dd(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),fd(t)}Fu(dd,`getHull`);function fd(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.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)}Fu(fd,`getHullPresorted`);function pd(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Fu(pd,`concatAriaDescribedby`);function md(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=md(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function hd(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=md(e))&&(r&&(r+=` `),r+=t);return r}var gd=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,_d=hd,vd=(e,t)=>n=>{if(t?.variants==null)return _d(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=gd(t)||gd(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return _d(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},yd=vd(`group/button inline-flex shrink-0 items-center justify-center rounded-2xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,lg:`h-9 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function bd({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Yt:`button`;return(0,q.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:K(yd({variant:t,size:n,className:e})),...i})}var xd={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},Sd=(0,o.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:a,showAlt:s=!1,icon:c,primaryColor:l,secondaryColor:u,disableSecondaryOpacity:d=!1,...f},p)=>{let m=n===void 0?void 0:r?Number(n)*24/Number(t):n,h=m===void 0?{}:{strokeWidth:m,stroke:`currentColor`},g={ref:p,...xd,width:t,height:t,color:l||e,className:i,...h,...f},_=[...s&&a?a:c].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!d?n.opacity:void 0,a=u?{...n.stroke===void 0?{fill:r?u:l||e}:{stroke:r?u:l||e}}:{};return(0,o.createElement)(t,{...n,...h,...a,opacity:i,key:n.key})});return(0,o.createElement)(`svg`,g,_)});Sd.displayName=`HugeiconsIcon`;var Cd=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 8V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],wd=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Td=[[`path`,{d:`M12 18.502V5.00195`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 13.002C18 13.002 13.5811 19.0019 12 19.002C10.4188 19.002 6 13.002 6 13.002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ed=[[`path`,{d:`M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Dd=[[`path`,{d:`M12 5.5V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Od=[[`path`,{d:`M9 6.65032C9 6.65032 15.9383 6.10759 16.9154 7.08463C17.8924 8.06167 17.3496 15 17.3496 15M16.5 7.5L6.5 17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],kd=[[`path`,{d:`M15.6 8.40033V12.9003C15.6 14.3915 16.8088 15.6003 18.3 15.6003C19.7912 15.6003 21 14.3915 21 12.9003V12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C14.0265 21 15.8965 20.3302 17.4009 19.2M15.6 12.0003C15.6 13.9886 13.9882 15.6003 12 15.6003C10.0118 15.6003 8.4 13.9886 8.4 12.0003C8.4 10.0121 10.0118 8.40033 12 8.40033C13.9882 8.40033 15.6 10.0121 15.6 12.0003Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]],Ad=[[`path`,{d:`M4.22222 21.9948V18.4451C4.22222 17.1737 3.88927 16.5128 3.23482 15.4078C2.4503 14.0833 2 12.5375 2 10.8866C2 5.97866 5.97969 2 10.8889 2C15.7981 2 19.7778 5.97866 19.7778 10.8866C19.7778 11.4663 19.7778 11.7562 19.802 11.9187C19.8598 12.3072 20.0411 12.6414 20.2194 12.9873L22 16.4407L20.6006 17.1402C20.195 17.3429 19.9923 17.4443 19.851 17.6314C19.7097 17.8184 19.67 18.0296 19.5904 18.4519L19.5826 18.4931C19.4004 19.4606 19.1993 20.5286 18.6329 21.2024C18.4329 21.4403 18.1853 21.6336 17.9059 21.7699C17.4447 21.9948 16.8777 21.9948 15.7437 21.9948C15.219 21.9948 14.6928 22.0069 14.1682 21.9942C12.9247 21.9639 12 20.9184 12 19.7044`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.388 10.5315C13.9617 10.5315 13.5729 10.3702 13.2784 10.1048M14.388 10.5315C14.388 11.6774 13.7241 12.7658 12.4461 12.7658C11.1681 12.7658 10.5043 13.8541 10.5043 15M14.388 10.5315C16.5373 10.5315 16.5373 7.18017 14.388 7.18017C14.1927 7.18017 14.0053 7.21403 13.8312 7.27624C13.9362 4.77819 10.3349 4.1 9.51923 6.44018M10.5043 8.29729C10.5043 7.52323 10.1133 6.8411 9.51923 6.44018M9.51923 6.44018C7.66742 5.19034 5.19883 7.4331 6.37324 9.43277C4.40226 9.72827 4.61299 12.7658 6.6205 12.7658C7.18344 12.7658 7.68111 12.4844 7.98234 12.0538`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],jd=[[`path`,{d:`M12 21.5C17.2467 21.5 21.5 17.2467 21.5 12C21.5 6.75329 17.2467 2.5 12 2.5C6.75329 2.5 2.5 6.75329 2.5 12C2.5 13.3377 2.66372 14.5604 3.1189 15.6954C3.81756 17.4374 3.68195 18.9241 2.5 20.5C3.86146 21.1644 5.86811 21.1419 7 20.0725C8.45323 20.9748 10.1636 21.5 12 21.5Z`,stroke:`currentColor`,strokeLinecap:`square`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.2 12.0002H12M7.69961 11.9999H7.49961M16.6996 11.9999H16.4996M12.4 12.0002C12.4 12.2212 12.2209 12.4002 12 12.4002C11.7791 12.4002 11.6 12.2212 11.6 12.0002C11.6 11.7793 11.7791 11.6002 12 11.6002C12.2209 11.6002 12.4 11.7793 12.4 12.0002ZM7.89961 11.9999C7.89961 12.2208 7.72052 12.3999 7.49961 12.3999C7.2787 12.3999 7.09961 12.2208 7.09961 11.9999C7.09961 11.7789 7.2787 11.5999 7.49961 11.5999C7.72052 11.5999 7.89961 11.7789 7.89961 11.9999ZM16.8996 11.9999C16.8996 12.2208 16.7205 12.3999 16.4996 12.3999C16.2787 12.3999 16.0996 12.2208 16.0996 11.9999C16.0996 11.7789 16.2787 11.5999 16.4996 11.5999C16.7205 11.5999 16.8996 11.7789 16.8996 11.9999Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Md=[[`path`,{d:`M18.9991 19L5 5.00098`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 5L5.00092 18.999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Nd=[[`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.9994 15L12 12.0003M12 12.0003L9 9M12 12.0003L9.00064 15M12 12.0003L15 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Pd=[[`path`,{d:`M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 16H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Fd=[[`path`,{d:`M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Id=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ld=[[`path`,{d:`M13 20.8268V22H14.1734C14.5827 22 14.7874 22 14.9715 21.9238C15.1555 21.8475 15.3003 21.7028 15.5897 21.4134L20.4133 16.5894C20.6864 16.3164 20.8229 16.1799 20.8959 16.0327C21.0347 15.7525 21.0347 15.4236 20.8959 15.1434C20.8229 14.9961 20.6864 14.8596 20.4133 14.5866C20.1403 14.3136 20.0038 14.1771 19.8565 14.1041C19.5763 13.9653 19.2473 13.9653 18.9671 14.1041C18.8198 14.1771 18.6833 14.3136 18.4103 14.5866L18.4103 14.5866L13.5867 19.4106C13.2972 19.7 13.1525 19.8447 13.0762 20.0287C13 20.2128 13 20.4174 13 20.8268Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 11C19 11 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.23467 21.8915 6.8857 21.99 10 21.9991M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Rd=[[`path`,{d:`M14 21L18 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 21L10 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5 8H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 16H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],zd=[[`path`,{d:`M4 3H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.5 3V5.03039C5.5 6.27227 6.07682 7.4437 7.06116 8.20089L12 12L16.9388 8.20089C17.9232 7.44371 18.5 6.27227 18.5 5.03039V3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.5 21V18.9696C5.5 17.7277 6.07682 16.5563 7.06116 15.7991L12 12L16.9388 15.7991C17.9232 16.5563 18.5 17.7277 18.5 18.9696V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4 21H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Bd=[[`path`,{d:`M7 2.5C5.59269 2.66536 4.62427 3.01488 3.89124 3.75363C2.5 5.15575 2.5 7.41242 2.5 11.9258C2.5 16.4391 2.5 18.6958 3.89124 20.0979C5.28249 21.5 7.52166 21.5 12 21.5C16.4783 21.5 18.7175 21.5 20.1088 20.0979C21.5 18.6958 21.5 16.4391 21.5 11.9258C21.5 7.41242 21.5 5.15575 20.1088 3.75363C19.3757 3.01488 18.4073 2.66536 17 2.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 8C9.99153 8.5057 11.2998 10.5 12 10.5M14.5 8C14.0085 8.5057 12.7002 10.5 12 10.5M12 10.5V2.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21.5 13.5H16.5743C15.7322 13.5 15.0706 14.2036 14.6995 14.9472C14.2963 15.7551 13.4889 16.5 12 16.5C10.5111 16.5 9.70373 15.7551 9.30054 14.9472C8.92942 14.2036 8.26777 13.5 7.42566 13.5H2.5`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Vd=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 16V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Hd=[[`path`,{d:`M12 3V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 18V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 12L18 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 12L3 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M18.3635 5.63672L16.2422 7.75804`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M7.75804 16.2422L5.63672 18.3635`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M18.3635 18.3635L16.2422 16.2422`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M7.75804 7.75804L5.63672 5.63672`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`7`}]],Ud=[[`path`,{d:`M21.9598 12.9919C21.6856 17.2342 18.3536 20.6134 14.1706 20.8915C13.4574 20.9389 12.7285 21.001 12 21.001C10.4054 21.001 8.95127 20.8637 7.44544 20.2902C7.44544 20.2902 5.56108 21.7589 3.69962 21.4587C3.31009 21.3959 3.11532 21.3644 3.00091 21.1343C2.8865 20.9042 3.00788 20.6756 3.25063 20.2185C3.65964 19.4483 3.92248 18.6737 3.80076 17.8306C3.73703 17.3892 3.50433 16.9974 3.27644 16.6136L3.26529 16.5948C2.62637 15.5188 2.12462 14.2975 2.04024 12.9919C1.98659 12.1617 1.98659 11.3019 2.04024 10.4717C2.31441 6.22935 5.64639 2.85011 9.8294 2.57205C11.2536 2.47738 12.7435 2.47719 14.1706 2.57205C18.3536 2.85011 21.6856 6.22935 21.9598 10.4717C22.0134 11.3019 22.0134 12.1617 21.9598 12.9919Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.75 14.501H15.25M8.75 9.50098H12.25`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Wd=[[`path`,{d:`M21.5 14.0784C20.3003 14.7189 18.9301 15.0821 17.4751 15.0821C12.7491 15.0821 8.91792 11.2509 8.91792 6.52485C8.91792 5.06986 9.28105 3.69968 9.92163 2.5C5.66765 3.49698 2.5 7.31513 2.5 11.8731C2.5 17.1899 6.8101 21.5 12.1269 21.5C16.6849 21.5 20.503 18.3324 21.5 14.0784Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Gd=[[`path`,{d:`M15.5 18C15.5 19.933 13.933 21.5 12 21.5C10.067 21.5 8.5 19.933 8.5 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 2L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 16.2311C21 15.762 20.8136 15.3121 20.4819 14.9803L19.8787 14.3771C19.3161 13.8145 19 13.0514 19 12.2558V9.5C19 5.634 15.866 2.5 12 2.5C10.4497 2.5 9.01706 3.00399 7.85707 3.85707M4.76887 18C3.79195 18 3 17.208 3 16.2311C3 15.762 3.18636 15.3121 3.51809 14.9803L4.12132 14.3771C4.68393 13.8145 5 13.0514 5 12.2558V9.5C5 8.20839 5.34981 6.99849 5.95987 5.95987L18 18H4.76887Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Kd=[[`path`,{d:`M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4999 12.5L14.9999 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],qd=[[`path`,{d:`M2 12C2 8.31087 2 6.4663 2.81382 5.15877C3.1149 4.67502 3.48891 4.25427 3.91891 3.91554C5.08116 3 6.72077 3 10 3H14C17.2792 3 18.9188 3 20.0811 3.91554C20.5111 4.25427 20.8851 4.67502 21.1862 5.15877C22 6.4663 22 8.31087 22 12C22 15.6891 22 17.5337 21.1862 18.8412C20.8851 19.325 20.5111 19.7457 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7457 3.1149 19.325 2.81382 18.8412C2 17.5337 2 15.6891 2 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 3L9.5 21`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5 7H6M5 10H6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Jd=[[`path`,{d:`M2 12C2 8.3109 2 6.46633 2.81382 5.1588C3.1149 4.67505 3.48891 4.2543 3.91891 3.91557C5.08116 3.00003 6.72077 3.00003 10 3.00003H14C17.2792 3.00003 18.9188 3.00003 20.0811 3.91557C20.5111 4.2543 20.8851 4.67505 21.1862 5.1588C22 6.46633 22 8.3109 22 12C22 15.6892 22 17.5337 21.1862 18.8413C20.8851 19.325 20.5111 19.7458 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7458 3.1149 19.325 2.81382 18.8413C2 17.5337 2 15.6892 2 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5 3.00003L14.5 21`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18 7.00006H19M18 10.0001H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Yd=[[`path`,{d:`M12 14.5V17.5M13 14.5C13 15.0523 12.5523 15.5 12 15.5C11.4477 15.5 11 15.0523 11 14.5C11 13.9477 11.4477 13.5 12 13.5C12.5523 13.5 13 13.9477 13 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.5 9V6.5C16.5 4.01472 14.4853 2 12 2C9.51471 2 7.49999 4.01472 7.49999 6.5V9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4.2678 18.8447C4.49268 20.515 5.87612 21.8235 7.55965 21.9009C8.97627 21.966 10.4153 22 12 22C13.5847 22 15.0237 21.966 16.4403 21.9009C18.1239 21.8235 19.5073 20.515 19.7322 18.8447C19.8789 17.7547 20 16.6376 20 15.5C20 14.3624 19.8789 13.2453 19.7322 12.1553C19.5073 10.485 18.1239 9.17649 16.4403 9.09909C15.0237 9.03397 13.5847 9 12 9C10.4153 9 8.97627 9.03397 7.55965 9.09909C5.87612 9.17649 4.49268 10.485 4.2678 12.1553C4.12104 13.2453 3.99999 14.3624 3.99999 15.5C3.99999 16.6376 4.12104 17.7547 4.2678 18.8447Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Xd=[[`path`,{d:`M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14 2.20004C13.3538 2.06886 12.6849 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 11.3151 21.9311 10.6462 21.8 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.0303 11.9625L16.5832 7.4096M19.7404 4.34462L19.1872 2.35748C19.0853 2.03011 18.6914 1.89965 18.4259 2.11662C16.9898 3.29018 15.4254 4.87091 16.703 7.36419C19.2771 8.56455 20.7466 6.94584 21.8733 5.5853C22.0975 5.3146 21.9623 4.90767 21.6247 4.81005L19.7404 4.34462Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Zd=[[`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Qd=[[`path`,{d:`M2.25 12C2.25 17.5228 6.72715 22 12.25 22C17.7728 22 22.25 17.5228 22.25 12C22.25 6.47715 17.7728 2 12.25 2C6.72715 2 2.25 6.47715 2.25 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.25 5L19.25 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],$d=[[`path`,{d:`M18.4995 20.5C18.2663 17.5685 15.8417 15.2477 12.808 15.0521L11.9995 15C11.7107 15.0076 11.4416 15.0178 11.1877 15.0298C8.18075 15.1723 5.7304 17.5974 5.49951 20.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15.2495 9.25C15.2495 11.0449 13.7944 12.5 11.9995 12.5C10.2046 12.5 8.74952 11.0449 8.74952 9.25C8.74952 7.45507 10.2046 6 11.9995 6C13.7944 6 15.2495 7.45507 15.2495 9.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.50249 8.5C5.17908 7.99485 4.99158 7.39432 4.99158 6.75C4.99158 4.95507 6.44665 3.5 8.24157 3.5C8.68752 3.5 9.1125 3.58982 9.49939 3.75235`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.4963 8.5C18.8197 7.99485 19.0072 7.39432 19.0072 6.75C19.0072 4.95507 17.5521 3.5 15.7572 3.5C15.3113 3.5 14.8863 3.58982 14.4994 3.75235`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22.0007 17.9996C21.8208 15.7374 19.9995 13.5 17.9995 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M1.99927 17.9996C2.17923 15.7374 4.00049 13.5 6.00049 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],ef=[[`path`,{d:`M3.74416 16.1113L8.66248 12.5982C9.18807 12.2228 9.5 11.6167 9.5 10.9708V7.5C9.5 4.73858 11.7386 2.5 14.5 2.5H18L14.9811 6.81268C14.7029 7.2102 14.7501 7.75013 15.0932 8.09325L15.9068 8.90675C16.2499 9.24987 16.7898 9.29714 17.1873 9.01888L21.5 6V9.5C21.5 12.2614 19.2614 14.5 16.5 14.5H13.0292C12.3833 14.5 11.7772 14.8119 11.4018 15.3375L7.88869 20.2558C7.33099 21.0366 6.43055 21.5 5.47105 21.5C3.83018 21.5 2.5 20.1698 2.5 18.529C2.5 17.5695 2.96338 16.669 3.74416 16.1113Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]];function tf({...e}){return(0,q.jsx)(ro,{"data-slot":`sheet`,...e})}function nf({...e}){return(0,q.jsx)(lo,{"data-slot":`sheet-portal`,...e})}function rf({className:e,...t}){return(0,q.jsx)(fo,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function af({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,q.jsxs)(nf,{children:[(0,q.jsx)(rf,{}),(0,q.jsxs)(go,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-xl transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,q.jsx)(Co,{"data-slot":`sheet-close`,asChild:!0,children:(0,q.jsxs)(bd,{variant:`ghost`,className:`absolute top-4 right-4 bg-secondary`,size:`icon-sm`,children:[(0,q.jsx)(Sd,{icon:Md,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function of({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-1.5 p-6`,e),...t})}function sf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sheet-footer`,className:K(`mt-auto flex flex-col gap-2 p-6`,e),...t})}function cf({className:e,...t}){return(0,q.jsx)(bo,{"data-slot":`sheet-title`,className:K(`text-base font-medium text-foreground`,e),...t})}function lf({className:e,...t}){return(0,q.jsx)(xo,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}var uf=768;function df(){let[e,t]=o.useState(void 0);return o.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<uf)};return e.addEventListener(`change`,n),t(window.innerWidth<uf),()=>e.removeEventListener(`change`,n)},[]),!!e}function ff({className:e,type:t,...n}){return(0,q.jsx)(`input`,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-2xl border border-transparent bg-input/50 px-2.5 py-1 text-base transition-[color,box-shadow] duration-200 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function pf({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,q.jsx)(uu,{"data-slot":`separator`,decorative:n,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...r})}function mf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`skeleton`,className:K(`animate-pulse rounded-2xl bg-muted`,e),...t})}function hf({delayDuration:e=0,...t}){return(0,q.jsx)(Wu,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function gf({...e}){return(0,q.jsx)(Ju,{"data-slot":`tooltip`,...e})}function _f({...e}){return(0,q.jsx)(Xu,{"data-slot":`tooltip-trigger`,...e})}function vf({className:e,sideOffset:t=0,children:n,...r}){return(0,q.jsx)(ed,{children:(0,q.jsxs)(nd,{"data-slot":`tooltip-content`,sideOffset:t,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[n,(0,q.jsx)(od,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=left]:translate-x-[-1.5px] data-[side=right]:translate-x-[1.5px]`})]})})}var yf=`sidebar_state`,bf=604800,xf=`16rem`,Sf=`18rem`,Cf=`3rem`,wf=`b`,Tf=o.createContext(null);function Ef(){let e=o.useContext(Tf);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Df({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=df(),[l,u]=o.useState(!1),[d,f]=o.useState(e),p=t??d,m=o.useCallback(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`${yf}=${t}; path=/; max-age=${bf}`},[n,p]),h=o.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);o.useEffect(()=>{let e=e=>{e.key===wf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=o.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,q.jsx)(Tf.Provider,{value:_,children:(0,q.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":xf,"--sidebar-width-icon":Cf,...i},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...s,children:a})})}function Of({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Ef();return n===`none`?(0,q.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,q.jsx)(tf,{open:l,onOpenChange:u,...o,children:(0,q.jsxs)(af,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Sf},side:e,children:[(0,q.jsxs)(of,{className:`sr-only`,children:[(0,q.jsx)(cf,{children:`Sidebar`}),(0,q.jsx)(lf,{children:`Displays the mobile sidebar.`})]}),(0,q.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,q.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,q.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,q.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,q.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function kf({className:e,onClick:t,...n}){let{toggleSidebar:r}=Ef();return(0,q.jsxs)(bd,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:K(e),onClick:e=>{t?.(e),r()},...n,children:[(0,q.jsx)(Sd,{icon:qd,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Af({className:e,...t}){return(0,q.jsx)(`main`,{"data-slot":`sidebar-inset`,className:K(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function jf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]`,e),...t})}function Mf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function Nf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Pf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Ff({className:e,asChild:t=!1,...n}){let r=t?Yt:`div`;return(0,q.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:K(`flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n})}function If({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:K(`w-full text-sm`,e),...t})}function Lf({className:e,...t}){return(0,q.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0.5`,e),...t})}function Rf({className:e,...t}){return(0,q.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var zf=vd(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm whitespace-nowrap ring-sidebar-ring outline-hidden transition-[width,height,padding] duration-200 group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 has-[>svg:first-child]:pl-2.5 has-[>svg:last-child]:pr-2.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 px-3 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Bf({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?Yt:`button`,{isMobile:c,state:l}=Ef(),u=(0,q.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:K(zf({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:u}),(0,q.jsx)(vf,{side:`right`,align:`center`,hidden:l!==`collapsed`||c,...i})]})):u}function Vf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:K(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground`,e),...t})}function Hf({className:e,showIcon:t=!1,...n}){let[r]=o.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return(0,q.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:K(`flex h-8 items-center gap-2 rounded-xl px-2`,e),...n,children:[t&&(0,q.jsx)(mf,{className:`size-4 rounded-xl`,"data-sidebar":`menu-skeleton-icon`}),(0,q.jsx)(mf,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":r}})]})}var Uf=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Wf=function(e){return`/`+e},Gf={},Kf=function(e){return e.pathname.endsWith(`.css`)},qf=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Jf=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Wf(t,n);let r=s(t),i=Kf(r);return qf(Gf,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Uf,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Yf=globalThis;Yf.window??=globalThis,Yf.Path2D??=class{},await Jf(()=>import(`./characters-BsW4RWhl.js`),[]);var Xf=Yf.window.CotalArt;function Zf(e,t){return Xf.body(e,t)}function Qf(e){return Xf.mark(e)}function $f(e){return Xf.character({vendor:e,cx:70,cy:66,w:92,look:`right`,mood:`happy`,arms:[{from:[84,50],via:[106,40],to:[112,12],hand:`open`,deg:`auto`}],legs:[{from:[40,94],to:[36,116],dir:-1},{from:[62,94],to:[66,116],dir:1}]})}function ep(){let e=(0,o.useRef)(null);return{onOpenAutoFocus:()=>{e.current=globalThis.document.activeElement},onCloseAutoFocus:t=>{t.preventDefault(),e.current?.focus(),e.current=null}}}function X({icon:e,size:t=18,className:n,"data-icon":r}){return(0,q.jsx)(Sd,{icon:e,size:t,strokeWidth:1.5,className:n,"data-icon":r,"aria-hidden":`true`})}var tp=vd(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-2xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function np({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Yt:`span`;return(0,q.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:K(tp({variant:t}),e),...r})}function rp({className:e,size:t=`default`,...n}){return(0,q.jsx)(Fo,{"data-slot":`avatar`,"data-size":t,className:K(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function ip({className:e,...t}){return(0,q.jsx)(Lo,{"data-slot":`avatar-fallback`,className:K(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var ap=vd(`group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full`,{variants:{variant:{default:`*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80`,secondary:`*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]`,muted:`*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]`,tinted:`*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]`,outline:`*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30`,ghost:`border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50`,destructive:`*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30`}},defaultVariants:{variant:`default`}});function op({variant:e=`default`,align:t=`start`,className:n,...r}){return(0,q.jsx)(`div`,{"data-slot":`bubble`,"data-variant":e,"data-align":t,className:K(ap({variant:e}),n),...r})}function sp({asChild:e=!1,className:t,...n}){let r=e?Yt:`div`;return(0,q.jsx)(r,{"data-slot":`bubble-content`,className:K(`w-fit max-w-full min-w-0 overflow-hidden rounded-3xl border border-transparent px-3 py-2.5 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/30`,t),...n})}function cp({className:e,...t}){return(0,q.jsx)(iu,{"data-slot":`label`,className:K(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var lp=vd(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function up({className:e,orientation:t=`vertical`,...n}){return(0,q.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(lp({orientation:t}),e),...n})}function dp({className:e,...t}){return(0,q.jsx)(cp,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:bg-input/30 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-4`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function fp({className:e,...t}){return(0,q.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function pp({className:e,children:t,errors:n,...r}){let i=(0,o.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,q.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,q.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,q.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:K(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function mp({className:e,...t}){return(0,q.jsx)(`textarea`,{"data-slot":`textarea`,className:K(`flex field-sizing-content min-h-16 w-full resize-none rounded-2xl border border-transparent bg-input/50 px-2.5 py-2 text-base transition-[color,box-shadow] duration-200 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function hp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:K(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-2xl border border-transparent bg-input/50 transition-[color,box-shadow] duration-200 outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var gp=vd(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-2xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function _p({className:e,align:t=`inline-start`,...n}){return(0,q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:K(gp({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var vp=vd(`flex items-center gap-2 rounded-2xl text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-xl p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function yp({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,q.jsx)(bd,{type:t,"data-size":r,variant:n,className:K(vp({size:r}),e),...i})}function bp({className:e,...t}){return(0,q.jsx)(`span`,{className:K(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,e),...t})}function xp({className:e,...t}){return(0,q.jsx)(mp,{"data-slot":`input-group-control`,className:K(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}function Sp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-group`,className:K(`flex min-w-0 flex-col gap-2`,e),...t})}function Cp({className:e,align:t=`start`,...n}){return(0,q.jsx)(`div`,{"data-slot":`message`,"data-align":t,className:K(`group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse`,e),...n})}function wp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-avatar`,className:K(`flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8`,e),...t})}function Tp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-content`,className:K(`flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end`,e),...t})}function Ep({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-header`,className:K(`flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0`,e),...t})}function Dp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-footer`,className:K(`flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end`,e),...t})}function Op({defaultTagName:e,props:t,render:n,state:r={},stateAttributesMapping:i}){let a=kp(Ap(r,i),t);if(!n)return o.createElement(e,a);if(typeof n==`function`)return n(a,r);if(!o.isValidElement(n))return null;let s=n.props,c={...kp(a,s),ref:Np(a.ref,s.ref)};return o.cloneElement(n,c)}function kp(...e){let t={};for(let n of e){if(!n)continue;let e=n;for(let n of Object.keys(e)){let r=e[n];if(r===void 0)continue;let i=t[n];t[n]=n===`className`?[i,r].filter(Boolean).join(` `):n===`style`?{...i,...r}:n===`ref`?Np(i,r):Mp(n)&&typeof i==`function`&&typeof r==`function`?jp(r,i):r}}return t}function Ap(e,t){let n={};for(let r of Object.keys(e)){let i=e[r],a=t?.[r]?.(i);if(a){Object.assign(n,a);continue}if(r===`slot`){n[`data-slot`]=i;continue}let o=`data-${String(r).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;typeof i==`boolean`?n[o]=i?``:void 0:i!=null&&(n[o]=String(i))}return n}function jp(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function Mp(e){return/^on[A-Z]/.test(e)}function Np(...e){let t=e.filter(Boolean);if(t.length!==0)return e=>{for(let n of t)typeof n==`function`?n(e):n&&(n.current=e)}}var Pp=8,Fp=64,Ip=0,Lp=.5,Rp=180,zp=new Set([`ArrowDown`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`,` `]),Bp={start:!1,end:!1},Vp={currentAnchorId:null,visibleMessageIds:[]};function Hp({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return Bp;let i=em({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:i-r.scrollTop-r.clientHeight>t}}function Up({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:i,visibleMessageIds:a}){if(!e||!i)return Vp;let o=i.getBoundingClientRect(),s=o.top+t+n,c=typeof IntersectionObserver>`u`,l=[],u=null;for(let t of Wp(e,r)){let e=t.dataset.messageId;if(!e)continue;let n=t.dataset.scrollAnchor===`true`,r=n||c?t.getBoundingClientRect():null;(c&&r?r.bottom>s&&r.top<o.bottom:a.has(e))&&l.push(e),n&&r&&r.top<=s+Lp&&(u=e)}return l.length===0&&u===null?Vp:{currentAnchorId:u,visibleMessageIds:l}}function Wp(e,t){return Array.from(e.children).filter(e=>e instanceof HTMLElement&&e!==t)}function Gp(e,t){for(let n=t;n<e.length;n++){let t=e[n];if(t?.dataset.scrollAnchor===`true`)return t}return null}function Kp(e,t){for(let n of e)if(n.dataset.scrollAnchor===`true`&&!t.has(n))return n;return null}function qp(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor===`true`&&(n+=1,n>1))return!0;return!1}function Jp(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor===`true`)return n}return null}function Yp({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let n of Wp(e,t)){if(!n.dataset.messageId)continue;let e=n.getBoundingClientRect();if(e.bottom>r.top&&e.top<r.bottom)return n}return null}function Xp({align:e,element:t,scrollMargin:n,spacer:r,viewport:i}){let a=Zp(t,i),o=t.getBoundingClientRect().height,s=rm(r);if(e===`center`){let e=Math.max(0,i.clientHeight-s.start-s.end);return a-s.start-(e-o)/2-n}if(e===`end`)return a-i.clientHeight+o+s.end+n;if(e===`nearest`){let e=a+o,t=i.scrollTop+s.start,r=i.scrollTop+i.clientHeight-s.end;return a>=t&&e<=r?i.scrollTop:a<t?a-s.start-n:e-i.clientHeight+s.end+n}return a-s.start-n}function Zp(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function Qp(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function $p({content:e,scrollTop:t,spacer:n,viewport:r}){let i=em({content:e,spacer:n,viewport:r});return t+r.clientHeight-i}function em({content:e,spacer:t,viewport:n}){let r=Wp(e,t),i=nm(e),a=n.getBoundingClientRect(),o=n.scrollTop,s=i.start+i.end;for(let e of r){let t=e.getBoundingClientRect();s=Math.max(s,t.bottom-a.top+o+i.end)}return s}function tm(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function nm(e){let t=window.getComputedStyle(e);return{end:am(t.paddingBlockEnd||t.paddingBottom),start:am(t.paddingBlockStart||t.paddingTop)}}function rm(e){let t=e?.parentElement;return t?nm(t):{end:0,start:0}}function im(e){if(!e)return 0;let t=window.getComputedStyle(e);return am(t.rowGap===`normal`?t.gap:t.rowGap)}function am(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function om(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:e=>{t(n,e)||(n=e,r.forEach(e=>e()))},subscribe:(e,t,n)=>{let i=r.size===0;return r.add(e),i&&t?.(),()=>{r.delete(e),r.size===0&&n?.()}}}}function sm(e,t){return om(e,t)}function cm(){return om(Vp,um)}function lm(e,t){return e.start===t.start&&e.end===t.end}function um(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((e,n)=>e===t.visibleMessageIds[n])}function dm({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:r,scrollPreviousItemPeek:i}){let a=o.useRef(e),s=o.useRef(!1),c=o.useRef(null),l=o.useRef(!1),u=o.useRef(n),d=o.useRef(0),f=o.useRef(null),p=o.useRef(0),m=o.useRef(e?`following-bottom`:`free-scrolling`),h=o.useRef(new Map),g=o.useRef(null),_=o.useRef(null),v=o.useRef(null),y=o.useRef(i),b=o.useRef(!0),x=o.useRef(null),S=o.useRef(r),C=o.useRef(null),w=o.useRef(0),T=o.useRef(0),E=o.useRef(null),D=o.useRef(null),O=o.useRef(null),k=o.useRef(null),A=o.useRef(null),j=o.useRef(null),M=o.useRef(null),N=o.useRef(null),P=o.useRef(null),F=o.useRef(new Set),I=o.useRef(new WeakSet);return O.current===null&&(O.current=sm(t===`end`||t===`last-anchor`,(e,t)=>e===t)),k.current===null&&(k.current=sm(Bp,lm)),P.current===null&&(P.current=cm()),a.current=e,u.current=n,S.current=r,y.current=i,{autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:A,streamingTurnRef:v,contentRef:c,defaultScrollPositionAppliedRef:l,firstItemRef:f,itemCountRef:d,lastScrollTopRef:p,messageElementsRef:h,modeRef:m,pendingScrollFrameRef:C,pendingScrollToMessageRef:g,prependRestoreRef:_,preserveScrollOnPrependRef:b,pendingDefaultScrollStore:O.current,rootRef:x,scrollEdgeThresholdRef:u,scrollMarginRef:S,scrollPreviousItemPeekRef:y,spacerGapRef:w,spacerHeightRef:T,spacerRef:E,stateFrameRef:D,stateStore:k.current,viewportRef:j,visibilityFrameRef:M,visibilityObserverRef:N,visibilityStore:P.current,visibleMessageIdsRef:F,handledScrollAnchorsRef:I}}function fm(e){e.pendingDefaultScrollStore.setSnapshot(!1)}function pm(e){e.defaultScrollPositionAppliedRef.current=!0,fm(e)}function mm({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:i,autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:c,contentRef:l,itemCountRef:u,messageElementsRef:d,modeRef:f,pendingScrollToMessageRef:p,prependRestoreRef:m,scrollMarginRef:h,scrollPreviousItemPeekRef:g,spacerGapRef:_,spacerHeightRef:v,spacerRef:y,viewportRef:b}=e,x=o.useCallback(e=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null),s.current!==e&&(s.current=e,t()),e&&(c.current=window.setTimeout(()=>{c.current=null,s.current=!1,t()},Rp))},[t]),S=o.useCallback(e=>{let t=y.current;if(!t)return;let n=Math.max(0,Math.ceil(e));v.current!==n&&(v.current=n,t.hidden=n===0,t.style.height=`${n}px`,t.style.marginTop=n>0?`${-_.current}px`:``)},[]),C=o.useCallback((e,{behavior:r=`auto`,autoscrolling:i=!1}={})=>{let a=b.current;if(!a)return;let o=Math.max(0,e);Math.abs(a.scrollTop-o)<=Lp?(a.scrollTop=o,t()):(i&&x(!0),a.scrollTo({top:o,behavior:r}),n())},[t,n,x]),w=o.useCallback(({behavior:e=`auto`}={})=>b.current?(S(0),i.current=null,f.current=`free-scrolling`,C(0,{behavior:e}),r(),!0):!1,[r,C,S]),T=o.useCallback(({behavior:e=`auto`}={})=>{let t=b.current;return t?(S(0),i.current=null,f.current=a.current?`following-bottom`:`free-scrolling`,C(tm(t),{autoscrolling:!0,behavior:e}),r(),!0):!1},[r,C,S]),E=o.useCallback((e,{align:t=`start`,behavior:n=`auto`,scrollMargin:a=h.current}={},{keepPreviousPeek:o=!1}={})=>{let s=l.current,c=b.current;if(!s||!c||!s.contains(e))return!1;let u=Xp({align:t,element:e,scrollMargin:o?a+g.current:a,spacer:y.current,viewport:c}),d=$p({content:s,scrollTop:u,spacer:y.current,viewport:c});return S(d),m.current={element:e,viewportTop:Qp(e,c)},f.current=o?`anchored-to-message`:`settling-jump`,i.current=o?e:null,C(u,{behavior:n}),r(),!0},[r,C,S]),D=o.useCallback(()=>{let e=i.current;return!e||!e.isConnected||f.current!==`anchored-to-message`?!1:E(e,{align:`start`},{keepPreviousPeek:!0})},[E]),O=o.useCallback((t,n)=>{let r=d.current.get(t);return r?(pm(e),E(r,n)?(p.current=null,!0):(p.current={messageId:t,options:n},!0)):u.current===0&&(p.current={messageId:t,options:n},pm(e),!0)},[E]);return{flushPendingScrollToMessage:o.useCallback(()=>{let t=p.current;if(!t)return!1;let n=d.current.get(t.messageId);return!n||!E(n,t.options)?!1:(p.current=null,pm(e),!0)},[E]),reanchorToAnchoredMessage:D,scrollToElement:E,scrollToEnd:T,scrollToMessage:O,scrollToStart:w}}function hm(e,t){return o.useCallback(n=>{e.current=n,n&&t()},[e,t])}function gm({autoScroll:e=!1,defaultScrollPosition:t=`end`,scrollEdgeThreshold:n=Pp,scrollPreviousItemPeek:r=Fp,scrollMargin:i=Ip}){let a=dm({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:i,scrollPreviousItemPeek:r}),{streamingTurnRef:s,autoScrollRef:c,autoscrollingRef:l,autoscrollingTimeoutRef:u,contentRef:d,defaultScrollPositionAppliedRef:f,firstItemRef:p,itemCountRef:m,lastScrollTopRef:h,messageElementsRef:g,modeRef:_,pendingScrollFrameRef:v,pendingScrollToMessageRef:y,prependRestoreRef:b,preserveScrollOnPrependRef:x,pendingDefaultScrollStore:S,rootRef:C,scrollEdgeThresholdRef:w,scrollMarginRef:T,scrollPreviousItemPeekRef:E,spacerGapRef:D,spacerHeightRef:O,spacerRef:k,stateFrameRef:A,stateStore:j,viewportRef:M,visibilityFrameRef:N,visibilityObserverRef:P,visibilityStore:F,visibleMessageIdsRef:I,handledScrollAnchorsRef:ee}=a,L=o.useRef(t);L.current!==t&&(L.current=t,f.current=!1);let te=o.useCallback(e=>{let t=C.current,n=M.current,r=[e.start&&`start`,e.end&&`end`].filter(Boolean).join(` `),i=l.current;for(let e of[t,n])e&&(r?e.setAttribute(`data-scrollable`,r):e.removeAttribute(`data-scrollable`),e.toggleAttribute(`data-autoscrolling`,i))},[]),ne=o.useCallback(e=>{let t=M.current?.scrollTop??0,n=t<h.current-Lp;h.current=t,c.current&&!e.end&&_.current!==`settling-jump`&&_.current!==`anchored-to-message`?_.current=`following-bottom`:_.current===`following-bottom`&&e.end&&n&&!l.current&&(_.current=`free-scrolling`)},[]),re=o.useCallback(()=>{let e=Hp({content:d.current,scrollEdgeThreshold:w.current,spacer:k.current,viewport:M.current});ne(e);let t=_.current===`following-bottom`?{...e,end:!1}:e;te(t),j.setSnapshot(t)},[ne,j,te]),ie=o.useCallback(()=>{A.current===null&&(A.current=window.requestAnimationFrame(()=>{A.current=null,re()}))},[re]),R=o.useCallback(()=>{F.hasListeners()&&N.current===null&&(N.current=window.requestAnimationFrame(()=>{N.current=null,F.hasListeners()&&F.setSnapshot(Up({content:d.current,scrollMargin:T.current,scrollPreviousItemPeek:E.current,spacer:k.current,viewport:M.current,visibleMessageIds:I.current}))}))},[F]),{flushPendingScrollToMessage:z,reanchorToAnchoredMessage:ae,scrollToElement:B,scrollToEnd:V,scrollToMessage:H,scrollToStart:oe}=mm({refs:a,commitScrollState:re,scheduleStateCommit:ie,scheduleVisibilitySync:R}),U=o.useCallback(()=>{let e=b.current,t=M.current;if(!e||!t||!e.element.isConnected)return!1;let n=Qp(e.element,t)-e.viewportTop;return Math.abs(n)<=Lp?!1:(t.scrollTop+=n,e.viewportTop=Qp(e.element,t),ie(),R(),!0)},[ie,R]),se=o.useCallback(()=>{let e=d.current,t=M.current;if(!e||!t){b.current=null;return}let n=Yp({content:e,spacer:k.current,viewport:t});b.current=n?{element:n,viewportTop:Qp(n,t)}:null},[]),ce=o.useCallback(()=>{v.current===null&&(v.current=window.requestAnimationFrame(()=>{v.current=null,z()&&se()}))},[se,z]),le=o.useCallback(()=>{if(!t||f.current||m.current===0)return!1;let e=!1;if(t===`last-anchor`){let t=d.current,n=M.current,r=t&&n?Jp(Wp(t,k.current)):null;if(!t||!n||!r)e=V({behavior:`auto`});else{let i=Zp(r,n);e=em({content:t,spacer:k.current,viewport:n})-i<=n.clientHeight?V({behavior:`auto`}):B(r,{align:`start`},{keepPreviousPeek:!0})}}else e=t===`end`?V({behavior:`auto`}):oe({behavior:`auto`});return e?(pm(a),!0):!1},[t,B,V,oe]),ue=o.useCallback(()=>{let e=d.current;if(!e)return;let t=Wp(e,k.current),n=m.current,r=p.current;m.current=t.length,p.current=t[0]??null,(()=>{if(z())return;if(n===0){if(le()||t.length>0&&c.current&&V({behavior:`auto`}))return;re(),R();return}let e=r?t.indexOf(r):-1;if(x.current&&e>0)U();else{if(t.length>n){let e=Gp(t,n);if(e){if(c.current&&_.current===`following-bottom`&&qp(t,n)){V({behavior:`auto`});return}B(e,{align:`start`},{keepPreviousPeek:!0}),ee.current.add(e);return}}if(t.length===n){let e=Kp(t,ee.current);if(e){B(e,{align:`start`},{keepPreviousPeek:!0}),ee.current.add(e);return}}_.current===`following-bottom`&&c.current?V({behavior:`auto`}):(re(),R())}})(),se()},[le,se,re,z,U,R,B,V]),de=o.useCallback(()=>{if(_.current===`following-bottom`&&c.current){V({behavior:`auto`});return}let e=O.current;ae()?c.current&&e>0&&O.current===0&&V({behavior:`auto`}):(ie(),R())},[ae,ie,R,V]),fe=o.useCallback(()=>{let e=M.current;if(e&&F.hasListeners()){if(typeof IntersectionObserver>`u`){R();return}P.current||=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.messageId;e&&(t.isIntersecting?I.current.add(e):I.current.delete(e))}R()},{root:e,rootMargin:`${-(T.current+E.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]}),g.current.forEach(e=>{P.current?.observe(e)}),R()}},[R,F]),pe=o.useCallback(()=>{N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),P.current?.disconnect(),P.current=null,I.current.clear(),F.setSnapshot(Vp)},[F]),me=o.useCallback((e,t,n)=>{t?(g.current.set(e,t),P.current?.observe(t),R(),y.current?.messageId===e&&ce()):n&&g.current.get(e)===n&&(g.current.delete(e),I.current.delete(e),P.current?.unobserve(n),R())},[ce,R]),he=o.useCallback(()=>{(_.current===`following-bottom`||_.current===`anchored-to-message`||_.current===`settling-jump`)&&(s.current=null,_.current=`free-scrolling`)},[]),ge=o.useCallback(()=>te(j.getSnapshot()),[j,te]),_e=hm(C,ge),ve=hm(M,ge),ye=o.useCallback(e=>{d.current=e},[]),be=o.useCallback(e=>{k.current=e,D.current=im(e?.parentElement??null)},[]),xe=o.useCallback(()=>{re(),R(),se()},[se,re,R]),Se=o.useMemo(()=>({handleContentChange:ue,handleResize:de,observeVisibility:fe,pendingDefaultScrollStore:S,preserveScrollOnPrependRef:x,scrollToEnd:V,scrollToMessage:H,scrollToStart:oe,setContentElement:ye,setRootElement:_e,setSpacerElement:be,setViewportElement:ve,stateStore:j,syncAfterScroll:xe,unobserveVisibility:pe,userScrollIntent:he,viewportRef:M,visibilityStore:F}),[ue,de,fe,S,V,H,oe,ye,_e,be,ve,j,xe,pe,he,F]);return o.useLayoutEffect(()=>{le()||m.current===0&&fm(a)},[le]),o.useEffect(()=>()=>{A.current!==null&&(window.cancelAnimationFrame(A.current),A.current=null),N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null),v.current!==null&&(window.cancelAnimationFrame(v.current),v.current=null),P.current?.disconnect(),P.current=null},[]),o.useLayoutEffect(()=>{e&&_.current===`following-bottom`&&m.current>0?V({behavior:`auto`}):re()},[e,re,V]),{context:Se,registerMessage:me}}function _m(e){let t=o.useRef(e);return t.current=e,t}var vm=o.createContext(null),ym=o.createContext(null);function bm(){let e=o.useContext(vm);if(!e)throw Error(`useMessageScroller must be used within a MessageScroller.`);return e}function xm(){let e=o.useContext(ym);if(!e)throw Error(`MessageScrollerItem must be used within a MessageScroller.`);return e}function Sm(){let{scrollToEnd:e,scrollToMessage:t,scrollToStart:n}=bm();return o.useMemo(()=>({scrollToEnd:e,scrollToMessage:t,scrollToStart:n}),[e,t,n])}function Cm(){let{stateStore:e}=bm();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function wm({autoScroll:e=!1,children:t,defaultScrollPosition:n=`end`,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a}){let{context:o,registerMessage:s}=gm({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a});return(0,q.jsx)(vm.Provider,{value:o,children:(0,q.jsx)(ym.Provider,{value:s,children:t})})}function Tm(){let{pendingDefaultScrollStore:e}=bm();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Em({children:e,...t}){let{setRootElement:n}=bm(),r=Tm();return(0,q.jsx)(`div`,{ref:n,...t,...r?{"data-pending-scroll":``}:null,children:e})}function Dm({"aria-label":e,children:t,onKeyDown:n,onScroll:r,onTouchMove:i,onWheel:a,preserveScrollOnPrepend:s=!0,ref:c,role:l,tabIndex:u,...d}){let{handleResize:f,preserveScrollOnPrependRef:p,setViewportElement:m,syncAfterScroll:h,userScrollIntent:g,viewportRef:_}=bm(),v=Tm();p.current=s;let y=o.useCallback(e=>{m(e),Np(c)?.(e)},[c,m]);function b(e){h(),r?.(e)}function x(e){g(),a?.(e)}function S(e){g(),i?.(e)}function C(e){zp.has(e.key)&&g(),n?.(e)}return o.useEffect(()=>{let e=_.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(f)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[f,_]),(0,q.jsx)(`div`,{ref:y,role:l??`region`,"aria-label":e??`Messages`,tabIndex:u??0,onKeyDown:C,onScroll:b,onTouchMove:S,onWheel:x,...d,...v?{"data-pending-scroll":``}:null,children:t})}function Om({"aria-relevant":e,children:t,ref:n,role:r,spacerClassName:i,...a}){let{handleContentChange:s,handleResize:c,setContentElement:l,setSpacerElement:u}=bm(),d=o.useRef(null),f=o.useCallback(e=>{d.current=e,l(e),Np(n)?.(e)},[n,l]);return o.useLayoutEffect(()=>{let e=d.current;if(!e||(s(),typeof MutationObserver>`u`))return;let t=new MutationObserver(()=>{s()});return t.observe(e,{childList:!0}),()=>t.disconnect()},[s]),o.useEffect(()=>{let e=d.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(c)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[c]),(0,q.jsxs)(`div`,{ref:f,role:r??`log`,"aria-relevant":e??`additions`,...a,children:[t,(0,q.jsx)(`div`,{ref:u,"aria-hidden":`true`,"data-message-scroller-spacer":``,hidden:!0,className:i})]})}function km({messageId:e,ref:t,scrollAnchor:n=!1,...r}){let i=xm(),a=o.useRef(null),s=o.useCallback(n=>{let r=a.current;a.current=n,e&&i(e,n,r),Np(t)?.(n)},[e,t,i]);return(0,q.jsx)(`div`,{ref:s,"data-message-id":e,"data-scroll-anchor":n?`true`:`false`,...r})}function Am({behavior:e=`smooth`,children:t,direction:n=`end`,onClick:r,render:i,tabIndex:a,type:s=`button`,...c}){let{scrollToEnd:l,scrollToStart:u,stateStore:d}=bm(),f=_m(r),p=o.useCallback(e=>d.subscribe(e),[d]),m=o.useCallback(()=>{let e=d.getSnapshot();return n===`start`?e.start:e.end},[n,d]),h=o.useSyncExternalStore(p,m,m),g=o.useCallback(t=>{h&&(f.current?.(t),t.defaultPrevented||(t.currentTarget.blur(),n===`start`?u({behavior:e}):l({behavior:e})))},[e,n,h,f,l,u]);return Op({defaultTagName:`button`,props:kp({type:s,inert:!h,tabIndex:h?a:-1,children:t??(0,q.jsxs)(`span`,{children:[`Scroll to `,n]}),onClick:g},c),render:i,state:{active:h,direction:n},stateAttributesMapping:{active:e=>({"data-active":e?`true`:`false`})}})}var jm={Provider:wm,Root:Em,Viewport:Dm,Content:Om,Item:km,Button:Am};function Mm(e){return(0,q.jsx)(jm.Provider,{...e})}function Nm({className:e,...t}){return(0,q.jsx)(jm.Root,{"data-slot":`message-scroller`,className:K(`group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden`,e),...t})}function Pm({className:e,...t}){return(0,q.jsx)(jm.Viewport,{"data-slot":`message-scroller-viewport`,className:K(`size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible`,e),...t})}function Fm({className:e,...t}){return(0,q.jsx)(jm.Content,{"data-slot":`message-scroller-content`,className:K(`flex h-max min-h-full flex-col gap-8`,e),...t})}function Im({className:e,scrollAnchor:t=!1,...n}){return(0,q.jsx)(jm.Item,{"data-slot":`message-scroller-item`,scrollAnchor:t,className:K(`min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]`,e),...n})}function Lm({direction:e=`end`,className:t,children:n,render:r,variant:i=`secondary`,size:a=`icon-sm`,...o}){return(0,q.jsx)(jm.Button,{"data-slot":`message-scroller-button`,"data-direction":e,"data-variant":i,"data-size":a,direction:e,className:K(`absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180`,t),render:r??(0,q.jsx)(bd,{variant:i,size:a}),...o,children:n??(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Sd,{icon:Td,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:e===`end`?`Scroll to end`:`Scroll to start`})]})})}function Rm({className:e,...t}){return(0,q.jsx)(Sd,{icon:Hd,strokeWidth:2,"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:K(`size-4 animate-spin`,e),...t})}function zm(e){let t=globalThis.navigator?.clipboard;t?t.writeText(e).catch(e=>console.error(`copying the command failed:`,e)):console.error(`copying needs the clipboard, which this page cannot reach`)}function Bm({command:e,icon:t}){return(0,q.jsxs)(`span`,{className:`ui-cmd`,children:[t&&(0,q.jsx)(X,{icon:t,size:16,className:`ui-ic ui-ic16`}),(0,q.jsx)(`code`,{children:e}),(0,q.jsxs)(bd,{type:`button`,variant:`outline`,size:`xs`,onClick:()=>zm(e),children:[(0,q.jsx)(X,{icon:Fd,"data-icon":`inline-start`}),`Copy`]})]})}var Vm=(0,o.createContext)(null),Hm=null,Um=new Set;function Wm(e){Hm=c(e);for(let e of Um)e()}var Gm=e=>e.split("`").map((e,t)=>t%2==1?(0,q.jsx)(`code`,{children:e},t):e),Km={text:``,outgoing:[]};function qm({store:e,target:t,where:n,to:r}){let i=c(t),a=Ye(e,e=>e.post),s=Ye(e,e=>e.drafts[i])??Km,l=(0,o.useContext)(Vm),u=Ef().isMobile,f=(0,o.useRef)(null),m=()=>f.current;if((0,o.useLayoutEffect)(()=>{let e=()=>{Hm===i&&(Hm=null,m()?.focus())};return e(),Um.add(e),()=>void Um.delete(e)},[i,a]),a===null)return null;if(a.mode===`off`)return(0,q.jsxs)(up,{children:[(0,q.jsxs)(hp,{"aria-disabled":`true`,children:[(0,q.jsxs)(_p,{align:`block-start`,children:[(0,q.jsx)(X,{icon:Yd}),(0,q.jsx)(bp,{children:a.reason===`This dashboard was started with --creds, which can only read.`?Gm("This dashboard was started with `--creds`, which can only read."):a.reason})]}),(0,q.jsxs)(_p,{align:`block-end`,children:[(0,q.jsx)(Bm,{command:p(t)}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`ml-auto inline-flex`,tabIndex:0,children:(0,q.jsx)(yp,{variant:`default`,size:`icon-xs`,disabled:!0,"aria-label":`Send`,children:(0,q.jsx)(X,{icon:Dd})})})}),(0,q.jsx)(vf,{children:a.reason})]})]})]}),(0,q.jsx)(fp,{className:`truncate`,children:Gm(d(a))})]});let h=s.outgoing.some(e=>e.id===void 0),g=s.refused,_=l!==null&&!h&&s.text.trim()!==``,v=()=>{_&&l.send(t,s.text).catch(()=>void 0)},y=(0,q.jsxs)(yp,{size:u?`icon-xs`:`xs`,disabled:l===null,onClick:()=>{l?.draft(t,`${s.text}@`),m()?.focus()},"aria-label":u?`Mention`:void 0,children:[(0,q.jsx)(X,{icon:kd,"data-icon":u?void 0:`inline-start`}),!u&&`Mention`]});return(0,q.jsxs)(up,{"data-invalid":g!==void 0,children:[(0,q.jsxs)(hp,{children:[(0,q.jsx)(xp,{ref:f,className:`max-h-48`,placeholder:`Message ${n}`,"aria-label":`Message ${n}`,"aria-invalid":g!==void 0,value:s.text,readOnly:l===null,onChange:e=>l?.draft(t,e.currentTarget.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),v())}}),(0,q.jsx)(_p,{align:`block-end`,children:g===void 0?(0,q.jsxs)(q.Fragment,{children:[u?(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`inline-flex`,tabIndex:l===null?0:void 0,children:y})}),(0,q.jsx)(vf,{children:`Mention`})]}):y,(0,q.jsxs)(bp,{className:`ml-auto min-w-0`,children:[(0,q.jsx)(`i`,{className:`ui-mode-dot`,style:{background:t.kind===`msg`?`var(--multi)`:`var(--uni)`}}),(0,q.jsx)(`span`,{className:`truncate`,children:r})]}),!u&&(0,q.jsx)(bp,{children:`as operator`}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`inline-flex`,tabIndex:_?void 0:0,children:(0,q.jsx)(yp,{variant:`default`,size:`icon-xs`,"aria-label":h?`Sending`:`Send`,disabled:!_,onClick:v,children:h?(0,q.jsx)(Rm,{}):(0,q.jsx)(X,{icon:Dd})})})}),(0,q.jsx)(vf,{children:h?`Sending`:`Send`})]})]}):(0,q.jsx)(yp,{variant:`outline`,size:`sm`,className:`ml-auto`,disabled:!_,onClick:v,children:`Try again`})})]}),g===void 0?(0,q.jsx)(fp,{className:`truncate`,children:Gm(d(a))}):(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(pp,{className:`truncate`,children:g})}),(0,q.jsx)(vf,{children:g})]})]})}function Jm({store:e,target:t,shown:n}){let r=Ye(e,e=>e.drafts[c(t)])??Km;return(0,q.jsx)(q.Fragment,{children:r.outgoing.filter(e=>e.id===void 0||!n.has(e.id)).map(e=>{let t=new Date(e.ts),n=e.id===void 0;return(0,q.jsx)(Im,{children:(0,q.jsxs)(Cp,{align:`end`,children:[(0,q.jsx)(wp,{children:(0,q.jsx)(rp,{children:(0,q.jsx)(ip,{children:`OP`})})}),(0,q.jsxs)(Tp,{children:[(0,q.jsxs)(Ep,{className:`gap-2`,children:[(0,q.jsx)(`span`,{children:`operator`}),(0,q.jsx)(np,{variant:`secondary`,children:`operator`}),(0,q.jsx)(`time`,{dateTime:t.toISOString(),children:O(t)}),n&&(0,q.jsx)(`span`,{children:`sending`})]}),(0,q.jsx)(op,{variant:n?`muted`:`default`,children:(0,q.jsx)(sp,{className:`whitespace-pre-wrap`,children:e.text})})]})]})},e.seq)})})}function Ym({peer:e,name:t,selfId:n}){return(0,q.jsxs)(hp,{children:[(0,q.jsx)(_p,{align:`block-start`,children:(0,q.jsx)(bp,{children:`This conversation is between two agents.`})}),(0,q.jsx)(_p,{align:`block-end`,children:(0,q.jsx)(yp,{asChild:!0,variant:`outline`,size:`sm`,className:`ml-auto`,children:(0,q.jsx)(`a`,{href:De(m(e,n)),onClick:()=>Wm({kind:`dm`,to:e}),children:`Message ${t}`})})})]})}function Xm(e){let t=e.snapshot;return t!==void 0&&(t.asOf!==void 0||Array.isArray(t.members)&&t.members.length>0)}function Zm(e,t){if(e.unreadable!==void 0)return`unreadable`;if(!Xm(e))return`traffic-only`;let n=e.snapshot.asOf;return(n?t-n:1/0)<45e3?`live`:`stale`}function Qm(e){return Xm(e)&&e.unreadable===void 0}var $m=e=>e.split(`.`).some(e=>e===`*`||e===`>`);function eh(e,t){let n=e.split(`.`),r=t.split(`.`);for(let e=0;e<n.length;e++){if(n[e]===`>`)return e<r.length;if(e>=r.length||n[e]!==`*`&&n[e]!==r[e])return!1}return n.length===r.length}function th(e,t,n,r=[]){let i=new Map,a=!1;for(let t of e)if(t===`>`||t===`*`)a=!0;else if($m(t))for(let e of n)eh(t,e)&&i.set(e,`live`);else i.set(t,`live`);for(let e of t)if($m(e))for(let t of r)!i.has(t)&&eh(e,t)&&i.set(t,`durable`);else i.has(e)||i.set(e,`durable`);return{channels:i,wide:a}}function nh(e,t,n,r){let i=new Set,a=[],o=(e,t)=>{e&&!i.has(e)&&(i.add(e),a.push({id:e,source:t}))};if(Qm(t)){let r=[...n,e];for(let n of t.snapshot.members){let{channels:t,wide:i}=th(n.live??[],n.durable??[],r);(i||t.has(e))&&o(n.id,`membership`)}return a}for(let t of r)t.msg.channel===e&&o(t.senderId??t.msg.from.id,`traffic`);return a}function rh(e,t,n,r,i){let a=new Set,o=!1;if(Qm(t)){let r=t.snapshot.members.find(t=>t.id===e);if(r){let e=th(r.live??[],r.durable??[],n);o=e.wide;for(let t of e.channels.keys())a.add(t)}}else for(let t of r)(t.senderId??t.msg.from?.id)===e&&typeof t.msg.channel==`string`&&a.add(t.msg.channel);let s=new Map;for(let[e,t]of Object.entries(i??{}))(t===`quiet`||t===`muted`)&&s.set(e,t);for(let e of s.keys())a.add(e);return{channels:[...a].sort().map(e=>s.has(e)?{channel:e,mode:s.get(e)}:{channel:e}),wide:o}}function ih({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-3xl border-dashed p-12 text-center text-balance`,e),...t})}function ah({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var oh=vd(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-foreground [&_svg:not([class*='size-'])]:size-5`}},defaultVariants:{variant:`default`}});function sh({className:e,variant:t=`default`,...n}){return(0,q.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(oh({variant:t,className:e})),...n})}function ch({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-title`,className:K(`text-lg font-medium tracking-tight`,e),...t})}function lh({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-description`,className:K(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function uh({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-content`,className:K(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}var dh=26;function fh({letter:e,slot:t,size:n,offline:r}){let i=n<dh,a=[`ui-idb`,[...e].length>1&&`ui-idb-2`,i&&`ui-idb-dot`,r&&`ui-idb-off`].filter(Boolean).join(` `);return(0,q.jsx)(`i`,{className:a,style:{"--bf":`var(--id-${t})`},"aria-hidden":`true`,children:i?null:e})}var ph={waiting:zd,working:Hd,idle:Wd,offline:Qd},mh=e=>e.charAt(0).toUpperCase()+e.slice(1);function hh({status:e}){return(0,q.jsx)(`i`,{className:`ui-st ui-st-${e}`,role:`img`,"aria-label":mh(e)})}var gh=(e,t)=>e===`working`?`${t} ox-spin`:t,_h={waiting:`default`,working:`secondary`,idle:`outline`,offline:`outline`};function vh({row:e}){let t=Object.hasOwn(ph,e.status)?ph[e.status]:void 0,n=Object.hasOwn(_h,e.status)?_h[e.status]:`outline`;return(0,q.jsxs)(np,{variant:n,children:[t&&(0,q.jsx)(X,{icon:t,"data-icon":`inline-start`,className:e.status===`working`?`ox-spin`:void 0}),mh(qe(e))]})}var yh={"claude-code":`claude`,claude:`claude`,opencode:`opencode`,codex:`codex`,hermes:`hermes`,pi:`pi`},bh=`guest`,xh={working:{look:`down`},waiting:{mood:`surprised`,look:`up`}};function Sh(e,t){return Zf(e!==void 0&&Object.hasOwn(yh,e)?yh[e]:bh,Object.hasOwn(xh,t)?xh[t]:{})}function Ch({vendor:e,status:t,size:n,badge:r,dot:i=!0}){return(0,q.jsxs)(`span`,{className:t===`offline`?`ui-av ui-av-off`:`ui-av`,style:{"--s":`${n}px`},children:[(0,q.jsx)(`svg`,{viewBox:`-2 -4 112 112`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:Sh(e,t)}}),r&&(0,q.jsx)(fh,{letter:r.letter,slot:r.slot,size:n,offline:t===`offline`}),i&&(0,q.jsx)(hh,{status:t})]})}var wh=8;function Th(e){let t=[...e][0];if(t===void 0)return``;let n=/_(\d+)$/.exec(e);return t.toUpperCase()+(n?n[1]:``)}function Eh(e){let[t,...n]=[...e];if(t===void 0)return``;let r=n.find(e=>/\p{L}/u.test(e))??``,i=/_(\d+)$/.exec(e);return t.toUpperCase()+r+(i?i[1]:``)}function Dh(e){let t=new Map;for(let n of e)n.status!==`offline`&&t.set(Th(n.name),(t.get(Th(n.name))??0)+1);let n=new Map;for(let r of e){let e=Th(r.name);n.set(r.id,r.status!==`offline`&&(t.get(e)??0)>1?Eh(r.name):e)}return n}function Oh(e){let t=7;for(let n of e)t=Math.imul(t,31)+n.charCodeAt(0)>>>0;return t%wh+1}var kh=(e,t)=>e.name<t.name?-1:e.name>t.name?1:e.id<t.id?-1:+(e.id>t.id);function Ah(e){let t=new Map,n=new Set,r=e.filter(e=>e.status!==`offline`).sort(kh);for(let e of r){let r=Oh(e.name);if(n.size<wh)for(;n.has(r);)r=r%wh+1;n.add(r),t.set(e.id,r)}for(let n of e)n.status===`offline`&&t.set(n.id,Oh(n.name));return t}var jh=(0,o.createContext)(()=>void 0);function Mh(){return(0,o.useContext)(jh)}function Nh(e){let t=Ah(e),n=Dh(e),r=new Map;for(let i of e){let e=t.get(i.id);e!==void 0&&r.set(i.id,{letter:n.get(i.id)??``,slot:e})}return e=>r.get(e)}var Ph={claude:{label:`Claude Code`,color:`#d97757`,glyph:`◆`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>`},opencode:{label:`OpenCode`,color:`#cdd6e0`,glyph:`▣`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22 24H2V0h20zM17 4.8H7v14.4h10z"/></svg>`},codex:{label:`Codex`,color:`#e5e7eb`,glyph:`◉`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>`},hermes:{label:`Hermes`,color:`#a78bfa`,glyph:`➤`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 3 3 10.5l7 2.5 2.5 7L21 3Z"/><path d="M21 3 10 13"/></svg>`},jcode:{label:`Jcode`,color:`#4ade80`,glyph:`⟨⟩`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 4 3 12l5 8"/><path d="m16 4 5 8-5 8"/></svg>`},pi:{label:`Pi`,color:`#7dd3fc`,glyph:`π`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"/><path d="M9 7v12"/><path d="M15 7v12c0 1.5 1.5 2 3 1"/></svg>`}};function Fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ih(e){if(Array.isArray(e))return e}function Lh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Rh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
|
+
`},Fa=0,Ia=[];function La(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Fa++)[0],a=o.useState(aa)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Fi([e.lockRef.current],(e.shards||[]).map(Ma),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Aa(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ca(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ca(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ka(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(Ia.length&&Ia[Ia.length-1]===a){var r=`deltaY`in n?ja(n):Aa(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Na(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var o=(s.current.shards||[]).map(Ma).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ra(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=Aa(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,ja(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,Aa(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return Ia.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,va),document.addEventListener(`touchmove`,l,va),document.addEventListener(`touchstart`,d,va),function(){Ia=Ia.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,va),document.removeEventListener(`touchmove`,l,va),document.removeEventListener(`touchstart`,d,va)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Pa(i)}):null,m?o.createElement(ha,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ra(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var za=Yi(Xi,La),Ba=o.forwardRef(function(e,t){return o.createElement(Qi,Ni({},e,{ref:t,sideCar:za}))});Ba.classNames=Qi.classNames;var Va=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ha=new WeakMap,Ua=new WeakMap,Wa={},Ga=0,Ka=function(e){return e&&(e.host||Ka(e.parentNode))},qa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ka(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ja=function(e,t,n,r){var i=qa(t,Array.isArray(e)?e:[e]);Wa[n]||(Wa[n]=new WeakMap);var a=Wa[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ha.get(e)||0)+1,l=(a.get(e)||0)+1;Ha.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ua.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ga++,function(){o.forEach(function(e){var t=Ha.get(e)-1,i=a.get(e)-1;Ha.set(e,t),a.set(e,i),t||(Ua.has(e)||e.removeAttribute(r),Ua.delete(e)),i||e.removeAttribute(n)}),Ga--,Ga||(Ha=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Wa={})}},Ya=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Va(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ja(r,i,n,`aria-hidden`)):function(){return null}},Xa=Object.defineProperty,Za=(e,t)=>Xa(e,`name`,{value:t,configurable:!0}),Qa=`Dialog`,[$a,eo]=Cn(Qa),[to,no]=$a(Qa),ro=Za(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=o.useRef(null),l=o.useRef(null),{nodes:u,registry:d}=di(),[f,p]=tr({prop:r,defaultProp:i??!1,onChange:a,caller:Qa}),[m,h]=o.useState(0),[g,_]=o.useState(0);return(0,q.jsx)(to,{scope:t,triggerRef:c,contentRef:l,contentId:yr(),titleId:yr(),descriptionId:yr(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:f,onOpenChange:p,onOpenToggle:o.useCallback(()=>p(e=>!e),[p]),modal:s,branchNodes:u,branchRegistry:d,children:n})},`Dialog`),io=`DialogTrigger`,ao=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(io,n),a=Gt(t,i.triggerRef);return(0,q.jsx)(J.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":To(i.open),...r,ref:a,onClick:Y(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),oo=`DialogPortal`,[so,co]=$a(oo,{forceMount:void 0}),lo=Za(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=no(oo,t);return(0,q.jsx)(so,{scope:t,forceMount:n,children:o.Children.map(r,e=>(0,q.jsx)(lr,{present:n||a.open,children:(0,q.jsx)(Ti,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),uo=`DialogOverlay`,fo=o.forwardRef(Za(function(e,t){let n=co(uo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=no(uo,e.__scopeDialog);return a.modal?(0,q.jsx)(lr,{present:r||a.open,children:(0,q.jsx)(mo,{...i,ref:t})}):null},`DialogOverlay`)),po=Jt(`DialogOverlay.RemoveScroll`),mo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(uo,n),a=Gt(t,Zr());return(0,q.jsx)(Ba,{as:po,allowPinchZoom:!0,shards:o.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,q.jsx)(J.div,{"data-state":To(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),ho=`DialogContent`,go=o.forwardRef(Za(function(e,t){let n=co(ho,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=no(ho,e.__scopeDialog);return(0,q.jsx)(lr,{present:r||a.open,children:a.modal?(0,q.jsx)(_o,{...i,ref:t}):(0,q.jsx)(vo,{...i,ref:t})})},`DialogContent`)),_o=o.forwardRef(Za(function(e,t){let n=no(ho,e.__scopeDialog),r=o.useRef(null),i=Gt(t,n.contentRef,r);return o.useEffect(()=>{let e=r.current;if(e)return Ya(e)},[]),(0,q.jsx)(yo,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),vo=o.forwardRef(Za(function(e,t){let n=no(ho,e.__scopeDialog),r=o.useRef(!1),i=o.useRef(!1);return(0,q.jsx)(yo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),yo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=no(ho,n);return ji(),(0,q.jsx)(ui,{registry:l.branchRegistry,children:(0,q.jsx)(ci,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,q.jsx)(Xr,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?wo(o,l.descriptionId):o,"data-state":To(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),bo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(`DialogTitle`,n),{setTitleCount:a}=i;return Tn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,q.jsx)(J.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),xo=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(`DialogDescription`,n),{setDescriptionCount:a}=i;return Tn(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,q.jsx)(J.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),So=`DialogClose`,Co=o.forwardRef(Za(function(e,t){let{__scopeDialog:n,...r}=e,i=no(So,n);return(0,q.jsx)(J.button,{type:`button`,...r,ref:t,onClick:Y(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function wo(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Za(wo,`concatAriaDescribedby`);function To(e){return e?`open`:`closed`}Za(To,`getState`);var Eo=Object.defineProperty,Do=(e,t)=>Eo(e,`name`,{value:t,configurable:!0}),Oo=`Avatar`,[ko,Ao]=Cn(Oo),jo={Idle:`idle`,Loading:`loading`,Loaded:`loaded`,Error:`error`},Mo=[0,()=>void 0],[No,Po]=ko(Oo),Fo=o.forwardRef(Do(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=o.useState(jo.Idle),[s,c]=Bo();return(0,q.jsx)(No,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:s,setImageCount:c,children:(0,q.jsx)(J.span,{...r,ref:t})})},`Avatar`)),Io=`AvatarFallback`,Lo=o.forwardRef(Do(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=Po(Io,n),[s,c]=o.useState(r===void 0);return o.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(e)}},[r]),s&&a.imageLoadingStatus!==jo.Loaded?(0,q.jsx)(J.span,{...i,ref:t}):null},`AvatarFallback`));function Ro(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return Tn(()=>{if(!e){n(jo.Error);return}let t=new window.Image,a=Do(e=>{let t=e.currentTarget;n(zo(t))},`handleLoad`),o=Do(()=>n(jo.Error),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(zo(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(jo.Idle)}},[e,i,r,n]),t}Do(Ro,`useImageLoadingStatus`);function zo(e){return e.complete?e.naturalWidth>0?jo.Loaded:jo.Error:jo.Loading}Do(zo,`getImageLoadingStatus`);function Bo(){return Mo}Do(Bo,`useImageCount`);function Vo(e){}Do(Vo,`useUpdateImageCount`);var Ho=Object.defineProperty,Uo=(e,t)=>Ho(e,`name`,{value:t,configurable:!0});function Wo(e){let[t,n]=o.useState(void 0);return Tn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}Uo(Wo,`useSize`);var Go=[`top`,`right`,`bottom`,`left`],Ko=Math.min,qo=Math.max,Jo=Math.round,Yo=Math.floor,Xo=e=>({x:e,y:e}),Zo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qo(e,t,n){return qo(e,Ko(t,n))}function $o(e,t){return typeof e==`function`?e(t):e}function es(e){return e.split(`-`)[0]}function ts(e){return e.split(`-`)[1]}function ns(e){return e===`x`?`y`:`x`}function rs(e){return e===`y`?`height`:`width`}function is(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function as(e){return ns(is(e))}function os(e,t,n){n===void 0&&(n=!1);let r=ts(e),i=as(e),a=rs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hs(o)),[o,hs(o)]}function ss(e){let t=hs(e);return[cs(e),t,cs(t)]}function cs(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ls=[`left`,`right`],us=[`right`,`left`],ds=[`top`,`bottom`],fs=[`bottom`,`top`];function ps(e,t,n){switch(e){case`top`:case`bottom`:return n?t?us:ls:t?ls:us;case`left`:case`right`:return t?ds:fs;default:return[]}}function ms(e,t,n,r){let i=ts(e),a=ps(es(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(cs)))),a}function hs(e){let t=es(e);return Zo[t]+e.slice(t.length)}function gs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function _s(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gs(e)}function vs(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ys(e,t,n){let{reference:r,floating:i}=e,a=is(t),o=as(t),s=rs(o),c=es(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ts(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function bs(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$o(t,e),p=_s(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vs(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xs=50,Ss=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:bs},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ys(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xs&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ys(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Cs=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=$o(e,t)||{};if(l==null)return{};let d=_s(u),f={x:n,y:r},p=as(i),m=rs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ko(d[_],T),D=Ko(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Qo(E,k,O),j=!c.arrow&&ts(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),ws=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=$o(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=es(r),_=is(o),v=es(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hs(o)]:ss(o)),x=p!==`none`;!d&&x&&b.push(...ms(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=os(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===is(t)||T.every(e=>is(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=is(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ts(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Es(e){return Go.some(t=>e[t]>=0)}var Ds=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$o(e,t);switch(i){case`referenceHidden`:{let e=Ts(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Es(e)}}}case`escaped`:{let e=Ts(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Es(e)}}}default:return{}}}}},Os=new Set([`left`,`top`]);async function ks(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=es(n),s=ts(n),c=is(n)===`y`,l=Os.has(o)?-1:1,u=a&&c?-1:1,d=$o(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var As=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ks(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},js=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$o(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=is(i),p=ns(f),m=u[p],h=u[f],g=(e,t)=>Qo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ms=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$o(e,t),u={x:n,y:r},d=is(i),f=ns(d),p=u[f],m=u[d],h=$o(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Os.has(es(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ns=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$o(e,t),c=await i.detectOverflow(t,s),l=es(n),u=ts(n),d=is(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ko(p-c[m],g),y=Ko(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qo(c.left,c.right):S=p-2*qo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ps(){return typeof window<`u`}function Fs(e){return Rs(e)?(e.nodeName||``).toLowerCase():`#document`}function Is(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ls(e){return((Rs(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rs(e){return Ps()?e instanceof Node||e instanceof Is(e).Node:!1}function zs(e){return Ps()?e instanceof Element||e instanceof Is(e).Element:!1}function Bs(e){return Ps()?e instanceof HTMLElement||e instanceof Is(e).HTMLElement:!1}function Vs(e){return!Ps()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Is(e).ShadowRoot}function Hs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$s(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Us(e){return/^(table|td|th)$/.test(Fs(e))}function Ws(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Gs=/transform|translate|scale|rotate|perspective|filter/,Ks=/paint|layout|strict|content/,qs=e=>!!e&&e!==`none`,Js;function Ys(e){let t=zs(e)?$s(e):e;return qs(t.transform)||qs(t.translate)||qs(t.scale)||qs(t.rotate)||qs(t.perspective)||!Zs()&&(qs(t.backdropFilter)||qs(t.filter))||Gs.test(t.willChange||``)||Ks.test(t.contain||``)}function Xs(e){let t=tc(e);for(;Bs(t)&&!Qs(t);){if(Ys(t))return t;if(Ws(t))return null;t=tc(t)}return null}function Zs(){return Js??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Js}function Qs(e){return/^(html|body|#document)$/.test(Fs(e))}function $s(e){return Is(e).getComputedStyle(e)}function ec(e){return zs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tc(e){if(Fs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ls(e);return Vs(t)?t.host:t}function nc(e){let t=tc(e);return Qs(t)?(e.ownerDocument||e).body:Bs(t)&&Hs(t)?t:nc(t)}function rc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=nc(e),i=r===e.ownerDocument?.body,a=Is(r);if(i){let e=ic(a);return t.concat(a,a.visualViewport||[],Hs(r)?r:[],e&&n?rc(e):[])}return t.concat(r,rc(r,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ac(e){let t=$s(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jo(n)!==a||Jo(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oc(e){return zs(e)?e:e.contextElement}function sc(e){let t=oc(e);if(!Bs(t))return Xo(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ac(t),o=(a?Jo(n.width):n.width)/r,s=(a?Jo(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var cc=Xo(0);function lc(e){let t=Is(e);return!Zs()||!t.visualViewport?cc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Is(e)}function dc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oc(e),o=Xo(1);t&&(r?zs(r)&&(o=sc(r)):o=sc(e));let s=uc(a,n,r)?lc(a):Xo(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Is(a),t=zs(r)?Is(r):r,n=e,i=ic(n);for(;i&&t!==n;){let e=sc(i),t=i.getBoundingClientRect(),r=$s(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Is(i),i=ic(n)}}return vs({width:u,height:d,x:c,y:l})}function fc(e,t){let n=ec(e).scrollLeft;return t?t.left+n:dc(Ls(e)).left+n}function pc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fc(e,n),y:n.top+t.scrollTop}}function mc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ls(r),s=t?Ws(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xo(1),u=Xo(0),d=Bs(r);if((d||!a)&&((Fs(r)!==`body`||Hs(o))&&(c=ec(r)),d)){let e=dc(r);l=sc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?pc(o,c):Xo(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function hc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function gc(e){let t=ec(e),n=e.ownerDocument.body,r=qo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+fc(e),o=-t.scrollTop;return $s(n).direction===`rtl`&&(a+=qo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var _c=25;function vc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Is(e),a=Ls(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Zs()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(fc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=_c&&(s-=o)}return{width:s,height:c,x:l,y:u}}function yc(e,t){let n=dc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=sc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function bc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=vc(e,n,t);else if(t===`document`)r=gc(Ls(e));else if(zs(t))r=yc(t,n);else{let n=lc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vs(r)}function xc(e,t){let n=t.get(e);if(n)return n;let r=rc(e,[],!1).filter(e=>zs(e)&&Fs(e)!==`body`),i=null,a=$s(e).position===`fixed`,o=a?tc(e):e;for(;zs(o)&&!Qs(o);){let e=$s(o),t=Ys(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=tc(o)}return t.set(e,r),r}function Sc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ws(t)?[]:xc(t,this._c):[].concat(n),r],o=bc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=bc(t,a[e],i);s=qo(n.top,s),c=Ko(n.right,c),l=Ko(n.bottom,l),u=qo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Cc(e){let{width:t,height:n}=ac(e);return{width:t,height:n}}function wc(e,t,n){let r=Bs(t),i=Ls(t),a=n===`fixed`,o=dc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xo(0);if((r||!a)&&((Fs(t)!==`body`||Hs(i))&&(s=ec(t)),r)){let e=dc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=fc(i));let l=i&&!r&&!a?pc(i,s):Xo(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Tc(e){return $s(e).position===`static`}function Ec(e,t){if(!Bs(e)||$s(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ls(e)===n&&(n=n.ownerDocument.body),n}function Dc(e,t){let n=Is(e);if(Ws(e))return n;if(!Bs(e)){let t=tc(e);for(;t&&!Qs(t);){if(zs(t)&&!Tc(t))return t;t=tc(t)}return n}let r=Ec(e,t);for(;r&&Us(r)&&Tc(r);)r=Ec(r,t);return r&&Qs(r)&&Tc(r)&&!Ys(r)?n:r||Xs(e)||n}var Oc=async function(e){let t=this.getOffsetParent||Dc,n=this.getDimensions,r=await n(e.floating);return{reference:wc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kc(e){return $s(e).direction===`rtl`}var Ac={convertOffsetParentRelativeRectToViewportRelativeRect:mc,getDocumentElement:Ls,getClippingRect:Sc,getOffsetParent:Dc,getElementRects:Oc,getClientRects:hc,getDimensions:Cc,getScale:sc,isElement:zs,isRTL:kc};function jc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mc(e,t,n){let r=null,i,a=Ls(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Yo(d),h=Yo(a.clientWidth-(u+f)),g=Yo(a.clientHeight-(d+p)),_=Yo(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qo(0,Ko(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!jc(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Is(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Nc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=oc(e),u=i||a?[...l?rc(l):[],...t?rc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Mc(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?dc(e):null;c&&g();function g(){let t=dc(e);h&&!jc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Pc=As,Fc=js,Ic=ws,Lc=Ns,Rc=Ds,zc=Cs,Bc=Ms,Vc=(e,t,n)=>{let r=new Map,i=n??{},a={...Ac,...i.platform,_c:r};return Ss(e,t,{...i,platform:a})},Hc=typeof document<`u`?o.useLayoutEffect:function(){};function Uc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Uc(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Wc(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gc(e,t){let n=Wc(e);return Math.round(t*n)/n}function Kc(e){let t=o.useRef(e);return Hc(()=>{t.current=e}),t}function qc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=o.useState(r);Uc(m,r)||h(r);let[g,_]=o.useState(null),[v,y]=o.useState(null),b=o.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=o.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=c||v,w=o.useRef(null),T=o.useRef(null),E=o.useRef(f),D=u!=null,O=Kc(u),k=Kc(i),A=Kc(d),j=o.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),Vc(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Uc(E.current,t)&&(E.current=t,s.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);Hc(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=o.useRef(!1);Hc(()=>(M.current=!0,()=>{M.current=!1}),[]),Hc(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=o.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=o.useMemo(()=>({reference:S,floating:C}),[S,C]),F=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Gc(P.floating,f.x),r=Gc(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Wc(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,l,P.floating,f.x,f.y]);return o.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var Jc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:zc({element:r.current,padding:i}).fn(n):r?zc({element:r,padding:i}).fn(n):{}}}},Yc=(e,t)=>{let n=Pc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xc=(e,t)=>{let n=Fc(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zc=(e,t)=>({fn:Bc(e).fn,options:[e,t]}),Qc=(e,t)=>{let n=Ic(e);return{name:n.name,fn:n.fn,options:[e,t]}},$c=(e,t)=>{let n=Lc(e);return{name:n.name,fn:n.fn,options:[e,t]}},el=(e,t)=>{let n=Rc(e);return{name:n.name,fn:n.fn,options:[e,t]}},tl=(e,t)=>{let n=Jc(e);return{name:n.name,fn:n.fn,options:[e,t]}},nl=Object.defineProperty,rl=o.forwardRef(((e,t)=>nl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,q.jsx)(J.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,q.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),il=Object.defineProperty,al=(e,t)=>il(e,`name`,{value:t,configurable:!0}),ol={Partial:`partial`,Always:`always`},sl={Optimized:`optimized`,Always:`always`},cl=`Popper`,[ll,ul]=Cn(cl),[dl,fl]=ll(cl),pl=al(e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null),[a,s]=o.useState(void 0);return(0,q.jsx)(dl,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:s,children:n})},`Popper`),ml=`PopperAnchor`,hl=o.forwardRef(al(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=fl(ml,n),s=o.useRef(null),c=a.onAnchorChange,l=Gt(t,o.useCallback(e=>{s.current=e,e&&c(e)},[c])),u=o.useRef(null);o.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let d=a.placementState&&Tl(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,q.jsx)(J.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),gl=`PopperContent`,[_l,vl]=ll(gl),yl=o.forwardRef(al(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=ol.Partial,hideWhenDetached:p=!1,updatePositionStrategy:m=sl.Optimized,onPlaced:h,...g}=e,_=fl(gl,n),[v,y]=o.useState(null),b=Gt(t,y),[x,S]=o.useState(null),C=Wo(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,A={padding:D,boundary:O.filter(Cl),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=qc({strategy:`fixed`,placement:E,whileElementsMounted:al((...e)=>Nc(...e,{animationFrame:m===sl.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Yc({mainAxis:i+T,alignmentAxis:s}),l&&Xc({mainAxis:!0,crossAxis:!1,...f===ol.Partial?{limiter:Zc()}:{},...A}),l&&Qc({...A}),$c({...A,apply:al(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&tl({element:x,padding:c}),wl({arrowWidth:w,arrowHeight:T}),p&&el(k?{strategy:`referenceHidden`,...A}:{strategy:`referenceHidden`,padding:A.padding,altBoundary:A.altBoundary})]}),I=_.setPlacementState;Tn(()=>(I(N),()=>{I(void 0)}),[N,I]);let[ee,L]=Tl(N),te=Hr(h);Tn(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,re=F.arrow?.y,ie=F.arrow?.centerOffset!==0,[R,z]=o.useState();return Tn(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]),(0,q.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,q.jsx)(_l,{scope:n,placedSide:ee,placedAlign:L,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,q.jsx)(J.div,{"data-side":ee,"data-align":L,...g,ref:b,style:{...g.style,animation:P?g.style?.animation:`none`}})})})},`PopperContent`)),bl=`PopperArrow`,xl={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Sl=o.forwardRef(al(function(e,t){let{__scopePopper:n,...r}=e,i=vl(bl,n),a=xl[i.placedSide];return(0,q.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,q.jsx)(rl,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Cl(e){return e!==null}al(Cl,`isNotNull`);var wl=al(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Tl(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Tl(e){let[t,n=`center`]=e.split(`-`);return[t,n]}al(Tl,`getSideAndAlignFromPlacement`);var El=Object.defineProperty,Dl=(e,t)=>El(e,`name`,{value:t,configurable:!0}),Ol=!1;function kl(){let[e,t]=o.useState(Ol);return o.useEffect(()=>{Ol||(Ol=!0,t(!0))},[]),e}Dl(kl,`useIsHydrated`);var Al=o.useSyncExternalStore;function jl(){return()=>{}}Dl(jl,`subscribe`);function Ml(){return Al(jl,()=>!0,()=>!1)}Dl(Ml,`useIsHydratedModern`);var Nl=typeof Al==`function`?Ml:kl,Pl=Object.defineProperty,Fl=(e,t)=>Pl(e,`name`,{value:t,configurable:!0}),Il=`rovingFocusGroup.onEntryFocus`,Ll={bubbles:!1,cancelable:!0},Rl=`RovingFocusGroup`,[zl,Bl,Vl]=On(Rl),[Hl,Ul]=Cn(Rl,[Vl]),Wl={Vertical:`vertical`,Horizontal:`horizontal`},Gl={LTR:`ltr`,RTL:`rtl`},[Kl,ql]=Hl(Rl),Jl=o.forwardRef(Fl(function(e,t){return(0,q.jsx)(zl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,q.jsx)(zl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,q.jsx)(Yl,{...e,ref:t})})})},`RovingFocusGroup`)),Yl=o.forwardRef(Fl(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=o.useRef(null),m=Gt(t,p),h=Rr(a),[g,_]=tr({prop:s,defaultProp:c??null,onChange:l,caller:Rl}),[v,y]=o.useState(!1),b=Hr(u),x=Bl(n),S=o.useRef(!1),[C,w]=o.useState(0);return o.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(Il,b),()=>e.removeEventListener(Il,b)},[b]),(0,q.jsx)(Kl,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:o.useCallback(e=>_(e),[_]),onItemShiftTab:o.useCallback(()=>y(!0),[]),onFocusableItemAdd:o.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>w(e=>e-1),[]),children:(0,q.jsx)(J.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:Y(e.onMouseDown,()=>{S.current=!0}),onFocus:Y(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(Il,Ll);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);tu([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}S.current=!1}),onBlur:Y(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),Xl=`RovingFocusGroupItem`,Zl=o.forwardRef(Fl(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:s,...c}=e,l=yr(),u=a||l,d=ql(Xl,n),f=d.currentTabStopId===u,p=Bl(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=Nl();return Tn(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),o.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,q.jsx)(zl.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,q.jsx)(J.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:Y(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eu(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?nu(n,r+1):n.slice(r+1)}setTimeout(()=>tu(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})},`RovingFocusGroupItem`)),Ql={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $l(e,t){return t===Gl.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Fl($l,`getDirectionAwareKey`);function eu(e,t,n){let r=$l(e.key,n);if(!(t===Wl.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Wl.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ql[r]}Fl(eu,`getFocusIntent`);function tu(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Fl(tu,`focusFirst`);function nu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Fl(nu,`wrapArray`);var ru=Object.defineProperty,iu=o.forwardRef(((e,t)=>ru(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,q.jsx)(J.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),au=Object.defineProperty,ou=(e,t)=>au(e,`name`,{value:t,configurable:!0}),su={Horizontal:`horizontal`,Vertical:`vertical`},cu=su.Horizontal,lu=Object.values(su),uu=o.forwardRef(ou(function(e,t){let{decorative:n,orientation:r=cu,...i}=e,a=du(r)?r:cu,o=a===su.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,q.jsx)(J.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function du(e){return lu.includes(e)}ou(du,`isValidOrientation`);var fu=Object.defineProperty,pu=(e,t)=>fu(e,`name`,{value:t,configurable:!0}),mu={Automatic:`automatic`,Manual:`manual`},hu=`Tabs`,[gu,_u]=Cn(hu,[Ul]),vu=Ul(),[yu,bu]=gu(hu),xu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=mu.Automatic,...l}=e,u=Rr(s),[d,f]=tr({prop:r,onChange:i,defaultProp:a??``,caller:hu});return(0,q.jsx)(yu,{scope:n,baseId:yr(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,q.jsx)(J.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Su=`TabsList`,Cu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=bu(Su,n),o=vu(n);return(0,q.jsx)(Jl,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,q.jsx)(J.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),wu=`TabsTrigger`,Tu=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=bu(wu,n),s=vu(n),c=Ou(o.baseId,r),l=ku(o.baseId,r),u=r===o.value;return(0,q.jsx)(Zl,{asChild:!0,...s,focusable:!i,active:u,children:(0,q.jsx)(J.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Y(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:Y(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{let e=o.activationMode!==mu.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),Eu=`TabsContent`,Du=o.forwardRef(pu(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=bu(Eu,n),l=Ou(c.baseId,r),u=ku(c.baseId,r),d=r===c.value,f=o.useRef(d);return o.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,q.jsx)(lr,{present:i||d,children:({present:n})=>(0,q.jsx)(J.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Ou(e,t){return`${e}-trigger-${t}`}pu(Ou,`makeTriggerId`);function ku(e,t){return`${e}-content-${t}`}pu(ku,`makeContentId`);var Au=Object.defineProperty,ju=(e,t)=>Au(e,`name`,{value:t,configurable:!0}),Mu=`Toggle`,Nu=o.forwardRef(ju(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=tr({prop:n,onChange:i,defaultProp:r??!1,caller:Mu});return(0,q.jsx)(J.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:Y(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),Pu=Object.defineProperty,Fu=(e,t)=>Pu(e,`name`,{value:t,configurable:!0}),[Iu,Lu]=Cn(`Tooltip`,[ul]),Ru=ul(),zu=`TooltipProvider`,Bu=700,Vu=`tooltip.open`,[Hu,Uu]=Iu(zu),Wu=Fu(e=>{let{__scopeTooltip:t,delayDuration:n=Bu,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=o.useRef(!0),c=o.useRef(!1),l=o.useRef(0);return o.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,q.jsx)(Hu,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:o.useCallback(()=>{r<=0||(window.clearTimeout(l.current),s.current=!1)},[r]),onClose:o.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:c,onPointerInTransitChange:o.useCallback(e=>{c.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Gu=`Tooltip`,[Ku,qu]=Iu(Gu),Ju=Fu(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=Uu(Gu,e.__scopeTooltip),u=Ru(t),[d,f]=o.useState(null),[p,m]=o.useState(void 0),h=yr(),g=o.useRef(0),_=s??l.disableHoverableContent,v=c??l.delayDuration,y=o.useRef(!1),[b,x]=tr({prop:r,defaultProp:i??!1,onChange:Fu(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vu))):l.onClose(),a?.(e)},`onChange`),caller:Gu}),S=o.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=o.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=o.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=o.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);o.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=p??h;return(0,q.jsx)(pl,{...u,children:(0,q.jsx)(Ku,{scope:t,contentId:E,setContentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:o.useCallback(()=>{l.isOpenDelayedRef.current?T():C()},[l.isOpenDelayedRef,T,C]),onTriggerLeave:o.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),Yu=`TooltipTrigger`,Xu=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=qu(Yu,n),s=Uu(Yu,n),c=Ru(n),l=Gt(t,o.useRef(null),a.onTriggerChange),u=o.useRef(!1),d=o.useRef(!1),f=o.useCallback(()=>u.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,q.jsx)(hl,{asChild:!0,...c,children:(0,q.jsx)(J.button,{"aria-describedby":a.open?pd(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:l,onPointerMove:Y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:Y(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:Y(e.onBlur,a.onClose),onClick:Y(e.onClick,a.onClose)})})},`TooltipTrigger`)),Zu=`TooltipPortal`,[Qu,$u]=Iu(Zu,{forceMount:void 0}),ed=Fu(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=qu(Zu,t);return(0,q.jsx)(Qu,{scope:t,forceMount:n,children:(0,q.jsx)(lr,{present:n||a.open,children:(0,q.jsx)(Ti,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),td=`TooltipContent`,nd=o.forwardRef(Fu(function(e,t){let n=$u(td,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=qu(td,e.__scopeTooltip);return(0,q.jsx)(lr,{present:r||o.open,children:o.disableHoverableContent?(0,q.jsx)(ad,{side:i,...a,ref:t}):(0,q.jsx)(rd,{side:i,...a,ref:t})})},`TooltipContent`)),rd=o.forwardRef(Fu(function(e,t){let n=qu(td,e.__scopeTooltip),r=Uu(td,e.__scopeTooltip),i=o.useRef(null),a=Gt(t,i),[s,c]=o.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=o.useCallback(()=>{c(null),f(!1)},[f]),m=o.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=cd(r,sd(r,n.getBoundingClientRect())),a=ld(t.getBoundingClientRect()),o=dd([...i,...a]);c(o),f(!0)},[f]);return o.useEffect(()=>()=>p(),[p]),o.useEffect(()=>{if(l&&d){let e=Fu(e=>m(e,d),`handleTriggerLeave`),t=Fu(e=>m(e,l),`handleContentLeave`);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),o.useEffect(()=>{if(s){let e=Fu(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!ud(n,s);r?p():i&&(p(),u())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,q.jsx)(ad,{...e,ref:a})},`TooltipContentHoverable`)),id=Zt(`TooltipContent`),ad=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=qu(td,n),d=Ru(n),{onClose:f}=u,[p,m]=o.useState(null),h=Gt(t,m);fi(p),o.useEffect(()=>(document.addEventListener(Vu,f),()=>document.removeEventListener(Vu,f)),[f]),o.useEffect(()=>{if(u.trigger){let e=Fu(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:g}=u;return Tn(()=>(g(a),()=>{g(void 0)}),[a,g]),(0,q.jsx)(Xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,q.jsxs)(yl,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:h,style:{...l.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:[(0,q.jsx)(id,{children:r}),i?(0,q.jsx)(yn,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),od=o.forwardRef(Fu(function(e,t){let{__scopeTooltip:n,...r}=e,i=Ru(n);return(0,q.jsx)(Sl,{...i,...r,ref:t})},`TooltipArrow`));function sd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Fu(sd,`getExitSideFromRect`);function cd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Fu(cd,`getPaddedExitPoints`);function ld(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Fu(ld,`getPointsFromRect`);function ud(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Fu(ud,`isPointInPolygon`);function dd(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),fd(t)}Fu(dd,`getHull`);function fd(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.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)}Fu(fd,`getHullPresorted`);function pd(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Fu(pd,`concatAriaDescribedby`);function md(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=md(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function hd(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=md(e))&&(r&&(r+=` `),r+=t);return r}var gd=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,_d=hd,vd=(e,t)=>n=>{if(t?.variants==null)return _d(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=gd(t)||gd(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return _d(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},yd=vd(`group/button inline-flex shrink-0 items-center justify-center rounded-2xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,lg:`h-9 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function bd({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Yt:`button`;return(0,q.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:K(yd({variant:t,size:n,className:e})),...i})}var xd={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`},Sd=(0,o.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:i=``,altIcon:a,showAlt:s=!1,icon:c,primaryColor:l,secondaryColor:u,disableSecondaryOpacity:d=!1,...f},p)=>{let m=n===void 0?void 0:r?Number(n)*24/Number(t):n,h=m===void 0?{}:{strokeWidth:m,stroke:`currentColor`},g={ref:p,...xd,width:t,height:t,color:l||e,className:i,...h,...f},_=[...s&&a?a:c].sort(([,e],[,t])=>{let n=e.opacity!==void 0;return t.opacity===void 0?n?-1:0:1}).map(([t,n])=>{let r=n.opacity!==void 0,i=r&&!d?n.opacity:void 0,a=u?{...n.stroke===void 0?{fill:r?u:l||e}:{stroke:r?u:l||e}}:{};return(0,o.createElement)(t,{...n,...h,...a,opacity:i,key:n.key})});return(0,o.createElement)(`svg`,g,_)});Sd.displayName=`HugeiconsIcon`;var Cd=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 8V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],wd=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Td=[[`path`,{d:`M12 18.502V5.00195`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 13.002C18 13.002 13.5811 19.0019 12 19.002C10.4188 19.002 6 13.002 6 13.002`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Ed=[[`path`,{d:`M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Dd=[[`path`,{d:`M12 5.5V19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Od=[[`path`,{d:`M9 6.65032C9 6.65032 15.9383 6.10759 16.9154 7.08463C17.8924 8.06167 17.3496 15 17.3496 15M16.5 7.5L6.5 17.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],kd=[[`path`,{d:`M15.6 8.40033V12.9003C15.6 14.3915 16.8088 15.6003 18.3 15.6003C19.7912 15.6003 21 14.3915 21 12.9003V12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C14.0265 21 15.8965 20.3302 17.4009 19.2M15.6 12.0003C15.6 13.9886 13.9882 15.6003 12 15.6003C10.0118 15.6003 8.4 13.9886 8.4 12.0003C8.4 10.0121 10.0118 8.40033 12 8.40033C13.9882 8.40033 15.6 10.0121 15.6 12.0003Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]],Ad=[[`path`,{d:`M4.22222 21.9948V18.4451C4.22222 17.1737 3.88927 16.5128 3.23482 15.4078C2.4503 14.0833 2 12.5375 2 10.8866C2 5.97866 5.97969 2 10.8889 2C15.7981 2 19.7778 5.97866 19.7778 10.8866C19.7778 11.4663 19.7778 11.7562 19.802 11.9187C19.8598 12.3072 20.0411 12.6414 20.2194 12.9873L22 16.4407L20.6006 17.1402C20.195 17.3429 19.9923 17.4443 19.851 17.6314C19.7097 17.8184 19.67 18.0296 19.5904 18.4519L19.5826 18.4931C19.4004 19.4606 19.1993 20.5286 18.6329 21.2024C18.4329 21.4403 18.1853 21.6336 17.9059 21.7699C17.4447 21.9948 16.8777 21.9948 15.7437 21.9948C15.219 21.9948 14.6928 22.0069 14.1682 21.9942C12.9247 21.9639 12 20.9184 12 19.7044`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.388 10.5315C13.9617 10.5315 13.5729 10.3702 13.2784 10.1048M14.388 10.5315C14.388 11.6774 13.7241 12.7658 12.4461 12.7658C11.1681 12.7658 10.5043 13.8541 10.5043 15M14.388 10.5315C16.5373 10.5315 16.5373 7.18017 14.388 7.18017C14.1927 7.18017 14.0053 7.21403 13.8312 7.27624C13.9362 4.77819 10.3349 4.1 9.51923 6.44018M10.5043 8.29729C10.5043 7.52323 10.1133 6.8411 9.51923 6.44018M9.51923 6.44018C7.66742 5.19034 5.19883 7.4331 6.37324 9.43277C4.40226 9.72827 4.61299 12.7658 6.6205 12.7658C7.18344 12.7658 7.68111 12.4844 7.98234 12.0538`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],jd=[[`path`,{d:`M12 21.5C17.2467 21.5 21.5 17.2467 21.5 12C21.5 6.75329 17.2467 2.5 12 2.5C6.75329 2.5 2.5 6.75329 2.5 12C2.5 13.3377 2.66372 14.5604 3.1189 15.6954C3.81756 17.4374 3.68195 18.9241 2.5 20.5C3.86146 21.1644 5.86811 21.1419 7 20.0725C8.45323 20.9748 10.1636 21.5 12 21.5Z`,stroke:`currentColor`,strokeLinecap:`square`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12.2 12.0002H12M7.69961 11.9999H7.49961M16.6996 11.9999H16.4996M12.4 12.0002C12.4 12.2212 12.2209 12.4002 12 12.4002C11.7791 12.4002 11.6 12.2212 11.6 12.0002C11.6 11.7793 11.7791 11.6002 12 11.6002C12.2209 11.6002 12.4 11.7793 12.4 12.0002ZM7.89961 11.9999C7.89961 12.2208 7.72052 12.3999 7.49961 12.3999C7.2787 12.3999 7.09961 12.2208 7.09961 11.9999C7.09961 11.7789 7.2787 11.5999 7.49961 11.5999C7.72052 11.5999 7.89961 11.7789 7.89961 11.9999ZM16.8996 11.9999C16.8996 12.2208 16.7205 12.3999 16.4996 12.3999C16.2787 12.3999 16.0996 12.2208 16.0996 11.9999C16.0996 11.7789 16.2787 11.5999 16.4996 11.5999C16.7205 11.5999 16.8996 11.7789 16.8996 11.9999Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Md=[[`path`,{d:`M18.9991 19L5 5.00098`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 5L5.00092 18.999`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Nd=[[`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.9994 15L12 12.0003M12 12.0003L9 9M12 12.0003L9.00064 15M12 12.0003L15 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Pd=[[`path`,{d:`M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 16H17`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Fd=[[`path`,{d:`M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Id=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Ld=[[`path`,{d:`M13 20.8268V22H14.1734C14.5827 22 14.7874 22 14.9715 21.9238C15.1555 21.8475 15.3003 21.7028 15.5897 21.4134L20.4133 16.5894C20.6864 16.3164 20.8229 16.1799 20.8959 16.0327C21.0347 15.7525 21.0347 15.4236 20.8959 15.1434C20.8229 14.9961 20.6864 14.8596 20.4133 14.5866C20.1403 14.3136 20.0038 14.1771 19.8565 14.1041C19.5763 13.9653 19.2473 13.9653 18.9671 14.1041C18.8198 14.1771 18.6833 14.3136 18.4103 14.5866L18.4103 14.5866L13.5867 19.4106C13.2972 19.7 13.1525 19.8447 13.0762 20.0287C13 20.2128 13 20.4174 13 20.8268Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 11C19 11 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.23467 21.8915 6.8857 21.99 10 21.9991M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Rd=[[`path`,{d:`M14 21L18 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 21L10 3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5 8H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M3 16H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],zd=[[`path`,{d:`M4 3H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.5 3V5.03039C5.5 6.27227 6.07682 7.4437 7.06116 8.20089L12 12L16.9388 8.20089C17.9232 7.44371 18.5 6.27227 18.5 5.03039V3`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.5 21V18.9696C5.5 17.7277 6.07682 16.5563 7.06116 15.7991L12 12L16.9388 15.7991C17.9232 16.5563 18.5 17.7277 18.5 18.9696V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4 21H20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],Bd=[[`path`,{d:`M7 2.5C5.59269 2.66536 4.62427 3.01488 3.89124 3.75363C2.5 5.15575 2.5 7.41242 2.5 11.9258C2.5 16.4391 2.5 18.6958 3.89124 20.0979C5.28249 21.5 7.52166 21.5 12 21.5C16.4783 21.5 18.7175 21.5 20.1088 20.0979C21.5 18.6958 21.5 16.4391 21.5 11.9258C21.5 7.41242 21.5 5.15575 20.1088 3.75363C19.3757 3.01488 18.4073 2.66536 17 2.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 8C9.99153 8.5057 11.2998 10.5 12 10.5M14.5 8C14.0085 8.5057 12.7002 10.5 12 10.5M12 10.5V2.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21.5 13.5H16.5743C15.7322 13.5 15.0706 14.2036 14.6995 14.9472C14.2963 15.7551 13.4889 16.5 12 16.5C10.5111 16.5 9.70373 15.7551 9.30054 14.9472C8.92942 14.2036 8.26777 13.5 7.42566 13.5H2.5`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Vd=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 16V12`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Hd=[[`path`,{d:`M12 3V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 18V21`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 12L18 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M6 12L3 12`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M18.3635 5.63672L16.2422 7.75804`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M7.75804 16.2422L5.63672 18.3635`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`5`}],[`path`,{d:`M18.3635 18.3635L16.2422 16.2422`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`6`}],[`path`,{d:`M7.75804 7.75804L5.63672 5.63672`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`7`}]],Ud=[[`path`,{d:`M21.9598 12.9919C21.6856 17.2342 18.3536 20.6134 14.1706 20.8915C13.4574 20.9389 12.7285 21.001 12 21.001C10.4054 21.001 8.95127 20.8637 7.44544 20.2902C7.44544 20.2902 5.56108 21.7589 3.69962 21.4587C3.31009 21.3959 3.11532 21.3644 3.00091 21.1343C2.8865 20.9042 3.00788 20.6756 3.25063 20.2185C3.65964 19.4483 3.92248 18.6737 3.80076 17.8306C3.73703 17.3892 3.50433 16.9974 3.27644 16.6136L3.26529 16.5948C2.62637 15.5188 2.12462 14.2975 2.04024 12.9919C1.98659 12.1617 1.98659 11.3019 2.04024 10.4717C2.31441 6.22935 5.64639 2.85011 9.8294 2.57205C11.2536 2.47738 12.7435 2.47719 14.1706 2.57205C18.3536 2.85011 21.6856 6.22935 21.9598 10.4717C22.0134 11.3019 22.0134 12.1617 21.9598 12.9919Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.75 14.501H15.25M8.75 9.50098H12.25`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],Wd=[[`path`,{d:`M21.5 14.0784C20.3003 14.7189 18.9301 15.0821 17.4751 15.0821C12.7491 15.0821 8.91792 11.2509 8.91792 6.52485C8.91792 5.06986 9.28105 3.69968 9.92163 2.5C5.66765 3.49698 2.5 7.31513 2.5 11.8731C2.5 17.1899 6.8101 21.5 12.1269 21.5C16.6849 21.5 20.503 18.3324 21.5 14.0784Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Gd=[[`path`,{d:`M15.5 18C15.5 19.933 13.933 21.5 12 21.5C10.067 21.5 8.5 19.933 8.5 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2 2L22 22`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M21 16.2311C21 15.762 20.8136 15.3121 20.4819 14.9803L19.8787 14.3771C19.3161 13.8145 19 13.0514 19 12.2558V9.5C19 5.634 15.866 2.5 12 2.5C10.4497 2.5 9.01706 3.00399 7.85707 3.85707M4.76887 18C3.79195 18 3 17.208 3 16.2311C3 15.762 3.18636 15.3121 3.51809 14.9803L4.12132 14.3771C4.68393 13.8145 5 13.0514 5 12.2558V9.5C5 8.20839 5.34981 6.99849 5.95987 5.95987L18 18H4.76887Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Kd=[[`path`,{d:`M21.0477 3.05293C18.8697 0.707363 2.48648 6.4532 2.50001 8.551C2.51535 10.9299 8.89809 11.6617 10.6672 12.1581C11.7311 12.4565 12.016 12.7625 12.2613 13.8781C13.3723 18.9305 13.9301 21.4435 15.2014 21.4996C17.2278 21.5892 23.1733 5.342 21.0477 3.05293Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M11.4999 12.5L14.9999 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],qd=[[`path`,{d:`M2 12C2 8.31087 2 6.4663 2.81382 5.15877C3.1149 4.67502 3.48891 4.25427 3.91891 3.91554C5.08116 3 6.72077 3 10 3H14C17.2792 3 18.9188 3 20.0811 3.91554C20.5111 4.25427 20.8851 4.67502 21.1862 5.15877C22 6.4663 22 8.31087 22 12C22 15.6891 22 17.5337 21.1862 18.8412C20.8851 19.325 20.5111 19.7457 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7457 3.1149 19.325 2.81382 18.8412C2 17.5337 2 15.6891 2 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9.5 3L9.5 21`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5 7H6M5 10H6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Jd=[[`path`,{d:`M2 12C2 8.3109 2 6.46633 2.81382 5.1588C3.1149 4.67505 3.48891 4.2543 3.91891 3.91557C5.08116 3.00003 6.72077 3.00003 10 3.00003H14C17.2792 3.00003 18.9188 3.00003 20.0811 3.91557C20.5111 4.2543 20.8851 4.67505 21.1862 5.1588C22 6.46633 22 8.3109 22 12C22 15.6892 22 17.5337 21.1862 18.8413C20.8851 19.325 20.5111 19.7458 20.0811 20.0845C18.9188 21 17.2792 21 14 21H10C6.72077 21 5.08116 21 3.91891 20.0845C3.48891 19.7458 3.1149 19.325 2.81382 18.8413C2 17.5337 2 15.6892 2 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14.5 3.00003L14.5 21`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M18 7.00006H19M18 10.0001H19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Yd=[[`path`,{d:`M12 14.5V17.5M13 14.5C13 15.0523 12.5523 15.5 12 15.5C11.4477 15.5 11 15.0523 11 14.5C11 13.9477 11.4477 13.5 12 13.5C12.5523 13.5 13 13.9477 13 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16.5 9V6.5C16.5 4.01472 14.4853 2 12 2C9.51471 2 7.49999 4.01472 7.49999 6.5V9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M4.2678 18.8447C4.49268 20.515 5.87612 21.8235 7.55965 21.9009C8.97627 21.966 10.4153 22 12 22C13.5847 22 15.0237 21.966 16.4403 21.9009C18.1239 21.8235 19.5073 20.515 19.7322 18.8447C19.8789 17.7547 20 16.6376 20 15.5C20 14.3624 19.8789 13.2453 19.7322 12.1553C19.5073 10.485 18.1239 9.17649 16.4403 9.09909C15.0237 9.03397 13.5847 9 12 9C10.4153 9 8.97627 9.03397 7.55965 9.09909C5.87612 9.17649 4.49268 10.485 4.2678 12.1553C4.12104 13.2453 3.99999 14.3624 3.99999 15.5C3.99999 16.6376 4.12104 17.7547 4.2678 18.8447Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Xd=[[`path`,{d:`M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M14 2.20004C13.3538 2.06886 12.6849 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 11.3151 21.9311 10.6462 21.8 10`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.0303 11.9625L16.5832 7.4096M19.7404 4.34462L19.1872 2.35748C19.0853 2.03011 18.6914 1.89965 18.4259 2.11662C16.9898 3.29018 15.4254 4.87091 16.703 7.36419C19.2771 8.56455 20.7466 6.94584 21.8733 5.5853C22.0975 5.3146 21.9623 4.90767 21.6247 4.81005L19.7404 4.34462Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],Zd=[[`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],Qd=[[`path`,{d:`M2.25 12C2.25 17.5228 6.72715 22 12.25 22C17.7728 22 22.25 17.5228 22.25 12C22.25 6.47715 17.7728 2 12.25 2C6.72715 2 2.25 6.47715 2.25 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M5.25 5L19.25 19`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],$d=[[`path`,{d:`M18.4995 20.5C18.2663 17.5685 15.8417 15.2477 12.808 15.0521L11.9995 15C11.7107 15.0076 11.4416 15.0178 11.1877 15.0298C8.18075 15.1723 5.7304 17.5974 5.49951 20.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15.2495 9.25C15.2495 11.0449 13.7944 12.5 11.9995 12.5C10.2046 12.5 8.74952 11.0449 8.74952 9.25C8.74952 7.45507 10.2046 6 11.9995 6C13.7944 6 15.2495 7.45507 15.2495 9.25Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M5.50249 8.5C5.17908 7.99485 4.99158 7.39432 4.99158 6.75C4.99158 4.95507 6.44665 3.5 8.24157 3.5C8.68752 3.5 9.1125 3.58982 9.49939 3.75235`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M18.4963 8.5C18.8197 7.99485 19.0072 7.39432 19.0072 6.75C19.0072 4.95507 17.5521 3.5 15.7572 3.5C15.3113 3.5 14.8863 3.58982 14.4994 3.75235`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M22.0007 17.9996C21.8208 15.7374 19.9995 13.5 17.9995 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M1.99927 17.9996C2.17923 15.7374 4.00049 13.5 6.00049 13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],ef=[[`path`,{d:`M3.74416 16.1113L8.66248 12.5982C9.18807 12.2228 9.5 11.6167 9.5 10.9708V7.5C9.5 4.73858 11.7386 2.5 14.5 2.5H18L14.9811 6.81268C14.7029 7.2102 14.7501 7.75013 15.0932 8.09325L15.9068 8.90675C16.2499 9.24987 16.7898 9.29714 17.1873 9.01888L21.5 6V9.5C21.5 12.2614 19.2614 14.5 16.5 14.5H13.0292C12.3833 14.5 11.7772 14.8119 11.4018 15.3375L7.88869 20.2558C7.33099 21.0366 6.43055 21.5 5.47105 21.5C3.83018 21.5 2.5 20.1698 2.5 18.529C2.5 17.5695 2.96338 16.669 3.74416 16.1113Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]];function tf({...e}){return(0,q.jsx)(ro,{"data-slot":`sheet`,...e})}function nf({...e}){return(0,q.jsx)(lo,{"data-slot":`sheet-portal`,...e})}function rf({className:e,...t}){return(0,q.jsx)(fo,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function af({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,q.jsxs)(nf,{children:[(0,q.jsx)(rf,{}),(0,q.jsxs)(go,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-xl transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,q.jsx)(Co,{"data-slot":`sheet-close`,asChild:!0,children:(0,q.jsxs)(bd,{variant:`ghost`,className:`absolute top-4 right-4 bg-secondary`,size:`icon-sm`,children:[(0,q.jsx)(Sd,{icon:Md,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function of({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-1.5 p-6`,e),...t})}function sf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sheet-footer`,className:K(`mt-auto flex flex-col gap-2 p-6`,e),...t})}function cf({className:e,...t}){return(0,q.jsx)(bo,{"data-slot":`sheet-title`,className:K(`text-base font-medium text-foreground`,e),...t})}function lf({className:e,...t}){return(0,q.jsx)(xo,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}var uf=768;function df(){let[e,t]=o.useState(void 0);return o.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<uf)};return e.addEventListener(`change`,n),t(window.innerWidth<uf),()=>e.removeEventListener(`change`,n)},[]),!!e}function ff({className:e,type:t,...n}){return(0,q.jsx)(`input`,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-2xl border border-transparent bg-input/50 px-2.5 py-1 text-base transition-[color,box-shadow] duration-200 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function pf({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,q.jsx)(uu,{"data-slot":`separator`,decorative:n,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...r})}function mf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`skeleton`,className:K(`animate-pulse rounded-2xl bg-muted`,e),...t})}function hf({delayDuration:e=0,...t}){return(0,q.jsx)(Wu,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function gf({...e}){return(0,q.jsx)(Ju,{"data-slot":`tooltip`,...e})}function _f({...e}){return(0,q.jsx)(Xu,{"data-slot":`tooltip-trigger`,...e})}function vf({className:e,sideOffset:t=0,children:n,...r}){return(0,q.jsx)(ed,{children:(0,q.jsxs)(nd,{"data-slot":`tooltip-content`,sideOffset:t,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-xl bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[n,(0,q.jsx)(od,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=left]:translate-x-[-1.5px] data-[side=right]:translate-x-[1.5px]`})]})})}var yf=`sidebar_state`,bf=604800,xf=`16rem`,Sf=`18rem`,Cf=`3rem`,wf=`b`,Tf=o.createContext(null);function Ef(){let e=o.useContext(Tf);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Df({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...s}){let c=df(),[l,u]=o.useState(!1),[d,f]=o.useState(e),p=t??d,m=o.useCallback(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`${yf}=${t}; path=/; max-age=${bf}`},[n,p]),h=o.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);o.useEffect(()=>{let e=e=>{e.key===wf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=o.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,q.jsx)(Tf.Provider,{value:_,children:(0,q.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":xf,"--sidebar-width-icon":Cf,...i},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...s,children:a})})}function Of({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Ef();return n===`none`?(0,q.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,q.jsx)(tf,{open:l,onOpenChange:u,...o,children:(0,q.jsxs)(af,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Sf},side:e,children:[(0,q.jsxs)(of,{className:`sr-only`,children:[(0,q.jsx)(cf,{children:`Sidebar`}),(0,q.jsx)(lf,{children:`Displays the mobile sidebar.`})]}),(0,q.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,q.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,q.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,q.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,q.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function kf({className:e,onClick:t,...n}){let{toggleSidebar:r}=Ef();return(0,q.jsxs)(bd,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:K(e),onClick:e=>{t?.(e),r()},...n,children:[(0,q.jsx)(Sd,{icon:qd,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Af({className:e,...t}){return(0,q.jsx)(`main`,{"data-slot":`sidebar-inset`,className:K(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function jf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]`,e),...t})}function Mf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function Nf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Pf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Ff({className:e,asChild:t=!1,...n}){let r=t?Yt:`div`;return(0,q.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:K(`flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-3 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n})}function If({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:K(`w-full text-sm`,e),...t})}function Lf({className:e,...t}){return(0,q.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0.5`,e),...t})}function Rf({className:e,...t}){return(0,q.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var zf=vd(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm whitespace-nowrap ring-sidebar-ring outline-hidden transition-[width,height,padding] duration-200 group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-3 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 has-[>svg:first-child]:pl-2.5 has-[>svg:last-child]:pr-2.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 px-3 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Bf({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?Yt:`button`,{isMobile:c,state:l}=Ef(),u=(0,q.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:K(zf({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:u}),(0,q.jsx)(vf,{side:`right`,align:`center`,hidden:l!==`collapsed`||c,...i})]})):u}function Vf({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:K(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground`,e),...t})}function Hf({className:e,showIcon:t=!1,...n}){let[r]=o.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return(0,q.jsxs)(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:K(`flex h-8 items-center gap-2 rounded-xl px-2`,e),...n,children:[t&&(0,q.jsx)(mf,{className:`size-4 rounded-xl`,"data-sidebar":`menu-skeleton-icon`}),(0,q.jsx)(mf,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":r}})]})}var Uf=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Wf=function(e){return`/`+e},Gf={},Kf=function(e){return e.pathname.endsWith(`.css`)},qf=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Jf=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Wf(t,n);let r=s(t),i=Kf(r);return qf(Gf,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Uf,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Yf=globalThis;Yf.window??=globalThis,Yf.Path2D??=class{},await Jf(()=>import(`./characters-BsW4RWhl.js`),[]);var Xf=Yf.window.CotalArt;function Zf(e,t){return Xf.body(e,t)}function Qf(e){return Xf.mark(e)}function $f(e){return Xf.character({vendor:e,cx:70,cy:66,w:92,look:`right`,mood:`happy`,arms:[{from:[84,50],via:[106,40],to:[112,12],hand:`open`,deg:`auto`}],legs:[{from:[40,94],to:[36,116],dir:-1},{from:[62,94],to:[66,116],dir:1}]})}function ep(){let e=(0,o.useRef)(null);return{onOpenAutoFocus:()=>{e.current=globalThis.document.activeElement},onCloseAutoFocus:t=>{t.preventDefault(),e.current?.focus(),e.current=null}}}function X({icon:e,size:t=18,className:n,"data-icon":r}){return(0,q.jsx)(Sd,{icon:e,size:t,strokeWidth:1.5,className:n,"data-icon":r,"aria-hidden":`true`})}var tp=vd(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-2xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function np({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Yt:`span`;return(0,q.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:K(tp({variant:t}),e),...r})}function rp({className:e,size:t=`default`,...n}){return(0,q.jsx)(Fo,{"data-slot":`avatar`,"data-size":t,className:K(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function ip({className:e,...t}){return(0,q.jsx)(Lo,{"data-slot":`avatar-fallback`,className:K(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var ap=vd(`group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full`,{variants:{variant:{default:`*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80`,secondary:`*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]`,muted:`*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]`,tinted:`*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]`,outline:`*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30`,ghost:`border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50`,destructive:`*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30`}},defaultVariants:{variant:`default`}});function op({variant:e=`default`,align:t=`start`,className:n,...r}){return(0,q.jsx)(`div`,{"data-slot":`bubble`,"data-variant":e,"data-align":t,className:K(ap({variant:e}),n),...r})}function sp({asChild:e=!1,className:t,...n}){let r=e?Yt:`div`;return(0,q.jsx)(r,{"data-slot":`bubble-content`,className:K(`w-fit max-w-full min-w-0 overflow-hidden rounded-3xl border border-transparent px-3 py-2.5 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/30`,t),...n})}function cp({className:e,...t}){return(0,q.jsx)(iu,{"data-slot":`label`,className:K(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var lp=vd(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function up({className:e,orientation:t=`vertical`,...n}){return(0,q.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(lp({orientation:t}),e),...n})}function dp({className:e,...t}){return(0,q.jsx)(cp,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:bg-input/30 has-[>[data-slot=field]]:rounded-2xl has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-4`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function fp({className:e,...t}){return(0,q.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function pp({className:e,children:t,errors:n,...r}){let i=(0,o.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,q.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,q.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,q.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:K(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function mp({className:e,...t}){return(0,q.jsx)(`textarea`,{"data-slot":`textarea`,className:K(`flex field-sizing-content min-h-16 w-full resize-none rounded-2xl border border-transparent bg-input/50 px-2.5 py-2 text-base transition-[color,box-shadow] duration-200 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function hp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:K(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-2xl border border-transparent bg-input/50 transition-[color,box-shadow] duration-200 outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var gp=vd(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-2xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function _p({className:e,align:t=`inline-start`,...n}){return(0,q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:K(gp({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var vp=vd(`flex items-center gap-2 rounded-2xl text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-xl p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function yp({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,q.jsx)(bd,{type:t,"data-size":r,variant:n,className:K(vp({size:r}),e),...i})}function bp({className:e,...t}){return(0,q.jsx)(`span`,{className:K(`flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4`,e),...t})}function xp({className:e,...t}){return(0,q.jsx)(mp,{"data-slot":`input-group-control`,className:K(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}function Sp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-group`,className:K(`flex min-w-0 flex-col gap-2`,e),...t})}function Cp({className:e,align:t=`start`,...n}){return(0,q.jsx)(`div`,{"data-slot":`message`,"data-align":t,className:K(`group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse`,e),...n})}function wp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-avatar`,className:K(`flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8`,e),...t})}function Tp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-content`,className:K(`flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end`,e),...t})}function Ep({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-header`,className:K(`flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0`,e),...t})}function Dp({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`message-footer`,className:K(`flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end`,e),...t})}function Op({defaultTagName:e,props:t,render:n,state:r={},stateAttributesMapping:i}){let a=kp(Ap(r,i),t);if(!n)return o.createElement(e,a);if(typeof n==`function`)return n(a,r);if(!o.isValidElement(n))return null;let s=n.props,c={...kp(a,s),ref:Np(a.ref,s.ref)};return o.cloneElement(n,c)}function kp(...e){let t={};for(let n of e){if(!n)continue;let e=n;for(let n of Object.keys(e)){let r=e[n];if(r===void 0)continue;let i=t[n];t[n]=n===`className`?[i,r].filter(Boolean).join(` `):n===`style`?{...i,...r}:n===`ref`?Np(i,r):Mp(n)&&typeof i==`function`&&typeof r==`function`?jp(r,i):r}}return t}function Ap(e,t){let n={};for(let r of Object.keys(e)){let i=e[r],a=t?.[r]?.(i);if(a){Object.assign(n,a);continue}if(r===`slot`){n[`data-slot`]=i;continue}let o=`data-${String(r).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;typeof i==`boolean`?n[o]=i?``:void 0:i!=null&&(n[o]=String(i))}return n}function jp(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function Mp(e){return/^on[A-Z]/.test(e)}function Np(...e){let t=e.filter(Boolean);if(t.length!==0)return e=>{for(let n of t)typeof n==`function`?n(e):n&&(n.current=e)}}var Pp=8,Fp=64,Ip=0,Lp=.5,Rp=180,zp=new Set([`ArrowDown`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`,` `]),Bp={start:!1,end:!1},Vp={currentAnchorId:null,visibleMessageIds:[]};function Hp({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return Bp;let i=em({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:i-r.scrollTop-r.clientHeight>t}}function Up({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:i,visibleMessageIds:a}){if(!e||!i)return Vp;let o=i.getBoundingClientRect(),s=o.top+t+n,c=typeof IntersectionObserver>`u`,l=[],u=null;for(let t of Wp(e,r)){let e=t.dataset.messageId;if(!e)continue;let n=t.dataset.scrollAnchor===`true`,r=n||c?t.getBoundingClientRect():null;(c&&r?r.bottom>s&&r.top<o.bottom:a.has(e))&&l.push(e),n&&r&&r.top<=s+Lp&&(u=e)}return l.length===0&&u===null?Vp:{currentAnchorId:u,visibleMessageIds:l}}function Wp(e,t){return Array.from(e.children).filter(e=>e instanceof HTMLElement&&e!==t)}function Gp(e,t){for(let n=t;n<e.length;n++){let t=e[n];if(t?.dataset.scrollAnchor===`true`)return t}return null}function Kp(e,t){for(let n of e)if(n.dataset.scrollAnchor===`true`&&!t.has(n))return n;return null}function qp(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor===`true`&&(n+=1,n>1))return!0;return!1}function Jp(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor===`true`)return n}return null}function Yp({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let n of Wp(e,t)){if(!n.dataset.messageId)continue;let e=n.getBoundingClientRect();if(e.bottom>r.top&&e.top<r.bottom)return n}return null}function Xp({align:e,element:t,scrollMargin:n,spacer:r,viewport:i}){let a=Zp(t,i),o=t.getBoundingClientRect().height,s=rm(r);if(e===`center`){let e=Math.max(0,i.clientHeight-s.start-s.end);return a-s.start-(e-o)/2-n}if(e===`end`)return a-i.clientHeight+o+s.end+n;if(e===`nearest`){let e=a+o,t=i.scrollTop+s.start,r=i.scrollTop+i.clientHeight-s.end;return a>=t&&e<=r?i.scrollTop:a<t?a-s.start-n:e-i.clientHeight+s.end+n}return a-s.start-n}function Zp(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function Qp(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function $p({content:e,scrollTop:t,spacer:n,viewport:r}){let i=em({content:e,spacer:n,viewport:r});return t+r.clientHeight-i}function em({content:e,spacer:t,viewport:n}){let r=Wp(e,t),i=nm(e),a=n.getBoundingClientRect(),o=n.scrollTop,s=i.start+i.end;for(let e of r){let t=e.getBoundingClientRect();s=Math.max(s,t.bottom-a.top+o+i.end)}return s}function tm(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function nm(e){let t=window.getComputedStyle(e);return{end:am(t.paddingBlockEnd||t.paddingBottom),start:am(t.paddingBlockStart||t.paddingTop)}}function rm(e){let t=e?.parentElement;return t?nm(t):{end:0,start:0}}function im(e){if(!e)return 0;let t=window.getComputedStyle(e);return am(t.rowGap===`normal`?t.gap:t.rowGap)}function am(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function om(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:e=>{t(n,e)||(n=e,r.forEach(e=>e()))},subscribe:(e,t,n)=>{let i=r.size===0;return r.add(e),i&&t?.(),()=>{r.delete(e),r.size===0&&n?.()}}}}function sm(e,t){return om(e,t)}function cm(){return om(Vp,um)}function lm(e,t){return e.start===t.start&&e.end===t.end}function um(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((e,n)=>e===t.visibleMessageIds[n])}function dm({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:r,scrollPreviousItemPeek:i}){let a=o.useRef(e),s=o.useRef(!1),c=o.useRef(null),l=o.useRef(!1),u=o.useRef(n),d=o.useRef(0),f=o.useRef(null),p=o.useRef(0),m=o.useRef(e?`following-bottom`:`free-scrolling`),h=o.useRef(new Map),g=o.useRef(null),_=o.useRef(null),v=o.useRef(null),y=o.useRef(i),b=o.useRef(!0),x=o.useRef(null),S=o.useRef(r),C=o.useRef(null),w=o.useRef(0),T=o.useRef(0),E=o.useRef(null),D=o.useRef(null),O=o.useRef(null),k=o.useRef(null),A=o.useRef(null),j=o.useRef(null),M=o.useRef(null),N=o.useRef(null),P=o.useRef(null),F=o.useRef(new Set),I=o.useRef(new WeakSet);return O.current===null&&(O.current=sm(t===`end`||t===`last-anchor`,(e,t)=>e===t)),k.current===null&&(k.current=sm(Bp,lm)),P.current===null&&(P.current=cm()),a.current=e,u.current=n,S.current=r,y.current=i,{autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:A,streamingTurnRef:v,contentRef:c,defaultScrollPositionAppliedRef:l,firstItemRef:f,itemCountRef:d,lastScrollTopRef:p,messageElementsRef:h,modeRef:m,pendingScrollFrameRef:C,pendingScrollToMessageRef:g,prependRestoreRef:_,preserveScrollOnPrependRef:b,pendingDefaultScrollStore:O.current,rootRef:x,scrollEdgeThresholdRef:u,scrollMarginRef:S,scrollPreviousItemPeekRef:y,spacerGapRef:w,spacerHeightRef:T,spacerRef:E,stateFrameRef:D,stateStore:k.current,viewportRef:j,visibilityFrameRef:M,visibilityObserverRef:N,visibilityStore:P.current,visibleMessageIdsRef:F,handledScrollAnchorsRef:I}}function fm(e){e.pendingDefaultScrollStore.setSnapshot(!1)}function pm(e){e.defaultScrollPositionAppliedRef.current=!0,fm(e)}function mm({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:i,autoScrollRef:a,autoscrollingRef:s,autoscrollingTimeoutRef:c,contentRef:l,itemCountRef:u,messageElementsRef:d,modeRef:f,pendingScrollToMessageRef:p,prependRestoreRef:m,scrollMarginRef:h,scrollPreviousItemPeekRef:g,spacerGapRef:_,spacerHeightRef:v,spacerRef:y,viewportRef:b}=e,x=o.useCallback(e=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null),s.current!==e&&(s.current=e,t()),e&&(c.current=window.setTimeout(()=>{c.current=null,s.current=!1,t()},Rp))},[t]),S=o.useCallback(e=>{let t=y.current;if(!t)return;let n=Math.max(0,Math.ceil(e));v.current!==n&&(v.current=n,t.hidden=n===0,t.style.height=`${n}px`,t.style.marginTop=n>0?`${-_.current}px`:``)},[]),C=o.useCallback((e,{behavior:r=`auto`,autoscrolling:i=!1}={})=>{let a=b.current;if(!a)return;let o=Math.max(0,e);Math.abs(a.scrollTop-o)<=Lp?(a.scrollTop=o,t()):(i&&x(!0),a.scrollTo({top:o,behavior:r}),n())},[t,n,x]),w=o.useCallback(({behavior:e=`auto`}={})=>b.current?(S(0),i.current=null,f.current=`free-scrolling`,C(0,{behavior:e}),r(),!0):!1,[r,C,S]),T=o.useCallback(({behavior:e=`auto`}={})=>{let t=b.current;return t?(S(0),i.current=null,f.current=a.current?`following-bottom`:`free-scrolling`,C(tm(t),{autoscrolling:!0,behavior:e}),r(),!0):!1},[r,C,S]),E=o.useCallback((e,{align:t=`start`,behavior:n=`auto`,scrollMargin:a=h.current}={},{keepPreviousPeek:o=!1}={})=>{let s=l.current,c=b.current;if(!s||!c||!s.contains(e))return!1;let u=Xp({align:t,element:e,scrollMargin:o?a+g.current:a,spacer:y.current,viewport:c}),d=$p({content:s,scrollTop:u,spacer:y.current,viewport:c});return S(d),m.current={element:e,viewportTop:Qp(e,c)},f.current=o?`anchored-to-message`:`settling-jump`,i.current=o?e:null,C(u,{behavior:n}),r(),!0},[r,C,S]),D=o.useCallback(()=>{let e=i.current;return!e||!e.isConnected||f.current!==`anchored-to-message`?!1:E(e,{align:`start`},{keepPreviousPeek:!0})},[E]),O=o.useCallback((t,n)=>{let r=d.current.get(t);return r?(pm(e),E(r,n)?(p.current=null,!0):(p.current={messageId:t,options:n},!0)):u.current===0&&(p.current={messageId:t,options:n},pm(e),!0)},[E]);return{flushPendingScrollToMessage:o.useCallback(()=>{let t=p.current;if(!t)return!1;let n=d.current.get(t.messageId);return!n||!E(n,t.options)?!1:(p.current=null,pm(e),!0)},[E]),reanchorToAnchoredMessage:D,scrollToElement:E,scrollToEnd:T,scrollToMessage:O,scrollToStart:w}}function hm(e,t){return o.useCallback(n=>{e.current=n,n&&t()},[e,t])}function gm({autoScroll:e=!1,defaultScrollPosition:t=`end`,scrollEdgeThreshold:n=Pp,scrollPreviousItemPeek:r=Fp,scrollMargin:i=Ip}){let a=dm({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:i,scrollPreviousItemPeek:r}),{streamingTurnRef:s,autoScrollRef:c,autoscrollingRef:l,autoscrollingTimeoutRef:u,contentRef:d,defaultScrollPositionAppliedRef:f,firstItemRef:p,itemCountRef:m,lastScrollTopRef:h,messageElementsRef:g,modeRef:_,pendingScrollFrameRef:v,pendingScrollToMessageRef:y,prependRestoreRef:b,preserveScrollOnPrependRef:x,pendingDefaultScrollStore:S,rootRef:C,scrollEdgeThresholdRef:w,scrollMarginRef:T,scrollPreviousItemPeekRef:E,spacerGapRef:D,spacerHeightRef:O,spacerRef:k,stateFrameRef:A,stateStore:j,viewportRef:M,visibilityFrameRef:N,visibilityObserverRef:P,visibilityStore:F,visibleMessageIdsRef:I,handledScrollAnchorsRef:ee}=a,L=o.useRef(t);L.current!==t&&(L.current=t,f.current=!1);let te=o.useCallback(e=>{let t=C.current,n=M.current,r=[e.start&&`start`,e.end&&`end`].filter(Boolean).join(` `),i=l.current;for(let e of[t,n])e&&(r?e.setAttribute(`data-scrollable`,r):e.removeAttribute(`data-scrollable`),e.toggleAttribute(`data-autoscrolling`,i))},[]),ne=o.useCallback(e=>{let t=M.current?.scrollTop??0,n=t<h.current-Lp;h.current=t,c.current&&!e.end&&_.current!==`settling-jump`&&_.current!==`anchored-to-message`?_.current=`following-bottom`:_.current===`following-bottom`&&e.end&&n&&!l.current&&(_.current=`free-scrolling`)},[]),re=o.useCallback(()=>{let e=Hp({content:d.current,scrollEdgeThreshold:w.current,spacer:k.current,viewport:M.current});ne(e);let t=_.current===`following-bottom`?{...e,end:!1}:e;te(t),j.setSnapshot(t)},[ne,j,te]),ie=o.useCallback(()=>{A.current===null&&(A.current=window.requestAnimationFrame(()=>{A.current=null,re()}))},[re]),R=o.useCallback(()=>{F.hasListeners()&&N.current===null&&(N.current=window.requestAnimationFrame(()=>{N.current=null,F.hasListeners()&&F.setSnapshot(Up({content:d.current,scrollMargin:T.current,scrollPreviousItemPeek:E.current,spacer:k.current,viewport:M.current,visibleMessageIds:I.current}))}))},[F]),{flushPendingScrollToMessage:z,reanchorToAnchoredMessage:ae,scrollToElement:B,scrollToEnd:V,scrollToMessage:H,scrollToStart:oe}=mm({refs:a,commitScrollState:re,scheduleStateCommit:ie,scheduleVisibilitySync:R}),U=o.useCallback(()=>{let e=b.current,t=M.current;if(!e||!t||!e.element.isConnected)return!1;let n=Qp(e.element,t)-e.viewportTop;return Math.abs(n)<=Lp?!1:(t.scrollTop+=n,e.viewportTop=Qp(e.element,t),ie(),R(),!0)},[ie,R]),se=o.useCallback(()=>{let e=d.current,t=M.current;if(!e||!t){b.current=null;return}let n=Yp({content:e,spacer:k.current,viewport:t});b.current=n?{element:n,viewportTop:Qp(n,t)}:null},[]),ce=o.useCallback(()=>{v.current===null&&(v.current=window.requestAnimationFrame(()=>{v.current=null,z()&&se()}))},[se,z]),le=o.useCallback(()=>{if(!t||f.current||m.current===0)return!1;let e=!1;if(t===`last-anchor`){let t=d.current,n=M.current,r=t&&n?Jp(Wp(t,k.current)):null;if(!t||!n||!r)e=V({behavior:`auto`});else{let i=Zp(r,n);e=em({content:t,spacer:k.current,viewport:n})-i<=n.clientHeight?V({behavior:`auto`}):B(r,{align:`start`},{keepPreviousPeek:!0})}}else e=t===`end`?V({behavior:`auto`}):oe({behavior:`auto`});return e?(pm(a),!0):!1},[t,B,V,oe]),ue=o.useCallback(()=>{let e=d.current;if(!e)return;let t=Wp(e,k.current),n=m.current,r=p.current;m.current=t.length,p.current=t[0]??null,(()=>{if(z())return;if(n===0){if(le()||t.length>0&&c.current&&V({behavior:`auto`}))return;re(),R();return}let e=r?t.indexOf(r):-1;if(x.current&&e>0)U();else{if(t.length>n){let e=Gp(t,n);if(e){if(c.current&&_.current===`following-bottom`&&qp(t,n)){V({behavior:`auto`});return}B(e,{align:`start`},{keepPreviousPeek:!0}),ee.current.add(e);return}}if(t.length===n){let e=Kp(t,ee.current);if(e){B(e,{align:`start`},{keepPreviousPeek:!0}),ee.current.add(e);return}}_.current===`following-bottom`&&c.current?V({behavior:`auto`}):(re(),R())}})(),se()},[le,se,re,z,U,R,B,V]),de=o.useCallback(()=>{if(_.current===`following-bottom`&&c.current){V({behavior:`auto`});return}let e=O.current;ae()?c.current&&e>0&&O.current===0&&V({behavior:`auto`}):(ie(),R())},[ae,ie,R,V]),fe=o.useCallback(()=>{let e=M.current;if(e&&F.hasListeners()){if(typeof IntersectionObserver>`u`){R();return}P.current||=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.messageId;e&&(t.isIntersecting?I.current.add(e):I.current.delete(e))}R()},{root:e,rootMargin:`${-(T.current+E.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]}),g.current.forEach(e=>{P.current?.observe(e)}),R()}},[R,F]),pe=o.useCallback(()=>{N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),P.current?.disconnect(),P.current=null,I.current.clear(),F.setSnapshot(Vp)},[F]),me=o.useCallback((e,t,n)=>{t?(g.current.set(e,t),P.current?.observe(t),R(),y.current?.messageId===e&&ce()):n&&g.current.get(e)===n&&(g.current.delete(e),I.current.delete(e),P.current?.unobserve(n),R())},[ce,R]),he=o.useCallback(()=>{(_.current===`following-bottom`||_.current===`anchored-to-message`||_.current===`settling-jump`)&&(s.current=null,_.current=`free-scrolling`)},[]),ge=o.useCallback(()=>te(j.getSnapshot()),[j,te]),_e=hm(C,ge),ve=hm(M,ge),ye=o.useCallback(e=>{d.current=e},[]),be=o.useCallback(e=>{k.current=e,D.current=im(e?.parentElement??null)},[]),xe=o.useCallback(()=>{re(),R(),se()},[se,re,R]),Se=o.useMemo(()=>({handleContentChange:ue,handleResize:de,observeVisibility:fe,pendingDefaultScrollStore:S,preserveScrollOnPrependRef:x,scrollToEnd:V,scrollToMessage:H,scrollToStart:oe,setContentElement:ye,setRootElement:_e,setSpacerElement:be,setViewportElement:ve,stateStore:j,syncAfterScroll:xe,unobserveVisibility:pe,userScrollIntent:he,viewportRef:M,visibilityStore:F}),[ue,de,fe,S,V,H,oe,ye,_e,be,ve,j,xe,pe,he,F]);return o.useLayoutEffect(()=>{le()||m.current===0&&fm(a)},[le]),o.useEffect(()=>()=>{A.current!==null&&(window.cancelAnimationFrame(A.current),A.current=null),N.current!==null&&(window.cancelAnimationFrame(N.current),N.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null),v.current!==null&&(window.cancelAnimationFrame(v.current),v.current=null),P.current?.disconnect(),P.current=null},[]),o.useLayoutEffect(()=>{e&&_.current===`following-bottom`&&m.current>0?V({behavior:`auto`}):re()},[e,re,V]),{context:Se,registerMessage:me}}function _m(e){let t=o.useRef(e);return t.current=e,t}var vm=o.createContext(null),ym=o.createContext(null);function bm(){let e=o.useContext(vm);if(!e)throw Error(`useMessageScroller must be used within a MessageScroller.`);return e}function xm(){let e=o.useContext(ym);if(!e)throw Error(`MessageScrollerItem must be used within a MessageScroller.`);return e}function Sm(){let{scrollToEnd:e,scrollToMessage:t,scrollToStart:n}=bm();return o.useMemo(()=>({scrollToEnd:e,scrollToMessage:t,scrollToStart:n}),[e,t,n])}function Cm(){let{stateStore:e}=bm();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function wm({autoScroll:e=!1,children:t,defaultScrollPosition:n=`end`,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a}){let{context:o,registerMessage:s}=gm({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a});return(0,q.jsx)(vm.Provider,{value:o,children:(0,q.jsx)(ym.Provider,{value:s,children:t})})}function Tm(){let{pendingDefaultScrollStore:e}=bm();return o.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Em({children:e,...t}){let{setRootElement:n}=bm(),r=Tm();return(0,q.jsx)(`div`,{ref:n,...t,...r?{"data-pending-scroll":``}:null,children:e})}function Dm({"aria-label":e,children:t,onKeyDown:n,onScroll:r,onTouchMove:i,onWheel:a,preserveScrollOnPrepend:s=!0,ref:c,role:l,tabIndex:u,...d}){let{handleResize:f,preserveScrollOnPrependRef:p,setViewportElement:m,syncAfterScroll:h,userScrollIntent:g,viewportRef:_}=bm(),v=Tm();p.current=s;let y=o.useCallback(e=>{m(e),Np(c)?.(e)},[c,m]);function b(e){h(),r?.(e)}function x(e){g(),a?.(e)}function S(e){g(),i?.(e)}function C(e){zp.has(e.key)&&g(),n?.(e)}return o.useEffect(()=>{let e=_.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(f)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[f,_]),(0,q.jsx)(`div`,{ref:y,role:l??`region`,"aria-label":e??`Messages`,tabIndex:u??0,onKeyDown:C,onScroll:b,onTouchMove:S,onWheel:x,...d,...v?{"data-pending-scroll":``}:null,children:t})}function Om({"aria-relevant":e,children:t,ref:n,role:r,spacerClassName:i,...a}){let{handleContentChange:s,handleResize:c,setContentElement:l,setSpacerElement:u}=bm(),d=o.useRef(null),f=o.useCallback(e=>{d.current=e,l(e),Np(n)?.(e)},[n,l]);return o.useLayoutEffect(()=>{let e=d.current;if(!e||(s(),typeof MutationObserver>`u`))return;let t=new MutationObserver(()=>{s()});return t.observe(e,{childList:!0}),()=>t.disconnect()},[s]),o.useEffect(()=>{let e=d.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(c)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[c]),(0,q.jsxs)(`div`,{ref:f,role:r??`log`,"aria-relevant":e??`additions`,...a,children:[t,(0,q.jsx)(`div`,{ref:u,"aria-hidden":`true`,"data-message-scroller-spacer":``,hidden:!0,className:i})]})}function km({messageId:e,ref:t,scrollAnchor:n=!1,...r}){let i=xm(),a=o.useRef(null),s=o.useCallback(n=>{let r=a.current;a.current=n,e&&i(e,n,r),Np(t)?.(n)},[e,t,i]);return(0,q.jsx)(`div`,{ref:s,"data-message-id":e,"data-scroll-anchor":n?`true`:`false`,...r})}function Am({behavior:e=`smooth`,children:t,direction:n=`end`,onClick:r,render:i,tabIndex:a,type:s=`button`,...c}){let{scrollToEnd:l,scrollToStart:u,stateStore:d}=bm(),f=_m(r),p=o.useCallback(e=>d.subscribe(e),[d]),m=o.useCallback(()=>{let e=d.getSnapshot();return n===`start`?e.start:e.end},[n,d]),h=o.useSyncExternalStore(p,m,m),g=o.useCallback(t=>{h&&(f.current?.(t),t.defaultPrevented||(t.currentTarget.blur(),n===`start`?u({behavior:e}):l({behavior:e})))},[e,n,h,f,l,u]);return Op({defaultTagName:`button`,props:kp({type:s,inert:!h,tabIndex:h?a:-1,children:t??(0,q.jsxs)(`span`,{children:[`Scroll to `,n]}),onClick:g},c),render:i,state:{active:h,direction:n},stateAttributesMapping:{active:e=>({"data-active":e?`true`:`false`})}})}var jm={Provider:wm,Root:Em,Viewport:Dm,Content:Om,Item:km,Button:Am};function Mm(e){return(0,q.jsx)(jm.Provider,{...e})}function Nm({className:e,...t}){return(0,q.jsx)(jm.Root,{"data-slot":`message-scroller`,className:K(`group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden`,e),...t})}function Pm({className:e,...t}){return(0,q.jsx)(jm.Viewport,{"data-slot":`message-scroller-viewport`,className:K(`size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible`,e),...t})}function Fm({className:e,...t}){return(0,q.jsx)(jm.Content,{"data-slot":`message-scroller-content`,className:K(`flex h-max min-h-full flex-col gap-8`,e),...t})}function Im({className:e,scrollAnchor:t=!1,...n}){return(0,q.jsx)(jm.Item,{"data-slot":`message-scroller-item`,scrollAnchor:t,className:K(`min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]`,e),...n})}function Lm({direction:e=`end`,className:t,children:n,render:r,variant:i=`secondary`,size:a=`icon-sm`,...o}){return(0,q.jsx)(jm.Button,{"data-slot":`message-scroller-button`,"data-direction":e,"data-variant":i,"data-size":a,direction:e,className:K(`absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180`,t),render:r??(0,q.jsx)(bd,{variant:i,size:a}),...o,children:n??(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Sd,{icon:Td,strokeWidth:2}),(0,q.jsx)(`span`,{className:`sr-only`,children:e===`end`?`Scroll to end`:`Scroll to start`})]})})}function Rm({className:e,...t}){return(0,q.jsx)(Sd,{icon:Hd,strokeWidth:2,"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:K(`size-4 animate-spin`,e),...t})}function zm(e){let t=globalThis.navigator?.clipboard;t?t.writeText(e).catch(e=>console.error(`copying the command failed:`,e)):console.error(`copying needs the clipboard, which this page cannot reach`)}function Bm({command:e,icon:t}){return(0,q.jsxs)(`span`,{className:`ui-cmd`,children:[t&&(0,q.jsx)(X,{icon:t,size:16,className:`ui-ic ui-ic16`}),(0,q.jsx)(`code`,{children:e}),(0,q.jsxs)(bd,{type:`button`,variant:`outline`,size:`xs`,onClick:()=>zm(e),children:[(0,q.jsx)(X,{icon:Fd,"data-icon":`inline-start`}),`Copy`]})]})}var Vm=(0,o.createContext)(null),Hm=null,Um=new Set;function Wm(e){Hm=c(e);for(let e of Um)e()}var Gm=e=>e.split("`").map((e,t)=>t%2==1?(0,q.jsx)(`code`,{children:e},t):e),Km={text:``,outgoing:[]};function qm({store:e,target:t,where:n,to:r}){let i=c(t),a=Ye(e,e=>e.post),s=Ye(e,e=>e.drafts[i])??Km,l=(0,o.useContext)(Vm),u=Ef().isMobile,f=(0,o.useRef)(null),m=()=>f.current;if((0,o.useLayoutEffect)(()=>{let e=()=>{Hm===i&&(Hm=null,m()?.focus())};return e(),Um.add(e),()=>void Um.delete(e)},[i,a]),a===null)return null;if(a.mode===`off`)return(0,q.jsxs)(up,{children:[(0,q.jsxs)(hp,{"aria-disabled":`true`,children:[(0,q.jsxs)(_p,{align:`block-start`,children:[(0,q.jsx)(X,{icon:Yd}),(0,q.jsx)(bp,{children:a.reason===`This dashboard was started with --creds, which can only read.`?Gm("This dashboard was started with `--creds`, which can only read."):a.reason})]}),(0,q.jsxs)(_p,{align:`block-end`,className:`min-w-0`,children:[(0,q.jsx)(Bm,{command:p(t)}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`inline-flex shrink-0`,tabIndex:0,children:(0,q.jsx)(yp,{variant:`default`,size:`icon-xs`,disabled:!0,"aria-label":`Send`,children:(0,q.jsx)(X,{icon:Dd})})})}),(0,q.jsx)(vf,{children:a.reason})]})]})]}),(0,q.jsx)(fp,{className:`truncate`,children:Gm(d(a))})]});let h=s.outgoing.some(e=>e.id===void 0),g=s.refused,_=l!==null&&!h&&s.text.trim()!==``,v=()=>{_&&l.send(t,s.text).catch(()=>void 0)},y=(0,q.jsxs)(yp,{size:u?`icon-xs`:`xs`,disabled:l===null,onClick:()=>{l?.draft(t,`${s.text}@`),m()?.focus()},"aria-label":u?`Mention`:void 0,children:[(0,q.jsx)(X,{icon:kd,"data-icon":u?void 0:`inline-start`}),!u&&`Mention`]});return(0,q.jsxs)(up,{"data-invalid":g!==void 0,children:[(0,q.jsxs)(hp,{children:[(0,q.jsx)(xp,{ref:f,className:`max-h-48`,placeholder:`Message ${n}`,"aria-label":`Message ${n}`,"aria-invalid":g!==void 0,value:s.text,readOnly:l===null,onChange:e=>l?.draft(t,e.currentTarget.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),v())}}),(0,q.jsx)(_p,{align:`block-end`,children:g===void 0?(0,q.jsxs)(q.Fragment,{children:[u?(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`inline-flex`,tabIndex:l===null?0:void 0,children:y})}),(0,q.jsx)(vf,{children:`Mention`})]}):y,(0,q.jsxs)(bp,{className:`ml-auto min-w-0`,children:[(0,q.jsx)(`i`,{className:`ui-mode-dot`,style:{background:t.kind===`msg`?`var(--multi)`:`var(--uni)`}}),(0,q.jsx)(`span`,{className:`truncate`,children:r})]}),!u&&(0,q.jsx)(bp,{children:`as operator`}),(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(`span`,{className:`inline-flex`,tabIndex:_?void 0:0,children:(0,q.jsx)(yp,{variant:`default`,size:`icon-xs`,"aria-label":h?`Sending`:`Send`,disabled:!_,onClick:v,children:h?(0,q.jsx)(Rm,{}):(0,q.jsx)(X,{icon:Dd})})})}),(0,q.jsx)(vf,{children:h?`Sending`:`Send`})]})]}):(0,q.jsx)(yp,{variant:`outline`,size:`sm`,className:`ml-auto`,disabled:!_,onClick:v,children:`Try again`})})]}),g===void 0?(0,q.jsx)(fp,{className:`truncate`,children:Gm(d(a))}):(0,q.jsxs)(gf,{children:[(0,q.jsx)(_f,{asChild:!0,children:(0,q.jsx)(pp,{className:`truncate`,children:g})}),(0,q.jsx)(vf,{children:g})]})]})}function Jm({store:e,target:t,shown:n}){let r=Ye(e,e=>e.drafts[c(t)])??Km;return(0,q.jsx)(q.Fragment,{children:r.outgoing.filter(e=>e.id===void 0||!n.has(e.id)).map(e=>{let t=new Date(e.ts),n=e.id===void 0;return(0,q.jsx)(Im,{children:(0,q.jsxs)(Cp,{align:`end`,children:[(0,q.jsx)(wp,{children:(0,q.jsx)(rp,{children:(0,q.jsx)(ip,{children:`OP`})})}),(0,q.jsxs)(Tp,{children:[(0,q.jsxs)(Ep,{className:`gap-2`,children:[(0,q.jsx)(`span`,{children:`operator`}),(0,q.jsx)(np,{variant:`secondary`,children:`operator`}),(0,q.jsx)(`time`,{dateTime:t.toISOString(),children:O(t)}),n&&(0,q.jsx)(`span`,{children:`sending`})]}),(0,q.jsx)(op,{variant:n?`muted`:`default`,children:(0,q.jsx)(sp,{className:`whitespace-pre-wrap`,children:e.text})})]})]})},e.seq)})})}function Ym({peer:e,name:t,selfId:n}){return(0,q.jsxs)(hp,{children:[(0,q.jsx)(_p,{align:`block-start`,children:(0,q.jsx)(bp,{children:`This conversation is between two agents.`})}),(0,q.jsx)(_p,{align:`block-end`,children:(0,q.jsx)(yp,{asChild:!0,variant:`outline`,size:`sm`,className:`ml-auto`,children:(0,q.jsx)(`a`,{href:De(m(e,n)),onClick:()=>Wm({kind:`dm`,to:e}),children:`Message ${t}`})})})]})}function Xm(e){let t=e.snapshot;return t!==void 0&&(t.asOf!==void 0||Array.isArray(t.members)&&t.members.length>0)}function Zm(e,t){if(e.unreadable!==void 0)return`unreadable`;if(!Xm(e))return`traffic-only`;let n=e.snapshot.asOf;return(n?t-n:1/0)<45e3?`live`:`stale`}function Qm(e){return Xm(e)&&e.unreadable===void 0}var $m=e=>e.split(`.`).some(e=>e===`*`||e===`>`);function eh(e,t){let n=e.split(`.`),r=t.split(`.`);for(let e=0;e<n.length;e++){if(n[e]===`>`)return e<r.length;if(e>=r.length||n[e]!==`*`&&n[e]!==r[e])return!1}return n.length===r.length}function th(e,t,n,r=[]){let i=new Map,a=!1;for(let t of e)if(t===`>`||t===`*`)a=!0;else if($m(t))for(let e of n)eh(t,e)&&i.set(e,`live`);else i.set(t,`live`);for(let e of t)if($m(e))for(let t of r)!i.has(t)&&eh(e,t)&&i.set(t,`durable`);else i.has(e)||i.set(e,`durable`);return{channels:i,wide:a}}function nh(e,t,n,r){let i=new Set,a=[],o=(e,t)=>{e&&!i.has(e)&&(i.add(e),a.push({id:e,source:t}))};if(Qm(t)){let r=[...n,e];for(let n of t.snapshot.members){let{channels:t,wide:i}=th(n.live??[],n.durable??[],r);(i||t.has(e))&&o(n.id,`membership`)}return a}for(let t of r)t.msg.channel===e&&o(t.senderId??t.msg.from.id,`traffic`);return a}function rh(e,t,n,r,i){let a=new Set,o=!1;if(Qm(t)){let r=t.snapshot.members.find(t=>t.id===e);if(r){let e=th(r.live??[],r.durable??[],n);o=e.wide;for(let t of e.channels.keys())a.add(t)}}else for(let t of r)(t.senderId??t.msg.from?.id)===e&&typeof t.msg.channel==`string`&&a.add(t.msg.channel);let s=new Map;for(let[e,t]of Object.entries(i??{}))(t===`quiet`||t===`muted`)&&s.set(e,t);for(let e of s.keys())a.add(e);return{channels:[...a].sort().map(e=>s.has(e)?{channel:e,mode:s.get(e)}:{channel:e}),wide:o}}function ih({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-3xl border-dashed p-12 text-center text-balance`,e),...t})}function ah({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var oh=vd(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-foreground [&_svg:not([class*='size-'])]:size-5`}},defaultVariants:{variant:`default`}});function sh({className:e,variant:t=`default`,...n}){return(0,q.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(oh({variant:t,className:e})),...n})}function ch({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-title`,className:K(`text-lg font-medium tracking-tight`,e),...t})}function lh({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-description`,className:K(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function uh({className:e,...t}){return(0,q.jsx)(`div`,{"data-slot":`empty-content`,className:K(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}var dh=26;function fh({letter:e,slot:t,size:n,offline:r}){let i=n<dh,a=[`ui-idb`,[...e].length>1&&`ui-idb-2`,i&&`ui-idb-dot`,r&&`ui-idb-off`].filter(Boolean).join(` `);return(0,q.jsx)(`i`,{className:a,style:{"--bf":`var(--id-${t})`},"aria-hidden":`true`,children:i?null:e})}var ph={waiting:zd,working:Hd,idle:Wd,offline:Qd},mh=e=>e.charAt(0).toUpperCase()+e.slice(1);function hh({status:e}){return(0,q.jsx)(`i`,{className:`ui-st ui-st-${e}`,role:`img`,"aria-label":mh(e)})}var gh=(e,t)=>e===`working`?`${t} ox-spin`:t,_h={waiting:`default`,working:`secondary`,idle:`outline`,offline:`outline`};function vh({row:e}){let t=Object.hasOwn(ph,e.status)?ph[e.status]:void 0,n=Object.hasOwn(_h,e.status)?_h[e.status]:`outline`;return(0,q.jsxs)(np,{variant:n,children:[t&&(0,q.jsx)(X,{icon:t,"data-icon":`inline-start`,className:e.status===`working`?`ox-spin`:void 0}),mh(qe(e))]})}var yh={"claude-code":`claude`,claude:`claude`,opencode:`opencode`,codex:`codex`,hermes:`hermes`,pi:`pi`},bh=`guest`,xh={working:{look:`down`},waiting:{mood:`surprised`,look:`up`}};function Sh(e,t){return Zf(e!==void 0&&Object.hasOwn(yh,e)?yh[e]:bh,Object.hasOwn(xh,t)?xh[t]:{})}function Ch({vendor:e,status:t,size:n,badge:r,dot:i=!0}){return(0,q.jsxs)(`span`,{className:t===`offline`?`ui-av ui-av-off`:`ui-av`,style:{"--s":`${n}px`},children:[(0,q.jsx)(`svg`,{viewBox:`-2 -4 112 112`,"aria-hidden":`true`,dangerouslySetInnerHTML:{__html:Sh(e,t)}}),r&&(0,q.jsx)(fh,{letter:r.letter,slot:r.slot,size:n,offline:t===`offline`}),i&&(0,q.jsx)(hh,{status:t})]})}var wh=8;function Th(e){let t=[...e][0];if(t===void 0)return``;let n=/_(\d+)$/.exec(e);return t.toUpperCase()+(n?n[1]:``)}function Eh(e){let[t,...n]=[...e];if(t===void 0)return``;let r=n.find(e=>/\p{L}/u.test(e))??``,i=/_(\d+)$/.exec(e);return t.toUpperCase()+r+(i?i[1]:``)}function Dh(e){let t=new Map;for(let n of e)n.status!==`offline`&&t.set(Th(n.name),(t.get(Th(n.name))??0)+1);let n=new Map;for(let r of e){let e=Th(r.name);n.set(r.id,r.status!==`offline`&&(t.get(e)??0)>1?Eh(r.name):e)}return n}function Oh(e){let t=7;for(let n of e)t=Math.imul(t,31)+n.charCodeAt(0)>>>0;return t%wh+1}var kh=(e,t)=>e.name<t.name?-1:e.name>t.name?1:e.id<t.id?-1:+(e.id>t.id);function Ah(e){let t=new Map,n=new Set,r=e.filter(e=>e.status!==`offline`).sort(kh);for(let e of r){let r=Oh(e.name);if(n.size<wh)for(;n.has(r);)r=r%wh+1;n.add(r),t.set(e.id,r)}for(let n of e)n.status===`offline`&&t.set(n.id,Oh(n.name));return t}var jh=(0,o.createContext)(()=>void 0);function Mh(){return(0,o.useContext)(jh)}function Nh(e){let t=Ah(e),n=Dh(e),r=new Map;for(let i of e){let e=t.get(i.id);e!==void 0&&r.set(i.id,{letter:n.get(i.id)??``,slot:e})}return e=>r.get(e)}var Ph={claude:{label:`Claude Code`,color:`#d97757`,glyph:`◆`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>`},opencode:{label:`OpenCode`,color:`#cdd6e0`,glyph:`▣`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22 24H2V0h20zM17 4.8H7v14.4h10z"/></svg>`},codex:{label:`Codex`,color:`#e5e7eb`,glyph:`◉`,svg:`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>`},hermes:{label:`Hermes`,color:`#a78bfa`,glyph:`➤`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 3 3 10.5l7 2.5 2.5 7L21 3Z"/><path d="M21 3 10 13"/></svg>`},jcode:{label:`Jcode`,color:`#4ade80`,glyph:`⟨⟩`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 4 3 12l5 8"/><path d="m16 4 5 8-5 8"/></svg>`},pi:{label:`Pi`,color:`#7dd3fc`,glyph:`π`,svg:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"/><path d="M9 7v12"/><path d="M15 7v12c0 1.5 1.5 2 3 1"/></svg>`}};function Fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ih(e){if(Array.isArray(e))return e}function Lh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Rh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
43
43
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zh(e,t){return Ih(e)||Lh(e,t)||Bh(e,t)||Rh()}function Bh(e,t){if(e){if(typeof e==`string`)return Fh(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fh(e,t):void 0}}var Vh=Object.entries,Hh=Object.setPrototypeOf,Uh=Object.isFrozen,Wh=Object.getPrototypeOf,Gh=Object.getOwnPropertyDescriptor,Kh=Object.freeze,qh=Object.seal,Jh=Object.create,Yh=typeof Reflect<`u`&&Reflect,Xh=Yh.apply,Zh=Yh.construct;Kh||=function(e){return e},qh||=function(e){return e},Xh||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Zh||=function(e){return new e(...[...arguments].slice(1))};var Qh=vg(Array.prototype.forEach),$h=vg(Array.prototype.lastIndexOf),eg=vg(Array.prototype.pop),tg=vg(Array.prototype.push),ng=vg(Array.prototype.splice),rg=Array.isArray,ig=vg(String.prototype.toLowerCase),ag=vg(String.prototype.toString),og=vg(String.prototype.match),sg=vg(String.prototype.replace),cg=vg(String.prototype.indexOf),lg=vg(String.prototype.trim),ug=vg(Number.prototype.toString),dg=vg(Boolean.prototype.toString),fg=typeof BigInt>`u`?null:vg(BigInt.prototype.toString),pg=typeof Symbol>`u`?null:vg(Symbol.prototype.toString),mg=vg(Object.prototype.hasOwnProperty),hg=vg(Object.prototype.toString),gg=vg(RegExp.prototype.test),_g=yg(TypeError);function vg(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Xh(e,t,n)}}function yg(e){return function(){return Zh(e,[...arguments])}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ig;if(Hh&&Hh(e,null),!rg(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Uh(t)||(t[r]=e),i=e)}e[i]=!0}return e}function bg(e){for(let t=0;t<e.length;t++)mg(e,t)||(e[t]=null);return e}function xg(e){let t=Jh(null);for(let r of Vh(e)){var n=zh(r,2);let i=n[0],a=n[1];mg(e,i)&&(t[i]=rg(a)?bg(a):a&&typeof a==`object`&&a.constructor===Object?xg(a):a)}return t}function Sg(e){switch(typeof e){case`string`:return e;case`number`:return ug(e);case`boolean`:return dg(e);case`bigint`:return fg?fg(e):`0`;case`symbol`:return pg?pg(e):`Symbol()`;case`undefined`:return hg(e);case`function`:case`object`:{if(e===null)return hg(e);let t=e,n=Cg(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:hg(e)}return hg(e)}default:return hg(e)}}function Cg(e,t){for(;e!==null;){let n=Gh(e,t);if(n){if(n.get)return vg(n.get);if(typeof n.value==`function`)return vg(n.value)}e=Wh(e)}function n(){return null}return n}function wg(e){try{return gg(e,``),!0}catch{return!1}}var Tg=Kh(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Eg=Kh(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Dg=Kh([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Og=Kh([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),kg=Kh(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ag=Kh([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),jg=Kh([`#text`]),Mg=Kh(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ng=Kh(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Pg=Kh(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Fg=Kh([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ig=qh(/{{[\w\W]*|^[\w\W]*}}/g),Lg=qh(/<%[\w\W]*|^[\w\W]*%>/g),Rg=qh(/\${[\w\W]*/g),zg=qh(/^data-[\-\w.\u00B7-\uFFFF]+$/),Bg=qh(/^aria-[\-\w]+$/),Vg=qh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hg=qh(/^(?:\w+script|data):/i),Ug=qh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wg=qh(/^html$/i),Gg=qh(/^[a-z][.\w]*(-[.\w]+)+$/i),Kg=qh(/<[/\w!]/g),qg=qh(/<[/\w]/g),Jg=qh(/<\/no(script|embed|frames)/i),Yg=qh(/\/>/i),Xg={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Zg=function(){return typeof window>`u`?null:window},Qg=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},$g=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e_=function(e,t,n,r){return mg(e,t)&&rg(e[t])?Z(r.base?xg(r.base):{},e[t],r.transform):n};function t_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zg(),t=e=>t_(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==Xg.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Cg(d,`cloneNode`),p=Cg(d,`remove`),m=Cg(d,`nextSibling`),h=Cg(d,`childNodes`),g=Cg(d,`parentNode`),_=Cg(d,`shadowRoot`),v=Cg(d,`attributes`),y=o&&o.prototype?Cg(o.prototype,`nodeType`):null,b=o&&o.prototype?Cg(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw _g(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},O=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},k=function(){return w||=(C=Qg(u,i),!0),C},A=n,j=A.implementation,M=A.createNodeIterator,N=A.createDocumentFragment,P=A.getElementsByTagName,F=r.importNode,I=$g();t.isSupported=typeof Vh==`function`&&typeof g==`function`&&j&&j.createHTMLDocument!==void 0;let ee=Ig,L=Lg,te=Rg,ne=zg,re=Bg,ie=Hg,R=Ug,z=Gg,ae=Vg,B=null,V=Z({},[...Tg,...Eg,...Dg,...kg,...jg]),H=null,oe=Z({},[...Mg,...Ng,...Pg,...Fg]),U=Object.seal(Jh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,ce=null,le=Object.seal(Jh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ue=!0,de=!0,fe=!1,pe=!0,me=!1,he=!0,ge=!1,_e=!1,ve=null,ye=null,be=!1,xe=!1,Se=!1,Ce=!1,we=!0,Te=!1,Ee=`user-content-`,De=!0,Oe=!1,ke={},Ae=null,je=Z({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Me=null,Ne=Z({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Pe=null,Fe=Z({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ie=`http://www.w3.org/1998/Math/MathML`,Le=`http://www.w3.org/2000/svg`,Re=`http://www.w3.org/1999/xhtml`,ze=Re,Be=!1,Ve=null,He=Z({},[Ie,Le,Re],ag),Ue=Kh([`mi`,`mo`,`mn`,`ms`,`mtext`]),We=Z({},Ue),Ge=Kh([`annotation-xml`]),Ke=Z({},Ge),qe=Z({},[`title`,`style`,`font`,`a`,`script`]),Je=null,Ye=[`application/xhtml+xml`,`text/html`],W=null,G=null,Xe=n.createElement(`form`),Ze=function(e){return e instanceof RegExp||e instanceof Function},Qe=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(G&&G===e)return;e&&typeof e==`object`||(e={}),e=xg(e),Je=Ye.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,W=Je===`application/xhtml+xml`?ag:ig,B=e_(e,`ALLOWED_TAGS`,V,{transform:W}),H=e_(e,`ALLOWED_ATTR`,oe,{transform:W}),Ve=e_(e,`ALLOWED_NAMESPACES`,He,{transform:ag}),Pe=e_(e,`ADD_URI_SAFE_ATTR`,Fe,{transform:W,base:Fe}),Me=e_(e,`ADD_DATA_URI_TAGS`,Ne,{transform:W,base:Ne}),Ae=e_(e,`FORBID_CONTENTS`,je,{transform:W}),se=e_(e,`FORBID_TAGS`,xg({}),{transform:W}),ce=e_(e,`FORBID_ATTR`,xg({}),{transform:W}),ke=mg(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?xg(e.USE_PROFILES):e.USE_PROFILES:!1,ue=e.ALLOW_ARIA_ATTR!==!1,de=e.ALLOW_DATA_ATTR!==!1,fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=e.SAFE_FOR_TEMPLATES||!1,he=e.SAFE_FOR_XML!==!1,ge=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Se=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,be=e.FORCE_BODY||!1,we=e.SANITIZE_DOM!==!1,Te=e.SANITIZE_NAMED_PROPS||!1,De=e.KEEP_CONTENT!==!1,Oe=e.IN_PLACE||!1,ae=wg(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Vg,ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Re,We=mg(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?xg(e.MATHML_TEXT_INTEGRATION_POINTS):Z({},Ue),Ke=mg(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?xg(e.HTML_INTEGRATION_POINTS):Z({},Ge);let t=mg(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?xg(e.CUSTOM_ELEMENT_HANDLING):Jh(null);if(U=Jh(null),mg(t,`tagNameCheck`)&&Ze(t.tagNameCheck)&&(U.tagNameCheck=t.tagNameCheck),mg(t,`attributeNameCheck`)&&Ze(t.attributeNameCheck)&&(U.attributeNameCheck=t.attributeNameCheck),mg(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(U.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),qh(U),me&&(de=!1),Se&&(xe=!0),ke&&(B=Z({},jg),H=Jh(null),ke.html===!0&&(Z(B,Tg),Z(H,Mg)),ke.svg===!0&&(Z(B,Eg),Z(H,Ng),Z(H,Fg)),ke.svgFilters===!0&&(Z(B,Dg),Z(H,Ng),Z(H,Fg)),ke.mathMl===!0&&(Z(B,kg),Z(H,Pg),Z(H,Fg))),le.tagCheck=null,le.attributeCheck=null,mg(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?le.tagCheck=e.ADD_TAGS:rg(e.ADD_TAGS)&&(B===V&&(B=xg(B)),Z(B,e.ADD_TAGS,W))),mg(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?le.attributeCheck=e.ADD_ATTR:rg(e.ADD_ATTR)&&(H===oe&&(H=xg(H)),Z(H,e.ADD_ATTR,W))),mg(e,`ADD_URI_SAFE_ATTR`)&&rg(e.ADD_URI_SAFE_ATTR)&&Z(Pe,e.ADD_URI_SAFE_ATTR,W),mg(e,`FORBID_CONTENTS`)&&rg(e.FORBID_CONTENTS)&&(Ae===je&&(Ae=xg(Ae)),Z(Ae,e.FORBID_CONTENTS,W)),mg(e,`ADD_FORBID_CONTENTS`)&&rg(e.ADD_FORBID_CONTENTS)&&(Ae===je&&(Ae=xg(Ae)),Z(Ae,e.ADD_FORBID_CONTENTS,W)),De&&(B[`#text`]=!0),ge&&Z(B,[`html`,`head`,`body`]),B.table&&(Z(B,[`tbody`]),delete se.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw _g(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw _g(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=k()),x&&typeof S==`string`&&(S=D(``)));Kh&&Kh(e),G=e},$e=Z({},[...Eg,...Dg,...Og]),et=Z({},[...kg,...Ag]),tt=function(e,t,n){return t.namespaceURI===Re?e===`svg`:t.namespaceURI===Ie?e===`svg`&&(n===`annotation-xml`||We[n]):!!$e[e]},nt=function(e,t,n){return t.namespaceURI===Re?e===`math`:t.namespaceURI===Le?e===`math`&&Ke[n]:!!et[e]},rt=function(e,t,n){return t.namespaceURI===Le&&!Ke[n]||t.namespaceURI===Ie&&!We[n]?!1:!et[e]&&(qe[e]||!$e[e])},it=function(e){let t=g(e);t&&t.tagName||(t={namespaceURI:ze,tagName:`template`});let n=ig(e.tagName),r=ig(t.tagName);return Ve[e.namespaceURI]?e.namespaceURI===Le?tt(n,t,r):e.namespaceURI===Ie?nt(n,t,r):e.namespaceURI===Re?rt(n,t,r):!!(Je===`application/xhtml+xml`&&Ve[e.namespaceURI]):!1},at=function(e){tg(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw _g(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},ot=function(e){lt(e);let t=h(e);if(t){let e=[];Qh(t,t=>{tg(e,t)}),Qh(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},st=function(e,n){try{tg(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{tg(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`){if(xe||Se)try{at(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},ct=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||H[W(i)]))try{e.removeAttribute(i)}catch{}}},lt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===Xg.element&&ct(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},ut=function(e){if(!he)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=y?y(e):e.nodeType;if(n===Xg.processingInstruction||n===Xg.comment&&gg(qg,e.data)){try{p(e)}catch{}continue}if(n===Xg.element){let t=e,n=W(b?b(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},dt=function(e){let t=null,r=null;if(be)e=`<remove></remove>`+e;else{let t=og(e,/^[\r\n\t ]+/);r=t&&t[0]}Je===`application/xhtml+xml`&&ze===Re&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?D(e):e;if(ze===Re)try{t=new l().parseFromString(i,Je)}catch{}if(!t||!t.documentElement){t=j.createDocument(ze,`template`,null);try{t.documentElement.innerHTML=Be?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ze===Re?P.call(t,ge?`html`:`body`)[0]:ge?t.documentElement:a},ft=function(e){return M.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},pt=function(e){return e=sg(e,ee,` `),e=sg(e,L,` `),e=sg(e,te,` `),e},mt=function(e){e.normalize();let t=M.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=pt(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&Qh(r,e=>{gt(e.content)&&mt(e.content)})},ht=function(e){let t=b?b(e):null;return typeof t!=`string`||W(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},gt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===Xg.documentFragment}catch{return!1}},_t=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function vt(e,n,r){e.length!==0&&Qh(e,e=>{e.call(t,n,r,G)})}let yt=function(e,t){return!!(he&&e.hasChildNodes()&&!_t(e.firstElementChild)&&gg(Kg,e.textContent)&&gg(Kg,e.innerHTML)||he&&e.namespaceURI===Re&&t===`style`&&_t(e.firstElementChild)||e.nodeType===Xg.processingInstruction||he&&e.nodeType===Xg.comment&&gg(qg,e.data))},bt=function(e,t){if(!se[t]&&wt(t)&&(U.tagNameCheck instanceof RegExp&&gg(U.tagNameCheck,t)||U.tagNameCheck instanceof Function&&U.tagNameCheck(t)))return!1;if(De&&!Ae[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Oe?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return at(e),!0},xt=function(e,n){if(vt(I.beforeSanitizeElements,e,null),e!==n&&g(e)===null)return!0;if(ht(e))return at(e),!0;let r=W(b?b(e):e.nodeName);if(vt(I.uponSanitizeElement,e,{tagName:r,allowedTags:B}),e!==n&&g(e)===null)return!0;if(yt(e,r))return at(e),!0;if(se[r]||!(le.tagCheck instanceof Function&&le.tagCheck(r))&&!B[r]){let t=bt(e,r);return t===!1&&vt(I.afterSanitizeElements,e,null),t}if((y?y(e):e.nodeType)===Xg.element&&!it(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&gg(Jg,e.innerHTML))return at(e),!0;if(me&&e.nodeType===Xg.text){let n=pt(e.textContent);e.textContent!==n&&(tg(t.removed,{element:e.cloneNode()}),e.textContent=n)}return vt(I.afterSanitizeElements,e,null),!1},St=function(e,t,r){if(ce[t]||he&&t===`patchsrc`||he&&t===`for`&&e!==`label`&&e!==`output`||we&&(t===`id`||t===`name`)&&(r in n||r in Xe))return!1;let i=H[t]||le.attributeCheck instanceof Function&&le.attributeCheck(t,e);if(!(de&&gg(ne,t))&&!(ue&&gg(re,t))){if(!i){if(!(wt(e)&&(U.tagNameCheck instanceof RegExp&&gg(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&gg(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t,e))||t===`is`&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&gg(U.tagNameCheck,r)||U.tagNameCheck instanceof Function&&U.tagNameCheck(r))))return!1}else if(!Pe[t]&&!gg(ae,sg(r,R,``))&&(t!==`src`&&t!==`xlink:href`&&t!==`href`||e===`script`||cg(r,`data:`)!==0||!Me[e])&&(!fe||gg(ie,sg(r,R,``)))&&r)return!1}return!0},Ct=Z({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),wt=function(e){return!Ct[ig(e)]&&gg(z,e)},Tt=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return O(r)}return r},Et=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),ht(e)?at(e):eg(t.removed)}catch{st(n,e)}},Dt=function(e){vt(I.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||ht(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},r=t.length,i=W(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=W(o),u=c,d=o===`value`?u:lg(u);n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,vt(I.uponSanitizeAttribute,e,n),d=n.attrValue,Te&&(l===`id`||l===`name`)&&cg(d,Ee)!==0&&(st(o,e),d=Ee+d),he&&gg(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||l===`attributename`&&og(d,`href`)?st(o,e):n.forceKeepAttr||(n.keepAttr?!pe&&gg(Yg,d)?st(o,e):(me&&(d=pt(d)),St(i,l,d)?(d=Tt(i,l,s,d),d!==u&&Et(e,o,s,d)):st(o,e)):st(o,e))}vt(I.afterSanitizeAttributes,e,null)},Ot=function(e){let t=null,n=ft(e);for(vt(I.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(vt(I.uponSanitizeShadowNode,t,null),xt(t,e),Dt(t),gt(t.content)&&Ot(t.content),(y?y(t):t.nodeType)===Xg.element){let e=_(t);gt(e)&&(kt(e),Ot(e))}vt(I.afterSanitizeShadowDOM,e,null)},kt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Ot(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===Xg.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&W(e)===`template`){let e=n.content;gt(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);gt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Be=!e,Be&&(e=`<!-->`),typeof e!=`string`&&!_t(e)&&(e=Sg(e),typeof e!=`string`))throw _g(`dirty is not a string, aborting`);if(!t.isSupported)return e;_e?(B=ve,H=ye):Qe(n),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(B=xg(B)),I.uponSanitizeAttribute.length>0&&(H=xg(H)),t.removed=[];let c=Oe&&typeof e!=`string`&&_t(e);if(c){ut(e);let t=b?b(e):e.nodeName;if(typeof t==`string`){let n=W(t);if(!B[n]||se[n])throw ot(e),_g(`root node is forbidden and cannot be sanitized in-place`)}if(ht(e))throw ot(e),_g(`root node is clobbered and cannot be sanitized in-place`);try{kt(e)}catch(t){throw ot(e),t}}else if(_t(e))i=dt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Xg.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),kt(a);else{if(!xe&&!me&&!ge&&e.indexOf(`<`)===-1)return x&&Ce?D(e):e;if(i=dt(e),!i)return xe?null:Ce?S:``}i&&be&&at(i.firstChild);let l=c?e:i,u=ft(l);try{for(;o=u.nextNode();)xt(o,l),Dt(o),gt(o.content)&&Ot(o.content)}catch(n){throw c&&(ot(e),Qh(t.removed,e=>{e.element&<(e.element)})),n}if(c)return Qh(t.removed,e=>{e.element&<(e.element)}),me&&mt(e),e;if(xe){if(me&&mt(i),Se)for(s=N.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(H.shadowroot||H.shadowrootmode)&&(s=F.call(r,s,!0)),s}let d=ge?i.outerHTML:i.innerHTML;return ge&&B[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&gg(Wg,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
44
44
|
`+d),me&&(d=pt(d)),x&&Ce?D(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qe(e),_e=!0,ve=B,ye=H},t.clearConfig=function(){G=null,_e=!1,ve=null,ye=null,x=C,S=``},t.isValidAttribute=function(e,t,n){G||Qe({});let r=W(e),i=W(t);return St(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&mg(I,e)&&tg(I[e],t)},t.removeHook=function(e,t){if(mg(I,e)){if(t!==void 0){let n=$h(I[e],t);return n===-1?void 0:ng(I[e],n,1)[0]}return eg(I[e])}},t.removeHooks=function(e){mg(I,e)&&(I[e]=[])},t.removeAllHooks=function(){I=$g()},t}var n_=t_();function r_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var i_=r_();function a_(e){i_=e}var o_={exec:()=>null};function s_(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(l_.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var c_=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),l_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s_(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:s_(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:s_(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:s_(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:s_(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:s_(e=>RegExp(`^ {0,${e}}>`))},u_=/^(?:[ \t]*(?:\n|$))+/,d_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,f_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,p_=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,m_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,h_=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,g_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,__=Q(g_).replace(/bull/g,h_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),v_=Q(g_).replace(/bull/g,h_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),y_=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b_=/^[^\n]+/,x_=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,S_=Q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x_).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),C_=Q(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,h_).getRegex(),w_=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,T_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,E_=Q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,T_).replace(`tag`,w_).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D_=e=>Q(y_).replace(`hr`,p_).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,w_).getRegex(),O_=D_(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),k_=D_(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/),A_={blockquote:Q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,k_).getRegex(),code:d_,def:S_,fences:f_,heading:m_,hr:p_,html:E_,lheading:__,list:C_,newline:u_,paragraph:O_,table:o_,text:b_},j_=Q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,p_).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,w_).getRegex(),M_={...A_,lheading:v_,table:j_,paragraph:Q(y_).replace(`hr`,p_).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,j_).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,w_).getRegex()},N_={...A_,html:Q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,T_).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:o_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Q(y_).replace(`hr`,p_).replace(`heading`,` *#{1,6} *[^
|
|
45
45
|
]`).replace(`lheading`,__).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},P_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,F_=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,I_=/^( {2,}|\\)\n(?!\s*$)/,L_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,R_=/[\p{P}\p{S}]/u,z_=/[\s\p{P}\p{S}]/u,B_=/[^\s\p{P}\p{S}]/u,V_=Q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,z_).getRegex(),H_=/(?!~)[\p{P}\p{S}]/u,U_=/(?!~)[\s\p{P}\p{S}]/u,W_=/(?:[^\s\p{P}\p{S}]|~)/u,G_=Q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,c_?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),K_=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,q_=Q(K_,`u`).replace(/punct/g,R_).getRegex(),J_=Q(K_,`u`).replace(/punct/g,H_).getRegex(),Y_=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,X_=Q(Y_,`gu`).replace(/notPunctSpace/g,B_).replace(/punctSpace/g,z_).replace(/punct/g,R_).getRegex(),Z_=Q(Y_,`gu`).replace(/notPunctSpace/g,W_).replace(/punctSpace/g,U_).replace(/punct/g,H_).getRegex(),Q_=Q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,B_).replace(/punctSpace/g,z_).replace(/punct/g,R_).getRegex(),$_=Q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,R_).getRegex(),ev=Q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,B_).replace(/punctSpace/g,z_).replace(/punct/g,R_).getRegex(),tv=Q(/\\(punct)/,`gu`).replace(/punct/g,R_).getRegex(),nv=Q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rv=Q(T_).replace(`(?:-->|$)`,`-->`).getRegex(),iv=Q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,rv).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),av=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ov=Q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,av).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sv=Q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,av).replace(`ref`,x_).getRegex(),cv=Q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,x_).getRegex(),lv=Q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,sv).replace(`nolink`,cv).getRegex(),uv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,dv={_backpedal:o_,anyPunctuation:tv,autolink:nv,blockSkip:G_,br:I_,code:F_,del:o_,delLDelim:o_,delRDelim:o_,emStrongLDelim:q_,emStrongRDelimAst:X_,emStrongRDelimUnd:Q_,escape:P_,link:ov,nolink:cv,punctuation:V_,reflink:sv,reflinkSearch:lv,tag:iv,text:L_,url:o_},fv={...dv,link:Q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,av).getRegex(),reflink:Q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,av).getRegex()},pv={...dv,emStrongRDelimAst:Z_,emStrongLDelim:J_,delLDelim:$_,delRDelim:ev,url:Q(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,uv).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Q(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,uv).getRegex()},mv={...pv,br:Q(I_).replace(`{2,}`,`*`).getRegex(),text:Q(pv.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},hv={normal:A_,gfm:M_,pedantic:N_},gv={normal:dv,gfm:pv,breaks:mv,pedantic:fv},_v={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},vv=e=>_v[e];function yv(e,t){if(t){if(l_.escapeTest.test(e))return e.replace(l_.escapeReplace,vv)}else if(l_.escapeTestNoEncode.test(e))return e.replace(l_.escapeReplaceNoEncode,vv);return e}function bv(e){try{e=encodeURI(e).replace(l_.percentDecode,`%`)}catch{return null}return e}function xv(e,t){let n=e.replace(l_.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(l_.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(l_.slashPipe,`|`);return n}function Sv(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Cv(e){let t=e.split(`
|