@tom2012/cc-web 2026.4.19-s → 2026.4.19-u

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 (67) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/adapters/claude-adapter.d.ts +1 -1
  3. package/backend/dist/adapters/claude-adapter.d.ts.map +1 -1
  4. package/backend/dist/adapters/claude-adapter.js +169 -11
  5. package/backend/dist/adapters/claude-adapter.js.map +1 -1
  6. package/backend/dist/adapters/gemini-adapter.js +1 -1
  7. package/backend/dist/adapters/gemini-adapter.js.map +1 -1
  8. package/backend/dist/adapters/types.d.ts +4 -1
  9. package/backend/dist/adapters/types.d.ts.map +1 -1
  10. package/backend/dist/index.d.ts.map +1 -1
  11. package/backend/dist/index.js +4 -0
  12. package/backend/dist/index.js.map +1 -1
  13. package/backend/dist/routes/claude.d.ts.map +1 -1
  14. package/backend/dist/routes/claude.js +23 -1
  15. package/backend/dist/routes/claude.js.map +1 -1
  16. package/backend/dist/routes/projects.d.ts.map +1 -1
  17. package/backend/dist/routes/projects.js +26 -0
  18. package/backend/dist/routes/projects.js.map +1 -1
  19. package/backend/dist/routes/skillhub.d.ts +27 -0
  20. package/backend/dist/routes/skillhub.d.ts.map +1 -1
  21. package/backend/dist/routes/skillhub.js +149 -180
  22. package/backend/dist/routes/skillhub.js.map +1 -1
  23. package/backend/dist/routes/sync.d.ts +3 -0
  24. package/backend/dist/routes/sync.d.ts.map +1 -0
  25. package/backend/dist/routes/sync.js +183 -0
  26. package/backend/dist/routes/sync.js.map +1 -0
  27. package/backend/dist/sync-config.d.ts +62 -0
  28. package/backend/dist/sync-config.d.ts.map +1 -0
  29. package/backend/dist/sync-config.js +207 -0
  30. package/backend/dist/sync-config.js.map +1 -0
  31. package/backend/dist/sync-scheduler.d.ts +7 -0
  32. package/backend/dist/sync-scheduler.d.ts.map +1 -0
  33. package/backend/dist/sync-scheduler.js +157 -0
  34. package/backend/dist/sync-scheduler.js.map +1 -0
  35. package/backend/dist/sync-service.d.ts +54 -0
  36. package/backend/dist/sync-service.d.ts.map +1 -0
  37. package/backend/dist/sync-service.js +414 -0
  38. package/backend/dist/sync-service.js.map +1 -0
  39. package/backend/dist/user-prefs.d.ts +3 -0
  40. package/backend/dist/user-prefs.d.ts.map +1 -0
  41. package/backend/dist/user-prefs.js +87 -0
  42. package/backend/dist/user-prefs.js.map +1 -0
  43. package/backend/package-lock.json +26 -0
  44. package/backend/package.json +2 -0
  45. package/frontend/dist/assets/AssistantMessageContent-DuOuKxgH.js +13 -0
  46. package/frontend/dist/assets/{GraphPreview-DqnUioLI.js → GraphPreview-UVA4ODDv.js} +1 -1
  47. package/frontend/dist/assets/MobilePage-8bMFdgD9.js +14 -0
  48. package/frontend/dist/assets/{OfficePreview-DsfkiPFS.js → OfficePreview-DFa568OD.js} +2 -2
  49. package/frontend/dist/assets/{ProjectPage-eUYt7NVa.js → ProjectPage-D23Cx4LX.js} +5 -6
  50. package/frontend/dist/assets/SettingsPage-CTTCafJA.js +13 -0
  51. package/frontend/dist/assets/SkillHubPage-BBWaNxzY.js +13 -0
  52. package/frontend/dist/assets/{chevron-down-9-G7S6iK.js → chevron-down-XjVVezAn.js} +1 -1
  53. package/frontend/dist/assets/{chevron-up-BnktQ0Ve.js → chevron-up-BD4j4icv.js} +1 -1
  54. package/frontend/dist/assets/index-BL3iZx_u.css +1 -0
  55. package/frontend/dist/assets/{index-B7AIJuGG.js → index-Cz7UGH1l.js} +1 -1
  56. package/frontend/dist/assets/index-Qowsi3Ey.js +13 -0
  57. package/frontend/dist/assets/{index-Dn-YLcfD.js → index-hLxTQaCY.js} +10 -10
  58. package/frontend/dist/assets/{jszip.min-wfpG-66r.js → jszip.min-BvfmA-CV.js} +1 -1
  59. package/frontend/dist/assets/{search-Dq8YTmIg.js → search-CdJtkP3F.js} +1 -1
  60. package/frontend/dist/index.html +2 -2
  61. package/package.json +1 -1
  62. package/frontend/dist/assets/AssistantMessageContent-DayURBLZ.js +0 -13
  63. package/frontend/dist/assets/MobilePage-CIA-DkuB.js +0 -14
  64. package/frontend/dist/assets/SettingsPage-CCk3EySa.js +0 -13
  65. package/frontend/dist/assets/SkillHubPage-CRFSy-Cg.js +0 -13
  66. package/frontend/dist/assets/index-CboghLS5.js +0 -7
  67. package/frontend/dist/assets/index-pG308FQn.css +0 -1
@@ -0,0 +1,13 @@
1
+ import{c as e,r as t,j as n,K as r,N as o,R as i,U as a,aQ as l,W as s,V as c,aP as f,L as u,O as d,d as p,aR as m,aE as h}from"./index-hLxTQaCY.js";
2
+ /**
3
+ * @license lucide-react v0.309.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const g=e("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),y=e("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),v=e("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);
8
+ /**
9
+ * @license lucide-react v0.309.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */function w(e){const r=x(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(R);if(s){const e=s.props.children,i=l.map(n=>n===s?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return n.jsx(r,{...a,ref:o,children:t.isValidElement(e)?t.cloneElement(e,void 0,i):null})}return n.jsx(r,{...a,ref:o,children:i})});return o.displayName=`${e}.Slot`,o}function x(e){const n=t.forwardRef((e,n)=>{const{children:o,...i}=e;if(t.isValidElement(o)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o),a=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(i,o.props);return o.type!==t.Fragment&&(a.ref=n?r(n,e):e),t.cloneElement(o,a)}return t.Children.count(o)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var b=Symbol("radix.slottable");function R(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===b}function A(e){const t=e+"CollectionProvider",[r,l]=o(t),[s,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),f=e=>{const{scope:t,children:r}=e,o=i.useRef(null),a=i.useRef(new Map).current;return n.jsx(s,{scope:t,itemMap:a,collectionRef:o,children:r})};f.displayName=t;const u=e+"CollectionSlot",d=w(u),p=i.forwardRef((e,t)=>{const{scope:r,children:o}=e,i=c(u,r),l=a(t,i.collectionRef);return n.jsx(d,{ref:l,children:o})});p.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=w(m),y=i.forwardRef((e,t)=>{const{scope:r,children:o,...l}=e,s=i.useRef(null),f=a(t,s),u=c(m,r);return i.useEffect(()=>(u.itemMap.set(s,{ref:s,...l}),()=>{u.itemMap.delete(s)})),n.jsx(g,{[h]:"",ref:f,children:o})});return y.displayName=m,[{Provider:f,Slot:p,ItemSlot:y},function(t){const n=c(e+"CollectionConsumer",t);return i.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},l]}var S=t.createContext(void 0);function C(e){const n=t.useContext(S);return e||n||"ltr"}var T="rovingFocusGroup.onEntryFocus",E={bubbles:!1,cancelable:!0},P="RovingFocusGroup",[O,D,j]=A(P),[F,L]=o(P,[j]),[k,M]=F(P),I=t.forwardRef((e,t)=>n.jsx(O.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(O.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(N,{...e,ref:t})})}));I.displayName=P;var N=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:y=!1,...v}=e,w=t.useRef(null),x=a(r,w),b=C(d),[R,A]=f({prop:p,defaultProp:m??null,onChange:h,caller:P}),[S,O]=t.useState(!1),j=u(g),F=D(o),L=t.useRef(!1),[M,I]=t.useState(0);return t.useEffect(()=>{const e=w.current;if(e)return e.addEventListener(T,j),()=>e.removeEventListener(T,j)},[j]),n.jsx(k,{scope:o,orientation:i,dir:b,loop:l,currentTabStopId:R,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>O(!0),[]),onFocusableItemAdd:t.useCallback(()=>I(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>I(e=>e-1),[]),children:n.jsx(s.div,{tabIndex:S||0===M?-1:0,"data-orientation":i,...v,ref:x,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{L.current=!0}),onFocus:c(e.onFocus,e=>{const t=!L.current;if(e.target===e.currentTarget&&t&&!S){const t=new CustomEvent(T,E);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=F().filter(e=>e.focusable);W([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),y)}}L.current=!1}),onBlur:c(e.onBlur,()=>O(!1))})})}),_="RovingFocusGroupItem",H=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:f,children:u,...d}=e,p=l(),m=f||p,h=M(_,o),g=h.currentTabStopId===m,y=D(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:x}=h;return t.useEffect(()=>{if(i)return v(),()=>w()},[i,v,w]),n.jsx(O.ItemSlot,{scope:o,id:m,focusable:i,active:a,children:n.jsx(s.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...d,ref:r,onMouseDown:c(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:c(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:c(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:z[r]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=h.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>W(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=x}):u})})});H.displayName=_;var z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function W(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var $=I,V=H,B="Tabs",[K]=o(B,[L]),G=L(),[U,Y]=K(B),X=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:d="automatic",...p}=e,m=C(u),[h,g]=f({prop:o,onChange:i,defaultProp:a??"",caller:B});return n.jsx(U,{scope:r,baseId:l(),value:h,onValueChange:g,orientation:c,dir:m,activationMode:d,children:n.jsx(s.div,{dir:m,"data-orientation":c,...p,ref:t})})});X.displayName=B;var q="TabsList",Q=t.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=Y(q,r),l=G(r);return n.jsx($,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:o,children:n.jsx(s.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Q.displayName=q;var Z="TabsTrigger",J=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,l=Y(Z,r),f=G(r),u=ne(l.baseId,o),d=re(l.baseId,o),p=o===l.value;return n.jsx(V,{asChild:!0,...f,focusable:!i,active:p,children:n.jsx(s.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:c(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(o)}),onKeyDown:c(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(o)}),onFocus:c(e.onFocus,()=>{const e="manual"!==l.activationMode;p||i||!e||l.onValueChange(o)})})})});J.displayName=Z;var ee="TabsContent",te=t.forwardRef((e,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:l,...c}=e,f=Y(ee,o),u=ne(f.baseId,i),p=re(f.baseId,i),m=i===f.value,h=t.useRef(m);return t.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),n.jsx(d,{present:a||m,children:({present:t})=>n.jsx(s.div,{"data-state":m?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:p,tabIndex:0,...c,ref:r,style:{...e.style,animationDuration:h.current?"0s":void 0},children:t&&l})})});function ne(e,t){return`${e}-trigger-${t}`}function re(e,t){return`${e}-content-${t}`}te.displayName=ee;var oe=Q,ie=J,ae=te;const le=X,se=t.forwardRef(({className:e,...t},r)=>n.jsx(oe,{ref:r,className:p("flex rounded-md bg-muted p-1 text-muted-foreground data-[orientation=horizontal]:h-10 data-[orientation=horizontal]:items-center data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:inline-flex data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-center data-[orientation=vertical]:justify-start",e),...t}));se.displayName=oe.displayName;const ce=t.forwardRef(({className:e,...t},r)=>n.jsx(ie,{ref:r,className:p("inline-flex items-center justify-center whitespace-nowrap rounded-sm 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 data-[orientation=horizontal]:px-3 data-[orientation=horizontal]:py-1.5",e),...t}));ce.displayName=ie.displayName;const fe=t.forwardRef(({className:e,...t},r)=>n.jsx(ae,{ref:r,className:p("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));fe.displayName=ae.displayName;const ue=["top","right","bottom","left"],de=Math.min,pe=Math.max,me=Math.round,he=Math.floor,ge=e=>({x:e,y:e}),ye={left:"right",right:"left",bottom:"top",top:"bottom"};function ve(e,t,n){return pe(e,de(t,n))}function we(e,t){return"function"==typeof e?e(t):e}function xe(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function Re(e){return"x"===e?"y":"x"}function Ae(e){return"y"===e?"height":"width"}function Se(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Ce(e){return Re(Se(e))}function Te(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ee=["left","right"],Pe=["right","left"],Oe=["top","bottom"],De=["bottom","top"];function je(e,t,n,r){const o=be(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Pe:Ee:t?Ee:Pe;case"left":case"right":return t?Oe:De;default:return[]}}(xe(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Te)))),i}function Fe(e){const t=xe(e);return ye[t]+e.slice(t.length)}function Le(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ke(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Me(e,t,n){let{reference:r,floating:o}=e;const i=Se(t),a=Ce(t),l=Ae(a),s=xe(t),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(be(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function Ie(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=we(t,e),m=Le(p),h=l[d?"floating"===u?"reference":"floating":u],g=ke(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=ke(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-x.top+m.top)/w.y,bottom:(x.bottom-g.bottom+m.bottom)/w.y,left:(g.left-x.left+m.left)/w.x,right:(x.right-g.right+m.right)/w.x}}function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _e(e){return ue.some(t=>e[t]>=0)}const He=new Set(["left","top"]);function ze(){return"undefined"!=typeof window}function We(e){return Be(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ve(e){var t;return null==(t=(Be(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Be(e){return!!ze()&&(e instanceof Node||e instanceof $e(e).Node)}function Ke(e){return!!ze()&&(e instanceof Element||e instanceof $e(e).Element)}function Ge(e){return!!ze()&&(e instanceof HTMLElement||e instanceof $e(e).HTMLElement)}function Ue(e){return!(!ze()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot)}function Ye(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Xe(e){return/^(table|td|th)$/.test(We(e))}function qe(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const Qe=/transform|translate|scale|rotate|perspective|filter/,Ze=/paint|layout|strict|content/,Je=e=>!!e&&"none"!==e;let et;function tt(e){const t=Ke(e)?ot(e):e;return Je(t.transform)||Je(t.translate)||Je(t.scale)||Je(t.rotate)||Je(t.perspective)||!nt()&&(Je(t.backdropFilter)||Je(t.filter))||Qe.test(t.willChange||"")||Ze.test(t.contain||"")}function nt(){return null==et&&(et="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),et}function rt(e){return/^(html|body|#document)$/.test(We(e))}function ot(e){return $e(e).getComputedStyle(e)}function it(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function at(e){if("html"===We(e))return e;const t=e.assignedSlot||e.parentNode||Ue(e)&&e.host||Ve(e);return Ue(t)?t.host:t}function lt(e){const t=at(e);return rt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ge(t)&&Ye(t)?t:lt(t)}function st(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=lt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=$e(o);if(i){const e=ct(a);return t.concat(a,a.visualViewport||[],Ye(o)?o:[],e&&n?st(e):[])}return t.concat(o,st(o,[],n))}function ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ft(e){const t=ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ge(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=me(n)!==i||me(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function ut(e){return Ke(e)?e:e.contextElement}function dt(e){const t=ut(e);if(!Ge(t))return ge(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ft(t);let a=(i?me(n.width):n.width)/r,l=(i?me(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const pt=ge(0);function mt(e){const t=$e(e);return nt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:pt}function ht(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ut(e);let a=ge(1);t&&(r?Ke(r)&&(a=dt(r)):a=dt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==$e(e))&&t}(i,n,r)?mt(i):ge(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,f=o.width/a.x,u=o.height/a.y;if(i){const e=$e(i),t=r&&Ke(r)?$e(r):r;let n=e,o=ct(n);for(;o&&r&&t!==n;){const e=dt(o),t=o.getBoundingClientRect(),r=ot(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,f*=e.x,u*=e.y,s+=i,c+=a,n=$e(o),o=ct(n)}}return ke({width:f,height:u,x:s,y:c})}function gt(e,t){const n=it(e).scrollLeft;return t?t.left+n:ht(Ve(e)).left+n}function yt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gt(e,n),y:n.top+t.scrollTop}}function vt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=$e(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=nt();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=gt(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=Ve(e),n=it(e),r=e.ownerDocument.body,o=pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+gt(e);const l=-n.scrollTop;return"rtl"===ot(r).direction&&(a+=pe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Ve(e));else if(Ke(t))r=function(e,t){const n=ht(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ge(e)?dt(e):ge(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=mt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ke(r)}function wt(e,t){const n=at(e);return!(n===t||!Ke(n)||rt(n))&&("fixed"===ot(n).position||wt(n,t))}function xt(e,t,n){const r=Ge(t),o=Ve(t),i="fixed"===n,a=ht(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=ge(0);function c(){s.x=gt(o)}if(r||!r&&!i)if(("body"!==We(t)||Ye(o))&&(l=it(t)),r){const e=ht(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?ge(0):yt(o,l);return{x:a.left+l.scrollLeft-s.x-f.x,y:a.top+l.scrollTop-s.y-f.y,width:a.width,height:a.height}}function bt(e){return"static"===ot(e).position}function Rt(e,t){if(!Ge(e)||"fixed"===ot(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function At(e,t){const n=$e(e);if(qe(e))return n;if(!Ge(e)){let t=at(e);for(;t&&!rt(t);){if(Ke(t)&&!bt(t))return t;t=at(t)}return n}let r=Rt(e,t);for(;r&&Xe(r)&&bt(r);)r=Rt(r,t);return r&&rt(r)&&bt(r)&&!tt(r)?n:r||function(e){let t=at(e);for(;Ge(t)&&!rt(t);){if(tt(t))return t;if(qe(t))return null;t=at(t)}return null}(e)||n}const St={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ve(r),l=!!t&&qe(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=ge(1);const f=ge(0),u=Ge(r);if((u||!u&&!i)&&(("body"!==We(r)||Ye(a))&&(s=it(r)),u)){const e=ht(r);c=dt(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const d=!a||u||i?ge(0):yt(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:Ve,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?qe(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=st(e,[],!1).filter(e=>Ke(e)&&"body"!==We(e)),o=null;const i="fixed"===ot(e).position;let a=i?at(e):e;for(;Ke(a)&&!rt(a);){const t=ot(a),n=tt(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ye(a)&&!n&&wt(e,a))?r=r.filter(e=>e!==a):o=t,a=at(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=vt(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,f=a.left;for(let u=1;u<i.length;u++){const e=vt(t,i[u],o);l=pe(e.top,l),s=de(e.right,s),c=de(e.bottom,c),f=pe(e.left,f)}return{width:s-f,height:c-l,x:f,y:l}},getOffsetParent:At,getElementRects:async function(e){const t=this.getOffsetParent||At,n=this.getDimensions,r=await n(e.floating);return{reference:xt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ft(e);return{width:t,height:n}},getScale:dt,isElement:Ke,isRTL:function(e){return"rtl"===ot(e).direction}};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ut(e),f=o||i?[...c?st(c):[],...t?st(t):[]]:[];f.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const u=c&&l?function(e,t){let n,r=null;const o=Ve(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:f,top:u,width:d,height:p}=c;if(l||t(),!d||!p)return;const m={rootMargin:-he(u)+"px "+-he(o.clientWidth-(f+d))+"px "+-he(o.clientHeight-(u+p))+"px "+-he(f)+"px",threshold:pe(0,de(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Ct(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let d,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let h=s?ht(e):null;return s&&function t(){const r=ht(e);h&&!Ct(h,r)&&n();h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(d)}}const Et=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=xe(n),l=be(n),s="y"===Se(n),c=He.has(a)?-1:1,f=i&&s?-1:1,u=we(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Pt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=we(e,t),f={x:n,y:r},u=await i.detectOverflow(t,c),d=Se(xe(o)),p=Re(d);let m=f[p],h=f[d];if(a){const e="y"===p?"bottom":"right";m=ve(m+u["y"===p?"top":"left"],m,m-u[e])}if(l){const e="y"===d?"bottom":"right";h=ve(h+u["y"===d?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:m,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[d]:l}}}}}},Ot=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=we(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=xe(o),v=Se(l),w=xe(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=d||(w||!h?[Fe(l)]:function(e){const t=Fe(e);return[Te(e),t,Te(t)]}(l)),R="none"!==m;!d&&R&&b.push(...je(l,h,m,x));const A=[l,...b],S=await s.detectOverflow(t,g),C=[];let T=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&C.push(S[y]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=be(e),o=Ce(e),i=Ae(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Fe(a)),[a,Fe(a)]}(o,a,x);C.push(S[e[0]],S[e[1]])}if(T=[...T,{placement:o,overflows:C}],!C.every(e=>e<=0)){var E,P;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=A[e];if(t){if(!("alignment"===u&&v!==Se(t))||T.every(e=>Se(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(P=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=T.filter(e=>{if(R){const t=Se(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Dt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=we(e,t),f=await a.detectOverflow(t,c),u=xe(o),d=be(o),p="y"===Se(o),{width:m,height:h}=i.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=u,g="end"===d?"top":"bottom");const v=h-f.top-f.bottom,w=m-f.left-f.right,x=de(h-f[g],v),b=de(m-f[y],w),R=!t.middlewareData.shift;let A=x,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(A=v),R&&!d){const e=pe(f.left,0),t=pe(f.right,0),n=pe(f.top,0),r=pe(f.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:pe(f.left,f.right)):A=h-2*(0!==n||0!==r?n+r:pe(f.top,f.bottom))}await s({...t,availableWidth:S,availableHeight:A});const C=await a.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},jt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=we(e,t);switch(o){case"referenceHidden":{const e=Ne(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_e(e)}}}case"escaped":{const e=Ne(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_e(e)}}}default:return{}}}}},Ft=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:f=0}=we(e,t)||{};if(null==c)return{};const u=Le(f),d={x:n,y:r},p=Ce(o),m=Ae(p),h=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-d[p]-i.floating[m],b=d[p]-i.reference[p],R=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let A=R?R[w]:0;A&&await(null==a.isElement?void 0:a.isElement(R))||(A=l.floating[w]||i.floating[m]);const S=x/2-b/2,C=A/2-h[m]/2-1,T=de(u[y],C),E=de(u[v],C),P=T,O=A-h[m]-E,D=A/2-h[m]/2+S,j=ve(P,D,O),F=!s.arrow&&null!=be(o)&&D!==j&&i.reference[m]/2-(D<P?T:E)-h[m]/2<0,L=F?D<P?D-P:D-O:0;return{[p]:d[p]+L,data:{[p]:j,centerOffset:D-j-L,...F&&{alignmentOffset:L}},reset:F}}}),Lt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=we(e,t),f={x:n,y:r},u=Se(o),d=Re(u);let p=f[d],m=f[u];const h=we(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===d?"width":"height",t=He.has(xe(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[u])||0)+(t?0:g.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},kt=(e,t,n)=>{const r=new Map,o={platform:St,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Ie},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=Me(c,r,s),d=r,p=0;const m={};for(let h=0;h<i.length;h++){const n=i[h];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:w,data:x,reset:b}=await y({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});f=null!=v?v:f,u=null!=w?w:u,m[g]={...m[g],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:u}=Me(c,d,s))),h=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var Mt="undefined"!=typeof document?t.useLayoutEffect:function(){};function It(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!It(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!It(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Nt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _t(e,t){const n=Nt(e);return Math.round(t*n)/n}function Ht(e){const n=t.useRef(e);return Mt(()=>{n.current=e}),n}const zt=(e,t)=>{const n=Et(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wt=(e,t)=>{const n=Pt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$t=(e,t)=>{const n=Ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vt=(e,t)=>{const n=Dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bt=(e,t)=>{const n=jt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kt=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ft({element:n.current,padding:r}).fn(t):{}:n?Ft({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Gt=t.forwardRef((e,t)=>{const{children:r,width:o=10,height:i=5,...a}=e;return n.jsx(s.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gt.displayName="Arrow";var Ut=Gt;function Yt(e){const[n,r]=t.useState(void 0);return h(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),n}var Xt="Popper",[qt,Qt]=o(Xt),[Zt,Jt]=qt(Xt),en=e=>{const{__scopePopper:r,children:o}=e,[i,a]=t.useState(null);return n.jsx(Zt,{scope:r,anchor:i,onAnchorChange:a,children:o})};en.displayName=Xt;var tn="PopperAnchor",nn=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...l}=e,c=Jt(tn,o),f=t.useRef(null),u=a(r,f),d=t.useRef(null);return t.useEffect(()=>{const e=d.current;d.current=(null==i?void 0:i.current)||f.current,e!==d.current&&c.onAnchorChange(d.current)}),i?null:n.jsx(s.div,{...l,ref:u})});nn.displayName=tn;var rn="PopperContent",[on,an]=qt(rn),ln=t.forwardRef((e,r)=>{var o,i,l,c,f,d;const{__scopePopper:p,side:g="bottom",sideOffset:y=0,align:v="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:R=[],collisionPadding:A=0,sticky:S="partial",hideWhenDetached:C=!1,updatePositionStrategy:T="optimized",onPlaced:E,...P}=e,O=Jt(rn,p),[D,j]=t.useState(null),F=a(r,e=>j(e)),[L,k]=t.useState(null),M=Yt(L),I=(null==M?void 0:M.width)??0,N=(null==M?void 0:M.height)??0,_=g+("center"!==v?"-"+v:""),H="number"==typeof A?A:{top:0,right:0,bottom:0,left:0,...A},z=Array.isArray(R)?R:[R],W=z.length>0,$={padding:H,boundary:z.filter(un),altBoundary:W},{refs:V,floatingStyles:B,placement:K,isPositioned:G,middlewareData:U}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:f}=e,[u,d]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=t.useState(o);It(p,o)||h(o);const[g,y]=t.useState(null),[v,w]=t.useState(null),x=t.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),b=t.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),R=a||g,A=l||v,S=t.useRef(null),C=t.useRef(null),T=t.useRef(u),E=null!=c,P=Ht(c),O=Ht(i),D=Ht(f),j=t.useCallback(()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:p};O.current&&(e.platform=O.current),kt(S.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==D.current};F.current&&!It(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[p,n,r,O,D]);Mt(()=>{!1===f&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[f]);const F=t.useRef(!1);Mt(()=>(F.current=!0,()=>{F.current=!1}),[]),Mt(()=>{if(R&&(S.current=R),A&&(C.current=A),R&&A){if(P.current)return P.current(R,A,j);j()}},[R,A,j,P,E]);const L=t.useMemo(()=>({reference:S,floating:C,setReference:x,setFloating:b}),[x,b]),k=t.useMemo(()=>({reference:R,floating:A}),[R,A]),M=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!k.floating)return e;const t=_t(k.floating,u.x),n=_t(k.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Nt(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,k.floating,u.x,u.y]);return t.useMemo(()=>({...u,update:j,refs:L,elements:k,floatingStyles:M}),[u,j,L,k,M])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>Tt(...e,{animationFrame:"always"===T}),elements:{reference:O.anchor},middleware:[zt({mainAxis:y+N,alignmentAxis:w}),b&&Wt({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?{fn:Lt(Y).fn,options:[Y,X]}:void 0,...$}),b&&$t({...$}),Vt({...$,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),L&&Kt({element:L,padding:x}),dn({arrowWidth:I,arrowHeight:N}),C&&Bt({strategy:"referenceHidden",...$})]});var Y,X;const[q,Q]=pn(K),Z=u(E);h(()=>{G&&(null==Z||Z())},[G,Z]);const J=null==(o=U.arrow)?void 0:o.x,ee=null==(i=U.arrow)?void 0:i.y,te=0!==(null==(l=U.arrow)?void 0:l.centerOffset),[ne,re]=t.useState();return h(()=>{D&&re(window.getComputedStyle(D).zIndex)},[D]),n.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:G?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(c=U.transformOrigin)?void 0:c.x,null==(f=U.transformOrigin)?void 0:f.y].join(" "),...(null==(d=U.hide)?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(on,{scope:p,placedSide:q,onArrowChange:k,arrowX:J,arrowY:ee,shouldHideArrow:te,children:n.jsx(s.div,{"data-side":q,"data-align":Q,...P,ref:F,style:{...P.style,animation:G?void 0:"none"}})})})});ln.displayName=rn;var sn="PopperArrow",cn={top:"bottom",right:"left",bottom:"top",left:"right"},fn=t.forwardRef(function(e,t){const{__scopePopper:r,...o}=e,i=an(sn,r),a=cn[i.placedSide];return n.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:n.jsx(Ut,{...o,ref:t,style:{...o.style,display:"block"}})})});function un(e){return null!==e}fn.displayName=sn;var dn=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:a,middlewareData:l}=t,s=0!==(null==(n=l.arrow)?void 0:n.centerOffset),c=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,d]=pn(i),p={start:"0%",center:"50%",end:"100%"}[d],m=((null==(r=l.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=l.arrow)?void 0:o.y)??0)+f/2;let g="",y="";return"bottom"===u?(g=s?p:`${m}px`,y=-f+"px"):"top"===u?(g=s?p:`${m}px`,y=`${a.floating.height+f}px`):"right"===u?(g=-f+"px",y=s?p:`${h}px`):"left"===u&&(g=`${a.floating.width+f}px`,y=s?p:`${h}px`),{data:{x:g,y:y}}}});function pn(e){const[t,n="center"]=e.split("-");return[t,n]}var mn=en,hn=nn,gn=ln,yn=fn;function vn(e,[t,n]){return Math.min(n,Math.max(t,e))}export{hn as A,gn as C,V as I,mn as R,g as S,le as T,v as U,se as a,ce as b,fe as c,Qt as d,L as e,A as f,$ as g,yn as h,y as i,vn as j,Yt as k,C as u};