@lacneu/atrium 0.104.2 → 0.104.4

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 (111) hide show
  1. package/dist/assets/{AccessTab-D8xdWzT5.js → AccessTab-B2bpNynj.js} +1 -1
  2. package/dist/assets/{AdminSettings-CtNcFhMz.js → AdminSettings-C2bsOn0u.js} +1 -1
  3. package/dist/assets/{AdvancedFilter-Cod8SSd6.js → AdvancedFilter-DYTsdqhC.js} +1 -1
  4. package/dist/assets/{AgentFilesTab-Dfkkm3Fw.js → AgentFilesTab-BM2NUWub.js} +1 -1
  5. package/dist/assets/{AnomaliesTab-DlZ5M2UC.js → AnomaliesTab-BWiKxnXQ.js} +1 -1
  6. package/dist/assets/{AuditTab-Dh6gO6j5.js → AuditTab-CqpDXgVz.js} +1 -1
  7. package/dist/assets/{BridgeTab-Bnu9R5N4.js → BridgeTab-Cv2Co6h7.js} +1 -1
  8. package/dist/assets/{ChatDefaultsTab-CxmayDqi.js → ChatDefaultsTab-Dr-czhQm.js} +1 -1
  9. package/dist/assets/{ConfirmDialog-B7k0wvSi.js → ConfirmDialog-Bfi4_Ti8.js} +1 -1
  10. package/dist/assets/{DataTableShell-DvtkASQG.js → DataTableShell-1ZsZ0a2J.js} +1 -1
  11. package/dist/assets/{DeletedChatsTab-CnaK-AH0.js → DeletedChatsTab-By_xLvEC.js} +1 -1
  12. package/dist/assets/{DetailChips-DDAtgnjA.js → DetailChips-DkRU5HQ5.js} +1 -1
  13. package/dist/assets/{EntitySheet-DRzkWKlH.js → EntitySheet-D8Vdib4B.js} +1 -1
  14. package/dist/assets/{FeedbacksTab-D4LKaB_2.js → FeedbacksTab-YFBk45oU.js} +1 -1
  15. package/dist/assets/{FieldLabel-imj_Z0rZ.js → FieldLabel-Ce8urE01.js} +1 -1
  16. package/dist/assets/{FilesTab-D3XWSI2t.js → FilesTab-DL27Krkt.js} +1 -1
  17. package/dist/assets/{FilterBar-DCCuFxDn.js → FilterBar-DtNuk6dI.js} +1 -1
  18. package/dist/assets/{GroupsTab-DbayDYbZ.js → GroupsTab-CQrEUZSF.js} +1 -1
  19. package/dist/assets/{InstancesTab-031fn2Jt.js → InstancesTab-DiW-4KlM.js} +1 -1
  20. package/dist/assets/{IntegrationsTab-1whhDsmk.js → IntegrationsTab-DqWlrC3M.js} +1 -1
  21. package/dist/assets/{KnobRow-D6kXWvVI.js → KnobRow-4WODwFrS.js} +1 -1
  22. package/dist/assets/{KpiTab-2Vk6EtCf.js → KpiTab-BXC9YG9_.js} +1 -1
  23. package/dist/assets/{PreferencesTab-B5h49bYq.js → PreferencesTab-DarNzYdF.js} +1 -1
  24. package/dist/assets/{ProjectPage-BNKL-iOz.js → ProjectPage-BbYuFPDW.js} +1 -1
  25. package/dist/assets/{PromptInjectionsTab-Bmn1iSpB.js → PromptInjectionsTab-KMsWE-dW.js} +1 -1
  26. package/dist/assets/{RolesTab-DHxLatAl.js → RolesTab-DpN3MOih.js} +1 -1
  27. package/dist/assets/{ScheduledTab-NHSyQ677.js → ScheduledTab-BBofaJj5.js} +1 -1
  28. package/dist/assets/{ServiceAccountsTab-CKV8crhK.js → ServiceAccountsTab-CSIwvppo.js} +1 -1
  29. package/dist/assets/{SubAgentReportsTab-BWfXOTck.js → SubAgentReportsTab-BoNbdt38.js} +1 -1
  30. package/dist/assets/{ThemeShowroom-Do9I3hrR.js → ThemeShowroom-DdUZV2nA.js} +1 -1
  31. package/dist/assets/{TimeRangePicker-BZtw1JkM.js → TimeRangePicker-jsNw51TL.js} +1 -1
  32. package/dist/assets/{TimezoneCombobox-CeRN4N3z.js → TimezoneCombobox-zOqV7dxe.js} +1 -1
  33. package/dist/assets/{TracesTab-BNWFPad2.js → TracesTab-Dg_eyLYF.js} +1 -1
  34. package/dist/assets/{TrashTab-D5irFeF0.js → TrashTab-Dwjjxu8X.js} +1 -1
  35. package/dist/assets/{UsersTab-CHs3CRev.js → UsersTab-eQY9UCh5.js} +1 -1
  36. package/dist/assets/{VoiceTab-DRvjgMdZ.js → VoiceTab-BFVfbSld.js} +1 -1
  37. package/dist/assets/{alert-dialog-BcJMHbhI.js → alert-dialog-C6NSAwQv.js} +1 -1
  38. package/dist/assets/{api-CWqdeSbN.js → api-D64JTta1.js} +1 -1
  39. package/dist/assets/{badge-ChMMFtuW.js → badge-DwWXPxwl.js} +1 -1
  40. package/dist/assets/{button-C_rIPtCv.js → button-DeHzYOzP.js} +1 -1
  41. package/dist/assets/{card-BV8NO76j.js → card-WAOfM0PL.js} +1 -1
  42. package/dist/assets/check-pVsND9oZ.js +1 -0
  43. package/dist/assets/{checkbox-DPxJTQjc.js → checkbox-BuTZzFvU.js} +1 -1
  44. package/dist/assets/chevron-left-CjQ1kn0w.js +1 -0
  45. package/dist/assets/chevron-right-DkaFdk2G.js +1 -0
  46. package/dist/assets/chevron-up-s_deZUWR.js +1 -0
  47. package/dist/assets/chevrons-up-down-uk0IvxY8.js +1 -0
  48. package/dist/assets/{compatView-Cz5KNXa-.js → compatView-Db657dNx.js} +1 -1
  49. package/dist/assets/convexApi-DxRiI80M.js +1 -0
  50. package/dist/assets/{copy-DbstFM9Q.js → copy-4wREwP-V.js} +1 -1
  51. package/dist/assets/{cronDescribe-CkiSvbCK.js → cronDescribe-B-ifUeLg.js} +1 -1
  52. package/dist/assets/{deliveryRecorder-B_kVKMkR.js → deliveryRecorder-owdOglrQ.js} +1 -1
  53. package/dist/assets/{dialog-CPAskUwF.js → dialog-awuZdW9M.js} +1 -1
  54. package/dist/assets/{dispatchErrorInfo-7H2cJGwt.js → dispatchErrorInfo-C4Qh_2oR.js} +1 -1
  55. package/dist/assets/{dist-Bu9sqVcp.js → dist-B4zBnzNF.js} +1 -1
  56. package/dist/assets/{dist-BjZo0sql.js → dist-BtzRSR0_.js} +1 -1
  57. package/dist/assets/{dist-CzmY6YrA.js → dist-C0V3m4aH.js} +1 -1
  58. package/dist/assets/{dist-Uf18yR_a.js → dist-D4a9D7kU.js} +1 -1
  59. package/dist/assets/{dist-CYh9BuQS.js → dist-mViq22LZ.js} +1 -1
  60. package/dist/assets/{download-BaebAe6Z.js → download-BUlwPQI8.js} +1 -1
  61. package/dist/assets/{dropdown-menu-BVKVjups.js → dropdown-menu-C5VrCGFe.js} +1 -1
  62. package/dist/assets/{eye-LggiM6Z5.js → eye-BU60QIdS.js} +1 -1
  63. package/dist/assets/{format-AQELUhPa.js → format-g5Z3Txjl.js} +1 -1
  64. package/dist/assets/{groupManageView-DC3eSLA1.js → groupManageView-CKEYC6zY.js} +1 -1
  65. package/dist/assets/index-DLjKxzJ_.css +1 -0
  66. package/dist/assets/index-MNxzNMLb.js +158 -0
  67. package/dist/assets/{input-CSZu-bVE.js → input-CZ0jp9Rx.js} +1 -1
  68. package/dist/assets/{list-obbqPBzD.js → list-Bb0MIh_I.js} +1 -1
  69. package/dist/assets/loader-circle-1XN8tjq6.js +1 -0
  70. package/dist/assets/{lock-BlVhOk85.js → lock-xfEfLa2G.js} +1 -1
  71. package/dist/assets/{pencil-K7SBkvHL.js → pencil-CHRZ3__S.js} +1 -1
  72. package/dist/assets/plus-DrzxZ4iS.js +1 -0
  73. package/dist/assets/{popover-C-Y_Yoco.js → popover-UJtu3EZ6.js} +1 -1
  74. package/dist/assets/roleDescriptions-BW3e0J2_.js +1 -0
  75. package/dist/assets/rotate-ccw-CiOuaG2h.js +1 -0
  76. package/dist/assets/{search-Dz6sLH0-.js → search-NOJ0tWl2.js} +1 -1
  77. package/dist/assets/{select-CjcMQhwm.js → select-wXM6h61N.js} +1 -1
  78. package/dist/assets/{server-DcInl3Nh.js → server-C5TTb6-A.js} +1 -1
  79. package/dist/assets/{speech-ehUcmGCg.js → speech-BPCrvnrE.js} +1 -1
  80. package/dist/assets/{star-5ysDlx3k.js → star-N2N0cbAA.js} +1 -1
  81. package/dist/assets/{switch--NPD3Vp0.js → switch-Beq0wUQ_.js} +1 -1
  82. package/dist/assets/{table-rRR3TpMc.js → table-CegX53gV.js} +1 -1
  83. package/dist/assets/{tabs-B8emuY1B.js → tabs-CfQK0-wk.js} +1 -1
  84. package/dist/assets/{toast-C_YfUacM.js → toast-DtA87VYn.js} +1 -1
  85. package/dist/assets/{tooltip-Ct0TGxtk.js → tooltip-Dpar43UD.js} +1 -1
  86. package/dist/assets/{trash-2-xhtrhYsd.js → trash-2-CqKGt3lC.js} +1 -1
  87. package/dist/assets/{trashPage-3suR6eIy.js → trashPage-D9B1uAuS.js} +1 -1
  88. package/dist/assets/{trashView-CwUC01r_.js → trashView-TIQT30u4.js} +1 -1
  89. package/dist/assets/{triangle-alert-DoL9TI6v.js → triangle-alert-nUld87-H.js} +1 -1
  90. package/dist/assets/{usageView-BuRtXekW.js → usageView-DIPUGYx9.js} +1 -1
  91. package/dist/assets/{useChart-bV4rotdu.js → useChart-BTVKxdLu.js} +1 -1
  92. package/dist/assets/{useFontScale-DiSkEM6I.js → useFontScale-P_rNok04.js} +1 -1
  93. package/dist/assets/{useStartNewChat-8wVLrYnZ.js → useStartNewChat-GAbwTTkG.js} +1 -1
  94. package/dist/assets/{use_paginated_query-CebdO_HQ.js → use_paginated_query-C-Aw4n8b.js} +1 -1
  95. package/dist/assets/{users-CRbE186D.js → users-BUu1wJNm.js} +1 -1
  96. package/dist/assets/x-BNU-sWkh.js +1 -0
  97. package/dist/index.html +54 -54
  98. package/package.json +1 -1
  99. package/dist/assets/check-DdmANHSb.js +0 -1
  100. package/dist/assets/chevron-left-ByEQraEh.js +0 -1
  101. package/dist/assets/chevron-right-DMqzlhWH.js +0 -1
  102. package/dist/assets/chevron-up-B3KYmtzo.js +0 -1
  103. package/dist/assets/chevrons-up-down-CITEfz7_.js +0 -1
  104. package/dist/assets/convexApi-G20_TNBS.js +0 -1
  105. package/dist/assets/index-2h5cvmc2.css +0 -1
  106. package/dist/assets/index-CzYLP7A2.js +0 -158
  107. package/dist/assets/loader-circle-BqKiW3X9.js +0 -1
  108. package/dist/assets/plus-DTL4K-j9.js +0 -1
  109. package/dist/assets/roleDescriptions-DHny6e80.js +0 -1
  110. package/dist/assets/rotate-ccw-CvefWwHW.js +0 -1
  111. package/dist/assets/x-CcIT4ync.js +0 -1
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-CWqdeSbN.js";e();var r=t();function i({className:e,type:t,...i}){return(0,r.jsx)(`input`,{type:t,"data-slot":`input`,className:n(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...i})}export{i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-D64JTta1.js";e();var r=t();function i({className:e,type:t,...i}){return(0,r.jsx)(`input`,{type:t,"data-slot":`input`,className:n(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...i})}export{i as t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`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`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`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`}]]);export{t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{O as r,S as i,T as a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,p as m,s as h,u as g,v as _,x as v}from"./api-CWqdeSbN.js";import{a as y,i as b,n as x,r as S,t as C}from"./dist-BjZo0sql.js";var w=t(e(),1),T=n(),E=`Popover`,[D,ee]=_(E,[y]),O=y(),[k,A]=D(E),j=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=O(t),c=w.useRef(null),[u,d]=w.useState(!1),[f,p]=l({prop:r,defaultProp:i??!1,onChange:a,caller:E});return(0,T.jsx)(b,{...s,children:(0,T.jsx)(k,{scope:t,contentId:m(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:w.useCallback(()=>d(!0),[]),onCustomAnchorRemove:w.useCallback(()=>d(!1),[]),modal:o,children:n})})};j.displayName=E;var M=`PopoverAnchor`,N=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=A(M,n),a=O(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return w.useEffect(()=>(o(),()=>s()),[o,s]),(0,T.jsx)(C,{...a,...r,ref:t})});N.displayName=M;var P=`PopoverTrigger`,F=w.forwardRef((e,t)=>{let{__scopePopover:n,...a}=e,o=A(P,n),s=O(n),c=r(t,o.triggerRef),l=(0,T.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Y(o.open),...a,ref:c,onClick:v(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,T.jsx)(C,{asChild:!0,...s,children:l})});F.displayName=P;var I=`PopoverPortal`,[te,L]=D(I,{forceMount:void 0}),R=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=A(I,t);return(0,T.jsx)(te,{scope:t,forceMount:n,children:(0,T.jsx)(f,{present:n||a.open,children:(0,T.jsx)(g,{asChild:!0,container:i,children:r})})})};R.displayName=I;var z=`PopoverContent`,B=w.forwardRef((e,t)=>{let n=L(z,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=A(z,e.__scopePopover);return(0,T.jsx)(f,{present:r||a.open,children:a.modal?(0,T.jsx)(H,{...i,ref:t}):(0,T.jsx)(U,{...i,ref:t})})});B.displayName=z;var V=a(`PopoverContent.RemoveScroll`),H=w.forwardRef((e,t)=>{let n=A(z,e.__scopePopover),i=w.useRef(null),a=r(t,i),s=w.useRef(!1);return w.useEffect(()=>{let e=i.current;if(e)return h(e)},[]),(0,T.jsx)(o,{as:V,allowPinchZoom:!0,children:(0,T.jsx)(W,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:v(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:v(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;s.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:v(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),U=w.forwardRef((e,t)=>{let n=A(z,e.__scopePopover),r=w.useRef(!1),i=w.useRef(!1);return(0,T.jsx)(W,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),W=w.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,...m}=e,h=A(z,n),g=O(n);return d(),(0,T.jsx)(s,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,T.jsx)(c,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>h.onOpenChange(!1),children:(0,T.jsx)(S,{"data-state":Y(h.open),role:`dialog`,id:h.contentId,...g,...m,ref:t,style:{...m.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)`}})})})}),G=`PopoverClose`,K=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=A(G,n);return(0,T.jsx)(i.button,{type:`button`,...r,ref:t,onClick:v(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;var q=`PopoverArrow`,J=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=O(n);return(0,T.jsx)(x,{...i,...r,ref:t})});J.displayName=q;function Y(e){return e?`open`:`closed`}var X=j,Z=F,Q=R,ne=B,$=w.createContext(void 0);function re({...e}){let t=w.useId();return(0,T.jsx)($.Provider,{value:t,children:(0,T.jsx)(X,{"data-slot":`popover`,...e})})}function ie({...e}){let t=w.useContext($);return(0,T.jsx)(Z,{"data-slot":`popover-trigger`,"data-popover-trigger":t,...e})}var ae=`bg-popover text-popover-foreground 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 w-72 max-w-(--radix-popover-content-available-width) max-h-(--radix-popover-content-available-height) origin-(--radix-popover-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-4 shadow-md outline-hidden`;function oe({className:e,align:t=`center`,sideOffset:n=4,collisionPadding:r=8,returnFocus:i,onInteractOutside:a,...o}){let s=w.useContext($),c=u(`popover`,i,a);return(0,T.jsx)(Q,{children:(0,T.jsx)(ne,{"data-slot":`popover-content`,"data-popover-of":s,align:t,sideOffset:n,collisionPadding:r,className:p(`z-50`,ae,e),...o,ref:c.ref,onCloseAutoFocus:c.onCloseAutoFocus,onInteractOutside:c.onInteractOutside})})}export{oe as n,ie as r,re as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{O as r,S as i,T as a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,p as m,s as h,u as g,v as _,x as v}from"./api-D64JTta1.js";import{a as y,i as b,n as x,r as S,t as C}from"./dist-BtzRSR0_.js";var w=t(e(),1),T=n(),E=`Popover`,[D,ee]=_(E,[y]),O=y(),[k,A]=D(E),j=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=O(t),c=w.useRef(null),[u,d]=w.useState(!1),[f,p]=l({prop:r,defaultProp:i??!1,onChange:a,caller:E});return(0,T.jsx)(b,{...s,children:(0,T.jsx)(k,{scope:t,contentId:m(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:w.useCallback(()=>d(!0),[]),onCustomAnchorRemove:w.useCallback(()=>d(!1),[]),modal:o,children:n})})};j.displayName=E;var M=`PopoverAnchor`,N=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=A(M,n),a=O(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return w.useEffect(()=>(o(),()=>s()),[o,s]),(0,T.jsx)(C,{...a,...r,ref:t})});N.displayName=M;var P=`PopoverTrigger`,F=w.forwardRef((e,t)=>{let{__scopePopover:n,...a}=e,o=A(P,n),s=O(n),c=r(t,o.triggerRef),l=(0,T.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Y(o.open),...a,ref:c,onClick:v(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,T.jsx)(C,{asChild:!0,...s,children:l})});F.displayName=P;var I=`PopoverPortal`,[te,L]=D(I,{forceMount:void 0}),R=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=A(I,t);return(0,T.jsx)(te,{scope:t,forceMount:n,children:(0,T.jsx)(f,{present:n||a.open,children:(0,T.jsx)(g,{asChild:!0,container:i,children:r})})})};R.displayName=I;var z=`PopoverContent`,B=w.forwardRef((e,t)=>{let n=L(z,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=A(z,e.__scopePopover);return(0,T.jsx)(f,{present:r||a.open,children:a.modal?(0,T.jsx)(H,{...i,ref:t}):(0,T.jsx)(U,{...i,ref:t})})});B.displayName=z;var V=a(`PopoverContent.RemoveScroll`),H=w.forwardRef((e,t)=>{let n=A(z,e.__scopePopover),i=w.useRef(null),a=r(t,i),s=w.useRef(!1);return w.useEffect(()=>{let e=i.current;if(e)return h(e)},[]),(0,T.jsx)(o,{as:V,allowPinchZoom:!0,children:(0,T.jsx)(W,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:v(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:v(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;s.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:v(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),U=w.forwardRef((e,t)=>{let n=A(z,e.__scopePopover),r=w.useRef(!1),i=w.useRef(!1);return(0,T.jsx)(W,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),W=w.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,...m}=e,h=A(z,n),g=O(n);return d(),(0,T.jsx)(s,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,T.jsx)(c,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>h.onOpenChange(!1),children:(0,T.jsx)(S,{"data-state":Y(h.open),role:`dialog`,id:h.contentId,...g,...m,ref:t,style:{...m.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)`}})})})}),G=`PopoverClose`,K=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=A(G,n);return(0,T.jsx)(i.button,{type:`button`,...r,ref:t,onClick:v(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;var q=`PopoverArrow`,J=w.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=O(n);return(0,T.jsx)(x,{...i,...r,ref:t})});J.displayName=q;function Y(e){return e?`open`:`closed`}var X=j,Z=F,Q=R,ne=B,$=w.createContext(void 0);function re({...e}){let t=w.useId();return(0,T.jsx)($.Provider,{value:t,children:(0,T.jsx)(X,{"data-slot":`popover`,...e})})}function ie({...e}){let t=w.useContext($);return(0,T.jsx)(Z,{"data-slot":`popover-trigger`,"data-popover-trigger":t,...e})}var ae=`bg-popover text-popover-foreground 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 w-72 max-w-(--radix-popover-content-available-width) max-h-(--radix-popover-content-available-height) origin-(--radix-popover-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-4 shadow-md outline-hidden`;function oe({className:e,align:t=`center`,sideOffset:n=4,collisionPadding:r=8,returnFocus:i,onInteractOutside:a,...o}){let s=w.useContext($),c=u(`popover`,i,a);return(0,T.jsx)(Q,{children:(0,T.jsx)(ne,{"data-slot":`popover-content`,"data-popover-of":s,align:t,sideOffset:n,collisionPadding:r,className:p(`z-50`,ae,e),...o,ref:c.ref,onCloseAutoFocus:c.onCloseAutoFocus,onInteractOutside:c.onInteractOutside})})}export{oe as n,ie as r,re as t};
@@ -0,0 +1 @@
1
+ import{aF as e,cF as t,lF as n,oF as r,sF as i}from"./api-D64JTta1.js";var a={pending:n,user:t,admin:i,observer:r,agent:e};function o(e){if(e.builtin){let t=a[e.key];if(t)return t()}return e.description}export{o as t};
@@ -0,0 +1 @@
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]);export{t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),n=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t as n,n as t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),n=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t as n,n as t};
@@ -1 +1 @@
1
- import{a as e,i as t,l as n,r}from"./bundle-mjs-C73ZY4La.js";import{O as i,S as a,T as o,b as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,o as g,p as _,s as v,u as y,v as b,x}from"./api-CWqdeSbN.js";import{t as S}from"./check-DdmANHSb.js";import{n as C,r as w,t as T}from"./dist-CzmY6YrA.js";import{t as E}from"./chevron-up-B3KYmtzo.js";import{t as D}from"./dist-DDCmobc1.js";import{a as O,i as ee,n as k,r as A,t as j}from"./dist-BjZo0sql.js";var M=n(t(),1),N=n(e(),1),P=r(),F=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`}),I=`VisuallyHidden`,L=N.forwardRef((e,t)=>(0,P.jsx)(a.span,{...e,ref:t,style:{...F,...e.style}}));L.displayName=I;var R=L;function z(e,[t,n]){return Math.min(n,Math.max(t,e))}var B=[` `,`Enter`,`ArrowUp`,`ArrowDown`],V=[` `,`Enter`],H=`Select`,[U,W,te]=C(H),[G,ne]=b(H,[te,O]),K=O(),[re,q]=G(H),[J,ie]=G(H),ae=`SelectProvider`;function oe(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,v=K(t),[y,b]=N.useState(null),[x,S]=N.useState(null),[C,w]=N.useState(!1),E=T(l),[D,O]=f({prop:r,defaultProp:i??!1,onChange:a,caller:H}),[k,A]=f({prop:o,defaultProp:s,onChange:c,caller:H}),j=N.useRef(null),M=!y||!!h||!!y.closest(`form`),[F,I]=N.useState(new Set),L=_(),R=Array.from(F).map(e=>e.props.value).join(`;`),z=N.useCallback(e=>{I(t=>new Set(t).add(e))},[]),B=N.useCallback(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),V={required:m,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:L,value:k,onValueChange:A,open:D,onOpenChange:O,dir:E,triggerPointerDownPosRef:j,disabled:p,name:u,autoComplete:d,form:h,nativeOptions:F,nativeSelectKey:R,isFormControl:M};return(0,P.jsx)(ee,{...v,children:(0,P.jsx)(re,{scope:t,...V,children:(0,P.jsx)(U.Provider,{scope:t,children:(0,P.jsx)(J,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:tt(g)?g(V):n})})})})}oe.displayName=ae;var se=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(oe,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(et,{__scopeSelect:t}):null]})})};se.displayName=H;var ce=`SelectTrigger`,le=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,s=K(n),c=q(ce,n),l=c.disabled||r,u=i(t,c.onTriggerChange),d=W(n),f=N.useRef(`touch`),[p,m,h]=rt(e=>{let t=d().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,P.jsx)(j,{asChild:!0,...s,children:(0,P.jsx)(a.button,{type:`button`,role:`combobox`,"aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":nt(c.value)?``:void 0,...o,ref:u,onClick:x(o.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:x(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:x(o.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&B.includes(e.key)&&(g(),e.preventDefault())})})})});le.displayName=ce;var ue=`SelectValue`,de=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:s,placeholder:c=``,...l}=e,u=q(ue,n),{onValueNodeHasChildrenChange:f}=u,p=s!==void 0,m=i(t,u.onValueNodeChange);d(()=>{f(p)},[f,p]);let h=nt(u.value);return(0,P.jsx)(a.span,{...l,asChild:!h&&l.asChild,ref:m,style:{pointerEvents:`none`},children:(0,P.jsx)(N.Fragment,{children:h?c:s},h?`placeholder`:`value`)})});de.displayName=ue;var fe=`SelectIcon`,pe=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(a.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});pe.displayName=fe;var me=`SelectPortal`,[he,ge]=G(me,{forceMount:void 0}),_e=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(he,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(y,{asChild:!0,...r})})};_e.displayName=me;var Y=`SelectContent`,ve=N.forwardRef((e,t)=>{let n=ge(Y,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=q(Y,e.__scopeSelect),[o,s]=N.useState();return d(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(h,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(Ce,{...i,ref:t}):(0,P.jsx)(ye,{...i,fragment:o})})});ve.displayName=Y;var ye=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?M.createPortal((0,P.jsx)(be,{scope:n,children:(0,P.jsx)(U.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null});ye.displayName=`SelectContentFragment`;var X=10,[be,Z]=G(Y),xe=`SelectContentImpl`,Se=o(`SelectContent.RemoveScroll`),Ce=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:f,align:p,alignOffset:h,arrowPadding:g,collisionBoundary:_,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=q(Y,n),[E,D]=N.useState(null),[O,ee]=N.useState(null),k=i(t,e=>D(e)),[A,j]=N.useState(null),[M,F]=N.useState(null),I=W(n),[L,R]=N.useState(!1),z=N.useRef(!1);N.useEffect(()=>{if(E)return v(E)},[E]),m();let B=N.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[I,O]),V=N.useCallback(()=>B([A,E]),[B,A,E]);N.useEffect(()=>{L&&V()},[L,V]);let{onOpenChange:H,triggerPointerDownPosRef:U}=T;N.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||H(!1),document.removeEventListener(`pointermove`,t),U.current=null};return U.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,H,U]),N.useEffect(()=>{let e=()=>H(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[H]);let[te,G]=rt(e=>{let t=I().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=N.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&(j(e),r&&(z.current=!0))},[T.value]),K=N.useCallback(()=>E?.focus(),[E]),re=N.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&F(e)},[T.value]),J=r===`popper`?De:Te,ie=J===De?{side:d,sideOffset:f,align:p,alignOffset:h,arrowPadding:g,collisionBoundary:_,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C}:{};return(0,P.jsx)(be,{scope:n,content:E,viewport:O,onViewportChange:ee,itemRefCallback:ne,selectedItem:A,onItemLeave:K,itemTextRefCallback:re,focusSelectedItem:V,selectedItemText:M,position:r,isPositioned:L,searchRef:te,children:(0,P.jsx)(c,{as:Se,allowPinchZoom:!0,children:(0,P.jsx)(l,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:x(a,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(u,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,P.jsx)(J,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...ie,onPlaced:()=>R(!0),ref:k,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:x(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&G(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});Ce.displayName=xe;var we=`SelectItemAlignedPosition`,Te=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,s=q(Y,n),c=Z(Y,n),[l,u]=N.useState(null),[f,p]=N.useState(null),m=i(t,e=>p(e)),h=W(n),g=N.useRef(!1),_=N.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=c,S=N.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&f&&v&&y&&b){let e=s.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(s.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-X,d=z(a,[X,Math.max(X,u-c)]);l.style.minWidth=s+`px`,l.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-X,d=z(a,[X,Math.max(X,u-c)]);l.style.minWidth=s+`px`,l.style.right=d+`px`}let a=h(),o=window.innerHeight-X*2,c=v.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=d+p+c+_+m,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-X,D=o-E,O=y.offsetHeight/2,ee=y.offsetTop+O,k=d+p+ee,A=x-k;if(k<=E){let e=a.length>0&&y===a[a.length-1].ref.current;l.style.bottom=`0px`;let t=f.clientHeight-v.offsetTop-v.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+m);l.style.height=n+`px`}else{let e=a.length>0&&y===a[0].ref.current;l.style.top=`0px`;let t=Math.max(E,d+v.offsetTop+(e?w:0)+O)+A;l.style.height=t+`px`,v.scrollTop=k-E+v.offsetTop}l.style.margin=`${X}px 0`,l.style.minHeight=S+`px`,l.style.maxHeight=o+`px`,r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,l,f,v,y,b,s.dir,r]);d(()=>S(),[S]);let[C,w]=N.useState();return d(()=>{f&&w(window.getComputedStyle(f).zIndex)},[f]),(0,P.jsx)(Oe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:N.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,P.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,P.jsx)(a.div,{...o,ref:m,style:{boxSizing:`border-box`,maxHeight:`100%`,...o.style}})})})});Te.displayName=we;var Ee=`SelectPopperPosition`,De=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=X,...a}=e,o=K(n);return(0,P.jsx)(A,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});De.displayName=Ee;var[Oe,ke]=G(Y,{}),Ae=`SelectViewport`,je=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,s=Z(Ae,n),c=ke(Ae,n),l=i(t,s.onViewportChange),u=N.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(U.Slot,{scope:n,children:(0,P.jsx)(a.div,{"data-radix-select-viewport":``,role:`presentation`,...o,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...o.style},onScroll:x(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-X*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});je.displayName=Ae;var Me=`SelectGroup`,[Ne,Pe]=G(Me),Fe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=_();return(0,P.jsx)(Ne,{scope:n,id:i,children:(0,P.jsx)(a.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Fe.displayName=Me;var Ie=`SelectLabel`,Le=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Pe(Ie,n);return(0,P.jsx)(a.div,{id:i.id,...r,ref:t})});Le.displayName=Ie;var Q=`SelectItem`,[Re,ze]=G(Q),Be=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,l=q(Q,n),u=Z(Q,n),d=l.value===r,[f,p]=N.useState(s??``),[m,h]=N.useState(!1),g=i(t,e=>u.itemRefCallback?.(e,r,o)),v=_(),y=N.useRef(`touch`),b=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,P.jsx)(Re,{scope:n,value:r,disabled:o,textId:v,isSelected:d,onItemTextChange:N.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(U.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:(0,P.jsx)(a.div,{role:`option`,"aria-labelledby":v,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":o||void 0,"data-disabled":o?``:void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:x(c.onFocus,()=>h(!0)),onBlur:x(c.onBlur,()=>h(!1)),onClick:x(c.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:x(c.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:x(c.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:x(c.onPointerMove,e=>{y.current=e.pointerType,o?u.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:x(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:x(c.onKeyDown,e=>{u.searchRef?.current!==``&&e.key===` `||(V.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})});Be.displayName=Q;var $=`SelectItemText`,Ve=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...s}=e,c=q($,n),l=Z($,n),u=ze($,n),f=ie($,n),[p,m]=N.useState(null),h=i(t,e=>m(e),u.onItemTextChange,e=>l.itemTextRefCallback?.(e,u.value,u.disabled)),g=p?.textContent,_=N.useMemo(()=>(0,P.jsx)(`option`,{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return d(()=>(v(_),()=>y(_)),[v,y,_]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?M.createPortal(s.children,c.valueNode):null]})});Ve.displayName=$;var He=`SelectItemIndicator`,Ue=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ze(He,n).isSelected?(0,P.jsx)(a.span,{"aria-hidden":!0,...r,ref:t}):null});Ue.displayName=He;var We=`SelectScrollUpButton`,Ge=N.forwardRef((e,t)=>{let n=Z(We,e.__scopeSelect),r=ke(We,e.__scopeSelect),[a,o]=N.useState(!1),s=i(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;o(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),a?(0,P.jsx)(Je,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ge.displayName=We;var Ke=`SelectScrollDownButton`,qe=N.forwardRef((e,t)=>{let n=Z(Ke,e.__scopeSelect),r=ke(Ke,e.__scopeSelect),[a,o]=N.useState(!1),s=i(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),a?(0,P.jsx)(Je,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});qe.displayName=Ke;var Je=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Z(`SelectScrollButton`,n),s=N.useRef(null),c=W(n),l=N.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return N.useEffect(()=>()=>l(),[l]),d(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),(0,P.jsx)(a.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:x(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:x(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:x(i.onPointerLeave,()=>{l()})})}),Ye=`SelectSeparator`,Xe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,P.jsx)(a.div,{"aria-hidden":!0,...r,ref:t})});Xe.displayName=Ye;var Ze=`SelectArrow`,Qe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=K(n);return Z(Ze,n).position===`popper`?(0,P.jsx)(k,{...i,...r,ref:t}):null});Qe.displayName=Ze;var $e=`SelectBubbleInput`,et=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=q($e,e),{value:o,onValueChange:s,required:c,disabled:l,name:u,autoComplete:d,form:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=N.useRef(null),g=i(n,h),_=o??``,v=D(_);return N.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,P.jsxs)(a.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:u,autoComplete:d,disabled:l,form:f,onChange:e=>s(e.target.value),...t,style:{...F,...t.style},ref:g,defaultValue:_,children:[nt(o)?(0,P.jsx)(`option`,{value:``}):null,Array.from(p)]},m)});et.displayName=$e;function tt(e){return typeof e==`function`}function nt(e){return e===``||e===void 0}function rt(e){let t=s(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function it(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=at(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function at(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ot=N.createContext(void 0);function st(e){let t=N.useId();return(0,P.jsx)(ot.Provider,{value:t,children:(0,P.jsx)(se,{"data-slot":`select`,...e})})}function ct(e){return(0,P.jsx)(de,{"data-slot":`select-value`,...e})}function lt({className:e,size:t=`default`,children:n,...r}){let i=N.useContext(ot);return(0,P.jsxs)(le,{"data-slot":`select-trigger`,"data-select-trigger":i,"data-size":t,className:g(`flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-background px-2.5 py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`[&>[data-slot=select-value]]:min-w-0 [&>[data-slot=select-value]]:truncate`,`max-w-full`,e),...r,children:[n,(0,P.jsx)(pe,{asChild:!0,children:(0,P.jsx)(w,{className:`size-4 opacity-50`})})]})}function ut({className:e,children:t,position:n=`popper`,returnFocus:r,...i}){let a=N.useContext(ot),o=p(`menu`,r);return(0,P.jsx)(_e,{children:(0,P.jsxs)(ve,{"data-slot":`select-content`,"data-select-of":a,className:g(`relative z-50 max-h-(--radix-select-content-available-height) max-w-(--radix-select-content-available-width) min-w-[min(8rem,var(--radix-select-content-available-width))] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-lg border border-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`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...i,ref:o.ref,onCloseAutoFocus:o.onCloseAutoFocus,children:[(0,P.jsx)(Ge,{className:`flex cursor-default items-center justify-center py-1`,children:(0,P.jsx)(E,{className:`size-4`})}),(0,P.jsx)(je,{className:g(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,P.jsx)(qe,{className:`flex cursor-default items-center justify-center py-1`,children:(0,P.jsx)(w,{className:`size-4`})})]})})}function dt({className:e,children:t,...n}){return(0,P.jsxs)(Be,{"data-slot":`select-item`,className:g(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,P.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,P.jsx)(Ue,{children:(0,P.jsx)(S,{className:`size-4`})})}),(0,P.jsx)(Ve,{children:t})]})}export{ct as a,lt as i,ut as n,R as o,dt as r,st as t};
1
+ import{a as e,i as t,l as n,r}from"./bundle-mjs-C73ZY4La.js";import{O as i,S as a,T as o,b as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,o as g,p as _,s as v,u as y,v as b,x}from"./api-D64JTta1.js";import{t as S}from"./check-pVsND9oZ.js";import{n as C,r as w,t as T}from"./dist-C0V3m4aH.js";import{t as E}from"./chevron-up-s_deZUWR.js";import{t as D}from"./dist-DDCmobc1.js";import{a as O,i as ee,n as k,r as A,t as j}from"./dist-BtzRSR0_.js";var M=n(t(),1),N=n(e(),1),P=r(),F=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`}),I=`VisuallyHidden`,L=N.forwardRef((e,t)=>(0,P.jsx)(a.span,{...e,ref:t,style:{...F,...e.style}}));L.displayName=I;var R=L;function z(e,[t,n]){return Math.min(n,Math.max(t,e))}var B=[` `,`Enter`,`ArrowUp`,`ArrowDown`],V=[` `,`Enter`],H=`Select`,[U,W,te]=C(H),[G,ne]=b(H,[te,O]),K=O(),[re,q]=G(H),[J,ie]=G(H),ae=`SelectProvider`;function oe(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,v=K(t),[y,b]=N.useState(null),[x,S]=N.useState(null),[C,w]=N.useState(!1),E=T(l),[D,O]=f({prop:r,defaultProp:i??!1,onChange:a,caller:H}),[k,A]=f({prop:o,defaultProp:s,onChange:c,caller:H}),j=N.useRef(null),M=!y||!!h||!!y.closest(`form`),[F,I]=N.useState(new Set),L=_(),R=Array.from(F).map(e=>e.props.value).join(`;`),z=N.useCallback(e=>{I(t=>new Set(t).add(e))},[]),B=N.useCallback(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),V={required:m,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:L,value:k,onValueChange:A,open:D,onOpenChange:O,dir:E,triggerPointerDownPosRef:j,disabled:p,name:u,autoComplete:d,form:h,nativeOptions:F,nativeSelectKey:R,isFormControl:M};return(0,P.jsx)(ee,{...v,children:(0,P.jsx)(re,{scope:t,...V,children:(0,P.jsx)(U.Provider,{scope:t,children:(0,P.jsx)(J,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:tt(g)?g(V):n})})})})}oe.displayName=ae;var se=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(oe,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(et,{__scopeSelect:t}):null]})})};se.displayName=H;var ce=`SelectTrigger`,le=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,s=K(n),c=q(ce,n),l=c.disabled||r,u=i(t,c.onTriggerChange),d=W(n),f=N.useRef(`touch`),[p,m,h]=rt(e=>{let t=d().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,P.jsx)(j,{asChild:!0,...s,children:(0,P.jsx)(a.button,{type:`button`,role:`combobox`,"aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":nt(c.value)?``:void 0,...o,ref:u,onClick:x(o.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:x(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:x(o.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&B.includes(e.key)&&(g(),e.preventDefault())})})})});le.displayName=ce;var ue=`SelectValue`,de=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:s,placeholder:c=``,...l}=e,u=q(ue,n),{onValueNodeHasChildrenChange:f}=u,p=s!==void 0,m=i(t,u.onValueNodeChange);d(()=>{f(p)},[f,p]);let h=nt(u.value);return(0,P.jsx)(a.span,{...l,asChild:!h&&l.asChild,ref:m,style:{pointerEvents:`none`},children:(0,P.jsx)(N.Fragment,{children:h?c:s},h?`placeholder`:`value`)})});de.displayName=ue;var fe=`SelectIcon`,pe=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(a.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});pe.displayName=fe;var me=`SelectPortal`,[he,ge]=G(me,{forceMount:void 0}),_e=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(he,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(y,{asChild:!0,...r})})};_e.displayName=me;var Y=`SelectContent`,ve=N.forwardRef((e,t)=>{let n=ge(Y,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=q(Y,e.__scopeSelect),[o,s]=N.useState();return d(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(h,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(Ce,{...i,ref:t}):(0,P.jsx)(ye,{...i,fragment:o})})});ve.displayName=Y;var ye=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?M.createPortal((0,P.jsx)(be,{scope:n,children:(0,P.jsx)(U.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null});ye.displayName=`SelectContentFragment`;var X=10,[be,Z]=G(Y),xe=`SelectContentImpl`,Se=o(`SelectContent.RemoveScroll`),Ce=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:f,align:p,alignOffset:h,arrowPadding:g,collisionBoundary:_,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=q(Y,n),[E,D]=N.useState(null),[O,ee]=N.useState(null),k=i(t,e=>D(e)),[A,j]=N.useState(null),[M,F]=N.useState(null),I=W(n),[L,R]=N.useState(!1),z=N.useRef(!1);N.useEffect(()=>{if(E)return v(E)},[E]),m();let B=N.useCallback(e=>{let[t,...n]=I().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[I,O]),V=N.useCallback(()=>B([A,E]),[B,A,E]);N.useEffect(()=>{L&&V()},[L,V]);let{onOpenChange:H,triggerPointerDownPosRef:U}=T;N.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||H(!1),document.removeEventListener(`pointermove`,t),U.current=null};return U.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,H,U]),N.useEffect(()=>{let e=()=>H(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[H]);let[te,G]=rt(e=>{let t=I().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=N.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&(j(e),r&&(z.current=!0))},[T.value]),K=N.useCallback(()=>E?.focus(),[E]),re=N.useCallback((e,t,n)=>{let r=!z.current&&!n;(T.value!==void 0&&T.value===t||r)&&F(e)},[T.value]),J=r===`popper`?De:Te,ie=J===De?{side:d,sideOffset:f,align:p,alignOffset:h,arrowPadding:g,collisionBoundary:_,collisionPadding:y,sticky:b,hideWhenDetached:S,avoidCollisions:C}:{};return(0,P.jsx)(be,{scope:n,content:E,viewport:O,onViewportChange:ee,itemRefCallback:ne,selectedItem:A,onItemLeave:K,itemTextRefCallback:re,focusSelectedItem:V,selectedItemText:M,position:r,isPositioned:L,searchRef:te,children:(0,P.jsx)(c,{as:Se,allowPinchZoom:!0,children:(0,P.jsx)(l,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:x(a,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(u,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,P.jsx)(J,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...ie,onPlaced:()=>R(!0),ref:k,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:x(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&G(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});Ce.displayName=xe;var we=`SelectItemAlignedPosition`,Te=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,s=q(Y,n),c=Z(Y,n),[l,u]=N.useState(null),[f,p]=N.useState(null),m=i(t,e=>p(e)),h=W(n),g=N.useRef(!1),_=N.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=c,S=N.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&f&&v&&y&&b){let e=s.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(s.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-X,d=z(a,[X,Math.max(X,u-c)]);l.style.minWidth=s+`px`,l.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-X,d=z(a,[X,Math.max(X,u-c)]);l.style.minWidth=s+`px`,l.style.right=d+`px`}let a=h(),o=window.innerHeight-X*2,c=v.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=d+p+c+_+m,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-X,D=o-E,O=y.offsetHeight/2,ee=y.offsetTop+O,k=d+p+ee,A=x-k;if(k<=E){let e=a.length>0&&y===a[a.length-1].ref.current;l.style.bottom=`0px`;let t=f.clientHeight-v.offsetTop-v.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+m);l.style.height=n+`px`}else{let e=a.length>0&&y===a[0].ref.current;l.style.top=`0px`;let t=Math.max(E,d+v.offsetTop+(e?w:0)+O)+A;l.style.height=t+`px`,v.scrollTop=k-E+v.offsetTop}l.style.margin=`${X}px 0`,l.style.minHeight=S+`px`,l.style.maxHeight=o+`px`,r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,l,f,v,y,b,s.dir,r]);d(()=>S(),[S]);let[C,w]=N.useState();return d(()=>{f&&w(window.getComputedStyle(f).zIndex)},[f]),(0,P.jsx)(Oe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:N.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,P.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,P.jsx)(a.div,{...o,ref:m,style:{boxSizing:`border-box`,maxHeight:`100%`,...o.style}})})})});Te.displayName=we;var Ee=`SelectPopperPosition`,De=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=X,...a}=e,o=K(n);return(0,P.jsx)(A,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});De.displayName=Ee;var[Oe,ke]=G(Y,{}),Ae=`SelectViewport`,je=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,s=Z(Ae,n),c=ke(Ae,n),l=i(t,s.onViewportChange),u=N.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(U.Slot,{scope:n,children:(0,P.jsx)(a.div,{"data-radix-select-viewport":``,role:`presentation`,...o,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...o.style},onScroll:x(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-X*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});je.displayName=Ae;var Me=`SelectGroup`,[Ne,Pe]=G(Me),Fe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=_();return(0,P.jsx)(Ne,{scope:n,id:i,children:(0,P.jsx)(a.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Fe.displayName=Me;var Ie=`SelectLabel`,Le=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Pe(Ie,n);return(0,P.jsx)(a.div,{id:i.id,...r,ref:t})});Le.displayName=Ie;var Q=`SelectItem`,[Re,ze]=G(Q),Be=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,l=q(Q,n),u=Z(Q,n),d=l.value===r,[f,p]=N.useState(s??``),[m,h]=N.useState(!1),g=i(t,e=>u.itemRefCallback?.(e,r,o)),v=_(),y=N.useRef(`touch`),b=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,P.jsx)(Re,{scope:n,value:r,disabled:o,textId:v,isSelected:d,onItemTextChange:N.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(U.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:(0,P.jsx)(a.div,{role:`option`,"aria-labelledby":v,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":o||void 0,"data-disabled":o?``:void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:x(c.onFocus,()=>h(!0)),onBlur:x(c.onBlur,()=>h(!1)),onClick:x(c.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:x(c.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:x(c.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:x(c.onPointerMove,e=>{y.current=e.pointerType,o?u.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:x(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:x(c.onKeyDown,e=>{u.searchRef?.current!==``&&e.key===` `||(V.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})});Be.displayName=Q;var $=`SelectItemText`,Ve=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...s}=e,c=q($,n),l=Z($,n),u=ze($,n),f=ie($,n),[p,m]=N.useState(null),h=i(t,e=>m(e),u.onItemTextChange,e=>l.itemTextRefCallback?.(e,u.value,u.disabled)),g=p?.textContent,_=N.useMemo(()=>(0,P.jsx)(`option`,{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return d(()=>(v(_),()=>y(_)),[v,y,_]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?M.createPortal(s.children,c.valueNode):null]})});Ve.displayName=$;var He=`SelectItemIndicator`,Ue=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ze(He,n).isSelected?(0,P.jsx)(a.span,{"aria-hidden":!0,...r,ref:t}):null});Ue.displayName=He;var We=`SelectScrollUpButton`,Ge=N.forwardRef((e,t)=>{let n=Z(We,e.__scopeSelect),r=ke(We,e.__scopeSelect),[a,o]=N.useState(!1),s=i(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;o(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),a?(0,P.jsx)(Je,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ge.displayName=We;var Ke=`SelectScrollDownButton`,qe=N.forwardRef((e,t)=>{let n=Z(Ke,e.__scopeSelect),r=ke(Ke,e.__scopeSelect),[a,o]=N.useState(!1),s=i(t,r.onScrollButtonChange);return d(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),a?(0,P.jsx)(Je,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});qe.displayName=Ke;var Je=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Z(`SelectScrollButton`,n),s=N.useRef(null),c=W(n),l=N.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return N.useEffect(()=>()=>l(),[l]),d(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),(0,P.jsx)(a.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:x(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:x(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:x(i.onPointerLeave,()=>{l()})})}),Ye=`SelectSeparator`,Xe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,P.jsx)(a.div,{"aria-hidden":!0,...r,ref:t})});Xe.displayName=Ye;var Ze=`SelectArrow`,Qe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=K(n);return Z(Ze,n).position===`popper`?(0,P.jsx)(k,{...i,...r,ref:t}):null});Qe.displayName=Ze;var $e=`SelectBubbleInput`,et=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=q($e,e),{value:o,onValueChange:s,required:c,disabled:l,name:u,autoComplete:d,form:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=N.useRef(null),g=i(n,h),_=o??``,v=D(_);return N.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(v!==_&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,_),e.dispatchEvent(t)}},[v,_]),(0,P.jsxs)(a.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:u,autoComplete:d,disabled:l,form:f,onChange:e=>s(e.target.value),...t,style:{...F,...t.style},ref:g,defaultValue:_,children:[nt(o)?(0,P.jsx)(`option`,{value:``}):null,Array.from(p)]},m)});et.displayName=$e;function tt(e){return typeof e==`function`}function nt(e){return e===``||e===void 0}function rt(e){let t=s(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function it(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=at(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function at(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ot=N.createContext(void 0);function st(e){let t=N.useId();return(0,P.jsx)(ot.Provider,{value:t,children:(0,P.jsx)(se,{"data-slot":`select`,...e})})}function ct(e){return(0,P.jsx)(de,{"data-slot":`select-value`,...e})}function lt({className:e,size:t=`default`,children:n,...r}){let i=N.useContext(ot);return(0,P.jsxs)(le,{"data-slot":`select-trigger`,"data-select-trigger":i,"data-size":t,className:g(`flex w-fit items-center justify-between gap-2 rounded-lg border border-input bg-background px-2.5 py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`[&>[data-slot=select-value]]:min-w-0 [&>[data-slot=select-value]]:truncate`,`max-w-full`,e),...r,children:[n,(0,P.jsx)(pe,{asChild:!0,children:(0,P.jsx)(w,{className:`size-4 opacity-50`})})]})}function ut({className:e,children:t,position:n=`popper`,returnFocus:r,...i}){let a=N.useContext(ot),o=p(`menu`,r);return(0,P.jsx)(_e,{children:(0,P.jsxs)(ve,{"data-slot":`select-content`,"data-select-of":a,className:g(`relative z-50 max-h-(--radix-select-content-available-height) max-w-(--radix-select-content-available-width) min-w-[min(8rem,var(--radix-select-content-available-width))] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-lg border border-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`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...i,ref:o.ref,onCloseAutoFocus:o.onCloseAutoFocus,children:[(0,P.jsx)(Ge,{className:`flex cursor-default items-center justify-center py-1`,children:(0,P.jsx)(E,{className:`size-4`})}),(0,P.jsx)(je,{className:g(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,P.jsx)(qe,{className:`flex cursor-default items-center justify-center py-1`,children:(0,P.jsx)(w,{className:`size-4`})})]})})}function dt({className:e,children:t,...n}){return(0,P.jsxs)(Be,{"data-slot":`select-item`,className:g(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,P.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,P.jsx)(Ue,{children:(0,P.jsx)(S,{className:`size-4`})})}),(0,P.jsx)(Ve,{children:t})]})}export{ct as a,lt as i,ut as n,R as o,dt as r,st as t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]);export{t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),n=e(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),r=e(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]);function i(e,t){return e&&e!==`auto`?e:t.startsWith(`fr`)?`fr-FR`:t.startsWith(`en`)?`en-US`:t||`fr-FR`}function a(e){let t=e;return t=t.replace(/```[\s\S]*?```/g,` (bloc de code) `),t=t.replace(/`([^`]+)`/g,`$1`),t=t.replace(/!\[[^\]]*\]\([^)]*\)/g,` `),t=t.replace(/\[([^\]]+)\]\([^)]*\)/g,`$1`),t=t.replace(/^#{1,6}\s+/gm,``),t=t.replace(/^\s*>\s?/gm,``),t=t.replace(/^\s*[-*+]\s+/gm,``),t=t.replace(/^\s*\d+\.\s+/gm,``),t=t.replace(/^\s*([-_*]\s*){3,}$/gm,` `),t=t.replace(/^\s*\|(.+)\|\s*$/gm,(e,t)=>t.split(`|`).map(e=>e.trim()).filter(e=>e&&!/^:?-{2,}:?$/.test(e)).join(`, `)),t=t.replace(/(\*\*|__|\*|_|~~)/g,``),t=t.replace(/[ \t]+/g,` `).replace(/\n{2,}/g,`. `).replace(/\n/g,` `),t.trim()}function o(){return typeof window<`u`&&`speechSynthesis`in window}function s(e,t){if(!o())return!1;let n=window.speechSynthesis,r=new SpeechSynthesisUtterance(e);return r.lang=t.lang,r.rate=Math.min(2,Math.max(.5,t.rate||1)),t.onEnd&&(r.onend=t.onEnd,r.onerror=t.onEnd),n.speaking||n.pending?(n.cancel(),window.setTimeout(()=>n.speak(r),60)):n.speak(r),!0}function c(){o()&&window.speechSynthesis.cancel()}function l(){if(typeof window>`u`)return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function u(){return l()!==null}var d=2500,f=new Set([`not-allowed`,`service-not-allowed`,`audio-capture`,`language-not-supported`,`aborted`]),p=[0,300,1e3,2500],m=3e3,h=5e3,g=2e4,_=3e3,v=`engine-gave-up`;function y(e){let t=l();if(!t)return null;let n=()=>Date.now(),r=(e,t)=>setTimeout(e,t),i=e=>clearTimeout(e),a=0,o=null,s=null,c=0,u=!1,y=0,b=0,x=``,S=!1,C=!1,w=!1,T=!1,E=null,D=null,O=null,k=0,A=null,j=null,M=()=>{D!==null&&i(D),D=null,A=null},N=()=>{T||(T=!0,M(),E!==null&&i(E),E=null,O!==null&&i(O),O=null,j=null,s=null,C||e.onInterim?.(``),e.onEnd())},P=t=>{let r=o??n(),i=a!==0&&r-a>d;a=n(),o=null,e.onText(t,{paragraph:i})},F=(t,i=!1)=>{if(t!==s)return;if(s=null,M(),!C&&!w&&x.trim()!==``&&P(x),x=``,S||w){N();return}if(u?(y=0,b=0):i||n()-c<m?y+=1:b+=1,y>p.length||b>12){e.onError(v),N();return}e.onInterim?.(``);let a=y===0?0:p[y-1]??0;E=r(()=>{if(E=null,S){N();return}I()||(e.onError(v),N())},a)},I=()=>{let a=new t;a.lang=e.lang,a.interimResults=e.onInterim!==void 0,a.continuous=!0,a.onresult=t=>{if(a!==s||C)return;let r=t,i=n(),c=``;for(let e=r.resultIndex;e<r.results.length;e++){let t=r.results[e];t?.[0]?.transcript&&(u=!0,t.isFinal?P(t[0].transcript):c+=t[0].transcript)}c!==``&&o===null&&(o=i),x=c,A?.(),j?.(),e.onInterim?.(c)},a.onend=()=>F(a),a.onerror=t=>{if(a!==s)return;let n=String(t.error??`unknown`);S||f.has(n)&&(w=!0,e.onError(n))},a.onaudioend=()=>{if(a!==s||S)return;M();let e=()=>{D!==null&&i(D),D=r(()=>{if(D=null,A=null,!(a!==s||S)){try{a.abort?.()}catch{}F(a,!0)}},_)};A=e,e()},s=a,c=n(),u=!1;try{a.start()}catch{return s=null,!1}return!0};if(!I())return null;let L=e=>{if(T)return;S=!0,e===`discard`&&(C=!0);let t=s;if(t===null){N();return}if(M(),e===`stop`){k=n();let e=()=>{O!==null&&i(O);let e=Math.min(h,Math.max(0,k+g-n()));O=r(()=>{if(O=null,j=null,t===s){try{t.abort?.()}catch{}F(t)}},e)};j=e,e()}try{e===`discard`&&t.abort!==void 0?t.abort():t.stop()}catch{F(t)}};return{stop:()=>L(`stop`),discard:()=>L(`discard`)}}var b=null;function x(e,t,n){try{S();let r=new Audio(`data:${t};base64,${e}`);return r.playbackRate=Math.min(2,Math.max(.5,n?.rate??1)),b=r,n?.onEnd&&(r.onended=n.onEnd,r.onerror=n.onEnd),r.play().catch(()=>n?.onEnd?.()),!0}catch{return!1}}function S(){b&&=(b.pause(),b.onended=null,b.onerror=null,null)}export{i as a,S as c,o as d,r as f,x as i,c as l,t as m,g as n,s as o,n as p,u as r,y as s,v as t,a as u};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),n=e(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),r=e(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]);function i(e,t){return e&&e!==`auto`?e:t.startsWith(`fr`)?`fr-FR`:t.startsWith(`en`)?`en-US`:t||`fr-FR`}function a(e){let t=e;return t=t.replace(/```[\s\S]*?```/g,` (bloc de code) `),t=t.replace(/`([^`]+)`/g,`$1`),t=t.replace(/!\[[^\]]*\]\([^)]*\)/g,` `),t=t.replace(/\[([^\]]+)\]\([^)]*\)/g,`$1`),t=t.replace(/^#{1,6}\s+/gm,``),t=t.replace(/^\s*>\s?/gm,``),t=t.replace(/^\s*[-*+]\s+/gm,``),t=t.replace(/^\s*\d+\.\s+/gm,``),t=t.replace(/^\s*([-_*]\s*){3,}$/gm,` `),t=t.replace(/^\s*\|(.+)\|\s*$/gm,(e,t)=>t.split(`|`).map(e=>e.trim()).filter(e=>e&&!/^:?-{2,}:?$/.test(e)).join(`, `)),t=t.replace(/(\*\*|__|\*|_|~~)/g,``),t=t.replace(/[ \t]+/g,` `).replace(/\n{2,}/g,`. `).replace(/\n/g,` `),t.trim()}function o(){return typeof window<`u`&&`speechSynthesis`in window}function s(e,t){if(!o())return!1;let n=window.speechSynthesis,r=new SpeechSynthesisUtterance(e);return r.lang=t.lang,r.rate=Math.min(2,Math.max(.5,t.rate||1)),t.onEnd&&(r.onend=t.onEnd,r.onerror=t.onEnd),n.speaking||n.pending?(n.cancel(),window.setTimeout(()=>n.speak(r),60)):n.speak(r),!0}function c(){o()&&window.speechSynthesis.cancel()}function l(){if(typeof window>`u`)return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function u(){return l()!==null}var d=2500,f=new Set([`not-allowed`,`service-not-allowed`,`audio-capture`,`language-not-supported`,`aborted`]),p=[0,300,1e3,2500],m=3e3,h=5e3,g=2e4,_=3e3,v=`engine-gave-up`;function y(e){let t=l();if(!t)return null;let n=()=>Date.now(),r=(e,t)=>setTimeout(e,t),i=e=>clearTimeout(e),a=0,o=null,s=null,c=0,u=!1,y=0,b=0,x=``,S=!1,C=!1,w=!1,T=!1,E=null,D=null,O=null,k=0,A=null,j=null,M=()=>{D!==null&&i(D),D=null,A=null},N=()=>{T||(T=!0,M(),E!==null&&i(E),E=null,O!==null&&i(O),O=null,j=null,s=null,C||e.onInterim?.(``),e.onEnd())},P=t=>{let r=o??n(),i=a!==0&&r-a>d;a=n(),o=null,e.onText(t,{paragraph:i})},F=(t,i=!1)=>{if(t!==s)return;if(s=null,M(),!C&&!w&&x.trim()!==``&&P(x),x=``,S||w){N();return}if(u?(y=0,b=0):i||n()-c<m?y+=1:b+=1,y>p.length||b>12){e.onError(v),N();return}e.onInterim?.(``);let a=y===0?0:p[y-1]??0;E=r(()=>{if(E=null,S){N();return}I()||(e.onError(v),N())},a)},I=()=>{let a=new t;a.lang=e.lang,a.interimResults=e.onInterim!==void 0,a.continuous=!0,a.onresult=t=>{if(a!==s||C)return;let r=t,i=n(),c=``;for(let e=r.resultIndex;e<r.results.length;e++){let t=r.results[e];t?.[0]?.transcript&&(u=!0,t.isFinal?P(t[0].transcript):c+=t[0].transcript)}c!==``&&o===null&&(o=i),x=c,A?.(),j?.(),e.onInterim?.(c)},a.onend=()=>F(a),a.onerror=t=>{if(a!==s)return;let n=String(t.error??`unknown`);S||f.has(n)&&(w=!0,e.onError(n))},a.onaudioend=()=>{if(a!==s||S)return;M();let e=()=>{D!==null&&i(D),D=r(()=>{if(D=null,A=null,!(a!==s||S)){try{a.abort?.()}catch{}F(a,!0)}},_)};A=e,e()},s=a,c=n(),u=!1;try{a.start()}catch{return s=null,!1}return!0};if(!I())return null;let L=e=>{if(T)return;S=!0,e===`discard`&&(C=!0);let t=s;if(t===null){N();return}if(M(),e===`stop`){k=n();let e=()=>{O!==null&&i(O);let e=Math.min(h,Math.max(0,k+g-n()));O=r(()=>{if(O=null,j=null,t===s){try{t.abort?.()}catch{}F(t)}},e)};j=e,e()}try{e===`discard`&&t.abort!==void 0?t.abort():t.stop()}catch{F(t)}};return{stop:()=>L(`stop`),discard:()=>L(`discard`)}}var b=null;function x(e,t,n){try{S();let r=new Audio(`data:${t};base64,${e}`);return r.playbackRate=Math.min(2,Math.max(.5,n?.rate??1)),b=r,n?.onEnd&&(r.onended=n.onEnd,r.onerror=n.onEnd),r.play().catch(()=>n?.onEnd?.()),!0}catch{return!1}}function S(){b&&=(b.pause(),b.onended=null,b.onerror=null,null)}export{i as a,S as c,o as d,r as f,x as i,c as l,t as m,g as n,s as o,n as p,u as r,y as s,v as t,a as u};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]);export{t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-CWqdeSbN.js";e();var r=t();function i({className:e,checked:t,onCheckedChange:i,disabled:a,...o}){return(0,r.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-state":t?`checked`:`unchecked`,disabled:a,onClick:()=>i(!t),className:n(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent transition-colors outline-none`,`focus-visible:ring-2 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,t?`bg-primary`:`bg-input`,e),...o,children:(0,r.jsx)(`span`,{className:n(`pointer-events-none block size-4 rounded-full bg-background shadow transition-transform`,t?`translate-x-[18px]`:`translate-x-[2px]`)})})}export{i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-D64JTta1.js";e();var r=t();function i({className:e,checked:t,onCheckedChange:i,disabled:a,...o}){return(0,r.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-state":t?`checked`:`unchecked`,disabled:a,onClick:()=>i(!t),className:n(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent transition-colors outline-none`,`focus-visible:ring-2 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,t?`bg-primary`:`bg-input`,e),...o,children:(0,r.jsx)(`span`,{className:n(`pointer-events-none block size-4 rounded-full bg-background shadow transition-transform`,t?`translate-x-[18px]`:`translate-x-[2px]`)})})}export{i as t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-CWqdeSbN.js";e();var r=t();function i({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,r.jsx)(`table`,{"data-slot":`table`,className:n(`w-full caption-bottom text-sm`,e),...t})})}function a({className:e,...t}){return(0,r.jsx)(`thead`,{"data-slot":`table-header`,className:n(`[&_tr]:border-b`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`tbody`,{"data-slot":`table-body`,className:n(`[&_tr:last-child]:border-0`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`tr`,{"data-slot":`table-row`,className:n(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`th`,{"data-slot":`table-head`,className:n(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`td`,{"data-slot":`table-cell`,className:n(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}export{a,c as i,o as n,s as o,l as r,i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{o as n}from"./api-D64JTta1.js";e();var r=t();function i({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,r.jsx)(`table`,{"data-slot":`table`,className:n(`w-full caption-bottom text-sm`,e),...t})})}function a({className:e,...t}){return(0,r.jsx)(`thead`,{"data-slot":`table-header`,className:n(`[&_tr]:border-b`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`tbody`,{"data-slot":`table-body`,className:n(`[&_tr:last-child]:border-0`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`tr`,{"data-slot":`table-row`,className:n(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`th`,{"data-slot":`table-head`,className:n(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`td`,{"data-slot":`table-cell`,className:n(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}export{a,c as i,o as n,s as o,l as r,i as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,h as i,m as a,n as o,o as s,p as c,v as l,x as u}from"./api-CWqdeSbN.js";import{t as d}from"./dist-CzmY6YrA.js";import{n as f,r as p,t as m}from"./dist-Bu9sqVcp.js";var h=t(e(),1),g=n(),_=`Tabs`,[v,y]=l(_,[p]),b=p(),[x,S]=v(_),C=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:l=`horizontal`,dir:u,activationMode:f=`automatic`,...p}=e,m=d(u),[h,v]=i({prop:a,onChange:o,defaultProp:s??``,caller:_});return(0,g.jsx)(x,{scope:n,baseId:c(),value:h,onValueChange:v,orientation:l,dir:m,activationMode:f,children:(0,g.jsx)(r.div,{dir:m,"data-orientation":l,...p,ref:t})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=S(w,n),s=b(n);return(0,g.jsx)(f,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,g.jsx)(r.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=S(E,n),c=b(n),l=A(s.baseId,i),d=j(s.baseId,i),f=i===s.value;return(0,g.jsx)(m,{asChild:!0,...c,focusable:!a,active:f,children:(0,g.jsx)(r.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:u(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:u(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:u(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!a&&e&&s.onValueChange(i)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:o,children:s,...c}=e,l=S(O,n),u=A(l.baseId,i),d=j(l.baseId,i),f=i===l.value,p=h.useRef(f);return h.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(a,{present:o||f,children:({present:n})=>(0,g.jsx)(r.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&s})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I(e){let t=e.margin??0,n=e.itemStart+e.itemSize;if(e.itemStart>=e.scrollStart&&n<=e.scrollStart+e.viewSize)return null;let r=e.itemStart<e.scrollStart||e.itemSize+2*t>=e.viewSize?e.itemStart-t:n+t-e.viewSize;return Math.max(0,Math.min(e.maxScroll??1/0,r))}function L(e,t,n){let r=t;if(r===null||typeof r.closest!=`function`)return;let i=r.closest(n);i!==null&&e.contains(i)&&R(e,i)}function R(e,t,n=12){if(!t)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=I({scrollStart:e.scrollLeft,viewSize:e.clientWidth,itemStart:i.left-r.left-e.clientLeft+e.scrollLeft,itemSize:i.width,margin:n,maxScroll:e.scrollWidth-e.clientWidth});a!==null&&(e.scrollLeft=a)}function z(e){if(e.ctrlKey||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return null;let t=e.scrollWidth-e.clientWidth;if(t<1)return null;let n=e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*e.clientWidth:e.deltaY;return n<0&&e.scrollLeft<.5||n>0&&e.scrollLeft>t-.5?null:Math.max(0,Math.min(t,e.scrollLeft+n))}function B({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,className:s(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var V=o(`group/tabs-list inline-flex w-fit max-w-full items-center justify-start rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function H({className:e,variant:t=`default`,ref:n,...r}){let i=h.useRef(null),a=h.useCallback(e=>{i.current=e,typeof n==`function`?n(e):n&&(n.current=e)},[n]),o=h.useRef(null);return h.useLayoutEffect(()=>{let e=i.current;if(!e)return;let t=e.querySelector(`[data-slot="tabs-trigger"][data-state="active"]`);t!==o.current&&(o.current=t,R(e,t))}),h.useLayoutEffect(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>R(e,e.querySelector(`[data-slot="tabs-trigger"][data-state="active"]`)));return t.observe(e),()=>t.disconnect()},[]),h.useEffect(()=>{let e=i.current;if(!e)return;let t=t=>L(e,t.target,`[data-slot="tabs-trigger"]`);return e.addEventListener(`focusin`,t),()=>e.removeEventListener(`focusin`,t)},[]),h.useEffect(()=>{let e=i.current;if(!e||t!=="default")return;let n=t=>{if(e.getAttribute(`aria-orientation`)===`vertical`)return;let n=z({deltaX:t.deltaX,deltaY:t.deltaY,deltaMode:t.deltaMode,ctrlKey:t.ctrlKey,scrollLeft:e.scrollLeft,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth});n!==null&&(t.preventDefault(),e.scrollLeft=n)};return e.addEventListener(`wheel`,n,{passive:!1}),()=>e.removeEventListener(`wheel`,n)},[t]),(0,g.jsx)(N,{ref:a,"data-slot":`tabs-list`,"data-variant":t,className:s(V({variant:t}),e),...r})}function U({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:s(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function W({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:s(`flex-1 text-sm outline-none`,e),...t})}export{L as a,U as i,W as n,R as o,H as r,B as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,h as i,m as a,n as o,o as s,p as c,v as l,x as u}from"./api-D64JTta1.js";import{t as d}from"./dist-C0V3m4aH.js";import{n as f,r as p,t as m}from"./dist-B4zBnzNF.js";var h=t(e(),1),g=n(),_=`Tabs`,[v,y]=l(_,[p]),b=p(),[x,S]=v(_),C=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:a,onValueChange:o,defaultValue:s,orientation:l=`horizontal`,dir:u,activationMode:f=`automatic`,...p}=e,m=d(u),[h,v]=i({prop:a,onChange:o,defaultProp:s??``,caller:_});return(0,g.jsx)(x,{scope:n,baseId:c(),value:h,onValueChange:v,orientation:l,dir:m,activationMode:f,children:(0,g.jsx)(r.div,{dir:m,"data-orientation":l,...p,ref:t})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=S(w,n),s=b(n);return(0,g.jsx)(f,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,g.jsx)(r.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=S(E,n),c=b(n),l=A(s.baseId,i),d=j(s.baseId,i),f=i===s.value;return(0,g.jsx)(m,{asChild:!0,...c,focusable:!a,active:f,children:(0,g.jsx)(r.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:u(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:u(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:u(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!a&&e&&s.onValueChange(i)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:o,children:s,...c}=e,l=S(O,n),u=A(l.baseId,i),d=j(l.baseId,i),f=i===l.value,p=h.useRef(f);return h.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(a,{present:o||f,children:({present:n})=>(0,g.jsx)(r.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&s})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I(e){let t=e.margin??0,n=e.itemStart+e.itemSize;if(e.itemStart>=e.scrollStart&&n<=e.scrollStart+e.viewSize)return null;let r=e.itemStart<e.scrollStart||e.itemSize+2*t>=e.viewSize?e.itemStart-t:n+t-e.viewSize;return Math.max(0,Math.min(e.maxScroll??1/0,r))}function L(e,t,n){let r=t;if(r===null||typeof r.closest!=`function`)return;let i=r.closest(n);i!==null&&e.contains(i)&&R(e,i)}function R(e,t,n=12){if(!t)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=I({scrollStart:e.scrollLeft,viewSize:e.clientWidth,itemStart:i.left-r.left-e.clientLeft+e.scrollLeft,itemSize:i.width,margin:n,maxScroll:e.scrollWidth-e.clientWidth});a!==null&&(e.scrollLeft=a)}function z(e){if(e.ctrlKey||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return null;let t=e.scrollWidth-e.clientWidth;if(t<1)return null;let n=e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*e.clientWidth:e.deltaY;return n<0&&e.scrollLeft<.5||n>0&&e.scrollLeft>t-.5?null:Math.max(0,Math.min(t,e.scrollLeft+n))}function B({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,className:s(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var V=o(`group/tabs-list inline-flex w-fit max-w-full items-center justify-start rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function H({className:e,variant:t=`default`,ref:n,...r}){let i=h.useRef(null),a=h.useCallback(e=>{i.current=e,typeof n==`function`?n(e):n&&(n.current=e)},[n]),o=h.useRef(null);return h.useLayoutEffect(()=>{let e=i.current;if(!e)return;let t=e.querySelector(`[data-slot="tabs-trigger"][data-state="active"]`);t!==o.current&&(o.current=t,R(e,t))}),h.useLayoutEffect(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>R(e,e.querySelector(`[data-slot="tabs-trigger"][data-state="active"]`)));return t.observe(e),()=>t.disconnect()},[]),h.useEffect(()=>{let e=i.current;if(!e)return;let t=t=>L(e,t.target,`[data-slot="tabs-trigger"]`);return e.addEventListener(`focusin`,t),()=>e.removeEventListener(`focusin`,t)},[]),h.useEffect(()=>{let e=i.current;if(!e||t!=="default")return;let n=t=>{if(e.getAttribute(`aria-orientation`)===`vertical`)return;let n=z({deltaX:t.deltaX,deltaY:t.deltaY,deltaMode:t.deltaMode,ctrlKey:t.ctrlKey,scrollLeft:e.scrollLeft,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth});n!==null&&(t.preventDefault(),e.scrollLeft=n)};return e.addEventListener(`wheel`,n,{passive:!1}),()=>e.removeEventListener(`wheel`,n)},[t]),(0,g.jsx)(N,{ref:a,"data-slot":`tabs-list`,"data-variant":t,className:s(V({variant:t}),e),...r})}function U({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:s(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function W({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:s(`flex-1 text-sm outline-none`,e),...t})}export{L as a,U as i,W as n,R as o,H as r,B as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Cb as r,Lf as i,Rf as a,o}from"./api-CWqdeSbN.js";import{t as s}from"./x-CcIT4ync.js";var c=t(e(),1),l=n(),u=c.createContext(null),d=6e3;function f(e){let t=e?.data;if(typeof t==`string`&&t)return t;if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return a()}}function p({children:e}){let[t,n]=c.useState([]),a=c.useRef(0),p=c.useRef(new Map),m=c.useCallback(e=>{n(t=>t.filter(t=>t.id!==e));let t=p.current.get(e);t!==void 0&&(window.clearTimeout(t),p.current.delete(e))},[]),h=c.useCallback(e=>{let t=a.current++,r={id:t,variant:e.variant??`info`,title:e.title,description:e.description};n(e=>[...e,r]);let i=window.setTimeout(()=>m(t),d);p.current.set(t,i)},[m]);c.useEffect(()=>{let e=p.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]);let g=c.useMemo(()=>({toast:h,error:(e,t)=>h({variant:`error`,title:e,description:t===void 0?void 0:f(t)}),success:(e,t)=>h({variant:`success`,title:e,description:t})}),[h]);return(0,l.jsxs)(u.Provider,{value:g,children:[e,(0,l.jsx)(`div`,{className:`oc-toast__viewport`,role:`region`,"aria-label":i(),children:t.map(e=>(0,l.jsxs)(`div`,{className:o(`oc-toast`,`oc-toast--${e.variant}`),role:e.variant===`error`?`alert`:`status`,children:[(0,l.jsxs)(`div`,{className:`oc-toast__body`,children:[(0,l.jsx)(`div`,{className:`oc-toast__title`,children:e.title}),e.description?(0,l.jsx)(`div`,{className:`oc-toast__desc`,children:e.description}):null]}),(0,l.jsx)(`button`,{type:`button`,className:`oc-toast__close`,"aria-label":r(),onClick:()=>m(e.id),children:(0,l.jsx)(s,{"aria-hidden":!0})})]},e.id))})]})}function m(){let e=c.useContext(u);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}export{f as n,m as r,p as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Cb as r,Lf as i,Rf as a,o}from"./api-D64JTta1.js";import{t as s}from"./x-BNU-sWkh.js";var c=t(e(),1),l=n(),u=c.createContext(null),d=6e3;function f(e){let t=e?.data;if(typeof t==`string`&&t)return t;if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return String(e)}catch{return a()}}function p({children:e}){let[t,n]=c.useState([]),a=c.useRef(0),p=c.useRef(new Map),m=c.useCallback(e=>{n(t=>t.filter(t=>t.id!==e));let t=p.current.get(e);t!==void 0&&(window.clearTimeout(t),p.current.delete(e))},[]),h=c.useCallback(e=>{let t=a.current++,r={id:t,variant:e.variant??`info`,title:e.title,description:e.description};n(e=>[...e,r]);let i=window.setTimeout(()=>m(t),d);p.current.set(t,i)},[m]);c.useEffect(()=>{let e=p.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]);let g=c.useMemo(()=>({toast:h,error:(e,t)=>h({variant:`error`,title:e,description:t===void 0?void 0:f(t)}),success:(e,t)=>h({variant:`success`,title:e,description:t})}),[h]);return(0,l.jsxs)(u.Provider,{value:g,children:[e,(0,l.jsx)(`div`,{className:`oc-toast__viewport`,role:`region`,"aria-label":i(),children:t.map(e=>(0,l.jsxs)(`div`,{className:o(`oc-toast`,`oc-toast--${e.variant}`),role:e.variant===`error`?`alert`:`status`,children:[(0,l.jsxs)(`div`,{className:`oc-toast__body`,children:[(0,l.jsx)(`div`,{className:`oc-toast__title`,children:e.title}),e.description?(0,l.jsx)(`div`,{className:`oc-toast__desc`,children:e.description}):null]}),(0,l.jsx)(`button`,{type:`button`,className:`oc-toast__close`,"aria-label":r(),onClick:()=>m(e.id),children:(0,l.jsx)(s,{"aria-hidden":!0})})]},e.id))})]})}function m(){let e=c.useContext(u);if(!e)throw Error(`useToast must be used within <ToastProvider>`);return e}export{f as n,m as r,p as t};
@@ -1,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{E as r,O as i,S as a,f as o,h as s,m as c,o as l,p as u,u as d,v as f,x as p}from"./api-CWqdeSbN.js";import{o as m}from"./select-CjcMQhwm.js";import{a as h,i as ee,n as g,r as _,t as v}from"./dist-BjZo0sql.js";var y={media_delivery:{key:`media_delivery`,appliedIn:`bridge`,togglable:!0,placeholders:[`outboundDir`],defaultTemplate:{fr:`[LIVRAISON]
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{E as r,O as i,S as a,f as o,h as s,m as c,o as l,p as u,u as d,v as f,x as p}from"./api-D64JTta1.js";import{o as m}from"./select-wXM6h61N.js";import{a as h,i as ee,n as g,r as _,t as v}from"./dist-BtzRSR0_.js";var y={media_delivery:{key:`media_delivery`,appliedIn:`bridge`,togglable:!0,placeholders:[`outboundDir`],defaultTemplate:{fr:`[LIVRAISON]
2
2
  Pour qu'un fichier que tu génères soit téléchargeable par l'utilisateur dans ce webchat : écris-le sous {outboundDir}/ puis ajoute, dans ta réponse finale, une ligne dédiée EXACTEMENT au format MEDIA:<chemin absolu du fichier>. N'utilise PAS de lien markdown vers un chemin local — il ne serait pas cliquable.`,en:`[DELIVERY]
3
3
  To make a file you generate downloadable by the user in this webchat: write it under {outboundDir}/ then add, in your final reply, a dedicated line EXACTLY in the format MEDIA:<absolute file path>. Do NOT use a markdown link to a local path — it would not be clickable.`}},documentary_fetch:{key:`documentary_fetch`,appliedIn:`convex`,togglable:!0,placeholders:[`references`],defaultTemplate:{fr:`Fournis les fichiers source téléchargeables correspondant EXACTEMENT à ces références de documents (un fichier par référence, nommé d'après la référence). Réponds uniquement avec les fichiers, sans commentaire :
4
4
  {references}`,en:`Provide the downloadable source files matching EXACTLY these document references (one file per reference, named after the reference). Reply only with the files, no commentary:
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
@@ -1 +1 @@
1
- import{r as e}from"./bundle-mjs-C73ZY4La.js";import{cO as t,dO as n,fO as r,iO as i,lO as a,pO as o,uO as s,yk as c}from"./api-CWqdeSbN.js";import{t as l}from"./rotate-ccw-CvefWwHW.js";import{t as u}from"./trash-2-xhtrhYsd.js";import{t as d}from"./button-C_rIPtCv.js";import{t as f}from"./format-AQELUhPa.js";import{n as p}from"./ConfirmDialog-B7k0wvSi.js";import{n as m}from"./trashView-CwUC01r_.js";var h=e();function g({status:e,loadMore:t}){return e!==`CanLoadMore`&&e!==`LoadingMore`?null:(0,h.jsx)(d,{variant:`outline`,size:`sm`,className:`self-start`,disabled:e===`LoadingMore`,onClick:()=>t(50),children:i()})}function _({items:e,onRestore:i,onPurge:g}){let _=p();return(0,h.jsx)(`ul`,{className:`oc-trash__list`,children:e.map(e=>(0,h.jsxs)(`li`,{className:`oc-trash__item`,children:[(0,h.jsxs)(`div`,{className:`oc-trash__meta`,children:[(0,h.jsx)(`span`,{className:`oc-trash__title`,children:e.title||c()}),(0,h.jsxs)(`span`,{className:`oc-trash__dates`,children:[e.owner===void 0?null:(0,h.jsxs)(`span`,{className:`oc-trash__owner`,children:[e.owner,` · `]}),o({date:f(e.trashedAt)}),e.purgeAfter===null?null:` · ${r({date:m(e.purgeAfter)})}`]})]}),(0,h.jsxs)(`div`,{className:`oc-trash__actions`,children:[(0,h.jsxs)(d,{variant:`outline`,size:`sm`,onClick:()=>void i(e._id),children:[(0,h.jsx)(l,{}),` `,n()]}),(0,h.jsxs)(d,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:async()=>{await _({title:a(),description:t(),confirmLabel:s(),destructive:!0})&&await g(e._id)},children:[(0,h.jsx)(u,{}),` `,s()]})]})]},e._id))})}export{g as n,_ as t};
1
+ import{r as e}from"./bundle-mjs-C73ZY4La.js";import{cO as t,dO as n,fO as r,iO as i,lO as a,pO as o,uO as s,yk as c}from"./api-D64JTta1.js";import{t as l}from"./rotate-ccw-CiOuaG2h.js";import{t as u}from"./trash-2-CqKGt3lC.js";import{t as d}from"./button-DeHzYOzP.js";import{t as f}from"./format-g5Z3Txjl.js";import{n as p}from"./ConfirmDialog-Bfi4_Ti8.js";import{n as m}from"./trashView-TIQT30u4.js";var h=e();function g({status:e,loadMore:t}){return e!==`CanLoadMore`&&e!==`LoadingMore`?null:(0,h.jsx)(d,{variant:`outline`,size:`sm`,className:`self-start`,disabled:e===`LoadingMore`,onClick:()=>t(50),children:i()})}function _({items:e,onRestore:i,onPurge:g}){let _=p();return(0,h.jsx)(`ul`,{className:`oc-trash__list`,children:e.map(e=>(0,h.jsxs)(`li`,{className:`oc-trash__item`,children:[(0,h.jsxs)(`div`,{className:`oc-trash__meta`,children:[(0,h.jsx)(`span`,{className:`oc-trash__title`,children:e.title||c()}),(0,h.jsxs)(`span`,{className:`oc-trash__dates`,children:[e.owner===void 0?null:(0,h.jsxs)(`span`,{className:`oc-trash__owner`,children:[e.owner,` · `]}),o({date:f(e.trashedAt)}),e.purgeAfter===null?null:` · ${r({date:m(e.purgeAfter)})}`]})]}),(0,h.jsxs)(`div`,{className:`oc-trash__actions`,children:[(0,h.jsxs)(d,{variant:`outline`,size:`sm`,onClick:()=>void i(e._id),children:[(0,h.jsx)(l,{}),` `,n()]}),(0,h.jsxs)(d,{variant:`ghost`,size:`sm`,className:`text-destructive`,onClick:async()=>{await _({title:a(),description:t(),confirmLabel:s(),destructive:!0})&&await g(e._id)},children:[(0,h.jsx)(u,{}),` `,s()]})]})]},e._id))})}export{g as n,_ as t};
@@ -1 +1 @@
1
- import{EO as e,bQ as t,ck as n,fQ as r,sk as i,t as a}from"./api-CWqdeSbN.js";import"./convexApi-G20_TNBS.js";function o(){return t(a.trash.retention,{})?.days??30}function s({folders:t,chats:r,days:a}){return t>0?i({folders:t,chats:r,days:a}):r>0?n({count:r,days:a}):e()}function c(e,t=r()){return new Date(e).toLocaleDateString(t,{day:`2-digit`,month:`2-digit`})}export{c as n,o as r,s as t};
1
+ import{EO as e,bQ as t,ck as n,fQ as r,sk as i,t as a}from"./api-D64JTta1.js";import"./convexApi-DxRiI80M.js";function o(){return t(a.trash.retention,{})?.days??30}function s({folders:t,chats:r,days:a}){return t>0?i({folders:t,chats:r,days:a}):r>0?n({count:r,days:a}):e()}function c(e,t=r()){return new Date(e).toLocaleDateString(t,{day:`2-digit`,month:`2-digit`})}export{c as n,o as r,s as t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
@@ -1 +1 @@
1
- import{k as e,kU as t}from"./api-CWqdeSbN.js";var n=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);function r(e,n){if(e===null||e<=n)return null;let r=Math.floor((e-n)/6e4);if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24){let e=r%60;return e>0?`${i}h ${e}m`:`${i}h`}return`${Math.floor(i/24)}${t()} ${i%24}h`}function i(e,t){if(!e||e.length===0)return null;let n=[];for(let i of e)for(let e of i.windows)n.push({provider:i.provider,label:e.label,percentLeft:Math.round(Math.min(100,Math.max(0,100-e.usedPercent))),resetText:r(e.resetAt,t)});if(n.length===0)return null;let i=n.reduce((e,t)=>t.percentLeft<e.percentLeft?t:e),a=i.percentLeft<=10?`is-critical`:i.percentLeft<=25?`is-warn`:`is-ok`;return{percentLeft:i.percentLeft,label:i.label,resetText:i.resetText,level:a,windows:n}}export{n,i as t};
1
+ import{k as e,kU as t}from"./api-D64JTta1.js";var n=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);function r(e,n){if(e===null||e<=n)return null;let r=Math.floor((e-n)/6e4);if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24){let e=r%60;return e>0?`${i}h ${e}m`:`${i}h`}return`${Math.floor(i/24)}${t()} ${i%24}h`}function i(e,t){if(!e||e.length===0)return null;let n=[];for(let i of e)for(let e of i.windows)n.push({provider:i.provider,label:e.label,percentLeft:Math.round(Math.min(100,Math.max(0,100-e.usedPercent))),resetText:r(e.resetAt,t)});if(n.length===0)return null;let i=n.reduce((e,t)=>t.percentLeft<e.percentLeft?t:e),a=i.percentLeft<=10?`is-critical`:i.percentLeft<=25?`is-warn`:`is-ok`;return{percentLeft:i.percentLeft,label:i.label,resetText:i.resetText,level:a,windows:n}}export{n,i as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{k as n}from"./api-CWqdeSbN.js";var r=n(`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`}]]),i=t(e(),1),a=`background.foreground.card.card-foreground.popover.popover-foreground.primary.primary-foreground.secondary.secondary-foreground.muted.muted-foreground.accent.accent-foreground.destructive.destructive-foreground.border.input.ring.chart-1.chart-2.chart-3.chart-4.chart-5.sidebar.sidebar-foreground.sidebar-primary.sidebar-primary-foreground.sidebar-accent.sidebar-accent-foreground.sidebar-border.sidebar-ring.highlight.bookmark.voice`.split(`.`),o=[{key:`ocean`,name:`Ocean`,tokens:{colors:{light:{background:`oklch(0.985 0.012 230)`,foreground:`oklch(0.22 0.04 245)`,card:`oklch(0.995 0.008 230)`,"card-foreground":`oklch(0.22 0.04 245)`,popover:`oklch(0.995 0.008 230)`,"popover-foreground":`oklch(0.22 0.04 245)`,primary:`oklch(0.55 0.13 235)`,"primary-foreground":`oklch(0.99 0.01 230)`,secondary:`oklch(0.93 0.03 220)`,"secondary-foreground":`oklch(0.28 0.05 240)`,muted:`oklch(0.94 0.02 225)`,"muted-foreground":`oklch(0.5 0.04 235)`,accent:`oklch(0.9 0.05 200)`,"accent-foreground":`oklch(0.28 0.06 230)`,border:`oklch(0.88 0.03 225)`,input:`oklch(0.88 0.03 225)`,ring:`oklch(0.55 0.13 235)`,"chart-1":`oklch(0.6 0.13 235)`,"chart-2":`oklch(0.65 0.12 200)`,"chart-3":`oklch(0.55 0.1 260)`,"chart-4":`oklch(0.7 0.11 180)`,"chart-5":`oklch(0.5 0.12 215)`,sidebar:`oklch(0.96 0.02 228)`,"sidebar-foreground":`oklch(0.24 0.04 245)`,"sidebar-primary":`oklch(0.55 0.13 235)`,"sidebar-primary-foreground":`oklch(0.99 0.01 230)`,"sidebar-accent":`oklch(0.9 0.05 200)`,"sidebar-accent-foreground":`oklch(0.28 0.06 230)`,"sidebar-border":`oklch(0.87 0.03 225)`,"sidebar-ring":`oklch(0.55 0.13 235)`},dark:{background:`oklch(0.2 0.03 245)`,foreground:`oklch(0.95 0.02 225)`,card:`oklch(0.25 0.04 245)`,"card-foreground":`oklch(0.95 0.02 225)`,popover:`oklch(0.25 0.04 245)`,"popover-foreground":`oklch(0.95 0.02 225)`,primary:`oklch(0.7 0.12 230)`,"primary-foreground":`oklch(0.18 0.04 245)`,secondary:`oklch(0.3 0.04 240)`,"secondary-foreground":`oklch(0.95 0.02 225)`,muted:`oklch(0.3 0.03 242)`,"muted-foreground":`oklch(0.72 0.04 228)`,accent:`oklch(0.4 0.07 210)`,"accent-foreground":`oklch(0.96 0.02 220)`,border:`oklch(0.35 0.03 242)`,input:`oklch(0.35 0.03 242)`,ring:`oklch(0.7 0.12 230)`,"chart-1":`oklch(0.7 0.13 230)`,"chart-2":`oklch(0.72 0.12 195)`,"chart-3":`oklch(0.65 0.11 260)`,"chart-4":`oklch(0.76 0.1 180)`,"chart-5":`oklch(0.62 0.12 215)`,sidebar:`oklch(0.23 0.04 246)`,"sidebar-foreground":`oklch(0.95 0.02 225)`,"sidebar-primary":`oklch(0.7 0.12 230)`,"sidebar-primary-foreground":`oklch(0.18 0.04 245)`,"sidebar-accent":`oklch(0.4 0.07 210)`,"sidebar-accent-foreground":`oklch(0.96 0.02 220)`,"sidebar-border":`oklch(0.34 0.03 242)`,"sidebar-ring":`oklch(0.7 0.12 230)`}},radius:`0.75rem`,fontSans:`ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`}},{key:`forest`,name:`Forest`,tokens:{colors:{light:{background:`oklch(0.985 0.012 130)`,foreground:`oklch(0.24 0.04 145)`,card:`oklch(0.995 0.008 130)`,"card-foreground":`oklch(0.24 0.04 145)`,popover:`oklch(0.995 0.008 130)`,"popover-foreground":`oklch(0.24 0.04 145)`,primary:`oklch(0.52 0.12 150)`,"primary-foreground":`oklch(0.99 0.01 130)`,secondary:`oklch(0.93 0.04 130)`,"secondary-foreground":`oklch(0.3 0.05 150)`,muted:`oklch(0.94 0.03 135)`,"muted-foreground":`oklch(0.5 0.04 145)`,accent:`oklch(0.9 0.06 115)`,"accent-foreground":`oklch(0.3 0.06 150)`,border:`oklch(0.88 0.03 135)`,input:`oklch(0.88 0.03 135)`,ring:`oklch(0.52 0.12 150)`,"chart-1":`oklch(0.58 0.13 150)`,"chart-2":`oklch(0.68 0.12 120)`,"chart-3":`oklch(0.6 0.11 95)`,"chart-4":`oklch(0.55 0.1 175)`,"chart-5":`oklch(0.5 0.12 140)`,sidebar:`oklch(0.96 0.02 132)`,"sidebar-foreground":`oklch(0.26 0.04 145)`,"sidebar-primary":`oklch(0.52 0.12 150)`,"sidebar-primary-foreground":`oklch(0.99 0.01 130)`,"sidebar-accent":`oklch(0.9 0.06 115)`,"sidebar-accent-foreground":`oklch(0.3 0.06 150)`,"sidebar-border":`oklch(0.87 0.03 135)`,"sidebar-ring":`oklch(0.52 0.12 150)`},dark:{background:`oklch(0.2 0.03 150)`,foreground:`oklch(0.95 0.02 130)`,card:`oklch(0.25 0.04 150)`,"card-foreground":`oklch(0.95 0.02 130)`,popover:`oklch(0.25 0.04 150)`,"popover-foreground":`oklch(0.95 0.02 130)`,primary:`oklch(0.68 0.13 145)`,"primary-foreground":`oklch(0.18 0.04 150)`,secondary:`oklch(0.3 0.04 148)`,"secondary-foreground":`oklch(0.95 0.02 130)`,muted:`oklch(0.3 0.03 150)`,"muted-foreground":`oklch(0.72 0.04 135)`,accent:`oklch(0.4 0.07 120)`,"accent-foreground":`oklch(0.96 0.02 125)`,border:`oklch(0.35 0.03 148)`,input:`oklch(0.35 0.03 148)`,ring:`oklch(0.68 0.13 145)`,"chart-1":`oklch(0.68 0.14 148)`,"chart-2":`oklch(0.74 0.12 120)`,"chart-3":`oklch(0.68 0.11 95)`,"chart-4":`oklch(0.62 0.1 175)`,"chart-5":`oklch(0.6 0.12 140)`,sidebar:`oklch(0.23 0.04 150)`,"sidebar-foreground":`oklch(0.95 0.02 130)`,"sidebar-primary":`oklch(0.68 0.13 145)`,"sidebar-primary-foreground":`oklch(0.18 0.04 150)`,"sidebar-accent":`oklch(0.4 0.07 120)`,"sidebar-accent-foreground":`oklch(0.96 0.02 125)`,"sidebar-border":`oklch(0.34 0.03 148)`,"sidebar-ring":`oklch(0.68 0.13 145)`}},radius:`0.375rem`,fontSans:`Georgia, Cambria, 'Times New Roman', Times, serif`}},{key:`dusk`,name:`Dusk`,tokens:{colors:{light:{background:`oklch(0.985 0.012 300)`,foreground:`oklch(0.24 0.05 300)`,card:`oklch(0.995 0.008 300)`,"card-foreground":`oklch(0.24 0.05 300)`,popover:`oklch(0.995 0.008 300)`,"popover-foreground":`oklch(0.24 0.05 300)`,primary:`oklch(0.55 0.16 300)`,"primary-foreground":`oklch(0.99 0.01 300)`,secondary:`oklch(0.93 0.04 310)`,"secondary-foreground":`oklch(0.3 0.06 300)`,muted:`oklch(0.94 0.03 305)`,"muted-foreground":`oklch(0.5 0.05 300)`,accent:`oklch(0.9 0.07 70)`,"accent-foreground":`oklch(0.32 0.08 60)`,border:`oklch(0.88 0.03 305)`,input:`oklch(0.88 0.03 305)`,ring:`oklch(0.55 0.16 300)`,"chart-1":`oklch(0.58 0.17 300)`,"chart-2":`oklch(0.7 0.15 70)`,"chart-3":`oklch(0.55 0.15 330)`,"chart-4":`oklch(0.65 0.14 35)`,"chart-5":`oklch(0.5 0.16 280)`,sidebar:`oklch(0.96 0.02 303)`,"sidebar-foreground":`oklch(0.26 0.05 300)`,"sidebar-primary":`oklch(0.55 0.16 300)`,"sidebar-primary-foreground":`oklch(0.99 0.01 300)`,"sidebar-accent":`oklch(0.9 0.07 70)`,"sidebar-accent-foreground":`oklch(0.32 0.08 60)`,"sidebar-border":`oklch(0.87 0.03 305)`,"sidebar-ring":`oklch(0.55 0.16 300)`},dark:{background:`oklch(0.2 0.04 300)`,foreground:`oklch(0.95 0.02 305)`,card:`oklch(0.25 0.05 300)`,"card-foreground":`oklch(0.95 0.02 305)`,popover:`oklch(0.25 0.05 300)`,"popover-foreground":`oklch(0.95 0.02 305)`,primary:`oklch(0.72 0.15 300)`,"primary-foreground":`oklch(0.18 0.04 300)`,secondary:`oklch(0.3 0.05 305)`,"secondary-foreground":`oklch(0.95 0.02 305)`,muted:`oklch(0.3 0.04 303)`,"muted-foreground":`oklch(0.72 0.05 305)`,accent:`oklch(0.45 0.1 65)`,"accent-foreground":`oklch(0.96 0.02 70)`,border:`oklch(0.35 0.04 303)`,input:`oklch(0.35 0.04 303)`,ring:`oklch(0.72 0.15 300)`,"chart-1":`oklch(0.72 0.16 300)`,"chart-2":`oklch(0.78 0.14 70)`,"chart-3":`oklch(0.68 0.15 330)`,"chart-4":`oklch(0.72 0.13 35)`,"chart-5":`oklch(0.64 0.16 280)`,sidebar:`oklch(0.23 0.05 300)`,"sidebar-foreground":`oklch(0.95 0.02 305)`,"sidebar-primary":`oklch(0.72 0.15 300)`,"sidebar-primary-foreground":`oklch(0.18 0.04 300)`,"sidebar-accent":`oklch(0.45 0.1 65)`,"sidebar-accent-foreground":`oklch(0.96 0.02 70)`,"sidebar-border":`oklch(0.34 0.04 303)`,"sidebar-ring":`oklch(0.72 0.15 300)`}},radius:`1rem`,fontSans:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace`}}];new Set(o.map(e=>e.key));function s(e){let t=e??localStorage.getItem(`oc.theme`)??`system`,n=()=>t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t,[r,a]=(0,i.useState)(n);return(0,i.useEffect)(()=>{if(a(n()),t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>a(e.matches?`dark`:`light`);return e.addEventListener(`change`,r),()=>e.removeEventListener(`change`,r)},[t]),r}function c(e,t){let n=document.documentElement.style,r=e?.colors?.[t];for(let e of a){let t=r?.[e];t===void 0?n.removeProperty(`--`+e):n.setProperty(`--`+e,t)}e?.radius===void 0?n.removeProperty(`--radius`):n.setProperty(`--radius`,e.radius),e?.fontSans===void 0?n.removeProperty(`--ui-font-sans`):n.setProperty(`--ui-font-sans`,e.fontSans),e?.fontMono===void 0?n.removeProperty(`--ui-font-mono`):n.setProperty(`--ui-font-mono`,e.fontMono);let i=e?.bpm;i!==void 0&&i>0?n.setProperty(`--heart-period`,`${(60/Math.min(90,i)).toFixed(3)}s`):i===0?n.setProperty(`--heart-period`,`0s`):n.removeProperty(`--heart-period`)}function l(e,t){(0,i.useEffect)(()=>{c(e??null,t)},[e,t])}export{r as i,s as n,o as r,l as t};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{k as n}from"./api-D64JTta1.js";var r=n(`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`}]]),i=t(e(),1),a=`background.foreground.card.card-foreground.popover.popover-foreground.primary.primary-foreground.secondary.secondary-foreground.muted.muted-foreground.accent.accent-foreground.destructive.destructive-foreground.border.input.ring.chart-1.chart-2.chart-3.chart-4.chart-5.sidebar.sidebar-foreground.sidebar-primary.sidebar-primary-foreground.sidebar-accent.sidebar-accent-foreground.sidebar-border.sidebar-ring.highlight.bookmark.voice`.split(`.`),o=[{key:`ocean`,name:`Ocean`,tokens:{colors:{light:{background:`oklch(0.985 0.012 230)`,foreground:`oklch(0.22 0.04 245)`,card:`oklch(0.995 0.008 230)`,"card-foreground":`oklch(0.22 0.04 245)`,popover:`oklch(0.995 0.008 230)`,"popover-foreground":`oklch(0.22 0.04 245)`,primary:`oklch(0.55 0.13 235)`,"primary-foreground":`oklch(0.99 0.01 230)`,secondary:`oklch(0.93 0.03 220)`,"secondary-foreground":`oklch(0.28 0.05 240)`,muted:`oklch(0.94 0.02 225)`,"muted-foreground":`oklch(0.5 0.04 235)`,accent:`oklch(0.9 0.05 200)`,"accent-foreground":`oklch(0.28 0.06 230)`,border:`oklch(0.88 0.03 225)`,input:`oklch(0.88 0.03 225)`,ring:`oklch(0.55 0.13 235)`,"chart-1":`oklch(0.6 0.13 235)`,"chart-2":`oklch(0.65 0.12 200)`,"chart-3":`oklch(0.55 0.1 260)`,"chart-4":`oklch(0.7 0.11 180)`,"chart-5":`oklch(0.5 0.12 215)`,sidebar:`oklch(0.96 0.02 228)`,"sidebar-foreground":`oklch(0.24 0.04 245)`,"sidebar-primary":`oklch(0.55 0.13 235)`,"sidebar-primary-foreground":`oklch(0.99 0.01 230)`,"sidebar-accent":`oklch(0.9 0.05 200)`,"sidebar-accent-foreground":`oklch(0.28 0.06 230)`,"sidebar-border":`oklch(0.87 0.03 225)`,"sidebar-ring":`oklch(0.55 0.13 235)`},dark:{background:`oklch(0.2 0.03 245)`,foreground:`oklch(0.95 0.02 225)`,card:`oklch(0.25 0.04 245)`,"card-foreground":`oklch(0.95 0.02 225)`,popover:`oklch(0.25 0.04 245)`,"popover-foreground":`oklch(0.95 0.02 225)`,primary:`oklch(0.7 0.12 230)`,"primary-foreground":`oklch(0.18 0.04 245)`,secondary:`oklch(0.3 0.04 240)`,"secondary-foreground":`oklch(0.95 0.02 225)`,muted:`oklch(0.3 0.03 242)`,"muted-foreground":`oklch(0.72 0.04 228)`,accent:`oklch(0.4 0.07 210)`,"accent-foreground":`oklch(0.96 0.02 220)`,border:`oklch(0.35 0.03 242)`,input:`oklch(0.35 0.03 242)`,ring:`oklch(0.7 0.12 230)`,"chart-1":`oklch(0.7 0.13 230)`,"chart-2":`oklch(0.72 0.12 195)`,"chart-3":`oklch(0.65 0.11 260)`,"chart-4":`oklch(0.76 0.1 180)`,"chart-5":`oklch(0.62 0.12 215)`,sidebar:`oklch(0.23 0.04 246)`,"sidebar-foreground":`oklch(0.95 0.02 225)`,"sidebar-primary":`oklch(0.7 0.12 230)`,"sidebar-primary-foreground":`oklch(0.18 0.04 245)`,"sidebar-accent":`oklch(0.4 0.07 210)`,"sidebar-accent-foreground":`oklch(0.96 0.02 220)`,"sidebar-border":`oklch(0.34 0.03 242)`,"sidebar-ring":`oklch(0.7 0.12 230)`}},radius:`0.75rem`,fontSans:`ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif`}},{key:`forest`,name:`Forest`,tokens:{colors:{light:{background:`oklch(0.985 0.012 130)`,foreground:`oklch(0.24 0.04 145)`,card:`oklch(0.995 0.008 130)`,"card-foreground":`oklch(0.24 0.04 145)`,popover:`oklch(0.995 0.008 130)`,"popover-foreground":`oklch(0.24 0.04 145)`,primary:`oklch(0.52 0.12 150)`,"primary-foreground":`oklch(0.99 0.01 130)`,secondary:`oklch(0.93 0.04 130)`,"secondary-foreground":`oklch(0.3 0.05 150)`,muted:`oklch(0.94 0.03 135)`,"muted-foreground":`oklch(0.5 0.04 145)`,accent:`oklch(0.9 0.06 115)`,"accent-foreground":`oklch(0.3 0.06 150)`,border:`oklch(0.88 0.03 135)`,input:`oklch(0.88 0.03 135)`,ring:`oklch(0.52 0.12 150)`,"chart-1":`oklch(0.58 0.13 150)`,"chart-2":`oklch(0.68 0.12 120)`,"chart-3":`oklch(0.6 0.11 95)`,"chart-4":`oklch(0.55 0.1 175)`,"chart-5":`oklch(0.5 0.12 140)`,sidebar:`oklch(0.96 0.02 132)`,"sidebar-foreground":`oklch(0.26 0.04 145)`,"sidebar-primary":`oklch(0.52 0.12 150)`,"sidebar-primary-foreground":`oklch(0.99 0.01 130)`,"sidebar-accent":`oklch(0.9 0.06 115)`,"sidebar-accent-foreground":`oklch(0.3 0.06 150)`,"sidebar-border":`oklch(0.87 0.03 135)`,"sidebar-ring":`oklch(0.52 0.12 150)`},dark:{background:`oklch(0.2 0.03 150)`,foreground:`oklch(0.95 0.02 130)`,card:`oklch(0.25 0.04 150)`,"card-foreground":`oklch(0.95 0.02 130)`,popover:`oklch(0.25 0.04 150)`,"popover-foreground":`oklch(0.95 0.02 130)`,primary:`oklch(0.68 0.13 145)`,"primary-foreground":`oklch(0.18 0.04 150)`,secondary:`oklch(0.3 0.04 148)`,"secondary-foreground":`oklch(0.95 0.02 130)`,muted:`oklch(0.3 0.03 150)`,"muted-foreground":`oklch(0.72 0.04 135)`,accent:`oklch(0.4 0.07 120)`,"accent-foreground":`oklch(0.96 0.02 125)`,border:`oklch(0.35 0.03 148)`,input:`oklch(0.35 0.03 148)`,ring:`oklch(0.68 0.13 145)`,"chart-1":`oklch(0.68 0.14 148)`,"chart-2":`oklch(0.74 0.12 120)`,"chart-3":`oklch(0.68 0.11 95)`,"chart-4":`oklch(0.62 0.1 175)`,"chart-5":`oklch(0.6 0.12 140)`,sidebar:`oklch(0.23 0.04 150)`,"sidebar-foreground":`oklch(0.95 0.02 130)`,"sidebar-primary":`oklch(0.68 0.13 145)`,"sidebar-primary-foreground":`oklch(0.18 0.04 150)`,"sidebar-accent":`oklch(0.4 0.07 120)`,"sidebar-accent-foreground":`oklch(0.96 0.02 125)`,"sidebar-border":`oklch(0.34 0.03 148)`,"sidebar-ring":`oklch(0.68 0.13 145)`}},radius:`0.375rem`,fontSans:`Georgia, Cambria, 'Times New Roman', Times, serif`}},{key:`dusk`,name:`Dusk`,tokens:{colors:{light:{background:`oklch(0.985 0.012 300)`,foreground:`oklch(0.24 0.05 300)`,card:`oklch(0.995 0.008 300)`,"card-foreground":`oklch(0.24 0.05 300)`,popover:`oklch(0.995 0.008 300)`,"popover-foreground":`oklch(0.24 0.05 300)`,primary:`oklch(0.55 0.16 300)`,"primary-foreground":`oklch(0.99 0.01 300)`,secondary:`oklch(0.93 0.04 310)`,"secondary-foreground":`oklch(0.3 0.06 300)`,muted:`oklch(0.94 0.03 305)`,"muted-foreground":`oklch(0.5 0.05 300)`,accent:`oklch(0.9 0.07 70)`,"accent-foreground":`oklch(0.32 0.08 60)`,border:`oklch(0.88 0.03 305)`,input:`oklch(0.88 0.03 305)`,ring:`oklch(0.55 0.16 300)`,"chart-1":`oklch(0.58 0.17 300)`,"chart-2":`oklch(0.7 0.15 70)`,"chart-3":`oklch(0.55 0.15 330)`,"chart-4":`oklch(0.65 0.14 35)`,"chart-5":`oklch(0.5 0.16 280)`,sidebar:`oklch(0.96 0.02 303)`,"sidebar-foreground":`oklch(0.26 0.05 300)`,"sidebar-primary":`oklch(0.55 0.16 300)`,"sidebar-primary-foreground":`oklch(0.99 0.01 300)`,"sidebar-accent":`oklch(0.9 0.07 70)`,"sidebar-accent-foreground":`oklch(0.32 0.08 60)`,"sidebar-border":`oklch(0.87 0.03 305)`,"sidebar-ring":`oklch(0.55 0.16 300)`},dark:{background:`oklch(0.2 0.04 300)`,foreground:`oklch(0.95 0.02 305)`,card:`oklch(0.25 0.05 300)`,"card-foreground":`oklch(0.95 0.02 305)`,popover:`oklch(0.25 0.05 300)`,"popover-foreground":`oklch(0.95 0.02 305)`,primary:`oklch(0.72 0.15 300)`,"primary-foreground":`oklch(0.18 0.04 300)`,secondary:`oklch(0.3 0.05 305)`,"secondary-foreground":`oklch(0.95 0.02 305)`,muted:`oklch(0.3 0.04 303)`,"muted-foreground":`oklch(0.72 0.05 305)`,accent:`oklch(0.45 0.1 65)`,"accent-foreground":`oklch(0.96 0.02 70)`,border:`oklch(0.35 0.04 303)`,input:`oklch(0.35 0.04 303)`,ring:`oklch(0.72 0.15 300)`,"chart-1":`oklch(0.72 0.16 300)`,"chart-2":`oklch(0.78 0.14 70)`,"chart-3":`oklch(0.68 0.15 330)`,"chart-4":`oklch(0.72 0.13 35)`,"chart-5":`oklch(0.64 0.16 280)`,sidebar:`oklch(0.23 0.05 300)`,"sidebar-foreground":`oklch(0.95 0.02 305)`,"sidebar-primary":`oklch(0.72 0.15 300)`,"sidebar-primary-foreground":`oklch(0.18 0.04 300)`,"sidebar-accent":`oklch(0.45 0.1 65)`,"sidebar-accent-foreground":`oklch(0.96 0.02 70)`,"sidebar-border":`oklch(0.34 0.04 303)`,"sidebar-ring":`oklch(0.72 0.15 300)`}},radius:`1rem`,fontSans:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace`}}];new Set(o.map(e=>e.key));function s(e){let t=e??localStorage.getItem(`oc.theme`)??`system`,n=()=>t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t,[r,a]=(0,i.useState)(n);return(0,i.useEffect)(()=>{if(a(n()),t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>a(e.matches?`dark`:`light`);return e.addEventListener(`change`,r),()=>e.removeEventListener(`change`,r)},[t]),r}function c(e,t){let n=document.documentElement.style,r=e?.colors?.[t];for(let e of a){let t=r?.[e];t===void 0?n.removeProperty(`--`+e):n.setProperty(`--`+e,t)}e?.radius===void 0?n.removeProperty(`--radius`):n.setProperty(`--radius`,e.radius),e?.fontSans===void 0?n.removeProperty(`--ui-font-sans`):n.setProperty(`--ui-font-sans`,e.fontSans),e?.fontMono===void 0?n.removeProperty(`--ui-font-mono`):n.setProperty(`--ui-font-mono`,e.fontMono);let i=e?.bpm;i!==void 0&&i>0?n.setProperty(`--heart-period`,`${(60/Math.min(90,i)).toFixed(3)}s`):i===0?n.setProperty(`--heart-period`,`0s`):n.removeProperty(`--heart-period`)}function l(e,t){(0,i.useEffect)(()=>{c(e??null,t)},[e,t])}export{r as i,s as n,o as r,l as t};
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{t as n}from"./api-CWqdeSbN.js";import"./convexApi-G20_TNBS.js";import{t as r}from"./appHost-CH3EGcJw.js";var i={mod:!0,key:`k`},a={mod:!0,shift:!0,key:`o`},o={mod:!0,shift:!0,key:`ArrowUp`},s={mod:!0,shift:!0,key:`ArrowDown`};function c(e){return/mac/i.test(e)}function l(){if(typeof navigator>`u`)return``;let e=navigator;return e.userAgentData?.platform||e.platform||e.userAgent||``}var u=null;function d(){return u===null&&(u=c(l())),u}var f={arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`};function p(e,t){let n=f[e.key.toLowerCase()]??e.key.toUpperCase();if(t){let t=``;return e.alt&&(t+=`⌥`),e.shift&&(t+=`⇧`),e.mod&&(t+=`⌘`),t+n}let r=[];return e.mod&&r.push(`Ctrl`),e.shift&&r.push(`Shift`),e.alt&&r.push(`Alt`),r.push(n),r.join(`+`)}function m(e,t){let n=e.metaKey||e.ctrlKey;return!!t.mod!==n||!!t.shift!==e.shiftKey||!!t.alt!==e.altKey?!1:e.key.toLowerCase()===t.key.toLowerCase()||h(e.code)===t.key.toLowerCase()}function h(e){if(!e)return null;let t=/^Key([A-Z])$/.exec(e);if(t?.[1])return t[1].toLowerCase();let n=/^Digit([0-9])$/.exec(e);return n?.[1]?n[1]:null}function g(e){if(!/^[a-z0-9]$/i.test(e.key)||!e.mod&&!e.alt)return!1;let t=t=>!!e.mod==!!t.mod&&!!e.shift==!!t.shift&&!!e.alt==!!t.alt&&e.key.toLowerCase()===t.key.toLowerCase();return!t(i)&&!t(a)}function _(e){if([`Shift`,`Control`,`Meta`,`Alt`].includes(e.key))return null;let t=/^[a-z0-9]$/i.test(e.key)?e.key.toLowerCase():h(e.code)??e.key.toLowerCase(),n={...e.metaKey||e.ctrlKey?{mod:!0}:{},...e.shiftKey?{shift:!0}:{},...e.altKey?{alt:!0}:{},key:t};return g(n)?n:null}function v(e,{key:t,value:i}){let a=e.getQuery(n.me.getMe,{host:r});if(!a?.ui)return;let o={...a.ui.effective},s={...a.ui.userOverrides},c=t,l=t;i===null?delete s[l]:(o[c]=i,s[l]=i),e.setQuery(n.me.getMe,{host:r},{...a,ui:{...a.ui,effective:o,userOverrides:s}})}var y=t(e(),1),b=`oc.fontScale`,x={sm:`87.5%`,md:``,lg:`112.5%`,xl:`125%`,"2xl":`137.5%`,"3xl":`150%`},S=[`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`];function C(e){return e!==null&&S.includes(e)}function w(e){document.documentElement.style.fontSize=x[e]}function T(e){(0,y.useEffect)(()=>{let t=localStorage.getItem(b),n=e??(C(t)?t:`md`);localStorage.setItem(b,n),w(n)},[e])}export{o as a,d as c,p as d,s as i,m as l,T as n,a as o,v as r,i as s,S as t,_ as u};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{t as n}from"./api-D64JTta1.js";import"./convexApi-DxRiI80M.js";import{t as r}from"./appHost-CH3EGcJw.js";var i={mod:!0,key:`k`},a={mod:!0,shift:!0,key:`o`},o={mod:!0,shift:!0,key:`ArrowUp`},s={mod:!0,shift:!0,key:`ArrowDown`};function c(e){return/mac/i.test(e)}function l(){if(typeof navigator>`u`)return``;let e=navigator;return e.userAgentData?.platform||e.platform||e.userAgent||``}var u=null;function d(){return u===null&&(u=c(l())),u}var f={arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`};function p(e,t){let n=f[e.key.toLowerCase()]??e.key.toUpperCase();if(t){let t=``;return e.alt&&(t+=`⌥`),e.shift&&(t+=`⇧`),e.mod&&(t+=`⌘`),t+n}let r=[];return e.mod&&r.push(`Ctrl`),e.shift&&r.push(`Shift`),e.alt&&r.push(`Alt`),r.push(n),r.join(`+`)}function m(e,t){let n=e.metaKey||e.ctrlKey;return!!t.mod!==n||!!t.shift!==e.shiftKey||!!t.alt!==e.altKey?!1:e.key.toLowerCase()===t.key.toLowerCase()||h(e.code)===t.key.toLowerCase()}function h(e){if(!e)return null;let t=/^Key([A-Z])$/.exec(e);if(t?.[1])return t[1].toLowerCase();let n=/^Digit([0-9])$/.exec(e);return n?.[1]?n[1]:null}function g(e){if(!/^[a-z0-9]$/i.test(e.key)||!e.mod&&!e.alt)return!1;let t=t=>!!e.mod==!!t.mod&&!!e.shift==!!t.shift&&!!e.alt==!!t.alt&&e.key.toLowerCase()===t.key.toLowerCase();return!t(i)&&!t(a)}function _(e){if([`Shift`,`Control`,`Meta`,`Alt`].includes(e.key))return null;let t=/^[a-z0-9]$/i.test(e.key)?e.key.toLowerCase():h(e.code)??e.key.toLowerCase(),n={...e.metaKey||e.ctrlKey?{mod:!0}:{},...e.shiftKey?{shift:!0}:{},...e.altKey?{alt:!0}:{},key:t};return g(n)?n:null}function v(e,{key:t,value:i}){let a=e.getQuery(n.me.getMe,{host:r});if(!a?.ui)return;let o={...a.ui.effective},s={...a.ui.userOverrides},c=t,l=t;i===null?delete s[l]:(o[c]=i,s[l]=i),e.setQuery(n.me.getMe,{host:r},{...a,ui:{...a.ui,effective:o,userOverrides:s}})}var y=t(e(),1),b=`oc.fontScale`,x={sm:`87.5%`,md:``,lg:`112.5%`,xl:`125%`,"2xl":`137.5%`,"3xl":`150%`},S=[`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`];function C(e){return e!==null&&S.includes(e)}function w(e){document.documentElement.style.fontSize=x[e]}function T(e){(0,y.useEffect)(()=>{let t=localStorage.getItem(b),n=e??(C(t)?t:`md`);localStorage.setItem(b,n),w(n)},[e])}export{o as a,d as c,p as d,s as i,m as l,T as n,a as o,v as r,i as s,S as t,_ as u};
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,l as n,r}from"./bundle-mjs-C73ZY4La.js";import{$w as i,AO as a,CD as o,OO as s,Qw as c,TD as l,Zw as u,bQ as d,eT as f,iT as p,k as m,kO as h,nT as g,rT as _,t as v,tT as y,wD as b,yQ as x}from"./api-CWqdeSbN.js";import{r as S}from"./useNavigate-D3GIoxyW.js";import{t as C}from"./check-DdmANHSb.js";import{t as w}from"./server-DcInl3Nh.js";import{t as ee}from"./star-5ysDlx3k.js";import{t as T}from"./input-CSZu-bVE.js";import"./convexApi-G20_TNBS.js";import{t as E}from"./badge-ChMMFtuW.js";import{a as te,n as D,o as ne,r as re,t as O}from"./dialog-CPAskUwF.js";function k(e){return S({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}var A=m(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ie=m(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),j=m(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ae=m(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),M=m(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),oe=m(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),N=m(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),se=m(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),P=m(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),F=m(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),I=n(e(),1),L=120*1e3;function ce(e,t){if(!e)return null;if(e.kind===`repeated_failures`)return{kind:`repeated_failures`,tool:e.tool,failures:e.failures,sameTool:e.sameTool};let n=t-e.quietSince;return n>=12e4?{kind:`quiet_after_failure`,tool:e.tool,quietMs:n}:null}function R(e){return e?.kind===`failed_then_quiet`?e.quietSince+L:null}function le(e){return e.kind===`quiet_after_failure`?o({tool:e.tool,minutes:String(Math.floor(e.quietMs/6e4))}):e.sameTool?l({tool:e.tool,count:String(e.failures)}):b({tool:e.tool,count:String(e.failures)})}function ue(e,t){let n=new Map,r=new Map;for(let i of e??[]){let e=ce(i.facts,t);e!==null&&(r.set(i.messageId,e),n.has(i.chatId)||n.set(i.chatId,e))}return{byChat:n,byMessage:r}}function de(e,t){let n=null;for(let r of e??[]){let e=R(r.facts);if(e===null)continue;let i=e>t?e:t+3e4;n=n===null?i:Math.min(n,i)}return n}var z=(0,I.createContext)(new Map);function fe(e,t){return e?{className:`oc-chatitem__busy oc-chatitem__busy--struggling`,label:le(e),struggling:!0}:{className:`oc-chatitem__busy`,label:t,struggling:!1}}var pe=[];function me(e){let t=[...e??pe].sort().join(`,`),n=(0,I.useMemo)(()=>t===``?null:{chatIds:t.split(`,`)},[t]),r=d(v.chatReads.liveTurnDifficulty,n??`skip`),[i,a]=(0,I.useState)(()=>Date.now()),o=n===null?null:de(r,i);return(0,I.useEffect)(()=>{if(o===null)return;let e=window.setTimeout(()=>a(Date.now()),Math.max(o-Date.now(),0)+250);return()=>window.clearTimeout(e)},[o]),(0,I.useMemo)(()=>ue(n===null?void 0:r,Math.max(i,Date.now())),[r,i,n])}var he=n(t());function B(e){return new Map(e.map(e=>[e._id,e]))}function ge(e,t){let n=t.parentId??null;return n===null?null:e.has(n)?n:null}function _e(e){return[...e].sort((e,t)=>(e.sortKey??0)-(t.sortKey??0))}function V(e){let t=B(e);return _e(e.filter(e=>ge(t,e)===null))}function H(e,t){let n=B(e);return _e(e.filter(e=>ge(n,e)===t))}function ve(e,t){let n=B(e);if(!n.has(t))return[];let r=new Map;for(let t of e){let e=ge(n,t);if(e===null)continue;let i=r.get(e);i===void 0?r.set(e,[t._id]):i.push(t._id)}let i=[],a=new Set,o=[t];for(;o.length>0;){let e=o.shift();if(!a.has(e)){a.add(e),i.push(e);for(let t of r.get(e)??[])o.push(t)}}return i}function ye(e,t,n){return n===null?!1:n===t||ve(e,t).includes(n)}function U(e,t,n){return!(ye(e,t,n)||!e.some(e=>e._id===t)||n!==null&&!e.some(e=>e._id===n))}function be(e,t){let n=B(e),r=n.get(t);if(r===void 0)return[];let i=new Set([t]),a=[r];for(;;){let e=ge(n,r);if(e===null||i.has(e))return a.reverse();i.add(e),r=n.get(e),a.push(r)}}function xe(e,t){let n=be(e,t);return n.length>0?n[0]._id:t}function Se(e){let t=[],n=(r,i)=>{for(let a of H(e,r))t.push({node:a,depth:i}),n(a._id,i+1)};return n(null,1),t}var W=r();function Ce(e){let t=new Map;for(let n of e){let e=t.get(n.instanceName);e||(e={instanceName:n.instanceName,kind:n.kind,agents:[]},t.set(n.instanceName,e)),e.agents.push(n)}let n=e=>(e.displayName??e.agentId).toLowerCase();for(let e of t.values())e.agents.sort((e,t)=>e.isDefault===t.isDefault?n(e).localeCompare(n(t)):e.isDefault?-1:1);let r=[...t.values()],i=e=>e.agents.some(e=>e.isDefault);return r.sort((e,t)=>i(e)===i(t)?e.instanceName.localeCompare(t.instanceName):i(e)?-1:1),r}function we(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.displayName,e.agentId,e.instanceName,e.model,e.description].filter(Boolean).some(e=>e.toLowerCase().includes(n))):e}function Te({open:e,onOpenChange:t,returnFocus:n,agents:r,onPick:a}){let[o,s]=(0,I.useState)(``),l=(0,I.useMemo)(()=>Ce(we(r??[],o)),[r,o]);return(0,W.jsx)(O,{open:e,onOpenChange:t,children:(0,W.jsxs)(D,{className:`oc-agentpicker`,returnFocus:n,children:[(0,W.jsxs)(te,{children:[(0,W.jsx)(ne,{children:p()}),(0,W.jsx)(re,{children:_()})]}),r===void 0?(0,W.jsx)(`p`,{className:`oc-agentpicker__hint`,children:g()}):r.length===0?(0,W.jsx)(`p`,{className:`oc-agentpicker__hint`,children:y()}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(T,{autoFocus:!0,value:o,onChange:e=>s(e.target.value),placeholder:f(),className:`oc-agentpicker__search`,"aria-label":i()}),(0,W.jsx)(`div`,{className:`oc-agentpicker__list`,role:`listbox`,children:l.map(e=>(0,W.jsxs)(`div`,{className:`oc-agentpicker__group`,children:[(0,W.jsxs)(`div`,{className:`oc-agentpicker__instance`,children:[(0,W.jsx)(w,{size:13,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:e.instanceName}),(0,W.jsx)(E,{variant:`outline`,className:`oc-agentpicker__kind`,children:e.kind})]}),e.agents.map(e=>(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!1,className:`oc-agentpicker__item`,onClick:()=>a(e.instanceName,e.agentId),disabled:e.state===`deleted`,title:e.state===`deleted`?c():void 0,children:[(0,W.jsx)(A,{size:15,"aria-hidden":!0,className:`oc-agentpicker__icon`}),(0,W.jsxs)(`span`,{className:`oc-agentpicker__main`,children:[(0,W.jsxs)(`span`,{className:`oc-agentpicker__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.description?(0,W.jsx)(`span`,{className:`oc-agentpicker__desc`,children:e.description}):null]}),e.model?(0,W.jsx)(`span`,{className:`oc-agentpicker__model`,children:e.model}):null,e.isDefault?(0,W.jsx)(ee,{size:13,"aria-label":u(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}var Ee=null;function De(e,t){Ee={messageId:e,terms:t}}function Oe(e){if(Ee===null||Ee.messageId!==e)return null;let t=Ee.terms;return Ee=null,t}function ke(){var e=[...arguments];return(0,I.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Ae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function je(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Me(e){return`nodeType`in e}function G(e){return e?je(e)?e:Me(e)?e.ownerDocument?.defaultView??window:window:window}function Ne(e){let{Document:t}=G(e);return e instanceof t}function Pe(e){return!je(e)&&e instanceof G(e).HTMLElement}function Fe(e){return e instanceof G(e).SVGElement}function Ie(e){return e?je(e)?e.document:Me(e)?Ne(e)?e:Pe(e)||Fe(e)?e.ownerDocument:document:document:document}var K=Ae?I.useLayoutEffect:I.useEffect;function Le(e){let t=(0,I.useRef)(e);return K(()=>{t.current=e}),(0,I.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Re(){let e=(0,I.useRef)(null);return[(0,I.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,I.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function ze(e,t){t===void 0&&(t=[e]);let n=(0,I.useRef)(e);return K(()=>{n.current!==e&&(n.current=e)},t),n}function Be(e,t){let n=(0,I.useRef)();return(0,I.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ve(e){let t=Le(e),n=(0,I.useRef)(null);return[n,(0,I.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function He(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current}var Ue={};function We(e,t){return(0,I.useMemo)(()=>{if(t)return t;let n=Ue[e]==null?0:Ue[e]+1;return Ue[e]=n,e+`-`+n},[e,t])}function Ge(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Ke=Ge(1),qe=Ge(-1);function Je(e){return`clientX`in e&&`clientY`in e}function Ye(e){if(!e)return!1;let{KeyboardEvent:t}=G(e.target);return t&&e instanceof t}function Xe(e){if(!e)return!1;let{TouchEvent:t}=G(e.target);return t&&e instanceof t}function Ze(e){if(Xe(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Je(e)?{x:e.clientX,y:e.clientY}:null}var q=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[q.Translate.toString(e),q.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Qe=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function $e(e){return e.matches(Qe)?e:e.querySelector(Qe)}var et={display:`none`};function tt(e){let{id:t,value:n}=e;return I.createElement(`div`,{id:t,style:et},n)}function nt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return I.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function rt(){let[e,t]=(0,I.useState)(``);return{announce:(0,I.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var it=(0,I.createContext)(null);function at(e){let t=(0,I.useContext)(it);(0,I.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function ot(){let[e]=(0,I.useState)(()=>new Set),t=(0,I.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,I.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var st={draggable:`
1
+ import{a as e,i as t,l as n,r}from"./bundle-mjs-C73ZY4La.js";import{$w as i,AO as a,CD as o,OO as s,Qw as c,TD as l,Zw as u,bQ as d,eT as f,iT as p,k as m,kO as h,nT as g,rT as _,t as v,tT as y,wD as b,yQ as x}from"./api-D64JTta1.js";import{r as S}from"./useNavigate-D3GIoxyW.js";import{t as C}from"./check-pVsND9oZ.js";import{t as w}from"./server-C5TTb6-A.js";import{t as ee}from"./star-N2N0cbAA.js";import{t as T}from"./input-CZ0jp9Rx.js";import"./convexApi-DxRiI80M.js";import{t as E}from"./badge-DwWXPxwl.js";import{a as te,n as D,o as ne,r as re,t as O}from"./dialog-awuZdW9M.js";function k(e){return S({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}var A=m(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ie=m(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),j=m(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ae=m(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),M=m(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),oe=m(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),N=m(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),se=m(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),P=m(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),F=m(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),I=n(e(),1),L=120*1e3;function ce(e,t){if(!e)return null;if(e.kind===`repeated_failures`)return{kind:`repeated_failures`,tool:e.tool,failures:e.failures,sameTool:e.sameTool};let n=t-e.quietSince;return n>=12e4?{kind:`quiet_after_failure`,tool:e.tool,quietMs:n}:null}function R(e){return e?.kind===`failed_then_quiet`?e.quietSince+L:null}function le(e){return e.kind===`quiet_after_failure`?o({tool:e.tool,minutes:String(Math.floor(e.quietMs/6e4))}):e.sameTool?l({tool:e.tool,count:String(e.failures)}):b({tool:e.tool,count:String(e.failures)})}function ue(e,t){let n=new Map,r=new Map;for(let i of e??[]){let e=ce(i.facts,t);e!==null&&(r.set(i.messageId,e),n.has(i.chatId)||n.set(i.chatId,e))}return{byChat:n,byMessage:r}}function de(e,t){let n=null;for(let r of e??[]){let e=R(r.facts);if(e===null)continue;let i=e>t?e:t+3e4;n=n===null?i:Math.min(n,i)}return n}var z=(0,I.createContext)(new Map);function fe(e,t){return e?{className:`oc-chatitem__busy oc-chatitem__busy--struggling`,label:le(e),struggling:!0}:{className:`oc-chatitem__busy`,label:t,struggling:!1}}var pe=[];function me(e){let t=[...e??pe].sort().join(`,`),n=(0,I.useMemo)(()=>t===``?null:{chatIds:t.split(`,`)},[t]),r=d(v.chatReads.liveTurnDifficulty,n??`skip`),[i,a]=(0,I.useState)(()=>Date.now()),o=n===null?null:de(r,i);return(0,I.useEffect)(()=>{if(o===null)return;let e=window.setTimeout(()=>a(Date.now()),Math.max(o-Date.now(),0)+250);return()=>window.clearTimeout(e)},[o]),(0,I.useMemo)(()=>ue(n===null?void 0:r,Math.max(i,Date.now())),[r,i,n])}var he=n(t());function B(e){return new Map(e.map(e=>[e._id,e]))}function ge(e,t){let n=t.parentId??null;return n===null?null:e.has(n)?n:null}function _e(e){return[...e].sort((e,t)=>(e.sortKey??0)-(t.sortKey??0))}function V(e){let t=B(e);return _e(e.filter(e=>ge(t,e)===null))}function H(e,t){let n=B(e);return _e(e.filter(e=>ge(n,e)===t))}function ve(e,t){let n=B(e);if(!n.has(t))return[];let r=new Map;for(let t of e){let e=ge(n,t);if(e===null)continue;let i=r.get(e);i===void 0?r.set(e,[t._id]):i.push(t._id)}let i=[],a=new Set,o=[t];for(;o.length>0;){let e=o.shift();if(!a.has(e)){a.add(e),i.push(e);for(let t of r.get(e)??[])o.push(t)}}return i}function ye(e,t,n){return n===null?!1:n===t||ve(e,t).includes(n)}function U(e,t,n){return!(ye(e,t,n)||!e.some(e=>e._id===t)||n!==null&&!e.some(e=>e._id===n))}function be(e,t){let n=B(e),r=n.get(t);if(r===void 0)return[];let i=new Set([t]),a=[r];for(;;){let e=ge(n,r);if(e===null||i.has(e))return a.reverse();i.add(e),r=n.get(e),a.push(r)}}function xe(e,t){let n=be(e,t);return n.length>0?n[0]._id:t}function Se(e){let t=[],n=(r,i)=>{for(let a of H(e,r))t.push({node:a,depth:i}),n(a._id,i+1)};return n(null,1),t}var W=r();function Ce(e){let t=new Map;for(let n of e){let e=t.get(n.instanceName);e||(e={instanceName:n.instanceName,kind:n.kind,agents:[]},t.set(n.instanceName,e)),e.agents.push(n)}let n=e=>(e.displayName??e.agentId).toLowerCase();for(let e of t.values())e.agents.sort((e,t)=>e.isDefault===t.isDefault?n(e).localeCompare(n(t)):e.isDefault?-1:1);let r=[...t.values()],i=e=>e.agents.some(e=>e.isDefault);return r.sort((e,t)=>i(e)===i(t)?e.instanceName.localeCompare(t.instanceName):i(e)?-1:1),r}function we(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.displayName,e.agentId,e.instanceName,e.model,e.description].filter(Boolean).some(e=>e.toLowerCase().includes(n))):e}function Te({open:e,onOpenChange:t,returnFocus:n,agents:r,onPick:a}){let[o,s]=(0,I.useState)(``),l=(0,I.useMemo)(()=>Ce(we(r??[],o)),[r,o]);return(0,W.jsx)(O,{open:e,onOpenChange:t,children:(0,W.jsxs)(D,{className:`oc-agentpicker`,returnFocus:n,children:[(0,W.jsxs)(te,{children:[(0,W.jsx)(ne,{children:p()}),(0,W.jsx)(re,{children:_()})]}),r===void 0?(0,W.jsx)(`p`,{className:`oc-agentpicker__hint`,children:g()}):r.length===0?(0,W.jsx)(`p`,{className:`oc-agentpicker__hint`,children:y()}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(T,{autoFocus:!0,value:o,onChange:e=>s(e.target.value),placeholder:f(),className:`oc-agentpicker__search`,"aria-label":i()}),(0,W.jsx)(`div`,{className:`oc-agentpicker__list`,role:`listbox`,children:l.map(e=>(0,W.jsxs)(`div`,{className:`oc-agentpicker__group`,children:[(0,W.jsxs)(`div`,{className:`oc-agentpicker__instance`,children:[(0,W.jsx)(w,{size:13,"aria-hidden":!0}),(0,W.jsx)(`span`,{children:e.instanceName}),(0,W.jsx)(E,{variant:`outline`,className:`oc-agentpicker__kind`,children:e.kind})]}),e.agents.map(e=>(0,W.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":!1,className:`oc-agentpicker__item`,onClick:()=>a(e.instanceName,e.agentId),disabled:e.state===`deleted`,title:e.state===`deleted`?c():void 0,children:[(0,W.jsx)(A,{size:15,"aria-hidden":!0,className:`oc-agentpicker__icon`}),(0,W.jsxs)(`span`,{className:`oc-agentpicker__main`,children:[(0,W.jsxs)(`span`,{className:`oc-agentpicker__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.description?(0,W.jsx)(`span`,{className:`oc-agentpicker__desc`,children:e.description}):null]}),e.model?(0,W.jsx)(`span`,{className:`oc-agentpicker__model`,children:e.model}):null,e.isDefault?(0,W.jsx)(ee,{size:13,"aria-label":u(),className:`oc-agentpicker__default`}):null]},`${e.instanceName}/${e.agentId}`))]},e.instanceName))})]})]})})}var Ee=null;function De(e,t){Ee={messageId:e,terms:t}}function Oe(e){if(Ee===null||Ee.messageId!==e)return null;let t=Ee.terms;return Ee=null,t}function ke(){var e=[...arguments];return(0,I.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var Ae=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function je(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Me(e){return`nodeType`in e}function G(e){return e?je(e)?e:Me(e)?e.ownerDocument?.defaultView??window:window:window}function Ne(e){let{Document:t}=G(e);return e instanceof t}function Pe(e){return!je(e)&&e instanceof G(e).HTMLElement}function Fe(e){return e instanceof G(e).SVGElement}function Ie(e){return e?je(e)?e.document:Me(e)?Ne(e)?e:Pe(e)||Fe(e)?e.ownerDocument:document:document:document}var K=Ae?I.useLayoutEffect:I.useEffect;function Le(e){let t=(0,I.useRef)(e);return K(()=>{t.current=e}),(0,I.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Re(){let e=(0,I.useRef)(null);return[(0,I.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,I.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function ze(e,t){t===void 0&&(t=[e]);let n=(0,I.useRef)(e);return K(()=>{n.current!==e&&(n.current=e)},t),n}function Be(e,t){let n=(0,I.useRef)();return(0,I.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ve(e){let t=Le(e),n=(0,I.useRef)(null);return[n,(0,I.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function He(e){let t=(0,I.useRef)();return(0,I.useEffect)(()=>{t.current=e},[e]),t.current}var Ue={};function We(e,t){return(0,I.useMemo)(()=>{if(t)return t;let n=Ue[e]==null?0:Ue[e]+1;return Ue[e]=n,e+`-`+n},[e,t])}function Ge(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Ke=Ge(1),qe=Ge(-1);function Je(e){return`clientX`in e&&`clientY`in e}function Ye(e){if(!e)return!1;let{KeyboardEvent:t}=G(e.target);return t&&e instanceof t}function Xe(e){if(!e)return!1;let{TouchEvent:t}=G(e.target);return t&&e instanceof t}function Ze(e){if(Xe(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Je(e)?{x:e.clientX,y:e.clientY}:null}var q=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[q.Translate.toString(e),q.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Qe=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function $e(e){return e.matches(Qe)?e:e.querySelector(Qe)}var et={display:`none`};function tt(e){let{id:t,value:n}=e;return I.createElement(`div`,{id:t,style:et},n)}function nt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return I.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function rt(){let[e,t]=(0,I.useState)(``);return{announce:(0,I.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var it=(0,I.createContext)(null);function at(e){let t=(0,I.useContext)(it);(0,I.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function ot(){let[e]=(0,I.useState)(()=>new Set),t=(0,I.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,I.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var st={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -1 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{DQ as n,EQ as r,mQ as i,vQ as a,xQ as o}from"./api-CWqdeSbN.js";var s=t(e(),1),c=(e,t,n)=>r=>{let i={...r.queries},a=r.nextPageKey,o=r.nextPageKey+1,s=r.nextPageKey+2;i[a]={query:r.query,args:{...r.args,paginationOpts:{...r.queries[e].args.paginationOpts,endCursor:t}}},i[o]={query:r.query,args:{...r.args,paginationOpts:{...r.queries[e].args.paginationOpts,cursor:t,endCursor:n}}};let c={...r.ongoingSplits};return c[e]=[a,o],{...r,nextPageKey:s,queries:i,ongoingSplits:c}},l=e=>t=>{let n=t.ongoingSplits[e];if(n===void 0)return t;let r={...t.queries};delete r[e];let i={...t.ongoingSplits};delete i[e];let a=t.pageKeys.slice(),o=t.pageKeys.findIndex(t=>t===e);return o>=0&&(a=[...t.pageKeys.slice(0,o),...n,...t.pageKeys.slice(o+1)]),{...t,queries:r,pageKeys:a,ongoingSplits:i}};function u(e,t,n){let{user:r}=p(e,t,n,!0);return r}var d=Symbol(`includePageKeys`),f=Symbol(`page`);function p(e,t,u,p=!0){if(typeof u?.initialNumItems!=`number`||u.initialNumItems<0)throw Error(`\`options.initialNumItems\` must be a positive number. Received \`${u?.initialNumItems}\`.`);let m=t===`skip`,g=m?{}:t,_=o(e),v=(0,s.useMemo)(()=>()=>{let t=h();return{query:e,args:g,id:t,nextPageKey:1,pageKeys:m?[]:[0],queries:m?{}:{0:{query:e,args:{...g,paginationOpts:{numItems:u.initialNumItems,cursor:null,id:t}}}},ongoingSplits:{},skip:m}},[JSON.stringify(n(g)),_,u.initialNumItems,m]),[y,b]=(0,s.useState)(v),x=y;(o(e)!==o(y.query)||JSON.stringify(n(g))!==JSON.stringify(n(y.args))||m!==y.skip)&&(x=v(),b(x));let S=a().logger,C=i(x.queries),w=u[d]??!1,[T,E,D]=(0,s.useMemo)(()=>{let e,t=[];for(let n of x.pageKeys){if(e=C[n],e===void 0)break;if(e instanceof Error){if(e.message.includes(`InvalidCursor`)||e instanceof r&&typeof e.data==`object`&&e.data?.isConvexSystemError===!0&&e.data?.paginationError===`InvalidCursor`)return S.warn(`usePaginatedQuery hit error, resetting pagination state: `+e.message),b(v),[[],void 0,void 0];if(p)throw e;return[t,void 0,e]}let i=x.ongoingSplits[n];if(i===void 0?e.splitCursor&&(e.pageStatus===`SplitRecommended`||e.pageStatus===`SplitRequired`||e.page.length>u.initialNumItems*2)&&b(c(n,e.splitCursor,e.continueCursor)):C[i[0]]!==void 0&&C[i[1]]!==void 0&&b(l(n)),e.pageStatus===`SplitRequired`)return[t,void 0,void 0];t.push(...w?e.page.map(e=>({...e,[f]:n.toString()})):e.page)}return[t,e,void 0]},[C,x.pageKeys,x.ongoingSplits,u.initialNumItems,v,S,w,p]);return{user:{results:T,...(0,s.useMemo)(()=>{if(D!==void 0)return{status:`Error`,isLoading:!1,error:D,loadMore:()=>{}};if(E===void 0)return x.nextPageKey===1?{status:`LoadingFirstPage`,isLoading:!0,loadMore:()=>{}}:{status:`LoadingMore`,isLoading:!0,loadMore:e=>{}};if(E.isDone)return{status:`Exhausted`,isLoading:!1,loadMore:e=>{}};let e=E.continueCursor,t=!1;return{status:`CanLoadMore`,isLoading:!1,loadMore:n=>{t||(t=!0,b(t=>{let r=[...t.pageKeys,t.nextPageKey],i={...t.queries};return i[t.nextPageKey]={query:t.query,args:{...t.args,paginationOpts:{numItems:n,cursor:e,id:t.id}}},{...t,nextPageKey:t.nextPageKey+1,pageKeys:r,queries:i}}))}}},[D,E,x.nextPageKey])},internal:{state:x}}}var m=0;function h(){return m++,m}export{u as t};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{DQ as n,EQ as r,mQ as i,vQ as a,xQ as o}from"./api-D64JTta1.js";var s=t(e(),1),c=(e,t,n)=>r=>{let i={...r.queries},a=r.nextPageKey,o=r.nextPageKey+1,s=r.nextPageKey+2;i[a]={query:r.query,args:{...r.args,paginationOpts:{...r.queries[e].args.paginationOpts,endCursor:t}}},i[o]={query:r.query,args:{...r.args,paginationOpts:{...r.queries[e].args.paginationOpts,cursor:t,endCursor:n}}};let c={...r.ongoingSplits};return c[e]=[a,o],{...r,nextPageKey:s,queries:i,ongoingSplits:c}},l=e=>t=>{let n=t.ongoingSplits[e];if(n===void 0)return t;let r={...t.queries};delete r[e];let i={...t.ongoingSplits};delete i[e];let a=t.pageKeys.slice(),o=t.pageKeys.findIndex(t=>t===e);return o>=0&&(a=[...t.pageKeys.slice(0,o),...n,...t.pageKeys.slice(o+1)]),{...t,queries:r,pageKeys:a,ongoingSplits:i}};function u(e,t,n){let{user:r}=p(e,t,n,!0);return r}var d=Symbol(`includePageKeys`),f=Symbol(`page`);function p(e,t,u,p=!0){if(typeof u?.initialNumItems!=`number`||u.initialNumItems<0)throw Error(`\`options.initialNumItems\` must be a positive number. Received \`${u?.initialNumItems}\`.`);let m=t===`skip`,g=m?{}:t,_=o(e),v=(0,s.useMemo)(()=>()=>{let t=h();return{query:e,args:g,id:t,nextPageKey:1,pageKeys:m?[]:[0],queries:m?{}:{0:{query:e,args:{...g,paginationOpts:{numItems:u.initialNumItems,cursor:null,id:t}}}},ongoingSplits:{},skip:m}},[JSON.stringify(n(g)),_,u.initialNumItems,m]),[y,b]=(0,s.useState)(v),x=y;(o(e)!==o(y.query)||JSON.stringify(n(g))!==JSON.stringify(n(y.args))||m!==y.skip)&&(x=v(),b(x));let S=a().logger,C=i(x.queries),w=u[d]??!1,[T,E,D]=(0,s.useMemo)(()=>{let e,t=[];for(let n of x.pageKeys){if(e=C[n],e===void 0)break;if(e instanceof Error){if(e.message.includes(`InvalidCursor`)||e instanceof r&&typeof e.data==`object`&&e.data?.isConvexSystemError===!0&&e.data?.paginationError===`InvalidCursor`)return S.warn(`usePaginatedQuery hit error, resetting pagination state: `+e.message),b(v),[[],void 0,void 0];if(p)throw e;return[t,void 0,e]}let i=x.ongoingSplits[n];if(i===void 0?e.splitCursor&&(e.pageStatus===`SplitRecommended`||e.pageStatus===`SplitRequired`||e.page.length>u.initialNumItems*2)&&b(c(n,e.splitCursor,e.continueCursor)):C[i[0]]!==void 0&&C[i[1]]!==void 0&&b(l(n)),e.pageStatus===`SplitRequired`)return[t,void 0,void 0];t.push(...w?e.page.map(e=>({...e,[f]:n.toString()})):e.page)}return[t,e,void 0]},[C,x.pageKeys,x.ongoingSplits,u.initialNumItems,v,S,w,p]);return{user:{results:T,...(0,s.useMemo)(()=>{if(D!==void 0)return{status:`Error`,isLoading:!1,error:D,loadMore:()=>{}};if(E===void 0)return x.nextPageKey===1?{status:`LoadingFirstPage`,isLoading:!0,loadMore:()=>{}}:{status:`LoadingMore`,isLoading:!0,loadMore:e=>{}};if(E.isDone)return{status:`Exhausted`,isLoading:!1,loadMore:e=>{}};let e=E.continueCursor,t=!1;return{status:`CanLoadMore`,isLoading:!1,loadMore:n=>{t||(t=!0,b(t=>{let r=[...t.pageKeys,t.nextPageKey],i={...t.queries};return i[t.nextPageKey]={query:t.query,args:{...t.args,paginationOpts:{numItems:n,cursor:e,id:t.id}}},{...t,nextPageKey:t.nextPageKey+1,pageKeys:r,queries:i}}))}}},[D,E,x.nextPageKey])},internal:{state:x}}}var m=0;function h(){return m++,m}export{u as t};
@@ -1 +1 @@
1
- import{k as e}from"./api-CWqdeSbN.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),n=e(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),r=e(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),i=e(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);export{t as i,r as n,n as r,i as t};
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),n=e(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),r=e(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),i=e(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]);export{t as i,r as n,n as r,i as t};
@@ -0,0 +1 @@
1
+ import{k as e}from"./api-D64JTta1.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};