@kimuson/claude-code-viewer 0.3.0 → 0.3.1
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/standalone/.next/BUILD_ID +1 -1
- package/dist/standalone/.next/app-build-manifest.json +14 -14
- package/dist/standalone/.next/app-path-routes-manifest.json +1 -1
- package/dist/standalone/.next/build-manifest.json +2 -2
- package/dist/standalone/.next/prerender-manifest.json +3 -3
- package/dist/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/api/[[...route]]/route.js +1 -1
- package/dist/standalone/.next/server/app/api/[[...route]]/route_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/page.js +1 -1
- package/dist/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/projects/[projectId]/page.js +1 -1
- package/dist/standalone/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page.js +2 -2
- package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page.js.nft.json +1 -1
- package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/dist/standalone/.next/server/app-paths-manifest.json +1 -1
- package/dist/standalone/.next/server/chunks/8.js +1 -1
- package/dist/standalone/.next/server/chunks/837.js +1 -1
- package/dist/standalone/.next/server/chunks/921.js +5 -1
- package/dist/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/standalone/.next/server/pages/500.html +1 -1
- package/dist/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/standalone/.next/static/Xc4x4pucjXfhABCgWmn1V/_buildManifest.js +1 -0
- package/dist/standalone/.next/static/Xc4x4pucjXfhABCgWmn1V/_ssgManifest.js +1 -0
- package/dist/standalone/.next/static/chunks/496-dc59dbb8ba7e4539.js +1 -0
- package/dist/standalone/.next/static/chunks/693-0937eaeea1ae4b33.js +1 -0
- package/dist/standalone/.next/static/chunks/712-581ffe0ca01c6d44.js +16 -0
- package/dist/standalone/.next/static/chunks/app/layout-05c5414de7009244.js +1 -0
- package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-7a905fd82150cec4.js +1 -0
- package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-6e8c50d4d23e969a.js +1 -0
- package/dist/standalone/.next/static/css/b9a686df90a90036.css +3 -0
- package/dist/standalone/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[496],{3908:(e,t,n)=>{function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{mK:()=>r}),"undefined"!=typeof window&&window.document&&window.document.createElement},5530:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},6806:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(55931),o=globalThis?.document?r.useLayoutEffect:()=>{}},7776:(e,t,n)=>{n.d(t,{X:()=>i});var r=n(55931),o=n(6806);function i(e){let[t,n]=r.useState(void 0);return(0,o.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}},9005:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},12344:(e,t,n)=>{n.d(t,{Eq:()=>s});var r=new WeakMap,o=new WeakMap,i={},l=0,a=function(e){return e&&(e.host||a(e.parentNode))},u=function(e,t,n,u){var s=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=a(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});i[n]||(i[n]=new WeakMap);var c=i[n],d=[],f=new Set,p=new Set(s),h=function(e){!e||f.has(e)||(f.add(e),h(e.parentNode))};s.forEach(h);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))m(e);else try{var t=e.getAttribute(u),i=null!==t&&"false"!==t,l=(r.get(e)||0)+1,a=(c.get(e)||0)+1;r.set(e,l),c.set(e,a),d.push(e),1===l&&i&&o.set(e,!0),1===a&&e.setAttribute(n,"true"),i||e.setAttribute(u,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),f.clear(),l++,function(){d.forEach(function(e){var t=r.get(e)-1,i=c.get(e)-1;r.set(e,t),c.set(e,i),t||(o.has(e)||e.removeAttribute(u),o.delete(e)),i||e.removeAttribute(n)}),--l||(r=new WeakMap,r=new WeakMap,o=new WeakMap,i={})}},s=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),u(r,o,n,"aria-hidden")):function(){return null}}},14464:(e,t,n)=>{n.d(t,{C1:()=>C,bL:()=>b});var r=n(55931),o=n(90229),i=n(89379),l=n(3908),a=n(32056),u=n(41544),s=n(7776),c=n(71637),d=n(78837),f=n(89835),p="Checkbox",[h,m]=(0,i.A)(p),[v,g]=h(p);function y(e){let{__scopeCheckbox:t,checked:n,children:o,defaultChecked:i,disabled:l,form:u,name:s,onCheckedChange:c,required:d,value:h="on",internal_do_not_use_render:m}=e,[g,y]=(0,a.i)({prop:n,defaultProp:null!=i&&i,onChange:c,caller:p}),[w,x]=r.useState(null),[b,E]=r.useState(null),C=r.useRef(!1),R=!w||!!u||!!w.closest("form"),S={checked:g,disabled:l,setChecked:y,control:w,setControl:x,name:s,form:u,value:h,hasConsumerStoppedPropagationRef:C,required:d,defaultChecked:!A(i)&&i,isFormControl:R,bubbleInput:b,setBubbleInput:E};return(0,f.jsx)(v,{scope:t,...S,children:"function"==typeof m?m(S):o})}var w="CheckboxTrigger",x=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,onKeyDown:i,onClick:a,...u}=e,{control:s,value:c,disabled:p,checked:h,required:m,setControl:v,setChecked:y,hasConsumerStoppedPropagationRef:x,isFormControl:b,bubbleInput:E}=g(w,n),C=(0,o.s)(t,v),R=r.useRef(h);return r.useEffect(()=>{let e=null==s?void 0:s.form;if(e){let t=()=>y(R.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[s,y]),(0,f.jsx)(d.sG.button,{type:"button",role:"checkbox","aria-checked":A(h)?"mixed":h,"aria-required":m,"data-state":k(h),"data-disabled":p?"":void 0,disabled:p,value:c,...u,ref:C,onKeyDown:(0,l.mK)(i,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.mK)(a,e=>{y(e=>!!A(e)||!e),E&&b&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})})});x.displayName=w;var b=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:l,disabled:a,value:u,onCheckedChange:s,form:c,...d}=e;return(0,f.jsx)(y,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:l,onCheckedChange:s,name:r,form:c,value:u,internal_do_not_use_render:e=>{let{isFormControl:r}=e;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(x,{...d,ref:t,__scopeCheckbox:n}),r&&(0,f.jsx)(S,{__scopeCheckbox:n})]})}})});b.displayName=p;var E="CheckboxIndicator",C=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...o}=e,i=g(E,n);return(0,f.jsx)(c.C,{present:r||A(i.checked)||!0===i.checked,children:(0,f.jsx)(d.sG.span,{"data-state":k(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});C.displayName=E;var R="CheckboxBubbleInput",S=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,...i}=e,{control:l,hasConsumerStoppedPropagationRef:a,checked:c,defaultChecked:p,required:h,disabled:m,name:v,value:y,form:w,bubbleInput:x,setBubbleInput:b}=g(R,n),E=(0,o.s)(t,b),C=(0,u.Z)(c),S=(0,s.X)(l);r.useEffect(()=>{if(!x)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!a.current;if(C!==c&&e){let n=new Event("click",{bubbles:t});x.indeterminate=A(c),e.call(x,!A(c)&&c),x.dispatchEvent(n)}},[x,C,c,a]);let k=r.useRef(!A(c)&&c);return(0,f.jsx)(d.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:null!=p?p:k.current,required:h,disabled:m,name:v,value:y,form:w,...i,tabIndex:-1,ref:E,style:{...i.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function A(e){return"indeterminate"===e}function k(e){return A(e)?"indeterminate":e?"checked":"unchecked"}S.displayName=R},17256:(e,t,n)=>{n.d(t,{A:()=>q});var r,o,i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var a=("function"==typeof SuppressedError&&SuppressedError,n(55931)),u="right-scroll-bar-position",s="width-before-scroll-bar";function c(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var d="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,f=new WeakMap;function p(e){return e}var h=function(e){void 0===e&&(e={});var t,n,r,o=(void 0===t&&(t=p),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),n={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),n}}}});return o.options=i({async:!0,ssr:!1},e),o}(),m=function(){},v=a.forwardRef(function(e,t){var n,r,o,u,s=a.useRef(null),p=a.useState({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:m}),v=p[0],g=p[1],y=e.forwardProps,w=e.children,x=e.className,b=e.removeScrollBar,E=e.enabled,C=e.shards,R=e.sideCar,S=e.noRelative,A=e.noIsolation,k=e.inert,N=e.allowPinchZoom,T=e.as,j=e.gapMode,P=l(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=(n=[s,t],r=function(e){return n.forEach(function(t){return c(t,e)})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,u=o.facade,d(function(){var e=f.get(u);if(e){var t=new Set(e),r=new Set(n),o=u.current;t.forEach(function(e){r.has(e)||c(e,null)}),r.forEach(function(e){t.has(e)||c(e,o)})}f.set(u,n)},[n]),u),L=i(i({},P),v);return a.createElement(a.Fragment,null,E&&a.createElement(R,{sideCar:h,removeScrollBar:b,shards:C,noRelative:S,noIsolation:A,inert:k,setCallbacks:g,allowPinchZoom:!!N,lockRef:s,gapMode:j}),y?a.cloneElement(a.Children.only(w),i(i({},L),{ref:O})):a.createElement(void 0===T?"div":T,i({},L,{className:x,ref:O}),w))});v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v.classNames={fullWidth:s,zeroRight:u};var g=function(e){var t=e.sideCar,n=l(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,i({},n))};g.isSideCarExport=!0;var y=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o||n.nc;return t&&e.setAttribute("nonce",t),e}())){var i,l;(i=t).styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),l=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(l)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},w=function(){var e=y();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},x=function(){var e=w();return function(t){return e(t.styles,t.dynamic),null}},b={left:0,top:0,right:0,gap:0},E=function(e){return parseInt(e||"",10)||0},C=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[E(n),E(r),E(o)]},R=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return b;var t=C(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},S=x(),A="data-scroll-locked",k=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(A,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(u," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(s," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(u," .").concat(u," {\n right: 0 ").concat(r,";\n }\n \n .").concat(s," .").concat(s," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(A,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},N=function(){var e=parseInt(document.body.getAttribute(A)||"0",10);return isFinite(e)?e:0},T=function(){a.useEffect(function(){return document.body.setAttribute(A,(N()+1).toString()),function(){var e=N()-1;e<=0?document.body.removeAttribute(A):document.body.setAttribute(A,e.toString())}},[])},j=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;T();var i=a.useMemo(function(){return R(o)},[o]);return a.createElement(S,{styles:k(i,!t,o,n?"":"!important")})},P=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){return P=!0,!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){P=!1}var L=!!P&&{passive:!1},M=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},D=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),I(e,r)){var o=F(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},I=function(e,t){return"v"===e?M(t,"overflowY"):M(t,"overflowX")},F=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},W=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,u=n.target,s=t.contains(u),c=!1,d=a>0,f=0,p=0;do{if(!u)break;var h=F(e,u),m=h[0],v=h[1]-h[2]-l*m;(m||v)&&I(e,u)&&(f+=v,p+=m);var g=u.parentNode;u=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&a>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(c=!0),c},_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B=function(e){return[e.deltaX,e.deltaY]},K=function(e){return e&&"current"in e?e.current:e},H=0,z=[];let G=(r=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(H++)[0],i=a.useState(x)[0],l=a.useRef(e);a.useEffect(function(){l.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(K),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var o,i=_(e),a=n.current,u="deltaX"in e?e.deltaX:a[0]-i[0],s="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=D(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=D(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return W(p,t,e,"h"===p?u:s,!0)},[]),s=a.useCallback(function(e){if(z.length&&z[z.length-1]===i){var n="deltaY"in e?B(e):_(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(K).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?u(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=a.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=a.useCallback(function(e){n.current=_(e),r.current=void 0},[]),f=a.useCallback(function(t){c(t.type,B(t),t.target,u(t,e.lockRef.current))},[]),p=a.useCallback(function(t){c(t.type,_(t),t.target,u(t,e.lockRef.current))},[]);a.useEffect(function(){return z.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",s,L),document.addEventListener("touchmove",s,L),document.addEventListener("touchstart",d,L),function(){z=z.filter(function(e){return e!==i}),document.removeEventListener("wheel",s,L),document.removeEventListener("touchmove",s,L),document.removeEventListener("touchstart",d,L)}},[]);var h=e.removeScrollBar,m=e.inert;return a.createElement(a.Fragment,null,m?a.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?a.createElement(j,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},h.useMedium(r),g);var V=a.forwardRef(function(e,t){return a.createElement(v,i({},e,{ref:t,sideCar:G}))});V.classNames=v.classNames;let q=V},24431:(e,t,n)=>{n.d(t,{UC:()=>en,VY:()=>eo,ZL:()=>ee,bL:()=>J,bm:()=>ei,hE:()=>er,hJ:()=>et,l9:()=>Q});var r=n(55931),o=n(3908),i=n(90229),l=n(89379),a=n(60452),u=n(32056),s=n(98493),c=n(41548),d=n(79211),f=n(71637),p=n(78837),h=n(41478),m=n(17256),v=n(12344),g=n(8607),y=n(89835),w="Dialog",[x,b]=(0,l.A)(w),[E,C]=x(w),R=e=>{let{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:s=!0}=e,c=r.useRef(null),d=r.useRef(null),[f,p]=(0,u.i)({prop:o,defaultProp:null!=i&&i,onChange:l,caller:w});return(0,y.jsx)(E,{scope:t,triggerRef:c,contentRef:d,contentId:(0,a.B)(),titleId:(0,a.B)(),descriptionId:(0,a.B)(),open:f,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:s,children:n})};R.displayName=w;var S="DialogTrigger",A=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,l=C(S,n),a=(0,i.s)(t,l.triggerRef);return(0,y.jsx)(p.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":q(l.open),...r,ref:a,onClick:(0,o.mK)(e.onClick,l.onOpenToggle)})});A.displayName=S;var k="DialogPortal",[N,T]=x(k,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=C(k,t);return(0,y.jsx)(N,{scope:t,forceMount:n,children:r.Children.map(o,e=>(0,y.jsx)(f.C,{present:n||l.open,children:(0,y.jsx)(d.Z,{asChild:!0,container:i,children:e})}))})};j.displayName=k;var P="DialogOverlay",O=r.forwardRef((e,t)=>{let n=T(P,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=C(P,e.__scopeDialog);return i.modal?(0,y.jsx)(f.C,{present:r||i.open,children:(0,y.jsx)(M,{...o,ref:t})}):null});O.displayName=P;var L=(0,g.TL)("DialogOverlay.RemoveScroll"),M=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(P,n);return(0,y.jsx)(m.A,{as:L,allowPinchZoom:!0,shards:[o.contentRef],children:(0,y.jsx)(p.sG.div,{"data-state":q(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),D="DialogContent",I=r.forwardRef((e,t)=>{let n=T(D,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=C(D,e.__scopeDialog);return(0,y.jsx)(f.C,{present:r||i.open,children:i.modal?(0,y.jsx)(F,{...o,ref:t}):(0,y.jsx)(W,{...o,ref:t})})});I.displayName=D;var F=r.forwardRef((e,t)=>{let n=C(D,e.__scopeDialog),l=r.useRef(null),a=(0,i.s)(t,n.contentRef,l);return r.useEffect(()=>{let e=l.current;if(e)return(0,v.Eq)(e)},[]),(0,y.jsx)(_,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.mK)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,o.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,o.mK)(e.onFocusOutside,e=>e.preventDefault())})}),W=r.forwardRef((e,t)=>{let n=C(D,e.__scopeDialog),o=r.useRef(!1),i=r.useRef(!1);return(0,y.jsx)(_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,l;null==(r=e.onCloseAutoFocus)||r.call(e,t),t.defaultPrevented||(o.current||null==(l=n.triggerRef.current)||l.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{var r,l;null==(r=e.onInteractOutside)||r.call(e,t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;(null==(l=n.triggerRef.current)?void 0:l.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),_=r.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:a,...u}=e,d=C(D,n),f=r.useRef(null),p=(0,i.s)(t,f);return(0,h.Oh)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c.n,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:a,children:(0,y.jsx)(s.qW,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":q(d.open),...u,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)($,{titleId:d.titleId}),(0,y.jsx)(Z,{contentRef:f,descriptionId:d.descriptionId})]})]})}),B="DialogTitle",K=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(B,n);return(0,y.jsx)(p.sG.h2,{id:o.titleId,...r,ref:t})});K.displayName=B;var H="DialogDescription",z=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=C(H,n);return(0,y.jsx)(p.sG.p,{id:o.descriptionId,...r,ref:t})});z.displayName=H;var G="DialogClose",V=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=C(G,n);return(0,y.jsx)(p.sG.button,{type:"button",...r,ref:t,onClick:(0,o.mK)(e.onClick,()=>i.onOpenChange(!1))})});function q(e){return e?"open":"closed"}V.displayName=G;var U="DialogTitleWarning",[X,Y]=(0,l.q)(U,{contentName:D,titleName:B,docsSlug:"dialog"}),$=e=>{let{titleId:t}=e,n=Y(U),o="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return r.useEffect(()=>{t&&(document.getElementById(t)||console.error(o))},[o,t]),null},Z=e=>{let{contentRef:t,descriptionId:n}=e,o=Y("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(o.contentName,"}.");return r.useEffect(()=>{var e;let r=null==(e=t.current)?void 0:e.getAttribute("aria-describedby");n&&r&&(document.getElementById(n)||console.warn(i))},[i,t,n]),null},J=R,Q=A,ee=j,et=O,en=I,er=K,eo=z,ei=V},26057:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},28043:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},32056:(e,t,n)=>{n.d(t,{i:()=>a});var r,o=n(55931),i=n(6806),l=(r||(r=n.t(o,2)))[" useInsertionEffect ".trim().toString()]||i.N;function a({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,u]=function({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return l(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,c=s?e:i;{let t=o.useRef(void 0!==e);o.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}return[c,o.useCallback(t=>{if(s){let n="function"==typeof t?t(e):t;n!==e&&u.current?.(n)}else a(t)},[s,e,a,u])]}Symbol("RADIX:SYNC_STATE")},38191:(e,t,n)=>{n.d(t,{UC:()=>nl,In:()=>no,q7:()=>nu,VF:()=>nc,p4:()=>ns,ZL:()=>ni,bL:()=>nt,wn:()=>nf,PP:()=>nd,l9:()=>nn,WT:()=>nr,LM:()=>na});var r,o=n(55931),i=n(93914);function l(e,[t,n]){return Math.min(n,Math.max(t,e))}var a=n(3908);function u(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function s(e,t){var n=u(e,t,"get");return n.get?n.get.call(e):n.value}function c(e,t,n){var r=u(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}var d=n(89379),f=n(90229),p=n(8607),h=n(89835),m=new WeakMap;function v(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=g(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function g(e){return e!=e||0===e?0:Math.trunc(e)}r=new WeakMap,class e extends Map{set(e,t){return m.get(this)&&(this.has(e)?s(this,r)[s(this,r).indexOf(e)]=e:s(this,r).push(e)),super.set(e,t),this}insert(e,t,n){let o,i=this.has(t),l=s(this,r).length,a=g(e),u=a>=0?a:l+a,c=u<0||u>=l?-1:u;if(c===this.size||i&&c===this.size-1||-1===c)return this.set(t,n),this;let d=this.size+ +!i;a<0&&u++;let f=[...s(this,r)],p=!1;for(let e=u;e<d;e++)if(u===e){let r=f[e];f[e]===t&&(r=f[e+1]),i&&this.delete(t),o=this.get(r),this.set(t,n)}else{p||f[e-1]!==t||(p=!0);let n=f[p?e:e-1],r=o;o=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(e){let t=s(this,r).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let o=s(this,r).indexOf(e);return -1===o?this:this.insert(o,t,n)}after(e){let t=s(this,r).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,n){let o=s(this,r).indexOf(e);return -1===o?this:this.insert(o+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return c(this,r,[]),super.clear()}delete(e){let t=super.delete(e);return t&&s(this,r).splice(s(this,r).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=v(s(this,r),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=v(s(this,r),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return s(this,r).indexOf(e)}keyAt(e){return v(s(this,r),e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],o=0;for(let e of this)Reflect.apply(t,n,[e,o,this])&&r.push(e),o++;return new e(r)}map(t,n){let r=[],o=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,o,this])]),o++;return new e(r)}reduce(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,i=0,l=null!=o?o:this.at(0);for(let e of this)l=0===i&&1===t.length?e:Reflect.apply(r,this,[l,e,i,this]),i++;return l}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,i=null!=o?o:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);i=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[i,n,e,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=[...this.entries()];return o.splice(...n),new e(o)}slice(t,n){let r=new e,o=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(o=n-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}constructor(e){super(e),function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,r,{writable:!0,value:void 0}),c(this,r,[...super.keys()]),m.set(this,!0)}};var y=o.createContext(void 0),w=n(98493),x=n(41478),b=n(41548),E=n(60452);let C=["top","right","bottom","left"],R=Math.min,S=Math.max,A=Math.round,k=Math.floor,N=e=>({x:e,y:e}),T={left:"right",right:"left",bottom:"top",top:"bottom"},j={start:"end",end:"start"};function P(e,t){return"function"==typeof e?e(t):e}function O(e){return e.split("-")[0]}function L(e){return e.split("-")[1]}function M(e){return"x"===e?"y":"x"}function D(e){return"y"===e?"height":"width"}let I=new Set(["top","bottom"]);function F(e){return I.has(O(e))?"y":"x"}function W(e){return e.replace(/start|end/g,e=>j[e])}let _=["left","right"],B=["right","left"],K=["top","bottom"],H=["bottom","top"];function z(e){return e.replace(/left|right|bottom|top/g,e=>T[e])}function G(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function V(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function q(e,t,n){let r,{reference:o,floating:i}=e,l=F(t),a=M(F(t)),u=D(a),s=O(t),c="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[u]/2-i[u]/2;switch(s){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(L(t)){case"start":r[a]-=p*(n&&c?-1:1);break;case"end":r[a]+=p*(n&&c?-1:1)}return r}let U=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=q(s,r,u),f=r,p={},h=0;for(let n=0;n<a.length;n++){let{name:i,fn:m}=a[n],{x:v,y:g,data:y,reset:w}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});c=null!=v?v:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...y}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:c,y:d}=q(s,f,u)),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function X(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=P(t,e),h=G(p),m=a[f?"floating"===d?"reference":"floating":d],v=V(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:s,rootBoundary:c,strategy:u})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await (null==i.isElement?void 0:i.isElement(y))&&await (null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=V(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:u}):g);return{top:(v.top-x.top+h.top)/w.y,bottom:(x.bottom-v.bottom+h.bottom)/w.y,left:(v.left-x.left+h.left)/w.x,right:(x.right-v.right+h.right)/w.x}}function Y(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $(e){return C.some(t=>e[t]>=0)}let Z=new Set(["left","top"]);async function J(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=O(n),a=L(n),u="y"===F(n),s=Z.has(l)?-1:1,c=i&&u?-1:1,d=P(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),u?{x:p*c,y:f*s}:{x:f*s,y:p*c}}function Q(){return"undefined"!=typeof window}function ee(e){return er(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function en(e){var t;return null==(t=(er(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function er(e){return!!Q()&&(e instanceof Node||e instanceof et(e).Node)}function eo(e){return!!Q()&&(e instanceof Element||e instanceof et(e).Element)}function ei(e){return!!Q()&&(e instanceof HTMLElement||e instanceof et(e).HTMLElement)}function el(e){return!!Q()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof et(e).ShadowRoot)}let ea=new Set(["inline","contents"]);function eu(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ew(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ea.has(o)}let es=new Set(["table","td","th"]),ec=[":popover-open",":modal"];function ed(e){return ec.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let ef=["transform","translate","scale","rotate","perspective"],ep=["transform","translate","scale","rotate","perspective","filter"],eh=["paint","layout","strict","content"];function em(e){let t=ev(),n=eo(e)?ew(e):e;return ef.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||ep.some(e=>(n.willChange||"").includes(e))||eh.some(e=>(n.contain||"").includes(e))}function ev(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let eg=new Set(["html","body","#document"]);function ey(e){return eg.has(ee(e))}function ew(e){return et(e).getComputedStyle(e)}function ex(e){return eo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eb(e){if("html"===ee(e))return e;let t=e.assignedSlot||e.parentNode||el(e)&&e.host||en(e);return el(t)?t.host:t}function eE(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=eb(t);return ey(n)?t.ownerDocument?t.ownerDocument.body:t.body:ei(n)&&eu(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=et(o);if(i){let e=eC(l);return t.concat(l,l.visualViewport||[],eu(o)?o:[],e&&n?eE(e):[])}return t.concat(o,eE(o,[],n))}function eC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eR(e){let t=ew(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ei(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=A(n)!==i||A(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function eS(e){return eo(e)?e:e.contextElement}function eA(e){let t=eS(e);if(!ei(t))return N(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=eR(t),l=(i?A(n.width):n.width)/r,a=(i?A(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}let ek=N(0);function eN(e){let t=et(e);return ev()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ek}function eT(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=eS(e),a=N(1);t&&(r?eo(r)&&(a=eA(r)):a=eA(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===et(l))&&o)?eN(l):N(0),s=(i.left+u.x)/a.x,c=(i.top+u.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(l){let e=et(l),t=r&&eo(r)?et(r):r,n=e,o=eC(n);for(;o&&r&&t!==n;){let e=eA(o),t=o.getBoundingClientRect(),r=ew(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,f*=e.y,s+=i,c+=l,o=eC(n=et(o))}}return V({width:d,height:f,x:s,y:c})}function ej(e,t){let n=ex(e).scrollLeft;return t?t.left+n:eT(en(e)).left+n}function eP(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ej(e,n),y:n.top+t.scrollTop}}let eO=new Set(["absolute","fixed"]);function eL(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=et(e),r=en(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=ev();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}let s=ej(r);if(s<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else s<=25&&(i+=s);return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=en(e),n=ex(e),r=e.ownerDocument.body,o=S(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=S(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+ej(e),a=-n.scrollTop;return"rtl"===ew(r).direction&&(l+=S(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(en(e));else if(eo(t))r=function(e,t){let n=eT(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ei(e)?eA(e):N(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y;return{width:l,height:a,x:o*i.x,y:r*i.y}}(t,n);else{let n=eN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return V(r)}function eM(e){return"static"===ew(e).position}function eD(e,t){if(!ei(e)||"fixed"===ew(e).position)return null;if(t)return t(e);let n=e.offsetParent;return en(e)===n&&(n=n.ownerDocument.body),n}function eI(e,t){var n;let r=et(e);if(ed(e))return r;if(!ei(e)){let t=eb(e);for(;t&&!ey(t);){if(eo(t)&&!eM(t))return t;t=eb(t)}return r}let o=eD(e,t);for(;o&&(n=o,es.has(ee(n)))&&eM(o);)o=eD(o,t);return o&&ey(o)&&eM(o)&&!em(o)?r:o||function(e){let t=eb(e);for(;ei(t)&&!ey(t);){if(em(t))return t;if(ed(t))break;t=eb(t)}return null}(e)||r}let eF=async function(e){let t=this.getOffsetParent||eI,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=ei(t),o=en(t),i="fixed"===n,l=eT(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=N(0);if(r||!r&&!i)if(("body"!==ee(t)||eu(o))&&(a=ex(t)),r){let e=eT(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=ej(o));i&&!r&&o&&(u.x=ej(o));let s=!o||r||i?N(0):eP(o,a);return{x:l.left+a.scrollLeft-u.x-s.x,y:l.top+a.scrollTop-u.y-s.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eW={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=en(r),a=!!t&&ed(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},s=N(1),c=N(0),d=ei(r);if((d||!d&&!i)&&(("body"!==ee(r)||eu(l))&&(u=ex(r)),ei(r))){let e=eT(r);s=eA(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!l||d||i?N(0):eP(l,u);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+c.x+f.x,y:n.y*s.y-u.scrollTop*s.y+c.y+f.y}},getDocumentElement:en,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?ed(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eE(e,[],!1).filter(e=>eo(e)&&"body"!==ee(e)),o=null,i="fixed"===ew(e).position,l=i?eb(e):e;for(;eo(l)&&!ey(l);){let t=ew(l),n=em(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&eO.has(o.position)||eu(l)&&!n&&function e(t,n){let r=eb(t);return!(r===n||!eo(r)||ey(r))&&("fixed"===ew(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=eb(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce((e,n)=>{let r=eL(t,n,o);return e.top=S(r.top,e.top),e.right=R(r.right,e.right),e.bottom=R(r.bottom,e.bottom),e.left=S(r.left,e.left),e},eL(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:eI,getElementRects:eF,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eR(e);return{width:t,height:n}},getScale:eA,isElement:eo,isRTL:function(e){return"rtl"===ew(e).direction}};function e_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eB=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:u}=t,{element:s,padding:c=0}=P(e,t)||{};if(null==s)return{};let d=G(c),f={x:n,y:r},p=M(F(o)),h=D(p),m=await l.getDimensions(s),v="y"===p,g=v?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],x=await (null==l.getOffsetParent?void 0:l.getOffsetParent(s)),b=x?x[g]:0;b&&await (null==l.isElement?void 0:l.isElement(x))||(b=a.floating[g]||i.floating[h]);let E=b/2-m[h]/2-1,C=R(d[v?"top":"left"],E),A=R(d[v?"bottom":"right"],E),k=b-m[h]-A,N=b/2-m[h]/2+(y/2-w/2),T=S(C,R(N,k)),j=!u.arrow&&null!=L(o)&&N!==T&&i.reference[h]/2-(N<C?C:A)-m[h]/2<0,O=j?N<C?N-C:N-k:0;return{[p]:f[p]+O,data:{[p]:T,centerOffset:N-T-O,...j&&{alignmentOffset:O}},reset:j}}});var eK="undefined"!=typeof document?o.useLayoutEffect:function(){};function eH(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eH(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eH(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ez(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eG(e,t){let n=ez(e);return Math.round(t*n)/n}function eV(e){let t=o.useRef(e);return eK(()=>{t.current=e}),t}var eq=n(78837),eU=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,h.jsx)(eq.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,h.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eU.displayName="Arrow";var eX=n(63368),eY=n(6806),e$=n(7776),eZ="Popper",[eJ,eQ]=(0,d.A)(eZ),[e0,e1]=eJ(eZ),e2=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,h.jsx)(e0,{scope:t,anchor:r,onAnchorChange:i,children:n})};e2.displayName=eZ;var e3="PopperAnchor",e9=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,l=e1(e3,n),a=o.useRef(null),u=(0,f.s)(t,a),s=o.useRef(null);return o.useEffect(()=>{let e=s.current;s.current=(null==r?void 0:r.current)||a.current,e!==s.current&&l.onAnchorChange(s.current)}),r?null:(0,h.jsx)(eq.sG.div,{...i,ref:u})});e9.displayName=e3;var e5="PopperContent",[e8,e6]=eJ(e5),e4=o.forwardRef((e,t)=>{var n,r,l,a,u,s,c,d;let{__scopePopper:p,side:m="bottom",sideOffset:v=0,align:g="center",alignOffset:y=0,arrowPadding:w=0,avoidCollisions:x=!0,collisionBoundary:b=[],collisionPadding:E=0,sticky:C="partial",hideWhenDetached:A=!1,updatePositionStrategy:N="optimized",onPlaced:T,...j}=e,I=e1(e5,p),[G,V]=o.useState(null),q=(0,f.s)(t,e=>V(e)),[Q,ee]=o.useState(null),et=(0,e$.X)(Q),er=null!=(c=null==et?void 0:et.width)?c:0,eo=null!=(d=null==et?void 0:et.height)?d:0,ei="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},el=Array.isArray(b)?b:[b],ea=el.length>0,eu={padding:ei,boundary:el.filter(tn),altBoundary:ea},{refs:es,floatingStyles:ec,placement:ed,isPositioned:ef,middlewareData:ep}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:a,floating:u}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=o.useState(r);eH(h,r)||m(r);let[v,g]=o.useState(null),[y,w]=o.useState(null),x=o.useCallback(e=>{e!==R.current&&(R.current=e,g(e))},[]),b=o.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),E=a||v,C=u||y,R=o.useRef(null),S=o.useRef(null),A=o.useRef(f),k=null!=c,N=eV(c),T=eV(l),j=eV(d),P=o.useCallback(()=>{if(!R.current||!S.current)return;let e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),((e,t,n)=>{let r=new Map,o={platform:eW,...n},i={...o.platform,_c:r};return U(e,t,{...o,platform:i})})(R.current,S.current,e).then(e=>{let t={...e,isPositioned:!1!==j.current};O.current&&!eH(A.current,t)&&(A.current=t,i.flushSync(()=>{p(t)}))})},[h,t,n,T,j]);eK(()=>{!1===d&&A.current.isPositioned&&(A.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let O=o.useRef(!1);eK(()=>(O.current=!0,()=>{O.current=!1}),[]),eK(()=>{if(E&&(R.current=E),C&&(S.current=C),E&&C){if(N.current)return N.current(E,C,P);P()}},[E,C,P,N,k]);let L=o.useMemo(()=>({reference:R,floating:S,setReference:x,setFloating:b}),[x,b]),M=o.useMemo(()=>({reference:E,floating:C}),[E,C]),D=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=eG(M.floating,f.x),r=eG(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ez(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,M.floating,f.x,f.y]);return o.useMemo(()=>({...f,update:P,refs:L,elements:M,floatingStyles:D}),[f,P,L,M,D])}({strategy:"fixed",placement:m+("center"!==g?"-"+g:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=eS(e),d=i||l?[...c?eE(c):[],...eE(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let f=c&&u?function(e,t){let n,r=null,o=en(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),i();let s=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=s;if(a||t(),!f||!p)return;let h=k(d),m=k(o.clientWidth-(c+f)),v={rootMargin:-h+"px "+-m+"px "+-k(o.clientHeight-(d+p))+"px "+-k(c)+"px",threshold:S(0,R(1,u))||1},g=!0;function y(t){let r=t[0].intersectionRatio;if(r!==u){if(!g)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||e_(s,e.getBoundingClientRect())||l(),g=!1}try{r=new IntersectionObserver(y,{...v,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,v)}r.observe(e)}(!0),i}(c,n):null,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!s&&h.observe(c),h.observe(t));let m=s?eT(e):null;return s&&function t(){let r=eT(e);m&&!e_(m,r)&&n(),m=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===N})},elements:{reference:I.anchor},middleware:[((e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,u=await J(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}}(e),options:[e,t]}))({mainAxis:v+eo,alignmentAxis:y}),x&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=P(e,t),s={x:n,y:r},c=await X(t,u),d=F(O(o)),f=M(d),p=s[f],h=s[d];if(i){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+c[e],r=p-c[t];p=S(n,R(p,r))}if(l){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=h+c[e],r=h-c[t];h=S(n,R(h,r))}let m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:l}}}}}}(e),options:[e,t]}))({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?((e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:s=!0}=P(e,t),c={x:n,y:r},d=F(o),f=M(d),p=c[f],h=c[d],m=P(a,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(s){var g,y;let e="y"===f?"width":"height",t=Z.has(O(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=l.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}}(e),options:[e,t]}))():void 0,...eu}),x&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:a,middlewareData:u,rects:s,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...w}=P(e,t);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let x=O(a),b=F(c),E=O(c)===c,C=await (null==d.isRTL?void 0:d.isRTL(f.floating)),R=m||(E||!y?[z(c)]:function(e){let t=z(e);return[W(e),t,W(t)]}(c)),S="none"!==g;!m&&S&&R.push(...function(e,t,n,r){let o=L(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?B:_;return t?_:B;case"left":case"right":return t?K:H;default:return[]}}(O(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(W)))),i}(c,y,g,C));let A=[c,...R],k=await X(t,w),N=[],T=(null==(r=u.flip)?void 0:r.overflows)||[];if(p&&N.push(k[x]),h){let e=function(e,t,n){void 0===n&&(n=!1);let r=L(e),o=M(F(e)),i=D(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=z(l)),[l,z(l)]}(a,s,C);N.push(k[e[0]],k[e[1]])}if(T=[...T,{placement:a,overflows:N}],!N.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=A[e];if(t&&("alignment"!==h||b===F(t)||T.every(e=>F(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(i=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(v){case"bestFit":{let e=null==(l=T.filter(e=>{if(S){let t=F(e.placement);return t===b||"y"===t}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])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}))({...eu}),((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i,{placement:l,rects:a,platform:u,elements:s}=t,{apply:c=()=>{},...d}=P(e,t),f=await X(t,d),p=O(l),h=L(l),m="y"===F(l),{width:v,height:g}=a.floating;"top"===p||"bottom"===p?(o=p,i=h===(await (null==u.isRTL?void 0:u.isRTL(s.floating))?"start":"end")?"left":"right"):(i=p,o="end"===h?"top":"bottom");let y=g-f.top-f.bottom,w=v-f.left-f.right,x=R(g-f[o],y),b=R(v-f[i],w),E=!t.middlewareData.shift,C=x,A=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(A=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=y),E&&!h){let e=S(f.left,0),t=S(f.right,0),n=S(f.top,0),r=S(f.bottom,0);m?A=v-2*(0!==e||0!==t?e+t:S(f.left,f.right)):C=g-2*(0!==n||0!==r?n+r:S(f.top,f.bottom))}await c({...t,availableWidth:A,availableHeight:C});let k=await u.getDimensions(s.floating);return v!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}))({...eu,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),Q&&((e,t)=>({...(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eB({element:n.current,padding:r}).fn(t):{}:n?eB({element:n,padding:r}).fn(t):{}}}))(e),options:[e,t]}))({element:Q,padding:w}),tr({arrowWidth:er,arrowHeight:eo}),A&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=P(e,t);switch(r){case"referenceHidden":{let e=Y(await X(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:$(e)}}}case"escaped":{let e=Y(await X(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:$(e)}}}default:return{}}}}}(e),options:[e,t]}))({strategy:"referenceHidden",...eu})]}),[eh,em]=to(ed),ev=(0,eX.c)(T);(0,eY.N)(()=>{ef&&(null==ev||ev())},[ef,ev]);let eg=null==(n=ep.arrow)?void 0:n.x,ey=null==(r=ep.arrow)?void 0:r.y,ew=(null==(l=ep.arrow)?void 0:l.centerOffset)!==0,[ex,eb]=o.useState();return(0,eY.N)(()=>{G&&eb(window.getComputedStyle(G).zIndex)},[G]),(0,h.jsx)("div",{ref:es.setFloating,"data-radix-popper-content-wrapper":"",style:{...ec,transform:ef?ec.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ex,"--radix-popper-transform-origin":[null==(a=ep.transformOrigin)?void 0:a.x,null==(u=ep.transformOrigin)?void 0:u.y].join(" "),...(null==(s=ep.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,h.jsx)(e8,{scope:p,placedSide:eh,onArrowChange:ee,arrowX:eg,arrowY:ey,shouldHideArrow:ew,children:(0,h.jsx)(eq.sG.div,{"data-side":eh,"data-align":em,...j,ref:q,style:{...j.style,animation:ef?void 0:"none"}})})})});e4.displayName=e5;var e7="PopperArrow",te={top:"bottom",right:"left",bottom:"top",left:"right"},tt=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=e6(e7,n),i=te[o.placedSide];return(0,h.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,h.jsx)(eU,{...r,ref:t,style:{...r.style,display:"block"}})})});function tn(e){return null!==e}tt.displayName=e7;var tr=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:s}=t,c=(null==(n=s.arrow)?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=to(a),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!=(i=null==(r=s.arrow)?void 0:r.x)?i:0)+d/2,g=(null!=(l=null==(o=s.arrow)?void 0:o.y)?l:0)+f/2,y="",w="";return"bottom"===p?(y=c?m:"".concat(v,"px"),w="".concat(-f,"px")):"top"===p?(y=c?m:"".concat(v,"px"),w="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=c?m:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),w=c?m:"".concat(g,"px")),{data:{x:y,y:w}}}});function to(e){let[t,n="center"]=e.split("-");return[t,n]}var ti=n(79211),tl=n(32056),ta=n(41544),tu=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});o.forwardRef((e,t)=>(0,h.jsx)(eq.sG.span,{...e,ref:t,style:{...tu,...e.style}})).displayName="VisuallyHidden";var ts=n(12344),tc=n(17256),td=[" ","Enter","ArrowUp","ArrowDown"],tf=[" ","Enter"],tp="Select",[th,tm,tv]=function(e){let t=e+"CollectionProvider",[n,r]=(0,d.A)(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:n}=e,r=o.useRef(null),l=o.useRef(new Map).current;return(0,h.jsx)(i,{scope:t,itemMap:l,collectionRef:r,children:n})};a.displayName=t;let u=e+"CollectionSlot",s=(0,p.TL)(u),c=o.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=l(u,n),i=(0,f.s)(t,o.collectionRef);return(0,h.jsx)(s,{ref:i,children:r})});c.displayName=u;let m=e+"CollectionItemSlot",v="data-radix-collection-item",g=(0,p.TL)(m),y=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=o.useRef(null),u=(0,f.s)(t,a),s=l(m,n);return o.useEffect(()=>(s.itemMap.set(a,{ref:a,...i}),()=>void s.itemMap.delete(a))),(0,h.jsx)(g,{...{[v]:""},ref:u,children:r})});return y.displayName=m,[{Provider:a,Slot:c,ItemSlot:y},function(t){let n=l(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(v,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(tp),[tg,ty]=(0,d.A)(tp,[tv,eQ]),tw=eQ(),[tx,tb]=tg(tp),[tE,tC]=tg(tp),tR=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:l,value:a,defaultValue:u,onValueChange:s,dir:c,name:d,autoComplete:f,disabled:p,required:m,form:v}=e,g=tw(t),[w,x]=o.useState(null),[b,C]=o.useState(null),[R,S]=o.useState(!1),A=function(e){let t=o.useContext(y);return e||t||"ltr"}(c),[k,N]=(0,tl.i)({prop:r,defaultProp:null!=i&&i,onChange:l,caller:tp}),[T,j]=(0,tl.i)({prop:a,defaultProp:u,onChange:s,caller:tp}),P=o.useRef(null),O=!w||v||!!w.closest("form"),[L,M]=o.useState(new Set),D=Array.from(L).map(e=>e.props.value).join(";");return(0,h.jsx)(e2,{...g,children:(0,h.jsxs)(tx,{required:m,scope:t,trigger:w,onTriggerChange:x,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:S,contentId:(0,E.B)(),value:T,onValueChange:j,open:k,onOpenChange:N,dir:A,triggerPointerDownPosRef:P,disabled:p,children:[(0,h.jsx)(th.Provider,{scope:t,children:(0,h.jsx)(tE,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:o.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?(0,h.jsxs)(t6,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:T,onChange:e=>j(e.target.value),disabled:p,form:v,children:[void 0===T?(0,h.jsx)("option",{value:""}):null,Array.from(L)]},D):null]})})};tR.displayName=tp;var tS="SelectTrigger",tA=o.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,l=tw(n),u=tb(tS,n),s=u.disabled||r,c=(0,f.s)(t,u.onTriggerChange),d=tm(n),p=o.useRef("touch"),[m,v,g]=t7(e=>{let t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=ne(t,e,n);void 0!==r&&u.onValueChange(r.value)}),y=e=>{s||(u.onOpenChange(!0),g()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,h.jsx)(e9,{asChild:!0,...l,children:(0,h.jsx)(eq.sG.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":t4(u.value)?"":void 0,...i,ref:c,onClick:(0,a.mK)(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)}),onPointerDown:(0,a.mK)(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,a.mK)(i.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&td.includes(e.key)&&(y(),e.preventDefault())})})})});tA.displayName=tS;var tk="SelectValue",tN=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,u=tb(tk,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==i,d=(0,f.s)(t,u.onValueNodeChange);return(0,eY.N)(()=>{s(c)},[s,c]),(0,h.jsx)(eq.sG.span,{...a,ref:d,style:{pointerEvents:"none"},children:t4(u.value)?(0,h.jsx)(h.Fragment,{children:l}):i})});tN.displayName=tk;var tT=o.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,h.jsx)(eq.sG.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tT.displayName="SelectIcon";var tj=e=>(0,h.jsx)(ti.Z,{asChild:!0,...e});tj.displayName="SelectPortal";var tP="SelectContent",tO=o.forwardRef((e,t)=>{let n=tb(tP,e.__scopeSelect),[r,l]=o.useState();return((0,eY.N)(()=>{l(new DocumentFragment)},[]),n.open)?(0,h.jsx)(tI,{...e,ref:t}):r?i.createPortal((0,h.jsx)(tL,{scope:e.__scopeSelect,children:(0,h.jsx)(th.Slot,{scope:e.__scopeSelect,children:(0,h.jsx)("div",{children:e.children})})}),r):null});tO.displayName=tP;var[tL,tM]=tg(tP),tD=(0,p.TL)("SelectContent.RemoveScroll"),tI=o.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:l,onPointerDownOutside:u,side:s,sideOffset:c,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:g,sticky:y,hideWhenDetached:E,avoidCollisions:C,...R}=e,S=tb(tP,n),[A,k]=o.useState(null),[N,T]=o.useState(null),j=(0,f.s)(t,e=>k(e)),[P,O]=o.useState(null),[L,M]=o.useState(null),D=tm(n),[I,F]=o.useState(!1),W=o.useRef(!1);o.useEffect(()=>{if(A)return(0,ts.Eq)(A)},[A]),(0,x.Oh)();let _=o.useCallback(e=>{let[t,...n]=D().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===r&&N&&(N.scrollTop=N.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[D,N]),B=o.useCallback(()=>_([P,A]),[_,P,A]);o.useEffect(()=>{I&&B()},[I,B]);let{onOpenChange:K,triggerPointerDownPosRef:H}=S;o.useEffect(()=>{if(A){let e={x:0,y:0},t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!=(o=null==(n=H.current)?void 0:n.x)?o:0)),y:Math.abs(Math.round(t.pageY)-(null!=(i=null==(r=H.current)?void 0:r.y)?i:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():A.contains(n.target)||K(!1),document.removeEventListener("pointermove",t),H.current=null};return null!==H.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[A,K,H]),o.useEffect(()=>{let e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[K]);let[z,G]=t7(e=>{let t=D().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ne(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),V=o.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==S.value&&S.value===t||r)&&(O(e),r&&(W.current=!0))},[S.value]),q=o.useCallback(()=>null==A?void 0:A.focus(),[A]),U=o.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==S.value&&S.value===t||r)&&M(e)},[S.value]),X="popper"===r?tW:tF,Y=X===tW?{side:s,sideOffset:c,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:g,sticky:y,hideWhenDetached:E,avoidCollisions:C}:{};return(0,h.jsx)(tL,{scope:n,content:A,viewport:N,onViewportChange:T,itemRefCallback:V,selectedItem:P,onItemLeave:q,itemTextRefCallback:U,focusSelectedItem:B,selectedItemText:L,position:r,isPositioned:I,searchRef:z,children:(0,h.jsx)(tc.A,{as:tD,allowPinchZoom:!0,children:(0,h.jsx)(b.n,{asChild:!0,trapped:S.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.mK)(i,e=>{var t;null==(t=S.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,h.jsx)(w.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:(0,h.jsx)(X,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:e=>e.preventDefault(),...R,...Y,onPlaced:()=>F(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,a.mK)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||G(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>_(t)),e.preventDefault()}})})})})})})});tI.displayName="SelectContentImpl";var tF=o.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=tb(tP,n),u=tM(tP,n),[s,c]=o.useState(null),[d,p]=o.useState(null),m=(0,f.s)(t,e=>p(e)),v=tm(n),g=o.useRef(!1),y=o.useRef(!0),{viewport:w,selectedItem:x,selectedItemText:b,focusSelectedItem:E}=u,C=o.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&d&&w&&x&&b){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=b.getBoundingClientRect();if("rtl"!==a.dir){let r=o.left-t.left,i=n.left-r,a=e.left-i,u=e.width+a,c=Math.max(u,t.width),d=l(i,[10,Math.max(10,window.innerWidth-10-c)]);s.style.minWidth=u+"px",s.style.left=d+"px"}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,u=e.width+a,c=Math.max(u,t.width),d=l(i,[10,Math.max(10,window.innerWidth-10-c)]);s.style.minWidth=u+"px",s.style.right=d+"px"}let i=v(),u=window.innerHeight-20,c=w.scrollHeight,f=window.getComputedStyle(d),p=parseInt(f.borderTopWidth,10),h=parseInt(f.paddingTop,10),m=parseInt(f.borderBottomWidth,10),y=p+h+c+parseInt(f.paddingBottom,10)+m,E=Math.min(5*x.offsetHeight,y),C=window.getComputedStyle(w),R=parseInt(C.paddingTop,10),S=parseInt(C.paddingBottom,10),A=e.top+e.height/2-10,k=x.offsetHeight/2,N=p+h+(x.offsetTop+k);if(N<=A){let e=i.length>0&&x===i[i.length-1].ref.current;s.style.bottom="0px";let t=Math.max(u-A,k+(e?S:0)+(d.clientHeight-w.offsetTop-w.offsetHeight)+m);s.style.height=N+t+"px"}else{let e=i.length>0&&x===i[0].ref.current;s.style.top="0px";let t=Math.max(A,p+w.offsetTop+(e?R:0)+k);s.style.height=t+(y-N)+"px",w.scrollTop=N-A+w.offsetTop}s.style.margin="".concat(10,"px 0"),s.style.minHeight=E+"px",s.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame(()=>g.current=!0)}},[v,a.trigger,a.valueNode,s,d,w,x,b,a.dir,r]);(0,eY.N)(()=>C(),[C]);let[R,S]=o.useState();(0,eY.N)(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);let A=o.useCallback(e=>{e&&!0===y.current&&(C(),null==E||E(),y.current=!1)},[C,E]);return(0,h.jsx)(t_,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:(0,h.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,h.jsx)(eq.sG.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});tF.displayName="SelectItemAlignedPosition";var tW=o.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...i}=e,l=tw(n);return(0,h.jsx)(e4,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tW.displayName="SelectPopperPosition";var[t_,tB]=tg(tP,{}),tK="SelectViewport",tH=o.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,l=tM(tK,n),u=tB(tK,n),s=(0,f.s)(t,l.onViewportChange),c=o.useRef(0);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,h.jsx)(th.Slot,{scope:n,children:(0,h.jsx)(eq.sG.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:(0,a.mK)(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if((null==r?void 0:r.current)&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let i=o+e,l=Math.min(r,i),a=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});tH.displayName=tK;var tz="SelectGroup",[tG,tV]=tg(tz);o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=(0,E.B)();return(0,h.jsx)(tG,{scope:n,id:o,children:(0,h.jsx)(eq.sG.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=tz;var tq="SelectLabel";o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=tV(tq,n);return(0,h.jsx)(eq.sG.div,{id:o.id,...r,ref:t})}).displayName=tq;var tU="SelectItem",[tX,tY]=tg(tU),t$=o.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:l,...u}=e,s=tb(tU,n),c=tM(tU,n),d=s.value===r,[p,m]=o.useState(null!=l?l:""),[v,g]=o.useState(!1),y=(0,f.s)(t,e=>{var t;return null==(t=c.itemRefCallback)?void 0:t.call(c,e,r,i)}),w=(0,E.B)(),x=o.useRef("touch"),b=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,h.jsx)(tX,{scope:n,value:r,disabled:i,textId:w,isSelected:d,onItemTextChange:o.useCallback(e=>{m(t=>{var n;return t||(null!=(n=null==e?void 0:e.textContent)?n:"").trim()})},[]),children:(0,h.jsx)(th.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:(0,h.jsx)(eq.sG.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:y,onFocus:(0,a.mK)(u.onFocus,()=>g(!0)),onBlur:(0,a.mK)(u.onBlur,()=>g(!1)),onClick:(0,a.mK)(u.onClick,()=>{"mouse"!==x.current&&b()}),onPointerUp:(0,a.mK)(u.onPointerUp,()=>{"mouse"===x.current&&b()}),onPointerDown:(0,a.mK)(u.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:(0,a.mK)(u.onPointerMove,e=>{if(x.current=e.pointerType,i){var t;null==(t=c.onItemLeave)||t.call(c)}else"mouse"===x.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.mK)(u.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null==(t=c.onItemLeave)||t.call(c)}}),onKeyDown:(0,a.mK)(u.onKeyDown,e=>{var t;((null==(t=c.searchRef)?void 0:t.current)===""||" "!==e.key)&&(tf.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});t$.displayName=tU;var tZ="SelectItemText",tJ=o.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:l,...a}=e,u=tb(tZ,n),s=tM(tZ,n),c=tY(tZ,n),d=tC(tZ,n),[p,m]=o.useState(null),v=(0,f.s)(t,e=>m(e),c.onItemTextChange,e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,c.value,c.disabled)}),g=null==p?void 0:p.textContent,y=o.useMemo(()=>(0,h.jsx)("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:x}=d;return(0,eY.N)(()=>(w(y),()=>x(y)),[w,x,y]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(eq.sG.span,{id:c.textId,...a,ref:v}),c.isSelected&&u.valueNode&&!u.valueNodeHasChildren?i.createPortal(a.children,u.valueNode):null]})});tJ.displayName=tZ;var tQ="SelectItemIndicator",t0=o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return tY(tQ,n).isSelected?(0,h.jsx)(eq.sG.span,{"aria-hidden":!0,...r,ref:t}):null});t0.displayName=tQ;var t1="SelectScrollUpButton",t2=o.forwardRef((e,t)=>{let n=tM(t1,e.__scopeSelect),r=tB(t1,e.__scopeSelect),[i,l]=o.useState(!1),a=(0,f.s)(t,r.onScrollButtonChange);return(0,eY.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,h.jsx)(t5,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});t2.displayName=t1;var t3="SelectScrollDownButton",t9=o.forwardRef((e,t)=>{let n=tM(t3,e.__scopeSelect),r=tB(t3,e.__scopeSelect),[i,l]=o.useState(!1),a=(0,f.s)(t,r.onScrollButtonChange);return(0,eY.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,h.jsx)(t5,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});t9.displayName=t3;var t5=o.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,l=tM("SelectScrollButton",n),u=o.useRef(null),s=tm(n),c=o.useCallback(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return o.useEffect(()=>()=>c(),[c]),(0,eY.N)(()=>{var e;let t=s().find(e=>e.ref.current===document.activeElement);null==t||null==(e=t.ref.current)||e.scrollIntoView({block:"nearest"})},[s]),(0,h.jsx)(eq.sG.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,a.mK)(i.onPointerDown,()=>{null===u.current&&(u.current=window.setInterval(r,50))}),onPointerMove:(0,a.mK)(i.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===u.current&&(u.current=window.setInterval(r,50))}),onPointerLeave:(0,a.mK)(i.onPointerLeave,()=>{c()})})});o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,h.jsx)(eq.sG.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var t8="SelectArrow";o.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=tw(n),i=tb(t8,n),l=tM(t8,n);return i.open&&"popper"===l.position?(0,h.jsx)(tt,{...o,...r,ref:t}):null}).displayName=t8;var t6=o.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,...i}=e,l=o.useRef(null),a=(0,f.s)(t,l),u=(0,ta.Z)(r);return o.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[u,r]),(0,h.jsx)(eq.sG.select,{...i,style:{...tu,...i.style},ref:a,defaultValue:r})});function t4(e){return""===e||void 0===e}function t7(e){let t=(0,eX.c)(e),n=o.useRef(""),r=o.useRef(0),i=o.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),l=o.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,l]}function ne(e,t,n){var r,o;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,a=(r=e,o=Math.max(l,0),r.map((e,t)=>r[(o+t)%r.length]));1===i.length&&(a=a.filter(e=>e!==n));let u=a.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}t6.displayName="SelectBubbleInput";var nt=tR,nn=tA,nr=tN,no=tT,ni=tj,nl=tO,na=tH,nu=t$,ns=tJ,nc=t0,nd=t2,nf=t9},41478:(e,t,n)=>{n.d(t,{Oh:()=>i});var r=n(55931),o=0;function i(){r.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=n[0])?e:l()),document.body.insertAdjacentElement("beforeend",null!=(t=n[1])?t:l()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),o--}},[])}function l(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},41544:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(55931);function o(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},41548:(e,t,n)=>{n.d(t,{n:()=>d});var r=n(55931),o=n(90229),i=n(78837),l=n(63368),a=n(89835),u="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},d=r.forwardRef((e,t)=>{let{loop:n=!1,trapped:d=!1,onMountAutoFocus:v,onUnmountAutoFocus:g,...y}=e,[w,x]=r.useState(null),b=(0,l.c)(v),E=(0,l.c)(g),C=r.useRef(null),R=(0,o.s)(t,e=>x(e)),S=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(d){let e=function(e){if(S.paused||!w)return;let t=e.target;w.contains(t)?C.current=t:h(C.current,{select:!0})},t=function(e){if(S.paused||!w)return;let t=e.relatedTarget;null!==t&&(w.contains(t)||h(C.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&h(w)});return w&&n.observe(w,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[d,w,S.paused]),r.useEffect(()=>{if(w){m.add(S);let e=document.activeElement;if(!w.contains(e)){let t=new CustomEvent(u,c);w.addEventListener(u,b),w.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(h(r,{select:t}),document.activeElement!==n)return}(f(w).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&h(w))}return()=>{w.removeEventListener(u,b),setTimeout(()=>{let t=new CustomEvent(s,c);w.addEventListener(s,E),w.dispatchEvent(t),t.defaultPrevented||h(null!=e?e:document.body,{select:!0}),w.removeEventListener(s,E),m.remove(S)},0)}}},[w,b,E,S]);let A=r.useCallback(e=>{if(!n&&!d||S.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[o,i]=function(e){let t=f(e);return[p(t,e),p(t.reverse(),e)]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&h(i,{select:!0})):(e.preventDefault(),n&&h(o,{select:!0})):r===t&&e.preventDefault()}},[n,d,S.paused]);return(0,a.jsx)(i.sG.div,{tabIndex:-1,...y,ref:R,onKeyDown:A})});function f(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function h(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}d.displayName="FocusScope";var m=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=v(e,t)).unshift(t)},remove(t){var n;null==(n=(e=v(e,t))[0])||n.resume()}}}();function v(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}},55719:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},57378:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]])},58903:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},60452:(e,t,n)=>{n.d(t,{B:()=>u});var r,o=n(55931),i=n(6806),l=(r||(r=n.t(o,2)))[" useId ".trim().toString()]||(()=>void 0),a=0;function u(e){let[t,n]=o.useState(l());return(0,i.N)(()=>{e||n(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:"")}},62520:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},63368:(e,t,n)=>{n.d(t,{c:()=>o});var r=n(55931);function o(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},70038:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},71637:(e,t,n)=>{n.d(t,{C:()=>l});var r=n(55931),o=n(90229),i=n(6806),l=e=>{let{present:t,children:n}=e,l=function(e){var t,n;let[o,l]=r.useState(),u=r.useRef(null),s=r.useRef(e),c=r.useRef("none"),[d,f]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=a(u.current);c.current="mounted"===d?e:"none"},[d]),(0,i.N)(()=>{let t=u.current,n=s.current;if(n!==e){let r=c.current,o=a(t);e?f("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):n&&r!==o?f("ANIMATION_OUT"):f("UNMOUNT"),s.current=e}},[e,f]),(0,i.N)(()=>{if(o){var e;let t,n=null!=(e=o.ownerDocument.defaultView)?e:window,r=e=>{let r=a(u.current).includes(CSS.escape(e.animationName));if(e.target===o&&r&&(f("ANIMATION_END"),!s.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},i=e=>{e.target===o&&(c.current=a(u.current))};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{n.clearTimeout(t),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{u.current=e?getComputedStyle(e):null,l(e)},[])}}(t),u="function"==typeof n?n({present:l.isPresent}):r.Children.only(n),s=(0,o.s)(l.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(o=(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning)?e.props.ref:e.props.ref||e.ref}(u));return"function"==typeof n||l.isPresent?r.cloneElement(u,{ref:s}):null};function a(e){return(null==e?void 0:e.animationName)||"none"}l.displayName="Presence"},72676:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},76845:(e,t,n)=>{n.d(t,{Ke:()=>E,R6:()=>x,bL:()=>S});var r=n(55931),o=n(3908),i=n(89379),l=n(32056),a=n(6806),u=n(90229),s=n(78837),c=n(71637),d=n(60452),f=n(89835),p="Collapsible",[h,m]=(0,i.A)(p),[v,g]=h(p),y=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:a,onOpenChange:u,...c}=e,[h,m]=(0,l.i)({prop:o,defaultProp:null!=i&&i,onChange:u,caller:p});return(0,f.jsx)(v,{scope:n,disabled:a,contentId:(0,d.B)(),open:h,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),children:(0,f.jsx)(s.sG.div,{"data-state":R(h),"data-disabled":a?"":void 0,...c,ref:t})})});y.displayName=p;var w="CollapsibleTrigger",x=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=g(w,n);return(0,f.jsx)(s.sG.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:(0,o.mK)(e.onClick,i.onOpenToggle)})});x.displayName=w;var b="CollapsibleContent",E=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,o=g(b,e.__scopeCollapsible);return(0,f.jsx)(c.C,{present:n||o.open,children:e=>{let{present:n}=e;return(0,f.jsx)(C,{...r,ref:t,present:n})}})});E.displayName=b;var C=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:o,children:i,...l}=e,c=g(b,n),[d,p]=r.useState(o),h=r.useRef(null),m=(0,u.s)(t,h),v=r.useRef(0),y=v.current,w=r.useRef(0),x=w.current,E=c.open||d,C=r.useRef(E),S=r.useRef(void 0);return r.useEffect(()=>{let e=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,a.N)(()=>{let e=h.current;if(e){S.current=S.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();v.current=t.height,w.current=t.width,C.current||(e.style.transitionDuration=S.current.transitionDuration,e.style.animationName=S.current.animationName),p(o)}},[c.open,o]),(0,f.jsx)(s.sG.div,{"data-state":R(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!E,...l,ref:m,style:{"--radix-collapsible-content-height":y?"".concat(y,"px"):void 0,"--radix-collapsible-content-width":x?"".concat(x,"px"):void 0,...e.style},children:E&&i})});function R(e){return e?"open":"closed"}var S=y},78837:(e,t,n)=>{n.d(t,{hO:()=>u,sG:()=>a});var r=n(55931),o=n(93914),i=n(8607),l=n(89835),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,i.TL)(`Primitive.${t}`),o=r.forwardRef((e,r)=>{let{asChild:o,...i}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(o?n:t,{...i,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function u(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},79211:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(55931),o=n(93914),i=n(78837),l=n(6806),a=n(89835),u=r.forwardRef((e,t)=>{var n,u;let{container:s,...c}=e,[d,f]=r.useState(!1);(0,l.N)(()=>f(!0),[]);let p=s||d&&(null==(u=globalThis)||null==(n=u.document)?void 0:n.body);return p?o.createPortal((0,a.jsx)(i.sG.div,{...c,ref:t}),p):null});u.displayName="Portal"},79588:(e,t,n)=>{var r=n(95604);n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},89379:(e,t,n)=>{n.d(t,{A:()=>l,q:()=>i});var r=n(55931),o=n(89835);function i(e,t){let n=r.createContext(t),i=e=>{let{children:t,...i}=e,l=r.useMemo(()=>i,Object.values(i));return(0,o.jsx)(n.Provider,{value:l,children:t})};return i.displayName=e+"Provider",[i,function(o){let i=r.useContext(n);if(i)return i;if(void 0!==t)return t;throw Error(`\`${o}\` must be used within \`${e}\``)}]}function l(e,t=[]){let n=[],i=()=>{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return i.scopeName=e,[function(t,i){let l=r.createContext(i),a=n.length;n=[...n,i];let u=t=>{let{scope:n,children:i,...u}=t,s=n?.[e]?.[a]||l,c=r.useMemo(()=>u,Object.values(u));return(0,o.jsx)(s.Provider,{value:c,children:i})};return u.displayName=t+"Provider",[u,function(n,o){let u=o?.[e]?.[a]||l,s=r.useContext(u);if(s)return s;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(i,...t)]}},91260:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},93856:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(92398).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},98493:(e,t,n)=>{n.d(t,{qW:()=>f});var r,o=n(55931),i=n(3908),l=n(78837),a=n(90229),u=n(63368),s=n(89835),c="dismissableLayer.update",d=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=o.forwardRef((e,t)=>{var n,f;let{disableOutsidePointerEvents:m=!1,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:w,onDismiss:x,...b}=e,E=o.useContext(d),[C,R]=o.useState(null),S=null!=(f=null==C?void 0:C.ownerDocument)?f:null==(n=globalThis)?void 0:n.document,[,A]=o.useState({}),k=(0,a.s)(t,e=>R(e)),N=Array.from(E.layers),[T]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),j=N.indexOf(T),P=C?N.indexOf(C):-1,O=E.layersWithOutsidePointerEventsDisabled.size>0,L=P>=j,M=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=(0,u.c)(e),i=o.useRef(!1),l=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){h("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));L&&!n&&(null==g||g(e),null==w||w(e),e.defaultPrevented||null==x||x())},S),D=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=(0,u.c)(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&h("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;![...E.branches].some(e=>e.contains(t))&&(null==y||y(e),null==w||w(e),e.defaultPrevented||null==x||x())},S);return!function(e,t=globalThis?.document){let n=(0,u.c)(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{P===E.layers.size-1&&(null==v||v(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))},S),o.useEffect(()=>{if(C)return m&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),p(),()=>{m&&1===E.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r)}},[C,S,m,E]),o.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),p())},[C,E]),o.useEffect(()=>{let e=()=>A({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,s.jsx)(l.sG.div,{...b,ref:k,style:{pointerEvents:O?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.mK)(e.onFocusCapture,D.onFocusCapture),onBlurCapture:(0,i.mK)(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:(0,i.mK)(e.onPointerDownCapture,M.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function h(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,l.hO)(i,a):i.dispatchEvent(a)}f.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(d),r=o.useRef(null),i=(0,a.s)(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,s.jsx)(l.sG.div,{...e,ref:i})}).displayName="DismissableLayerBranch"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[693],{5685:(e,t,a)=>{a.d(t,{B:()=>o,M:()=>r});var s=a(45320),n=a(53630);let r=e=>({queryKey:["projects",e],queryFn:async()=>{let t=await n.s.api.projects[":projectId"].$get({param:{projectId:e}});return await t.json()}}),o=e=>(0,s.useSuspenseQuery)({...r(e),refetchOnReconnect:!0})},18237:(e,t,a)=>{a.d(t,{cn:()=>r});var s=a(98951),n=a(42411);function r(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,n.QP)((0,s.$)(t))}},40138:(e,t,a)=>{a.d(t,{Cf:()=>u,L3:()=>f,c7:()=>m,lG:()=>l,rr:()=>p,zM:()=>i});var s=a(89835),n=a(24431),r=a(93856),o=a(18237);function l(e){let{...t}=e;return(0,s.jsx)(n.bL,{"data-slot":"dialog",...t})}function i(e){let{...t}=e;return(0,s.jsx)(n.l9,{"data-slot":"dialog-trigger",...t})}function d(e){let{...t}=e;return(0,s.jsx)(n.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...a}=e;return(0,s.jsx)(n.hJ,{"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function u(e){let{className:t,children:a,showCloseButton:l=!0,...i}=e;return(0,s.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,s.jsx)(c,{}),(0,s.jsxs)(n.UC,{"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",t),...i,children:[a,l&&(0,s.jsxs)(n.bm,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,s.jsx)(r.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",t),...a})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(n.hE,{"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",t),...a})}function p(e){let{className:t,...a}=e;return(0,s.jsx)(n.VY,{"data-slot":"dialog-description",className:(0,o.cn)("text-muted-foreground text-sm",t),...a})}},45730:(e,t,a)=>{a.d(t,{Ke:()=>l,Nt:()=>r,R6:()=>o});var s=a(89835),n=a(76845);function r(e){let{...t}=e;return(0,s.jsx)(n.bL,{"data-slot":"collapsible",...t})}function o(e){let{...t}=e;return(0,s.jsx)(n.R6,{"data-slot":"collapsible-trigger",...t})}function l(e){let{...t}=e;return(0,s.jsx)(n.Ke,{"data-slot":"collapsible-content",...t})}},51290:(e,t,a)=>{a.d(t,{c:()=>m});var s=a(89835),n=a(62520),r=a(26057),o=a(55931),l=a(80942),i=a(40138),d=a(89290),c=a(70540);let u=e=>{let{projectId:t,onSuccess:a}=e,n=(0,c.fg)(t,a),{config:r}=(0,d.U)(),o=async e=>{await n.mutateAsync({message:e})};return(0,s.jsx)(c.VA,{projectId:t,onSubmit:o,isPending:n.isPending,error:n.error,placeholder:(null==r?void 0:r.enterKeyBehavior)==="enter-send"?"Type your message here... (Start with / for commands, @ for files, Enter to send)":"Type your message here... (Start with / for commands, @ for files, Shift+Enter to send)",buttonText:"Start Chat",minHeight:"min-h-[200px]",containerClassName:"space-y-4"})},m=e=>{let{projectId:t,trigger:a}=e,[d,c]=(0,o.useState)(!1);return(0,s.jsxs)(i.lG,{open:d,onOpenChange:c,children:[(0,s.jsx)(i.zM,{asChild:!0,children:null!=a?a:(0,s.jsxs)(l.$,{className:"gap-2",children:[(0,s.jsx)(n.A,{className:"w-4 h-4"}),"New Chat"]})}),(0,s.jsxs)(i.Cf,{className:"w-[95vw] md:w-[80vw]",children:[(0,s.jsx)(i.c7,{children:(0,s.jsxs)(i.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(r.A,{className:"w-5 h-5"}),"Start New Chat"]})}),(0,s.jsx)(u,{projectId:t,onSuccess:()=>{c(!1)}})]})]})}},53630:(e,t,a)=>{a.d(t,{s:()=>s});let s=(0,a(74865).hc)("/")},57981:(e,t,a)=>{a.d(t,{o:()=>f});var s=a(89835),n=a(13881),r=a(55931),o=a(89290),l=a(14464),i=a(91260),d=a(18237);function c(e){let{className:t,...a}=e;return(0,s.jsx)(l.bL,{"data-slot":"checkbox",className:(0,d.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:(0,s.jsx)(l.C1,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,s.jsx)(i.A,{className:"size-3.5"})})})}var u=a(64386),m=a(5685);let f=e=>{let{openingProjectId:t,showLabels:a=!0,showDescriptions:l=!0,className:i=""}=e,d=(0,r.useId)(),f=(0,r.useId)(),{config:p,updateConfig:h}=(0,o.U)(),x=(0,n.useQueryClient)(),g=(0,r.useCallback)(async()=>{await x.invalidateQueries({queryKey:o.R.queryKey}),await x.invalidateQueries({queryKey:["projects"]}),x.invalidateQueries({queryKey:(0,m.M)(t).queryKey})},[x,t]),b=async()=>{h({...p,hideNoUserMessageSession:!(null==p?void 0:p.hideNoUserMessageSession)}),await g()},v=async()=>{h({...p,unifySameTitleSession:!(null==p?void 0:p.unifySameTitleSession)}),await g()},y=async e=>{h({...p,enterKeyBehavior:e}),await g()};return(0,s.jsxs)("div",{className:"space-y-4 ".concat(i),children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(c,{id:d,checked:null==p?void 0:p.hideNoUserMessageSession,onCheckedChange:b}),a&&(0,s.jsx)("label",{htmlFor:d,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Hide sessions without user messages"})]}),l&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1 ml-6",children:"Only show sessions that contain user commands or messages"}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(c,{id:"".concat(d,"-unify"),checked:null==p?void 0:p.unifySameTitleSession,onCheckedChange:v}),a&&(0,s.jsx)("label",{htmlFor:"".concat(d,"-unify"),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Unify sessions with same title"})]}),l&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1 ml-6",children:"Show only the latest session when multiple sessions have the same title"}),(0,s.jsxs)("div",{className:"space-y-2",children:[a&&(0,s.jsx)("label",{htmlFor:f,className:"text-sm font-medium leading-none",children:"Enter Key Behavior"}),(0,s.jsxs)(u.l6,{value:(null==p?void 0:p.enterKeyBehavior)||"shift-enter-send",onValueChange:y,children:[(0,s.jsx)(u.bq,{id:f,className:"w-full",children:(0,s.jsx)(u.yv,{placeholder:"Select enter key behavior"})}),(0,s.jsxs)(u.gC,{children:[(0,s.jsx)(u.eb,{value:"shift-enter-send",children:"Shift+Enter to send (default)"}),(0,s.jsx)(u.eb,{value:"enter-send",children:"Enter to send"})]})]}),l&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose how the Enter key behaves in message input"})]})]})}},64386:(e,t,a)=>{a.d(t,{bq:()=>u,eb:()=>h,gC:()=>p,l6:()=>d,yv:()=>c});var s=a(89835),n=a(38191),r=a(5530),o=a(55719),l=a(91260),i=a(18237);function d(e){let{...t}=e;return(0,s.jsx)(n.bL,{...t})}function c(e){let{...t}=e;return(0,s.jsx)(n.WT,{...t})}function u(e){let{className:t,children:a,...o}=e;return(0,s.jsxs)(n.l9,{className:(0,i.cn)("flex h-10 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[a,(0,s.jsx)(n.In,{asChild:!0,children:(0,s.jsx)(r.A,{className:"h-4 w-4 opacity-50"})})]})}function m(e){let{className:t,...a}=e;return(0,s.jsx)(n.PP,{className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(n.wn,{className:(0,i.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"h-4 w-4"})})}function p(e){let{className:t,children:a,position:r="popper",...o}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsxs)(n.UC,{className:(0,i.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...o,children:[(0,s.jsx)(m,{}),(0,s.jsx)(n.LM,{className:(0,i.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,s.jsx)(f,{})]})})}function h(e){let{className:t,children:a,...r}=e;return(0,s.jsxs)(n.q7,{className:(0,i.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n.VF,{children:(0,s.jsx)(l.A,{className:"h-4 w-4"})})}),(0,s.jsx)(n.p4,{children:a})]})}},70540:(e,t,a)=>{a.d(t,{VA:()=>N,fg:()=>S,Gl:()=>A});var s=a(89835),n=a(28043),r=a(58903),o=a(70038),l=a(55931),i=a(80942),d=a(18237);function c(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,d.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex min-h-[60px] w-full min-w-0 resize-none rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...a})}var u=a(89290),m=a(63812),f=a(72676),p=a(91260),h=a(45730),x=a(53630);let g=(0,l.forwardRef)((e,t)=>{let{projectId:a,inputValue:n,onCommandSelect:r,className:o}=e,[c,u]=(0,l.useState)(!1),[g,b]=(0,l.useState)(-1),v=(0,l.useRef)(null),y=(0,l.useRef)(null),{data:j}=(0,m.useQuery)({queryKey:["claude-commands",a],queryFn:async()=>{let e=await x.s.api.projects[":projectId"]["claude-commands"].$get({param:{projectId:a}});if(!e.ok)throw Error("Failed to fetch commands");return e.json()},staleTime:3e5}),{shouldShowCompletion:w,filteredCommands:N}=(0,l.useMemo)(()=>{let e=[...(null==j?void 0:j.defaultCommands)||[],...(null==j?void 0:j.globalCommands)||[],...(null==j?void 0:j.projectCommands)||[]],t=n.startsWith("/"),a=t?n.slice(1).toLowerCase():"",s=t?e.filter(e=>e.toLowerCase().includes(a)):[];return{shouldShowCompletion:t,filteredCommands:s}},[j,n]),k=w&&N.length>0;c!==k&&(u(k),b(-1));let C=(0,l.useCallback)(e=>{r("/".concat(e," ")),u(!1),b(-1)},[r]),S=(0,l.useCallback)(e=>{if(e>=0&&y.current){let t=y.current.querySelectorAll('button[role="option"]')[e];t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}},[]),A=(0,l.useCallback)(e=>{if(!c||0===N.length)return!1;switch(e.key){case"ArrowDown":return e.preventDefault(),b(e=>{let t=e<N.length-1?e+1:0;return requestAnimationFrame(()=>S(t)),t}),!0;case"ArrowUp":return e.preventDefault(),b(e=>{let t=e>0?e-1:N.length-1;return requestAnimationFrame(()=>S(t)),t}),!0;case"Enter":case"Tab":if(g>=0&&g<N.length){e.preventDefault();let t=N[g];return t&&C(t),!0}break;case"Escape":return e.preventDefault(),u(!1),b(-1),!0}return!1},[c,N.length,g,C,S,N]);return((0,l.useEffect)(()=>{let e=e=>{v.current&&!v.current.contains(e.target)&&(u(!1),b(-1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,l.useImperativeHandle)(t,()=>({handleKeyDown:A}),[A]),w&&0!==N.length)?(0,s.jsx)("div",{ref:v,className:(0,d.cn)("relative",o),children:(0,s.jsx)(h.Nt,{open:c,onOpenChange:u,children:(0,s.jsx)(h.Ke,{children:(0,s.jsx)("div",{ref:y,className:"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg max-h-48 overflow-y-auto",role:"listbox","aria-label":"Available commands",children:N.length>0&&(0,s.jsxs)("div",{className:"p-1",children:[(0,s.jsxs)("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground border-b border-border mb-1 flex items-center gap-2",role:"presentation",children:[(0,s.jsx)(f.A,{className:"w-3 h-3"}),"Available Commands (",N.length,")"]}),N.map((e,t)=>(0,s.jsxs)(i.$,{variant:"ghost",size:"sm",className:(0,d.cn)("w-full justify-start text-left font-mono text-sm h-8 px-2 min-w-0",t===g&&"bg-accent text-accent-foreground"),onClick:()=>C(e),onMouseEnter:()=>b(t),role:"option","aria-selected":t===g,"aria-label":"Command: /".concat(e),title:"/".concat(e),children:[(0,s.jsx)("span",{className:"text-muted-foreground mr-1 flex-shrink-0",children:"/"}),(0,s.jsx)("span",{className:"font-medium truncate min-w-0",children:e}),t===g&&(0,s.jsx)(p.A,{className:"w-3 h-3 ml-auto text-primary flex-shrink-0"})]},e))]})})})})}):null});var b=a(57378),v=a(65492);let y=function(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,m.useQuery)({queryKey:["file-completion",e,t],queryFn:async()=>{let a=await x.s.api.projects[":projectId"]["file-completion"].$get({param:{projectId:e},query:{basePath:t}});if(!a.ok)throw Error("Failed to fetch file completion");return a.json()},enabled:a&&!!e,staleTime:3e5})},j=(0,l.forwardRef)((e,t)=>{let{projectId:a,inputValue:n,onFileSelect:r,className:o}=e,[c,u]=(0,l.useState)(!1),[m,f]=(0,l.useState)(-1),x=(0,l.useRef)(null),g=(0,l.useRef)(null),{shouldShow:j,searchPath:w,beforeAt:N,afterAt:k}=(0,l.useMemo)(()=>(e=>{let t=e.lastIndexOf("@");if(-1===t)return{shouldShow:!1,searchPath:"",beforeAt:"",afterAt:""};let a=e.slice(0,t),s=e.slice(t+1),n=s.split(/\s/),r=n[0]||"";return{shouldShow:!(n.length>1),searchPath:r,beforeAt:a,afterAt:s}})(n),[n]),{basePath:C,filterTerm:S}=(0,l.useMemo)(()=>{if(!w)return{basePath:"/",filterTerm:""};let e=w.lastIndexOf("/");if(-1===e)return{basePath:"/",filterTerm:w};let t=w.slice(0,e+1);return{basePath:"/"===t?"/":t,filterTerm:w.slice(e+1)}},[w]),{data:A,isLoading:E}=y(a,C,j),I=(0,l.useMemo)(()=>(null==A?void 0:A.entries)?S?A.entries.filter(e=>e.name.toLowerCase().includes(S.toLowerCase())):A.entries:[],[null==A?void 0:A.entries,S]),z=j&&!E&&I.length>0;c!==z&&(u(z),f(-1));let K=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e.path,s=k.split(/\s/).slice(1).join(" ");r("".concat(N,"@").concat(a).concat(s).trim()+("directory"!==e.type||t?" ":"/")),("file"===e.type||t)&&(u(!1),f(-1))},[N,k,r]),M=(0,l.useCallback)(e=>{if(e>=0&&g.current){let t=g.current.querySelectorAll('button[role="option"]')[e];t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}},[]),F=(0,l.useCallback)(e=>{if(!c||0===I.length)return!1;switch(e.key){case"ArrowDown":return e.preventDefault(),f(e=>{let t=e<I.length-1?e+1:0;return requestAnimationFrame(()=>M(t)),t}),!0;case"ArrowUp":return e.preventDefault(),f(e=>{let t=e>0?e-1:I.length-1;return requestAnimationFrame(()=>M(t)),t}),!0;case"Enter":if(m>=0&&m<I.length){e.preventDefault();let t=I[m];return t&&K(t,!0),!0}break;case"Tab":if(m>=0&&m<I.length){e.preventDefault();let t=I[m];return t&&K(t,"file"===t.type),!0}break;case"Escape":return e.preventDefault(),u(!1),f(-1),!0}return!1},[c,I.length,m,K,M,I]);return((0,l.useEffect)(()=>{let e=e=>{x.current&&!x.current.contains(e.target)&&(u(!1),f(-1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,l.useImperativeHandle)(t,()=>({handleKeyDown:F}),[F]),!j||E||0===I.length)?null:(0,s.jsx)("div",{ref:x,className:(0,d.cn)("relative",o),children:(0,s.jsx)(h.Nt,{open:c,onOpenChange:u,children:(0,s.jsx)(h.Ke,{children:(0,s.jsx)("div",{ref:g,className:"absolute z-50 w-full mt-1 bg-popover border border-border rounded-md shadow-lg max-h-48 overflow-y-auto",role:"listbox","aria-label":"Available files and directories",children:I.length>0&&(0,s.jsxs)("div",{className:"p-1",children:[(0,s.jsxs)("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground border-b border-border mb-1 flex items-center gap-2",role:"presentation",children:[(0,s.jsx)(b.A,{className:"w-3 h-3"}),"Files & Directories (",I.length,")","/"!==C&&(0,s.jsxs)("span",{className:"text-xs font-mono text-muted-foreground/70",children:["in ",C]})]}),I.map((e,t)=>(0,s.jsxs)(i.$,{variant:"ghost",size:"sm",className:(0,d.cn)("w-full justify-start text-left font-mono text-sm h-8 px-2 min-w-0",t===m&&"bg-accent text-accent-foreground"),onClick:()=>K(e,"file"===e.type),onMouseEnter:()=>f(t),role:"option","aria-selected":t===m,"aria-label":"".concat(e.type,": ").concat(e.name),title:e.path,children:["directory"===e.type?(0,s.jsx)(v.A,{className:"w-3 h-3 mr-2 text-blue-500 flex-shrink-0"}):(0,s.jsx)(b.A,{className:"w-3 h-3 mr-2 text-gray-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"font-medium truncate min-w-0",children:e.name}),"directory"===e.type&&(0,s.jsx)("span",{className:"text-muted-foreground ml-1 flex-shrink-0",children:"/"}),t===m&&(0,s.jsx)(p.A,{className:"w-3 h-3 ml-auto text-primary flex-shrink-0"})]},e.path))]})})})})})});j.displayName="FileCompletion";let w=e=>{let{projectId:t,message:a,commandCompletionRef:n,fileCompletionRef:r,handleCommandSelect:o,handleFileSelect:i,cursorPosition:d}=e,c=(0,l.useMemo)(()=>((e,t)=>{let a,s,n=window.innerHeight,r=t.top<n/2,o=n-t.top,l=t.top;r&&o>=200?(a="below",s=e.top+16):!r&&l>=200?(a="above",s=e.top-200-8):o>l?(a="below",s=e.top+16):(a="above",s=e.top-200-8);let i=window.innerWidth;return{top:s,left:Math.max(16,Math.min(e.left-16,i-512-16)),placement:a}})(d.relative,d.absolute),[d]);return(0,s.jsxs)("div",{className:"absolute w-full max-w-sm sm:max-w-md lg:max-w-lg xl:max-w-xl",style:{top:c.top,left:c.left,maxWidth:Math.min(512,.8*window.innerWidth)},children:[(0,s.jsx)(g,{ref:n,projectId:t,inputValue:a,onCommandSelect:o,className:"absolute left-0 right-0 ".concat("above"===c.placement?"bottom-full mb-2":"top-full mt-1")}),(0,s.jsx)(j,{ref:r,projectId:t,inputValue:a,onFileSelect:i,className:"absolute left-0 right-0 ".concat("above"===c.placement?"bottom-full mb-2":"top-full mt-1")})]})},N=e=>{let{projectId:t,onSubmit:a,isPending:d,error:m,placeholder:f,buttonText:p,minHeight:h="min-h-[100px]",containerClassName:x="",disabled:g=!1,buttonSize:b="lg"}=e,[v,y]=(0,l.useState)(""),[j,N]=(0,l.useState)({relative:{top:0,left:0},absolute:{top:0,left:0}}),k=(0,l.useRef)(null),C=(0,l.useRef)(null),S=(0,l.useRef)(null),A=(0,l.useRef)(null),E=(0,l.useId)(),{config:I}=(0,u.U)(),z=async()=>{v.trim()&&(await a(v.trim()),y(""))},K=(0,l.useCallback)(()=>{let e=C.current,t=k.current;if(null===e||null===t)return;let a=e.selectionStart,s=e.value.substring(0,a),n=e.value.substring(a),r=document.createTextNode(s),o=document.createTextNode(n),l=document.createElement("span");l.innerHTML=" ";let i=document.createElement("div");i.innerHTML="",i.append(r,l,o);let d=window.getComputedStyle(e);for(let e of["border","boxSizing","fontFamily","fontSize","fontWeight","letterSpacing","lineHeight","padding","textDecoration","textIndent","textTransform","whiteSpace","wordSpacing","wordWrap"])i.style[e]=d[e];i.style.visibility="hidden",t.prepend(i);let c=l.getBoundingClientRect(),u=t.getBoundingClientRect();return t.removeChild(i),{relative:{top:c.top-u.top-e.scrollTop,left:c.left-u.left-e.scrollLeft},absolute:{top:c.top-e.scrollTop,left:c.left-e.scrollLeft}}},[]);return(0,s.jsxs)("div",{className:x,children:[m&&(0,s.jsxs)("div",{className:"flex items-center gap-2 p-3 text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-md mb-4",children:[(0,s.jsx)(n.A,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Failed to send message. Please try again."})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"relative",ref:k,children:[(0,s.jsx)(c,{ref:C,value:v,onChange:e=>{if(e.target.value.endsWith("@")||e.target.value.endsWith("/")){let e=K();e&&N(e)}y(e.target.value)},onKeyDown:e=>{var t,a;if((null==(t=A.current)||!t.handleKeyDown(e))&&(null==(a=S.current)||!a.handleKeyDown(e))&&"Enter"===e.key&&!e.nativeEvent.isComposing){let t=(null==I?void 0:I.enterKeyBehavior)==="enter-send";t&&!e.shiftKey?(e.preventDefault(),z()):!t&&e.shiftKey&&(e.preventDefault(),z())}},placeholder:f,className:"".concat(h," resize-none"),disabled:d||g,maxLength:4e3,"aria-label":"Message input with completion support","aria-describedby":E,"aria-expanded":v.startsWith("/")||v.includes("@"),"aria-haspopup":"listbox",role:"combobox","aria-autocomplete":"list"}),(0,s.jsx)(w,{projectId:t,message:v,commandCompletionRef:S,fileCompletionRef:A,handleCommandSelect:e=>{var t;y(e),null==(t=C.current)||t.focus()},handleFileSelect:e=>{var t;y(e),null==(t=C.current)||t.focus()},cursorPosition:j})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",id:E,children:[v.length,'/4000 characters " • Use arrow keys to navigate completions"']}),(0,s.jsx)(i.$,{onClick:z,disabled:!v.trim()||d||g,size:b,className:"gap-2",children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.A,{className:"w-4 h-4 animate-spin"}),"Sending... This may take a while."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{className:"w-4 h-4"}),p]})})]})]})]})};var k=a(59054),C=a(79588);let S=(e,t)=>{let a=(0,C.useRouter)();return(0,k.useMutation)({mutationFn:async t=>{let a=await x.s.api.projects[":projectId"]["new-session"].$post({param:{projectId:e},json:{message:t.message}},{init:{signal:AbortSignal.timeout(2e4)}});if(!a.ok)throw Error(a.statusText);return a.json()},onSuccess:async s=>{null==t||t(),a.push("/projects/".concat(e,"/sessions/").concat(s.sessionId,"#message-").concat(s.userMessageId))}})},A=(e,t)=>{let a=(0,C.useRouter)();return(0,k.useMutation)({mutationFn:async a=>{let s=await x.s.api.projects[":projectId"].sessions[":sessionId"].resume.$post({param:{projectId:e,sessionId:t},json:{resumeMessage:a.message}},{init:{signal:AbortSignal.timeout(2e4)}});if(!s.ok)throw Error(s.statusText);return s.json()},onSuccess:async s=>{t!==s.sessionId&&a.push("/projects/".concat(e,"/sessions/").concat(s.sessionId,"#message-").concat(s.userMessageId))}})}},72667:(e,t,a)=>{a.d(t,{H:()=>s});let s=e=>{switch(e.kind){case"command":if(void 0===e.commandArgs)return e.commandName;return"".concat(e.commandName," ").concat(e.commandArgs);case"local-command":return e.stdout;case"text":return e.content;default:throw Error("Invalid first command")}}},75284:(e,t,a)=>{a.d(t,{BT:()=>i,Wu:()=>d,ZB:()=>l,Zp:()=>r,aR:()=>o});var s=a(89835),n=a(18237);function r(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,n.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",t),...a})}function i(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-muted-foreground text-sm",t),...a})}function d(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6",t),...a})}},80942:(e,t,a)=>{a.d(t,{$:()=>i});var s=a(89835),n=a(8607),r=a(7951),o=a(18237);let l=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:a,size:r,asChild:i=!1,...d}=e,c=i?n.DX:"button";return(0,s.jsx)(c,{"data-slot":"button",className:(0,o.cn)(l({variant:a,size:r,className:t})),...d})}},89290:(e,t,a)=>{a.d(t,{R:()=>i,U:()=>d});var s=a(13881),n=a(45320),r=a(59054),o=a(55931),l=a(53630);let i={queryKey:["config"],queryFn:async()=>{let e=await l.s.api.config.$get();return await e.json()}},d=()=>{let e=(0,s.useQueryClient)(),{data:t}=(0,n.useSuspenseQuery)({...i}),a=(0,r.useMutation)({mutationFn:async e=>{let t=await l.s.api.config.$put({json:e});return await t.json()},onSuccess:async()=>{await e.invalidateQueries({queryKey:i.queryKey})}});return{config:null==t?void 0:t.config,updateConfig:(0,o.useCallback)(e=>{a.mutate(e)},[a])}}}}]);
|