@vectorize-io/hindsight-control-plane 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/package.json +1 -1
  2. package/standalone/.next/BUILD_ID +1 -1
  3. package/standalone/.next/app-path-routes-manifest.json +3 -0
  4. package/standalone/.next/build-manifest.json +3 -3
  5. package/standalone/.next/prerender-manifest.json +3 -3
  6. package/standalone/.next/routes-manifest.json +24 -0
  7. package/standalone/.next/server/app/_global-error.html +1 -1
  8. package/standalone/.next/server/app/_global-error.rsc +1 -1
  9. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/_not-found.html +1 -1
  16. package/standalone/.next/server/app/_not-found.rsc +13 -13
  17. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  18. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  19. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  20. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  21. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  22. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/standalone/.next/server/app/api/banks/[bankId]/tags/route/app-paths-manifest.json +3 -0
  24. package/standalone/.next/server/app/api/banks/[bankId]/tags/route/build-manifest.json +9 -0
  25. package/standalone/.next/server/app/api/banks/[bankId]/tags/route/server-reference-manifest.json +4 -0
  26. package/standalone/.next/server/app/api/banks/[bankId]/tags/route.js +6 -0
  27. package/standalone/.next/server/app/api/banks/[bankId]/tags/route.js.map +5 -0
  28. package/standalone/.next/server/app/api/banks/[bankId]/tags/route.js.nft.json +1 -0
  29. package/standalone/.next/server/app/api/banks/[bankId]/tags/route_client-reference-manifest.js +3 -0
  30. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route/app-paths-manifest.json +3 -0
  31. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route/build-manifest.json +9 -0
  32. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route/server-reference-manifest.json +4 -0
  33. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route.js +6 -0
  34. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route.js.map +5 -0
  35. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route.js.nft.json +1 -0
  36. package/standalone/.next/server/app/api/documents/[documentId]/chunks/route_client-reference-manifest.js +3 -0
  37. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route/app-paths-manifest.json +3 -0
  38. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route/build-manifest.json +9 -0
  39. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route/server-reference-manifest.json +4 -0
  40. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route.js +6 -0
  41. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route.js.map +5 -0
  42. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route.js.nft.json +1 -0
  43. package/standalone/.next/server/app/api/documents/[documentId]/reprocess/route_client-reference-manifest.js +3 -0
  44. package/standalone/.next/server/app/banks/[bankId]/page_client-reference-manifest.js +1 -1
  45. package/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
  46. package/standalone/.next/server/app/dashboard.html +1 -1
  47. package/standalone/.next/server/app/dashboard.rsc +15 -15
  48. package/standalone/.next/server/app/dashboard.segments/_full.segment.rsc +15 -15
  49. package/standalone/.next/server/app/dashboard.segments/_head.segment.rsc +4 -4
  50. package/standalone/.next/server/app/dashboard.segments/_index.segment.rsc +8 -8
  51. package/standalone/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  52. package/standalone/.next/server/app/dashboard.segments/dashboard/__PAGE__.segment.rsc +4 -4
  53. package/standalone/.next/server/app/dashboard.segments/dashboard.segment.rsc +3 -3
  54. package/standalone/.next/server/app/index.html +1 -1
  55. package/standalone/.next/server/app/index.rsc +13 -13
  56. package/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  57. package/standalone/.next/server/app/index.segments/_full.segment.rsc +13 -13
  58. package/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  59. package/standalone/.next/server/app/index.segments/_index.segment.rsc +8 -8
  60. package/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  61. package/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  62. package/standalone/.next/server/app-paths-manifest.json +3 -0
  63. package/standalone/.next/server/chunks/0.eh__next-internal_server_app_api_banks_[bankId]_tags_route_actions_04l~2w5.js +3 -0
  64. package/standalone/.next/server/chunks/0sr1_server_app_api_documents_[documentId]_chunks_route_actions_0oye54l.js +3 -0
  65. package/standalone/.next/server/chunks/0sr1_server_app_api_documents_[documentId]_reprocess_route_actions_0wz_qjt.js +3 -0
  66. package/standalone/.next/server/chunks/[root-of-the-server]__0estz38._.js +1 -1
  67. package/standalone/.next/server/chunks/[root-of-the-server]__0lu.x0s._.js +1 -1
  68. package/standalone/.next/server/chunks/[root-of-the-server]__0t8dn-e._.js +3 -0
  69. package/standalone/.next/server/chunks/[root-of-the-server]__0z2j3hx._.js +3 -0
  70. package/standalone/.next/server/chunks/[root-of-the-server]__10koc90._.js +3 -0
  71. package/standalone/.next/server/chunks/[root-of-the-server]__12ww4dj._.js +1 -1
  72. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__09_g7l8._.js +6 -5
  73. package/standalone/.next/server/chunks/ssr/_0u45pfs._.js +1 -1
  74. package/standalone/.next/server/chunks/ssr/hindsight-control-plane_06incyr._.js +1 -1
  75. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  76. package/standalone/.next/server/pages/404.html +1 -1
  77. package/standalone/.next/server/pages/500.html +1 -1
  78. package/standalone/.next/server/server-reference-manifest.js +1 -1
  79. package/standalone/.next/server/server-reference-manifest.json +1 -1
  80. package/standalone/.next/static/chunks/{097uchpw_8qwn.js → 0-_tm3q7~~e~l.js} +1 -1
  81. package/standalone/.next/static/chunks/{0el.lvk380c-3.js → 0.l3gmz37keyi.js} +1 -1
  82. package/standalone/.next/static/chunks/0r99ajy0ixo_s.js +9 -0
  83. package/standalone/.next/static/chunks/0usfy29kyo2k4.css +2 -0
  84. package/standalone/package.json +1 -1
  85. package/standalone/.next/static/chunks/079k.275mmkog.css +0 -2
  86. package/standalone/.next/static/chunks/15kz4nyl_kh_s.js +0 -8
  87. /package/standalone/.next/static/{YO5OUekYxYd7Dxt97tUEV → sEqqBFu4UYMWs7IZWMc1d}/_buildManifest.js +0 -0
  88. /package/standalone/.next/static/{YO5OUekYxYd7Dxt97tUEV → sEqqBFu4UYMWs7IZWMc1d}/_clientMiddlewareManifest.js +0 -0
  89. /package/standalone/.next/static/{YO5OUekYxYd7Dxt97tUEV → sEqqBFu4UYMWs7IZWMc1d}/_ssgManifest.js +0 -0
@@ -4,6 +4,6 @@ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpattern
4
4
 
5
5
  If you want to hide the \`${b.titleName}\`, you can wrap it with our VisuallyHidden component.
6
6
 
7
- For more information, see https://radix-ui.com/primitives/docs/components/${b.docsSlug}`;return u.useEffect(()=>{a&&(document.getElementById(a)||console.error(c))},[c,a]),null},cH=({contentRef:a,descriptionId:b})=>{let c=cF("DialogDescriptionWarning"),d=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${c.contentName}}.`;return u.useEffect(()=>{let c=a.current?.getAttribute("aria-describedby");b&&c&&(document.getElementById(b)||console.warn(d))},[d,a,b]),null};a.s(["Close",0,cB,"Content",0,cs,"Description",0,cz,"Overlay",0,co,"Portal",0,cm,"Root",0,cg,"Title",0,cx,"Trigger",0,ci,"WarningProvider",0,cE,"createDialogScope",0,cd],97942);var cI='[cmdk-group=""]',cJ='[cmdk-group-items=""]',cK='[cmdk-item=""]',cL=`${cK}:not([aria-disabled="true"])`,cM="cmdk-item-select",cN="data-value",cO=(a,b,c)=>{var d;return d=a,function a(b,c,d,e,f,g,h){if(g===c.length)return f===b.length?1:.99;var i=`${f},${g}`;if(void 0!==h[i])return h[i];for(var j,k,l,m,n=e.charAt(g),o=d.indexOf(n,f),p=0;o>=0;)(j=a(b,c,d,e,o+1,g+1,h))>p&&(o===f?j*=1:aV.test(b.charAt(o-1))?(j*=.8,(l=b.slice(f,o-1).match(aW))&&f>0&&(j*=Math.pow(.999,l.length))):aX.test(b.charAt(o-1))?(j*=.9,(m=b.slice(f,o-1).match(aY))&&f>0&&(j*=Math.pow(.999,m.length))):(j*=.17,f>0&&(j*=Math.pow(.999,o-f))),b.charAt(o)!==c.charAt(g)&&(j*=.9999)),(j<.1&&d.charAt(o-1)===e.charAt(g+1)||e.charAt(g+1)===e.charAt(g)&&d.charAt(o-1)!==e.charAt(g))&&.1*(k=a(b,c,d,e,o+1,g+2,h))>j&&(j=.1*k),j>p&&(p=j),o=d.indexOf(n,o+1);return h[i]=p,p}(d=c&&c.length>0?`${d+" "+c.join(" ")}`:d,b,aZ(d),aZ(b),0,0,{})},cP=u.createContext(void 0),cQ=u.createContext(void 0),cR=u.createContext(void 0),cS=u.forwardRef((a,b)=>{let c=c0(()=>{var b,c;return{search:"",value:null!=(c=null!=(b=a.value)?b:a.defaultValue)?c:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=c0(()=>new Set),e=c0(()=>new Map),f=c0(()=>new Map),g=c0(()=>new Set),h=c$(a),{label:i,children:j,value:k,onValueChange:l,filter:m,shouldFilter:n,loop:o,disablePointerSelection:p=!1,vimBindings:q=!0,...r}=a,s=a4(),t=a4(),v=a4(),w=u.useRef(null),x=c3();c_(()=>{if(void 0!==k){let a=k.trim();c.current.value=a,y.emit()}},[k]),c_(()=>{x(6,E)},[]);let y=u.useMemo(()=>({subscribe:a=>(g.current.add(a),()=>g.current.delete(a)),snapshot:()=>c.current,setState:(a,b,d)=>{var e,f,g,i;if(!Object.is(c.current[a],b)){if(c.current[a]=b,"search"===a)D(),B(),x(1,C);else if("value"===a){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let a=document.getElementById(v);a?a.focus():null==(e=document.getElementById(s))||e.focus()}if(x(7,()=>{var a;c.current.selectedItemId=null==(a=F())?void 0:a.id,y.emit()}),d||x(5,E),(null==(f=h.current)?void 0:f.value)!==void 0){null==(i=(g=h.current).onValueChange)||i.call(g,null!=b?b:"");return}}y.emit()}},emit:()=>{g.current.forEach(a=>a())}}),[]),z=u.useMemo(()=>({value:(a,b,d)=>{var e;b!==(null==(e=f.current.get(a))?void 0:e.value)&&(f.current.set(a,{value:b,keywords:d}),c.current.filtered.items.set(a,A(b,d)),x(2,()=>{B(),y.emit()}))},item:(a,b)=>(d.current.add(a),b&&(e.current.has(b)?e.current.get(b).add(a):e.current.set(b,new Set([a]))),x(3,()=>{D(),B(),c.current.value||C(),y.emit()}),()=>{f.current.delete(a),d.current.delete(a),c.current.filtered.items.delete(a);let b=F();x(4,()=>{D(),(null==b?void 0:b.getAttribute("id"))===a&&C(),y.emit()})}),group:a=>(e.current.has(a)||e.current.set(a,new Set),()=>{f.current.delete(a),e.current.delete(a)}),filter:()=>h.current.shouldFilter,label:i||a["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:s,inputId:v,labelId:t,listInnerRef:w}),[]);function A(a,b){var d,e;let f=null!=(e=null==(d=h.current)?void 0:d.filter)?e:cO;return a?f(a,c.current.search,b):0}function B(){if(!c.current.search||!1===h.current.shouldFilter)return;let a=c.current.filtered.items,b=[];c.current.filtered.groups.forEach(c=>{let d=e.current.get(c),f=0;d.forEach(b=>{f=Math.max(a.get(b),f)}),b.push([c,f])});let d=w.current;G().sort((b,c)=>{var d,e;let f=b.getAttribute("id"),g=c.getAttribute("id");return(null!=(d=a.get(g))?d:0)-(null!=(e=a.get(f))?e:0)}).forEach(a=>{let b=a.closest(cJ);b?b.appendChild(a.parentElement===b?a:a.closest(`${cJ} > *`)):d.appendChild(a.parentElement===d?a:a.closest(`${cJ} > *`))}),b.sort((a,b)=>b[1]-a[1]).forEach(a=>{var b;let c=null==(b=w.current)?void 0:b.querySelector(`${cI}[${cN}="${encodeURIComponent(a[0])}"]`);null==c||c.parentElement.appendChild(c)})}function C(){let a=G().find(a=>"true"!==a.getAttribute("aria-disabled")),b=null==a?void 0:a.getAttribute(cN);y.setState("value",b||void 0)}function D(){var a,b,g,i;if(!c.current.search||!1===h.current.shouldFilter){c.current.filtered.count=d.current.size;return}c.current.filtered.groups=new Set;let j=0;for(let e of d.current){let d=A(null!=(b=null==(a=f.current.get(e))?void 0:a.value)?b:"",null!=(i=null==(g=f.current.get(e))?void 0:g.keywords)?i:[]);c.current.filtered.items.set(e,d),d>0&&j++}for(let[a,b]of e.current)for(let d of b)if(c.current.filtered.items.get(d)>0){c.current.filtered.groups.add(a);break}c.current.filtered.count=j}function E(){var a,b,c;let d=F();d&&((null==(a=d.parentElement)?void 0:a.firstChild)===d&&(null==(c=null==(b=d.closest(cI))?void 0:b.querySelector('[cmdk-group-heading=""]'))||c.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function F(){var a;return null==(a=w.current)?void 0:a.querySelector(`${cK}[aria-selected="true"]`)}function G(){var a;return Array.from((null==(a=w.current)?void 0:a.querySelectorAll(cL))||[])}function H(a){let b=G()[a];b&&y.setState("value",b.getAttribute(cN))}function I(a){var b;let c=F(),d=G(),e=d.findIndex(a=>a===c),f=d[e+a];null!=(b=h.current)&&b.loop&&(f=e+a<0?d[d.length-1]:e+a===d.length?d[0]:d[e+a]),f&&y.setState("value",f.getAttribute(cN))}function J(a){let b=F(),c=null==b?void 0:b.closest(cI),d;for(;c&&!d;)d=null==(c=a>0?function(a,b){let c=a.nextElementSibling;for(;c;){if(c.matches(b))return c;c=c.nextElementSibling}}(c,cI):function(a,b){let c=a.previousElementSibling;for(;c;){if(c.matches(b))return c;c=c.previousElementSibling}}(c,cI))?void 0:c.querySelector(cL);d?y.setState("value",d.getAttribute(cN)):I(a)}let K=()=>H(G().length-1),L=a=>{a.preventDefault(),a.metaKey?K():a.altKey?J(1):I(1)},M=a=>{a.preventDefault(),a.metaKey?H(0):a.altKey?J(-1):I(-1)};return u.createElement(ba.div,{ref:b,tabIndex:-1,...r,"cmdk-root":"",onKeyDown:a=>{var b;null==(b=r.onKeyDown)||b.call(r,a);let c=a.nativeEvent.isComposing||229===a.keyCode;if(!(a.defaultPrevented||c))switch(a.key){case"n":case"j":q&&a.ctrlKey&&L(a);break;case"ArrowDown":L(a);break;case"p":case"k":q&&a.ctrlKey&&M(a);break;case"ArrowUp":M(a);break;case"Home":a.preventDefault(),H(0);break;case"End":a.preventDefault(),K();break;case"Enter":{a.preventDefault();let b=F();if(b){let a=new Event(cM);b.dispatchEvent(a)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:c5},i),c4(a,a=>u.createElement(cQ.Provider,{value:y},u.createElement(cP.Provider,{value:z},a))))}),cT=u.forwardRef((a,b)=>{var c,d;let e=a4(),f=u.useRef(null),g=u.useContext(cR),h=u.useContext(cP),i=c$(a),j=null!=(d=null==(c=i.current)?void 0:c.forceMount)?d:null==g?void 0:g.forceMount;c_(()=>{if(!j)return h.item(e,null==g?void 0:g.id)},[j]);let k=c2(e,f,[a.value,a.children,f],a.keywords),l=u.useContext(cQ),m=c1(a=>a.value&&a.value===k.current),n=c1(a=>!!j||!1===h.filter()||!a.search||a.filtered.items.get(e)>0);function o(){var a,b;p(),null==(b=(a=i.current).onSelect)||b.call(a,k.current)}function p(){l.setState("value",k.current,!0)}if(u.useEffect(()=>{let b=f.current;if(!(!b||a.disabled))return b.addEventListener(cM,o),()=>b.removeEventListener(cM,o)},[n,a.onSelect,a.disabled]),!n)return null;let{disabled:q,value:r,onSelect:s,forceMount:t,keywords:v,...w}=a;return u.createElement(ba.div,{ref:A(f,b),...w,id:e,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!m,"data-disabled":!!q,"data-selected":!!m,onPointerMove:q||h.getDisablePointerSelection()?void 0:p,onClick:q?void 0:o},a.children)}),cU=u.forwardRef((a,b)=>{let{heading:c,children:d,forceMount:e,...f}=a,g=a4(),h=u.useRef(null),i=u.useRef(null),j=a4(),k=u.useContext(cP),l=c1(a=>!!e||!1===k.filter()||!a.search||a.filtered.groups.has(g));c_(()=>k.group(g),[]),c2(g,h,[a.value,a.heading,i]);let m=u.useMemo(()=>({id:g,forceMount:e}),[e]);return u.createElement(ba.div,{ref:A(h,b),...f,"cmdk-group":"",role:"presentation",hidden:!l||void 0},c&&u.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:j},c),c4(a,a=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?j:void 0},u.createElement(cR.Provider,{value:m},a))))}),cV=u.forwardRef((a,b)=>{let{alwaysRender:c,...d}=a,e=u.useRef(null),f=c1(a=>!a.search);return c||f?u.createElement(ba.div,{ref:A(e,b),...d,"cmdk-separator":"",role:"separator"}):null}),cW=u.forwardRef((a,b)=>{let{onValueChange:c,...d}=a,e=null!=a.value,f=u.useContext(cQ),g=c1(a=>a.search),h=c1(a=>a.selectedItemId),i=u.useContext(cP);return u.useEffect(()=>{null!=a.value&&f.setState("search",a.value)},[a.value]),u.createElement(ba.input,{ref:b,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":h,id:i.inputId,type:"text",value:e?a.value:g,onChange:a=>{e||f.setState("search",a.target.value),null==c||c(a.target.value)}})}),cX=u.forwardRef((a,b)=>{let{children:c,label:d="Suggestions",...e}=a,f=u.useRef(null),g=u.useRef(null),h=c1(a=>a.selectedItemId),i=u.useContext(cP);return u.useEffect(()=>{if(g.current&&f.current){let a=g.current,b=f.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let c=a.offsetHeight;b.style.setProperty("--cmdk-list-height",c.toFixed(1)+"px")})});return d.observe(a),()=>{cancelAnimationFrame(c),d.unobserve(a)}}},[]),u.createElement(ba.div,{ref:A(f,b),...e,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":d,id:i.listId},c4(a,a=>u.createElement("div",{ref:A(g,i.listInnerRef),"cmdk-list-sizer":""},a)))}),cY=u.forwardRef((a,b)=>{let{open:c,onOpenChange:d,overlayClassName:e,contentClassName:f,container:g,...h}=a;return u.createElement(cg,{open:c,onOpenChange:d},u.createElement(cm,{container:g},u.createElement(co,{"cmdk-overlay":"",className:e}),u.createElement(cs,{"aria-label":a.label,"cmdk-dialog":"",className:f},u.createElement(cS,{ref:b,...h}))))}),cZ=Object.assign(cS,{List:cX,Item:cT,Input:cW,Group:cU,Separator:cV,Dialog:cY,Empty:u.forwardRef((a,b)=>c1(a=>0===a.filtered.count)?u.createElement(ba.div,{ref:b,...a,"cmdk-empty":"",role:"presentation"}):null),Loading:u.forwardRef((a,b)=>{let{progress:c,children:d,label:e="Loading...",...f}=a;return u.createElement(ba.div,{ref:b,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e},c4(a,a=>u.createElement("div",{"aria-hidden":!0},a)))})});function c$(a){let b=u.useRef(a);return c_(()=>{b.current=a}),b}var c_=u.useEffect;function c0(a){let b=u.useRef();return void 0===b.current&&(b.current=a()),b}function c1(a){let b=u.useContext(cQ),c=()=>a(b.snapshot());return u.useSyncExternalStore(b.subscribe,c,c)}function c2(a,b,c,d=[]){let e=u.useRef(),f=u.useContext(cP);return c_(()=>{var g;let h=(()=>{var a;for(let b of c){if("string"==typeof b)return b.trim();if("object"==typeof b&&"current"in b)return b.current?null==(a=b.current.textContent)?void 0:a.trim():e.current}})(),i=d.map(a=>a.trim());f.value(a,h,i),null==(g=b.current)||g.setAttribute(cN,h),e.current=h}),e}var c3=()=>{let[a,b]=u.useState(),c=c0(()=>new Map);return c_(()=>{c.current.forEach(a=>a()),c.current=new Map},[a]),(a,d)=>{c.current.set(a,d),b({})}};function c4({asChild:a,children:b},c){let d;return a&&u.isValidElement(b)?u.cloneElement("function"==typeof(d=b.type)?d(b.props):"render"in d?d.render(b.props):b,{ref:b.ref},c(b.props.children)):c(b)}var c5={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},c6=a.i(70106);let c7=(0,c6.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",0,c7],87532);let c8=(0,c6.default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",0,c8],33508);let c9=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(co,{ref:c,className:aS("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...b}));c9.displayName=co.displayName;let da=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(cm,{children:[(0,t.jsx)(c9,{}),(0,t.jsxs)(cs,{ref:d,className:aS("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...c,children:[b,(0,t.jsxs)(cB,{className:"absolute right-4 top-4 rounded-sm ring-offset-background transition-opacity hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-foreground",children:[(0,t.jsx)(c8,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));da.displayName=cs.displayName;let db=({className:a,...b})=>(0,t.jsx)("div",{className:aS("flex flex-col space-y-1.5 text-center sm:text-left",a),...b});db.displayName="DialogHeader";let dc=({className:a,...b})=>(0,t.jsx)("div",{className:aS("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...b});dc.displayName="DialogFooter";let dd=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cx,{ref:c,className:aS("text-lg font-semibold leading-none tracking-tight text-foreground",a),...b}));dd.displayName=cx.displayName;let de=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cz,{ref:c,className:aS("text-sm text-muted-foreground",a),...b}));de.displayName=cz.displayName,a.s(["Dialog",0,cg,"DialogContent",0,da,"DialogDescription",0,de,"DialogFooter",0,dc,"DialogHeader",0,db,"DialogTitle",0,dd],85442);let df=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ,{ref:c,className:aS("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...b}));df.displayName=cZ.displayName;let dg=u.forwardRef(({className:a,...b},c)=>(0,t.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,t.jsx)(c7,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,t.jsx)(cZ.Input,{ref:c,className:aS("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...b})]}));dg.displayName=cZ.Input.displayName;let dh=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.List,{ref:c,className:aS("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...b}));dh.displayName=cZ.List.displayName;let di=u.forwardRef((a,b)=>(0,t.jsx)(cZ.Empty,{ref:b,className:"py-6 text-center text-sm",...a}));di.displayName=cZ.Empty.displayName;let dj=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Group,{ref:c,className:aS("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...b}));dj.displayName=cZ.Group.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Separator,{ref:c,className:aS("-mx-1 h-px bg-border",a),...b})).displayName=cZ.Separator.displayName;let dk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Item,{ref:c,className:aS("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a),...b}));dk.displayName=cZ.Item.displayName;let dl=["top","right","bottom","left"],dm=Math.min,dn=Math.max,dp=Math.round,dq=Math.floor,dr=a=>({x:a,y:a}),ds={left:"right",right:"left",bottom:"top",top:"bottom"},dt={start:"end",end:"start"};function du(a,b){return"function"==typeof a?a(b):a}function dv(a){return a.split("-")[0]}function dw(a){return a.split("-")[1]}function dx(a){return"x"===a?"y":"x"}function dy(a){return"y"===a?"height":"width"}let dz=new Set(["top","bottom"]);function dA(a){return dz.has(dv(a))?"y":"x"}function dB(a){return a.replace(/start|end/g,a=>dt[a])}let dC=["left","right"],dD=["right","left"],dE=["top","bottom"],dF=["bottom","top"];function dG(a){return a.replace(/left|right|bottom|top/g,a=>ds[a])}function dH(a){return"number"!=typeof a?{top:0,right:0,bottom:0,left:0,...a}:{top:a,right:a,bottom:a,left:a}}function dI(a){let{x:b,y:c,width:d,height:e}=a;return{width:d,height:e,top:c,left:b,right:b+d,bottom:c+e,x:b,y:c}}function dJ(a,b,c){let d,{reference:e,floating:f}=a,g=dA(b),h=dx(dA(b)),i=dy(h),j=dv(b),k="y"===g,l=e.x+e.width/2-f.width/2,m=e.y+e.height/2-f.height/2,n=e[i]/2-f[i]/2;switch(j){case"top":d={x:l,y:e.y-f.height};break;case"bottom":d={x:l,y:e.y+e.height};break;case"right":d={x:e.x+e.width,y:m};break;case"left":d={x:e.x-f.width,y:m};break;default:d={x:e.x,y:e.y}}switch(dw(b)){case"start":d[h]-=n*(c&&k?-1:1);break;case"end":d[h]+=n*(c&&k?-1:1)}return d}let dK=async(a,b,c)=>{let{placement:d="bottom",strategy:e="absolute",middleware:f=[],platform:g}=c,h=f.filter(Boolean),i=await (null==g.isRTL?void 0:g.isRTL(b)),j=await g.getElementRects({reference:a,floating:b,strategy:e}),{x:k,y:l}=dJ(j,d,i),m=d,n={},o=0;for(let c=0;c<h.length;c++){let{name:f,fn:p}=h[c],{x:q,y:r,data:s,reset:t}=await p({x:k,y:l,initialPlacement:d,placement:m,strategy:e,middlewareData:n,rects:j,platform:g,elements:{reference:a,floating:b}});k=null!=q?q:k,l=null!=r?r:l,n={...n,[f]:{...n[f],...s}},t&&o<=50&&(o++,"object"==typeof t&&(t.placement&&(m=t.placement),t.rects&&(j=!0===t.rects?await g.getElementRects({reference:a,floating:b,strategy:e}):t.rects),{x:k,y:l}=dJ(j,m,i)),c=-1)}return{x:k,y:l,placement:m,strategy:e,middlewareData:n}};async function dL(a,b){var c;void 0===b&&(b={});let{x:d,y:e,platform:f,rects:g,elements:h,strategy:i}=a,{boundary:j="clippingAncestors",rootBoundary:k="viewport",elementContext:l="floating",altBoundary:m=!1,padding:n=0}=du(b,a),o=dH(n),p=h[m?"floating"===l?"reference":"floating":l],q=dI(await f.getClippingRect({element:null==(c=await (null==f.isElement?void 0:f.isElement(p)))||c?p:p.contextElement||await (null==f.getDocumentElement?void 0:f.getDocumentElement(h.floating)),boundary:j,rootBoundary:k,strategy:i})),r="floating"===l?{x:d,y:e,width:g.floating.width,height:g.floating.height}:g.reference,s=await (null==f.getOffsetParent?void 0:f.getOffsetParent(h.floating)),t=await (null==f.isElement?void 0:f.isElement(s))&&await (null==f.getScale?void 0:f.getScale(s))||{x:1,y:1},u=dI(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:r,offsetParent:s,strategy:i}):r);return{top:(q.top-u.top+o.top)/t.y,bottom:(u.bottom-q.bottom+o.bottom)/t.y,left:(q.left-u.left+o.left)/t.x,right:(u.right-q.right+o.right)/t.x}}function dM(a,b){return{top:a.top-b.height,right:a.right-b.width,bottom:a.bottom-b.height,left:a.left-b.width}}function dN(a){return dl.some(b=>a[b]>=0)}let dO=new Set(["left","top"]);async function dP(a,b){let{placement:c,platform:d,elements:e}=a,f=await (null==d.isRTL?void 0:d.isRTL(e.floating)),g=dv(c),h=dw(c),i="y"===dA(c),j=dO.has(g)?-1:1,k=f&&i?-1:1,l=du(b,a),{mainAxis:m,crossAxis:n,alignmentAxis:o}="number"==typeof l?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return h&&"number"==typeof o&&(n="end"===h?-1*o:o),i?{x:n*k,y:m*j}:{x:m*j,y:n*k}}function dQ(a){return function(a){return!1}(a)?(a.nodeName||"").toLowerCase():"#document"}function dR(a){var b;return(null==a||null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function dS(a){var b;return null==(b=(function(a){return!1}(a)?a.ownerDocument:a.document)||window.document)?void 0:b.documentElement}function dT(a){return!1}let dU=new Set(["inline","contents"]);function dV(a){let{overflow:b,overflowX:c,overflowY:d,display:e}=d4(a);return/auto|scroll|overlay|hidden|clip/.test(b+d+c)&&!dU.has(e)}let dW=new Set(["table","td","th"]),dX=[":popover-open",":modal"];function dY(a){return dX.some(b=>{try{return a.matches(b)}catch(a){return!1}})}let dZ=["transform","translate","scale","rotate","perspective"],d$=["transform","translate","scale","rotate","perspective","filter"],d_=["paint","layout","strict","content"];function d0(a){let b=d1(),c=a;return dZ.some(a=>!!c[a]&&"none"!==c[a])||!!c.containerType&&"normal"!==c.containerType||!b&&!!c.backdropFilter&&"none"!==c.backdropFilter||!b&&!!c.filter&&"none"!==c.filter||d$.some(a=>(c.willChange||"").includes(a))||d_.some(a=>(c.contain||"").includes(a))}function d1(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let d2=new Set(["html","body","#document"]);function d3(a){return d2.has(dQ(a))}function d4(a){return dR(a).getComputedStyle(a)}function d5(a){return{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function d6(a){if("html"===dQ(a))return a;let b=a.assignedSlot||a.parentNode||dS(a);return b}function d7(a,b,c){var d;void 0===b&&(b=[]),void 0===c&&(c=!0);let e=function a(b){let c=d6(b);return d3(c)?b.ownerDocument?b.ownerDocument.body:b.body:a(c)}(a),f=e===(null==(d=a.ownerDocument)?void 0:d.body),g=dR(e);if(f){let a=d8(g);return b.concat(g,g.visualViewport||[],dV(e)?e:[],a&&c?d7(a):[])}return b.concat(e,d7(e,[],c))}function d8(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function d9(a){let b=d4(a),c=parseFloat(b.width)||0,d=parseFloat(b.height)||0,e=c,f=d,g=dp(c)!==e||dp(d)!==f;return g&&(c=e,d=f),{width:c,height:d,$:g}}function ea(a){return 0,a.contextElement}function eb(a){let b=ea(a);1;return dr(1)}let ec=dr(0);function ed(a){let b=dR(a);return d1()&&b.visualViewport?{x:b.visualViewport.offsetLeft,y:b.visualViewport.offsetTop}:ec}function ee(a,b,c,d){var e;void 0===b&&(b=!1),void 0===c&&(c=!1);let f=a.getBoundingClientRect(),g=ea(a),h=dr(1);b&&(d||(h=eb(a)));let i=(void 0===(e=c)&&(e=!1),d&&(!e||d===dR(g))&&e)?ed(g):dr(0),j=(f.left+i.x)/h.x,k=(f.top+i.y)/h.y,l=f.width/h.x,m=f.height/h.y;if(g){let a=dR(g),b=d,c=a,e=d8(c);for(;e&&d&&b!==c;){let a=eb(e),b=e.getBoundingClientRect(),d=d4(e),f=b.left+(e.clientLeft+parseFloat(d.paddingLeft))*a.x,g=b.top+(e.clientTop+parseFloat(d.paddingTop))*a.y;j*=a.x,k*=a.y,l*=a.x,m*=a.y,j+=f,k+=g,e=d8(c=dR(e))}}return dI({width:l,height:m,x:j,y:k})}function ef(a,b){let c=d5(a).scrollLeft;return b?b.left+c:ee(dS(a)).left+c}function eg(a,b){let c=a.getBoundingClientRect();return{x:c.left+b.scrollLeft-ef(a,c),y:c.top+b.scrollTop}}function eh(a,b,c){var d;let e;if("viewport"===b)e=function(a,b){let c=dR(a),d=dS(a),e=c.visualViewport,f=d.clientWidth,g=d.clientHeight,h=0,i=0;if(e){f=e.width,g=e.height;let a=d1();(!a||a&&"fixed"===b)&&(h=e.offsetLeft,i=e.offsetTop)}let j=ef(d);if(j<=0){let a=d.ownerDocument,b=a.body,c=getComputedStyle(b),e="CSS1Compat"===a.compatMode&&parseFloat(c.marginLeft)+parseFloat(c.marginRight)||0,g=Math.abs(d.clientWidth-b.clientWidth-e);g<=25&&(f-=g)}else j<=25&&(f+=j);return{width:f,height:g,x:h,y:i}}(a,c);else if("document"===b){let b,c,f,g,h,i,j;d=dS(a),b=dS(d),c=d5(d),f=d.ownerDocument.body,g=dn(b.scrollWidth,b.clientWidth,f.scrollWidth,f.clientWidth),h=dn(b.scrollHeight,b.clientHeight,f.scrollHeight,f.clientHeight),i=-c.scrollLeft+ef(d),j=-c.scrollTop,"rtl"===d4(f).direction&&(i+=dn(b.clientWidth,f.clientWidth)-g),e={width:g,height:h,x:i,y:j}}else if(1){let c=ed(a);e={x:b.x-c.x,y:b.y-c.y,width:b.width,height:b.height}}else{let a,d,f,g,h,i;d=(a=ee(b,!0,"fixed"===c)).top+b.clientTop,f=a.left+b.clientLeft,g=dr(1),h=b.clientWidth*g.x,i=b.clientHeight*g.y,e={width:h,height:i,x:f*g.x,y:d*g.y}}return dI(e)}function ei(a){return"static"===d4(a).position}function ej(a,b){1;return null}function ek(a,b){var c;let d=dR(a);if(dY(a))return d;1;{let b=d6(a);for(;b&&!d3(b);){0;b=d6(b)}return d}}let el=async function(a){let b=this.getOffsetParent||ek,c=this.getDimensions,d=await c(a.floating);return{reference:function(a,b,c){let d=dS(b),e="fixed"===c,f=ee(a,!0,e,b),g={scrollLeft:0,scrollTop:0},h=dr(0);if(!e)if(("body"!==dQ(b)||dV(d))&&(g=d5(b)),1)d&&(h.x=ef(d));else{let a=ee(b,!0,e,b);h.x=a.x+b.clientLeft,h.y=a.y+b.clientTop}e&&d&&(h.x=ef(d));let i=!d||e?dr(0):eg(d,g);return{x:f.left+g.scrollLeft-h.x-i.x,y:f.top+g.scrollTop-h.y-i.y,width:f.width,height:f.height}}(a.reference,await b(a.floating),a.strategy),floating:{x:0,y:0,width:d.width,height:d.height}}},em={convertOffsetParentRelativeRectToViewportRelativeRect:function(a){let{elements:b,rect:c,offsetParent:d,strategy:e}=a,f="fixed"===e,g=dS(d),h=!!b&&dY(b.floating);if(d===g||h&&f)return c;let i={scrollLeft:0,scrollTop:0},j=dr(1),k=dr(0);!f&&(("body"!==dQ(d)||dV(g))&&(i=d5(d)),0);let l=!g||f?dr(0):eg(g,i);return{width:c.width*j.x,height:c.height*j.y,x:c.x*j.x-i.scrollLeft*j.x+k.x+l.x,y:c.y*j.y-i.scrollTop*j.y+k.y+l.y}},getDocumentElement:dS,getClippingRect:function(a){let{element:b,boundary:c,rootBoundary:d,strategy:e}=a,f=[..."clippingAncestors"===c?dY(b)?[]:function(a,b){let c=b.get(a);if(c)return c;let d=d7(a,[],!1).filter(a=>!1),e="fixed"===d4(a).position,f=e?d6(a):a;return b.set(a,d),d}(b,this._c):[].concat(c),d],g=f[0],h=f.reduce((a,c)=>{let d=eh(b,c,e);return a.top=dn(d.top,a.top),a.right=dm(d.right,a.right),a.bottom=dm(d.bottom,a.bottom),a.left=dn(d.left,a.left),a},eh(b,g,e));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}},getOffsetParent:ek,getElementRects:el,getClientRects:function(a){return Array.from(a.getClientRects())},getDimensions:function(a){let{width:b,height:c}=d9(a);return{width:b,height:c}},getScale:eb,isElement:dT,isRTL:function(a){return"rtl"===d4(a).direction}};function en(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}let eo=a=>({name:"arrow",options:a,async fn(b){let{x:c,y:d,placement:e,rects:f,platform:g,elements:h,middlewareData:i}=b,{element:j,padding:k=0}=du(a,b)||{};if(null==j)return{};let l=dH(k),m={x:c,y:d},n=dx(dA(e)),o=dy(n),p=await g.getDimensions(j),q="y"===n,r=q?"clientHeight":"clientWidth",s=f.reference[o]+f.reference[n]-m[n]-f.floating[o],t=m[n]-f.reference[n],u=await (null==g.getOffsetParent?void 0:g.getOffsetParent(j)),v=u?u[r]:0;v&&await (null==g.isElement?void 0:g.isElement(u))||(v=h.floating[r]||f.floating[o]);let w=v/2-p[o]/2-1,x=dm(l[q?"top":"left"],w),y=dm(l[q?"bottom":"right"],w),z=v-p[o]-y,A=v/2-p[o]/2+(s/2-t/2),B=dn(x,dm(A,z)),C=!i.arrow&&null!=dw(e)&&A!==B&&f.reference[o]/2-(A<x?x:y)-p[o]/2<0,D=C?A<x?A-x:A-z:0;return{[n]:m[n]+D,data:{[n]:B,centerOffset:A-B-D,...C&&{alignmentOffset:D}},reset:C}}});var ep="u">typeof document?u.useLayoutEffect:function(){};function eq(a,b){let c,d,e;if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if((c=a.length)!==b.length)return!1;for(d=c;0!=d--;)if(!eq(a[d],b[d]))return!1;return!0}if((c=(e=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(d=c;0!=d--;)if(!({}).hasOwnProperty.call(b,e[d]))return!1;for(d=c;0!=d--;){let c=e[d];if(("_owner"!==c||!a.$$typeof)&&!eq(a[c],b[c]))return!1}return!0}return a!=a&&b!=b}function er(a,b){return Math.round(+b)/1}function es(a){let b=u.useRef(a);return ep(()=>{b.current=a}),b}var et=u.forwardRef((a,b)=>{let{children:c,width:d=10,height:e=5,...f}=a;return(0,t.jsx)(ba.svg,{...f,ref:b,width:d,height:e,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?c:(0,t.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function eu(a){let[b,c]=u.useState(void 0);return a1(()=>{if(a){c({width:a.offsetWidth,height:a.offsetHeight});let b=new ResizeObserver(b=>{let d,e;if(!Array.isArray(b)||!b.length)return;let f=b[0];if("borderBoxSize"in f){let a=f.borderBoxSize,b=Array.isArray(a)?a[0]:a;d=b.inlineSize,e=b.blockSize}else d=a.offsetWidth,e=a.offsetHeight;c({width:d,height:e})});return b.observe(a,{box:"border-box"}),()=>b.unobserve(a)}c(void 0)},[a]),b}et.displayName="Arrow",a.s(["useSize",0,eu],3688);var ev="Popper",[ew,ex]=a0(ev),[ey,ez]=ew(ev),eA=a=>{let{__scopePopper:b,children:c}=a,[d,e]=u.useState(null);return(0,t.jsx)(ey,{scope:b,anchor:d,onAnchorChange:e,children:c})};eA.displayName=ev;var eB="PopperAnchor",eC=u.forwardRef((a,b)=>{let{__scopePopper:c,virtualRef:d,...e}=a,f=ez(eB,c),g=u.useRef(null),h=B(b,g),i=u.useRef(null);return u.useEffect(()=>{let a=i.current;i.current=d?.current||g.current,a!==i.current&&f.onAnchorChange(i.current)}),d?null:(0,t.jsx)(ba.div,{...e,ref:h})});eC.displayName=eB;var eD="PopperContent",[eE,eF]=ew(eD),eG=u.forwardRef((a,b)=>{var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,v,w,x,y;let{__scopePopper:z,side:A="bottom",sideOffset:C=0,align:D="center",alignOffset:E=0,arrowPadding:F=0,avoidCollisions:G=!0,collisionBoundary:H=[],collisionPadding:I=0,sticky:J="partial",hideWhenDetached:K=!1,updatePositionStrategy:L="optimized",onPlaced:M,...N}=a,O=ez(eD,z),[P,Q]=u.useState(null),R=B(b,a=>Q(a)),[S,T]=u.useState(null),U=eu(S),V=U?.width??0,W=U?.height??0,X="number"==typeof I?I:{top:0,right:0,bottom:0,left:0,...I},Y=Array.isArray(H)?H:[H],Z=Y.length>0,$={padding:X,boundary:Y.filter(eK),altBoundary:Z},{refs:_,floatingStyles:aa,placement:ab,isPositioned:ac,middlewareData:ad}=function(a){void 0===a&&(a={});let{placement:b="bottom",strategy:c="absolute",middleware:d=[],platform:e,elements:{reference:f,floating:g}={},transform:h=!0,whileElementsMounted:i,open:j}=a,[k,l]=u.useState({x:0,y:0,strategy:c,placement:b,middlewareData:{},isPositioned:!1}),[m,n]=u.useState(d);eq(m,d)||n(d);let[o,p]=u.useState(null),[q,r]=u.useState(null),s=u.useCallback(a=>{a!==x.current&&(x.current=a,p(a))},[]),t=u.useCallback(a=>{a!==y.current&&(y.current=a,r(a))},[]),v=f||o,w=g||q,x=u.useRef(null),y=u.useRef(null),z=u.useRef(k),A=null!=i,B=es(i),C=es(e),D=es(j),E=u.useCallback(()=>{var a,d;let e,f,g;if(!x.current||!y.current)return;let h={placement:b,strategy:c,middleware:m};C.current&&(h.platform=C.current),(a=x.current,d=y.current,e=new Map,g={...(f={platform:em,...h}).platform,_c:e},dK(a,d,{...f,platform:g})).then(a=>{let b={...a,isPositioned:!1!==D.current};F.current&&!eq(z.current,b)&&(z.current=b,a7.flushSync(()=>{l(b)}))})},[m,b,c,C,D]);ep(()=>{!1===j&&z.current.isPositioned&&(z.current.isPositioned=!1,l(a=>({...a,isPositioned:!1})))},[j]);let F=u.useRef(!1);ep(()=>(F.current=!0,()=>{F.current=!1}),[]),ep(()=>{if(v&&(x.current=v),w&&(y.current=w),v&&w){if(B.current)return B.current(v,w,E);E()}},[v,w,E,B,A]);let G=u.useMemo(()=>({reference:x,floating:y,setReference:s,setFloating:t}),[s,t]),H=u.useMemo(()=>({reference:v,floating:w}),[v,w]),I=u.useMemo(()=>{let a={position:c,left:0,top:0};if(!H.floating)return a;let b=er(H.floating,k.x),d=er(H.floating,k.y);if(h)return{...a,transform:"translate("+b+"px, "+d+"px)",...(H.floating,false)};return{position:c,left:b,top:d}},[c,h,H.floating,k.x,k.y]);return u.useMemo(()=>({...k,update:E,refs:G,elements:H,floatingStyles:I}),[k,E,G,H,I])}({strategy:"fixed",placement:A+("center"!==D?"-"+D:""),whileElementsMounted:(...a)=>(function(a,b,c,d){let e;void 0===d&&(d={});let{ancestorScroll:f=!0,ancestorResize:g=!0,elementResize:h="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:j=!1}=d,k=ea(a),l=f||g?[...k?d7(k):[],...d7(b)]:[];l.forEach(a=>{f&&a.addEventListener("scroll",c,{passive:!0}),g&&a.addEventListener("resize",c)});let m=k&&i?function(a,b){let c,d=null,e=dS(a);function f(){var a;clearTimeout(c),null==(a=d)||a.disconnect(),d=null}return!function g(h,i){void 0===h&&(h=!1),void 0===i&&(i=1),f();let j=a.getBoundingClientRect(),{left:k,top:l,width:m,height:n}=j;if(h||b(),!m||!n)return;let o={rootMargin:-dq(l)+"px "+-dq(e.clientWidth-(k+m))+"px "+-dq(e.clientHeight-(l+n))+"px "+-dq(k)+"px",threshold:dn(0,dm(1,i))||1},p=!0;function q(b){let d=b[0].intersectionRatio;if(d!==i){if(!p)return g();d?g(!1,d):c=setTimeout(()=>{g(!1,1e-7)},1e3)}1!==d||en(j,a.getBoundingClientRect())||g(),p=!1}try{d=new IntersectionObserver(q,{...o,root:e.ownerDocument})}catch(a){d=new IntersectionObserver(q,o)}d.observe(a)}(!0),f}(k,c):null,n=-1,o=null;h&&(o=new ResizeObserver(a=>{let[d]=a;d&&d.target===k&&o&&(o.unobserve(b),cancelAnimationFrame(n),n=requestAnimationFrame(()=>{var a;null==(a=o)||a.observe(b)})),c()}),k&&!j&&o.observe(k),o.observe(b));let p=j?ee(a):null;return j&&function b(){let d=ee(a);p&&!en(p,d)&&c(),p=d,e=requestAnimationFrame(b)}(),c(),()=>{var a;l.forEach(a=>{f&&a.removeEventListener("scroll",c),g&&a.removeEventListener("resize",c)}),null==m||m(),null==(a=o)||a.disconnect(),o=null,j&&cancelAnimationFrame(e)}})(...a,{animationFrame:"always"===L}),elements:{reference:O.anchor},middleware:[{...{name:"offset",options:e=c={mainAxis:C+W,alignmentAxis:E},async fn(a){var b,c;let{x:d,y:f,placement:g,middlewareData:h}=a,i=await dP(a,e);return g===(null==(b=h.offset)?void 0:b.placement)&&null!=(c=h.arrow)&&c.alignmentOffset?{}:{x:d+i.x,y:f+i.y,data:{...i,placement:g}}}},options:[c,d]},G&&{...{name:"shift",options:k=i={mainAxis:!0,crossAxis:!1,limiter:"partial"===J?{...(void 0===(h=f)&&(h={}),{options:h,fn(a){let{x:b,y:c,placement:d,rects:e,middlewareData:f}=a,{offset:g=0,mainAxis:i=!0,crossAxis:j=!0}=du(h,a),k={x:b,y:c},l=dA(d),m=dx(l),n=k[m],o=k[l],p=du(g,a),q="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(i){let a="y"===m?"height":"width",b=e.reference[m]-e.floating[a]+q.mainAxis,c=e.reference[m]+e.reference[a]-q.mainAxis;n<b?n=b:n>c&&(n=c)}if(j){var r,s;let a="y"===m?"width":"height",b=dO.has(dv(d)),c=e.reference[l]-e.floating[a]+(b&&(null==(r=f.offset)?void 0:r[l])||0)+(b?0:q.crossAxis),g=e.reference[l]+e.reference[a]+(b?0:(null==(s=f.offset)?void 0:s[l])||0)-(b?q.crossAxis:0);o<c?o=c:o>g&&(o=g)}return{[m]:n,[l]:o}}}),options:[f,g]}:void 0,...$},async fn(a){let{x:b,y:c,placement:d}=a,{mainAxis:e=!0,crossAxis:f=!1,limiter:g={fn:a=>{let{x:b,y:c}=a;return{x:b,y:c}}},...h}=du(k,a),i={x:b,y:c},j=await dL(a,h),l=dA(dv(d)),m=dx(l),n=i[m],o=i[l];if(e){let a="y"===m?"top":"left",b="y"===m?"bottom":"right",c=n+j[a],d=n-j[b];n=dn(c,dm(n,d))}if(f){let a="y"===l?"top":"left",b="y"===l?"bottom":"right",c=o+j[a],d=o-j[b];o=dn(c,dm(o,d))}let p=g.fn({...a,[m]:n,[l]:o});return{...p,data:{x:p.x-b,y:p.y-c,enabled:{[m]:e,[l]:f}}}}},options:[i,j]},G&&{...{name:"flip",options:n=l={...$},async fn(a){var b,c,d,e,f,g,h,i;let j,k,l,{placement:m,middlewareData:o,rects:p,initialPlacement:q,platform:r,elements:s}=a,{mainAxis:t=!0,crossAxis:u=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...z}=du(n,a);if(null!=(b=o.arrow)&&b.alignmentOffset)return{};let A=dv(m),B=dA(q),C=dv(q)===q,D=await (null==r.isRTL?void 0:r.isRTL(s.floating)),E=v||(C||!y?[dG(q)]:(j=dG(q),[dB(q),j,dB(j)])),F="none"!==x;!v&&F&&E.push(...(k=dw(q),l=function(a,b,c){switch(a){case"top":case"bottom":if(c)return b?dD:dC;return b?dC:dD;case"left":case"right":return b?dE:dF;default:return[]}}(dv(q),"start"===x,D),k&&(l=l.map(a=>a+"-"+k),y&&(l=l.concat(l.map(dB)))),l));let G=[q,...E],H=await dL(a,z),I=[],J=(null==(c=o.flip)?void 0:c.overflows)||[];if(t&&I.push(H[A]),u){let a,b,c,d,e=(g=m,h=p,void 0===(i=D)&&(i=!1),a=dw(g),c=dy(b=dx(dA(g))),d="x"===b?a===(i?"end":"start")?"right":"left":"start"===a?"bottom":"top",h.reference[c]>h.floating[c]&&(d=dG(d)),[d,dG(d)]);I.push(H[e[0]],H[e[1]])}if(J=[...J,{placement:m,overflows:I}],!I.every(a=>a<=0)){let a=((null==(d=o.flip)?void 0:d.index)||0)+1,b=G[a];if(b&&("alignment"!==u||B===dA(b)||J.every(a=>dA(a.placement)!==B||a.overflows[0]>0)))return{data:{index:a,overflows:J},reset:{placement:b}};let c=null==(e=J.filter(a=>a.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])?void 0:e.placement;if(!c)switch(w){case"bestFit":{let a=null==(f=J.filter(a=>{if(F){let b=dA(a.placement);return b===B||"y"===b}return!0}).map(a=>[a.placement,a.overflows.filter(a=>a>0).reduce((a,b)=>a+b,0)]).sort((a,b)=>a[1]-b[1])[0])?void 0:f[0];a&&(c=a);break}case"initialPlacement":c=q}if(m!==c)return{reset:{placement:c}}}return{}}},options:[l,m]},{...{name:"size",options:q=o={...$,apply:({elements:a,rects:b,availableWidth:c,availableHeight:d})=>{let{width:e,height:f}=b.reference,g=a.floating.style;g.setProperty("--radix-popper-available-width",`${c}px`),g.setProperty("--radix-popper-available-height",`${d}px`),g.setProperty("--radix-popper-anchor-width",`${e}px`),g.setProperty("--radix-popper-anchor-height",`${f}px`)}},async fn(a){var b,c;let d,e,{placement:f,rects:g,platform:h,elements:i}=a,{apply:j=()=>{},...k}=du(q,a),l=await dL(a,k),m=dv(f),n=dw(f),o="y"===dA(f),{width:p,height:r}=g.floating;"top"===m||"bottom"===m?(d=m,e=n===(await (null==h.isRTL?void 0:h.isRTL(i.floating))?"start":"end")?"left":"right"):(e=m,d="end"===n?"top":"bottom");let s=r-l.top-l.bottom,t=p-l.left-l.right,u=dm(r-l[d],s),v=dm(p-l[e],t),w=!a.middlewareData.shift,x=u,y=v;if(null!=(b=a.middlewareData.shift)&&b.enabled.x&&(y=t),null!=(c=a.middlewareData.shift)&&c.enabled.y&&(x=s),w&&!n){let a=dn(l.left,0),b=dn(l.right,0),c=dn(l.top,0),d=dn(l.bottom,0);o?y=p-2*(0!==a||0!==b?a+b:dn(l.left,l.right)):x=r-2*(0!==c||0!==d?c+d:dn(l.top,l.bottom))}await j({...a,availableWidth:y,availableHeight:x});let z=await h.getDimensions(i.floating);return p!==z.width||r!==z.height?{reset:{rects:!0}}:{}}},options:[o,p]},S&&{...{name:"arrow",options:v=r={element:S,padding:F},fn(a){let{element:b,padding:c}="function"==typeof v?v(a):v;return b&&({}).hasOwnProperty.call(b,"current")?null!=b.current?eo({element:b.current,padding:c}).fn(a):{}:b?eo({element:b,padding:c}).fn(a):{}}},options:[r,s]},eL({arrowWidth:V,arrowHeight:W}),K&&{...{name:"hide",options:y=w={strategy:"referenceHidden",...$},async fn(a){let{rects:b}=a,{strategy:c="referenceHidden",...d}=du(y,a);switch(c){case"referenceHidden":{let c=dM(await dL(a,{...d,elementContext:"reference"}),b.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:dN(c)}}}case"escaped":{let c=dM(await dL(a,{...d,altBoundary:!0}),b.floating);return{data:{escapedOffsets:c,escaped:dN(c)}}}default:return{}}}},options:[w,x]}]}),[ae,af]=eM(ab),ag=bc(M);a1(()=>{ac&&ag?.()},[ac,ag]);let ah=ad.arrow?.x,ai=ad.arrow?.y,aj=ad.arrow?.centerOffset!==0,[ak,al]=u.useState();return a1(()=>{P&&al(window.getComputedStyle(P).zIndex)},[P]),(0,t.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...aa,transform:ac?aa.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ak,"--radix-popper-transform-origin":[ad.transformOrigin?.x,ad.transformOrigin?.y].join(" "),...ad.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:(0,t.jsx)(eE,{scope:z,placedSide:ae,onArrowChange:T,arrowX:ah,arrowY:ai,shouldHideArrow:aj,children:(0,t.jsx)(ba.div,{"data-side":ae,"data-align":af,...N,ref:R,style:{...N.style,animation:ac?void 0:"none"}})})})});eG.displayName=eD;var eH="PopperArrow",eI={top:"bottom",right:"left",bottom:"top",left:"right"},eJ=u.forwardRef(function(a,b){let{__scopePopper:c,...d}=a,e=eF(eH,c),f=eI[e.placedSide];return(0,t.jsx)("span",{ref:e.onArrowChange,style:{position:"absolute",left:e.arrowX,top:e.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[e.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[e.placedSide],visibility:e.shouldHideArrow?"hidden":void 0},children:(0,t.jsx)(et,{...d,ref:b,style:{...d.style,display:"block"}})})});function eK(a){return null!==a}eJ.displayName=eH;var eL=a=>({name:"transformOrigin",options:a,fn(b){let{placement:c,rects:d,middlewareData:e}=b,f=e.arrow?.centerOffset!==0,g=f?0:a.arrowWidth,h=f?0:a.arrowHeight,[i,j]=eM(c),k={start:"0%",center:"50%",end:"100%"}[j],l=(e.arrow?.x??0)+g/2,m=(e.arrow?.y??0)+h/2,n="",o="";return"bottom"===i?(n=f?k:`${l}px`,o=`${-h}px`):"top"===i?(n=f?k:`${l}px`,o=`${d.floating.height+h}px`):"right"===i?(n=`${-h}px`,o=f?k:`${m}px`):"left"===i&&(n=`${d.floating.width+h}px`,o=f?k:`${m}px`),{data:{x:n,y:o}}}});function eM(a){let[b,c="center"]=a.split("-");return[b,c]}a.s(["Anchor",0,eC,"Arrow",0,eJ,"Content",0,eG,"Root",0,eA,"createPopperScope",0,ex],4691);var eN=Symbol("radix.slottable");function eO(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===eN}var eP="Popover",[eQ,eR]=a0(eP,[ex]),eS=ex(),[eT,eU]=eQ(eP),eV=a=>{let{__scopePopover:b,children:c,open:d,defaultOpen:e,onOpenChange:f,modal:g=!1}=a,h=eS(b),i=u.useRef(null),[j,k]=u.useState(!1),[l,m]=a6({prop:d,defaultProp:e??!1,onChange:f,caller:eP});return(0,t.jsx)(eA,{...h,children:(0,t.jsx)(eT,{scope:b,contentId:a4(),triggerRef:i,open:l,onOpenChange:m,onOpenToggle:u.useCallback(()=>m(a=>!a),[m]),hasCustomAnchor:j,onCustomAnchorAdd:u.useCallback(()=>k(!0),[]),onCustomAnchorRemove:u.useCallback(()=>k(!1),[]),modal:g,children:c})})};eV.displayName=eP;var eW="PopoverAnchor";u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(eW,c),f=eS(c),{onCustomAnchorAdd:g,onCustomAnchorRemove:h}=e;return u.useEffect(()=>(g(),()=>h()),[g,h]),(0,t.jsx)(eC,{...f,...d,ref:b})}).displayName=eW;var eX="PopoverTrigger",eY=u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(eX,c),f=eS(c),g=B(b,e.triggerRef),h=(0,t.jsx)(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":e.open,"aria-controls":e.contentId,"data-state":e8(e.open),...d,ref:g,onClick:a$(a.onClick,e.onOpenToggle)});return e.hasCustomAnchor?h:(0,t.jsx)(eC,{asChild:!0,...f,children:h})});eY.displayName=eX;var eZ="PopoverPortal",[e$,e_]=eQ(eZ,{forceMount:void 0}),e0=a=>{let{__scopePopover:b,forceMount:c,children:d,container:e}=a,f=eU(eZ,b);return(0,t.jsx)(e$,{scope:b,forceMount:c,children:(0,t.jsx)(bs,{present:c||f.open,children:(0,t.jsx)(br,{asChild:!0,container:e,children:d})})})};e0.displayName=eZ;var e1="PopoverContent",e2=u.forwardRef((a,b)=>{let c=e_(e1,a.__scopePopover),{forceMount:d=c.forceMount,...e}=a,f=eU(e1,a.__scopePopover);return(0,t.jsx)(bs,{present:d||f.open,children:f.modal?(0,t.jsx)(e4,{...e,ref:b}):(0,t.jsx)(e5,{...e,ref:b})})});e2.displayName=e1;var e3=((j=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName="PopoverContent.RemoveScroll.SlotClone",d=j,(e=u.forwardRef((a,b)=>{let{children:c,...e}=a,f=u.Children.toArray(c),g=f.find(eO);if(g){let a=g.props.children,c=f.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(d,{...e,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(d,{...e,ref:b,children:c})})).displayName="PopoverContent.RemoveScroll.Slot",e),e4=u.forwardRef((a,b)=>{let c=eU(e1,a.__scopePopover),d=u.useRef(null),e=B(b,d),f=u.useRef(!1);return u.useEffect(()=>{let a=d.current;if(a)return b8(a)},[]),(0,t.jsx)(b1,{as:e3,allowPinchZoom:!0,children:(0,t.jsx)(e6,{...a,ref:e,trapFocus:c.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a$(a.onCloseAutoFocus,a=>{a.preventDefault(),f.current||c.triggerRef.current?.focus()}),onPointerDownOutside:a$(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;f.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:a$(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),e5=u.forwardRef((a,b)=>{let c=eU(e1,a.__scopePopover),d=u.useRef(!1),e=u.useRef(!1);return(0,t.jsx)(e6,{...a,ref:b,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(d.current||c.triggerRef.current?.focus(),b.preventDefault()),d.current=!1,e.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(d.current=!0,"pointerdown"===b.detail.originalEvent.type&&(e.current=!0));let f=b.target;c.triggerRef.current?.contains(f)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&e.current&&b.preventDefault()}})}),e6=u.forwardRef((a,b)=>{let{__scopePopover:c,trapFocus:d,onOpenAutoFocus:e,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEscapeKeyDown:h,onPointerDownOutside:i,onFocusOutside:j,onInteractOutside:k,...l}=a,m=eU(e1,c),n=eS(c);return bv(),(0,t.jsx)(bl,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:e,onUnmountAutoFocus:f,children:(0,t.jsx)(bf,{asChild:!0,disableOutsidePointerEvents:g,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:i,onFocusOutside:j,onDismiss:()=>m.onOpenChange(!1),children:(0,t.jsx)(eG,{"data-state":e8(m.open),role:"dialog",id:m.contentId,...n,...l,ref:b,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),e7="PopoverClose";function e8(a){return a?"open":"closed"}u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(e7,c);return(0,t.jsx)(ba.button,{type:"button",...d,ref:b,onClick:a$(a.onClick,()=>e.onOpenChange(!1))})}).displayName=e7,u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eS(c);return(0,t.jsx)(eJ,{...e,...d,ref:b})}).displayName="PopoverArrow";let e9=u.forwardRef(({className:a,align:b="center",sideOffset:c=4,...d},e)=>(0,t.jsx)(e0,{children:(0,t.jsx)(e2,{ref:e,align:b,sideOffset:c,className:aS("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",a),...d})}));e9.displayName=e2.displayName;let fa=u.forwardRef(({className:a,type:b,...c},d)=>(0,t.jsx)("input",{type:b,className:aS("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:d,...c}));fa.displayName="Input",a.s(["Input",0,fa],22027);let fb=(0,c6.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,fb],33441);let fc=(0,c6.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),fd=(0,c6.default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",0,fd],15618);let fe=(0,c6.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,fe],4720);let ff=(0,c6.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),fg=(0,c6.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),fh=(0,c6.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),fi=(0,c6.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),fj=(0,c6.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),fk=(0,c6.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,fk],5784);let fl=(0,c6.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,fl],50522);var fm=a.i(5500),fn=a.i(31186);let fo=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)("textarea",{className:aS("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:c,...b}));function fp(a){let b=u.useRef({value:a,previous:a});return u.useMemo(()=>(b.current.value!==a&&(b.current.previous=b.current.value,b.current.value=a),b.current.previous),[a])}fo.displayName="Textarea",a.s(["Textarea",0,fo],6219),a.s(["usePrevious",0,fp],56558);var fq="Checkbox",[fr,fs]=a0(fq),[ft,fu]=fr(fq);function fv(a){let{__scopeCheckbox:b,checked:c,children:d,defaultChecked:e,disabled:f,form:g,name:h,onCheckedChange:i,required:j,value:k="on",internal_do_not_use_render:l}=a,[m,n]=a6({prop:c,defaultProp:e??!1,onChange:i,caller:fq}),[o,p]=u.useState(null),[q,r]=u.useState(null),s=u.useRef(!1),v=!o||!!g||!!o.closest("form"),w={checked:m,disabled:f,setChecked:n,control:o,setControl:p,name:h,form:g,value:k,hasConsumerStoppedPropagationRef:s,required:j,defaultChecked:!fD(e)&&e,isFormControl:v,bubbleInput:q,setBubbleInput:r};return(0,t.jsx)(ft,{scope:b,...w,children:"function"==typeof l?l(w):d})}var fw="CheckboxTrigger",fx=u.forwardRef(({__scopeCheckbox:a,onKeyDown:b,onClick:c,...d},e)=>{let{control:f,value:g,disabled:h,checked:i,required:j,setControl:k,setChecked:l,hasConsumerStoppedPropagationRef:m,isFormControl:n,bubbleInput:o}=fu(fw,a),p=B(e,k),q=u.useRef(i);return u.useEffect(()=>{let a=f?.form;if(a){let b=()=>l(q.current);return a.addEventListener("reset",b),()=>a.removeEventListener("reset",b)}},[f,l]),(0,t.jsx)(ba.button,{type:"button",role:"checkbox","aria-checked":fD(i)?"mixed":i,"aria-required":j,"data-state":fE(i),"data-disabled":h?"":void 0,disabled:h,value:g,...d,ref:p,onKeyDown:a$(b,a=>{"Enter"===a.key&&a.preventDefault()}),onClick:a$(c,a=>{l(a=>!!fD(a)||!a),o&&n&&(m.current=a.isPropagationStopped(),m.current||a.stopPropagation())})})});fx.displayName=fw;var fy=u.forwardRef((a,b)=>{let{__scopeCheckbox:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i,onCheckedChange:j,form:k,...l}=a;return(0,t.jsx)(fv,{__scopeCheckbox:c,checked:e,defaultChecked:f,disabled:h,required:g,onCheckedChange:j,name:d,form:k,value:i,internal_do_not_use_render:({isFormControl:a})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(fx,{...l,ref:b,__scopeCheckbox:c}),a&&(0,t.jsx)(fC,{__scopeCheckbox:c})]})})});fy.displayName=fq;var fz="CheckboxIndicator",fA=u.forwardRef((a,b)=>{let{__scopeCheckbox:c,forceMount:d,...e}=a,f=fu(fz,c);return(0,t.jsx)(bs,{present:d||fD(f.checked)||!0===f.checked,children:(0,t.jsx)(ba.span,{"data-state":fE(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:b,style:{pointerEvents:"none",...a.style}})})});fA.displayName=fz;var fB="CheckboxBubbleInput",fC=u.forwardRef(({__scopeCheckbox:a,...b},c)=>{let{control:d,hasConsumerStoppedPropagationRef:e,checked:f,defaultChecked:g,required:h,disabled:i,name:j,value:k,form:l,bubbleInput:m,setBubbleInput:n}=fu(fB,a),o=B(c,n),p=fp(f),q=eu(d);u.useEffect(()=>{if(!m)return;let a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,b=!e.current;if(p!==f&&a){let c=new Event("click",{bubbles:b});m.indeterminate=fD(f),a.call(m,!fD(f)&&f),m.dispatchEvent(c)}},[m,p,f,e]);let r=u.useRef(!fD(f)&&f);return(0,t.jsx)(ba.input,{type:"checkbox","aria-hidden":!0,defaultChecked:g??r.current,required:h,disabled:i,name:j,value:k,form:l,...b,tabIndex:-1,ref:o,style:{...b.style,...q,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function fD(a){return"indeterminate"===a}function fE(a){return fD(a)?"indeterminate":a?"checked":"unchecked"}fC.displayName=fB;let fF=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(fy,{ref:c,className:aS("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...b,children:(0,t.jsx)(fA,{className:aS("grid place-content-center text-current"),children:(0,t.jsx)(fb,{className:"h-4 w-4"})})}));function fG(a){var b;let c,d=(b=a,(c=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName=`${b}.SlotClone`,c),e=u.forwardRef((a,b)=>{let{children:c,...e}=a,f=u.Children.toArray(c),g=f.find(fI);if(g){let a=g.props.children,c=f.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(d,{...e,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(d,{...e,ref:b,children:c})});return e.displayName=`${a}.Slot`,e}fF.displayName=fy.displayName,a.s(["Checkbox",0,fF],4212);var fH=Symbol("radix.slottable");function fI(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===fH}function fJ(a){let b=a+"CollectionProvider",[c,d]=a0(b),[e,f]=c(b,{collectionRef:{current:null},itemMap:new Map}),g=a=>{let{scope:b,children:c}=a,d=u.default.useRef(null),f=u.default.useRef(new Map).current;return(0,t.jsx)(e,{scope:b,itemMap:f,collectionRef:d,children:c})};g.displayName=b;let h=a+"CollectionSlot",i=fG(h),j=u.default.forwardRef((a,b)=>{let{scope:c,children:d}=a,e=B(b,f(h,c).collectionRef);return(0,t.jsx)(i,{ref:e,children:d})});j.displayName=h;let k=a+"CollectionItemSlot",l="data-radix-collection-item",m=fG(k),n=u.default.forwardRef((a,b)=>{let{scope:c,children:d,...e}=a,g=u.default.useRef(null),h=B(b,g),i=f(k,c);return u.default.useEffect(()=>(i.itemMap.set(g,{ref:g,...e}),()=>void i.itemMap.delete(g))),(0,t.jsx)(m,{...{[l]:""},ref:h,children:d})});return n.displayName=k,[{Provider:g,Slot:j,ItemSlot:n},function(b){let c=f(a+"CollectionConsumer",b);return u.default.useCallback(()=>{let a=c.collectionRef.current;if(!a)return[];let b=Array.from(a.querySelectorAll(`[${l}]`));return Array.from(c.itemMap.values()).sort((a,c)=>b.indexOf(a.ref.current)-b.indexOf(c.ref.current))},[c.collectionRef,c.itemMap])},d]}var fK=new WeakMap;function fL(a,b){var c,d;let e,f,g;if("at"in Array.prototype)return Array.prototype.at.call(a,b);let h=(c=a,d=b,e=c.length,(g=(f=fM(d))>=0?f:e+f)<0||g>=e?-1:g);return -1===h?void 0:a[h]}function fM(a){return a!=a||0===a?0:Math.trunc(a)}(class a extends Map{#a;constructor(a){super(a),this.#a=[...super.keys()],fK.set(this,!0)}set(a,b){return fK.get(this)&&(this.has(a)?this.#a[this.#a.indexOf(a)]=a:this.#a.push(a)),super.set(a,b),this}insert(a,b,c){let d,e=this.has(b),f=this.#a.length,g=fM(a),h=g>=0?g:f+g,i=h<0||h>=f?-1:h;if(i===this.size||e&&i===this.size-1||-1===i)return this.set(b,c),this;let j=this.size+ +!e;g<0&&h++;let k=[...this.#a],l=!1;for(let a=h;a<j;a++)if(h===a){let f=k[a];k[a]===b&&(f=k[a+1]),e&&this.delete(b),d=this.get(f),this.set(b,c)}else{l||k[a-1]!==b||(l=!0);let c=k[l?a:a-1],e=d;d=this.get(c),this.delete(c),this.set(c,e)}return this}with(b,c,d){let e=new a(this);return e.insert(b,c,d),e}before(a){let b=this.#a.indexOf(a)-1;if(!(b<0))return this.entryAt(b)}setBefore(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d,b,c)}after(a){let b=this.#a.indexOf(a);if(-1!==(b=-1===b||b===this.size-1?-1:b+1))return this.entryAt(b)}setAfter(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d+1,b,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#a=[],super.clear()}delete(a){let b=super.delete(a);return b&&this.#a.splice(this.#a.indexOf(a),1),b}deleteAt(a){let b=this.keyAt(a);return void 0!==b&&this.delete(b)}at(a){let b=fL(this.#a,a);if(void 0!==b)return this.get(b)}entryAt(a){let b=fL(this.#a,a);if(void 0!==b)return[b,this.get(b)]}indexOf(a){return this.#a.indexOf(a)}keyAt(a){return fL(this.#a,a)}from(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.at(d)}keyFrom(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.keyAt(d)}find(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return d;c++}}findIndex(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return c;c++}return -1}filter(b,c){let d=[],e=0;for(let a of this)Reflect.apply(b,c,[a,e,this])&&d.push(a),e++;return new a(d)}map(b,c){let d=[],e=0;for(let a of this)d.push([a[0],Reflect.apply(b,c,[a,e,this])]),e++;return new a(d)}reduce(...a){let[b,c]=a,d=0,e=c??this.at(0);for(let c of this)e=0===d&&1===a.length?c:Reflect.apply(b,this,[e,c,d,this]),d++;return e}reduceRight(...a){let[b,c]=a,d=c??this.at(-1);for(let c=this.size-1;c>=0;c--){let e=this.at(c);d=c===this.size-1&&1===a.length?e:Reflect.apply(b,this,[d,e,c,this])}return d}toSorted(b){return new a([...this.entries()].sort(b))}toReversed(){let b=new a;for(let a=this.size-1;a>=0;a--){let c=this.keyAt(a),d=this.get(c);b.set(c,d)}return b}toSpliced(...b){let c=[...this.entries()];return c.splice(...b),new a(c)}slice(b,c){let d=new a,e=this.size-1;if(void 0===b)return d;b<0&&(b+=this.size),void 0!==c&&c>0&&(e=c-1);for(let a=b;a<=e;a++){let b=this.keyAt(a),c=this.get(b);d.set(b,c)}return d}every(a,b){let c=0;for(let d of this){if(!Reflect.apply(a,b,[d,c,this]))return!1;c++}return!0}some(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return!0;c++}return!1}}),a.s(["createCollection",0,fJ],37738);var fN=u.createContext(void 0);function fO(a){let b=u.useContext(fN);return a||b||"ltr"}a.s(["useDirection",0,fO],7827);var fP="rovingFocusGroup.onEntryFocus",fQ={bubbles:!1,cancelable:!0},fR="RovingFocusGroup",[fS,fT,fU]=fJ(fR),[fV,fW]=a0(fR,[fU]),[fX,fY]=fV(fR),fZ=u.forwardRef((a,b)=>(0,t.jsx)(fS.Provider,{scope:a.__scopeRovingFocusGroup,children:(0,t.jsx)(fS.Slot,{scope:a.__scopeRovingFocusGroup,children:(0,t.jsx)(f$,{...a,ref:b})})}));fZ.displayName=fR;var f$=u.forwardRef((a,b)=>{let{__scopeRovingFocusGroup:c,orientation:d,loop:e=!1,dir:f,currentTabStopId:g,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:i,onEntryFocus:j,preventScrollOnEntryFocus:k=!1,...l}=a,m=u.useRef(null),n=B(b,m),o=fO(f),[p,q]=a6({prop:g,defaultProp:h??null,onChange:i,caller:fR}),[r,s]=u.useState(!1),v=bc(j),w=fT(c),x=u.useRef(!1),[y,z]=u.useState(0);return u.useEffect(()=>{let a=m.current;if(a)return a.addEventListener(fP,v),()=>a.removeEventListener(fP,v)},[v]),(0,t.jsx)(fX,{scope:c,orientation:d,dir:o,loop:e,currentTabStopId:p,onItemFocus:u.useCallback(a=>q(a),[q]),onItemShiftTab:u.useCallback(()=>s(!0),[]),onFocusableItemAdd:u.useCallback(()=>z(a=>a+1),[]),onFocusableItemRemove:u.useCallback(()=>z(a=>a-1),[]),children:(0,t.jsx)(ba.div,{tabIndex:r||0===y?-1:0,"data-orientation":d,...l,ref:n,style:{outline:"none",...a.style},onMouseDown:a$(a.onMouseDown,()=>{x.current=!0}),onFocus:a$(a.onFocus,a=>{let b=!x.current;if(a.target===a.currentTarget&&b&&!r){let b=new CustomEvent(fP,fQ);if(a.currentTarget.dispatchEvent(b),!b.defaultPrevented){let a=w().filter(a=>a.focusable);f2([a.find(a=>a.active),a.find(a=>a.id===p),...a].filter(Boolean).map(a=>a.ref.current),k)}}x.current=!1}),onBlur:a$(a.onBlur,()=>s(!1))})})}),f_="RovingFocusGroupItem",f0=u.forwardRef((a,b)=>{let{__scopeRovingFocusGroup:c,focusable:d=!0,active:e=!1,tabStopId:f,children:g,...h}=a,i=a4(),j=f||i,k=fY(f_,c),l=k.currentTabStopId===j,m=fT(c),{onFocusableItemAdd:n,onFocusableItemRemove:o,currentTabStopId:p}=k;return u.useEffect(()=>{if(d)return n(),()=>o()},[d,n,o]),(0,t.jsx)(fS.ItemSlot,{scope:c,id:j,focusable:d,active:e,children:(0,t.jsx)(ba.span,{tabIndex:l?0:-1,"data-orientation":k.orientation,...h,ref:b,onMouseDown:a$(a.onMouseDown,a=>{d?k.onItemFocus(j):a.preventDefault()}),onFocus:a$(a.onFocus,()=>k.onItemFocus(j)),onKeyDown:a$(a.onKeyDown,a=>{if("Tab"===a.key&&a.shiftKey)return void k.onItemShiftTab();if(a.target!==a.currentTarget)return;let b=function(a,b,c){var d;let e=(d=a.key,"rtl"!==c?d:"ArrowLeft"===d?"ArrowRight":"ArrowRight"===d?"ArrowLeft":d);if(!("vertical"===b&&["ArrowLeft","ArrowRight"].includes(e))&&!("horizontal"===b&&["ArrowUp","ArrowDown"].includes(e)))return f1[e]}(a,k.orientation,k.dir);if(void 0!==b){if(a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;a.preventDefault();let e=m().filter(a=>a.focusable).map(a=>a.ref.current);if("last"===b)e.reverse();else if("prev"===b||"next"===b){var c,d;"prev"===b&&e.reverse();let f=e.indexOf(a.currentTarget);e=k.loop?(c=e,d=f+1,c.map((a,b)=>c[(d+b)%c.length])):e.slice(f+1)}setTimeout(()=>f2(e))}}),children:"function"==typeof g?g({isCurrentTabStop:l,hasTabStop:null!=p}):g})})});f0.displayName=f_;var f1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f2(a,b=!1){let c=document.activeElement;for(let d of a)if(d===c||(d.focus({preventScroll:b}),document.activeElement!==c))return}a.s(["Item",0,f0,"Root",0,fZ,"createRovingFocusGroupScope",0,fW],24050);var f3="Tabs",[f4,f5]=a0(f3,[fW]),f6=fW(),[f7,f8]=f4(f3),f9=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,onValueChange:e,defaultValue:f,orientation:g="horizontal",dir:h,activationMode:i="automatic",...j}=a,k=fO(h),[l,m]=a6({prop:d,onChange:e,defaultProp:f??"",caller:f3});return(0,t.jsx)(f7,{scope:c,baseId:a4(),value:l,onValueChange:m,orientation:g,dir:k,activationMode:i,children:(0,t.jsx)(ba.div,{dir:k,"data-orientation":g,...j,ref:b})})});f9.displayName=f3;var ga="TabsList",gb=u.forwardRef((a,b)=>{let{__scopeTabs:c,loop:d=!0,...e}=a,f=f8(ga,c),g=f6(c);return(0,t.jsx)(fZ,{asChild:!0,...g,orientation:f.orientation,dir:f.dir,loop:d,children:(0,t.jsx)(ba.div,{role:"tablist","aria-orientation":f.orientation,...e,ref:b})})});gb.displayName=ga;var gc="TabsTrigger",gd=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,disabled:e=!1,...f}=a,g=f8(gc,c),h=f6(c),i=gg(g.baseId,d),j=gh(g.baseId,d),k=d===g.value;return(0,t.jsx)(f0,{asChild:!0,...h,focusable:!e,active:k,children:(0,t.jsx)(ba.button,{type:"button",role:"tab","aria-selected":k,"aria-controls":j,"data-state":k?"active":"inactive","data-disabled":e?"":void 0,disabled:e,id:i,...f,ref:b,onMouseDown:a$(a.onMouseDown,a=>{e||0!==a.button||!1!==a.ctrlKey?a.preventDefault():g.onValueChange(d)}),onKeyDown:a$(a.onKeyDown,a=>{[" ","Enter"].includes(a.key)&&g.onValueChange(d)}),onFocus:a$(a.onFocus,()=>{let a="manual"!==g.activationMode;k||e||!a||g.onValueChange(d)})})})});gd.displayName=gc;var ge="TabsContent",gf=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,forceMount:e,children:f,...g}=a,h=f8(ge,c),i=gg(h.baseId,d),j=gh(h.baseId,d),k=d===h.value,l=u.useRef(k);return u.useEffect(()=>{let a=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(a)},[]),(0,t.jsx)(bs,{present:e||k,children:({present:c})=>(0,t.jsx)(ba.div,{"data-state":k?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":i,hidden:!c,id:j,tabIndex:0,...g,ref:b,style:{...a.style,animationDuration:l.current?"0s":void 0},children:c&&f})})});function gg(a,b){return`${a}-trigger-${b}`}function gh(a,b){return`${a}-content-${b}`}gf.displayName=ge;let gi=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gb,{ref:c,className:aS("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",a),...b}));gi.displayName=gb.displayName;let gj=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gd,{ref:c,className:aS("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",a),...b}));gj.displayName=gd.displayName;let gk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gf,{ref:c,className:aS("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...b}));function gl(a,[b,c]){return Math.min(c,Math.max(b,a))}gk.displayName=gf.displayName,a.s(["Tabs",0,f9,"TabsContent",0,gk,"TabsList",0,gi,"TabsTrigger",0,gj],20218),a.s(["clamp",0,gl],30656);var gm=Symbol("radix.slottable");function gn(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===gm}var go=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"}),gp=u.forwardRef((a,b)=>(0,t.jsx)(ba.span,{...a,ref:b,style:{...go,...a.style}}));gp.displayName="VisuallyHidden",a.s(["VISUALLY_HIDDEN_STYLES",0,go,"VisuallyHidden",0,gp],28094);var gq=[" ","Enter","ArrowUp","ArrowDown"],gr=[" ","Enter"],gs="Select",[gt,gu,gv]=fJ(gs),[gw,gx]=a0(gs,[gv,ex]),gy=ex(),[gz,gA]=gw(gs),[gB,gC]=gw(gs),gD=a=>{let{__scopeSelect:b,children:c,open:d,defaultOpen:e,onOpenChange:f,value:g,defaultValue:h,onValueChange:i,dir:j,name:k,autoComplete:l,disabled:m,required:n,form:o}=a,p=gy(b),[q,r]=u.useState(null),[s,v]=u.useState(null),[w,x]=u.useState(!1),y=fO(j),[z,A]=a6({prop:d,defaultProp:e??!1,onChange:f,caller:gs}),[B,C]=a6({prop:g,defaultProp:h,onChange:i,caller:gs}),D=u.useRef(null),E=!q||o||!!q.closest("form"),[F,G]=u.useState(new Set),H=Array.from(F).map(a=>a.props.value).join(";");return(0,t.jsx)(eA,{...p,children:(0,t.jsxs)(gz,{required:n,scope:b,trigger:q,onTriggerChange:r,valueNode:s,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:a4(),value:B,onValueChange:C,open:z,onOpenChange:A,dir:y,triggerPointerDownPosRef:D,disabled:m,children:[(0,t.jsx)(gt.Provider,{scope:b,children:(0,t.jsx)(gB,{scope:a.__scopeSelect,onNativeOptionAdd:u.useCallback(a=>{G(b=>new Set(b).add(a))},[]),onNativeOptionRemove:u.useCallback(a=>{G(b=>{let c=new Set(b);return c.delete(a),c})},[]),children:c})}),E?(0,t.jsxs)(he,{"aria-hidden":!0,required:n,tabIndex:-1,name:k,autoComplete:l,value:B,onChange:a=>C(a.target.value),disabled:m,form:o,children:[void 0===B?(0,t.jsx)("option",{value:""}):null,Array.from(F)]},H):null]})})};gD.displayName=gs;var gE="SelectTrigger",gF=u.forwardRef((a,b)=>{let{__scopeSelect:c,disabled:d=!1,...e}=a,f=gy(c),g=gA(gE,c),h=g.disabled||d,i=B(b,g.onTriggerChange),j=gu(c),k=u.useRef("touch"),[l,m,n]=hg(a=>{let b=j().filter(a=>!a.disabled),c=b.find(a=>a.value===g.value),d=hh(b,a,c);void 0!==d&&g.onValueChange(d.value)}),o=a=>{h||(g.onOpenChange(!0),n()),a&&(g.triggerPointerDownPosRef.current={x:Math.round(a.pageX),y:Math.round(a.pageY)})};return(0,t.jsx)(eC,{asChild:!0,...f,children:(0,t.jsx)(ba.button,{type:"button",role:"combobox","aria-controls":g.contentId,"aria-expanded":g.open,"aria-required":g.required,"aria-autocomplete":"none",dir:g.dir,"data-state":g.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":hf(g.value)?"":void 0,...e,ref:i,onClick:a$(e.onClick,a=>{a.currentTarget.focus(),"mouse"!==k.current&&o(a)}),onPointerDown:a$(e.onPointerDown,a=>{k.current=a.pointerType;let b=a.target;b.hasPointerCapture(a.pointerId)&&b.releasePointerCapture(a.pointerId),0===a.button&&!1===a.ctrlKey&&"mouse"===a.pointerType&&(o(a),a.preventDefault())}),onKeyDown:a$(e.onKeyDown,a=>{let b=""!==l.current;a.ctrlKey||a.altKey||a.metaKey||1!==a.key.length||m(a.key),(!b||" "!==a.key)&&gq.includes(a.key)&&(o(),a.preventDefault())})})})});gF.displayName=gE;var gG="SelectValue",gH=u.forwardRef((a,b)=>{let{__scopeSelect:c,className:d,style:e,children:f,placeholder:g="",...h}=a,i=gA(gG,c),{onValueNodeHasChildrenChange:j}=i,k=void 0!==f,l=B(b,i.onValueNodeChange);return a1(()=>{j(k)},[j,k]),(0,t.jsx)(ba.span,{...h,ref:l,style:{pointerEvents:"none"},children:hf(i.value)?(0,t.jsx)(t.Fragment,{children:g}):f})});gH.displayName=gG;var gI=u.forwardRef((a,b)=>{let{__scopeSelect:c,children:d,...e}=a;return(0,t.jsx)(ba.span,{"aria-hidden":!0,...e,ref:b,children:d||"▼"})});gI.displayName="SelectIcon";var gJ=a=>(0,t.jsx)(br,{asChild:!0,...a});gJ.displayName="SelectPortal";var gK="SelectContent",gL=u.forwardRef((a,b)=>{let c=gA(gK,a.__scopeSelect),[d,e]=u.useState();return(a1(()=>{e(new DocumentFragment)},[]),c.open)?(0,t.jsx)(gP,{...a,ref:b}):d?a7.createPortal((0,t.jsx)(gM,{scope:a.__scopeSelect,children:(0,t.jsx)(gt.Slot,{scope:a.__scopeSelect,children:(0,t.jsx)("div",{children:a.children})})}),d):null});gL.displayName=gK;var[gM,gN]=gw(gK),gO=((k=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName="SelectContent.RemoveScroll.SlotClone",f=k,(g=u.forwardRef((a,b)=>{let{children:c,...d}=a,e=u.Children.toArray(c),g=e.find(gn);if(g){let a=g.props.children,c=e.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(f,{...d,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(f,{...d,ref:b,children:c})})).displayName="SelectContent.RemoveScroll.Slot",g),gP=u.forwardRef((a,b)=>{let{__scopeSelect:c,position:d="item-aligned",onCloseAutoFocus:e,onEscapeKeyDown:f,onPointerDownOutside:g,side:h,sideOffset:i,align:j,alignOffset:k,arrowPadding:l,collisionBoundary:m,collisionPadding:n,sticky:o,hideWhenDetached:p,avoidCollisions:q,...r}=a,s=gA(gK,c),[v,w]=u.useState(null),[x,y]=u.useState(null),z=B(b,a=>w(a)),[A,C]=u.useState(null),[D,E]=u.useState(null),F=gu(c),[G,H]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(v)return b8(v)},[v]),bv();let J=u.useCallback(a=>{let[b,...c]=F().map(a=>a.ref.current),[d]=c.slice(-1),e=document.activeElement;for(let c of a)if(c===e||(c?.scrollIntoView({block:"nearest"}),c===b&&x&&(x.scrollTop=0),c===d&&x&&(x.scrollTop=x.scrollHeight),c?.focus(),document.activeElement!==e))return},[F,x]),K=u.useCallback(()=>J([A,v]),[J,A,v]);u.useEffect(()=>{G&&K()},[G,K]);let{onOpenChange:L,triggerPointerDownPosRef:M}=s;u.useEffect(()=>{if(v){let a={x:0,y:0},b=b=>{a={x:Math.abs(Math.round(b.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(M.current?.y??0))}},c=c=>{a.x<=10&&a.y<=10?c.preventDefault():v.contains(c.target)||L(!1),document.removeEventListener("pointermove",b),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",b),document.addEventListener("pointerup",c,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",c,{capture:!0})}}},[v,L,M]),u.useEffect(()=>{let a=()=>L(!1);return window.addEventListener("blur",a),window.addEventListener("resize",a),()=>{window.removeEventListener("blur",a),window.removeEventListener("resize",a)}},[L]);let[N,O]=hg(a=>{let b=F().filter(a=>!a.disabled),c=b.find(a=>a.ref.current===document.activeElement),d=hh(b,a,c);d&&setTimeout(()=>d.ref.current.focus())}),P=u.useCallback((a,b,c)=>{let d=!I.current&&!c;(void 0!==s.value&&s.value===b||d)&&(C(a),d&&(I.current=!0))},[s.value]),Q=u.useCallback(()=>v?.focus(),[v]),R=u.useCallback((a,b,c)=>{let d=!I.current&&!c;(void 0!==s.value&&s.value===b||d)&&E(a)},[s.value]),S="popper"===d?gR:gQ,T=S===gR?{side:h,sideOffset:i,align:j,alignOffset:k,arrowPadding:l,collisionBoundary:m,collisionPadding:n,sticky:o,hideWhenDetached:p,avoidCollisions:q}:{};return(0,t.jsx)(gM,{scope:c,content:v,viewport:x,onViewportChange:y,itemRefCallback:P,selectedItem:A,onItemLeave:Q,itemTextRefCallback:R,focusSelectedItem:K,selectedItemText:D,position:d,isPositioned:G,searchRef:N,children:(0,t.jsx)(b1,{as:gO,allowPinchZoom:!0,children:(0,t.jsx)(bl,{asChild:!0,trapped:s.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a$(e,a=>{s.trigger?.focus({preventScroll:!0}),a.preventDefault()}),children:(0,t.jsx)(bf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:a=>a.preventDefault(),onDismiss:()=>s.onOpenChange(!1),children:(0,t.jsx)(S,{role:"listbox",id:s.contentId,"data-state":s.open?"open":"closed",dir:s.dir,onContextMenu:a=>a.preventDefault(),...r,...T,onPlaced:()=>H(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...r.style},onKeyDown:a$(r.onKeyDown,a=>{let b=a.ctrlKey||a.altKey||a.metaKey;if("Tab"===a.key&&a.preventDefault(),b||1!==a.key.length||O(a.key),["ArrowUp","ArrowDown","Home","End"].includes(a.key)){let b=F().filter(a=>!a.disabled).map(a=>a.ref.current);if(["ArrowUp","End"].includes(a.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(a.key)){let c=a.target,d=b.indexOf(c);b=b.slice(d+1)}setTimeout(()=>J(b)),a.preventDefault()}})})})})})})});gP.displayName="SelectContentImpl";var gQ=u.forwardRef((a,b)=>{let{__scopeSelect:c,onPlaced:d,...e}=a,f=gA(gK,c),g=gN(gK,c),[h,i]=u.useState(null),[j,k]=u.useState(null),l=B(b,a=>k(a)),m=gu(c),n=u.useRef(!1),o=u.useRef(!0),{viewport:p,selectedItem:q,selectedItemText:r,focusSelectedItem:s}=g,v=u.useCallback(()=>{if(f.trigger&&f.valueNode&&h&&j&&p&&q&&r){let a=f.trigger.getBoundingClientRect(),b=j.getBoundingClientRect(),c=f.valueNode.getBoundingClientRect(),e=r.getBoundingClientRect();if("rtl"!==f.dir){let d=e.left-b.left,f=c.left-d,g=a.left-f,i=a.width+g,j=Math.max(i,b.width),k=gl(f,[10,Math.max(10,window.innerWidth-10-j)]);h.style.minWidth=i+"px",h.style.left=k+"px"}else{let d=b.right-e.right,f=window.innerWidth-c.right-d,g=window.innerWidth-a.right-f,i=a.width+g,j=Math.max(i,b.width),k=gl(f,[10,Math.max(10,window.innerWidth-10-j)]);h.style.minWidth=i+"px",h.style.right=k+"px"}let g=m(),i=window.innerHeight-20,k=p.scrollHeight,l=window.getComputedStyle(j),o=parseInt(l.borderTopWidth,10),s=parseInt(l.paddingTop,10),t=parseInt(l.borderBottomWidth,10),u=o+s+k+parseInt(l.paddingBottom,10)+t,v=Math.min(5*q.offsetHeight,u),w=window.getComputedStyle(p),x=parseInt(w.paddingTop,10),y=parseInt(w.paddingBottom,10),z=a.top+a.height/2-10,A=q.offsetHeight/2,B=o+s+(q.offsetTop+A);if(B<=z){let a=g.length>0&&q===g[g.length-1].ref.current;h.style.bottom="0px";let b=Math.max(i-z,A+(a?y:0)+(j.clientHeight-p.offsetTop-p.offsetHeight)+t);h.style.height=B+b+"px"}else{let a=g.length>0&&q===g[0].ref.current;h.style.top="0px";let b=Math.max(z,o+p.offsetTop+(a?x:0)+A);h.style.height=b+(u-B)+"px",p.scrollTop=B-z+p.offsetTop}h.style.margin="10px 0",h.style.minHeight=v+"px",h.style.maxHeight=i+"px",d?.(),requestAnimationFrame(()=>n.current=!0)}},[m,f.trigger,f.valueNode,h,j,p,q,r,f.dir,d]);a1(()=>v(),[v]);let[w,x]=u.useState();a1(()=>{j&&x(window.getComputedStyle(j).zIndex)},[j]);let y=u.useCallback(a=>{a&&!0===o.current&&(v(),s?.(),o.current=!1)},[v,s]);return(0,t.jsx)(gS,{scope:c,contentWrapper:h,shouldExpandOnScrollRef:n,onScrollButtonChange:y,children:(0,t.jsx)("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,t.jsx)(ba.div,{...e,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...e.style}})})})});gQ.displayName="SelectItemAlignedPosition";var gR=u.forwardRef((a,b)=>{let{__scopeSelect:c,align:d="start",collisionPadding:e=10,...f}=a,g=gy(c);return(0,t.jsx)(eG,{...g,...f,ref:b,align:d,collisionPadding:e,style:{boxSizing:"border-box",...f.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)"}})});gR.displayName="SelectPopperPosition";var[gS,gT]=gw(gK,{}),gU="SelectViewport",gV=u.forwardRef((a,b)=>{let{__scopeSelect:c,nonce:d,...e}=a,f=gN(gU,c),g=gT(gU,c),h=B(b,f.onViewportChange),i=u.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.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:d}),(0,t.jsx)(gt.Slot,{scope:c,children:(0,t.jsx)(ba.div,{"data-radix-select-viewport":"",role:"presentation",...e,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...e.style},onScroll:a$(e.onScroll,a=>{let b=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=g;if(d?.current&&c){let a=Math.abs(i.current-b.scrollTop);if(a>0){let d=window.innerHeight-20,e=Math.max(parseFloat(c.style.minHeight),parseFloat(c.style.height));if(e<d){let f=e+a,g=Math.min(d,f),h=f-g;c.style.height=g+"px","0px"===c.style.bottom&&(b.scrollTop=h>0?h:0,c.style.justifyContent="flex-end")}}}i.current=b.scrollTop})})})]})});gV.displayName=gU;var gW="SelectGroup",[gX,gY]=gw(gW);u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=a4();return(0,t.jsx)(gX,{scope:c,id:e,children:(0,t.jsx)(ba.div,{role:"group","aria-labelledby":e,...d,ref:b})})}).displayName=gW;var gZ="SelectLabel",g$=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=gY(gZ,c);return(0,t.jsx)(ba.div,{id:e.id,...d,ref:b})});g$.displayName=gZ;var g_="SelectItem",[g0,g1]=gw(g_),g2=u.forwardRef((a,b)=>{let{__scopeSelect:c,value:d,disabled:e=!1,textValue:f,...g}=a,h=gA(g_,c),i=gN(g_,c),j=h.value===d,[k,l]=u.useState(f??""),[m,n]=u.useState(!1),o=B(b,a=>i.itemRefCallback?.(a,d,e)),p=a4(),q=u.useRef("touch"),r=()=>{e||(h.onValueChange(d),h.onOpenChange(!1))};if(""===d)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,t.jsx)(g0,{scope:c,value:d,disabled:e,textId:p,isSelected:j,onItemTextChange:u.useCallback(a=>{l(b=>b||(a?.textContent??"").trim())},[]),children:(0,t.jsx)(gt.ItemSlot,{scope:c,value:d,disabled:e,textValue:k,children:(0,t.jsx)(ba.div,{role:"option","aria-labelledby":p,"data-highlighted":m?"":void 0,"aria-selected":j&&m,"data-state":j?"checked":"unchecked","aria-disabled":e||void 0,"data-disabled":e?"":void 0,tabIndex:e?void 0:-1,...g,ref:o,onFocus:a$(g.onFocus,()=>n(!0)),onBlur:a$(g.onBlur,()=>n(!1)),onClick:a$(g.onClick,()=>{"mouse"!==q.current&&r()}),onPointerUp:a$(g.onPointerUp,()=>{"mouse"===q.current&&r()}),onPointerDown:a$(g.onPointerDown,a=>{q.current=a.pointerType}),onPointerMove:a$(g.onPointerMove,a=>{q.current=a.pointerType,e?i.onItemLeave?.():"mouse"===q.current&&a.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a$(g.onPointerLeave,a=>{a.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:a$(g.onKeyDown,a=>{(i.searchRef?.current===""||" "!==a.key)&&(gr.includes(a.key)&&r()," "===a.key&&a.preventDefault())})})})})});g2.displayName=g_;var g3="SelectItemText",g4=u.forwardRef((a,b)=>{let{__scopeSelect:c,className:d,style:e,...f}=a,g=gA(g3,c),h=gN(g3,c),i=g1(g3,c),j=gC(g3,c),[k,l]=u.useState(null),m=B(b,a=>l(a),i.onItemTextChange,a=>h.itemTextRefCallback?.(a,i.value,i.disabled)),n=k?.textContent,o=u.useMemo(()=>(0,t.jsx)("option",{value:i.value,disabled:i.disabled,children:n},i.value),[i.disabled,i.value,n]),{onNativeOptionAdd:p,onNativeOptionRemove:q}=j;return a1(()=>(p(o),()=>q(o)),[p,q,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ba.span,{id:i.textId,...f,ref:m}),i.isSelected&&g.valueNode&&!g.valueNodeHasChildren?a7.createPortal(f.children,g.valueNode):null]})});g4.displayName=g3;var g5="SelectItemIndicator",g6=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a;return g1(g5,c).isSelected?(0,t.jsx)(ba.span,{"aria-hidden":!0,...d,ref:b}):null});g6.displayName=g5;var g7="SelectScrollUpButton",g8=u.forwardRef((a,b)=>{let c=gN(g7,a.__scopeSelect),d=gT(g7,a.__scopeSelect),[e,f]=u.useState(!1),g=B(b,d.onScrollButtonChange);return a1(()=>{if(c.viewport&&c.isPositioned){let a=function(){f(b.scrollTop>0)},b=c.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[c.viewport,c.isPositioned]),e?(0,t.jsx)(hb,{...a,ref:g,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=c;a&&b&&(a.scrollTop=a.scrollTop-b.offsetHeight)}}):null});g8.displayName=g7;var g9="SelectScrollDownButton",ha=u.forwardRef((a,b)=>{let c=gN(g9,a.__scopeSelect),d=gT(g9,a.__scopeSelect),[e,f]=u.useState(!1),g=B(b,d.onScrollButtonChange);return a1(()=>{if(c.viewport&&c.isPositioned){let a=function(){let a=b.scrollHeight-b.clientHeight;f(Math.ceil(b.scrollTop)<a)},b=c.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[c.viewport,c.isPositioned]),e?(0,t.jsx)(hb,{...a,ref:g,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=c;a&&b&&(a.scrollTop=a.scrollTop+b.offsetHeight)}}):null});ha.displayName=g9;var hb=u.forwardRef((a,b)=>{let{__scopeSelect:c,onAutoScroll:d,...e}=a,f=gN("SelectScrollButton",c),g=u.useRef(null),h=gu(c),i=u.useCallback(()=>{null!==g.current&&(window.clearInterval(g.current),g.current=null)},[]);return u.useEffect(()=>()=>i(),[i]),a1(()=>{let a=h().find(a=>a.ref.current===document.activeElement);a?.ref.current?.scrollIntoView({block:"nearest"})},[h]),(0,t.jsx)(ba.div,{"aria-hidden":!0,...e,ref:b,style:{flexShrink:0,...e.style},onPointerDown:a$(e.onPointerDown,()=>{null===g.current&&(g.current=window.setInterval(d,50))}),onPointerMove:a$(e.onPointerMove,()=>{f.onItemLeave?.(),null===g.current&&(g.current=window.setInterval(d,50))}),onPointerLeave:a$(e.onPointerLeave,()=>{i()})})}),hc=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a;return(0,t.jsx)(ba.div,{"aria-hidden":!0,...d,ref:b})});hc.displayName="SelectSeparator";var hd="SelectArrow";u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=gy(c),f=gA(hd,c),g=gN(hd,c);return f.open&&"popper"===g.position?(0,t.jsx)(eJ,{...e,...d,ref:b}):null}).displayName=hd;var he=u.forwardRef(({__scopeSelect:a,value:b,...c},d)=>{let e=u.useRef(null),f=B(d,e),g=fp(b);return u.useEffect(()=>{let a=e.current;if(!a)return;let c=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(g!==b&&c){let d=new Event("change",{bubbles:!0});c.call(a,b),a.dispatchEvent(d)}},[g,b]),(0,t.jsx)(ba.select,{...c,style:{...go,...c.style},ref:f,defaultValue:b})});function hf(a){return""===a||void 0===a}function hg(a){let b=bc(a),c=u.useRef(""),d=u.useRef(0),e=u.useCallback(a=>{let e=c.current+a;b(e),function a(b){c.current=b,window.clearTimeout(d.current),""!==b&&(d.current=window.setTimeout(()=>a(""),1e3))}(e)},[b]),f=u.useCallback(()=>{c.current="",window.clearTimeout(d.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(d.current),[]),[c,e,f]}function hh(a,b,c){var d,e;let f=b.length>1&&Array.from(b).every(a=>a===b[0])?b[0]:b,g=c?a.indexOf(c):-1,h=(d=a,e=Math.max(g,0),d.map((a,b)=>d[(e+b)%d.length]));1===f.length&&(h=h.filter(a=>a!==c));let i=h.find(a=>a.textValue.toLowerCase().startsWith(f.toLowerCase()));return i!==c?i:void 0}he.displayName="SelectBubbleInput";let hi=(0,c6.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),hj=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(gF,{ref:d,className:aS("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[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",a),...c,children:[b,(0,t.jsx)(gI,{asChild:!0,children:(0,t.jsx)(fk,{className:"h-4 w-4 opacity-50"})})]}));hj.displayName=gF.displayName;let hk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(g8,{ref:c,className:aS("flex cursor-default items-center justify-center py-1",a),...b,children:(0,t.jsx)(hi,{className:"h-4 w-4"})}));hk.displayName=g8.displayName;let hl=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(ha,{ref:c,className:aS("flex cursor-default items-center justify-center py-1",a),...b,children:(0,t.jsx)(fk,{className:"h-4 w-4"})}));hl.displayName=ha.displayName;let hm=u.forwardRef(({className:a,children:b,position:c="popper",...d},e)=>(0,t.jsx)(gJ,{children:(0,t.jsxs)(gL,{ref:e,className:aS("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]","popper"===c&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:c,...d,children:[(0,t.jsx)(hk,{}),(0,t.jsx)(gV,{className:aS("p-1","popper"===c&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:b}),(0,t.jsx)(hl,{})]})}));hm.displayName=gL.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(g$,{ref:c,className:aS("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...b})).displayName=g$.displayName;let hn=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(g2,{ref:d,className:aS("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",a),...c,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(g6,{children:(0,t.jsx)(fb,{className:"h-4 w-4"})})}),(0,t.jsx)(g4,{children:b})]}));hn.displayName=g2.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(hc,{ref:c,className:aS("-mx-1 my-1 h-px bg-muted",a),...b})).displayName=hc.displayName,a.s(["Select",0,gD,"SelectContent",0,hm,"SelectItem",0,hn,"SelectTrigger",0,hj,"SelectValue",0,gH],99295);var ho="Switch",[hp,hq]=a0(ho),[hr,hs]=hp(ho),ht=u.forwardRef((a,b)=>{let{__scopeSwitch:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i="on",onCheckedChange:j,form:k,...l}=a,[m,n]=u.useState(null),o=B(b,a=>n(a)),p=u.useRef(!1),q=!m||k||!!m.closest("form"),[r,s]=a6({prop:e,defaultProp:f??!1,onChange:j,caller:ho});return(0,t.jsxs)(hr,{scope:c,checked:r,disabled:h,children:[(0,t.jsx)(ba.button,{type:"button",role:"switch","aria-checked":r,"aria-required":g,"data-state":hx(r),"data-disabled":h?"":void 0,disabled:h,value:i,...l,ref:o,onClick:a$(a.onClick,a=>{s(a=>!a),q&&(p.current=a.isPropagationStopped(),p.current||a.stopPropagation())})}),q&&(0,t.jsx)(hw,{control:m,bubbles:!p.current,name:d,value:i,checked:r,required:g,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});ht.displayName=ho;var hu="SwitchThumb",hv=u.forwardRef((a,b)=>{let{__scopeSwitch:c,...d}=a,e=hs(hu,c);return(0,t.jsx)(ba.span,{"data-state":hx(e.checked),"data-disabled":e.disabled?"":void 0,...d,ref:b})});hv.displayName=hu;var hw=u.forwardRef(({__scopeSwitch:a,control:b,checked:c,bubbles:d=!0,...e},f)=>{let g=u.useRef(null),h=B(g,f),i=fp(c),j=eu(b);return u.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(i!==c&&b){let e=new Event("click",{bubbles:d});b.call(a,c),a.dispatchEvent(e)}},[i,c,d]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...e,tabIndex:-1,ref:h,style:{...e.style,...j,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function hx(a){return a?"checked":"unchecked"}hw.displayName="SwitchBubbleInput";let hy=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(ht,{className:aS("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...b,ref:c,children:(0,t.jsx)(hv,{className:aS("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));function hz(){let a,b,c=(0,v.useRouter)(),d=(0,v.useSearchParams)(),{currentBank:e,setCurrentBank:f,banks:g,loadBanks:h}=(0,w.useBank)(),{theme:i,toggleTheme:j}=(0,fm.useTheme)(),[k,l]=u.useState(!1),[m,n]=u.useState(!1),[o,p]=u.useState(""),[q,r]=u.useState(!1),[s,z]=u.useState(null),[A,B]=u.useState(!1),[C,D]=u.useState(""),[E,F]=u.useState(null),[G,H]=u.useState(!1),[I,J]=u.useState("text"),[K,L]=u.useState(""),[M,N]=u.useState(""),[O,P]=u.useState(""),[Q,R]=u.useState(""),[S,T]=u.useState(""),[U,V]=u.useState("combined"),[W,X]=u.useState(""),[Y,Z]=u.useState(""),[$,_]=u.useState(""),[aa,ab]=u.useState("document"),[ac,ad]=u.useState(!1),[ae,af]=u.useState(""),[ag,ah]=u.useState(!1),[ai,aj]=u.useState([]);u.useEffect(()=>{G&&e&&y.client.getBankConfig(e).then(a=>{let b=a.config?.retain_strategies;aj(b?Object.keys(b):[])}).catch(()=>aj([]))},[G,e]);let[ak,al]=u.useState([]),[am,an]=u.useState([]),[ao,ap]=u.useState(""),aq=u.useRef(null),[ar,as]=u.useState(null);u.useEffect(()=>{y.client.getVersion().then(a=>{as(a.features.file_upload_api)}).catch(()=>{as(!1)})},[]);let at=u.useMemo(()=>[...g].sort((a,b)=>a.localeCompare(b)),[g]),au=async()=>{if(o.trim()){r(!0),z(null),F(null);try{if(await y.client.createBank(o.trim()),C.trim()){let a;try{a=JSON.parse(C.trim())}catch{F("Invalid JSON. Please check the template syntax."),r(!1);return}try{await y.client.importBankTemplate(o.trim(),a)}catch(a){F(a instanceof Error?a.message:"Failed to import template"),r(!1);return}}await h(),n(!1),p(""),D(""),F(null),f(o.trim()),c.push((0,x.bankRoute)(o.trim(),"?view=data"))}catch(a){z(a instanceof Error?a.message:"Failed to create bank")}finally{r(!1)}}},av=a=>{let b={};for(let c of a.split("\n")){let a=c.indexOf(":");if(a>0){let d=c.slice(0,a).trim(),e=c.slice(a+1).trim();d&&(b[d]=e)}}return Object.keys(b).length>0?b:void 0},aw=()=>({context:"",timestamp:"",document_id:"",tags:"",metadata:"",strategy:"",advancedTab:"document",expanded:!1}),ax=(a,b,c)=>{an(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},ay=async()=>{if(e&&0!==ak.length){ah(!0),ap("");try{ap(`Uploading ${ak.length} file(s)...`);let a=am.map(a=>({...a.context&&{context:a.context},...a.timestamp&&{timestamp:a.timestamp+":00"},...a.document_id&&{document_id:a.document_id},...a.tags&&{tags:a.tags.split(",").map(a=>a.trim()).filter(Boolean)},...a.metadata&&{metadata:av(a.metadata)},...a.strategy&&{strategy:a.strategy}}));await y.client.uploadFiles({bank_id:e,files:ak,async:!0,files_metadata:a}),H(!1),al([]),an([]),T(""),ad(!1),ap(""),c.push((0,x.bankRoute)(e,"?view=documents"))}catch{}finally{ah(!1),ap("")}}},az=async()=>{if(e&&K.trim()){ah(!0);try{let a=S.split(",").map(a=>a.trim()).filter(Boolean),b={content:K};if(M&&(b.context=M),O&&(b.timestamp=O+":00"),Q&&(b.document_id=Q),a.length>0&&(b.tags=a),"per_tag"===U)b.observation_scopes="per_tag";else if("combined"===U)b.observation_scopes="combined";else if("all_combinations"===U)b.observation_scopes="all_combinations";else if("custom"===U){let a=W.split("\n").map(a=>a.split(",").map(a=>a.trim()).filter(Boolean)).filter(a=>a.length>0);a.length>0&&(b.observation_scopes=a)}let d=av(Y);d&&(b.metadata=d);let f=(a=>{let b=a.split(",").map(a=>a.trim()).filter(Boolean);if(0!==b.length)return b.map(a=>({text:a}))})($);f&&(b.entities=f),ae&&(b.strategy=ae),await y.client.retain({bank_id:e,items:[b],async:ac}),H(!1),L(""),N(""),P(""),R(""),T(""),V("combined"),X(""),Z(""),_(""),ab("document"),ad(!1),af(""),c.push((0,x.bankRoute)(e,"?view=documents"))}catch{}finally{ah(!1)}}};return(0,t.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,t.jsx)(fn.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsxs)(eV,{open:k,onOpenChange:a=>{l(a),a&&h()},children:[(0,t.jsx)(eY,{asChild:!0,children:(0,t.jsxs)(aU,{variant:"outline",role:"combobox","aria-expanded":k,className:"w-[250px] justify-between font-bold border-2 border-primary hover:bg-accent",children:[(0,t.jsx)("span",{className:"truncate",children:e||"Select a memory bank..."}),(0,t.jsx)(fc,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(e9,{className:"w-[250px] p-0",children:(0,t.jsxs)(df,{children:[at.length>0&&(0,t.jsx)(dg,{placeholder:"Search memory banks..."}),(0,t.jsxs)(dh,{children:[(0,t.jsx)(di,{children:"No memory banks yet."}),(0,t.jsx)(dj,{children:at.map(a=>(0,t.jsxs)(dk,{value:a,onSelect:a=>{f(a),l(!1);let b=d.get("view")||"data",e=d.get("subTab"),g=e?`?view=${b}&subTab=${e}`:`?view=${b}`;c.push((0,x.bankRoute)(a,g))},children:[(0,t.jsx)(fb,{className:aS("mr-2 h-4 w-4",e===a?"opacity-100":"opacity-0")}),a]},a))})]}),(0,t.jsx)("div",{className:"border-t border-border p-1",children:(0,t.jsxs)("button",{className:"w-full flex items-center gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",onClick:()=>{l(!1),n(!0)},children:[(0,t.jsx)(fd,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Create new bank"})]})})]})})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),e&&(0,t.jsxs)(aU,{variant:"outline",size:"sm",className:"h-9 gap-1.5",onClick:()=>H(!0),title:"Add document to current bank","data-add-document":!0,children:[(0,t.jsx)(fd,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Add Document"})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:"View on GitHub",children:[(0,t.jsx)(fh,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsx)(aU,{variant:"ghost",size:"icon",onClick:j,className:"h-9 w-9",title:"light"===i?"Switch to dark mode":"Switch to light mode",children:"light"===i?(0,t.jsx)(ff,{className:"h-5 w-5"}):(0,t.jsx)(fg,{className:"h-5 w-5"})}),(0,t.jsx)(cg,{open:m,onOpenChange:n,children:(0,t.jsxs)(da,{className:"sm:max-w-[550px]",children:[(0,t.jsx)(db,{children:(0,t.jsx)(dd,{children:"Create New Memory Bank"})}),(0,t.jsxs)("div",{className:"py-4 space-y-4",children:[(0,t.jsx)(fa,{placeholder:"Enter bank ID...",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>{"Enter"!==a.key||q||A||au()},autoFocus:!0}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(hy,{checked:A,onCheckedChange:a=>{B(a),a||(D(""),F(null))}}),(0,t.jsx)("label",{className:"text-sm font-medium",children:"Import from template"})]}),A&&(0,t.jsx)("a",{href:"https://hindsight.vectorize.io/templates",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Browse templates →"})]}),A&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:"Paste a template manifest JSON to pre-configure the bank with settings, mental models, and directives."}),(0,t.jsx)(fo,{placeholder:'{"version": "1", "bank": {...}, "mental_models": [...]}',value:C,onChange:a=>{D(a.target.value),F(null)},className:"font-mono text-xs min-h-[120px]"})]}),E&&(0,t.jsx)("p",{className:"text-sm text-destructive whitespace-pre-wrap",children:E}),s&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:s})]}),(0,t.jsxs)(dc,{children:[(0,t.jsx)(aU,{variant:"secondary",onClick:()=>{n(!1),p(""),B(!1),D(""),z(null),F(null)},children:"Cancel"}),(0,t.jsx)(aU,{onClick:au,disabled:q||!o.trim(),children:q?"Creating...":"Create"})]})]})}),(0,t.jsx)(cg,{open:G,onOpenChange:H,children:(0,t.jsxs)(da,{className:"sm:max-w-[750px] max-h-[90vh] flex flex-col",children:[(0,t.jsxs)(db,{children:[(0,t.jsx)(dd,{children:"Add New Document"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Add a new document to memory bank:"," ",(0,t.jsx)("span",{className:"font-semibold",children:e})]})]}),(0,t.jsxs)("div",{className:"space-y-4 overflow-y-auto flex-1 px-1 -mx-1",children:[(0,t.jsxs)(f9,{value:I,onValueChange:a=>J(a),children:[(0,t.jsxs)(gi,{className:"grid w-full grid-cols-2",children:[(0,t.jsxs)(gj,{value:"text",className:"flex items-center gap-2",children:[(0,t.jsx)(fe,{className:"h-4 w-4"}),"Text"]}),(0,t.jsxs)(gj,{value:"upload",className:"flex items-center gap-2",disabled:!1===ar,children:[!1===ar?(0,t.jsx)(fj,{className:"h-4 w-4"}):(0,t.jsx)(fi,{className:"h-4 w-4"}),"Upload Files"]})]}),(0,t.jsxs)(gk,{value:"text",className:"mt-3",children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Content *"}),(0,t.jsx)(fo,{value:K,onChange:a=>L(a.target.value),placeholder:"Enter the document content...",className:"min-h-[150px] resize-y",autoFocus:!0})]}),(0,t.jsx)(gk,{value:"upload",className:"mt-3",children:!1===ar?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center space-y-3",children:[(0,t.jsx)(fj,{className:"h-12 w-12 text-muted-foreground/50"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-foreground",children:"File Upload API Disabled"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"File upload is not enabled on this server."}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["To enable, set"," ",(0,t.jsx)("code",{className:"bg-muted px-1 py-0.5 rounded",children:"HINDSIGHT_API_ENABLE_FILE_UPLOAD_API=true"})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:aq,type:"file",multiple:!0,onChange:a=>{let b=Array.from(a.target.files||[]);al(a=>[...a,...b]),an(a=>[...a,...b.map(aw)]),aq.current&&(aq.current.value="")},className:"hidden",id:"file-upload"}),(0,t.jsxs)("label",{htmlFor:"file-upload",className:"flex flex-col items-center justify-center w-full h-32 border-2 border-dashed border-muted-foreground/25 rounded-lg cursor-pointer hover:border-primary/50 hover:bg-accent/50 transition-colors",children:[(0,t.jsx)(fi,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Click to select files or drag and drop"})]}),ak.length>0&&(0,t.jsx)("div",{className:"mt-3 space-y-1",children:ak.map((a,b)=>{let c=am[b],d=c&&(c.context||c.timestamp||c.document_id||c.tags||c.metadata);return(0,t.jsxs)("div",{className:"bg-muted rounded-md overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 px-2 py-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1.5 min-w-0 flex-1 text-left hover:opacity-75 transition-opacity",onClick:()=>{an(a=>a.map((a,c)=>c===b?{...a,expanded:!a.expanded}:a))},title:"Edit metadata for this file",children:[c?.expanded?(0,t.jsx)(fk,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):(0,t.jsx)(fl,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsx)(fe,{className:`h-4 w-4 shrink-0 ${d?"text-primary":"text-muted-foreground"}`}),(0,t.jsx)("span",{className:"text-sm truncate",children:a.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground shrink-0",children:["(",(a.size/1024).toFixed(1)," KB)"]})]}),(0,t.jsx)(aU,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 shrink-0",onClick:()=>{al(a=>a.filter((a,c)=>c!==b)),an(a=>a.filter((a,c)=>c!==b))},children:(0,t.jsx)(c8,{className:"h-4 w-4"})})]}),c?.expanded&&(0,t.jsx)("div",{className:"border-t border-border/50",children:(0,t.jsxs)(f9,{value:c.advancedTab,onValueChange:a=>ax(b,"advancedTab",a),children:[(0,t.jsx)(gi,{className:"w-full border-b border-border bg-transparent h-8 p-0 gap-0 justify-start rounded-none",children:["document","tags","source"].map(a=>(0,t.jsx)(gj,{value:a,className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px capitalize",children:a},a))}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-2",children:[(0,t.jsxs)(gk,{value:"document",className:"mt-0 space-y-2",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,t.jsx)(fa,{type:"datetime-local",value:c.timestamp,onChange:a=>ax(b,"timestamp",a.target.value),className:"h-8 text-sm text-foreground"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,t.jsx)(fa,{value:c.document_id,onChange:a=>ax(b,"document_id",a.target.value),placeholder:"Optional ID...",className:"h-8 text-sm"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Strategy"}),ai.length>0?(0,t.jsxs)(gD,{value:c.strategy||"__none__",onValueChange:a=>ax(b,"strategy","__none__"===a?"":a),children:[(0,t.jsx)(hj,{className:"w-full h-8 text-sm",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"__none__",children:(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"Default"})}),ai.map(a=>(0,t.jsx)(hn,{value:a,children:a},a))]})]}):(0,t.jsx)(fa,{value:c.strategy,onChange:a=>ax(b,"strategy",a.target.value),placeholder:"Strategy name (optional)...",className:"h-8 text-sm"})]})]}),(0,t.jsx)(gk,{value:"tags",className:"mt-0 space-y-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Tags"}),(0,t.jsx)(fa,{value:c.tags,onChange:a=>ax(b,"tags",a.target.value),placeholder:"tag1, tag2...",className:"h-8 text-sm"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated — used to filter memories during recall/reflect"})]})}),(0,t.jsxs)(gk,{value:"source",className:"mt-0 space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,t.jsx)(fa,{value:c.context,onChange:a=>ax(b,"context",a.target.value),placeholder:"Optional context...",className:"h-8 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Metadata"}),(0,t.jsx)(fo,{value:c.metadata,onChange:a=>ax(b,"metadata",a.target.value),placeholder:"source: slack\nchannel: engineering",className:"min-h-[52px] resize-y font-mono text-sm"})]})]})]})]})})]},`${a.name}-${b}`)})}),ao&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:ao})]})})]}),"text"===I&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,t.jsx)(fa,{type:"text",value:M,onChange:a=>N(a.target.value),placeholder:"Optional context about this document..."})]}),"text"===I&&(0,t.jsx)("div",{children:(0,t.jsxs)(f9,{value:aa,onValueChange:a=>ab(a),children:[(0,t.jsxs)(gi,{className:"w-full border-b border-border bg-transparent h-8 p-0 gap-0 justify-start rounded-none",children:[(0,t.jsx)(gj,{value:"document",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Document"}),(0,t.jsx)(gj,{value:"tags",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Tags"}),(0,t.jsx)(gj,{value:"source",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Source"})]}),(0,t.jsxs)("div",{className:"pt-3 space-y-3",children:[(0,t.jsxs)(gk,{value:"document",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,t.jsx)(fa,{type:"datetime-local",value:O,onChange:a=>P(a.target.value),className:"text-foreground"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,t.jsx)(fa,{type:"text",value:Q,onChange:a=>R(a.target.value),placeholder:"Optional document identifier..."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Strategy"}),ai.length>0?(0,t.jsxs)(gD,{value:ae||"__none__",onValueChange:a=>af("__none__"===a?"":a),children:[(0,t.jsx)(hj,{className:"w-full",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"__none__",children:(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"Default"})}),ai.map(a=>(0,t.jsx)(hn,{value:a,children:a},a))]})]}):(0,t.jsx)(fa,{type:"text",value:ae,onChange:a=>af(a.target.value),placeholder:"Strategy name (optional)..."}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Override the bank's default extraction strategy for this document."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(fF,{id:"async-doc",checked:ac,onCheckedChange:a=>ad(a)}),(0,t.jsx)("label",{htmlFor:"async-doc",className:"text-sm cursor-pointer text-foreground",children:"Process in background (async)"})]})]}),(0,t.jsxs)(gk,{value:"tags",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Tags"}),(0,t.jsx)(fa,{type:"text",value:S,onChange:a=>T(a.target.value),placeholder:"user_alice, session_123, project_x"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated — used to filter memories during recall/reflect"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Observation Scopes"}),(0,t.jsxs)(gD,{value:U,onValueChange:a=>V(a),children:[(0,t.jsx)(hj,{className:"w-full",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"per_tag",children:"Per tag"}),(0,t.jsx)(hn,{value:"combined",children:"Combined"}),(0,t.jsx)(hn,{value:"all_combinations",children:"All combinations"}),(0,t.jsx)(hn,{value:"custom",children:"Custom"})]})]}),"custom"!==U&&(b=((a,b)=>{if(0===a.length)return[];if("per_tag"===b)return a.map(a=>[a]);if("combined"===b)return[a];let c=[];for(let b=1;b<=a.length;b++){let d=(e,f)=>{if(f.length===b)return void c.push([...f]);for(let b=e;b<a.length;b++)d(b+1,[...f,a[b]])};d(0,[])}return c})(a=S.split(",").map(a=>a.trim()).filter(Boolean),U),0===a.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60 mt-1.5 italic",children:"Add tags above to preview observation scopes"}):(0,t.jsxs)("ul",{className:"mt-2 space-y-1.5",children:[b.slice(0,6).map((a,b)=>(0,t.jsxs)("li",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-mono text-foreground",children:a.join(", ")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:(a=>{if(1===a.length)return`What happened with ${a[0]}?`;let b=a.slice(0,-1).join(", ");return`What happened with ${b} and ${a[a.length-1]}?`})(a)})]},b)),b.length>6&&(0,t.jsxs)("li",{className:"text-xs text-muted-foreground",children:["+",b.length-6," more scopes"]})]})),"custom"===U&&(0,t.jsx)(fo,{value:W,onChange:a=>X(a.target.value),placeholder:"user:alice\nuser:alice, place:online",className:"min-h-[72px] resize-y font-mono text-sm mt-2"})]})]}),(0,t.jsxs)(gk,{value:"source",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Metadata"}),(0,t.jsx)(fo,{value:Y,onChange:a=>Z(a.target.value),placeholder:"source: slack\nchannel: engineering",className:"min-h-[72px] resize-y font-mono text-sm"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["One ",(0,t.jsx)("code",{className:"bg-muted px-0.5 rounded",children:"key: value"})," per line"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Entities"}),(0,t.jsx)(fa,{type:"text",value:$,onChange:a=>_(a.target.value),placeholder:"Alice, Google, ML model"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated hints merged with auto-extracted entities"})]})]})]})]})})]}),(0,t.jsxs)(dc,{children:[(0,t.jsx)(aU,{variant:"secondary",onClick:()=>{H(!1),L(""),N(""),P(""),R(""),T(""),V("combined"),X(""),Z(""),_(""),ab("document"),ad(!1),al([]),an([]),ap("")},children:"Cancel"}),"text"===I?(0,t.jsx)(aU,{onClick:az,disabled:ag||!K.trim(),children:ag?"Adding...":"Add Document"}):(0,t.jsx)(aU,{onClick:ay,disabled:ag||0===ak.length,children:ag?ao||"Uploading...":`Upload ${ak.length} File${1!==ak.length?"s":""}`})]})]})})]})})}hy.displayName=ht.displayName,a.s(["Switch",0,hy],56350),a.s(["BankSelector",0,function(){return(0,t.jsx)(u.Suspense,{fallback:(0,t.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,t.jsx)(fn.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsxs)(aU,{variant:"outline",className:"w-[250px] justify-between font-bold border-2 border-primary",disabled:!0,children:["Loading...",(0,t.jsx)(fc,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground",children:[(0,t.jsx)(fh,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsx)(aU,{variant:"ghost",size:"icon",className:"h-9 w-9",disabled:!0,children:(0,t.jsx)(ff,{className:"h-5 w-5"})})]})}),children:(0,t.jsx)(hz,{})})}],49839)}];
7
+ For more information, see https://radix-ui.com/primitives/docs/components/${b.docsSlug}`;return u.useEffect(()=>{a&&(document.getElementById(a)||console.error(c))},[c,a]),null},cH=({contentRef:a,descriptionId:b})=>{let c=cF("DialogDescriptionWarning"),d=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${c.contentName}}.`;return u.useEffect(()=>{let c=a.current?.getAttribute("aria-describedby");b&&c&&(document.getElementById(b)||console.warn(d))},[d,a,b]),null};a.s(["Close",0,cB,"Content",0,cs,"Description",0,cz,"Overlay",0,co,"Portal",0,cm,"Root",0,cg,"Title",0,cx,"Trigger",0,ci,"WarningProvider",0,cE,"createDialogScope",0,cd],97942);var cI='[cmdk-group=""]',cJ='[cmdk-group-items=""]',cK='[cmdk-item=""]',cL=`${cK}:not([aria-disabled="true"])`,cM="cmdk-item-select",cN="data-value",cO=(a,b,c)=>{var d;return d=a,function a(b,c,d,e,f,g,h){if(g===c.length)return f===b.length?1:.99;var i=`${f},${g}`;if(void 0!==h[i])return h[i];for(var j,k,l,m,n=e.charAt(g),o=d.indexOf(n,f),p=0;o>=0;)(j=a(b,c,d,e,o+1,g+1,h))>p&&(o===f?j*=1:aV.test(b.charAt(o-1))?(j*=.8,(l=b.slice(f,o-1).match(aW))&&f>0&&(j*=Math.pow(.999,l.length))):aX.test(b.charAt(o-1))?(j*=.9,(m=b.slice(f,o-1).match(aY))&&f>0&&(j*=Math.pow(.999,m.length))):(j*=.17,f>0&&(j*=Math.pow(.999,o-f))),b.charAt(o)!==c.charAt(g)&&(j*=.9999)),(j<.1&&d.charAt(o-1)===e.charAt(g+1)||e.charAt(g+1)===e.charAt(g)&&d.charAt(o-1)!==e.charAt(g))&&.1*(k=a(b,c,d,e,o+1,g+2,h))>j&&(j=.1*k),j>p&&(p=j),o=d.indexOf(n,o+1);return h[i]=p,p}(d=c&&c.length>0?`${d+" "+c.join(" ")}`:d,b,aZ(d),aZ(b),0,0,{})},cP=u.createContext(void 0),cQ=u.createContext(void 0),cR=u.createContext(void 0),cS=u.forwardRef((a,b)=>{let c=c0(()=>{var b,c;return{search:"",value:null!=(c=null!=(b=a.value)?b:a.defaultValue)?c:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=c0(()=>new Set),e=c0(()=>new Map),f=c0(()=>new Map),g=c0(()=>new Set),h=c$(a),{label:i,children:j,value:k,onValueChange:l,filter:m,shouldFilter:n,loop:o,disablePointerSelection:p=!1,vimBindings:q=!0,...r}=a,s=a4(),t=a4(),v=a4(),w=u.useRef(null),x=c3();c_(()=>{if(void 0!==k){let a=k.trim();c.current.value=a,y.emit()}},[k]),c_(()=>{x(6,E)},[]);let y=u.useMemo(()=>({subscribe:a=>(g.current.add(a),()=>g.current.delete(a)),snapshot:()=>c.current,setState:(a,b,d)=>{var e,f,g,i;if(!Object.is(c.current[a],b)){if(c.current[a]=b,"search"===a)D(),B(),x(1,C);else if("value"===a){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let a=document.getElementById(v);a?a.focus():null==(e=document.getElementById(s))||e.focus()}if(x(7,()=>{var a;c.current.selectedItemId=null==(a=F())?void 0:a.id,y.emit()}),d||x(5,E),(null==(f=h.current)?void 0:f.value)!==void 0){null==(i=(g=h.current).onValueChange)||i.call(g,null!=b?b:"");return}}y.emit()}},emit:()=>{g.current.forEach(a=>a())}}),[]),z=u.useMemo(()=>({value:(a,b,d)=>{var e;b!==(null==(e=f.current.get(a))?void 0:e.value)&&(f.current.set(a,{value:b,keywords:d}),c.current.filtered.items.set(a,A(b,d)),x(2,()=>{B(),y.emit()}))},item:(a,b)=>(d.current.add(a),b&&(e.current.has(b)?e.current.get(b).add(a):e.current.set(b,new Set([a]))),x(3,()=>{D(),B(),c.current.value||C(),y.emit()}),()=>{f.current.delete(a),d.current.delete(a),c.current.filtered.items.delete(a);let b=F();x(4,()=>{D(),(null==b?void 0:b.getAttribute("id"))===a&&C(),y.emit()})}),group:a=>(e.current.has(a)||e.current.set(a,new Set),()=>{f.current.delete(a),e.current.delete(a)}),filter:()=>h.current.shouldFilter,label:i||a["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:s,inputId:v,labelId:t,listInnerRef:w}),[]);function A(a,b){var d,e;let f=null!=(e=null==(d=h.current)?void 0:d.filter)?e:cO;return a?f(a,c.current.search,b):0}function B(){if(!c.current.search||!1===h.current.shouldFilter)return;let a=c.current.filtered.items,b=[];c.current.filtered.groups.forEach(c=>{let d=e.current.get(c),f=0;d.forEach(b=>{f=Math.max(a.get(b),f)}),b.push([c,f])});let d=w.current;G().sort((b,c)=>{var d,e;let f=b.getAttribute("id"),g=c.getAttribute("id");return(null!=(d=a.get(g))?d:0)-(null!=(e=a.get(f))?e:0)}).forEach(a=>{let b=a.closest(cJ);b?b.appendChild(a.parentElement===b?a:a.closest(`${cJ} > *`)):d.appendChild(a.parentElement===d?a:a.closest(`${cJ} > *`))}),b.sort((a,b)=>b[1]-a[1]).forEach(a=>{var b;let c=null==(b=w.current)?void 0:b.querySelector(`${cI}[${cN}="${encodeURIComponent(a[0])}"]`);null==c||c.parentElement.appendChild(c)})}function C(){let a=G().find(a=>"true"!==a.getAttribute("aria-disabled")),b=null==a?void 0:a.getAttribute(cN);y.setState("value",b||void 0)}function D(){var a,b,g,i;if(!c.current.search||!1===h.current.shouldFilter){c.current.filtered.count=d.current.size;return}c.current.filtered.groups=new Set;let j=0;for(let e of d.current){let d=A(null!=(b=null==(a=f.current.get(e))?void 0:a.value)?b:"",null!=(i=null==(g=f.current.get(e))?void 0:g.keywords)?i:[]);c.current.filtered.items.set(e,d),d>0&&j++}for(let[a,b]of e.current)for(let d of b)if(c.current.filtered.items.get(d)>0){c.current.filtered.groups.add(a);break}c.current.filtered.count=j}function E(){var a,b,c;let d=F();d&&((null==(a=d.parentElement)?void 0:a.firstChild)===d&&(null==(c=null==(b=d.closest(cI))?void 0:b.querySelector('[cmdk-group-heading=""]'))||c.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function F(){var a;return null==(a=w.current)?void 0:a.querySelector(`${cK}[aria-selected="true"]`)}function G(){var a;return Array.from((null==(a=w.current)?void 0:a.querySelectorAll(cL))||[])}function H(a){let b=G()[a];b&&y.setState("value",b.getAttribute(cN))}function I(a){var b;let c=F(),d=G(),e=d.findIndex(a=>a===c),f=d[e+a];null!=(b=h.current)&&b.loop&&(f=e+a<0?d[d.length-1]:e+a===d.length?d[0]:d[e+a]),f&&y.setState("value",f.getAttribute(cN))}function J(a){let b=F(),c=null==b?void 0:b.closest(cI),d;for(;c&&!d;)d=null==(c=a>0?function(a,b){let c=a.nextElementSibling;for(;c;){if(c.matches(b))return c;c=c.nextElementSibling}}(c,cI):function(a,b){let c=a.previousElementSibling;for(;c;){if(c.matches(b))return c;c=c.previousElementSibling}}(c,cI))?void 0:c.querySelector(cL);d?y.setState("value",d.getAttribute(cN)):I(a)}let K=()=>H(G().length-1),L=a=>{a.preventDefault(),a.metaKey?K():a.altKey?J(1):I(1)},M=a=>{a.preventDefault(),a.metaKey?H(0):a.altKey?J(-1):I(-1)};return u.createElement(ba.div,{ref:b,tabIndex:-1,...r,"cmdk-root":"",onKeyDown:a=>{var b;null==(b=r.onKeyDown)||b.call(r,a);let c=a.nativeEvent.isComposing||229===a.keyCode;if(!(a.defaultPrevented||c))switch(a.key){case"n":case"j":q&&a.ctrlKey&&L(a);break;case"ArrowDown":L(a);break;case"p":case"k":q&&a.ctrlKey&&M(a);break;case"ArrowUp":M(a);break;case"Home":a.preventDefault(),H(0);break;case"End":a.preventDefault(),K();break;case"Enter":{a.preventDefault();let b=F();if(b){let a=new Event(cM);b.dispatchEvent(a)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:c5},i),c4(a,a=>u.createElement(cQ.Provider,{value:y},u.createElement(cP.Provider,{value:z},a))))}),cT=u.forwardRef((a,b)=>{var c,d;let e=a4(),f=u.useRef(null),g=u.useContext(cR),h=u.useContext(cP),i=c$(a),j=null!=(d=null==(c=i.current)?void 0:c.forceMount)?d:null==g?void 0:g.forceMount;c_(()=>{if(!j)return h.item(e,null==g?void 0:g.id)},[j]);let k=c2(e,f,[a.value,a.children,f],a.keywords),l=u.useContext(cQ),m=c1(a=>a.value&&a.value===k.current),n=c1(a=>!!j||!1===h.filter()||!a.search||a.filtered.items.get(e)>0);function o(){var a,b;p(),null==(b=(a=i.current).onSelect)||b.call(a,k.current)}function p(){l.setState("value",k.current,!0)}if(u.useEffect(()=>{let b=f.current;if(!(!b||a.disabled))return b.addEventListener(cM,o),()=>b.removeEventListener(cM,o)},[n,a.onSelect,a.disabled]),!n)return null;let{disabled:q,value:r,onSelect:s,forceMount:t,keywords:v,...w}=a;return u.createElement(ba.div,{ref:A(f,b),...w,id:e,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!m,"data-disabled":!!q,"data-selected":!!m,onPointerMove:q||h.getDisablePointerSelection()?void 0:p,onClick:q?void 0:o},a.children)}),cU=u.forwardRef((a,b)=>{let{heading:c,children:d,forceMount:e,...f}=a,g=a4(),h=u.useRef(null),i=u.useRef(null),j=a4(),k=u.useContext(cP),l=c1(a=>!!e||!1===k.filter()||!a.search||a.filtered.groups.has(g));c_(()=>k.group(g),[]),c2(g,h,[a.value,a.heading,i]);let m=u.useMemo(()=>({id:g,forceMount:e}),[e]);return u.createElement(ba.div,{ref:A(h,b),...f,"cmdk-group":"",role:"presentation",hidden:!l||void 0},c&&u.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:j},c),c4(a,a=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?j:void 0},u.createElement(cR.Provider,{value:m},a))))}),cV=u.forwardRef((a,b)=>{let{alwaysRender:c,...d}=a,e=u.useRef(null),f=c1(a=>!a.search);return c||f?u.createElement(ba.div,{ref:A(e,b),...d,"cmdk-separator":"",role:"separator"}):null}),cW=u.forwardRef((a,b)=>{let{onValueChange:c,...d}=a,e=null!=a.value,f=u.useContext(cQ),g=c1(a=>a.search),h=c1(a=>a.selectedItemId),i=u.useContext(cP);return u.useEffect(()=>{null!=a.value&&f.setState("search",a.value)},[a.value]),u.createElement(ba.input,{ref:b,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":h,id:i.inputId,type:"text",value:e?a.value:g,onChange:a=>{e||f.setState("search",a.target.value),null==c||c(a.target.value)}})}),cX=u.forwardRef((a,b)=>{let{children:c,label:d="Suggestions",...e}=a,f=u.useRef(null),g=u.useRef(null),h=c1(a=>a.selectedItemId),i=u.useContext(cP);return u.useEffect(()=>{if(g.current&&f.current){let a=g.current,b=f.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let c=a.offsetHeight;b.style.setProperty("--cmdk-list-height",c.toFixed(1)+"px")})});return d.observe(a),()=>{cancelAnimationFrame(c),d.unobserve(a)}}},[]),u.createElement(ba.div,{ref:A(f,b),...e,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":d,id:i.listId},c4(a,a=>u.createElement("div",{ref:A(g,i.listInnerRef),"cmdk-list-sizer":""},a)))}),cY=u.forwardRef((a,b)=>{let{open:c,onOpenChange:d,overlayClassName:e,contentClassName:f,container:g,...h}=a;return u.createElement(cg,{open:c,onOpenChange:d},u.createElement(cm,{container:g},u.createElement(co,{"cmdk-overlay":"",className:e}),u.createElement(cs,{"aria-label":a.label,"cmdk-dialog":"",className:f},u.createElement(cS,{ref:b,...h}))))}),cZ=Object.assign(cS,{List:cX,Item:cT,Input:cW,Group:cU,Separator:cV,Dialog:cY,Empty:u.forwardRef((a,b)=>c1(a=>0===a.filtered.count)?u.createElement(ba.div,{ref:b,...a,"cmdk-empty":"",role:"presentation"}):null),Loading:u.forwardRef((a,b)=>{let{progress:c,children:d,label:e="Loading...",...f}=a;return u.createElement(ba.div,{ref:b,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e},c4(a,a=>u.createElement("div",{"aria-hidden":!0},a)))})});function c$(a){let b=u.useRef(a);return c_(()=>{b.current=a}),b}var c_=u.useEffect;function c0(a){let b=u.useRef();return void 0===b.current&&(b.current=a()),b}function c1(a){let b=u.useContext(cQ),c=()=>a(b.snapshot());return u.useSyncExternalStore(b.subscribe,c,c)}function c2(a,b,c,d=[]){let e=u.useRef(),f=u.useContext(cP);return c_(()=>{var g;let h=(()=>{var a;for(let b of c){if("string"==typeof b)return b.trim();if("object"==typeof b&&"current"in b)return b.current?null==(a=b.current.textContent)?void 0:a.trim():e.current}})(),i=d.map(a=>a.trim());f.value(a,h,i),null==(g=b.current)||g.setAttribute(cN,h),e.current=h}),e}var c3=()=>{let[a,b]=u.useState(),c=c0(()=>new Map);return c_(()=>{c.current.forEach(a=>a()),c.current=new Map},[a]),(a,d)=>{c.current.set(a,d),b({})}};function c4({asChild:a,children:b},c){let d;return a&&u.isValidElement(b)?u.cloneElement("function"==typeof(d=b.type)?d(b.props):"render"in d?d.render(b.props):b,{ref:b.ref},c(b.props.children)):c(b)}var c5={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},c6=a.i(70106);let c7=(0,c6.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",0,c7],87532);let c8=(0,c6.default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",0,c8],33508);let c9=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(co,{ref:c,className:aS("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...b}));c9.displayName=co.displayName;let da=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(cm,{children:[(0,t.jsx)(c9,{}),(0,t.jsxs)(cs,{ref:d,className:aS("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...c,children:[b,(0,t.jsxs)(cB,{className:"absolute right-4 top-4 rounded-sm ring-offset-background transition-opacity hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-foreground",children:[(0,t.jsx)(c8,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));da.displayName=cs.displayName;let db=({className:a,...b})=>(0,t.jsx)("div",{className:aS("flex flex-col space-y-1.5 text-center sm:text-left",a),...b});db.displayName="DialogHeader";let dc=({className:a,...b})=>(0,t.jsx)("div",{className:aS("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...b});dc.displayName="DialogFooter";let dd=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cx,{ref:c,className:aS("text-lg font-semibold leading-none tracking-tight text-foreground",a),...b}));dd.displayName=cx.displayName;let de=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cz,{ref:c,className:aS("text-sm text-muted-foreground",a),...b}));de.displayName=cz.displayName,a.s(["Dialog",0,cg,"DialogContent",0,da,"DialogDescription",0,de,"DialogFooter",0,dc,"DialogHeader",0,db,"DialogTitle",0,dd],85442);let df=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ,{ref:c,className:aS("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...b}));df.displayName=cZ.displayName;let dg=u.forwardRef(({className:a,...b},c)=>(0,t.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,t.jsx)(c7,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,t.jsx)(cZ.Input,{ref:c,className:aS("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...b})]}));dg.displayName=cZ.Input.displayName;let dh=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.List,{ref:c,className:aS("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...b}));dh.displayName=cZ.List.displayName;let di=u.forwardRef((a,b)=>(0,t.jsx)(cZ.Empty,{ref:b,className:"py-6 text-center text-sm",...a}));di.displayName=cZ.Empty.displayName;let dj=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Group,{ref:c,className:aS("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...b}));dj.displayName=cZ.Group.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Separator,{ref:c,className:aS("-mx-1 h-px bg-border",a),...b})).displayName=cZ.Separator.displayName;let dk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(cZ.Item,{ref:c,className:aS("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a),...b}));dk.displayName=cZ.Item.displayName;let dl=["top","right","bottom","left"],dm=Math.min,dn=Math.max,dp=Math.round,dq=Math.floor,dr=a=>({x:a,y:a}),ds={left:"right",right:"left",bottom:"top",top:"bottom"},dt={start:"end",end:"start"};function du(a,b){return"function"==typeof a?a(b):a}function dv(a){return a.split("-")[0]}function dw(a){return a.split("-")[1]}function dx(a){return"x"===a?"y":"x"}function dy(a){return"y"===a?"height":"width"}let dz=new Set(["top","bottom"]);function dA(a){return dz.has(dv(a))?"y":"x"}function dB(a){return a.replace(/start|end/g,a=>dt[a])}let dC=["left","right"],dD=["right","left"],dE=["top","bottom"],dF=["bottom","top"];function dG(a){return a.replace(/left|right|bottom|top/g,a=>ds[a])}function dH(a){return"number"!=typeof a?{top:0,right:0,bottom:0,left:0,...a}:{top:a,right:a,bottom:a,left:a}}function dI(a){let{x:b,y:c,width:d,height:e}=a;return{width:d,height:e,top:c,left:b,right:b+d,bottom:c+e,x:b,y:c}}function dJ(a,b,c){let d,{reference:e,floating:f}=a,g=dA(b),h=dx(dA(b)),i=dy(h),j=dv(b),k="y"===g,l=e.x+e.width/2-f.width/2,m=e.y+e.height/2-f.height/2,n=e[i]/2-f[i]/2;switch(j){case"top":d={x:l,y:e.y-f.height};break;case"bottom":d={x:l,y:e.y+e.height};break;case"right":d={x:e.x+e.width,y:m};break;case"left":d={x:e.x-f.width,y:m};break;default:d={x:e.x,y:e.y}}switch(dw(b)){case"start":d[h]-=n*(c&&k?-1:1);break;case"end":d[h]+=n*(c&&k?-1:1)}return d}let dK=async(a,b,c)=>{let{placement:d="bottom",strategy:e="absolute",middleware:f=[],platform:g}=c,h=f.filter(Boolean),i=await (null==g.isRTL?void 0:g.isRTL(b)),j=await g.getElementRects({reference:a,floating:b,strategy:e}),{x:k,y:l}=dJ(j,d,i),m=d,n={},o=0;for(let c=0;c<h.length;c++){let{name:f,fn:p}=h[c],{x:q,y:r,data:s,reset:t}=await p({x:k,y:l,initialPlacement:d,placement:m,strategy:e,middlewareData:n,rects:j,platform:g,elements:{reference:a,floating:b}});k=null!=q?q:k,l=null!=r?r:l,n={...n,[f]:{...n[f],...s}},t&&o<=50&&(o++,"object"==typeof t&&(t.placement&&(m=t.placement),t.rects&&(j=!0===t.rects?await g.getElementRects({reference:a,floating:b,strategy:e}):t.rects),{x:k,y:l}=dJ(j,m,i)),c=-1)}return{x:k,y:l,placement:m,strategy:e,middlewareData:n}};async function dL(a,b){var c;void 0===b&&(b={});let{x:d,y:e,platform:f,rects:g,elements:h,strategy:i}=a,{boundary:j="clippingAncestors",rootBoundary:k="viewport",elementContext:l="floating",altBoundary:m=!1,padding:n=0}=du(b,a),o=dH(n),p=h[m?"floating"===l?"reference":"floating":l],q=dI(await f.getClippingRect({element:null==(c=await (null==f.isElement?void 0:f.isElement(p)))||c?p:p.contextElement||await (null==f.getDocumentElement?void 0:f.getDocumentElement(h.floating)),boundary:j,rootBoundary:k,strategy:i})),r="floating"===l?{x:d,y:e,width:g.floating.width,height:g.floating.height}:g.reference,s=await (null==f.getOffsetParent?void 0:f.getOffsetParent(h.floating)),t=await (null==f.isElement?void 0:f.isElement(s))&&await (null==f.getScale?void 0:f.getScale(s))||{x:1,y:1},u=dI(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:r,offsetParent:s,strategy:i}):r);return{top:(q.top-u.top+o.top)/t.y,bottom:(u.bottom-q.bottom+o.bottom)/t.y,left:(q.left-u.left+o.left)/t.x,right:(u.right-q.right+o.right)/t.x}}function dM(a,b){return{top:a.top-b.height,right:a.right-b.width,bottom:a.bottom-b.height,left:a.left-b.width}}function dN(a){return dl.some(b=>a[b]>=0)}let dO=new Set(["left","top"]);async function dP(a,b){let{placement:c,platform:d,elements:e}=a,f=await (null==d.isRTL?void 0:d.isRTL(e.floating)),g=dv(c),h=dw(c),i="y"===dA(c),j=dO.has(g)?-1:1,k=f&&i?-1:1,l=du(b,a),{mainAxis:m,crossAxis:n,alignmentAxis:o}="number"==typeof l?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return h&&"number"==typeof o&&(n="end"===h?-1*o:o),i?{x:n*k,y:m*j}:{x:m*j,y:n*k}}function dQ(a){return function(a){return!1}(a)?(a.nodeName||"").toLowerCase():"#document"}function dR(a){var b;return(null==a||null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function dS(a){var b;return null==(b=(function(a){return!1}(a)?a.ownerDocument:a.document)||window.document)?void 0:b.documentElement}function dT(a){return!1}let dU=new Set(["inline","contents"]);function dV(a){let{overflow:b,overflowX:c,overflowY:d,display:e}=d4(a);return/auto|scroll|overlay|hidden|clip/.test(b+d+c)&&!dU.has(e)}let dW=new Set(["table","td","th"]),dX=[":popover-open",":modal"];function dY(a){return dX.some(b=>{try{return a.matches(b)}catch(a){return!1}})}let dZ=["transform","translate","scale","rotate","perspective"],d$=["transform","translate","scale","rotate","perspective","filter"],d_=["paint","layout","strict","content"];function d0(a){let b=d1(),c=a;return dZ.some(a=>!!c[a]&&"none"!==c[a])||!!c.containerType&&"normal"!==c.containerType||!b&&!!c.backdropFilter&&"none"!==c.backdropFilter||!b&&!!c.filter&&"none"!==c.filter||d$.some(a=>(c.willChange||"").includes(a))||d_.some(a=>(c.contain||"").includes(a))}function d1(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let d2=new Set(["html","body","#document"]);function d3(a){return d2.has(dQ(a))}function d4(a){return dR(a).getComputedStyle(a)}function d5(a){return{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function d6(a){if("html"===dQ(a))return a;let b=a.assignedSlot||a.parentNode||dS(a);return b}function d7(a,b,c){var d;void 0===b&&(b=[]),void 0===c&&(c=!0);let e=function a(b){let c=d6(b);return d3(c)?b.ownerDocument?b.ownerDocument.body:b.body:a(c)}(a),f=e===(null==(d=a.ownerDocument)?void 0:d.body),g=dR(e);if(f){let a=d8(g);return b.concat(g,g.visualViewport||[],dV(e)?e:[],a&&c?d7(a):[])}return b.concat(e,d7(e,[],c))}function d8(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function d9(a){let b=d4(a),c=parseFloat(b.width)||0,d=parseFloat(b.height)||0,e=c,f=d,g=dp(c)!==e||dp(d)!==f;return g&&(c=e,d=f),{width:c,height:d,$:g}}function ea(a){return 0,a.contextElement}function eb(a){let b=ea(a);1;return dr(1)}let ec=dr(0);function ed(a){let b=dR(a);return d1()&&b.visualViewport?{x:b.visualViewport.offsetLeft,y:b.visualViewport.offsetTop}:ec}function ee(a,b,c,d){var e;void 0===b&&(b=!1),void 0===c&&(c=!1);let f=a.getBoundingClientRect(),g=ea(a),h=dr(1);b&&(d||(h=eb(a)));let i=(void 0===(e=c)&&(e=!1),d&&(!e||d===dR(g))&&e)?ed(g):dr(0),j=(f.left+i.x)/h.x,k=(f.top+i.y)/h.y,l=f.width/h.x,m=f.height/h.y;if(g){let a=dR(g),b=d,c=a,e=d8(c);for(;e&&d&&b!==c;){let a=eb(e),b=e.getBoundingClientRect(),d=d4(e),f=b.left+(e.clientLeft+parseFloat(d.paddingLeft))*a.x,g=b.top+(e.clientTop+parseFloat(d.paddingTop))*a.y;j*=a.x,k*=a.y,l*=a.x,m*=a.y,j+=f,k+=g,e=d8(c=dR(e))}}return dI({width:l,height:m,x:j,y:k})}function ef(a,b){let c=d5(a).scrollLeft;return b?b.left+c:ee(dS(a)).left+c}function eg(a,b){let c=a.getBoundingClientRect();return{x:c.left+b.scrollLeft-ef(a,c),y:c.top+b.scrollTop}}function eh(a,b,c){var d;let e;if("viewport"===b)e=function(a,b){let c=dR(a),d=dS(a),e=c.visualViewport,f=d.clientWidth,g=d.clientHeight,h=0,i=0;if(e){f=e.width,g=e.height;let a=d1();(!a||a&&"fixed"===b)&&(h=e.offsetLeft,i=e.offsetTop)}let j=ef(d);if(j<=0){let a=d.ownerDocument,b=a.body,c=getComputedStyle(b),e="CSS1Compat"===a.compatMode&&parseFloat(c.marginLeft)+parseFloat(c.marginRight)||0,g=Math.abs(d.clientWidth-b.clientWidth-e);g<=25&&(f-=g)}else j<=25&&(f+=j);return{width:f,height:g,x:h,y:i}}(a,c);else if("document"===b){let b,c,f,g,h,i,j;d=dS(a),b=dS(d),c=d5(d),f=d.ownerDocument.body,g=dn(b.scrollWidth,b.clientWidth,f.scrollWidth,f.clientWidth),h=dn(b.scrollHeight,b.clientHeight,f.scrollHeight,f.clientHeight),i=-c.scrollLeft+ef(d),j=-c.scrollTop,"rtl"===d4(f).direction&&(i+=dn(b.clientWidth,f.clientWidth)-g),e={width:g,height:h,x:i,y:j}}else if(1){let c=ed(a);e={x:b.x-c.x,y:b.y-c.y,width:b.width,height:b.height}}else{let a,d,f,g,h,i;d=(a=ee(b,!0,"fixed"===c)).top+b.clientTop,f=a.left+b.clientLeft,g=dr(1),h=b.clientWidth*g.x,i=b.clientHeight*g.y,e={width:h,height:i,x:f*g.x,y:d*g.y}}return dI(e)}function ei(a){return"static"===d4(a).position}function ej(a,b){1;return null}function ek(a,b){var c;let d=dR(a);if(dY(a))return d;1;{let b=d6(a);for(;b&&!d3(b);){0;b=d6(b)}return d}}let el=async function(a){let b=this.getOffsetParent||ek,c=this.getDimensions,d=await c(a.floating);return{reference:function(a,b,c){let d=dS(b),e="fixed"===c,f=ee(a,!0,e,b),g={scrollLeft:0,scrollTop:0},h=dr(0);if(!e)if(("body"!==dQ(b)||dV(d))&&(g=d5(b)),1)d&&(h.x=ef(d));else{let a=ee(b,!0,e,b);h.x=a.x+b.clientLeft,h.y=a.y+b.clientTop}e&&d&&(h.x=ef(d));let i=!d||e?dr(0):eg(d,g);return{x:f.left+g.scrollLeft-h.x-i.x,y:f.top+g.scrollTop-h.y-i.y,width:f.width,height:f.height}}(a.reference,await b(a.floating),a.strategy),floating:{x:0,y:0,width:d.width,height:d.height}}},em={convertOffsetParentRelativeRectToViewportRelativeRect:function(a){let{elements:b,rect:c,offsetParent:d,strategy:e}=a,f="fixed"===e,g=dS(d),h=!!b&&dY(b.floating);if(d===g||h&&f)return c;let i={scrollLeft:0,scrollTop:0},j=dr(1),k=dr(0);!f&&(("body"!==dQ(d)||dV(g))&&(i=d5(d)),0);let l=!g||f?dr(0):eg(g,i);return{width:c.width*j.x,height:c.height*j.y,x:c.x*j.x-i.scrollLeft*j.x+k.x+l.x,y:c.y*j.y-i.scrollTop*j.y+k.y+l.y}},getDocumentElement:dS,getClippingRect:function(a){let{element:b,boundary:c,rootBoundary:d,strategy:e}=a,f=[..."clippingAncestors"===c?dY(b)?[]:function(a,b){let c=b.get(a);if(c)return c;let d=d7(a,[],!1).filter(a=>!1),e="fixed"===d4(a).position,f=e?d6(a):a;return b.set(a,d),d}(b,this._c):[].concat(c),d],g=f[0],h=f.reduce((a,c)=>{let d=eh(b,c,e);return a.top=dn(d.top,a.top),a.right=dm(d.right,a.right),a.bottom=dm(d.bottom,a.bottom),a.left=dn(d.left,a.left),a},eh(b,g,e));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}},getOffsetParent:ek,getElementRects:el,getClientRects:function(a){return Array.from(a.getClientRects())},getDimensions:function(a){let{width:b,height:c}=d9(a);return{width:b,height:c}},getScale:eb,isElement:dT,isRTL:function(a){return"rtl"===d4(a).direction}};function en(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}let eo=a=>({name:"arrow",options:a,async fn(b){let{x:c,y:d,placement:e,rects:f,platform:g,elements:h,middlewareData:i}=b,{element:j,padding:k=0}=du(a,b)||{};if(null==j)return{};let l=dH(k),m={x:c,y:d},n=dx(dA(e)),o=dy(n),p=await g.getDimensions(j),q="y"===n,r=q?"clientHeight":"clientWidth",s=f.reference[o]+f.reference[n]-m[n]-f.floating[o],t=m[n]-f.reference[n],u=await (null==g.getOffsetParent?void 0:g.getOffsetParent(j)),v=u?u[r]:0;v&&await (null==g.isElement?void 0:g.isElement(u))||(v=h.floating[r]||f.floating[o]);let w=v/2-p[o]/2-1,x=dm(l[q?"top":"left"],w),y=dm(l[q?"bottom":"right"],w),z=v-p[o]-y,A=v/2-p[o]/2+(s/2-t/2),B=dn(x,dm(A,z)),C=!i.arrow&&null!=dw(e)&&A!==B&&f.reference[o]/2-(A<x?x:y)-p[o]/2<0,D=C?A<x?A-x:A-z:0;return{[n]:m[n]+D,data:{[n]:B,centerOffset:A-B-D,...C&&{alignmentOffset:D}},reset:C}}});var ep="u">typeof document?u.useLayoutEffect:function(){};function eq(a,b){let c,d,e;if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if((c=a.length)!==b.length)return!1;for(d=c;0!=d--;)if(!eq(a[d],b[d]))return!1;return!0}if((c=(e=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(d=c;0!=d--;)if(!({}).hasOwnProperty.call(b,e[d]))return!1;for(d=c;0!=d--;){let c=e[d];if(("_owner"!==c||!a.$$typeof)&&!eq(a[c],b[c]))return!1}return!0}return a!=a&&b!=b}function er(a,b){return Math.round(+b)/1}function es(a){let b=u.useRef(a);return ep(()=>{b.current=a}),b}var et=u.forwardRef((a,b)=>{let{children:c,width:d=10,height:e=5,...f}=a;return(0,t.jsx)(ba.svg,{...f,ref:b,width:d,height:e,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?c:(0,t.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function eu(a){let[b,c]=u.useState(void 0);return a1(()=>{if(a){c({width:a.offsetWidth,height:a.offsetHeight});let b=new ResizeObserver(b=>{let d,e;if(!Array.isArray(b)||!b.length)return;let f=b[0];if("borderBoxSize"in f){let a=f.borderBoxSize,b=Array.isArray(a)?a[0]:a;d=b.inlineSize,e=b.blockSize}else d=a.offsetWidth,e=a.offsetHeight;c({width:d,height:e})});return b.observe(a,{box:"border-box"}),()=>b.unobserve(a)}c(void 0)},[a]),b}et.displayName="Arrow",a.s(["useSize",0,eu],3688);var ev="Popper",[ew,ex]=a0(ev),[ey,ez]=ew(ev),eA=a=>{let{__scopePopper:b,children:c}=a,[d,e]=u.useState(null);return(0,t.jsx)(ey,{scope:b,anchor:d,onAnchorChange:e,children:c})};eA.displayName=ev;var eB="PopperAnchor",eC=u.forwardRef((a,b)=>{let{__scopePopper:c,virtualRef:d,...e}=a,f=ez(eB,c),g=u.useRef(null),h=B(b,g),i=u.useRef(null);return u.useEffect(()=>{let a=i.current;i.current=d?.current||g.current,a!==i.current&&f.onAnchorChange(i.current)}),d?null:(0,t.jsx)(ba.div,{...e,ref:h})});eC.displayName=eB;var eD="PopperContent",[eE,eF]=ew(eD),eG=u.forwardRef((a,b)=>{var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,v,w,x,y;let{__scopePopper:z,side:A="bottom",sideOffset:C=0,align:D="center",alignOffset:E=0,arrowPadding:F=0,avoidCollisions:G=!0,collisionBoundary:H=[],collisionPadding:I=0,sticky:J="partial",hideWhenDetached:K=!1,updatePositionStrategy:L="optimized",onPlaced:M,...N}=a,O=ez(eD,z),[P,Q]=u.useState(null),R=B(b,a=>Q(a)),[S,T]=u.useState(null),U=eu(S),V=U?.width??0,W=U?.height??0,X="number"==typeof I?I:{top:0,right:0,bottom:0,left:0,...I},Y=Array.isArray(H)?H:[H],Z=Y.length>0,$={padding:X,boundary:Y.filter(eK),altBoundary:Z},{refs:_,floatingStyles:aa,placement:ab,isPositioned:ac,middlewareData:ad}=function(a){void 0===a&&(a={});let{placement:b="bottom",strategy:c="absolute",middleware:d=[],platform:e,elements:{reference:f,floating:g}={},transform:h=!0,whileElementsMounted:i,open:j}=a,[k,l]=u.useState({x:0,y:0,strategy:c,placement:b,middlewareData:{},isPositioned:!1}),[m,n]=u.useState(d);eq(m,d)||n(d);let[o,p]=u.useState(null),[q,r]=u.useState(null),s=u.useCallback(a=>{a!==x.current&&(x.current=a,p(a))},[]),t=u.useCallback(a=>{a!==y.current&&(y.current=a,r(a))},[]),v=f||o,w=g||q,x=u.useRef(null),y=u.useRef(null),z=u.useRef(k),A=null!=i,B=es(i),C=es(e),D=es(j),E=u.useCallback(()=>{var a,d;let e,f,g;if(!x.current||!y.current)return;let h={placement:b,strategy:c,middleware:m};C.current&&(h.platform=C.current),(a=x.current,d=y.current,e=new Map,g={...(f={platform:em,...h}).platform,_c:e},dK(a,d,{...f,platform:g})).then(a=>{let b={...a,isPositioned:!1!==D.current};F.current&&!eq(z.current,b)&&(z.current=b,a7.flushSync(()=>{l(b)}))})},[m,b,c,C,D]);ep(()=>{!1===j&&z.current.isPositioned&&(z.current.isPositioned=!1,l(a=>({...a,isPositioned:!1})))},[j]);let F=u.useRef(!1);ep(()=>(F.current=!0,()=>{F.current=!1}),[]),ep(()=>{if(v&&(x.current=v),w&&(y.current=w),v&&w){if(B.current)return B.current(v,w,E);E()}},[v,w,E,B,A]);let G=u.useMemo(()=>({reference:x,floating:y,setReference:s,setFloating:t}),[s,t]),H=u.useMemo(()=>({reference:v,floating:w}),[v,w]),I=u.useMemo(()=>{let a={position:c,left:0,top:0};if(!H.floating)return a;let b=er(H.floating,k.x),d=er(H.floating,k.y);if(h)return{...a,transform:"translate("+b+"px, "+d+"px)",...(H.floating,false)};return{position:c,left:b,top:d}},[c,h,H.floating,k.x,k.y]);return u.useMemo(()=>({...k,update:E,refs:G,elements:H,floatingStyles:I}),[k,E,G,H,I])}({strategy:"fixed",placement:A+("center"!==D?"-"+D:""),whileElementsMounted:(...a)=>(function(a,b,c,d){let e;void 0===d&&(d={});let{ancestorScroll:f=!0,ancestorResize:g=!0,elementResize:h="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:j=!1}=d,k=ea(a),l=f||g?[...k?d7(k):[],...d7(b)]:[];l.forEach(a=>{f&&a.addEventListener("scroll",c,{passive:!0}),g&&a.addEventListener("resize",c)});let m=k&&i?function(a,b){let c,d=null,e=dS(a);function f(){var a;clearTimeout(c),null==(a=d)||a.disconnect(),d=null}return!function g(h,i){void 0===h&&(h=!1),void 0===i&&(i=1),f();let j=a.getBoundingClientRect(),{left:k,top:l,width:m,height:n}=j;if(h||b(),!m||!n)return;let o={rootMargin:-dq(l)+"px "+-dq(e.clientWidth-(k+m))+"px "+-dq(e.clientHeight-(l+n))+"px "+-dq(k)+"px",threshold:dn(0,dm(1,i))||1},p=!0;function q(b){let d=b[0].intersectionRatio;if(d!==i){if(!p)return g();d?g(!1,d):c=setTimeout(()=>{g(!1,1e-7)},1e3)}1!==d||en(j,a.getBoundingClientRect())||g(),p=!1}try{d=new IntersectionObserver(q,{...o,root:e.ownerDocument})}catch(a){d=new IntersectionObserver(q,o)}d.observe(a)}(!0),f}(k,c):null,n=-1,o=null;h&&(o=new ResizeObserver(a=>{let[d]=a;d&&d.target===k&&o&&(o.unobserve(b),cancelAnimationFrame(n),n=requestAnimationFrame(()=>{var a;null==(a=o)||a.observe(b)})),c()}),k&&!j&&o.observe(k),o.observe(b));let p=j?ee(a):null;return j&&function b(){let d=ee(a);p&&!en(p,d)&&c(),p=d,e=requestAnimationFrame(b)}(),c(),()=>{var a;l.forEach(a=>{f&&a.removeEventListener("scroll",c),g&&a.removeEventListener("resize",c)}),null==m||m(),null==(a=o)||a.disconnect(),o=null,j&&cancelAnimationFrame(e)}})(...a,{animationFrame:"always"===L}),elements:{reference:O.anchor},middleware:[{...{name:"offset",options:e=c={mainAxis:C+W,alignmentAxis:E},async fn(a){var b,c;let{x:d,y:f,placement:g,middlewareData:h}=a,i=await dP(a,e);return g===(null==(b=h.offset)?void 0:b.placement)&&null!=(c=h.arrow)&&c.alignmentOffset?{}:{x:d+i.x,y:f+i.y,data:{...i,placement:g}}}},options:[c,d]},G&&{...{name:"shift",options:k=i={mainAxis:!0,crossAxis:!1,limiter:"partial"===J?{...(void 0===(h=f)&&(h={}),{options:h,fn(a){let{x:b,y:c,placement:d,rects:e,middlewareData:f}=a,{offset:g=0,mainAxis:i=!0,crossAxis:j=!0}=du(h,a),k={x:b,y:c},l=dA(d),m=dx(l),n=k[m],o=k[l],p=du(g,a),q="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(i){let a="y"===m?"height":"width",b=e.reference[m]-e.floating[a]+q.mainAxis,c=e.reference[m]+e.reference[a]-q.mainAxis;n<b?n=b:n>c&&(n=c)}if(j){var r,s;let a="y"===m?"width":"height",b=dO.has(dv(d)),c=e.reference[l]-e.floating[a]+(b&&(null==(r=f.offset)?void 0:r[l])||0)+(b?0:q.crossAxis),g=e.reference[l]+e.reference[a]+(b?0:(null==(s=f.offset)?void 0:s[l])||0)-(b?q.crossAxis:0);o<c?o=c:o>g&&(o=g)}return{[m]:n,[l]:o}}}),options:[f,g]}:void 0,...$},async fn(a){let{x:b,y:c,placement:d}=a,{mainAxis:e=!0,crossAxis:f=!1,limiter:g={fn:a=>{let{x:b,y:c}=a;return{x:b,y:c}}},...h}=du(k,a),i={x:b,y:c},j=await dL(a,h),l=dA(dv(d)),m=dx(l),n=i[m],o=i[l];if(e){let a="y"===m?"top":"left",b="y"===m?"bottom":"right",c=n+j[a],d=n-j[b];n=dn(c,dm(n,d))}if(f){let a="y"===l?"top":"left",b="y"===l?"bottom":"right",c=o+j[a],d=o-j[b];o=dn(c,dm(o,d))}let p=g.fn({...a,[m]:n,[l]:o});return{...p,data:{x:p.x-b,y:p.y-c,enabled:{[m]:e,[l]:f}}}}},options:[i,j]},G&&{...{name:"flip",options:n=l={...$},async fn(a){var b,c,d,e,f,g,h,i;let j,k,l,{placement:m,middlewareData:o,rects:p,initialPlacement:q,platform:r,elements:s}=a,{mainAxis:t=!0,crossAxis:u=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...z}=du(n,a);if(null!=(b=o.arrow)&&b.alignmentOffset)return{};let A=dv(m),B=dA(q),C=dv(q)===q,D=await (null==r.isRTL?void 0:r.isRTL(s.floating)),E=v||(C||!y?[dG(q)]:(j=dG(q),[dB(q),j,dB(j)])),F="none"!==x;!v&&F&&E.push(...(k=dw(q),l=function(a,b,c){switch(a){case"top":case"bottom":if(c)return b?dD:dC;return b?dC:dD;case"left":case"right":return b?dE:dF;default:return[]}}(dv(q),"start"===x,D),k&&(l=l.map(a=>a+"-"+k),y&&(l=l.concat(l.map(dB)))),l));let G=[q,...E],H=await dL(a,z),I=[],J=(null==(c=o.flip)?void 0:c.overflows)||[];if(t&&I.push(H[A]),u){let a,b,c,d,e=(g=m,h=p,void 0===(i=D)&&(i=!1),a=dw(g),c=dy(b=dx(dA(g))),d="x"===b?a===(i?"end":"start")?"right":"left":"start"===a?"bottom":"top",h.reference[c]>h.floating[c]&&(d=dG(d)),[d,dG(d)]);I.push(H[e[0]],H[e[1]])}if(J=[...J,{placement:m,overflows:I}],!I.every(a=>a<=0)){let a=((null==(d=o.flip)?void 0:d.index)||0)+1,b=G[a];if(b&&("alignment"!==u||B===dA(b)||J.every(a=>dA(a.placement)!==B||a.overflows[0]>0)))return{data:{index:a,overflows:J},reset:{placement:b}};let c=null==(e=J.filter(a=>a.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])?void 0:e.placement;if(!c)switch(w){case"bestFit":{let a=null==(f=J.filter(a=>{if(F){let b=dA(a.placement);return b===B||"y"===b}return!0}).map(a=>[a.placement,a.overflows.filter(a=>a>0).reduce((a,b)=>a+b,0)]).sort((a,b)=>a[1]-b[1])[0])?void 0:f[0];a&&(c=a);break}case"initialPlacement":c=q}if(m!==c)return{reset:{placement:c}}}return{}}},options:[l,m]},{...{name:"size",options:q=o={...$,apply:({elements:a,rects:b,availableWidth:c,availableHeight:d})=>{let{width:e,height:f}=b.reference,g=a.floating.style;g.setProperty("--radix-popper-available-width",`${c}px`),g.setProperty("--radix-popper-available-height",`${d}px`),g.setProperty("--radix-popper-anchor-width",`${e}px`),g.setProperty("--radix-popper-anchor-height",`${f}px`)}},async fn(a){var b,c;let d,e,{placement:f,rects:g,platform:h,elements:i}=a,{apply:j=()=>{},...k}=du(q,a),l=await dL(a,k),m=dv(f),n=dw(f),o="y"===dA(f),{width:p,height:r}=g.floating;"top"===m||"bottom"===m?(d=m,e=n===(await (null==h.isRTL?void 0:h.isRTL(i.floating))?"start":"end")?"left":"right"):(e=m,d="end"===n?"top":"bottom");let s=r-l.top-l.bottom,t=p-l.left-l.right,u=dm(r-l[d],s),v=dm(p-l[e],t),w=!a.middlewareData.shift,x=u,y=v;if(null!=(b=a.middlewareData.shift)&&b.enabled.x&&(y=t),null!=(c=a.middlewareData.shift)&&c.enabled.y&&(x=s),w&&!n){let a=dn(l.left,0),b=dn(l.right,0),c=dn(l.top,0),d=dn(l.bottom,0);o?y=p-2*(0!==a||0!==b?a+b:dn(l.left,l.right)):x=r-2*(0!==c||0!==d?c+d:dn(l.top,l.bottom))}await j({...a,availableWidth:y,availableHeight:x});let z=await h.getDimensions(i.floating);return p!==z.width||r!==z.height?{reset:{rects:!0}}:{}}},options:[o,p]},S&&{...{name:"arrow",options:v=r={element:S,padding:F},fn(a){let{element:b,padding:c}="function"==typeof v?v(a):v;return b&&({}).hasOwnProperty.call(b,"current")?null!=b.current?eo({element:b.current,padding:c}).fn(a):{}:b?eo({element:b,padding:c}).fn(a):{}}},options:[r,s]},eL({arrowWidth:V,arrowHeight:W}),K&&{...{name:"hide",options:y=w={strategy:"referenceHidden",...$},async fn(a){let{rects:b}=a,{strategy:c="referenceHidden",...d}=du(y,a);switch(c){case"referenceHidden":{let c=dM(await dL(a,{...d,elementContext:"reference"}),b.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:dN(c)}}}case"escaped":{let c=dM(await dL(a,{...d,altBoundary:!0}),b.floating);return{data:{escapedOffsets:c,escaped:dN(c)}}}default:return{}}}},options:[w,x]}]}),[ae,af]=eM(ab),ag=bc(M);a1(()=>{ac&&ag?.()},[ac,ag]);let ah=ad.arrow?.x,ai=ad.arrow?.y,aj=ad.arrow?.centerOffset!==0,[ak,al]=u.useState();return a1(()=>{P&&al(window.getComputedStyle(P).zIndex)},[P]),(0,t.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...aa,transform:ac?aa.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ak,"--radix-popper-transform-origin":[ad.transformOrigin?.x,ad.transformOrigin?.y].join(" "),...ad.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:(0,t.jsx)(eE,{scope:z,placedSide:ae,onArrowChange:T,arrowX:ah,arrowY:ai,shouldHideArrow:aj,children:(0,t.jsx)(ba.div,{"data-side":ae,"data-align":af,...N,ref:R,style:{...N.style,animation:ac?void 0:"none"}})})})});eG.displayName=eD;var eH="PopperArrow",eI={top:"bottom",right:"left",bottom:"top",left:"right"},eJ=u.forwardRef(function(a,b){let{__scopePopper:c,...d}=a,e=eF(eH,c),f=eI[e.placedSide];return(0,t.jsx)("span",{ref:e.onArrowChange,style:{position:"absolute",left:e.arrowX,top:e.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[e.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[e.placedSide],visibility:e.shouldHideArrow?"hidden":void 0},children:(0,t.jsx)(et,{...d,ref:b,style:{...d.style,display:"block"}})})});function eK(a){return null!==a}eJ.displayName=eH;var eL=a=>({name:"transformOrigin",options:a,fn(b){let{placement:c,rects:d,middlewareData:e}=b,f=e.arrow?.centerOffset!==0,g=f?0:a.arrowWidth,h=f?0:a.arrowHeight,[i,j]=eM(c),k={start:"0%",center:"50%",end:"100%"}[j],l=(e.arrow?.x??0)+g/2,m=(e.arrow?.y??0)+h/2,n="",o="";return"bottom"===i?(n=f?k:`${l}px`,o=`${-h}px`):"top"===i?(n=f?k:`${l}px`,o=`${d.floating.height+h}px`):"right"===i?(n=`${-h}px`,o=f?k:`${m}px`):"left"===i&&(n=`${d.floating.width+h}px`,o=f?k:`${m}px`),{data:{x:n,y:o}}}});function eM(a){let[b,c="center"]=a.split("-");return[b,c]}a.s(["Anchor",0,eC,"Arrow",0,eJ,"Content",0,eG,"Root",0,eA,"createPopperScope",0,ex],4691);var eN=Symbol("radix.slottable");function eO(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===eN}var eP="Popover",[eQ,eR]=a0(eP,[ex]),eS=ex(),[eT,eU]=eQ(eP),eV=a=>{let{__scopePopover:b,children:c,open:d,defaultOpen:e,onOpenChange:f,modal:g=!1}=a,h=eS(b),i=u.useRef(null),[j,k]=u.useState(!1),[l,m]=a6({prop:d,defaultProp:e??!1,onChange:f,caller:eP});return(0,t.jsx)(eA,{...h,children:(0,t.jsx)(eT,{scope:b,contentId:a4(),triggerRef:i,open:l,onOpenChange:m,onOpenToggle:u.useCallback(()=>m(a=>!a),[m]),hasCustomAnchor:j,onCustomAnchorAdd:u.useCallback(()=>k(!0),[]),onCustomAnchorRemove:u.useCallback(()=>k(!1),[]),modal:g,children:c})})};eV.displayName=eP;var eW="PopoverAnchor";u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(eW,c),f=eS(c),{onCustomAnchorAdd:g,onCustomAnchorRemove:h}=e;return u.useEffect(()=>(g(),()=>h()),[g,h]),(0,t.jsx)(eC,{...f,...d,ref:b})}).displayName=eW;var eX="PopoverTrigger",eY=u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(eX,c),f=eS(c),g=B(b,e.triggerRef),h=(0,t.jsx)(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":e.open,"aria-controls":e.contentId,"data-state":e8(e.open),...d,ref:g,onClick:a$(a.onClick,e.onOpenToggle)});return e.hasCustomAnchor?h:(0,t.jsx)(eC,{asChild:!0,...f,children:h})});eY.displayName=eX;var eZ="PopoverPortal",[e$,e_]=eQ(eZ,{forceMount:void 0}),e0=a=>{let{__scopePopover:b,forceMount:c,children:d,container:e}=a,f=eU(eZ,b);return(0,t.jsx)(e$,{scope:b,forceMount:c,children:(0,t.jsx)(bs,{present:c||f.open,children:(0,t.jsx)(br,{asChild:!0,container:e,children:d})})})};e0.displayName=eZ;var e1="PopoverContent",e2=u.forwardRef((a,b)=>{let c=e_(e1,a.__scopePopover),{forceMount:d=c.forceMount,...e}=a,f=eU(e1,a.__scopePopover);return(0,t.jsx)(bs,{present:d||f.open,children:f.modal?(0,t.jsx)(e4,{...e,ref:b}):(0,t.jsx)(e5,{...e,ref:b})})});e2.displayName=e1;var e3=((j=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName="PopoverContent.RemoveScroll.SlotClone",d=j,(e=u.forwardRef((a,b)=>{let{children:c,...e}=a,f=u.Children.toArray(c),g=f.find(eO);if(g){let a=g.props.children,c=f.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(d,{...e,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(d,{...e,ref:b,children:c})})).displayName="PopoverContent.RemoveScroll.Slot",e),e4=u.forwardRef((a,b)=>{let c=eU(e1,a.__scopePopover),d=u.useRef(null),e=B(b,d),f=u.useRef(!1);return u.useEffect(()=>{let a=d.current;if(a)return b8(a)},[]),(0,t.jsx)(b1,{as:e3,allowPinchZoom:!0,children:(0,t.jsx)(e6,{...a,ref:e,trapFocus:c.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a$(a.onCloseAutoFocus,a=>{a.preventDefault(),f.current||c.triggerRef.current?.focus()}),onPointerDownOutside:a$(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;f.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:a$(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),e5=u.forwardRef((a,b)=>{let c=eU(e1,a.__scopePopover),d=u.useRef(!1),e=u.useRef(!1);return(0,t.jsx)(e6,{...a,ref:b,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(d.current||c.triggerRef.current?.focus(),b.preventDefault()),d.current=!1,e.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(d.current=!0,"pointerdown"===b.detail.originalEvent.type&&(e.current=!0));let f=b.target;c.triggerRef.current?.contains(f)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&e.current&&b.preventDefault()}})}),e6=u.forwardRef((a,b)=>{let{__scopePopover:c,trapFocus:d,onOpenAutoFocus:e,onCloseAutoFocus:f,disableOutsidePointerEvents:g,onEscapeKeyDown:h,onPointerDownOutside:i,onFocusOutside:j,onInteractOutside:k,...l}=a,m=eU(e1,c),n=eS(c);return bv(),(0,t.jsx)(bl,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:e,onUnmountAutoFocus:f,children:(0,t.jsx)(bf,{asChild:!0,disableOutsidePointerEvents:g,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:i,onFocusOutside:j,onDismiss:()=>m.onOpenChange(!1),children:(0,t.jsx)(eG,{"data-state":e8(m.open),role:"dialog",id:m.contentId,...n,...l,ref:b,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),e7="PopoverClose";function e8(a){return a?"open":"closed"}u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eU(e7,c);return(0,t.jsx)(ba.button,{type:"button",...d,ref:b,onClick:a$(a.onClick,()=>e.onOpenChange(!1))})}).displayName=e7,u.forwardRef((a,b)=>{let{__scopePopover:c,...d}=a,e=eS(c);return(0,t.jsx)(eJ,{...e,...d,ref:b})}).displayName="PopoverArrow";let e9=u.forwardRef(({className:a,align:b="center",sideOffset:c=4,...d},e)=>(0,t.jsx)(e0,{children:(0,t.jsx)(e2,{ref:e,align:b,sideOffset:c,className:aS("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-popover-content-transform-origin]",a),...d})}));e9.displayName=e2.displayName;let fa=u.forwardRef(({className:a,type:b,...c},d)=>(0,t.jsx)("input",{type:b,className:aS("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:d,...c}));fa.displayName="Input",a.s(["Input",0,fa],22027);let fb=(0,c6.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);a.s(["Check",0,fb],33441);let fc=(0,c6.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),fd=(0,c6.default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",0,fd],15618);let fe=(0,c6.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,fe],4720);let ff=(0,c6.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),fg=(0,c6.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),fh=(0,c6.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),fi=(0,c6.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),fj=(0,c6.default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),fk=(0,c6.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,fk],5784);let fl=(0,c6.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,fl],50522);var fm=a.i(5500),fn=a.i(31186);let fo=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)("textarea",{className:aS("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:c,...b}));function fp(a){let b=u.useRef({value:a,previous:a});return u.useMemo(()=>(b.current.value!==a&&(b.current.previous=b.current.value,b.current.value=a),b.current.previous),[a])}fo.displayName="Textarea",a.s(["Textarea",0,fo],6219),a.s(["usePrevious",0,fp],56558);var fq="Checkbox",[fr,fs]=a0(fq),[ft,fu]=fr(fq);function fv(a){let{__scopeCheckbox:b,checked:c,children:d,defaultChecked:e,disabled:f,form:g,name:h,onCheckedChange:i,required:j,value:k="on",internal_do_not_use_render:l}=a,[m,n]=a6({prop:c,defaultProp:e??!1,onChange:i,caller:fq}),[o,p]=u.useState(null),[q,r]=u.useState(null),s=u.useRef(!1),v=!o||!!g||!!o.closest("form"),w={checked:m,disabled:f,setChecked:n,control:o,setControl:p,name:h,form:g,value:k,hasConsumerStoppedPropagationRef:s,required:j,defaultChecked:!fD(e)&&e,isFormControl:v,bubbleInput:q,setBubbleInput:r};return(0,t.jsx)(ft,{scope:b,...w,children:"function"==typeof l?l(w):d})}var fw="CheckboxTrigger",fx=u.forwardRef(({__scopeCheckbox:a,onKeyDown:b,onClick:c,...d},e)=>{let{control:f,value:g,disabled:h,checked:i,required:j,setControl:k,setChecked:l,hasConsumerStoppedPropagationRef:m,isFormControl:n,bubbleInput:o}=fu(fw,a),p=B(e,k),q=u.useRef(i);return u.useEffect(()=>{let a=f?.form;if(a){let b=()=>l(q.current);return a.addEventListener("reset",b),()=>a.removeEventListener("reset",b)}},[f,l]),(0,t.jsx)(ba.button,{type:"button",role:"checkbox","aria-checked":fD(i)?"mixed":i,"aria-required":j,"data-state":fE(i),"data-disabled":h?"":void 0,disabled:h,value:g,...d,ref:p,onKeyDown:a$(b,a=>{"Enter"===a.key&&a.preventDefault()}),onClick:a$(c,a=>{l(a=>!!fD(a)||!a),o&&n&&(m.current=a.isPropagationStopped(),m.current||a.stopPropagation())})})});fx.displayName=fw;var fy=u.forwardRef((a,b)=>{let{__scopeCheckbox:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i,onCheckedChange:j,form:k,...l}=a;return(0,t.jsx)(fv,{__scopeCheckbox:c,checked:e,defaultChecked:f,disabled:h,required:g,onCheckedChange:j,name:d,form:k,value:i,internal_do_not_use_render:({isFormControl:a})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(fx,{...l,ref:b,__scopeCheckbox:c}),a&&(0,t.jsx)(fC,{__scopeCheckbox:c})]})})});fy.displayName=fq;var fz="CheckboxIndicator",fA=u.forwardRef((a,b)=>{let{__scopeCheckbox:c,forceMount:d,...e}=a,f=fu(fz,c);return(0,t.jsx)(bs,{present:d||fD(f.checked)||!0===f.checked,children:(0,t.jsx)(ba.span,{"data-state":fE(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:b,style:{pointerEvents:"none",...a.style}})})});fA.displayName=fz;var fB="CheckboxBubbleInput",fC=u.forwardRef(({__scopeCheckbox:a,...b},c)=>{let{control:d,hasConsumerStoppedPropagationRef:e,checked:f,defaultChecked:g,required:h,disabled:i,name:j,value:k,form:l,bubbleInput:m,setBubbleInput:n}=fu(fB,a),o=B(c,n),p=fp(f),q=eu(d);u.useEffect(()=>{if(!m)return;let a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,b=!e.current;if(p!==f&&a){let c=new Event("click",{bubbles:b});m.indeterminate=fD(f),a.call(m,!fD(f)&&f),m.dispatchEvent(c)}},[m,p,f,e]);let r=u.useRef(!fD(f)&&f);return(0,t.jsx)(ba.input,{type:"checkbox","aria-hidden":!0,defaultChecked:g??r.current,required:h,disabled:i,name:j,value:k,form:l,...b,tabIndex:-1,ref:o,style:{...b.style,...q,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function fD(a){return"indeterminate"===a}function fE(a){return fD(a)?"indeterminate":a?"checked":"unchecked"}fC.displayName=fB;let fF=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(fy,{ref:c,className:aS("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...b,children:(0,t.jsx)(fA,{className:aS("grid place-content-center text-current"),children:(0,t.jsx)(fb,{className:"h-4 w-4"})})}));function fG(a){var b;let c,d=(b=a,(c=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName=`${b}.SlotClone`,c),e=u.forwardRef((a,b)=>{let{children:c,...e}=a,f=u.Children.toArray(c),g=f.find(fI);if(g){let a=g.props.children,c=f.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(d,{...e,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(d,{...e,ref:b,children:c})});return e.displayName=`${a}.Slot`,e}fF.displayName=fy.displayName,a.s(["Checkbox",0,fF],4212);var fH=Symbol("radix.slottable");function fI(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===fH}function fJ(a){let b=a+"CollectionProvider",[c,d]=a0(b),[e,f]=c(b,{collectionRef:{current:null},itemMap:new Map}),g=a=>{let{scope:b,children:c}=a,d=u.default.useRef(null),f=u.default.useRef(new Map).current;return(0,t.jsx)(e,{scope:b,itemMap:f,collectionRef:d,children:c})};g.displayName=b;let h=a+"CollectionSlot",i=fG(h),j=u.default.forwardRef((a,b)=>{let{scope:c,children:d}=a,e=B(b,f(h,c).collectionRef);return(0,t.jsx)(i,{ref:e,children:d})});j.displayName=h;let k=a+"CollectionItemSlot",l="data-radix-collection-item",m=fG(k),n=u.default.forwardRef((a,b)=>{let{scope:c,children:d,...e}=a,g=u.default.useRef(null),h=B(b,g),i=f(k,c);return u.default.useEffect(()=>(i.itemMap.set(g,{ref:g,...e}),()=>void i.itemMap.delete(g))),(0,t.jsx)(m,{...{[l]:""},ref:h,children:d})});return n.displayName=k,[{Provider:g,Slot:j,ItemSlot:n},function(b){let c=f(a+"CollectionConsumer",b);return u.default.useCallback(()=>{let a=c.collectionRef.current;if(!a)return[];let b=Array.from(a.querySelectorAll(`[${l}]`));return Array.from(c.itemMap.values()).sort((a,c)=>b.indexOf(a.ref.current)-b.indexOf(c.ref.current))},[c.collectionRef,c.itemMap])},d]}var fK=new WeakMap;function fL(a,b){var c,d;let e,f,g;if("at"in Array.prototype)return Array.prototype.at.call(a,b);let h=(c=a,d=b,e=c.length,(g=(f=fM(d))>=0?f:e+f)<0||g>=e?-1:g);return -1===h?void 0:a[h]}function fM(a){return a!=a||0===a?0:Math.trunc(a)}(class a extends Map{#a;constructor(a){super(a),this.#a=[...super.keys()],fK.set(this,!0)}set(a,b){return fK.get(this)&&(this.has(a)?this.#a[this.#a.indexOf(a)]=a:this.#a.push(a)),super.set(a,b),this}insert(a,b,c){let d,e=this.has(b),f=this.#a.length,g=fM(a),h=g>=0?g:f+g,i=h<0||h>=f?-1:h;if(i===this.size||e&&i===this.size-1||-1===i)return this.set(b,c),this;let j=this.size+ +!e;g<0&&h++;let k=[...this.#a],l=!1;for(let a=h;a<j;a++)if(h===a){let f=k[a];k[a]===b&&(f=k[a+1]),e&&this.delete(b),d=this.get(f),this.set(b,c)}else{l||k[a-1]!==b||(l=!0);let c=k[l?a:a-1],e=d;d=this.get(c),this.delete(c),this.set(c,e)}return this}with(b,c,d){let e=new a(this);return e.insert(b,c,d),e}before(a){let b=this.#a.indexOf(a)-1;if(!(b<0))return this.entryAt(b)}setBefore(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d,b,c)}after(a){let b=this.#a.indexOf(a);if(-1!==(b=-1===b||b===this.size-1?-1:b+1))return this.entryAt(b)}setAfter(a,b,c){let d=this.#a.indexOf(a);return -1===d?this:this.insert(d+1,b,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#a=[],super.clear()}delete(a){let b=super.delete(a);return b&&this.#a.splice(this.#a.indexOf(a),1),b}deleteAt(a){let b=this.keyAt(a);return void 0!==b&&this.delete(b)}at(a){let b=fL(this.#a,a);if(void 0!==b)return this.get(b)}entryAt(a){let b=fL(this.#a,a);if(void 0!==b)return[b,this.get(b)]}indexOf(a){return this.#a.indexOf(a)}keyAt(a){return fL(this.#a,a)}from(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.at(d)}keyFrom(a,b){let c=this.indexOf(a);if(-1===c)return;let d=c+b;return d<0&&(d=0),d>=this.size&&(d=this.size-1),this.keyAt(d)}find(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return d;c++}}findIndex(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return c;c++}return -1}filter(b,c){let d=[],e=0;for(let a of this)Reflect.apply(b,c,[a,e,this])&&d.push(a),e++;return new a(d)}map(b,c){let d=[],e=0;for(let a of this)d.push([a[0],Reflect.apply(b,c,[a,e,this])]),e++;return new a(d)}reduce(...a){let[b,c]=a,d=0,e=c??this.at(0);for(let c of this)e=0===d&&1===a.length?c:Reflect.apply(b,this,[e,c,d,this]),d++;return e}reduceRight(...a){let[b,c]=a,d=c??this.at(-1);for(let c=this.size-1;c>=0;c--){let e=this.at(c);d=c===this.size-1&&1===a.length?e:Reflect.apply(b,this,[d,e,c,this])}return d}toSorted(b){return new a([...this.entries()].sort(b))}toReversed(){let b=new a;for(let a=this.size-1;a>=0;a--){let c=this.keyAt(a),d=this.get(c);b.set(c,d)}return b}toSpliced(...b){let c=[...this.entries()];return c.splice(...b),new a(c)}slice(b,c){let d=new a,e=this.size-1;if(void 0===b)return d;b<0&&(b+=this.size),void 0!==c&&c>0&&(e=c-1);for(let a=b;a<=e;a++){let b=this.keyAt(a),c=this.get(b);d.set(b,c)}return d}every(a,b){let c=0;for(let d of this){if(!Reflect.apply(a,b,[d,c,this]))return!1;c++}return!0}some(a,b){let c=0;for(let d of this){if(Reflect.apply(a,b,[d,c,this]))return!0;c++}return!1}}),a.s(["createCollection",0,fJ],37738);var fN=u.createContext(void 0);function fO(a){let b=u.useContext(fN);return a||b||"ltr"}a.s(["useDirection",0,fO],7827);var fP="rovingFocusGroup.onEntryFocus",fQ={bubbles:!1,cancelable:!0},fR="RovingFocusGroup",[fS,fT,fU]=fJ(fR),[fV,fW]=a0(fR,[fU]),[fX,fY]=fV(fR),fZ=u.forwardRef((a,b)=>(0,t.jsx)(fS.Provider,{scope:a.__scopeRovingFocusGroup,children:(0,t.jsx)(fS.Slot,{scope:a.__scopeRovingFocusGroup,children:(0,t.jsx)(f$,{...a,ref:b})})}));fZ.displayName=fR;var f$=u.forwardRef((a,b)=>{let{__scopeRovingFocusGroup:c,orientation:d,loop:e=!1,dir:f,currentTabStopId:g,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:i,onEntryFocus:j,preventScrollOnEntryFocus:k=!1,...l}=a,m=u.useRef(null),n=B(b,m),o=fO(f),[p,q]=a6({prop:g,defaultProp:h??null,onChange:i,caller:fR}),[r,s]=u.useState(!1),v=bc(j),w=fT(c),x=u.useRef(!1),[y,z]=u.useState(0);return u.useEffect(()=>{let a=m.current;if(a)return a.addEventListener(fP,v),()=>a.removeEventListener(fP,v)},[v]),(0,t.jsx)(fX,{scope:c,orientation:d,dir:o,loop:e,currentTabStopId:p,onItemFocus:u.useCallback(a=>q(a),[q]),onItemShiftTab:u.useCallback(()=>s(!0),[]),onFocusableItemAdd:u.useCallback(()=>z(a=>a+1),[]),onFocusableItemRemove:u.useCallback(()=>z(a=>a-1),[]),children:(0,t.jsx)(ba.div,{tabIndex:r||0===y?-1:0,"data-orientation":d,...l,ref:n,style:{outline:"none",...a.style},onMouseDown:a$(a.onMouseDown,()=>{x.current=!0}),onFocus:a$(a.onFocus,a=>{let b=!x.current;if(a.target===a.currentTarget&&b&&!r){let b=new CustomEvent(fP,fQ);if(a.currentTarget.dispatchEvent(b),!b.defaultPrevented){let a=w().filter(a=>a.focusable);f2([a.find(a=>a.active),a.find(a=>a.id===p),...a].filter(Boolean).map(a=>a.ref.current),k)}}x.current=!1}),onBlur:a$(a.onBlur,()=>s(!1))})})}),f_="RovingFocusGroupItem",f0=u.forwardRef((a,b)=>{let{__scopeRovingFocusGroup:c,focusable:d=!0,active:e=!1,tabStopId:f,children:g,...h}=a,i=a4(),j=f||i,k=fY(f_,c),l=k.currentTabStopId===j,m=fT(c),{onFocusableItemAdd:n,onFocusableItemRemove:o,currentTabStopId:p}=k;return u.useEffect(()=>{if(d)return n(),()=>o()},[d,n,o]),(0,t.jsx)(fS.ItemSlot,{scope:c,id:j,focusable:d,active:e,children:(0,t.jsx)(ba.span,{tabIndex:l?0:-1,"data-orientation":k.orientation,...h,ref:b,onMouseDown:a$(a.onMouseDown,a=>{d?k.onItemFocus(j):a.preventDefault()}),onFocus:a$(a.onFocus,()=>k.onItemFocus(j)),onKeyDown:a$(a.onKeyDown,a=>{if("Tab"===a.key&&a.shiftKey)return void k.onItemShiftTab();if(a.target!==a.currentTarget)return;let b=function(a,b,c){var d;let e=(d=a.key,"rtl"!==c?d:"ArrowLeft"===d?"ArrowRight":"ArrowRight"===d?"ArrowLeft":d);if(!("vertical"===b&&["ArrowLeft","ArrowRight"].includes(e))&&!("horizontal"===b&&["ArrowUp","ArrowDown"].includes(e)))return f1[e]}(a,k.orientation,k.dir);if(void 0!==b){if(a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;a.preventDefault();let e=m().filter(a=>a.focusable).map(a=>a.ref.current);if("last"===b)e.reverse();else if("prev"===b||"next"===b){var c,d;"prev"===b&&e.reverse();let f=e.indexOf(a.currentTarget);e=k.loop?(c=e,d=f+1,c.map((a,b)=>c[(d+b)%c.length])):e.slice(f+1)}setTimeout(()=>f2(e))}}),children:"function"==typeof g?g({isCurrentTabStop:l,hasTabStop:null!=p}):g})})});f0.displayName=f_;var f1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f2(a,b=!1){let c=document.activeElement;for(let d of a)if(d===c||(d.focus({preventScroll:b}),document.activeElement!==c))return}a.s(["Item",0,f0,"Root",0,fZ,"createRovingFocusGroupScope",0,fW],24050);var f3="Tabs",[f4,f5]=a0(f3,[fW]),f6=fW(),[f7,f8]=f4(f3),f9=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,onValueChange:e,defaultValue:f,orientation:g="horizontal",dir:h,activationMode:i="automatic",...j}=a,k=fO(h),[l,m]=a6({prop:d,onChange:e,defaultProp:f??"",caller:f3});return(0,t.jsx)(f7,{scope:c,baseId:a4(),value:l,onValueChange:m,orientation:g,dir:k,activationMode:i,children:(0,t.jsx)(ba.div,{dir:k,"data-orientation":g,...j,ref:b})})});f9.displayName=f3;var ga="TabsList",gb=u.forwardRef((a,b)=>{let{__scopeTabs:c,loop:d=!0,...e}=a,f=f8(ga,c),g=f6(c);return(0,t.jsx)(fZ,{asChild:!0,...g,orientation:f.orientation,dir:f.dir,loop:d,children:(0,t.jsx)(ba.div,{role:"tablist","aria-orientation":f.orientation,...e,ref:b})})});gb.displayName=ga;var gc="TabsTrigger",gd=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,disabled:e=!1,...f}=a,g=f8(gc,c),h=f6(c),i=gg(g.baseId,d),j=gh(g.baseId,d),k=d===g.value;return(0,t.jsx)(f0,{asChild:!0,...h,focusable:!e,active:k,children:(0,t.jsx)(ba.button,{type:"button",role:"tab","aria-selected":k,"aria-controls":j,"data-state":k?"active":"inactive","data-disabled":e?"":void 0,disabled:e,id:i,...f,ref:b,onMouseDown:a$(a.onMouseDown,a=>{e||0!==a.button||!1!==a.ctrlKey?a.preventDefault():g.onValueChange(d)}),onKeyDown:a$(a.onKeyDown,a=>{[" ","Enter"].includes(a.key)&&g.onValueChange(d)}),onFocus:a$(a.onFocus,()=>{let a="manual"!==g.activationMode;k||e||!a||g.onValueChange(d)})})})});gd.displayName=gc;var ge="TabsContent",gf=u.forwardRef((a,b)=>{let{__scopeTabs:c,value:d,forceMount:e,children:f,...g}=a,h=f8(ge,c),i=gg(h.baseId,d),j=gh(h.baseId,d),k=d===h.value,l=u.useRef(k);return u.useEffect(()=>{let a=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(a)},[]),(0,t.jsx)(bs,{present:e||k,children:({present:c})=>(0,t.jsx)(ba.div,{"data-state":k?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":i,hidden:!c,id:j,tabIndex:0,...g,ref:b,style:{...a.style,animationDuration:l.current?"0s":void 0},children:c&&f})})});function gg(a,b){return`${a}-trigger-${b}`}function gh(a,b){return`${a}-content-${b}`}gf.displayName=ge;let gi=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gb,{ref:c,className:aS("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",a),...b}));gi.displayName=gb.displayName;let gj=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gd,{ref:c,className:aS("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",a),...b}));gj.displayName=gd.displayName;let gk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(gf,{ref:c,className:aS("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...b}));function gl(a,[b,c]){return Math.min(c,Math.max(b,a))}gk.displayName=gf.displayName,a.s(["Tabs",0,f9,"TabsContent",0,gk,"TabsList",0,gi,"TabsTrigger",0,gj],20218),a.s(["clamp",0,gl],30656);var gm=Symbol("radix.slottable");function gn(a){return u.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===gm}var go=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"}),gp=u.forwardRef((a,b)=>(0,t.jsx)(ba.span,{...a,ref:b,style:{...go,...a.style}}));gp.displayName="VisuallyHidden",a.s(["VISUALLY_HIDDEN_STYLES",0,go,"VisuallyHidden",0,gp],28094);var gq=[" ","Enter","ArrowUp","ArrowDown"],gr=[" ","Enter"],gs="Select",[gt,gu,gv]=fJ(gs),[gw,gx]=a0(gs,[gv,ex]),gy=ex(),[gz,gA]=gw(gs),[gB,gC]=gw(gs),gD=a=>{let{__scopeSelect:b,children:c,open:d,defaultOpen:e,onOpenChange:f,value:g,defaultValue:h,onValueChange:i,dir:j,name:k,autoComplete:l,disabled:m,required:n,form:o}=a,p=gy(b),[q,r]=u.useState(null),[s,v]=u.useState(null),[w,x]=u.useState(!1),y=fO(j),[z,A]=a6({prop:d,defaultProp:e??!1,onChange:f,caller:gs}),[B,C]=a6({prop:g,defaultProp:h,onChange:i,caller:gs}),D=u.useRef(null),E=!q||o||!!q.closest("form"),[F,G]=u.useState(new Set),H=Array.from(F).map(a=>a.props.value).join(";");return(0,t.jsx)(eA,{...p,children:(0,t.jsxs)(gz,{required:n,scope:b,trigger:q,onTriggerChange:r,valueNode:s,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:a4(),value:B,onValueChange:C,open:z,onOpenChange:A,dir:y,triggerPointerDownPosRef:D,disabled:m,children:[(0,t.jsx)(gt.Provider,{scope:b,children:(0,t.jsx)(gB,{scope:a.__scopeSelect,onNativeOptionAdd:u.useCallback(a=>{G(b=>new Set(b).add(a))},[]),onNativeOptionRemove:u.useCallback(a=>{G(b=>{let c=new Set(b);return c.delete(a),c})},[]),children:c})}),E?(0,t.jsxs)(he,{"aria-hidden":!0,required:n,tabIndex:-1,name:k,autoComplete:l,value:B,onChange:a=>C(a.target.value),disabled:m,form:o,children:[void 0===B?(0,t.jsx)("option",{value:""}):null,Array.from(F)]},H):null]})})};gD.displayName=gs;var gE="SelectTrigger",gF=u.forwardRef((a,b)=>{let{__scopeSelect:c,disabled:d=!1,...e}=a,f=gy(c),g=gA(gE,c),h=g.disabled||d,i=B(b,g.onTriggerChange),j=gu(c),k=u.useRef("touch"),[l,m,n]=hg(a=>{let b=j().filter(a=>!a.disabled),c=b.find(a=>a.value===g.value),d=hh(b,a,c);void 0!==d&&g.onValueChange(d.value)}),o=a=>{h||(g.onOpenChange(!0),n()),a&&(g.triggerPointerDownPosRef.current={x:Math.round(a.pageX),y:Math.round(a.pageY)})};return(0,t.jsx)(eC,{asChild:!0,...f,children:(0,t.jsx)(ba.button,{type:"button",role:"combobox","aria-controls":g.contentId,"aria-expanded":g.open,"aria-required":g.required,"aria-autocomplete":"none",dir:g.dir,"data-state":g.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":hf(g.value)?"":void 0,...e,ref:i,onClick:a$(e.onClick,a=>{a.currentTarget.focus(),"mouse"!==k.current&&o(a)}),onPointerDown:a$(e.onPointerDown,a=>{k.current=a.pointerType;let b=a.target;b.hasPointerCapture(a.pointerId)&&b.releasePointerCapture(a.pointerId),0===a.button&&!1===a.ctrlKey&&"mouse"===a.pointerType&&(o(a),a.preventDefault())}),onKeyDown:a$(e.onKeyDown,a=>{let b=""!==l.current;a.ctrlKey||a.altKey||a.metaKey||1!==a.key.length||m(a.key),(!b||" "!==a.key)&&gq.includes(a.key)&&(o(),a.preventDefault())})})})});gF.displayName=gE;var gG="SelectValue",gH=u.forwardRef((a,b)=>{let{__scopeSelect:c,className:d,style:e,children:f,placeholder:g="",...h}=a,i=gA(gG,c),{onValueNodeHasChildrenChange:j}=i,k=void 0!==f,l=B(b,i.onValueNodeChange);return a1(()=>{j(k)},[j,k]),(0,t.jsx)(ba.span,{...h,ref:l,style:{pointerEvents:"none"},children:hf(i.value)?(0,t.jsx)(t.Fragment,{children:g}):f})});gH.displayName=gG;var gI=u.forwardRef((a,b)=>{let{__scopeSelect:c,children:d,...e}=a;return(0,t.jsx)(ba.span,{"aria-hidden":!0,...e,ref:b,children:d||"▼"})});gI.displayName="SelectIcon";var gJ=a=>(0,t.jsx)(br,{asChild:!0,...a});gJ.displayName="SelectPortal";var gK="SelectContent",gL=u.forwardRef((a,b)=>{let c=gA(gK,a.__scopeSelect),[d,e]=u.useState();return(a1(()=>{e(new DocumentFragment)},[]),c.open)?(0,t.jsx)(gP,{...a,ref:b}):d?a7.createPortal((0,t.jsx)(gM,{scope:a.__scopeSelect,children:(0,t.jsx)(gt.Slot,{scope:a.__scopeSelect,children:(0,t.jsx)("div",{children:a.children})})}),d):null});gL.displayName=gK;var[gM,gN]=gw(gK),gO=((k=u.forwardRef((a,b)=>{let{children:c,...d}=a;if(u.isValidElement(c)){var e;let a,f,g=(e=c,(f=(a=Object.getOwnPropertyDescriptor(e.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.ref:(f=(a=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?e.props.ref:e.props.ref||e.ref),h=function(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}(d,c.props);return c.type!==u.Fragment&&(h.ref=b?A(b,g):g),u.cloneElement(c,h)}return u.Children.count(c)>1?u.Children.only(null):null})).displayName="SelectContent.RemoveScroll.SlotClone",f=k,(g=u.forwardRef((a,b)=>{let{children:c,...d}=a,e=u.Children.toArray(c),g=e.find(gn);if(g){let a=g.props.children,c=e.map(b=>b!==g?b:u.Children.count(a)>1?u.Children.only(null):u.isValidElement(a)?a.props.children:null);return(0,t.jsx)(f,{...d,ref:b,children:u.isValidElement(a)?u.cloneElement(a,void 0,c):null})}return(0,t.jsx)(f,{...d,ref:b,children:c})})).displayName="SelectContent.RemoveScroll.Slot",g),gP=u.forwardRef((a,b)=>{let{__scopeSelect:c,position:d="item-aligned",onCloseAutoFocus:e,onEscapeKeyDown:f,onPointerDownOutside:g,side:h,sideOffset:i,align:j,alignOffset:k,arrowPadding:l,collisionBoundary:m,collisionPadding:n,sticky:o,hideWhenDetached:p,avoidCollisions:q,...r}=a,s=gA(gK,c),[v,w]=u.useState(null),[x,y]=u.useState(null),z=B(b,a=>w(a)),[A,C]=u.useState(null),[D,E]=u.useState(null),F=gu(c),[G,H]=u.useState(!1),I=u.useRef(!1);u.useEffect(()=>{if(v)return b8(v)},[v]),bv();let J=u.useCallback(a=>{let[b,...c]=F().map(a=>a.ref.current),[d]=c.slice(-1),e=document.activeElement;for(let c of a)if(c===e||(c?.scrollIntoView({block:"nearest"}),c===b&&x&&(x.scrollTop=0),c===d&&x&&(x.scrollTop=x.scrollHeight),c?.focus(),document.activeElement!==e))return},[F,x]),K=u.useCallback(()=>J([A,v]),[J,A,v]);u.useEffect(()=>{G&&K()},[G,K]);let{onOpenChange:L,triggerPointerDownPosRef:M}=s;u.useEffect(()=>{if(v){let a={x:0,y:0},b=b=>{a={x:Math.abs(Math.round(b.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(M.current?.y??0))}},c=c=>{a.x<=10&&a.y<=10?c.preventDefault():v.contains(c.target)||L(!1),document.removeEventListener("pointermove",b),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",b),document.addEventListener("pointerup",c,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",c,{capture:!0})}}},[v,L,M]),u.useEffect(()=>{let a=()=>L(!1);return window.addEventListener("blur",a),window.addEventListener("resize",a),()=>{window.removeEventListener("blur",a),window.removeEventListener("resize",a)}},[L]);let[N,O]=hg(a=>{let b=F().filter(a=>!a.disabled),c=b.find(a=>a.ref.current===document.activeElement),d=hh(b,a,c);d&&setTimeout(()=>d.ref.current.focus())}),P=u.useCallback((a,b,c)=>{let d=!I.current&&!c;(void 0!==s.value&&s.value===b||d)&&(C(a),d&&(I.current=!0))},[s.value]),Q=u.useCallback(()=>v?.focus(),[v]),R=u.useCallback((a,b,c)=>{let d=!I.current&&!c;(void 0!==s.value&&s.value===b||d)&&E(a)},[s.value]),S="popper"===d?gR:gQ,T=S===gR?{side:h,sideOffset:i,align:j,alignOffset:k,arrowPadding:l,collisionBoundary:m,collisionPadding:n,sticky:o,hideWhenDetached:p,avoidCollisions:q}:{};return(0,t.jsx)(gM,{scope:c,content:v,viewport:x,onViewportChange:y,itemRefCallback:P,selectedItem:A,onItemLeave:Q,itemTextRefCallback:R,focusSelectedItem:K,selectedItemText:D,position:d,isPositioned:G,searchRef:N,children:(0,t.jsx)(b1,{as:gO,allowPinchZoom:!0,children:(0,t.jsx)(bl,{asChild:!0,trapped:s.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a$(e,a=>{s.trigger?.focus({preventScroll:!0}),a.preventDefault()}),children:(0,t.jsx)(bf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:g,onFocusOutside:a=>a.preventDefault(),onDismiss:()=>s.onOpenChange(!1),children:(0,t.jsx)(S,{role:"listbox",id:s.contentId,"data-state":s.open?"open":"closed",dir:s.dir,onContextMenu:a=>a.preventDefault(),...r,...T,onPlaced:()=>H(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...r.style},onKeyDown:a$(r.onKeyDown,a=>{let b=a.ctrlKey||a.altKey||a.metaKey;if("Tab"===a.key&&a.preventDefault(),b||1!==a.key.length||O(a.key),["ArrowUp","ArrowDown","Home","End"].includes(a.key)){let b=F().filter(a=>!a.disabled).map(a=>a.ref.current);if(["ArrowUp","End"].includes(a.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(a.key)){let c=a.target,d=b.indexOf(c);b=b.slice(d+1)}setTimeout(()=>J(b)),a.preventDefault()}})})})})})})});gP.displayName="SelectContentImpl";var gQ=u.forwardRef((a,b)=>{let{__scopeSelect:c,onPlaced:d,...e}=a,f=gA(gK,c),g=gN(gK,c),[h,i]=u.useState(null),[j,k]=u.useState(null),l=B(b,a=>k(a)),m=gu(c),n=u.useRef(!1),o=u.useRef(!0),{viewport:p,selectedItem:q,selectedItemText:r,focusSelectedItem:s}=g,v=u.useCallback(()=>{if(f.trigger&&f.valueNode&&h&&j&&p&&q&&r){let a=f.trigger.getBoundingClientRect(),b=j.getBoundingClientRect(),c=f.valueNode.getBoundingClientRect(),e=r.getBoundingClientRect();if("rtl"!==f.dir){let d=e.left-b.left,f=c.left-d,g=a.left-f,i=a.width+g,j=Math.max(i,b.width),k=gl(f,[10,Math.max(10,window.innerWidth-10-j)]);h.style.minWidth=i+"px",h.style.left=k+"px"}else{let d=b.right-e.right,f=window.innerWidth-c.right-d,g=window.innerWidth-a.right-f,i=a.width+g,j=Math.max(i,b.width),k=gl(f,[10,Math.max(10,window.innerWidth-10-j)]);h.style.minWidth=i+"px",h.style.right=k+"px"}let g=m(),i=window.innerHeight-20,k=p.scrollHeight,l=window.getComputedStyle(j),o=parseInt(l.borderTopWidth,10),s=parseInt(l.paddingTop,10),t=parseInt(l.borderBottomWidth,10),u=o+s+k+parseInt(l.paddingBottom,10)+t,v=Math.min(5*q.offsetHeight,u),w=window.getComputedStyle(p),x=parseInt(w.paddingTop,10),y=parseInt(w.paddingBottom,10),z=a.top+a.height/2-10,A=q.offsetHeight/2,B=o+s+(q.offsetTop+A);if(B<=z){let a=g.length>0&&q===g[g.length-1].ref.current;h.style.bottom="0px";let b=Math.max(i-z,A+(a?y:0)+(j.clientHeight-p.offsetTop-p.offsetHeight)+t);h.style.height=B+b+"px"}else{let a=g.length>0&&q===g[0].ref.current;h.style.top="0px";let b=Math.max(z,o+p.offsetTop+(a?x:0)+A);h.style.height=b+(u-B)+"px",p.scrollTop=B-z+p.offsetTop}h.style.margin="10px 0",h.style.minHeight=v+"px",h.style.maxHeight=i+"px",d?.(),requestAnimationFrame(()=>n.current=!0)}},[m,f.trigger,f.valueNode,h,j,p,q,r,f.dir,d]);a1(()=>v(),[v]);let[w,x]=u.useState();a1(()=>{j&&x(window.getComputedStyle(j).zIndex)},[j]);let y=u.useCallback(a=>{a&&!0===o.current&&(v(),s?.(),o.current=!1)},[v,s]);return(0,t.jsx)(gS,{scope:c,contentWrapper:h,shouldExpandOnScrollRef:n,onScrollButtonChange:y,children:(0,t.jsx)("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,t.jsx)(ba.div,{...e,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...e.style}})})})});gQ.displayName="SelectItemAlignedPosition";var gR=u.forwardRef((a,b)=>{let{__scopeSelect:c,align:d="start",collisionPadding:e=10,...f}=a,g=gy(c);return(0,t.jsx)(eG,{...g,...f,ref:b,align:d,collisionPadding:e,style:{boxSizing:"border-box",...f.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)"}})});gR.displayName="SelectPopperPosition";var[gS,gT]=gw(gK,{}),gU="SelectViewport",gV=u.forwardRef((a,b)=>{let{__scopeSelect:c,nonce:d,...e}=a,f=gN(gU,c),g=gT(gU,c),h=B(b,f.onViewportChange),i=u.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.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:d}),(0,t.jsx)(gt.Slot,{scope:c,children:(0,t.jsx)(ba.div,{"data-radix-select-viewport":"",role:"presentation",...e,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...e.style},onScroll:a$(e.onScroll,a=>{let b=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=g;if(d?.current&&c){let a=Math.abs(i.current-b.scrollTop);if(a>0){let d=window.innerHeight-20,e=Math.max(parseFloat(c.style.minHeight),parseFloat(c.style.height));if(e<d){let f=e+a,g=Math.min(d,f),h=f-g;c.style.height=g+"px","0px"===c.style.bottom&&(b.scrollTop=h>0?h:0,c.style.justifyContent="flex-end")}}}i.current=b.scrollTop})})})]})});gV.displayName=gU;var gW="SelectGroup",[gX,gY]=gw(gW);u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=a4();return(0,t.jsx)(gX,{scope:c,id:e,children:(0,t.jsx)(ba.div,{role:"group","aria-labelledby":e,...d,ref:b})})}).displayName=gW;var gZ="SelectLabel",g$=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=gY(gZ,c);return(0,t.jsx)(ba.div,{id:e.id,...d,ref:b})});g$.displayName=gZ;var g_="SelectItem",[g0,g1]=gw(g_),g2=u.forwardRef((a,b)=>{let{__scopeSelect:c,value:d,disabled:e=!1,textValue:f,...g}=a,h=gA(g_,c),i=gN(g_,c),j=h.value===d,[k,l]=u.useState(f??""),[m,n]=u.useState(!1),o=B(b,a=>i.itemRefCallback?.(a,d,e)),p=a4(),q=u.useRef("touch"),r=()=>{e||(h.onValueChange(d),h.onOpenChange(!1))};if(""===d)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,t.jsx)(g0,{scope:c,value:d,disabled:e,textId:p,isSelected:j,onItemTextChange:u.useCallback(a=>{l(b=>b||(a?.textContent??"").trim())},[]),children:(0,t.jsx)(gt.ItemSlot,{scope:c,value:d,disabled:e,textValue:k,children:(0,t.jsx)(ba.div,{role:"option","aria-labelledby":p,"data-highlighted":m?"":void 0,"aria-selected":j&&m,"data-state":j?"checked":"unchecked","aria-disabled":e||void 0,"data-disabled":e?"":void 0,tabIndex:e?void 0:-1,...g,ref:o,onFocus:a$(g.onFocus,()=>n(!0)),onBlur:a$(g.onBlur,()=>n(!1)),onClick:a$(g.onClick,()=>{"mouse"!==q.current&&r()}),onPointerUp:a$(g.onPointerUp,()=>{"mouse"===q.current&&r()}),onPointerDown:a$(g.onPointerDown,a=>{q.current=a.pointerType}),onPointerMove:a$(g.onPointerMove,a=>{q.current=a.pointerType,e?i.onItemLeave?.():"mouse"===q.current&&a.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a$(g.onPointerLeave,a=>{a.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:a$(g.onKeyDown,a=>{(i.searchRef?.current===""||" "!==a.key)&&(gr.includes(a.key)&&r()," "===a.key&&a.preventDefault())})})})})});g2.displayName=g_;var g3="SelectItemText",g4=u.forwardRef((a,b)=>{let{__scopeSelect:c,className:d,style:e,...f}=a,g=gA(g3,c),h=gN(g3,c),i=g1(g3,c),j=gC(g3,c),[k,l]=u.useState(null),m=B(b,a=>l(a),i.onItemTextChange,a=>h.itemTextRefCallback?.(a,i.value,i.disabled)),n=k?.textContent,o=u.useMemo(()=>(0,t.jsx)("option",{value:i.value,disabled:i.disabled,children:n},i.value),[i.disabled,i.value,n]),{onNativeOptionAdd:p,onNativeOptionRemove:q}=j;return a1(()=>(p(o),()=>q(o)),[p,q,o]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ba.span,{id:i.textId,...f,ref:m}),i.isSelected&&g.valueNode&&!g.valueNodeHasChildren?a7.createPortal(f.children,g.valueNode):null]})});g4.displayName=g3;var g5="SelectItemIndicator",g6=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a;return g1(g5,c).isSelected?(0,t.jsx)(ba.span,{"aria-hidden":!0,...d,ref:b}):null});g6.displayName=g5;var g7="SelectScrollUpButton",g8=u.forwardRef((a,b)=>{let c=gN(g7,a.__scopeSelect),d=gT(g7,a.__scopeSelect),[e,f]=u.useState(!1),g=B(b,d.onScrollButtonChange);return a1(()=>{if(c.viewport&&c.isPositioned){let a=function(){f(b.scrollTop>0)},b=c.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[c.viewport,c.isPositioned]),e?(0,t.jsx)(hb,{...a,ref:g,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=c;a&&b&&(a.scrollTop=a.scrollTop-b.offsetHeight)}}):null});g8.displayName=g7;var g9="SelectScrollDownButton",ha=u.forwardRef((a,b)=>{let c=gN(g9,a.__scopeSelect),d=gT(g9,a.__scopeSelect),[e,f]=u.useState(!1),g=B(b,d.onScrollButtonChange);return a1(()=>{if(c.viewport&&c.isPositioned){let a=function(){let a=b.scrollHeight-b.clientHeight;f(Math.ceil(b.scrollTop)<a)},b=c.viewport;return a(),b.addEventListener("scroll",a),()=>b.removeEventListener("scroll",a)}},[c.viewport,c.isPositioned]),e?(0,t.jsx)(hb,{...a,ref:g,onAutoScroll:()=>{let{viewport:a,selectedItem:b}=c;a&&b&&(a.scrollTop=a.scrollTop+b.offsetHeight)}}):null});ha.displayName=g9;var hb=u.forwardRef((a,b)=>{let{__scopeSelect:c,onAutoScroll:d,...e}=a,f=gN("SelectScrollButton",c),g=u.useRef(null),h=gu(c),i=u.useCallback(()=>{null!==g.current&&(window.clearInterval(g.current),g.current=null)},[]);return u.useEffect(()=>()=>i(),[i]),a1(()=>{let a=h().find(a=>a.ref.current===document.activeElement);a?.ref.current?.scrollIntoView({block:"nearest"})},[h]),(0,t.jsx)(ba.div,{"aria-hidden":!0,...e,ref:b,style:{flexShrink:0,...e.style},onPointerDown:a$(e.onPointerDown,()=>{null===g.current&&(g.current=window.setInterval(d,50))}),onPointerMove:a$(e.onPointerMove,()=>{f.onItemLeave?.(),null===g.current&&(g.current=window.setInterval(d,50))}),onPointerLeave:a$(e.onPointerLeave,()=>{i()})})}),hc=u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a;return(0,t.jsx)(ba.div,{"aria-hidden":!0,...d,ref:b})});hc.displayName="SelectSeparator";var hd="SelectArrow";u.forwardRef((a,b)=>{let{__scopeSelect:c,...d}=a,e=gy(c),f=gA(hd,c),g=gN(hd,c);return f.open&&"popper"===g.position?(0,t.jsx)(eJ,{...e,...d,ref:b}):null}).displayName=hd;var he=u.forwardRef(({__scopeSelect:a,value:b,...c},d)=>{let e=u.useRef(null),f=B(d,e),g=fp(b);return u.useEffect(()=>{let a=e.current;if(!a)return;let c=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(g!==b&&c){let d=new Event("change",{bubbles:!0});c.call(a,b),a.dispatchEvent(d)}},[g,b]),(0,t.jsx)(ba.select,{...c,style:{...go,...c.style},ref:f,defaultValue:b})});function hf(a){return""===a||void 0===a}function hg(a){let b=bc(a),c=u.useRef(""),d=u.useRef(0),e=u.useCallback(a=>{let e=c.current+a;b(e),function a(b){c.current=b,window.clearTimeout(d.current),""!==b&&(d.current=window.setTimeout(()=>a(""),1e3))}(e)},[b]),f=u.useCallback(()=>{c.current="",window.clearTimeout(d.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(d.current),[]),[c,e,f]}function hh(a,b,c){var d,e;let f=b.length>1&&Array.from(b).every(a=>a===b[0])?b[0]:b,g=c?a.indexOf(c):-1,h=(d=a,e=Math.max(g,0),d.map((a,b)=>d[(e+b)%d.length]));1===f.length&&(h=h.filter(a=>a!==c));let i=h.find(a=>a.textValue.toLowerCase().startsWith(f.toLowerCase()));return i!==c?i:void 0}he.displayName="SelectBubbleInput";let hi=(0,c6.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),hj=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(gF,{ref:d,className:aS("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[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",a),...c,children:[b,(0,t.jsx)(gI,{asChild:!0,children:(0,t.jsx)(fk,{className:"h-4 w-4 opacity-50"})})]}));hj.displayName=gF.displayName;let hk=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(g8,{ref:c,className:aS("flex cursor-default items-center justify-center py-1",a),...b,children:(0,t.jsx)(hi,{className:"h-4 w-4"})}));hk.displayName=g8.displayName;let hl=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(ha,{ref:c,className:aS("flex cursor-default items-center justify-center py-1",a),...b,children:(0,t.jsx)(fk,{className:"h-4 w-4"})}));hl.displayName=ha.displayName;let hm=u.forwardRef(({className:a,children:b,position:c="popper",...d},e)=>(0,t.jsx)(gJ,{children:(0,t.jsxs)(gL,{ref:e,className:aS("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]","popper"===c&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:c,...d,children:[(0,t.jsx)(hk,{}),(0,t.jsx)(gV,{className:aS("p-1","popper"===c&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:b}),(0,t.jsx)(hl,{})]})}));hm.displayName=gL.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(g$,{ref:c,className:aS("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...b})).displayName=g$.displayName;let hn=u.forwardRef(({className:a,children:b,...c},d)=>(0,t.jsxs)(g2,{ref:d,className:aS("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",a),...c,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(g6,{children:(0,t.jsx)(fb,{className:"h-4 w-4"})})}),(0,t.jsx)(g4,{children:b})]}));hn.displayName=g2.displayName,u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(hc,{ref:c,className:aS("-mx-1 my-1 h-px bg-muted",a),...b})).displayName=hc.displayName,a.s(["Select",0,gD,"SelectContent",0,hm,"SelectItem",0,hn,"SelectTrigger",0,hj,"SelectValue",0,gH],99295);var ho="Switch",[hp,hq]=a0(ho),[hr,hs]=hp(ho),ht=u.forwardRef((a,b)=>{let{__scopeSwitch:c,name:d,checked:e,defaultChecked:f,required:g,disabled:h,value:i="on",onCheckedChange:j,form:k,...l}=a,[m,n]=u.useState(null),o=B(b,a=>n(a)),p=u.useRef(!1),q=!m||k||!!m.closest("form"),[r,s]=a6({prop:e,defaultProp:f??!1,onChange:j,caller:ho});return(0,t.jsxs)(hr,{scope:c,checked:r,disabled:h,children:[(0,t.jsx)(ba.button,{type:"button",role:"switch","aria-checked":r,"aria-required":g,"data-state":hx(r),"data-disabled":h?"":void 0,disabled:h,value:i,...l,ref:o,onClick:a$(a.onClick,a=>{s(a=>!a),q&&(p.current=a.isPropagationStopped(),p.current||a.stopPropagation())})}),q&&(0,t.jsx)(hw,{control:m,bubbles:!p.current,name:d,value:i,checked:r,required:g,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});ht.displayName=ho;var hu="SwitchThumb",hv=u.forwardRef((a,b)=>{let{__scopeSwitch:c,...d}=a,e=hs(hu,c);return(0,t.jsx)(ba.span,{"data-state":hx(e.checked),"data-disabled":e.disabled?"":void 0,...d,ref:b})});hv.displayName=hu;var hw=u.forwardRef(({__scopeSwitch:a,control:b,checked:c,bubbles:d=!0,...e},f)=>{let g=u.useRef(null),h=B(g,f),i=fp(c),j=eu(b);return u.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(i!==c&&b){let e=new Event("click",{bubbles:d});b.call(a,c),a.dispatchEvent(e)}},[i,c,d]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...e,tabIndex:-1,ref:h,style:{...e.style,...j,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function hx(a){return a?"checked":"unchecked"}hw.displayName="SwitchBubbleInput";let hy=u.forwardRef(({className:a,...b},c)=>(0,t.jsx)(ht,{className:aS("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...b,ref:c,children:(0,t.jsx)(hv,{className:aS("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));function hz(){let a,b,c=(0,v.useRouter)(),d=(0,v.useSearchParams)(),{currentBank:e,setCurrentBank:f,banks:g,loadBanks:h}=(0,w.useBank)(),{theme:i,toggleTheme:j}=(0,fm.useTheme)(),[k,l]=u.useState(!1),[m,n]=u.useState(!1),[o,p]=u.useState(""),[q,r]=u.useState(!1),[s,z]=u.useState(null),[A,B]=u.useState(!1),[C,D]=u.useState(""),[E,F]=u.useState(null),[G,H]=u.useState(!1),[I,J]=u.useState("text"),[K,L]=u.useState(""),[M,N]=u.useState(""),[O,P]=u.useState(""),[Q,R]=u.useState(""),[S,T]=u.useState(""),[U,V]=u.useState("combined"),[W,X]=u.useState(""),[Y,Z]=u.useState(""),[$,_]=u.useState(""),[aa,ab]=u.useState("document"),[ac,ad]=u.useState(!1),[ae,af]=u.useState(""),[ag,ah]=u.useState(!1),[ai,aj]=u.useState([]);u.useEffect(()=>{G&&e&&y.client.getBankConfig(e).then(a=>{let b=a.config?.retain_strategies;aj(b?Object.keys(b):[])}).catch(()=>aj([]))},[G,e]);let[ak,al]=u.useState([]),[am,an]=u.useState([]),[ao,ap]=u.useState(""),aq=u.useRef(null),[ar,as]=u.useState(null);u.useEffect(()=>{y.client.getVersion().then(a=>{as(a.features.file_upload_api)}).catch(()=>{as(!1)})},[]);let at=u.useMemo(()=>[...g].sort((a,b)=>a.localeCompare(b)),[g]),au=async()=>{if(o.trim()){r(!0),z(null),F(null);try{if(await y.client.createBank(o.trim()),C.trim()){let a;try{a=JSON.parse(C.trim())}catch{F("Invalid JSON. Please check the template syntax."),r(!1);return}try{await y.client.importBankTemplate(o.trim(),a)}catch(a){F(a instanceof Error?a.message:"Failed to import template"),r(!1);return}}await h(),n(!1),p(""),D(""),F(null),f(o.trim()),c.push((0,x.bankRoute)(o.trim(),"?view=data"))}catch(a){z(a instanceof Error?a.message:"Failed to create bank")}finally{r(!1)}}},av=a=>{let b={};for(let c of a.split("\n")){let a=c.indexOf(":");if(a>0){let d=c.slice(0,a).trim(),e=c.slice(a+1).trim();d&&(b[d]=e)}}return Object.keys(b).length>0?b:void 0},aw=(a,b,c)=>{an(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},ax=async()=>{if(e&&0!==ak.length){ah(!0),ap("");try{ap(`Uploading ${ak.length} file(s)...`);let a=am.map(a=>({...a.context&&{context:a.context},...a.timestamp&&{timestamp:a.timestamp+":00"},...a.document_id&&{document_id:a.document_id},...a.tags&&{tags:a.tags.split(",").map(a=>a.trim()).filter(Boolean)},...a.metadata&&{metadata:av(a.metadata)},...a.strategy&&{strategy:a.strategy}}));await y.client.uploadFiles({bank_id:e,files:ak,async:!0,files_metadata:a}),H(!1),al([]),an([]),T(""),ad(!1),ap(""),c.push((0,x.bankRoute)(e,"?view=documents"))}catch{}finally{ah(!1),ap("")}}},ay=async()=>{if(e&&K.trim()){ah(!0);try{let a=S.split(",").map(a=>a.trim()).filter(Boolean),b={content:K};if(M&&(b.context=M),O&&(b.timestamp=O+":00"),Q&&(b.document_id=Q),a.length>0&&(b.tags=a),"per_tag"===U)b.observation_scopes="per_tag";else if("combined"===U)b.observation_scopes="combined";else if("all_combinations"===U)b.observation_scopes="all_combinations";else if("custom"===U){let a=W.split("\n").map(a=>a.split(",").map(a=>a.trim()).filter(Boolean)).filter(a=>a.length>0);a.length>0&&(b.observation_scopes=a)}let d=av(Y);d&&(b.metadata=d);let f=(a=>{let b=a.split(",").map(a=>a.trim()).filter(Boolean);if(0!==b.length)return b.map(a=>({text:a}))})($);f&&(b.entities=f),ae&&(b.strategy=ae),await y.client.retain({bank_id:e,items:[b],async:ac}),H(!1),L(""),N(""),P(""),R(""),T(""),V("combined"),X(""),Z(""),_(""),ab("document"),ad(!1),af(""),c.push((0,x.bankRoute)(e,"?view=documents"))}catch{}finally{ah(!1)}}};return(0,t.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,t.jsx)(fn.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsxs)(eV,{open:k,onOpenChange:a=>{l(a),a&&h()},children:[(0,t.jsx)(eY,{asChild:!0,children:(0,t.jsxs)(aU,{variant:"outline",role:"combobox","aria-expanded":k,className:"w-[250px] justify-between font-bold border-2 border-primary hover:bg-accent",children:[(0,t.jsx)("span",{className:"truncate",children:e||"Select a memory bank..."}),(0,t.jsx)(fc,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(e9,{className:"w-[250px] p-0",children:(0,t.jsxs)(df,{children:[at.length>0&&(0,t.jsx)(dg,{placeholder:"Search memory banks..."}),(0,t.jsxs)(dh,{children:[(0,t.jsx)(di,{children:"No memory banks yet."}),(0,t.jsx)(dj,{children:at.map(a=>(0,t.jsxs)(dk,{value:a,onSelect:a=>{f(a),l(!1);let b=d.get("view")||"data",e=d.get("subTab"),g=e?`?view=${b}&subTab=${e}`:`?view=${b}`;c.push((0,x.bankRoute)(a,g))},children:[(0,t.jsx)(fb,{className:aS("mr-2 h-4 w-4",e===a?"opacity-100":"opacity-0")}),a]},a))})]}),(0,t.jsx)("div",{className:"border-t border-border p-1",children:(0,t.jsxs)("button",{className:"w-full flex items-center gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",onClick:()=>{l(!1),n(!0)},children:[(0,t.jsx)(fd,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Create new bank"})]})})]})})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),e&&(0,t.jsxs)(aU,{variant:"outline",size:"sm",className:"h-9 gap-1.5",onClick:()=>H(!0),title:"Add document to current bank","data-add-document":!0,children:[(0,t.jsx)(fd,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Add Document"})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:"View on GitHub",children:[(0,t.jsx)(fh,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsx)(aU,{variant:"ghost",size:"icon",onClick:j,className:"h-9 w-9",title:"light"===i?"Switch to dark mode":"Switch to light mode",children:"light"===i?(0,t.jsx)(ff,{className:"h-5 w-5"}):(0,t.jsx)(fg,{className:"h-5 w-5"})}),(0,t.jsx)(cg,{open:m,onOpenChange:n,children:(0,t.jsxs)(da,{className:"sm:max-w-[550px]",children:[(0,t.jsx)(db,{children:(0,t.jsx)(dd,{children:"Create New Memory Bank"})}),(0,t.jsxs)("div",{className:"py-4 space-y-4",children:[(0,t.jsx)(fa,{placeholder:"Enter bank ID...",value:o,onChange:a=>p(a.target.value),onKeyDown:a=>{"Enter"!==a.key||q||A||au()},autoFocus:!0}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(hy,{checked:A,onCheckedChange:a=>{B(a),a||(D(""),F(null))}}),(0,t.jsx)("label",{className:"text-sm font-medium",children:"Import from template"})]}),A&&(0,t.jsx)("a",{href:"https://hindsight.vectorize.io/templates",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Browse templates →"})]}),A&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:"Paste a template manifest JSON to pre-configure the bank with settings, mental models, and directives."}),(0,t.jsx)(fo,{placeholder:'{"version": "1", "bank": {...}, "mental_models": [...]}',value:C,onChange:a=>{D(a.target.value),F(null)},className:"font-mono text-xs min-h-[120px]"})]}),E&&(0,t.jsx)("p",{className:"text-sm text-destructive whitespace-pre-wrap",children:E}),s&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:s})]}),(0,t.jsxs)(dc,{children:[(0,t.jsx)(aU,{variant:"secondary",onClick:()=>{n(!1),p(""),B(!1),D(""),z(null),F(null)},children:"Cancel"}),(0,t.jsx)(aU,{onClick:au,disabled:q||!o.trim(),children:q?"Creating...":"Create"})]})]})}),(0,t.jsx)(cg,{open:G,onOpenChange:H,children:(0,t.jsxs)(da,{className:"sm:max-w-[750px] max-h-[90vh] flex flex-col",children:[(0,t.jsxs)(db,{children:[(0,t.jsx)(dd,{children:"Add New Document"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Add a new document to memory bank:"," ",(0,t.jsx)("span",{className:"font-semibold",children:e})]})]}),(0,t.jsxs)("div",{className:"space-y-4 overflow-y-auto flex-1 px-1 -mx-1",children:[(0,t.jsxs)(f9,{value:I,onValueChange:a=>J(a),children:[(0,t.jsxs)(gi,{className:"grid w-full grid-cols-2",children:[(0,t.jsxs)(gj,{value:"text",className:"flex items-center gap-2",children:[(0,t.jsx)(fe,{className:"h-4 w-4"}),"Text"]}),(0,t.jsxs)(gj,{value:"upload",className:"flex items-center gap-2",disabled:!1===ar,children:[!1===ar?(0,t.jsx)(fj,{className:"h-4 w-4"}):(0,t.jsx)(fi,{className:"h-4 w-4"}),"Upload Files"]})]}),(0,t.jsxs)(gk,{value:"text",className:"mt-3",children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Content *"}),(0,t.jsx)(fo,{value:K,onChange:a=>L(a.target.value),placeholder:"Enter the document content...",className:"min-h-[150px] resize-y",autoFocus:!0})]}),(0,t.jsx)(gk,{value:"upload",className:"mt-3",children:!1===ar?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center space-y-3",children:[(0,t.jsx)(fj,{className:"h-12 w-12 text-muted-foreground/50"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-semibold text-foreground",children:"File Upload API Disabled"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"File upload is not enabled on this server."}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["To enable, set"," ",(0,t.jsx)("code",{className:"bg-muted px-1 py-0.5 rounded",children:"HINDSIGHT_API_ENABLE_FILE_UPLOAD_API=true"})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:aq,type:"file",multiple:!0,onChange:a=>{let b=Array.from(a.target.files||[]);al(a=>[...a,...b]),an(a=>[...a,...b.map(a=>((a="")=>({context:"",timestamp:"",document_id:a,tags:"",metadata:"",strategy:"",advancedTab:"document",expanded:!1}))(a.name))]),aq.current&&(aq.current.value="")},className:"hidden",id:"file-upload"}),(0,t.jsxs)("label",{htmlFor:"file-upload",className:"flex flex-col items-center justify-center w-full h-32 border-2 border-dashed border-muted-foreground/25 rounded-lg cursor-pointer hover:border-primary/50 hover:bg-accent/50 transition-colors",children:[(0,t.jsx)(fi,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Click to select files or drag and drop"})]}),ak.length>0&&(0,t.jsx)("div",{className:"mt-3 space-y-1",children:ak.map((a,b)=>{let c=am[b],d=c&&(c.context||c.timestamp||c.document_id||c.tags||c.metadata);return(0,t.jsxs)("div",{className:"bg-muted rounded-md overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 px-2 py-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1.5 min-w-0 flex-1 text-left hover:opacity-75 transition-opacity",onClick:()=>{an(a=>a.map((a,c)=>c===b?{...a,expanded:!a.expanded}:a))},title:"Edit metadata for this file",children:[c?.expanded?(0,t.jsx)(fk,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):(0,t.jsx)(fl,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,t.jsx)(fe,{className:`h-4 w-4 shrink-0 ${d?"text-primary":"text-muted-foreground"}`}),(0,t.jsx)("span",{className:"text-sm truncate",children:a.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground shrink-0",children:["(",(a.size/1024).toFixed(1)," KB)"]})]}),(0,t.jsx)(aU,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 shrink-0",onClick:()=>{al(a=>a.filter((a,c)=>c!==b)),an(a=>a.filter((a,c)=>c!==b))},children:(0,t.jsx)(c8,{className:"h-4 w-4"})})]}),c?.expanded&&(0,t.jsx)("div",{className:"border-t border-border/50",children:(0,t.jsxs)(f9,{value:c.advancedTab,onValueChange:a=>aw(b,"advancedTab",a),children:[(0,t.jsx)(gi,{className:"w-full border-b border-border bg-transparent h-8 p-0 gap-0 justify-start rounded-none",children:["document","tags","source"].map(a=>(0,t.jsx)(gj,{value:a,className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px capitalize",children:a},a))}),(0,t.jsxs)("div",{className:"px-3 py-3 space-y-2",children:[(0,t.jsxs)(gk,{value:"document",className:"mt-0 space-y-2",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,t.jsx)(fa,{type:"datetime-local",value:c.timestamp,onChange:a=>aw(b,"timestamp",a.target.value),className:"h-8 text-sm text-foreground"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,t.jsx)(fa,{value:c.document_id,onChange:a=>aw(b,"document_id",a.target.value),placeholder:"Optional ID...",className:"h-8 text-sm"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Strategy"}),ai.length>0?(0,t.jsxs)(gD,{value:c.strategy||"__none__",onValueChange:a=>aw(b,"strategy","__none__"===a?"":a),children:[(0,t.jsx)(hj,{className:"w-full h-8 text-sm",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"__none__",children:(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"Default"})}),ai.map(a=>(0,t.jsx)(hn,{value:a,children:a},a))]})]}):(0,t.jsx)(fa,{value:c.strategy,onChange:a=>aw(b,"strategy",a.target.value),placeholder:"Strategy name (optional)...",className:"h-8 text-sm"})]})]}),(0,t.jsx)(gk,{value:"tags",className:"mt-0 space-y-2",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Tags"}),(0,t.jsx)(fa,{value:c.tags,onChange:a=>aw(b,"tags",a.target.value),placeholder:"tag1, tag2...",className:"h-8 text-sm"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated — used to filter memories during recall/reflect"})]})}),(0,t.jsxs)(gk,{value:"source",className:"mt-0 space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,t.jsx)(fa,{value:c.context,onChange:a=>aw(b,"context",a.target.value),placeholder:"Optional context...",className:"h-8 text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Metadata"}),(0,t.jsx)(fo,{value:c.metadata,onChange:a=>aw(b,"metadata",a.target.value),placeholder:"source: slack\nchannel: engineering",className:"min-h-[52px] resize-y font-mono text-sm"})]})]})]})]})})]},`${a.name}-${b}`)})}),ao&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:ao})]})})]}),"text"===I&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Context"}),(0,t.jsx)(fa,{type:"text",value:M,onChange:a=>N(a.target.value),placeholder:"Optional context about this document..."})]}),"text"===I&&(0,t.jsx)("div",{children:(0,t.jsxs)(f9,{value:aa,onValueChange:a=>ab(a),children:[(0,t.jsxs)(gi,{className:"w-full border-b border-border bg-transparent h-8 p-0 gap-0 justify-start rounded-none",children:[(0,t.jsx)(gj,{value:"document",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Document"}),(0,t.jsx)(gj,{value:"tags",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Tags"}),(0,t.jsx)(gj,{value:"source",className:"rounded-none h-full px-4 text-xs font-medium bg-transparent shadow-none text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-none data-[state=active]:bg-transparent data-[state=active]:border-b-2 data-[state=active]:border-primary -mb-px",children:"Source"})]}),(0,t.jsxs)("div",{className:"pt-3 space-y-3",children:[(0,t.jsxs)(gk,{value:"document",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Event Date"}),(0,t.jsx)(fa,{type:"datetime-local",value:O,onChange:a=>P(a.target.value),className:"text-foreground"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Document ID"}),(0,t.jsx)(fa,{type:"text",value:Q,onChange:a=>R(a.target.value),placeholder:"Optional document identifier..."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Strategy"}),ai.length>0?(0,t.jsxs)(gD,{value:ae||"__none__",onValueChange:a=>af("__none__"===a?"":a),children:[(0,t.jsx)(hj,{className:"w-full",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"__none__",children:(0,t.jsx)("span",{className:"text-muted-foreground italic",children:"Default"})}),ai.map(a=>(0,t.jsx)(hn,{value:a,children:a},a))]})]}):(0,t.jsx)(fa,{type:"text",value:ae,onChange:a=>af(a.target.value),placeholder:"Strategy name (optional)..."}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Override the bank's default extraction strategy for this document."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(fF,{id:"async-doc",checked:ac,onCheckedChange:a=>ad(a)}),(0,t.jsx)("label",{htmlFor:"async-doc",className:"text-sm cursor-pointer text-foreground",children:"Process in background (async)"})]})]}),(0,t.jsxs)(gk,{value:"tags",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Tags"}),(0,t.jsx)(fa,{type:"text",value:S,onChange:a=>T(a.target.value),placeholder:"user_alice, session_123, project_x"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated — used to filter memories during recall/reflect"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Observation Scopes"}),(0,t.jsxs)(gD,{value:U,onValueChange:a=>V(a),children:[(0,t.jsx)(hj,{className:"w-full",children:(0,t.jsx)(gH,{})}),(0,t.jsxs)(hm,{children:[(0,t.jsx)(hn,{value:"per_tag",children:"Per tag"}),(0,t.jsx)(hn,{value:"combined",children:"Combined"}),(0,t.jsx)(hn,{value:"all_combinations",children:"All combinations"}),(0,t.jsx)(hn,{value:"custom",children:"Custom"})]})]}),"custom"!==U&&(b=((a,b)=>{if(0===a.length)return[];if("per_tag"===b)return a.map(a=>[a]);if("combined"===b)return[a];let c=[];for(let b=1;b<=a.length;b++){let d=(e,f)=>{if(f.length===b)return void c.push([...f]);for(let b=e;b<a.length;b++)d(b+1,[...f,a[b]])};d(0,[])}return c})(a=S.split(",").map(a=>a.trim()).filter(Boolean),U),0===a.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60 mt-1.5 italic",children:"Add tags above to preview observation scopes"}):(0,t.jsxs)("ul",{className:"mt-2 space-y-1.5",children:[b.slice(0,6).map((a,b)=>(0,t.jsxs)("li",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-xs font-mono text-foreground",children:a.join(", ")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:(a=>{if(1===a.length)return`What happened with ${a[0]}?`;let b=a.slice(0,-1).join(", ");return`What happened with ${b} and ${a[a.length-1]}?`})(a)})]},b)),b.length>6&&(0,t.jsxs)("li",{className:"text-xs text-muted-foreground",children:["+",b.length-6," more scopes"]})]})),"custom"===U&&(0,t.jsx)(fo,{value:W,onChange:a=>X(a.target.value),placeholder:"user:alice\nuser:alice, place:online",className:"min-h-[72px] resize-y font-mono text-sm mt-2"})]})]}),(0,t.jsxs)(gk,{value:"source",className:"mt-0 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Metadata"}),(0,t.jsx)(fo,{value:Y,onChange:a=>Z(a.target.value),placeholder:"source: slack\nchannel: engineering",className:"min-h-[72px] resize-y font-mono text-sm"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["One ",(0,t.jsx)("code",{className:"bg-muted px-0.5 rounded",children:"key: value"})," per line"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"font-bold block mb-1 text-sm text-foreground",children:"Entities"}),(0,t.jsx)(fa,{type:"text",value:$,onChange:a=>_(a.target.value),placeholder:"Alice, Google, ML model"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated hints merged with auto-extracted entities"})]})]})]})]})})]}),(0,t.jsxs)(dc,{children:[(0,t.jsx)(aU,{variant:"secondary",onClick:()=>{H(!1),L(""),N(""),P(""),R(""),T(""),V("combined"),X(""),Z(""),_(""),ab("document"),ad(!1),al([]),an([]),ap("")},children:"Cancel"}),"text"===I?(0,t.jsx)(aU,{onClick:ay,disabled:ag||!K.trim(),children:ag?"Adding...":"Add Document"}):(0,t.jsx)(aU,{onClick:ax,disabled:ag||0===ak.length,children:ag?ao||"Uploading...":`Upload ${ak.length} File${1!==ak.length?"s":""}`})]})]})})]})})}hy.displayName=ht.displayName,a.s(["Switch",0,hy],56350),a.s(["BankSelector",0,function(){return(0,t.jsx)(u.Suspense,{fallback:(0,t.jsx)("div",{className:"bg-card text-card-foreground px-5 py-3 border-b-4 border-primary-gradient",children:(0,t.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(0,t.jsx)(fn.default,{src:"/logo.png",alt:"Hindsight",width:40,height:40,className:"h-10 w-auto",unoptimized:!0}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsxs)(aU,{variant:"outline",className:"w-[250px] justify-between font-bold border-2 border-primary",disabled:!0,children:["Loading...",(0,t.jsx)(fc,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)("a",{href:"https://github.com/vectorize-io/hindsight",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-accent transition-colors text-muted-foreground",children:[(0,t.jsx)(fh,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:"GitHub"})]}),(0,t.jsx)("div",{className:"h-8 w-px bg-border"}),(0,t.jsx)(aU,{variant:"ghost",size:"icon",className:"h-9 w-9",disabled:!0,children:(0,t.jsx)(ff,{className:"h-5 w-5"})})]})}),children:(0,t.jsx)(hz,{})})}],49839)}];
8
8
 
9
9
  //# sourceMappingURL=hindsight-control-plane_06incyr._.js.map