orqevio 1.0.1 → 1.0.2

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 (113) hide show
  1. package/dist/web/assets/{AccessKeyReveal-CQaxpNT4.js → AccessKeyReveal-D8iaHAmc.js} +1 -1
  2. package/dist/web/assets/{AccessRows-DUF0JEJN.js → AccessRows-unT7pvaN.js} +1 -1
  3. package/dist/web/assets/{ActivityList--gWYDhUt.js → ActivityList-5kkQfKan.js} +1 -1
  4. package/dist/web/assets/{AgentsPage-BmYCjLa_.js → AgentsPage-CJYPGW11.js} +1 -1
  5. package/dist/web/assets/Attachments-BWc36ATf.css +1 -0
  6. package/dist/web/assets/Attachments-W-66xscM.js +214 -0
  7. package/dist/web/assets/{Avatar-BM8oUZZw.js → Avatar-Ds47Du6D.js} +1 -1
  8. package/dist/web/assets/BoardPage-BzP18JZ2.js +1 -0
  9. package/dist/web/assets/{Button-Cdv5jCuw.js → Button-Btbho6sH.js} +1 -1
  10. package/dist/web/assets/{CardItem-DzmuD8RI.js → CardItem-DOZjD-y4.js} +1 -1
  11. package/dist/web/assets/{Checkbox-D7DQDOn_.js → Checkbox-DYleqiFb.js} +1 -1
  12. package/dist/web/assets/{ColorPicker-1A8lBK9k.js → ColorPicker-C67TVWyM.js} +1 -1
  13. package/dist/web/assets/{ConsentPage-C_LzKZZB.js → ConsentPage-DdmIld0a.js} +1 -1
  14. package/dist/web/assets/CopyButton-BSygyOA8.js +1 -0
  15. package/dist/web/assets/{DocPage-hcgQ0MLZ.js → DocPage-Bou9VU1o.js} +1 -1
  16. package/dist/web/assets/{EmptyState-DbuyD37d.js → EmptyState-BK-MD-22.js} +1 -1
  17. package/dist/web/assets/{Field-Clm8umDd.js → Field-BzrGz77l.js} +1 -1
  18. package/dist/web/assets/{HomePage-DDDKEWXr.js → HomePage-B4r2hsLa.js} +1 -1
  19. package/dist/web/assets/{Menu-DX34x7kE.js → Menu-B2IsRarH.js} +1 -1
  20. package/dist/web/assets/{PageHeader-ClyiqS7h.js → PageHeader-DQFfF3dC.js} +1 -1
  21. package/dist/web/assets/{Popover-5Vvrqbgv.js → Popover-CABN9JQJ.js} +1 -1
  22. package/dist/web/assets/{ProjectPage-amJ1RPBS.js → ProjectPage-Oz1y-22_.js} +1 -1
  23. package/dist/web/assets/{ProjectSettingsDialog-6QxmHLzs.js → ProjectSettingsDialog-C1CyAGKv.js} +1 -1
  24. package/dist/web/assets/{Segmented-BDMZD7nV.js → Segmented-CF8X5UQP.js} +1 -1
  25. package/dist/web/assets/{SettingsPage-WsTJXDni.js → SettingsPage-D8jrBXVO.js} +1 -1
  26. package/dist/web/assets/{States-BL27BexV.js → States-B9aFGoJ7.js} +1 -1
  27. package/dist/web/assets/{TokenCard-Rdie_fAK.js → TokenCard-Bca8a7bs.js} +1 -1
  28. package/dist/web/assets/{Trans-COFrPeA8.js → Trans-CZ4Nv-G9.js} +1 -1
  29. package/dist/web/assets/{VaultPage-E1JRTpdj.js → VaultPage-CbnaGof3.js} +1 -1
  30. package/dist/web/assets/{actions-CnbXVELu.js → actions-CuhPuiCb.js} +1 -1
  31. package/dist/web/assets/{activity-pS7JJqPR.js → activity-jMyOg6vJ.js} +1 -1
  32. package/dist/web/assets/{arrow-up-right-B1Q3GS2t.js → arrow-up-right-xXLe7dy5.js} +1 -1
  33. package/dist/web/assets/boards-BfXxNbjL.js +1 -0
  34. package/dist/web/assets/boards-BysuKeCh.js +1 -0
  35. package/dist/web/assets/boards-BzBkr2as.js +1 -0
  36. package/dist/web/assets/boards-C4m0VqXK.js +1 -0
  37. package/dist/web/assets/boards-CiHbxckf.js +1 -0
  38. package/dist/web/assets/boards-oiLnHcBl.js +1 -0
  39. package/dist/web/assets/boards-uxzlybUT.js +1 -0
  40. package/dist/web/assets/{bot-CWoAuwAC.js → bot-C4jQSYTS.js} +1 -1
  41. package/dist/web/assets/check-BE-kG6EN.js +1 -0
  42. package/dist/web/assets/{clock-gFOXe45w.js → clock-BRq3Eqj4.js} +1 -1
  43. package/dist/web/assets/common-COjNB9BR.js +1 -0
  44. package/dist/web/assets/common-CxTPkV7X.js +1 -0
  45. package/dist/web/assets/common-D-VyKjDv.js +1 -0
  46. package/dist/web/assets/common-D3b_OJUw.js +1 -0
  47. package/dist/web/assets/common-DJe5JA5c.js +1 -0
  48. package/dist/web/assets/common-Dr48NU46.js +1 -0
  49. package/dist/web/assets/{common-DpRzCGRI.js → common-Vls4DuMQ.js} +1 -1
  50. package/dist/web/assets/{download-DOUlwk6I.js → download-CcY7y-p1.js} +1 -1
  51. package/dist/web/assets/errors-Bj5m9UTT.js +1 -0
  52. package/dist/web/assets/errors-BjhuCALu.js +1 -0
  53. package/dist/web/assets/errors-CbK3TofU.js +1 -0
  54. package/dist/web/assets/errors-DCKVrh2b.js +1 -0
  55. package/dist/web/assets/errors-DTeT1QaQ.js +1 -0
  56. package/dist/web/assets/errors-hqibHHps.js +1 -0
  57. package/dist/web/assets/errors-x1B7DZKj.js +1 -0
  58. package/dist/web/assets/{eye-DgU86mY7.js → eye-0AAym_Rc.js} +1 -1
  59. package/dist/web/assets/{file-plus-BK_cMGl4.js → file-plus-dA3dSRUX.js} +1 -1
  60. package/dist/web/assets/{folder-open-CUvL1QmZ.js → folder-open-Ewe1HrNf.js} +1 -1
  61. package/dist/web/assets/{format-CNMdJ6_8.js → format-DFP4kHwY.js} +1 -1
  62. package/dist/web/assets/index-BwlT1VPI.css +2 -0
  63. package/dist/web/assets/{index-7-XNE5Rd.js → index-De_HhHxO.js} +3 -3
  64. package/dist/web/assets/{lock-keyhole-D62Dl9I8.js → lock-keyhole-D9nhFofN.js} +1 -1
  65. package/dist/web/assets/{pencil-xcVnI27R.js → pencil-BLKUFMJd.js} +1 -1
  66. package/dist/web/assets/plus-Bfyl1Cnf.js +1 -0
  67. package/dist/web/assets/{queries-B6zKoYoh.js → queries-DnrECs2M.js} +5 -5
  68. package/dist/web/assets/realtime-CMHYgQ_y.js +1 -0
  69. package/dist/web/assets/{search-BV5ZsG36.js → search-DMRKd8Cr.js} +1 -1
  70. package/dist/web/assets/{session-Dg2szHMi.js → session-BAxO2EgV.js} +1 -1
  71. package/dist/web/assets/{shield-exclamation-point-BLSX4EKo.js → shield-exclamation-point-TzY-81Bq.js} +1 -1
  72. package/dist/web/assets/{square-kanban-D4XKuQYH.js → square-kanban-ly6jmUnZ.js} +1 -1
  73. package/dist/web/assets/{trash-BtYRNn0Z.js → trash-CJAi39PH.js} +1 -1
  74. package/dist/web/assets/{triangle-exclamation-point-CcJCHC10.js → triangle-exclamation-point-CxY_KMDD.js} +1 -1
  75. package/dist/web/assets/{vault-DzWE-kQx.js → vault-C2I5wY2c.js} +1 -1
  76. package/dist/web/assets/{vault-BJ0YNaBV.js → vault-CnwqbS9q.js} +1 -1
  77. package/dist/web/assets/{vault-CjqTbMtS.js → vault-DDN2TVJW.js} +1 -1
  78. package/dist/web/assets/{vault-CLMnyhXX.js → vault-DGwHkhSm.js} +1 -1
  79. package/dist/web/assets/{vault-CQVJONUp.js → vault-DmWLOBSw.js} +1 -1
  80. package/dist/web/assets/{vault-ShnECcLf.js → vault-VdamUs2c.js} +1 -1
  81. package/dist/web/assets/{vault-Dwv3fhwH.js → vault-ds4tlkvx.js} +1 -1
  82. package/dist/web/assets/{workspace-TT1PqoC7.js → workspace-CUnAQ10Q.js} +1 -1
  83. package/dist/web/index.html +33 -33
  84. package/dist/worker/index.js +12263 -12177
  85. package/package.json +1 -1
  86. package/dist/web/assets/Attachments-BFs-_VlC.js +0 -212
  87. package/dist/web/assets/Attachments-BFwBtL8j.css +0 -1
  88. package/dist/web/assets/BoardPage-CixYMIX6.js +0 -1
  89. package/dist/web/assets/CopyButton-C-W1lxF3.js +0 -1
  90. package/dist/web/assets/boards-BBpjZP1x.js +0 -1
  91. package/dist/web/assets/boards-BTpgk9Fd.js +0 -1
  92. package/dist/web/assets/boards-BWeP1yma.js +0 -1
  93. package/dist/web/assets/boards-COhITBby.js +0 -1
  94. package/dist/web/assets/boards-Ctsx-Cza.js +0 -1
  95. package/dist/web/assets/boards-PfnbSN1s.js +0 -1
  96. package/dist/web/assets/boards-R_TWYEXU.js +0 -1
  97. package/dist/web/assets/check-DCBjJEe-.js +0 -1
  98. package/dist/web/assets/common-CeY0FMhM.js +0 -1
  99. package/dist/web/assets/common-ChyM3qEm.js +0 -1
  100. package/dist/web/assets/common-DSH0t9-R.js +0 -1
  101. package/dist/web/assets/common-SQxQWeOo.js +0 -1
  102. package/dist/web/assets/common-ZaFMftqj.js +0 -1
  103. package/dist/web/assets/common-kLH8MGZF.js +0 -1
  104. package/dist/web/assets/errors-BGvYEtI3.js +0 -1
  105. package/dist/web/assets/errors-CZ1BX441.js +0 -1
  106. package/dist/web/assets/errors-D6cvqHzs.js +0 -1
  107. package/dist/web/assets/errors-DACTZxtE.js +0 -1
  108. package/dist/web/assets/errors-DJVH_VFT.js +0 -1
  109. package/dist/web/assets/errors-_k7icfYU.js +0 -1
  110. package/dist/web/assets/errors-y3K623sq.js +0 -1
  111. package/dist/web/assets/index-BoZRT-4L.css +0 -2
  112. package/dist/web/assets/plus-oKcb7VoU.js +0 -1
  113. package/dist/web/assets/realtime-DySKdOZ5.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{L as t,R as n,dt as r,ft as i}from"./queries-B6zKoYoh.js";import{A as a,B as o,C as s,D as c,E as l,F as u,L as d,M as f,N as p,P as m,S as h,T as g,j as _,k as v,o as y,x as b,z as x}from"./workspace-TT1PqoC7.js";import{t as S}from"./Button-Cdv5jCuw.js";var C=e(i(),1),w=e(o(),1);function T(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var E=e=>{switch(e){case`success`:return D;case`info`:return k;case`warning`:return O;case`error`:return ne;default:return null}},ee=Array(12).fill(0),te=({visible:e,className:t})=>C.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},C.createElement(`div`,{className:`sonner-spinner`},ee.map((e,t)=>C.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),D=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),O=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),k=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ne=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),re=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},C.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),C.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ie=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},A=1,j=100,M=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:A++,N=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-j;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=M(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],C.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(F(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=M(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},P=(e,t)=>N.message(e,t),F=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ae=Object.assign(P,{success:N.success,info:N.info,warning:N.warning,error:N.error,custom:N.custom,message:N.message,promise:N.promise,dismiss:N.dismiss,loading:N.loading},{getHistory:()=>N.toasts,getToasts:()=>N.getActiveToasts()});T(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function oe(e){return e.label!==void 0}var se=3,ce=`24px`,le=`16px`,ue=4e3,de=356,fe=14,pe=45,me=200;function I(...e){return e.filter(Boolean).join(` `)}function he(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ge=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:w,icons:T,closeButtonAriaLabel:ee=`Close toast`}=e,[D,O]=C.useState(null),[k,ne]=C.useState(null),[A,j]=C.useState(!1),[M,N]=C.useState(!1),[P,F]=C.useState(!1),[ae,se]=C.useState(!1),[ce,le]=C.useState(!1),[de,fe]=C.useState(0),[ge,_e]=C.useState(0),ve=C.useRef(n.duration||y||ue),ye=C.useRef(null),L=C.useRef(null),be=c===0,xe=c+1<=o,R=n.type,Se=R??`default`,z=n.dismissible!==!1,Ce=n.className||``,B=n.descriptionClassName||``,V=C.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),we=C.useMemo(()=>n.closeButton??p,[n.closeButton,p]),H=C.useMemo(()=>n.duration||y||ue,[n.duration,y]),U=C.useRef(0),W=C.useRef(0),Te=C.useRef(0),G=C.useRef(null),[Ee,De]=b.split(`-`),Oe=C.useMemo(()=>s.reduce((e,t,n)=>n>=V?e:e+t.height,0),[s,V]),ke=ie(),K=C.useMemo(()=>e.swipeDirections??he(b),[e.swipeDirections,b]),Ae=n.invert||t,je=R===`loading`;W.current=C.useMemo(()=>V*x+Oe,[V,Oe]),C.useEffect(()=>{ve.current=H},[H]),C.useEffect(()=>{j(!0)},[]),C.useEffect(()=>{let e=L.current;if(e){let t=e.getBoundingClientRect().height;return _e(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),C.useLayoutEffect(()=>{if(!A)return;let e=L.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,_e(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let q=C.useCallback(()=>{N(!0),fe(W.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},me)},[n,d,a,W]);C.useEffect(()=>{if(n.promise&&R===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ke?(()=>{if(Te.current<U.current){let e=new Date().getTime()-U.current;ve.current-=e}Te.current=new Date().getTime()})():ve.current!==1/0&&(U.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),q()},ve.current)),()=>clearTimeout(e)},[u,i,n,R,ke,q]),C.useEffect(()=>{n.delete&&(q(),n.onDismiss==null||n.onDismiss.call(n,n))},[q,n.delete]);function Me(){return T?.loading?C.createElement(`div`,{className:I(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":R===`loading`},T.loading):C.createElement(te,{className:I(w?.loader,n?.classNames?.loader),visible:R===`loading`})}let Ne=n.icon||T?.[R]||E(R);return C.createElement(`li`,{tabIndex:0,ref:L,className:I(_,Ce,w?.toast,n?.classNames?.toast,w?.[Se],n?.classNames?.[Se]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ce,"data-removed":M,"data-visible":xe,"data-y-position":Ee,"data-x-position":De,"data-index":c,"data-front":be,"data-swiping":P,"data-dismissible":z,"data-type":R,"data-invert":Ae,"data-swipe-out":ae,"data-swipe-direction":k,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?de:W.current}px`,"--initial-height":S?`auto`:`${ge}px`,...m,...n.style},onDragEnd:()=>{F(!1),O(null),G.current=null},onPointerDown:e=>{e.button!==2&&!je&&z&&(ye.current=new Date,fe(W.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),G.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(ae||!z)return;G.current=null;let e=Number(L.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(L.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ye.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?K.includes(e>0?`right`:`left`):K.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=pe||a>.11))fe(W.current),n.onDismiss==null||n.onDismiss.call(n,n),ne(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),q(),se(!0);else{var o,s;(o=L.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=L.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),le(!1),F(!1),O(null)}},onPointerMove:e=>{var t,n;if(!G.current||!z||window.getSelection()?.toString().length>0)return;let r=e.clientY-G.current.y,i=e.clientX-G.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(K.includes(`top`)||K.includes(`bottom`)){if(K.includes(`top`)&&r<0||K.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(K.includes(`left`)||K.includes(`right`))){if(K.includes(`left`)&&i<0||K.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&le(!0),(t=L.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=L.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},we&&!n.jsx&&R!==`loading`?C.createElement(`button`,{"aria-label":ee,"data-disabled":je,"data-close-button":!0,onClick:je||!z?()=>{}:()=>{q(),n.onDismiss==null||n.onDismiss.call(n,n)},className:I(w?.closeButton,n?.classNames?.closeButton)},T?.close??re):null,(R||n.icon||n.promise)&&n.icon!==null&&(T?.[R]!==null||n.icon)?C.createElement(`div`,{"data-icon":``,className:I(w?.icon,n?.classNames?.icon)},R===`loading`?n.icon||Me():n.promise?Me():null,R===`loading`?null:Ne):null,C.createElement(`div`,{"data-content":``,className:I(w?.content,n?.classNames?.content)},C.createElement(`div`,{"data-title":``,className:I(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?C.createElement(`div`,{"data-description":``,className:I(v,B,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),C.isValidElement(n.cancel)?n.cancel:n.cancel&&oe(n.cancel)?C.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{oe(n.cancel)&&z&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),q())},className:I(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,C.isValidElement(n.action)?n.action:n.action&&oe(n.action)?C.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{oe(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||q())},className:I(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function _e(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ve(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?le:ce;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ye=C.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=se,toastOptions:g,dir:_=_e(),gap:v=fe,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,T]=C.useState([]),E=C.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),ee=C.useMemo(()=>Array.from(new Set([i].concat(E.filter(e=>e.position).map(e=>e.position)))),[E,i]),[te,D]=C.useState([]),[O,k]=C.useState(!1),[ne,re]=C.useState(!1),[ie,A]=C.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=C.useRef(null),M=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=C.useRef(null),F=C.useRef(!1),ae=C.useCallback(e=>{T(t=>(t.find(t=>t.id===e.id)?.delete||N.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return C.useEffect(()=>N.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{T(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{w.flushSync(()=>{T(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),C.useEffect(()=>{if(d!==`system`){A(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),C.useEffect(()=>{S.length<=1&&k(!1)},[S]),C.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),C.useEffect(()=>{if(j.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,F.current=!1)}},[j.current]),C.createElement(`section`,{ref:t,"aria-label":b??`${x} ${M}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},ee.map((t,n)=>{let[i,a]=t.split(`-`);return E.length?C.createElement(`ol`,{key:t,dir:_===`auto`?_e():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ie,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${te[0]?.height||0}px`,"--width":`${de}px`,"--gap":`${v}px`,...m,...ve(l,u)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{ne||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re(!0)},onPointerUp:()=>re(!1)},E.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>C.createElement(ge,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ne,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ae,toasts:E.filter(e=>e.position==n.position),heights:te.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),L=Object.defineProperty,be=(e,t)=>L(e,`name`,{value:t,configurable:!0}),xe=0,R=null;function Se(e){return z(),e.children}be(Se,`FocusGuards`);function z(){C.useEffect(()=>{R||={start:Ce(),end:Ce()};let{start:e,end:t}=R;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),xe++,()=>{xe===1&&(R?.start.remove(),R?.end.remove(),R=null),xe=Math.max(0,xe-1)}},[])}be(z,`useFocusGuards`);function Ce(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}be(Ce,`createFocusGuard`);var B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)};function V(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function we(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var H=`right-scroll-bar-position`,U=`width-before-scroll-bar`,W=`with-scroll-bars-hidden`,Te=`--removed-body-scroll-bar-size`;function G(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ee(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var De=typeof window<`u`?C.useLayoutEffect:C.useEffect,Oe=new WeakMap;function ke(e,t){var n=Ee(t||null,function(t){return e.forEach(function(e){return G(e,t)})});return De(function(){var t=Oe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||G(e,null)}),i.forEach(function(e){r.has(e)||G(e,a)})}Oe.set(n,e)},[e]),n}function K(e){return e}function Ae(e,t){t===void 0&&(t=K);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function je(e){e===void 0&&(e={});var t=Ae(null);return t.options=B({async:!0,ssr:!1},e),t}var q=function(e){var t=e.sideCar,n=V(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,B({},n))};q.isSideCarExport=!0;function Me(e,t){return e.useMedium(t),q}var Ne=je(),Pe=function(){},Fe=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:Pe,onWheelCapture:Pe,onTouchMoveCapture:Pe}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=V(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=ke([n,t]),w=B(B({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Ne,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),B(B({},w),{ref:S})):C.createElement(v,B({},w,{className:c,ref:S}),s))});Fe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fe.classNames={fullWidth:U,zeroRight:H};var Ie=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Le(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ie();return t&&e.setAttribute(`nonce`,t),e}function Re(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ze(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Be=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Le())&&(Re(t,n),ze(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ve=function(){var e=Be();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},He=function(){var e=Ve();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ue={left:0,top:0,right:0,gap:0},We=function(e){return parseInt(e||``,10)||0},Ge=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[We(n),We(r),We(i)]},Ke=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ue;var t=Ge(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qe=He(),Je=`data-scroll-locked`,Ye=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{L as t,R as n,dt as r,ft as i}from"./queries-DnrECs2M.js";import{A as a,B as o,C as s,D as c,E as l,F as u,L as d,M as f,N as p,P as m,S as h,T as g,j as _,k as v,o as y,x as b,z as x}from"./workspace-CUnAQ10Q.js";import{t as S}from"./Button-Btbho6sH.js";var C=e(i(),1),w=e(o(),1);function T(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var E=e=>{switch(e){case`success`:return D;case`info`:return k;case`warning`:return O;case`error`:return ne;default:return null}},ee=Array(12).fill(0),te=({visible:e,className:t})=>C.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},C.createElement(`div`,{className:`sonner-spinner`},ee.map((e,t)=>C.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),D=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),O=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),k=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ne=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),re=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},C.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),C.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ie=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},A=1,j=100,M=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:A++,N=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-j;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=M(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],C.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(F(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=M(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},P=(e,t)=>N.message(e,t),F=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ae=Object.assign(P,{success:N.success,info:N.info,warning:N.warning,error:N.error,custom:N.custom,message:N.message,promise:N.promise,dismiss:N.dismiss,loading:N.loading},{getHistory:()=>N.toasts,getToasts:()=>N.getActiveToasts()});T(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function oe(e){return e.label!==void 0}var se=3,ce=`24px`,le=`16px`,ue=4e3,de=356,fe=14,pe=45,me=200;function I(...e){return e.filter(Boolean).join(` `)}function he(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ge=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:w,icons:T,closeButtonAriaLabel:ee=`Close toast`}=e,[D,O]=C.useState(null),[k,ne]=C.useState(null),[A,j]=C.useState(!1),[M,N]=C.useState(!1),[P,F]=C.useState(!1),[ae,se]=C.useState(!1),[ce,le]=C.useState(!1),[de,fe]=C.useState(0),[ge,_e]=C.useState(0),ve=C.useRef(n.duration||y||ue),ye=C.useRef(null),L=C.useRef(null),be=c===0,xe=c+1<=o,R=n.type,Se=R??`default`,z=n.dismissible!==!1,Ce=n.className||``,B=n.descriptionClassName||``,V=C.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),we=C.useMemo(()=>n.closeButton??p,[n.closeButton,p]),H=C.useMemo(()=>n.duration||y||ue,[n.duration,y]),U=C.useRef(0),W=C.useRef(0),Te=C.useRef(0),G=C.useRef(null),[Ee,De]=b.split(`-`),Oe=C.useMemo(()=>s.reduce((e,t,n)=>n>=V?e:e+t.height,0),[s,V]),ke=ie(),K=C.useMemo(()=>e.swipeDirections??he(b),[e.swipeDirections,b]),Ae=n.invert||t,je=R===`loading`;W.current=C.useMemo(()=>V*x+Oe,[V,Oe]),C.useEffect(()=>{ve.current=H},[H]),C.useEffect(()=>{j(!0)},[]),C.useEffect(()=>{let e=L.current;if(e){let t=e.getBoundingClientRect().height;return _e(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),C.useLayoutEffect(()=>{if(!A)return;let e=L.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,_e(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let q=C.useCallback(()=>{N(!0),fe(W.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},me)},[n,d,a,W]);C.useEffect(()=>{if(n.promise&&R===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ke?(()=>{if(Te.current<U.current){let e=new Date().getTime()-U.current;ve.current-=e}Te.current=new Date().getTime()})():ve.current!==1/0&&(U.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),q()},ve.current)),()=>clearTimeout(e)},[u,i,n,R,ke,q]),C.useEffect(()=>{n.delete&&(q(),n.onDismiss==null||n.onDismiss.call(n,n))},[q,n.delete]);function Me(){return T?.loading?C.createElement(`div`,{className:I(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":R===`loading`},T.loading):C.createElement(te,{className:I(w?.loader,n?.classNames?.loader),visible:R===`loading`})}let Ne=n.icon||T?.[R]||E(R);return C.createElement(`li`,{tabIndex:0,ref:L,className:I(_,Ce,w?.toast,n?.classNames?.toast,w?.[Se],n?.classNames?.[Se]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ce,"data-removed":M,"data-visible":xe,"data-y-position":Ee,"data-x-position":De,"data-index":c,"data-front":be,"data-swiping":P,"data-dismissible":z,"data-type":R,"data-invert":Ae,"data-swipe-out":ae,"data-swipe-direction":k,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?de:W.current}px`,"--initial-height":S?`auto`:`${ge}px`,...m,...n.style},onDragEnd:()=>{F(!1),O(null),G.current=null},onPointerDown:e=>{e.button!==2&&!je&&z&&(ye.current=new Date,fe(W.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),G.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(ae||!z)return;G.current=null;let e=Number(L.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(L.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ye.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?K.includes(e>0?`right`:`left`):K.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=pe||a>.11))fe(W.current),n.onDismiss==null||n.onDismiss.call(n,n),ne(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),q(),se(!0);else{var o,s;(o=L.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=L.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),le(!1),F(!1),O(null)}},onPointerMove:e=>{var t,n;if(!G.current||!z||window.getSelection()?.toString().length>0)return;let r=e.clientY-G.current.y,i=e.clientX-G.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(K.includes(`top`)||K.includes(`bottom`)){if(K.includes(`top`)&&r<0||K.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(K.includes(`left`)||K.includes(`right`))){if(K.includes(`left`)&&i<0||K.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&le(!0),(t=L.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=L.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},we&&!n.jsx&&R!==`loading`?C.createElement(`button`,{"aria-label":ee,"data-disabled":je,"data-close-button":!0,onClick:je||!z?()=>{}:()=>{q(),n.onDismiss==null||n.onDismiss.call(n,n)},className:I(w?.closeButton,n?.classNames?.closeButton)},T?.close??re):null,(R||n.icon||n.promise)&&n.icon!==null&&(T?.[R]!==null||n.icon)?C.createElement(`div`,{"data-icon":``,className:I(w?.icon,n?.classNames?.icon)},R===`loading`?n.icon||Me():n.promise?Me():null,R===`loading`?null:Ne):null,C.createElement(`div`,{"data-content":``,className:I(w?.content,n?.classNames?.content)},C.createElement(`div`,{"data-title":``,className:I(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?C.createElement(`div`,{"data-description":``,className:I(v,B,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),C.isValidElement(n.cancel)?n.cancel:n.cancel&&oe(n.cancel)?C.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{oe(n.cancel)&&z&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),q())},className:I(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,C.isValidElement(n.action)?n.action:n.action&&oe(n.action)?C.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{oe(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||q())},className:I(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function _e(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ve(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?le:ce;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ye=C.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=se,toastOptions:g,dir:_=_e(),gap:v=fe,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,T]=C.useState([]),E=C.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),ee=C.useMemo(()=>Array.from(new Set([i].concat(E.filter(e=>e.position).map(e=>e.position)))),[E,i]),[te,D]=C.useState([]),[O,k]=C.useState(!1),[ne,re]=C.useState(!1),[ie,A]=C.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=C.useRef(null),M=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=C.useRef(null),F=C.useRef(!1),ae=C.useCallback(e=>{T(t=>(t.find(t=>t.id===e.id)?.delete||N.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return C.useEffect(()=>N.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{T(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{w.flushSync(()=>{T(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),C.useEffect(()=>{if(d!==`system`){A(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?A(`dark`):A(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{A(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{A(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),C.useEffect(()=>{S.length<=1&&k(!1)},[S]),C.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),C.useEffect(()=>{if(j.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,F.current=!1)}},[j.current]),C.createElement(`section`,{ref:t,"aria-label":b??`${x} ${M}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},ee.map((t,n)=>{let[i,a]=t.split(`-`);return E.length?C.createElement(`ol`,{key:t,dir:_===`auto`?_e():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ie,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${te[0]?.height||0}px`,"--width":`${de}px`,"--gap":`${v}px`,...m,...ve(l,u)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{ne||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re(!0)},onPointerUp:()=>re(!1)},E.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>C.createElement(ge,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ne,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ae,toasts:E.filter(e=>e.position==n.position),heights:te.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),L=Object.defineProperty,be=(e,t)=>L(e,`name`,{value:t,configurable:!0}),xe=0,R=null;function Se(e){return z(),e.children}be(Se,`FocusGuards`);function z(){C.useEffect(()=>{R||={start:Ce(),end:Ce()};let{start:e,end:t}=R;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),xe++,()=>{xe===1&&(R?.start.remove(),R?.end.remove(),R=null),xe=Math.max(0,xe-1)}},[])}be(z,`useFocusGuards`);function Ce(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}be(Ce,`createFocusGuard`);var B=function(){return B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},B.apply(this,arguments)};function V(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function we(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var H=`right-scroll-bar-position`,U=`width-before-scroll-bar`,W=`with-scroll-bars-hidden`,Te=`--removed-body-scroll-bar-size`;function G(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ee(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var De=typeof window<`u`?C.useLayoutEffect:C.useEffect,Oe=new WeakMap;function ke(e,t){var n=Ee(t||null,function(t){return e.forEach(function(e){return G(e,t)})});return De(function(){var t=Oe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||G(e,null)}),i.forEach(function(e){r.has(e)||G(e,a)})}Oe.set(n,e)},[e]),n}function K(e){return e}function Ae(e,t){t===void 0&&(t=K);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function je(e){e===void 0&&(e={});var t=Ae(null);return t.options=B({async:!0,ssr:!1},e),t}var q=function(e){var t=e.sideCar,n=V(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,B({},n))};q.isSideCarExport=!0;function Me(e,t){return e.useMedium(t),q}var Ne=je(),Pe=function(){},Fe=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:Pe,onWheelCapture:Pe,onTouchMoveCapture:Pe}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=V(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=ke([n,t]),w=B(B({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Ne,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),B(B({},w),{ref:S})):C.createElement(v,B({},w,{className:c,ref:S}),s))});Fe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fe.classNames={fullWidth:U,zeroRight:H};var Ie=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Le(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ie();return t&&e.setAttribute(`nonce`,t),e}function Re(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ze(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Be=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Le())&&(Re(t,n),ze(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ve=function(){var e=Be();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},He=function(){var e=Ve();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ue={left:0,top:0,right:0,gap:0},We=function(e){return parseInt(e||``,10)||0},Ge=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[We(n),We(r),We(i)]},Ke=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ue;var t=Ge(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qe=He(),Je=`data-scroll-locked`,Ye=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${W} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,Q as r,R as i,c as a,ct as o,dt as s,ft as c,p as l,t as u,y as d}from"./queries-B6zKoYoh.js";import{t as f}from"./arrow-up-right-B1Q3GS2t.js";import{t as p}from"./bot-CWoAuwAC.js";import{t as m}from"./check-DCBjJEe-.js";import{n as h,t as g}from"./square-kanban-D4XKuQYH.js";import{t as _}from"./lock-keyhole-D62Dl9I8.js";import{n as v,o as y}from"./workspace-TT1PqoC7.js";import{t as b}from"./Trans-COFrPeA8.js";import{t as x}from"./ActivityList--gWYDhUt.js";import{l as S,o as C,u as w}from"./format-CNMdJ6_8.js";import{n as T,r as E}from"./theme-BfxBDblB.js";import{n as D}from"./CardItem-DzmuD8RI.js";import{t as O}from"./PageHeader-ClyiqS7h.js";var k={name:`folder-plus`,size:24,node:[[`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`}]]};k.node;var A=t(k),j=e(c(),1),M=s();function N(){let{t:e}=i(`home`),{workspaceId:t,me:s,overview:c,openNewProject:k}=v(),N=a(t),F=l(),I=o({queryKey:u.vault,queryFn:({signal:e})=>d(`/vault`,e)}),[L,R]=(0,j.useState)(()=>T(`onboarding-dismissed`,!1)),z=s.user.name.split(/\s+/)[0],B=`/w/${t}`,V=c?.projects??[],H=[{done:V.length>0,title:e(`onboarding.project.title`),body:e(`onboarding.project.body`),icon:(0,M.jsx)(A,{}),action:k},{done:V.some(e=>e.pages.length>0),title:e(`onboarding.page.title`),body:e(`onboarding.page.body`),icon:(0,M.jsx)(h,{}),to:V[0]?`${B}/p/${V[0].id}`:void 0},{done:!!I.data?.initialized,title:e(`onboarding.vault.title`),body:e(`onboarding.vault.body`),icon:(0,M.jsx)(_,{}),to:`${B}/vault`},{done:(F.data?.length??0)>0,title:e(`onboarding.agent.title`),body:e(`onboarding.agent.body`),icon:(0,M.jsx)(p,{}),to:`${B}/agents`}],U=c&&F.data&&I.data&&!L&&H.some(e=>!e.done);return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,M.jsx)(O,{crumbs:[{label:e(`title`)}]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,M.jsxs)(`div`,{className:`mx-auto w-full max-w-[1080px] px-6 py-10 sm:px-10 sm:py-14`,children:[(0,M.jsx)(`p`,{className:`animate-rise font-mono text-[11.5px] tracking-[0.14em] text-ink-3 uppercase first-letter:uppercase`,children:S()}),(0,M.jsx)(`h1`,{className:`animate-rise mt-2 font-display text-[40px] leading-[1.05] font-medium tracking-[-0.03em] sm:text-[48px]`,style:{animationDelay:`40ms`},children:(0,M.jsx)(b,{t:e,i18nKey:`greeting`,values:{greeting:C(),name:z},components:{name:(0,M.jsx)(`span`,{className:`italic`})}})}),U&&(0,M.jsxs)(`section`,{className:`animate-rise relative mt-10 rounded-[18px] border border-line bg-surface p-5 shadow-sm`,style:{animationDelay:`80ms`},"aria-label":e(`onboarding.title`),children:[(0,M.jsx)(`button`,{type:`button`,onClick:()=>{R(!0),E(`onboarding-dismissed`,!0)},"aria-label":e(`onboarding.dismiss`),className:`absolute top-3 right-3 grid size-7 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,children:(0,M.jsx)(y,{className:`size-4`})}),(0,M.jsx)(`h2`,{className:`font-display text-[19px] font-medium`,children:e(`onboarding.title`)}),(0,M.jsx)(`p`,{className:`mt-0.5 text-[13px] text-ink-3`,children:e(`onboarding.progress`,{done:H.filter(e=>e.done).length,total:H.length})}),(0,M.jsx)(`ol`,{className:`mt-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:H.map((e,t)=>{let i=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:n(`grid size-8 shrink-0 place-items-center rounded-[9px] [&_svg]:size-4`,e.done?`bg-ok/12 text-ok`:`bg-sunken text-ink-2`),children:e.done?(0,M.jsx)(m,{}):e.icon}),(0,M.jsxs)(`span`,{className:`min-w-0`,children:[(0,M.jsxs)(`span`,{className:n(`block text-[13.5px] font-medium`,e.done&&`text-ink-3 line-through decoration-ink-4`),children:[(0,M.jsx)(`span`,{className:`mr-1 font-mono text-[11px] text-ink-3`,children:t+1}),e.title]}),(0,M.jsx)(`span`,{className:`block text-[12px] text-ink-3`,children:e.body})]})]}),a=`flex h-full items-start gap-3 rounded-[12px] border border-line p-3 text-left transition-colors hover:border-line-strong hover:bg-hover`;return(0,M.jsx)(`li`,{children:e.to?(0,M.jsx)(r,{to:e.to,className:a,children:i}):(0,M.jsx)(`button`,{type:`button`,onClick:e.action,className:n(a,`w-full`),children:i})},e.title)})})]}),(0,M.jsxs)(`div`,{className:`mt-10 grid gap-6 lg:grid-cols-[1.25fr_1fr]`,children:[(0,M.jsx)(P,{title:e(`due.title`),delay:120,empty:N.data&&N.data.dueCards.length===0?e(`due.empty`):null,children:(0,M.jsx)(`ul`,{className:`flex flex-col`,children:N.data?.dueCards.map(e=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(r,{to:`${B}/b/${e.boardId}?card=${e.id}`,className:`flex items-center gap-3 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover`,children:[(0,M.jsx)(g,{className:`size-4 shrink-0 text-ink-3`}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`span`,{className:`block truncate text-[13.5px] font-medium`,children:e.title}),(0,M.jsxs)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:[e.projectName,` · `,e.boardName,` · `,e.columnName]})]}),e.dueAt&&(0,M.jsx)(D,{dueAt:e.dueAt})]})},e.id))})}),(0,M.jsx)(P,{title:e(`recent.title`),delay:160,empty:N.data&&N.data.recentPages.length===0?e(`recent.empty`):null,children:(0,M.jsx)(`ul`,{className:`flex flex-col`,children:N.data?.recentPages.map(t=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(r,{to:`${B}/d/${t.id}`,className:`flex items-center gap-3 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover`,children:[(0,M.jsx)(`span`,{className:`w-4 text-center text-[14px]`,children:t.icon??(0,M.jsx)(h,{className:`size-4 text-ink-3`})}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`span`,{className:`block truncate text-[13.5px] font-medium`,children:t.title||e(`untitled`,{ns:`common`})}),(0,M.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:t.projectName})]}),(0,M.jsx)(`span`,{className:`shrink-0 text-[11.5px] text-ink-3`,children:w(t.updatedAt)})]})},t.id))})})]}),(0,M.jsx)(`div`,{className:`mt-6`,children:(0,M.jsx)(P,{title:e(`activity.title`),delay:200,action:(0,M.jsxs)(r,{to:`${B}/agents`,className:`inline-flex items-center gap-1 text-[12px] font-medium text-ink-3 hover:text-ink`,children:[e(`activity.agents`),` `,(0,M.jsx)(f,{className:`size-3.5`})]}),empty:N.data&&N.data.activity.length===0?e(`activity.empty`):null,children:N.data&&N.data.activity.length>0&&(0,M.jsx)(`div`,{className:`px-2.5 py-1`,children:(0,M.jsx)(x,{items:N.data.activity,workspaceId:t})})})})]})})]})}function P({title:e,children:t,empty:n,delay:r=0,action:i}){return(0,M.jsxs)(`section`,{className:`animate-rise flex flex-col`,style:{animationDelay:`${r}ms`},children:[(0,M.jsxs)(`div`,{className:`mb-2 flex items-center justify-between px-1`,children:[(0,M.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e}),i]}),(0,M.jsx)(`div`,{className:`min-h-[120px] flex-1 rounded-[16px] border border-line bg-surface p-1.5 shadow-sm`,children:n?(0,M.jsx)(`p`,{className:`px-3 py-8 text-center text-[13px] text-ink-3`,children:n}):t})]})}export{N as HomePage};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,Q as r,R as i,c as a,ct as o,dt as s,ft as c,p as l,t as u,y as d}from"./queries-DnrECs2M.js";import{t as f}from"./arrow-up-right-xXLe7dy5.js";import{t as p}from"./bot-C4jQSYTS.js";import{t as m}from"./check-BE-kG6EN.js";import{n as h,t as g}from"./square-kanban-ly6jmUnZ.js";import{t as _}from"./lock-keyhole-D9nhFofN.js";import{n as v,o as y}from"./workspace-CUnAQ10Q.js";import{t as b}from"./Trans-CZ4Nv-G9.js";import{t as x}from"./ActivityList-5kkQfKan.js";import{l as S,o as C,u as w}from"./format-DFP4kHwY.js";import{n as T,r as E}from"./theme-BfxBDblB.js";import{n as D}from"./CardItem-DOZjD-y4.js";import{t as O}from"./PageHeader-DQFfF3dC.js";var k={name:`folder-plus`,size:24,node:[[`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`}]]};k.node;var A=t(k),j=e(c(),1),M=s();function N(){let{t:e}=i(`home`),{workspaceId:t,me:s,overview:c,openNewProject:k}=v(),N=a(t),F=l(),I=o({queryKey:u.vault,queryFn:({signal:e})=>d(`/vault`,e)}),[L,R]=(0,j.useState)(()=>T(`onboarding-dismissed`,!1)),z=s.user.name.split(/\s+/)[0],B=`/w/${t}`,V=c?.projects??[],H=[{done:V.length>0,title:e(`onboarding.project.title`),body:e(`onboarding.project.body`),icon:(0,M.jsx)(A,{}),action:k},{done:V.some(e=>e.pages.length>0),title:e(`onboarding.page.title`),body:e(`onboarding.page.body`),icon:(0,M.jsx)(h,{}),to:V[0]?`${B}/p/${V[0].id}`:void 0},{done:!!I.data?.initialized,title:e(`onboarding.vault.title`),body:e(`onboarding.vault.body`),icon:(0,M.jsx)(_,{}),to:`${B}/vault`},{done:(F.data?.length??0)>0,title:e(`onboarding.agent.title`),body:e(`onboarding.agent.body`),icon:(0,M.jsx)(p,{}),to:`${B}/agents`}],U=c&&F.data&&I.data&&!L&&H.some(e=>!e.done);return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,M.jsx)(O,{crumbs:[{label:e(`title`)}]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,M.jsxs)(`div`,{className:`mx-auto w-full max-w-[1080px] px-6 py-10 sm:px-10 sm:py-14`,children:[(0,M.jsx)(`p`,{className:`animate-rise font-mono text-[11.5px] tracking-[0.14em] text-ink-3 uppercase first-letter:uppercase`,children:S()}),(0,M.jsx)(`h1`,{className:`animate-rise mt-2 font-display text-[40px] leading-[1.05] font-medium tracking-[-0.03em] sm:text-[48px]`,style:{animationDelay:`40ms`},children:(0,M.jsx)(b,{t:e,i18nKey:`greeting`,values:{greeting:C(),name:z},components:{name:(0,M.jsx)(`span`,{className:`italic`})}})}),U&&(0,M.jsxs)(`section`,{className:`animate-rise relative mt-10 rounded-[18px] border border-line bg-surface p-5 shadow-sm`,style:{animationDelay:`80ms`},"aria-label":e(`onboarding.title`),children:[(0,M.jsx)(`button`,{type:`button`,onClick:()=>{R(!0),E(`onboarding-dismissed`,!0)},"aria-label":e(`onboarding.dismiss`),className:`absolute top-3 right-3 grid size-7 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,children:(0,M.jsx)(y,{className:`size-4`})}),(0,M.jsx)(`h2`,{className:`font-display text-[19px] font-medium`,children:e(`onboarding.title`)}),(0,M.jsx)(`p`,{className:`mt-0.5 text-[13px] text-ink-3`,children:e(`onboarding.progress`,{done:H.filter(e=>e.done).length,total:H.length})}),(0,M.jsx)(`ol`,{className:`mt-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:H.map((e,t)=>{let i=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:n(`grid size-8 shrink-0 place-items-center rounded-[9px] [&_svg]:size-4`,e.done?`bg-ok/12 text-ok`:`bg-sunken text-ink-2`),children:e.done?(0,M.jsx)(m,{}):e.icon}),(0,M.jsxs)(`span`,{className:`min-w-0`,children:[(0,M.jsxs)(`span`,{className:n(`block text-[13.5px] font-medium`,e.done&&`text-ink-3 line-through decoration-ink-4`),children:[(0,M.jsx)(`span`,{className:`mr-1 font-mono text-[11px] text-ink-3`,children:t+1}),e.title]}),(0,M.jsx)(`span`,{className:`block text-[12px] text-ink-3`,children:e.body})]})]}),a=`flex h-full items-start gap-3 rounded-[12px] border border-line p-3 text-left transition-colors hover:border-line-strong hover:bg-hover`;return(0,M.jsx)(`li`,{children:e.to?(0,M.jsx)(r,{to:e.to,className:a,children:i}):(0,M.jsx)(`button`,{type:`button`,onClick:e.action,className:n(a,`w-full`),children:i})},e.title)})})]}),(0,M.jsxs)(`div`,{className:`mt-10 grid gap-6 lg:grid-cols-[1.25fr_1fr]`,children:[(0,M.jsx)(P,{title:e(`due.title`),delay:120,empty:N.data&&N.data.dueCards.length===0?e(`due.empty`):null,children:(0,M.jsx)(`ul`,{className:`flex flex-col`,children:N.data?.dueCards.map(e=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(r,{to:`${B}/b/${e.boardId}?card=${e.id}`,className:`flex items-center gap-3 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover`,children:[(0,M.jsx)(g,{className:`size-4 shrink-0 text-ink-3`}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`span`,{className:`block truncate text-[13.5px] font-medium`,children:e.title}),(0,M.jsxs)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:[e.projectName,` · `,e.boardName,` · `,e.columnName]})]}),e.dueAt&&(0,M.jsx)(D,{dueAt:e.dueAt})]})},e.id))})}),(0,M.jsx)(P,{title:e(`recent.title`),delay:160,empty:N.data&&N.data.recentPages.length===0?e(`recent.empty`):null,children:(0,M.jsx)(`ul`,{className:`flex flex-col`,children:N.data?.recentPages.map(t=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(r,{to:`${B}/d/${t.id}`,className:`flex items-center gap-3 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover`,children:[(0,M.jsx)(`span`,{className:`w-4 text-center text-[14px]`,children:t.icon??(0,M.jsx)(h,{className:`size-4 text-ink-3`})}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,M.jsx)(`span`,{className:`block truncate text-[13.5px] font-medium`,children:t.title||e(`untitled`,{ns:`common`})}),(0,M.jsx)(`span`,{className:`block truncate text-[12px] text-ink-3`,children:t.projectName})]}),(0,M.jsx)(`span`,{className:`shrink-0 text-[11.5px] text-ink-3`,children:w(t.updatedAt)})]})},t.id))})})]}),(0,M.jsx)(`div`,{className:`mt-6`,children:(0,M.jsx)(P,{title:e(`activity.title`),delay:200,action:(0,M.jsxs)(r,{to:`${B}/agents`,className:`inline-flex items-center gap-1 text-[12px] font-medium text-ink-3 hover:text-ink`,children:[e(`activity.agents`),` `,(0,M.jsx)(f,{className:`size-3.5`})]}),empty:N.data&&N.data.activity.length===0?e(`activity.empty`):null,children:N.data&&N.data.activity.length>0&&(0,M.jsx)(`div`,{className:`px-2.5 py-1`,children:(0,M.jsx)(x,{items:N.data.activity,workspaceId:t})})})})]})})]})}function P({title:e,children:t,empty:n,delay:r=0,action:i}){return(0,M.jsxs)(`section`,{className:`animate-rise flex flex-col`,style:{animationDelay:`${r}ms`},children:[(0,M.jsxs)(`div`,{className:`mb-2 flex items-center justify-between px-1`,children:[(0,M.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e}),i]}),(0,M.jsx)(`div`,{className:`min-h-[120px] flex-1 rounded-[16px] border border-line bg-surface p-1.5 shadow-sm`,children:n?(0,M.jsx)(`p`,{className:`px-3 py-8 text-center text-[13px] text-ink-3`,children:n}):t})]})}export{N as HomePage};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,dt as r,ft as i}from"./queries-B6zKoYoh.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,N as f,O as p,P as m,S as h,T as g,c as _,j as v,k as y,l as b,s as x,u as S,w as C,x as w,z as T}from"./workspace-TT1PqoC7.js";import{f as E,m as ee,p as te}from"./Field-Clm8umDd.js";var D=e(i(),1),O=r(),ne=Object.defineProperty,k=(e,t)=>ne(e,`name`,{value:t,configurable:!0});function A(e){let t=e+`CollectionProvider`,[n,r]=m(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=k(e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=u(s),l=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(s,n),o=T(t,i.collectionRef);return(0,O.jsx)(c,{ref:o,children:r})});l.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=u(d),h=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=T(t,o),c=a(d,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,O.jsx)(p,{[f]:``,ref:s,children:r})});h.displayName=d;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return k(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:h},g,r]}k(A,`createCollection`);var j=new WeakMap,M=class e extends Map{static{k(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],j.set(this,!0)}set(e,t){return j.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=P(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=N(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=N(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return N(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function N(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=re(e,t);return n===-1?void 0:e[n]}k(N,`at`);function re(e,t){let n=e.length,r=P(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}k(re,`toSafeIndex`);function P(e){return e!==e||e===0?0:Math.trunc(e)}k(P,`toSafeInteger`);function ie(e){let t=e+`CollectionProvider`,[n,r]=m(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=k(({state:e,...t})=>e?(0,O.jsx)(d,{...t,state:e}):(0,O.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=k(e=>{let t=b();return(0,O.jsx)(d,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let d=k(e=>{let{scope:t,children:n,state:r}=e,a=D.useRef(null),[s,c]=D.useState(null),l=T(a,c),[u,d]=r,f=D.useRef(new M),p=D.useCallback(()=>{let e=f.current;return I(e)||e.sort(L),e},[]);return D.useEffect(()=>{if(!s)return;let e=oe(()=>{d(e=>{let t=e.toSorted(L);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,O.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,O.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);d.displayName=e+`CollectionProviderImpl`;let p=e+`CollectionSlot`,h=u(p),g=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(p,n),o=T(t,i.collectionElementRef);return(0,O.jsx)(h,{ref:o,children:r})});g.displayName=p;let _=e+`CollectionItemSlot`,v=u(_),y=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),{setCollection:s,registryRef:c}=a(_,n),l=D.useRef(i);F(l.current,i)||(l.current=i);let u=l.current,d=D.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),p=T(t,d,o);f(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let m=D.useRef(null);return D.useEffect(()=>{let e=o.current,t=m.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(m.current=e?{element:e,itemData:u}:null,s(n=>{let r=new M(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(L)}))}),D.useEffect(()=>()=>{let e=m.current;m.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new M(t);return n.delete(e.element),n})},[s]),(0,O.jsx)(v,{"data-radix-collection-item":``,ref:p,children:r})});y.displayName=_;function b(){return D.useState(new M)}k(b,`useInitCollection`);function x(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}k(x,`useCollection`);function S(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return k(S,`useGetCollection`),[{Provider:c,Slot:g,ItemSlot:y},{createCollectionScope:r,useCollection:x,useGetCollection:S,useInitCollection:b}]}k(ie,`createCollection`);function F(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}k(F,`shallowEqual`);function ae(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}k(ae,`isElementPreceding`);function I(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}k(I,`isInDocumentOrder`);function L(e,t){return!e[1].element||!t[1].element?0:ae(e[1].element,t[1].element)?-1:1}k(L,`sortByDocumentPosition`);function oe(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}k(oe,`getChildListObserver`);var R=Object.defineProperty,se=(e,t)=>R(e,`name`,{value:t,configurable:!0}),z={LTR:`ltr`,RTL:`rtl`},ce=D.createContext(void 0);function B(e){let t=D.useContext(ce);return e||t||z.LTR}se(B,`useDirection`);var le=Object.defineProperty,V=(e,t)=>le(e,`name`,{value:t,configurable:!0}),H=!1;function ue(){let[e,t]=D.useState(H);return D.useEffect(()=>{H||(H=!0,t(!0))},[]),e}V(ue,`useIsHydrated`);var de=D.useSyncExternalStore;function fe(){return()=>{}}V(fe,`subscribe`);function pe(){return de(fe,()=>!0,()=>!1)}V(pe,`useIsHydratedModern`);var me=typeof de==`function`?pe:ue,he=Object.defineProperty,U=(e,t)=>he(e,`name`,{value:t,configurable:!0}),W=`rovingFocusGroup.onEntryFocus`,ge={bubbles:!1,cancelable:!0},G=`RovingFocusGroup`,[_e,ve,ye]=A(G),[be,xe]=m(G,[ye]),Se={Vertical:`vertical`,Horizontal:`horizontal`},Ce={LTR:`ltr`,RTL:`rtl`},[we,Te]=be(G),Ee=D.forwardRef(U(function(e,t){return(0,O.jsx)(_e.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(_e.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(De,{...e,ref:t})})})},`RovingFocusGroup`)),De=D.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,h=D.useRef(null),g=T(t,h),_=B(a),[y,b]=v({prop:o,defaultProp:s??null,onChange:l,caller:G}),[x,S]=D.useState(!1),C=p(u),w=ve(n),E=D.useRef(!1),[ee,te]=D.useState(0);return D.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(W,C),()=>e.removeEventListener(W,C)},[C]),(0,O.jsx)(we,{scope:n,orientation:r,dir:_,loop:i,currentTabStopId:y,onItemFocus:D.useCallback(e=>b(e),[b]),onItemShiftTab:D.useCallback(()=>S(!0),[]),onFocusableItemAdd:D.useCallback(()=>te(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>te(e=>e-1),[]),children:(0,O.jsx)(c.div,{tabIndex:x||ee===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:`none`,...e.style},onMouseDown:d(e.onMouseDown,()=>{E.current=!0}),onFocus:d(e.onFocus,e=>{let t=!E.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(W,ge);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=w().filter(e=>e.focusable);Ne([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}E.current=!1}),onBlur:d(e.onBlur,()=>S(!1))})})},`RovingFocusGroupImpl`)),Oe=`RovingFocusGroupItem`,ke=D.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=y(),u=a||l,p=Te(Oe,n),m=p.currentTabStopId===u,h=ve(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,b=me();return f(()=>{if(b&&r)return g(),()=>_()},[b,r,g,_]),D.useEffect(()=>{if(!b&&r)return g(),()=>_()},[b,r,g,_]),(0,O.jsx)(_e.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,O.jsx)(c.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...s,ref:t,onMouseDown:d(e.onMouseDown,e=>{r?p.onItemFocus(u):e.preventDefault()}),onFocus:d(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:d(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Me(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?Pe(n,r+1):n.slice(r+1)}setTimeout(()=>Ne(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:v!=null}):o})})},`RovingFocusGroupItem`)),Ae={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function je(e,t){return t===Ce.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}U(je,`getDirectionAwareKey`);function Me(e,t,n){let r=je(e.key,n);if(!(t===Se.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Se.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ae[r]}U(Me,`getFocusIntent`);function Ne(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}U(Ne,`focusFirst`);function Pe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}U(Pe,`wrapArray`);var Fe=Object.defineProperty,K=(e,t)=>Fe(e,`name`,{value:t,configurable:!0}),Ie=[`Enter`,` `],Le=[`ArrowDown`,`PageUp`,`Home`],Re=[`ArrowUp`,`PageDown`,`End`],ze=[...Le,...Re];[...Ie],[...Ie];var q=`Menu`,[Be,Ve,He]=A(q),[J,Ue]=m(q,[He,S,xe]),We=S(),Ge=xe(),[Ke,Y]=J(q),[qe,Je]=J(q),Ye=K(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=We(t),[c,l]=D.useState(null),u=D.useRef(!1),d=p(a),f=B(i);return D.useEffect(()=>{let e=K(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=K(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=K(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,O.jsx)(x,{...s,children:(0,O.jsx)(Ke,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,O.jsx)(qe,{scope:t,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Xe=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e,i=We(n);return(0,O.jsx)(_,{...i,...r,ref:t})},`MenuAnchor`)),Ze=`MenuPortal`,[Qe,$e]=J(Ze,{forceMount:void 0}),et=K(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Y(Ze,t);return(0,O.jsx)(Qe,{scope:t,forceMount:n,children:(0,O.jsx)(a,{present:n||o.open,children:(0,O.jsx)(w,{asChild:!0,container:i,children:r})})})},`MenuPortal`),X=`MenuContent`,[tt,nt]=J(X),rt=D.forwardRef(K(function(e,t){let n=$e(X,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Y(X,e.__scopeMenu),s=Je(X,e.__scopeMenu);return(0,O.jsx)(Be.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(a,{present:r||o.open,children:(0,O.jsx)(Be.Slot,{scope:e.__scopeMenu,children:s.modal?(0,O.jsx)(it,{...i,ref:t}):(0,O.jsx)(at,{...i,ref:t})})})})},`MenuContent`)),it=D.forwardRef(K(function(e,t){let n=Y(X,e.__scopeMenu),r=D.useRef(null),i=T(t,r);return D.useEffect(()=>{let e=r.current;if(e)return E(e)},[]),(0,O.jsx)(st,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:d(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),at=D.forwardRef(K(function(e,t){let n=Y(X,e.__scopeMenu);return(0,O.jsx)(st,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ot=u(`MenuContent.ScrollLock`),st=D.forwardRef(K(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:_,onDismiss:v,disableOutsideScroll:y,...x}=e,S=Y(X,n),w=Je(X,n),E=We(n),ne=Ge(n),k=Ve(n),[A,j]=D.useState(null),M=D.useRef(null),[N,re]=D.useState(null);C(N);let{nodes:P,registry:ie}=g(),F=!!(i||y),ae=T(t,M,S.onContentChange,re),I=D.useRef(0),L=D.useRef(``),oe=D.useRef(0),R=D.useRef(null),se=D.useRef(`right`),z=D.useRef(0),ce=D.useMemo(()=>y?[M,...P.map(e=>({current:e}))]:[],[M,P,y]),B=y?te:D.Fragment,le=y?{as:ot,allowPinchZoom:!0,shards:ce}:void 0,V=K(e=>{let t=L.current+e,n=k().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){L.current=e,window.clearTimeout(I.current),e!==``&&(I.current=window.setTimeout(()=>s(``),1e3))}K(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);D.useEffect(()=>()=>window.clearTimeout(I.current),[]),ee();let H=D.useCallback(e=>se.current===R.current?.side&&Nt(e,R.current?.area),[]);return(0,O.jsx)(tt,{scope:n,searchRef:L,onItemEnter:D.useCallback(e=>{H(e)&&e.preventDefault()},[H]),onItemLeave:D.useCallback(e=>{H(e)||(M.current?.focus(),j(null))},[H]),onTriggerLeave:D.useCallback(e=>{H(e)&&e.preventDefault()},[H]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:D.useCallback(e=>{R.current=e},[]),children:(0,O.jsx)(o,{registry:F?ie:null,children:(0,O.jsx)(B,{...le,children:(0,O.jsx)(h,{asChild:!0,trapped:i,branches:P,onMountAutoFocus:d(a,e=>{e.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,O.jsx)(s,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:_,onDismiss:v,children:(0,O.jsx)(Ee,{asChild:!0,...ne,dir:w.dir,orientation:`vertical`,loop:r,currentTabStopId:A,onCurrentTabStopIdChange:j,onEntryFocus:d(u,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(b,{role:`menu`,"aria-orientation":`vertical`,"data-state":Et(S.open),"data-radix-menu-content":``,dir:w.dir,...E,...x,ref:ae,style:{outline:`none`,...x.style},onKeyDown:d(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&V(e.key));let i=M.current;if(e.target!==i||!ze.includes(e.key))return;e.preventDefault();let a=k().filter(e=>!e.disabled).map(e=>e.ref.current);Re.includes(e.key)&&a.reverse(),kt(a)}),onBlur:d(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),L.current=``)}),onPointerMove:d(e.onPointerMove,Z(e=>{let t=e.target,n=z.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>z.current?`right`:`left`;se.current=t,z.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ct=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{role:`group`,...r,ref:t})},`MenuGroup`)),lt=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{...r,ref:t})},`MenuLabel`)),ut=`MenuItem`,dt=`menu.itemSelect`,ft=D.forwardRef(K(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=D.useRef(null),o=Je(ut,e.__scopeMenu),s=nt(ut,e.__scopeMenu),c=T(t,a),u=D.useRef(!1),f=K(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(dt,{bubbles:!0,cancelable:!0});e.addEventListener(dt,e=>r?.(e),{once:!0}),l(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,O.jsx)(pt,{...i,ref:c,disabled:n,onClick:d(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:d(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:d(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Ie.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),pt=D.forwardRef(K(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=nt(ut,n),s=Ge(n),l=D.useRef(null),u=T(t,l),[f,p]=D.useState(!1),[m,h]=D.useState(``);return D.useEffect(()=>{let e=l.current;e&&h((e.textContent??``).trim())},[a.children]),(0,O.jsx)(Be.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,O.jsx)(ke,{asChild:!0,...s,focusable:!r,children:(0,O.jsx)(c.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:d(e.onPointerMove,Z(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:d(e.onPointerLeave,Z(e=>o.onItemLeave(e))),onFocus:d(e.onFocus,()=>p(!0)),onBlur:d(e.onBlur,()=>p(!1))})})})},`MenuItemImpl`)),[mt,ht]=J(`MenuRadioGroup`,{value:void 0,onValueChange:K(()=>{},`onValueChange`)}),gt=D.forwardRef(K(function(e,t){let{value:n,onValueChange:r,...i}=e,a=p(r);return(0,O.jsx)(mt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(ct,{...i,ref:t})})},`MenuRadioGroup`)),_t=`MenuRadioItem`,vt=D.forwardRef(K(function(e,t){let{value:n,...r}=e,i=ht(_t,e.__scopeMenu),a=n===i.value;return(0,O.jsx)(bt,{scope:e.__scopeMenu,checked:a,children:(0,O.jsx)(ft,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Ot(a),onSelect:d(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),yt=`MenuItemIndicator`,[bt,xt]=J(yt,{checked:!1}),St=D.forwardRef(K(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,o=xt(yt,n);return(0,O.jsx)(a,{present:r||Dt(o.checked)||o.checked===!0,children:(0,O.jsx)(c.span,{...i,ref:t,"data-state":Ot(o.checked)})})},`MenuItemIndicator`)),Ct=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[wt,Tt]=J(`MenuSub`);function Et(e){return e?`open`:`closed`}K(Et,`getOpenState`);function Dt(e){return e===`indeterminate`}K(Dt,`isIndeterminate`);function Ot(e){return Dt(e)?`indeterminate`:e?`checked`:`unchecked`}K(Ot,`getCheckedState`);function kt(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}K(kt,`focusFirst`);function At(e,t){return e.map((n,r)=>e[(t+r)%e.length])}K(At,`wrapArray`);function jt(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.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}K(jt,`getNextMatch`);function Mt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}K(Mt,`isPointInPolygon`);function Nt(e,t){return t?Mt({x:e.clientX,y:e.clientY},t):!1}K(Nt,`isPointerInGraceArea`);function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}K(Z,`whenMouse`);var Pt=Object.defineProperty,Q=(e,t)=>Pt(e,`name`,{value:t,configurable:!0}),Ft=`DropdownMenu`,[It,Lt]=m(Ft,[Ue]),$=Ue(),[Rt,zt]=It(Ft),Bt=Q(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),l=D.useRef(null),[u,d]=v({prop:i,defaultProp:a??!1,onChange:o,caller:Ft});return(0,O.jsx)(Rt,{scope:t,triggerId:y(),triggerRef:l,contentId:y(),open:u,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,O.jsx)(Ye,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Vt=`DropdownMenuTrigger`,Ht=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=zt(Vt,n),o=$(n),s=T(t,a.triggerRef);return(0,O.jsx)(Xe,{asChild:!0,...o,children:(0,O.jsx)(c.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:d(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:d(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ut=Q(e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,O.jsx)(et,{...r,...n})},`DropdownMenuPortal`),Wt=`DropdownMenuContent`,Gt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=zt(Wt,n),a=$(n),o=D.useRef(!1);return(0,O.jsx)(rt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:d(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Kt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(lt,{...i,...r,ref:t})},`DropdownMenuLabel`)),qt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(ft,{...i,...r,ref:t})},`DropdownMenuItem`)),Jt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(gt,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Yt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(vt,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Xt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(St,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Zt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ct,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Qt={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Qt.node;var $t=t(Qt),en=Bt,tn=Ht;function nn({children:e,align:t=`end`,className:r,side:i}){return(0,O.jsx)(Ut,{children:(0,O.jsx)(Gt,{align:t,side:i,sideOffset:6,collisionPadding:12,className:n(`z-50 min-w-[200px] rounded-[12px] border border-line bg-surface p-1 shadow-lg outline-none`,r),children:e})})}function rn({icon:e,children:t,onSelect:r,danger:i,shortcut:a,disabled:o}){return(0,O.jsxs)(qt,{onSelect:r,disabled:o,className:n(`flex h-8 cursor-default items-center gap-2.5 rounded-[8px] px-2 text-[13px] outline-none select-none data-[disabled]:opacity-40 data-[highlighted]:bg-hover [&_svg]:size-[15px] [&_svg]:text-ink-3`,i?`text-danger data-[highlighted]:bg-danger-soft [&_svg]:text-danger`:`text-ink`),children:[e,(0,O.jsx)(`span`,{className:`flex-1 truncate`,children:t}),a&&(0,O.jsx)(`span`,{className:`font-mono text-[11px] text-ink-3`,children:a})]})}function an({children:e}){return(0,O.jsx)(Kt,{className:`px-2 pt-1.5 pb-1 text-[11px] font-semibold tracking-[0.06em] text-ink-3 uppercase`,children:e})}function on(){return(0,O.jsx)(Zt,{className:`my-1 h-px bg-line`})}var sn=Jt;function cn({value:e,children:t,icon:n}){return(0,O.jsxs)(Yt,{value:e,className:`flex h-8 cursor-default items-center gap-2.5 rounded-[8px] px-2 text-[13px] outline-none select-none data-[highlighted]:bg-hover data-[state=checked]:font-medium [&_svg]:size-[15px] [&_svg]:text-ink-3`,children:[n,(0,O.jsx)(`span`,{className:`flex-1`,children:t}),(0,O.jsx)(Xt,{children:(0,O.jsx)(`span`,{className:`block size-1.5 rounded-full bg-accent`})})]})}export{cn as a,tn as c,sn as i,$t as l,rn as n,en as o,an as r,on as s,nn as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,dt as r,ft as i}from"./queries-DnrECs2M.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,N as f,O as p,P as m,S as h,T as g,c as _,j as v,k as y,l as b,s as x,u as S,w as C,x as w,z as T}from"./workspace-CUnAQ10Q.js";import{f as E,m as ee,p as te}from"./Field-BzrGz77l.js";var D=e(i(),1),O=r(),ne=Object.defineProperty,k=(e,t)=>ne(e,`name`,{value:t,configurable:!0});function A(e){let t=e+`CollectionProvider`,[n,r]=m(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=k(e=>{let{scope:t,children:n}=e,r=D.useRef(null),a=D.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=u(s),l=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(s,n),o=T(t,i.collectionRef);return(0,O.jsx)(c,{ref:o,children:r})});l.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=u(d),h=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),s=T(t,o),c=a(d,n);return D.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,O.jsx)(p,{[f]:``,ref:s,children:r})});h.displayName=d;function g(t){let n=a(e+`CollectionConsumer`,t);return D.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return k(g,`useCollection`),[{Provider:o,Slot:l,ItemSlot:h},g,r]}k(A,`createCollection`);var j=new WeakMap,M=class e extends Map{static{k(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],j.set(this,!0)}set(e,t){return j.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=P(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=N(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=N(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return N(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function N(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=re(e,t);return n===-1?void 0:e[n]}k(N,`at`);function re(e,t){let n=e.length,r=P(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}k(re,`toSafeIndex`);function P(e){return e!==e||e===0?0:Math.trunc(e)}k(P,`toSafeInteger`);function ie(e){let t=e+`CollectionProvider`,[n,r]=m(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=k(({state:e,...t})=>e?(0,O.jsx)(d,{...t,state:e}):(0,O.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=k(e=>{let t=b();return(0,O.jsx)(d,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let d=k(e=>{let{scope:t,children:n,state:r}=e,a=D.useRef(null),[s,c]=D.useState(null),l=T(a,c),[u,d]=r,f=D.useRef(new M),p=D.useCallback(()=>{let e=f.current;return I(e)||e.sort(L),e},[]);return D.useEffect(()=>{if(!s)return;let e=oe(()=>{d(e=>{let t=e.toSorted(L);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,O.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,O.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);d.displayName=e+`CollectionProviderImpl`;let p=e+`CollectionSlot`,h=u(p),g=D.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(p,n),o=T(t,i.collectionElementRef);return(0,O.jsx)(h,{ref:o,children:r})});g.displayName=p;let _=e+`CollectionItemSlot`,v=u(_),y=D.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=D.useRef(null),{setCollection:s,registryRef:c}=a(_,n),l=D.useRef(i);F(l.current,i)||(l.current=i);let u=l.current,d=D.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),p=T(t,d,o);f(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let m=D.useRef(null);return D.useEffect(()=>{let e=o.current,t=m.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(m.current=e?{element:e,itemData:u}:null,s(n=>{let r=new M(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(L)}))}),D.useEffect(()=>()=>{let e=m.current;m.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new M(t);return n.delete(e.element),n})},[s]),(0,O.jsx)(v,{"data-radix-collection-item":``,ref:p,children:r})});y.displayName=_;function b(){return D.useState(new M)}k(b,`useInitCollection`);function x(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}k(x,`useCollection`);function S(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return k(S,`useGetCollection`),[{Provider:c,Slot:g,ItemSlot:y},{createCollectionScope:r,useCollection:x,useGetCollection:S,useInitCollection:b}]}k(ie,`createCollection`);function F(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}k(F,`shallowEqual`);function ae(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}k(ae,`isElementPreceding`);function I(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}k(I,`isInDocumentOrder`);function L(e,t){return!e[1].element||!t[1].element?0:ae(e[1].element,t[1].element)?-1:1}k(L,`sortByDocumentPosition`);function oe(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}k(oe,`getChildListObserver`);var R=Object.defineProperty,se=(e,t)=>R(e,`name`,{value:t,configurable:!0}),z={LTR:`ltr`,RTL:`rtl`},ce=D.createContext(void 0);function B(e){let t=D.useContext(ce);return e||t||z.LTR}se(B,`useDirection`);var le=Object.defineProperty,V=(e,t)=>le(e,`name`,{value:t,configurable:!0}),H=!1;function ue(){let[e,t]=D.useState(H);return D.useEffect(()=>{H||(H=!0,t(!0))},[]),e}V(ue,`useIsHydrated`);var de=D.useSyncExternalStore;function fe(){return()=>{}}V(fe,`subscribe`);function pe(){return de(fe,()=>!0,()=>!1)}V(pe,`useIsHydratedModern`);var me=typeof de==`function`?pe:ue,he=Object.defineProperty,U=(e,t)=>he(e,`name`,{value:t,configurable:!0}),W=`rovingFocusGroup.onEntryFocus`,ge={bubbles:!1,cancelable:!0},G=`RovingFocusGroup`,[_e,ve,ye]=A(G),[be,xe]=m(G,[ye]),Se={Vertical:`vertical`,Horizontal:`horizontal`},Ce={LTR:`ltr`,RTL:`rtl`},[we,Te]=be(G),Ee=D.forwardRef(U(function(e,t){return(0,O.jsx)(_e.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(_e.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(De,{...e,ref:t})})})},`RovingFocusGroup`)),De=D.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,h=D.useRef(null),g=T(t,h),_=B(a),[y,b]=v({prop:o,defaultProp:s??null,onChange:l,caller:G}),[x,S]=D.useState(!1),C=p(u),w=ve(n),E=D.useRef(!1),[ee,te]=D.useState(0);return D.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(W,C),()=>e.removeEventListener(W,C)},[C]),(0,O.jsx)(we,{scope:n,orientation:r,dir:_,loop:i,currentTabStopId:y,onItemFocus:D.useCallback(e=>b(e),[b]),onItemShiftTab:D.useCallback(()=>S(!0),[]),onFocusableItemAdd:D.useCallback(()=>te(e=>e+1),[]),onFocusableItemRemove:D.useCallback(()=>te(e=>e-1),[]),children:(0,O.jsx)(c.div,{tabIndex:x||ee===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:`none`,...e.style},onMouseDown:d(e.onMouseDown,()=>{E.current=!0}),onFocus:d(e.onFocus,e=>{let t=!E.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(W,ge);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=w().filter(e=>e.focusable);Ne([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}E.current=!1}),onBlur:d(e.onBlur,()=>S(!1))})})},`RovingFocusGroupImpl`)),Oe=`RovingFocusGroupItem`,ke=D.forwardRef(U(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=y(),u=a||l,p=Te(Oe,n),m=p.currentTabStopId===u,h=ve(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,b=me();return f(()=>{if(b&&r)return g(),()=>_()},[b,r,g,_]),D.useEffect(()=>{if(!b&&r)return g(),()=>_()},[b,r,g,_]),(0,O.jsx)(_e.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,O.jsx)(c.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...s,ref:t,onMouseDown:d(e.onMouseDown,e=>{r?p.onItemFocus(u):e.preventDefault()}),onFocus:d(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:d(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Me(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?Pe(n,r+1):n.slice(r+1)}setTimeout(()=>Ne(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:v!=null}):o})})},`RovingFocusGroupItem`)),Ae={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function je(e,t){return t===Ce.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}U(je,`getDirectionAwareKey`);function Me(e,t,n){let r=je(e.key,n);if(!(t===Se.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Se.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ae[r]}U(Me,`getFocusIntent`);function Ne(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}U(Ne,`focusFirst`);function Pe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}U(Pe,`wrapArray`);var Fe=Object.defineProperty,K=(e,t)=>Fe(e,`name`,{value:t,configurable:!0}),Ie=[`Enter`,` `],Le=[`ArrowDown`,`PageUp`,`Home`],Re=[`ArrowUp`,`PageDown`,`End`],ze=[...Le,...Re];[...Ie],[...Ie];var q=`Menu`,[Be,Ve,He]=A(q),[J,Ue]=m(q,[He,S,xe]),We=S(),Ge=xe(),[Ke,Y]=J(q),[qe,Je]=J(q),Ye=K(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=We(t),[c,l]=D.useState(null),u=D.useRef(!1),d=p(a),f=B(i);return D.useEffect(()=>{let e=K(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=K(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),D.useEffect(()=>{if(!n)return;let e=K(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,O.jsx)(x,{...s,children:(0,O.jsx)(Ke,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,O.jsx)(qe,{scope:t,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Xe=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e,i=We(n);return(0,O.jsx)(_,{...i,...r,ref:t})},`MenuAnchor`)),Ze=`MenuPortal`,[Qe,$e]=J(Ze,{forceMount:void 0}),et=K(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Y(Ze,t);return(0,O.jsx)(Qe,{scope:t,forceMount:n,children:(0,O.jsx)(a,{present:n||o.open,children:(0,O.jsx)(w,{asChild:!0,container:i,children:r})})})},`MenuPortal`),X=`MenuContent`,[tt,nt]=J(X),rt=D.forwardRef(K(function(e,t){let n=$e(X,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Y(X,e.__scopeMenu),s=Je(X,e.__scopeMenu);return(0,O.jsx)(Be.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(a,{present:r||o.open,children:(0,O.jsx)(Be.Slot,{scope:e.__scopeMenu,children:s.modal?(0,O.jsx)(it,{...i,ref:t}):(0,O.jsx)(at,{...i,ref:t})})})})},`MenuContent`)),it=D.forwardRef(K(function(e,t){let n=Y(X,e.__scopeMenu),r=D.useRef(null),i=T(t,r);return D.useEffect(()=>{let e=r.current;if(e)return E(e)},[]),(0,O.jsx)(st,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:d(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),at=D.forwardRef(K(function(e,t){let n=Y(X,e.__scopeMenu);return(0,O.jsx)(st,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ot=u(`MenuContent.ScrollLock`),st=D.forwardRef(K(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:_,onDismiss:v,disableOutsideScroll:y,...x}=e,S=Y(X,n),w=Je(X,n),E=We(n),ne=Ge(n),k=Ve(n),[A,j]=D.useState(null),M=D.useRef(null),[N,re]=D.useState(null);C(N);let{nodes:P,registry:ie}=g(),F=!!(i||y),ae=T(t,M,S.onContentChange,re),I=D.useRef(0),L=D.useRef(``),oe=D.useRef(0),R=D.useRef(null),se=D.useRef(`right`),z=D.useRef(0),ce=D.useMemo(()=>y?[M,...P.map(e=>({current:e}))]:[],[M,P,y]),B=y?te:D.Fragment,le=y?{as:ot,allowPinchZoom:!0,shards:ce}:void 0,V=K(e=>{let t=L.current+e,n=k().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){L.current=e,window.clearTimeout(I.current),e!==``&&(I.current=window.setTimeout(()=>s(``),1e3))}K(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);D.useEffect(()=>()=>window.clearTimeout(I.current),[]),ee();let H=D.useCallback(e=>se.current===R.current?.side&&Nt(e,R.current?.area),[]);return(0,O.jsx)(tt,{scope:n,searchRef:L,onItemEnter:D.useCallback(e=>{H(e)&&e.preventDefault()},[H]),onItemLeave:D.useCallback(e=>{H(e)||(M.current?.focus(),j(null))},[H]),onTriggerLeave:D.useCallback(e=>{H(e)&&e.preventDefault()},[H]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:D.useCallback(e=>{R.current=e},[]),children:(0,O.jsx)(o,{registry:F?ie:null,children:(0,O.jsx)(B,{...le,children:(0,O.jsx)(h,{asChild:!0,trapped:i,branches:P,onMountAutoFocus:d(a,e=>{e.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,O.jsx)(s,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:_,onDismiss:v,children:(0,O.jsx)(Ee,{asChild:!0,...ne,dir:w.dir,orientation:`vertical`,loop:r,currentTabStopId:A,onCurrentTabStopIdChange:j,onEntryFocus:d(u,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(b,{role:`menu`,"aria-orientation":`vertical`,"data-state":Et(S.open),"data-radix-menu-content":``,dir:w.dir,...E,...x,ref:ae,style:{outline:`none`,...x.style},onKeyDown:d(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&V(e.key));let i=M.current;if(e.target!==i||!ze.includes(e.key))return;e.preventDefault();let a=k().filter(e=>!e.disabled).map(e=>e.ref.current);Re.includes(e.key)&&a.reverse(),kt(a)}),onBlur:d(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),L.current=``)}),onPointerMove:d(e.onPointerMove,Z(e=>{let t=e.target,n=z.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>z.current?`right`:`left`;se.current=t,z.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ct=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{role:`group`,...r,ref:t})},`MenuGroup`)),lt=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{...r,ref:t})},`MenuLabel`)),ut=`MenuItem`,dt=`menu.itemSelect`,ft=D.forwardRef(K(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=D.useRef(null),o=Je(ut,e.__scopeMenu),s=nt(ut,e.__scopeMenu),c=T(t,a),u=D.useRef(!1),f=K(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(dt,{bubbles:!0,cancelable:!0});e.addEventListener(dt,e=>r?.(e),{once:!0}),l(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,O.jsx)(pt,{...i,ref:c,disabled:n,onClick:d(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:d(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:d(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Ie.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),pt=D.forwardRef(K(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=nt(ut,n),s=Ge(n),l=D.useRef(null),u=T(t,l),[f,p]=D.useState(!1),[m,h]=D.useState(``);return D.useEffect(()=>{let e=l.current;e&&h((e.textContent??``).trim())},[a.children]),(0,O.jsx)(Be.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,O.jsx)(ke,{asChild:!0,...s,focusable:!r,children:(0,O.jsx)(c.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:d(e.onPointerMove,Z(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:d(e.onPointerLeave,Z(e=>o.onItemLeave(e))),onFocus:d(e.onFocus,()=>p(!0)),onBlur:d(e.onBlur,()=>p(!1))})})})},`MenuItemImpl`)),[mt,ht]=J(`MenuRadioGroup`,{value:void 0,onValueChange:K(()=>{},`onValueChange`)}),gt=D.forwardRef(K(function(e,t){let{value:n,onValueChange:r,...i}=e,a=p(r);return(0,O.jsx)(mt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,O.jsx)(ct,{...i,ref:t})})},`MenuRadioGroup`)),_t=`MenuRadioItem`,vt=D.forwardRef(K(function(e,t){let{value:n,...r}=e,i=ht(_t,e.__scopeMenu),a=n===i.value;return(0,O.jsx)(bt,{scope:e.__scopeMenu,checked:a,children:(0,O.jsx)(ft,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Ot(a),onSelect:d(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),yt=`MenuItemIndicator`,[bt,xt]=J(yt,{checked:!1}),St=D.forwardRef(K(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,o=xt(yt,n);return(0,O.jsx)(a,{present:r||Dt(o.checked)||o.checked===!0,children:(0,O.jsx)(c.span,{...i,ref:t,"data-state":Ot(o.checked)})})},`MenuItemIndicator`)),Ct=D.forwardRef(K(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(c.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[wt,Tt]=J(`MenuSub`);function Et(e){return e?`open`:`closed`}K(Et,`getOpenState`);function Dt(e){return e===`indeterminate`}K(Dt,`isIndeterminate`);function Ot(e){return Dt(e)?`indeterminate`:e?`checked`:`unchecked`}K(Ot,`getCheckedState`);function kt(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}K(kt,`focusFirst`);function At(e,t){return e.map((n,r)=>e[(t+r)%e.length])}K(At,`wrapArray`);function jt(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.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}K(jt,`getNextMatch`);function Mt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}K(Mt,`isPointInPolygon`);function Nt(e,t){return t?Mt({x:e.clientX,y:e.clientY},t):!1}K(Nt,`isPointerInGraceArea`);function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}K(Z,`whenMouse`);var Pt=Object.defineProperty,Q=(e,t)=>Pt(e,`name`,{value:t,configurable:!0}),Ft=`DropdownMenu`,[It,Lt]=m(Ft,[Ue]),$=Ue(),[Rt,zt]=It(Ft),Bt=Q(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),l=D.useRef(null),[u,d]=v({prop:i,defaultProp:a??!1,onChange:o,caller:Ft});return(0,O.jsx)(Rt,{scope:t,triggerId:y(),triggerRef:l,contentId:y(),open:u,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,O.jsx)(Ye,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Vt=`DropdownMenuTrigger`,Ht=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=zt(Vt,n),o=$(n),s=T(t,a.triggerRef);return(0,O.jsx)(Xe,{asChild:!0,...o,children:(0,O.jsx)(c.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:d(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:d(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ut=Q(e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,O.jsx)(et,{...r,...n})},`DropdownMenuPortal`),Wt=`DropdownMenuContent`,Gt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=zt(Wt,n),a=$(n),o=D.useRef(!1);return(0,O.jsx)(rt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:d(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:d(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Kt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(lt,{...i,...r,ref:t})},`DropdownMenuLabel`)),qt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(ft,{...i,...r,ref:t})},`DropdownMenuItem`)),Jt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(gt,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Yt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(vt,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Xt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(St,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),Zt=D.forwardRef(Q(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,O.jsx)(Ct,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Qt={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Qt.node;var $t=t(Qt),en=Bt,tn=Ht;function nn({children:e,align:t=`end`,className:r,side:i}){return(0,O.jsx)(Ut,{children:(0,O.jsx)(Gt,{align:t,side:i,sideOffset:6,collisionPadding:12,className:n(`z-50 min-w-[200px] rounded-[12px] border border-line bg-surface p-1 shadow-lg outline-none`,r),children:e})})}function rn({icon:e,children:t,onSelect:r,danger:i,shortcut:a,disabled:o}){return(0,O.jsxs)(qt,{onSelect:r,disabled:o,className:n(`flex h-8 cursor-default items-center gap-2.5 rounded-[8px] px-2 text-[13px] outline-none select-none data-[disabled]:opacity-40 data-[highlighted]:bg-hover [&_svg]:size-[15px] [&_svg]:text-ink-3`,i?`text-danger data-[highlighted]:bg-danger-soft [&_svg]:text-danger`:`text-ink`),children:[e,(0,O.jsx)(`span`,{className:`flex-1 truncate`,children:t}),a&&(0,O.jsx)(`span`,{className:`font-mono text-[11px] text-ink-3`,children:a})]})}function an({children:e}){return(0,O.jsx)(Kt,{className:`px-2 pt-1.5 pb-1 text-[11px] font-semibold tracking-[0.06em] text-ink-3 uppercase`,children:e})}function on(){return(0,O.jsx)(Zt,{className:`my-1 h-px bg-line`})}var sn=Jt;function cn({value:e,children:t,icon:n}){return(0,O.jsxs)(Yt,{value:e,className:`flex h-8 cursor-default items-center gap-2.5 rounded-[8px] px-2 text-[13px] outline-none select-none data-[highlighted]:bg-hover data-[state=checked]:font-medium [&_svg]:size-[15px] [&_svg]:text-ink-3`,children:[n,(0,O.jsx)(`span`,{className:`flex-1`,children:t}),(0,O.jsx)(Xt,{children:(0,O.jsx)(`span`,{className:`block size-1.5 rounded-full bg-accent`})})]})}export{cn as a,tn as c,sn as i,$t as l,rn as n,en as o,an as r,on as s,nn as t};
@@ -1 +1 @@
1
- import{I as e,L as t,Q as n,R as r,dt as i}from"./queries-B6zKoYoh.js";import{n as a,r as o}from"./workspace-TT1PqoC7.js";var s={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};s.node;var c=e(s),l=i();function u({crumbs:e,actions:i,className:s}){let{t:u}=r(`shell`),{sidebarOpen:d,toggleSidebar:f}=a();return(0,l.jsxs)(`header`,{className:t(`flex h-[52px] shrink-0 items-center gap-2 border-b border-line px-3 sm:px-4`,s),children:[(0,l.jsx)(`div`,{className:t(d&&`min-[900px]:hidden`),children:(0,l.jsx)(o,{label:u(d?`header.hideSidebar`:`header.showSidebar`),keys:[`mod`,`\\`],children:(0,l.jsx)(`button`,{type:`button`,onClick:f,className:`grid size-8 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,"aria-label":u(`header.toggleSidebar`),children:(0,l.jsx)(c,{className:`size-[17px]`})})})}),(0,l.jsx)(`nav`,{"aria-label":u(`header.breadcrumb`),className:`flex min-w-0 flex-1 items-center gap-1 text-[13px]`,children:e.map((r,i)=>{let a=i===e.length-1;return(0,l.jsxs)(`span`,{className:t(`flex min-w-0 items-center gap-1`,!a&&`max-sm:hidden`),children:[r.to&&!a?(0,l.jsx)(n,{to:r.to,className:`truncate rounded-[6px] px-1.5 py-1 text-ink-3 hover:bg-hover hover:text-ink`,children:r.label}):(0,l.jsx)(`span`,{className:t(`truncate px-1.5 py-1`,a?`font-medium text-ink`:`text-ink-3`),"aria-current":a?`page`:void 0,children:r.label}),!a&&(0,l.jsx)(`span`,{className:`text-ink-4`,children:`/`})]},i)})}),i&&(0,l.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:i})]})}export{u as t};
1
+ import{I as e,L as t,Q as n,R as r,dt as i}from"./queries-DnrECs2M.js";import{n as a,r as o}from"./workspace-CUnAQ10Q.js";var s={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};s.node;var c=e(s),l=i();function u({crumbs:e,actions:i,className:s}){let{t:u}=r(`shell`),{sidebarOpen:d,toggleSidebar:f}=a();return(0,l.jsxs)(`header`,{className:t(`flex h-[52px] shrink-0 items-center gap-2 border-b border-line px-3 sm:px-4`,s),children:[(0,l.jsx)(`div`,{className:t(d&&`min-[900px]:hidden`),children:(0,l.jsx)(o,{label:u(d?`header.hideSidebar`:`header.showSidebar`),keys:[`mod`,`\\`],children:(0,l.jsx)(`button`,{type:`button`,onClick:f,className:`grid size-8 place-items-center rounded-[8px] text-ink-3 hover:bg-hover hover:text-ink`,"aria-label":u(`header.toggleSidebar`),children:(0,l.jsx)(c,{className:`size-[17px]`})})})}),(0,l.jsx)(`nav`,{"aria-label":u(`header.breadcrumb`),className:`flex min-w-0 flex-1 items-center gap-1 text-[13px]`,children:e.map((r,i)=>{let a=i===e.length-1;return(0,l.jsxs)(`span`,{className:t(`flex min-w-0 items-center gap-1`,!a&&`max-sm:hidden`),children:[r.to&&!a?(0,l.jsx)(n,{to:r.to,className:`truncate rounded-[6px] px-1.5 py-1 text-ink-3 hover:bg-hover hover:text-ink`,children:r.label}):(0,l.jsx)(`span`,{className:t(`truncate px-1.5 py-1`,a?`font-medium text-ink`:`text-ink-3`),"aria-current":a?`page`:void 0,children:r.label}),!a&&(0,l.jsx)(`span`,{className:`text-ink-4`,children:`/`})]},i)})}),i&&(0,l.jsx)(`div`,{className:`flex shrink-0 items-center gap-1`,children:i})]})}export{u as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,dt as r,ft as i}from"./queries-B6zKoYoh.js";import{A as a,C as o,E as s,F as c,L as l,M as u,P as d,S as f,T as p,c as m,j as h,k as g,l as _,s as v,u as y,w as b,x,z as S}from"./workspace-TT1PqoC7.js";import{f as C,m as w,p as T}from"./Field-Clm8umDd.js";var E=e(i(),1),D=r(),O=Object.defineProperty,k=(e,t)=>O(e,`name`,{value:t,configurable:!0}),A=`Popover`,[j,M]=d(A,[y]),N=y(),[P,F]=j(A),I=k(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=N(t),c=E.useRef(null),[l,u]=E.useState(!1),[d,f]=E.useState(0),[p,m]=E.useState(0),[_,y]=h({prop:r,defaultProp:i??!1,onChange:a,caller:A});return(0,D.jsx)(v,{...s,children:(0,D.jsx)(P,{scope:t,contentId:g(),titleId:g(),descriptionId:g(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:_,onOpenChange:y,onOpenToggle:E.useCallback(()=>y(e=>!e),[y]),hasCustomAnchor:l,onCustomAnchorAdd:E.useCallback(()=>u(!0),[]),onCustomAnchorRemove:E.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),L=`PopoverTrigger`,R=E.forwardRef(k(function(e,t){let{__scopePopover:n,...r}=e,i=F(L,n),a=N(n),o=S(t,i.triggerRef),s=(0,D.jsx)(c.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Y(i.open),...r,ref:o,onClick:u(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,D.jsx)(m,{asChild:!0,...a,children:s})},`PopoverTrigger`)),z=`PopoverPortal`,[B,V]=j(z,{forceMount:void 0}),H=k(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=F(z,t);return(0,D.jsx)(B,{scope:t,forceMount:n,children:(0,D.jsx)(a,{present:n||o.open,children:(0,D.jsx)(x,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),U=`PopoverContent`,W=E.forwardRef(k(function(e,t){let n=V(U,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=F(U,e.__scopePopover);return(0,D.jsx)(a,{present:r||o.open,children:o.modal?(0,D.jsx)(K,{...i,ref:t}):(0,D.jsx)(q,{...i,ref:t})})},`PopoverContent`)),G=l(`PopoverContent.RemoveScroll`),K=E.forwardRef(k(function(e,t){let n=F(U,e.__scopePopover),r=E.useRef(null),i=S(t,r),a=E.useRef(!1),{nodes:o,registry:s}=p();return E.useEffect(()=>{let e=r.current;if(e)return C(e)},[]),(0,D.jsx)(T,{as:G,allowPinchZoom:!0,shards:E.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,D.jsx)(J,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:u(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:u(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:u(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),q=E.forwardRef(k(function(e,t){let n=F(U,e.__scopePopover),r=E.useRef(!1),i=E.useRef(!1);return(0,D.jsx)(J,{...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()}})},`PopoverContentNonModal`)),J=E.forwardRef(k(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,"aria-describedby":m,branchNodes:h,branchRegistry:g,...v}=e,y=F(U,n),x=N(n),[C,T]=E.useState(null),O=S(t,T);return b(C),w(),(0,D.jsx)(o,{registry:g,children:(0,D.jsx)(f,{asChild:!0,loop:!0,trapped:r,branches:h,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,D.jsx)(s,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>y.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,D.jsx)(_,{"data-state":Y(y.open),role:`dialog`,id:y.contentId,"aria-labelledby":y.titlePresent?y.titleId:void 0,"aria-describedby":y.descriptionPresent?X(m,y.descriptionId):m,...x,...v,ref:O,style:{...v.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)`}})})})})},`PopoverContentImpl`));function Y(e){return e?`open`:`closed`}k(Y,`getState`);function X(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}k(X,`concatAriaDescribedby`);var Z={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Z.node;var Q=t(Z);function $({trigger:e,children:t,open:r,onOpenChange:i,align:a=`start`,className:o}){return(0,D.jsxs)(I,{open:r,onOpenChange:i,children:[(0,D.jsx)(R,{asChild:!0,children:e}),(0,D.jsx)(H,{children:(0,D.jsx)(W,{align:a,sideOffset:6,collisionPadding:12,className:n(`z-50 rounded-[14px] border border-line bg-surface p-2 shadow-lg outline-none`,o),children:t})})]})}export{Q as n,$ as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,L as n,dt as r,ft as i}from"./queries-DnrECs2M.js";import{A as a,C as o,E as s,F as c,L as l,M as u,P as d,S as f,T as p,c as m,j as h,k as g,l as _,s as v,u as y,w as b,x,z as S}from"./workspace-CUnAQ10Q.js";import{f as C,m as w,p as T}from"./Field-BzrGz77l.js";var E=e(i(),1),D=r(),O=Object.defineProperty,k=(e,t)=>O(e,`name`,{value:t,configurable:!0}),A=`Popover`,[j,M]=d(A,[y]),N=y(),[P,F]=j(A),I=k(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=N(t),c=E.useRef(null),[l,u]=E.useState(!1),[d,f]=E.useState(0),[p,m]=E.useState(0),[_,y]=h({prop:r,defaultProp:i??!1,onChange:a,caller:A});return(0,D.jsx)(v,{...s,children:(0,D.jsx)(P,{scope:t,contentId:g(),titleId:g(),descriptionId:g(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:_,onOpenChange:y,onOpenToggle:E.useCallback(()=>y(e=>!e),[y]),hasCustomAnchor:l,onCustomAnchorAdd:E.useCallback(()=>u(!0),[]),onCustomAnchorRemove:E.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),L=`PopoverTrigger`,R=E.forwardRef(k(function(e,t){let{__scopePopover:n,...r}=e,i=F(L,n),a=N(n),o=S(t,i.triggerRef),s=(0,D.jsx)(c.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Y(i.open),...r,ref:o,onClick:u(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,D.jsx)(m,{asChild:!0,...a,children:s})},`PopoverTrigger`)),z=`PopoverPortal`,[B,V]=j(z,{forceMount:void 0}),H=k(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=F(z,t);return(0,D.jsx)(B,{scope:t,forceMount:n,children:(0,D.jsx)(a,{present:n||o.open,children:(0,D.jsx)(x,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),U=`PopoverContent`,W=E.forwardRef(k(function(e,t){let n=V(U,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=F(U,e.__scopePopover);return(0,D.jsx)(a,{present:r||o.open,children:o.modal?(0,D.jsx)(K,{...i,ref:t}):(0,D.jsx)(q,{...i,ref:t})})},`PopoverContent`)),G=l(`PopoverContent.RemoveScroll`),K=E.forwardRef(k(function(e,t){let n=F(U,e.__scopePopover),r=E.useRef(null),i=S(t,r),a=E.useRef(!1),{nodes:o,registry:s}=p();return E.useEffect(()=>{let e=r.current;if(e)return C(e)},[]),(0,D.jsx)(T,{as:G,allowPinchZoom:!0,shards:E.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,D.jsx)(J,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:u(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:u(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:u(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),q=E.forwardRef(k(function(e,t){let n=F(U,e.__scopePopover),r=E.useRef(!1),i=E.useRef(!1);return(0,D.jsx)(J,{...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()}})},`PopoverContentNonModal`)),J=E.forwardRef(k(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,"aria-describedby":m,branchNodes:h,branchRegistry:g,...v}=e,y=F(U,n),x=N(n),[C,T]=E.useState(null),O=S(t,T);return b(C),w(),(0,D.jsx)(o,{registry:g,children:(0,D.jsx)(f,{asChild:!0,loop:!0,trapped:r,branches:h,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,D.jsx)(s,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:p,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>y.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,D.jsx)(_,{"data-state":Y(y.open),role:`dialog`,id:y.contentId,"aria-labelledby":y.titlePresent?y.titleId:void 0,"aria-describedby":y.descriptionPresent?X(m,y.descriptionId):m,...x,...v,ref:O,style:{...v.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)`}})})})})},`PopoverContentImpl`));function Y(e){return e?`open`:`closed`}k(Y,`getState`);function X(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}k(X,`concatAriaDescribedby`);var Z={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Z.node;var Q=t(Z);function $({trigger:e,children:t,open:r,onOpenChange:i,align:a=`start`,className:o}){return(0,D.jsxs)(I,{open:r,onOpenChange:i,children:[(0,D.jsx)(R,{asChild:!0,children:e}),(0,D.jsx)(H,{children:(0,D.jsx)(W,{align:a,sideOffset:6,collisionPadding:12,className:n(`z-50 rounded-[14px] border border-line bg-surface p-2 shadow-lg outline-none`,o),children:t})})]})}export{Q as n,$ as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./file-plus-BK_cMGl4.js";import{n,t as r}from"./square-kanban-D4XKuQYH.js";import{t as i}from"./pencil-xcVnI27R.js";import{t as a}from"./plus-oKcb7VoU.js";import{t as o}from"./trash-BtYRNn0Z.js";import{L as s,Q as c,R as l,dt as u,ft as d,ot as f}from"./queries-B6zKoYoh.js";import{t as p}from"./Button-Cdv5jCuw.js";import{t as m}from"./EmptyState-DbuyD37d.js";import{u as h}from"./format-CNMdJ6_8.js";import{t as g}from"./PageHeader-ClyiqS7h.js";import{t as _}from"./ProjectSettingsDialog-6QxmHLzs.js";import{t as v}from"./actions-CnbXVELu.js";import{n as y}from"./States-BL27BexV.js";import{n as b}from"./workspace-TT1PqoC7.js";var x=e(d(),1),S=u();function C(){let{t:e}=l([`projects`,`docs`]),{projectId:u}=f(),{workspaceId:d,overview:C}=b(),w=v(d),[T,E]=(0,x.useState)(!1),D=C?.projects.find(e=>e.id===u);if(!C)return(0,S.jsx)(`div`,{className:`p-10`,children:(0,S.jsx)(`div`,{className:`skeleton h-10 w-1/3`})});if(!D)return(0,S.jsx)(y,{});let O=D.pages.filter(e=>e.parentId===null),k=e=>D.pages.filter(t=>t.parentId===e).length,A=[...D.pages].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).slice(0,5);return(0,S.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,S.jsx)(g,{crumbs:[{label:D.name}],actions:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,S.jsx)(i,{}),onClick:()=>E(!0),children:(0,S.jsx)(`span`,{className:`max-sm:hidden`,children:e(`edit`)})}),(0,S.jsx)(p,{variant:`ghost`,size:`sm`,iconOnly:!0,icon:(0,S.jsx)(o,{}),"aria-label":e(`delete`),onClick:()=>void w.deleteProject(D)})]})}),(0,S.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,S.jsxs)(`div`,{className:`mx-auto w-full max-w-[1040px] px-6 py-10 sm:px-10`,children:[(0,S.jsxs)(`div`,{className:`animate-rise flex items-start gap-4`,children:[(0,S.jsx)(`span`,{className:s(`glyph size-12 rounded-[12px] text-[22px]`,`c-${D.color}`),children:D.name[0]?.toUpperCase()}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`h1`,{className:`font-display text-[34px] leading-tight font-medium tracking-[-0.02em]`,children:D.name}),(0,S.jsx)(`p`,{className:`mt-1 text-[14px] text-ink-2`,children:D.description||e(`summary`,{boards:e(`boardCount`,{count:D.boards.length}),pages:e(`pageCount`,{count:D.pages.length})})})]})]}),(0,S.jsxs)(`section`,{className:`mt-10`,children:[(0,S.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,S.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`boards.title`)}),(0,S.jsx)(p,{size:`sm`,variant:`ghost`,icon:(0,S.jsx)(a,{}),onClick:()=>void w.createBoard(D.id),children:e(`boards.new`)})]}),D.boards.length?(0,S.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:D.boards.map((t,n)=>(0,S.jsxs)(c,{to:`/w/${d}/b/${t.id}`,style:{animationDelay:`${n*40}ms`},className:`animate-rise group relative overflow-hidden rounded-[14px] border border-line bg-surface p-4 shadow-sm transition-all hover:-translate-y-0.5 hover:border-line-strong hover:shadow-md`,children:[(0,S.jsx)(`div`,{className:`mb-6 flex gap-1.5`,"aria-hidden":`true`,children:[.9,.6,.35].map((e,t)=>(0,S.jsx)(`span`,{className:s(`h-10 flex-1 rounded-[6px] bg-sunken`,`c-${D.color}`),style:{boxShadow:`inset 0 3px 0 color-mix(in oklab, var(--c) ${e*100}%, transparent)`}},t))}),(0,S.jsxs)(`p`,{className:`flex items-center gap-2 text-[14.5px] font-semibold`,children:[(0,S.jsx)(r,{className:`size-4 text-ink-3`}),t.name]}),(0,S.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-ink-3`,children:e(`boards.openCards`,{count:t.cardCount})})]},t.id))}):(0,S.jsx)(`button`,{type:`button`,onClick:()=>void w.createBoard(D.id),className:`w-full rounded-[14px] border border-dashed border-line-strong px-5 py-8 text-center text-[13.5px] text-ink-3 transition-colors hover:border-ink-3 hover:text-ink-2`,children:e(`boards.empty`)})]}),(0,S.jsxs)(`section`,{className:`mt-10 grid gap-8 lg:grid-cols-[1.4fr_1fr]`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,S.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`docs.title`)}),(0,S.jsx)(p,{size:`sm`,variant:`ghost`,icon:(0,S.jsx)(t,{}),onClick:()=>void w.createPage(D.id),children:e(`docs.new`)})]}),O.length?(0,S.jsx)(`ul`,{className:`overflow-hidden rounded-[14px] border border-line bg-surface shadow-sm`,children:O.map(t=>(0,S.jsx)(`li`,{className:`border-b border-line last:border-b-0`,children:(0,S.jsxs)(c,{to:`/w/${d}/d/${t.id}`,className:`flex items-center gap-3 px-4 py-3 transition-colors hover:bg-hover`,children:[(0,S.jsx)(`span`,{className:`w-5 text-center text-[16px]`,children:t.icon??(0,S.jsx)(n,{className:`size-4 text-ink-3`})}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[14px] font-medium`,children:t.title||e(`untitled`,{ns:`common`})}),k(t.id)>0&&(0,S.jsx)(`span`,{className:`text-[12px] text-ink-3`,children:e(`docs.subpages`,{count:k(t.id)})})]})},t.id))}):(0,S.jsx)(m,{icon:(0,S.jsx)(n,{}),title:e(`docs.emptyTitle`),action:(0,S.jsx)(p,{variant:`primary`,icon:(0,S.jsx)(t,{}),onClick:()=>void w.createPage(D.id),children:e(`docs.emptyAction`)}),children:e(`docs.emptyBody`)})]}),A.length>0&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h2`,{className:`mb-3 text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`recent`)}),(0,S.jsx)(`ul`,{className:`flex flex-col gap-1`,children:A.map(t=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(c,{to:`/w/${d}/d/${t.id}`,className:`flex items-center gap-2.5 rounded-[9px] px-2 py-1.5 hover:bg-hover`,children:[(0,S.jsx)(`span`,{className:`w-4 text-center text-[13px]`,children:t.icon??(0,S.jsx)(n,{className:`size-3.5 text-ink-3`})}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13.5px]`,children:t.title||e(`untitled`,{ns:`common`})}),(0,S.jsx)(`span`,{className:`text-[11.5px] text-ink-3`,children:h(t.updatedAt)})]})},t.id))})]})]})]})}),(0,S.jsx)(_,{project:D,open:T,onOpenChange:E})]})}export{C as ProjectPage};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./file-plus-dA3dSRUX.js";import{n,t as r}from"./square-kanban-ly6jmUnZ.js";import{t as i}from"./pencil-BLKUFMJd.js";import{t as a}from"./plus-Bfyl1Cnf.js";import{t as o}from"./trash-CJAi39PH.js";import{L as s,Q as c,R as l,dt as u,ft as d,ot as f}from"./queries-DnrECs2M.js";import{t as p}from"./Button-Btbho6sH.js";import{t as m}from"./EmptyState-BK-MD-22.js";import{u as h}from"./format-DFP4kHwY.js";import{t as g}from"./PageHeader-DQFfF3dC.js";import{t as _}from"./ProjectSettingsDialog-C1CyAGKv.js";import{t as v}from"./actions-CuhPuiCb.js";import{n as y}from"./States-B9aFGoJ7.js";import{n as b}from"./workspace-CUnAQ10Q.js";var x=e(d(),1),S=u();function C(){let{t:e}=l([`projects`,`docs`]),{projectId:u}=f(),{workspaceId:d,overview:C}=b(),w=v(d),[T,E]=(0,x.useState)(!1),D=C?.projects.find(e=>e.id===u);if(!C)return(0,S.jsx)(`div`,{className:`p-10`,children:(0,S.jsx)(`div`,{className:`skeleton h-10 w-1/3`})});if(!D)return(0,S.jsx)(y,{});let O=D.pages.filter(e=>e.parentId===null),k=e=>D.pages.filter(t=>t.parentId===e).length,A=[...D.pages].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)).slice(0,5);return(0,S.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,S.jsx)(g,{crumbs:[{label:D.name}],actions:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,S.jsx)(i,{}),onClick:()=>E(!0),children:(0,S.jsx)(`span`,{className:`max-sm:hidden`,children:e(`edit`)})}),(0,S.jsx)(p,{variant:`ghost`,size:`sm`,iconOnly:!0,icon:(0,S.jsx)(o,{}),"aria-label":e(`delete`),onClick:()=>void w.deleteProject(D)})]})}),(0,S.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,S.jsxs)(`div`,{className:`mx-auto w-full max-w-[1040px] px-6 py-10 sm:px-10`,children:[(0,S.jsxs)(`div`,{className:`animate-rise flex items-start gap-4`,children:[(0,S.jsx)(`span`,{className:s(`glyph size-12 rounded-[12px] text-[22px]`,`c-${D.color}`),children:D.name[0]?.toUpperCase()}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`h1`,{className:`font-display text-[34px] leading-tight font-medium tracking-[-0.02em]`,children:D.name}),(0,S.jsx)(`p`,{className:`mt-1 text-[14px] text-ink-2`,children:D.description||e(`summary`,{boards:e(`boardCount`,{count:D.boards.length}),pages:e(`pageCount`,{count:D.pages.length})})})]})]}),(0,S.jsxs)(`section`,{className:`mt-10`,children:[(0,S.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,S.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`boards.title`)}),(0,S.jsx)(p,{size:`sm`,variant:`ghost`,icon:(0,S.jsx)(a,{}),onClick:()=>void w.createBoard(D.id),children:e(`boards.new`)})]}),D.boards.length?(0,S.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:D.boards.map((t,n)=>(0,S.jsxs)(c,{to:`/w/${d}/b/${t.id}`,style:{animationDelay:`${n*40}ms`},className:`animate-rise group relative overflow-hidden rounded-[14px] border border-line bg-surface p-4 shadow-sm transition-all hover:-translate-y-0.5 hover:border-line-strong hover:shadow-md`,children:[(0,S.jsx)(`div`,{className:`mb-6 flex gap-1.5`,"aria-hidden":`true`,children:[.9,.6,.35].map((e,t)=>(0,S.jsx)(`span`,{className:s(`h-10 flex-1 rounded-[6px] bg-sunken`,`c-${D.color}`),style:{boxShadow:`inset 0 3px 0 color-mix(in oklab, var(--c) ${e*100}%, transparent)`}},t))}),(0,S.jsxs)(`p`,{className:`flex items-center gap-2 text-[14.5px] font-semibold`,children:[(0,S.jsx)(r,{className:`size-4 text-ink-3`}),t.name]}),(0,S.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-ink-3`,children:e(`boards.openCards`,{count:t.cardCount})})]},t.id))}):(0,S.jsx)(`button`,{type:`button`,onClick:()=>void w.createBoard(D.id),className:`w-full rounded-[14px] border border-dashed border-line-strong px-5 py-8 text-center text-[13.5px] text-ink-3 transition-colors hover:border-ink-3 hover:text-ink-2`,children:e(`boards.empty`)})]}),(0,S.jsxs)(`section`,{className:`mt-10 grid gap-8 lg:grid-cols-[1.4fr_1fr]`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,S.jsx)(`h2`,{className:`text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`docs.title`)}),(0,S.jsx)(p,{size:`sm`,variant:`ghost`,icon:(0,S.jsx)(t,{}),onClick:()=>void w.createPage(D.id),children:e(`docs.new`)})]}),O.length?(0,S.jsx)(`ul`,{className:`overflow-hidden rounded-[14px] border border-line bg-surface shadow-sm`,children:O.map(t=>(0,S.jsx)(`li`,{className:`border-b border-line last:border-b-0`,children:(0,S.jsxs)(c,{to:`/w/${d}/d/${t.id}`,className:`flex items-center gap-3 px-4 py-3 transition-colors hover:bg-hover`,children:[(0,S.jsx)(`span`,{className:`w-5 text-center text-[16px]`,children:t.icon??(0,S.jsx)(n,{className:`size-4 text-ink-3`})}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[14px] font-medium`,children:t.title||e(`untitled`,{ns:`common`})}),k(t.id)>0&&(0,S.jsx)(`span`,{className:`text-[12px] text-ink-3`,children:e(`docs.subpages`,{count:k(t.id)})})]})},t.id))}):(0,S.jsx)(m,{icon:(0,S.jsx)(n,{}),title:e(`docs.emptyTitle`),action:(0,S.jsx)(p,{variant:`primary`,icon:(0,S.jsx)(t,{}),onClick:()=>void w.createPage(D.id),children:e(`docs.emptyAction`)}),children:e(`docs.emptyBody`)})]}),A.length>0&&(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h2`,{className:`mb-3 text-[11.5px] font-semibold tracking-[0.08em] text-ink-3 uppercase`,children:e(`recent`)}),(0,S.jsx)(`ul`,{className:`flex flex-col gap-1`,children:A.map(t=>(0,S.jsx)(`li`,{children:(0,S.jsxs)(c,{to:`/w/${d}/d/${t.id}`,className:`flex items-center gap-2.5 rounded-[9px] px-2 py-1.5 hover:bg-hover`,children:[(0,S.jsx)(`span`,{className:`w-4 text-center text-[13px]`,children:t.icon??(0,S.jsx)(n,{className:`size-3.5 text-ink-3`})}),(0,S.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13.5px]`,children:t.title||e(`untitled`,{ns:`common`})}),(0,S.jsx)(`span`,{className:`text-[11.5px] text-ink-3`,children:h(t.updatedAt)})]})},t.id))})]})]})]})}),(0,S.jsx)(_,{project:D,open:T,onOpenChange:E})]})}export{C as ProjectPage};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{R as t,b as n,dt as r,ft as i,n as a,t as o,v as s}from"./queries-B6zKoYoh.js";import{g as c,i as l,t as u}from"./Field-Clm8umDd.js";import{t as d}from"./ColorPicker-1A8lBK9k.js";import{t as f}from"./Button-Cdv5jCuw.js";var p=e(i(),1),m=r();function h({project:e,open:r,onOpenChange:i}){let{t:h}=t([`shell`,`common`]),[g,_]=(0,p.useState)(e.name),[v,y]=(0,p.useState)(e.description??``),[b,x]=(0,p.useState)(e.color),[S,C]=(0,p.useState)(!1);(0,p.useEffect)(()=>{r&&(_(e.name),y(e.description??``),x(e.color))},[r,e]);async function w(t){t.preventDefault(),C(!0);try{await n(`/projects/${e.id}`,{name:g.trim(),color:b,description:v.trim()}),await a.invalidateQueries({queryKey:o.overview(e.workspaceId)}),i(!1)}catch(e){c.error(s(e))}finally{C(!1)}}return(0,m.jsx)(l,{open:r,onOpenChange:i,title:h(`projectSettings.title`),children:(0,m.jsxs)(`form`,{onSubmit:w,className:`flex flex-col gap-5`,children:[(0,m.jsx)(u,{label:h(`projectSettings.name`),value:g,onChange:e=>_(e.target.value),maxLength:80,autoFocus:!0}),(0,m.jsx)(u,{label:h(`projectSettings.description`),value:v,onChange:e=>y(e.target.value),maxLength:500,placeholder:h(`projectSettings.optional`)}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(`span`,{className:`text-[12.5px] font-medium text-ink-2`,children:h(`projectSettings.color`)}),(0,m.jsx)(d,{value:b,onChange:x})]}),(0,m.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,m.jsx)(f,{variant:`ghost`,onClick:()=>i(!1),children:h(`common:actions.cancel`)}),(0,m.jsx)(f,{type:`submit`,variant:`primary`,loading:S,disabled:!g.trim(),children:h(`common:actions.save`)})]})]})})}export{h as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{R as t,b as n,dt as r,ft as i,n as a,t as o,v as s}from"./queries-DnrECs2M.js";import{g as c,i as l,t as u}from"./Field-BzrGz77l.js";import{t as d}from"./ColorPicker-C67TVWyM.js";import{t as f}from"./Button-Btbho6sH.js";var p=e(i(),1),m=r();function h({project:e,open:r,onOpenChange:i}){let{t:h}=t([`shell`,`common`]),[g,_]=(0,p.useState)(e.name),[v,y]=(0,p.useState)(e.description??``),[b,x]=(0,p.useState)(e.color),[S,C]=(0,p.useState)(!1);(0,p.useEffect)(()=>{r&&(_(e.name),y(e.description??``),x(e.color))},[r,e]);async function w(t){t.preventDefault(),C(!0);try{await n(`/projects/${e.id}`,{name:g.trim(),color:b,description:v.trim()}),await a.invalidateQueries({queryKey:o.overview(e.workspaceId)}),i(!1)}catch(e){c.error(s(e))}finally{C(!1)}}return(0,m.jsx)(l,{open:r,onOpenChange:i,title:h(`projectSettings.title`),children:(0,m.jsxs)(`form`,{onSubmit:w,className:`flex flex-col gap-5`,children:[(0,m.jsx)(u,{label:h(`projectSettings.name`),value:g,onChange:e=>_(e.target.value),maxLength:80,autoFocus:!0}),(0,m.jsx)(u,{label:h(`projectSettings.description`),value:v,onChange:e=>y(e.target.value),maxLength:500,placeholder:h(`projectSettings.optional`)}),(0,m.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,m.jsx)(`span`,{className:`text-[12.5px] font-medium text-ink-2`,children:h(`projectSettings.color`)}),(0,m.jsx)(d,{value:b,onChange:x})]}),(0,m.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,m.jsx)(f,{variant:`ghost`,onClick:()=>i(!1),children:h(`common:actions.cancel`)}),(0,m.jsx)(f,{type:`submit`,variant:`primary`,loading:S,disabled:!g.trim(),children:h(`common:actions.save`)})]})]})})}export{h as t};
@@ -1 +1 @@
1
- import{L as e,dt as t}from"./queries-B6zKoYoh.js";var n=t();function r({value:t,onChange:r,options:i,label:a,size:o=`md`}){return(0,n.jsx)(`div`,{role:`radiogroup`,"aria-label":a,className:`inline-flex rounded-[10px] bg-sunken p-0.5 shadow-[inset_0_0_0_1px_var(--line)]`,children:i.map(i=>(0,n.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":t===i.value,onClick:()=>r(i.value),className:e(`rounded-[8px] font-medium transition-all duration-150`,o===`sm`?`h-6.5 px-2.5 text-[12px]`:`h-7.5 px-3 text-[13px]`,t===i.value?`bg-surface text-ink shadow-sm`:`text-ink-3 hover:text-ink`),children:i.label},i.value))})}export{r as t};
1
+ import{L as e,dt as t}from"./queries-DnrECs2M.js";var n=t();function r({value:t,onChange:r,options:i,label:a,size:o=`md`}){return(0,n.jsx)(`div`,{role:`radiogroup`,"aria-label":a,className:`inline-flex rounded-[10px] bg-sunken p-0.5 shadow-[inset_0_0_0_1px_var(--line)]`,children:i.map(i=>(0,n.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":t===i.value,onClick:()=>r(i.value),className:e(`rounded-[8px] font-medium transition-all duration-150`,o===`sm`?`h-6.5 px-2.5 text-[12px]`:`h-7.5 px-3 text-[13px]`,t===i.value?`bg-surface text-ink shadow-sm`:`text-ink-3 hover:text-ink`),children:i.label},i.value))})}export{r as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,R as n,_ as r,at as i,b as a,dt as o,ft as s,m as c,t as l,ut as u,v as d,w as f,x as p}from"./queries-B6zKoYoh.js";import{g as m,i as h,r as g,t as _}from"./Field-Clm8umDd.js";import{t as v}from"./Button-Cdv5jCuw.js";import{t as y}from"./Segmented-BDMZD7nV.js";import{n as b,t as x}from"./AccessKeyReveal-CQaxpNT4.js";import{t as S}from"./theme-BfxBDblB.js";import{t as C}from"./arrow-up-right-B1Q3GS2t.js";import{t as w}from"./CopyButton-C-W1lxF3.js";import{t as T}from"./PageHeader-ClyiqS7h.js";import{t as E}from"./Trans-COFrPeA8.js";import{n as D}from"./session-Dg2szHMi.js";import{n as O}from"./workspace-TT1PqoC7.js";var k={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};k.node;var A=t(k),j=e(s(),1),M=o();function N(e){switch(e.install){case`cli`:case`cloudflare`:return{how:`cli`,command:`npx create-orqevio@latest update${e.copyName&&e.copyName!==`orqevio`?` --name ${e.copyName}`:``}`};case`button`:return{how:`button`};case`docker`:return{how:`docker`,command:`docker compose pull && docker compose up -d`};default:return{how:`source`,command:`git pull && pnpm install && pnpm build`}}}function P(){let{t:e}=n(`settings`),{data:t}=c();if(!t)return null;let r=N(t);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`p`,{className:`text-[14px]`,children:[`Orqevio `,(0,M.jsx)(`span`,{className:`font-mono text-[13px]`,children:t.current}),t.latest&&!t.updateAvailable&&(0,M.jsxs)(`span`,{className:`text-ink-3`,children:[` · `,e(`version.upToDate`)]})]}),t.updateAvailable&&(0,M.jsxs)(`div`,{role:`status`,className:`flex flex-col gap-3 rounded-[12px] border border-accent/40 bg-[color-mix(in_oklab,var(--accent)_8%,var(--sheet))] p-4`,children:[(0,M.jsxs)(`p`,{className:`flex items-center gap-2 text-[14px] font-medium`,children:[(0,M.jsx)(A,{className:`size-4 text-accent`}),e(`version.available`,{version:t.latest??``})]}),(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-2`,children:e(`version.how.${r.how}`)}),r.command&&(0,M.jsxs)(`div`,{className:`flex items-center gap-2 rounded-[10px] border border-line bg-surface py-1 pr-1 pl-3`,children:[(0,M.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-[12.5px]`,children:r.command}),(0,M.jsx)(w,{value:r.command,label:e(`version.copy`),message:e(`version.copied`)})]}),(0,M.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:e(`version.kept`)}),t.releaseUrl&&(0,M.jsxs)(`a`,{href:t.releaseUrl,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 self-start text-[13px] font-medium text-accent hover:underline`,children:[e(`version.releaseNotes`),(0,M.jsx)(C,{className:`size-3.5`})]})]})]})}var F=[`data`,`files`,`vault`,`agents`];function I(){let{t:e}=n([`settings`,`common`]),t=u(),r=i(),a=c(),[o,s]=(0,j.useState)(!1),[l,f]=(0,j.useState)(``),[g,y]=(0,j.useState)(``),[b,x]=(0,j.useState)(!1),S=a.data?.copyName??window.location.hostname,C=a.data?.copyName,w=a.data?.install===`cli`?`npx create-orqevio@latest uninstall${C&&C!==`orqevio`?` --name ${C}`:``}`:null;async function T(e){e.preventDefault(),x(!0);try{await p(`/account/uninstall`,{accessKey:l}),D(),t.clear(),r(`/login`,{replace:!0})}catch(e){m.error(d(e)),x(!1)}}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:()=>s(!0),children:e(`uninstall.action`)}),(0,M.jsx)(h,{open:o,onOpenChange:s,title:e(`uninstall.title`),description:e(`uninstall.confirmDescription`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:T,children:[(0,M.jsx)(`ul`,{className:`flex list-disc flex-col gap-1.5 pl-5 text-[13px] leading-relaxed text-ink-2`,children:F.map(t=>(0,M.jsx)(`li`,{children:e(`uninstall.loses.${t}`)},t))}),(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-3`,children:e(`uninstall.afterwards`)}),w&&(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-3`,children:(0,M.jsx)(E,{t:e,i18nKey:`uninstall.oneCommand`,values:{command:w},components:{code:(0,M.jsx)(`code`,{className:`font-mono text-[12px] break-words text-ink`})}})}),(0,M.jsx)(_,{label:e(`uninstall.accessKey`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:l,onChange:e=>f(e.target.value),autoFocus:!0}),(0,M.jsx)(_,{label:e(`uninstall.typeName`,{name:S}),autoComplete:`off`,spellCheck:!1,className:`[&_input]:font-mono`,value:g,onChange:e=>y(e.target.value)}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,M.jsx)(v,{variant:`ghost`,onClick:()=>s(!1),children:e(`common:actions.cancel`)}),(0,M.jsx)(v,{type:`submit`,variant:`danger`,loading:b,disabled:!l||g.trim()!==S,children:e(`uninstall.confirm`)})]})]})})]})}function L({title:e,description:t,children:n}){return(0,M.jsxs)(`section`,{className:`grid gap-4 border-b border-line py-8 last:border-b-0 md:grid-cols-[240px_1fr] md:gap-10`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h2`,{className:`font-display text-[18px] font-medium`,children:e}),t&&(0,M.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-ink-3`,children:t})]}),(0,M.jsx)(`div`,{className:`max-w-[460px]`,children:n})]})}function R(){let{t:e}=n([`settings`,`common`]),{me:t,workspaceId:o}=O(),s=u(),c=i(),C=g(),w=t.workspaces.find(e=>e.id===o),[E,k]=(0,j.useState)(t.user.name),[A,N]=(0,j.useState)(t.user.theme),[F,R]=(0,j.useState)(w?.name??``),[z,B]=(0,j.useState)(``),[V,H]=(0,j.useState)(null),[U,W]=(0,j.useState)(!1),[G,K]=(0,j.useState)(``),[q,J]=(0,j.useState)(null);async function Y(e,t,n){J(e);try{return await t(),m.success(n),!0}catch(e){return m.error(d(e)),!1}finally{J(null)}}return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,M.jsx)(T,{crumbs:[{label:e(`title`)}]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,M.jsxs)(`div`,{className:`mx-auto w-full max-w-[900px] px-6 py-10 sm:px-10`,children:[(0,M.jsx)(`h1`,{className:`font-display text-[34px] font-medium tracking-[-0.02em]`,children:e(`title`)}),(0,M.jsx)(L,{title:e(`profile.title`),description:e(`profile.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:t=>{t.preventDefault(),Y(`profile`,async()=>{await a(`/account`,{name:E.trim()}),await s.invalidateQueries({queryKey:l.me})},e(`profile.saved`))},children:[(0,M.jsx)(_,{label:e(`profile.name`),value:E,onChange:e=>k(e.target.value),maxLength:80}),(0,M.jsx)(v,{type:`submit`,variant:`primary`,className:`self-start`,loading:q===`profile`,disabled:!E.trim()||E.trim()===t.user.name,children:e(`common:actions.save`)})]})}),(0,M.jsx)(L,{title:e(`appearance.title`),description:e(`appearance.description`),children:(0,M.jsx)(y,{label:e(`appearance.theme`),value:A,onChange:e=>{N(e),S(e),a(`/account`,{theme:e}).then(()=>s.invalidateQueries({queryKey:l.me}))},options:[{value:`system`,label:e(`appearance.themes.system`)},{value:`light`,label:e(`appearance.themes.light`)},{value:`dark`,label:e(`appearance.themes.dark`)}]})}),(0,M.jsx)(L,{title:e(`language.title`),description:e(`language.description`),children:(0,M.jsx)(b,{hideLabel:!0,onChange:async e=>{await f(e);try{let t=await a(`/account`,{locale:e});s.setQueryData(l.me,e=>e&&{...e,user:t})}catch(e){m.error(d(e))}}})}),(0,M.jsx)(L,{title:e(`accessKey.title`),description:e(`accessKey.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:async e=>{e.preventDefault(),J(`access-key`);try{let e=await p(`/account/access-key`,{currentAccessKey:z});B(``),H(e.accessKey)}catch(e){m.error(d(e))}finally{J(null)}},children:[(0,M.jsx)(_,{label:e(`accessKey.current`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:z,onChange:e=>B(e.target.value)}),(0,M.jsx)(v,{type:`submit`,variant:`primary`,className:`self-start`,loading:q===`access-key`,disabled:!z.trim(),children:e(`accessKey.generate`)})]})}),w&&(0,M.jsx)(L,{title:e(`workspace.title`),description:e(`workspace.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:t=>{t.preventDefault(),Y(`workspace`,async()=>{await a(`/workspaces/${o}`,{name:F.trim()}),await s.invalidateQueries({queryKey:l.me})},e(`workspace.saved`))},children:[(0,M.jsx)(_,{label:e(`workspace.name`),value:F,onChange:e=>R(e.target.value),maxLength:60}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(v,{type:`submit`,variant:`primary`,loading:q===`workspace`,disabled:!F.trim()||F.trim()===w.name,children:e(`common:actions.save`)}),w.role===`owner`&&t.workspaces.length>1&&(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:async()=>{await C({title:e(`workspace.deleteTitle`,{name:w.name}),description:e(`workspace.deleteDescription`),confirmLabel:e(`workspace.delete`),danger:!0})&&await Y(`delete-ws`,()=>r(`/workspaces/${o}`),e(`workspace.deleted`))&&(await s.invalidateQueries({queryKey:l.me}),c(`/`,{replace:!0}))},children:e(`workspace.delete`)})]})]})}),(0,M.jsx)(L,{title:e(`copy.title`),description:e(`copy.description`),children:(0,M.jsx)(P,{})}),(0,M.jsx)(L,{title:e(`erase.title`),description:e(`erase.description`),children:(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:()=>W(!0),children:e(`erase.action`)})}),(0,M.jsx)(L,{title:e(`uninstall.title`),description:e(`uninstall.description`),children:(0,M.jsx)(I,{})})]})}),(0,M.jsx)(h,{open:V!==null,onOpenChange:()=>{},hideClose:!0,title:e(`accessKey.newTitle`),description:e(`accessKey.newDescription`),children:V&&(0,M.jsx)(x,{accessKey:V,confirmLabel:e(`accessKey.done`),onDone:()=>{H(null),m.success(e(`accessKey.updated`))}})}),(0,M.jsx)(h,{open:U,onOpenChange:W,title:e(`erase.title`),description:e(`erase.confirmDescription`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:async t=>{t.preventDefault(),await Y(`delete`,()=>p(`/account/delete`,{accessKey:G}),e(`erase.done`))&&(D(),s.clear(),c(`/setup`,{replace:!0}))},children:[(0,M.jsx)(_,{label:e(`erase.accessKey`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:G,onChange:e=>K(e.target.value),autoFocus:!0}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,M.jsx)(v,{variant:`ghost`,onClick:()=>W(!1),children:e(`common:actions.cancel`)}),(0,M.jsx)(v,{type:`submit`,variant:`danger`,loading:q===`delete`,disabled:!G,children:e(`erase.confirm`)})]})]})})]})}export{R as SettingsPage};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{I as t,R as n,_ as r,at as i,b as a,dt as o,ft as s,m as c,t as l,ut as u,v as d,w as f,x as p}from"./queries-DnrECs2M.js";import{g as m,i as h,r as g,t as _}from"./Field-BzrGz77l.js";import{t as v}from"./Button-Btbho6sH.js";import{t as y}from"./Segmented-CF8X5UQP.js";import{n as b,t as x}from"./AccessKeyReveal-D8iaHAmc.js";import{t as S}from"./theme-BfxBDblB.js";import{t as C}from"./arrow-up-right-xXLe7dy5.js";import{t as w}from"./CopyButton-BSygyOA8.js";import{t as T}from"./PageHeader-DQFfF3dC.js";import{t as E}from"./Trans-CZ4Nv-G9.js";import{n as D}from"./session-BAxO2EgV.js";import{n as O}from"./workspace-CUnAQ10Q.js";var k={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};k.node;var A=t(k),j=e(s(),1),M=o();function N(e){switch(e.install){case`cli`:case`cloudflare`:return{how:`cli`,command:`npx create-orqevio@latest update${e.copyName&&e.copyName!==`orqevio`?` --name ${e.copyName}`:``}`};case`button`:return{how:`button`};case`docker`:return{how:`docker`,command:`docker compose pull && docker compose up -d`};default:return{how:`source`,command:`git pull && pnpm install && pnpm build`}}}function P(){let{t:e}=n(`settings`),{data:t}=c();if(!t)return null;let r=N(t);return(0,M.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,M.jsxs)(`p`,{className:`text-[14px]`,children:[`Orqevio `,(0,M.jsx)(`span`,{className:`font-mono text-[13px]`,children:t.current}),t.latest&&!t.updateAvailable&&(0,M.jsxs)(`span`,{className:`text-ink-3`,children:[` · `,e(`version.upToDate`)]})]}),t.updateAvailable&&(0,M.jsxs)(`div`,{role:`status`,className:`flex flex-col gap-3 rounded-[12px] border border-accent/40 bg-[color-mix(in_oklab,var(--accent)_8%,var(--sheet))] p-4`,children:[(0,M.jsxs)(`p`,{className:`flex items-center gap-2 text-[14px] font-medium`,children:[(0,M.jsx)(A,{className:`size-4 text-accent`}),e(`version.available`,{version:t.latest??``})]}),(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-2`,children:e(`version.how.${r.how}`)}),r.command&&(0,M.jsxs)(`div`,{className:`flex items-center gap-2 rounded-[10px] border border-line bg-surface py-1 pr-1 pl-3`,children:[(0,M.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-[12.5px]`,children:r.command}),(0,M.jsx)(w,{value:r.command,label:e(`version.copy`),message:e(`version.copied`)})]}),(0,M.jsx)(`p`,{className:`text-[12.5px] text-ink-3`,children:e(`version.kept`)}),t.releaseUrl&&(0,M.jsxs)(`a`,{href:t.releaseUrl,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 self-start text-[13px] font-medium text-accent hover:underline`,children:[e(`version.releaseNotes`),(0,M.jsx)(C,{className:`size-3.5`})]})]})]})}var F=[`data`,`files`,`vault`,`agents`];function I(){let{t:e}=n([`settings`,`common`]),t=u(),r=i(),a=c(),[o,s]=(0,j.useState)(!1),[l,f]=(0,j.useState)(``),[g,y]=(0,j.useState)(``),[b,x]=(0,j.useState)(!1),S=a.data?.copyName??window.location.hostname,C=a.data?.copyName,w=a.data?.install===`cli`?`npx create-orqevio@latest uninstall${C&&C!==`orqevio`?` --name ${C}`:``}`:null;async function T(e){e.preventDefault(),x(!0);try{await p(`/account/uninstall`,{accessKey:l}),D(),t.clear(),r(`/login`,{replace:!0})}catch(e){m.error(d(e)),x(!1)}}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:()=>s(!0),children:e(`uninstall.action`)}),(0,M.jsx)(h,{open:o,onOpenChange:s,title:e(`uninstall.title`),description:e(`uninstall.confirmDescription`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:T,children:[(0,M.jsx)(`ul`,{className:`flex list-disc flex-col gap-1.5 pl-5 text-[13px] leading-relaxed text-ink-2`,children:F.map(t=>(0,M.jsx)(`li`,{children:e(`uninstall.loses.${t}`)},t))}),(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-3`,children:e(`uninstall.afterwards`)}),w&&(0,M.jsx)(`p`,{className:`text-[13px] leading-relaxed text-ink-3`,children:(0,M.jsx)(E,{t:e,i18nKey:`uninstall.oneCommand`,values:{command:w},components:{code:(0,M.jsx)(`code`,{className:`font-mono text-[12px] break-words text-ink`})}})}),(0,M.jsx)(_,{label:e(`uninstall.accessKey`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:l,onChange:e=>f(e.target.value),autoFocus:!0}),(0,M.jsx)(_,{label:e(`uninstall.typeName`,{name:S}),autoComplete:`off`,spellCheck:!1,className:`[&_input]:font-mono`,value:g,onChange:e=>y(e.target.value)}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,M.jsx)(v,{variant:`ghost`,onClick:()=>s(!1),children:e(`common:actions.cancel`)}),(0,M.jsx)(v,{type:`submit`,variant:`danger`,loading:b,disabled:!l||g.trim()!==S,children:e(`uninstall.confirm`)})]})]})})]})}function L({title:e,description:t,children:n}){return(0,M.jsxs)(`section`,{className:`grid gap-4 border-b border-line py-8 last:border-b-0 md:grid-cols-[240px_1fr] md:gap-10`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h2`,{className:`font-display text-[18px] font-medium`,children:e}),t&&(0,M.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-ink-3`,children:t})]}),(0,M.jsx)(`div`,{className:`max-w-[460px]`,children:n})]})}function R(){let{t:e}=n([`settings`,`common`]),{me:t,workspaceId:o}=O(),s=u(),c=i(),C=g(),w=t.workspaces.find(e=>e.id===o),[E,k]=(0,j.useState)(t.user.name),[A,N]=(0,j.useState)(t.user.theme),[F,R]=(0,j.useState)(w?.name??``),[z,B]=(0,j.useState)(``),[V,H]=(0,j.useState)(null),[U,W]=(0,j.useState)(!1),[G,K]=(0,j.useState)(``),[q,J]=(0,j.useState)(null);async function Y(e,t,n){J(e);try{return await t(),m.success(n),!0}catch(e){return m.error(d(e)),!1}finally{J(null)}}return(0,M.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,M.jsx)(T,{crumbs:[{label:e(`title`)}]}),(0,M.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,M.jsxs)(`div`,{className:`mx-auto w-full max-w-[900px] px-6 py-10 sm:px-10`,children:[(0,M.jsx)(`h1`,{className:`font-display text-[34px] font-medium tracking-[-0.02em]`,children:e(`title`)}),(0,M.jsx)(L,{title:e(`profile.title`),description:e(`profile.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:t=>{t.preventDefault(),Y(`profile`,async()=>{await a(`/account`,{name:E.trim()}),await s.invalidateQueries({queryKey:l.me})},e(`profile.saved`))},children:[(0,M.jsx)(_,{label:e(`profile.name`),value:E,onChange:e=>k(e.target.value),maxLength:80}),(0,M.jsx)(v,{type:`submit`,variant:`primary`,className:`self-start`,loading:q===`profile`,disabled:!E.trim()||E.trim()===t.user.name,children:e(`common:actions.save`)})]})}),(0,M.jsx)(L,{title:e(`appearance.title`),description:e(`appearance.description`),children:(0,M.jsx)(y,{label:e(`appearance.theme`),value:A,onChange:e=>{N(e),S(e),a(`/account`,{theme:e}).then(()=>s.invalidateQueries({queryKey:l.me}))},options:[{value:`system`,label:e(`appearance.themes.system`)},{value:`light`,label:e(`appearance.themes.light`)},{value:`dark`,label:e(`appearance.themes.dark`)}]})}),(0,M.jsx)(L,{title:e(`language.title`),description:e(`language.description`),children:(0,M.jsx)(b,{hideLabel:!0,onChange:async e=>{await f(e);try{let t=await a(`/account`,{locale:e});s.setQueryData(l.me,e=>e&&{...e,user:t})}catch(e){m.error(d(e))}}})}),(0,M.jsx)(L,{title:e(`accessKey.title`),description:e(`accessKey.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:async e=>{e.preventDefault(),J(`access-key`);try{let e=await p(`/account/access-key`,{currentAccessKey:z});B(``),H(e.accessKey)}catch(e){m.error(d(e))}finally{J(null)}},children:[(0,M.jsx)(_,{label:e(`accessKey.current`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:z,onChange:e=>B(e.target.value)}),(0,M.jsx)(v,{type:`submit`,variant:`primary`,className:`self-start`,loading:q===`access-key`,disabled:!z.trim(),children:e(`accessKey.generate`)})]})}),w&&(0,M.jsx)(L,{title:e(`workspace.title`),description:e(`workspace.description`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:t=>{t.preventDefault(),Y(`workspace`,async()=>{await a(`/workspaces/${o}`,{name:F.trim()}),await s.invalidateQueries({queryKey:l.me})},e(`workspace.saved`))},children:[(0,M.jsx)(_,{label:e(`workspace.name`),value:F,onChange:e=>R(e.target.value),maxLength:60}),(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,M.jsx)(v,{type:`submit`,variant:`primary`,loading:q===`workspace`,disabled:!F.trim()||F.trim()===w.name,children:e(`common:actions.save`)}),w.role===`owner`&&t.workspaces.length>1&&(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:async()=>{await C({title:e(`workspace.deleteTitle`,{name:w.name}),description:e(`workspace.deleteDescription`),confirmLabel:e(`workspace.delete`),danger:!0})&&await Y(`delete-ws`,()=>r(`/workspaces/${o}`),e(`workspace.deleted`))&&(await s.invalidateQueries({queryKey:l.me}),c(`/`,{replace:!0}))},children:e(`workspace.delete`)})]})]})}),(0,M.jsx)(L,{title:e(`copy.title`),description:e(`copy.description`),children:(0,M.jsx)(P,{})}),(0,M.jsx)(L,{title:e(`erase.title`),description:e(`erase.description`),children:(0,M.jsx)(v,{variant:`ghost`,className:`text-danger hover:bg-danger-soft hover:text-danger`,onClick:()=>W(!0),children:e(`erase.action`)})}),(0,M.jsx)(L,{title:e(`uninstall.title`),description:e(`uninstall.description`),children:(0,M.jsx)(I,{})})]})}),(0,M.jsx)(h,{open:V!==null,onOpenChange:()=>{},hideClose:!0,title:e(`accessKey.newTitle`),description:e(`accessKey.newDescription`),children:V&&(0,M.jsx)(x,{accessKey:V,confirmLabel:e(`accessKey.done`),onDone:()=>{H(null),m.success(e(`accessKey.updated`))}})}),(0,M.jsx)(h,{open:U,onOpenChange:W,title:e(`erase.title`),description:e(`erase.confirmDescription`),children:(0,M.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:async t=>{t.preventDefault(),await Y(`delete`,()=>p(`/account/delete`,{accessKey:G}),e(`erase.done`))&&(D(),s.clear(),c(`/setup`,{replace:!0}))},children:[(0,M.jsx)(_,{label:e(`erase.accessKey`),type:`password`,autoComplete:`current-password`,spellCheck:!1,className:`[&_input]:font-mono`,value:G,onChange:e=>K(e.target.value),autoFocus:!0}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,M.jsx)(v,{variant:`ghost`,onClick:()=>W(!1),children:e(`common:actions.cancel`)}),(0,M.jsx)(v,{type:`submit`,variant:`danger`,loading:q===`delete`,disabled:!G,children:e(`erase.confirm`)})]})]})})]})}export{R as SettingsPage};
@@ -1 +1 @@
1
- import{L as e,Q as t,R as n,dt as r}from"./queries-B6zKoYoh.js";import{t as i}from"./Button-Cdv5jCuw.js";var a=r();function o({size:t=28,live:n=!1,className:r}){return(0,a.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 32 32`,className:e(`shrink-0`,r),"aria-hidden":`true`,children:[(0,a.jsx)(`rect`,{width:`32`,height:`32`,rx:`9`,fill:`var(--ink)`}),(0,a.jsx)(`path`,{d:`M22.4 9.6A9 9 0 1 0 25 16`,fill:`none`,stroke:`var(--sheet)`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,a.jsx)(`circle`,{cx:`23.6`,cy:`8.4`,r:`2.6`,fill:n?`var(--agent)`:`var(--accent)`,style:{transition:`fill 0.4s`},children:n&&(0,a.jsx)(`animate`,{attributeName:`r`,values:`2.6;3.3;2.6`,dur:`1.4s`,repeatCount:`indefinite`})})]})}function s({className:t}){return(0,a.jsx)(`span`,{className:e(`font-display text-[19px] font-semibold tracking-[-0.02em]`,t),children:`Orqevio`})}function c(){let{t:e}=n();return(0,a.jsx)(`div`,{className:`grid min-h-dvh place-items-center bg-desk`,"aria-busy":`true`,"aria-label":e(`loading`),children:(0,a.jsx)(o,{size:36,className:`animate-pulse`})})}function l({standalone:e}){let{t:r}=n();return(0,a.jsx)(`div`,{className:e?`grid min-h-dvh place-items-center bg-desk px-6`:`grid h-full place-items-center px-6`,children:(0,a.jsxs)(`div`,{className:`animate-rise text-center`,children:[(0,a.jsx)(`p`,{className:`font-mono text-[12px] tracking-[0.2em] text-ink-3`,children:`404`}),(0,a.jsx)(`h1`,{className:`mt-3 font-display text-[34px] font-medium`,children:r(`notFound.title`)}),(0,a.jsx)(`p`,{className:`mt-2 text-ink-2`,children:r(`notFound.body`)}),(0,a.jsx)(t,{to:`/`,className:`mt-6 inline-block`,children:(0,a.jsx)(i,{variant:`primary`,children:r(`actions.backHome`)})})]})})}function u(){return(0,a.jsxs)(`div`,{className:`mx-auto w-full max-w-[760px] px-8 pt-16`,"aria-busy":`true`,children:[(0,a.jsx)(`div`,{className:`skeleton h-10 w-2/3`}),(0,a.jsx)(`div`,{className:`skeleton mt-6 h-4 w-full`}),(0,a.jsx)(`div`,{className:`skeleton mt-3 h-4 w-5/6`}),(0,a.jsx)(`div`,{className:`skeleton mt-3 h-4 w-4/6`})]})}export{s as a,o as i,l as n,u as r,c as t};
1
+ import{L as e,Q as t,R as n,dt as r}from"./queries-DnrECs2M.js";import{t as i}from"./Button-Btbho6sH.js";var a=r();function o({size:t=28,live:n=!1,className:r}){return(0,a.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 32 32`,className:e(`shrink-0`,r),"aria-hidden":`true`,children:[(0,a.jsx)(`rect`,{width:`32`,height:`32`,rx:`9`,fill:`var(--ink)`}),(0,a.jsx)(`path`,{d:`M22.4 9.6A9 9 0 1 0 25 16`,fill:`none`,stroke:`var(--sheet)`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,a.jsx)(`circle`,{cx:`23.6`,cy:`8.4`,r:`2.6`,fill:n?`var(--agent)`:`var(--accent)`,style:{transition:`fill 0.4s`},children:n&&(0,a.jsx)(`animate`,{attributeName:`r`,values:`2.6;3.3;2.6`,dur:`1.4s`,repeatCount:`indefinite`})})]})}function s({className:t}){return(0,a.jsx)(`span`,{className:e(`font-display text-[19px] font-semibold tracking-[-0.02em]`,t),children:`Orqevio`})}function c(){let{t:e}=n();return(0,a.jsx)(`div`,{className:`grid min-h-dvh place-items-center bg-desk`,"aria-busy":`true`,"aria-label":e(`loading`),children:(0,a.jsx)(o,{size:36,className:`animate-pulse`})})}function l({standalone:e}){let{t:r}=n();return(0,a.jsx)(`div`,{className:e?`grid min-h-dvh place-items-center bg-desk px-6`:`grid h-full place-items-center px-6`,children:(0,a.jsxs)(`div`,{className:`animate-rise text-center`,children:[(0,a.jsx)(`p`,{className:`font-mono text-[12px] tracking-[0.2em] text-ink-3`,children:`404`}),(0,a.jsx)(`h1`,{className:`mt-3 font-display text-[34px] font-medium`,children:r(`notFound.title`)}),(0,a.jsx)(`p`,{className:`mt-2 text-ink-2`,children:r(`notFound.body`)}),(0,a.jsx)(t,{to:`/`,className:`mt-6 inline-block`,children:(0,a.jsx)(i,{variant:`primary`,children:r(`actions.backHome`)})})]})})}function u(){return(0,a.jsxs)(`div`,{className:`mx-auto w-full max-w-[760px] px-8 pt-16`,"aria-busy":`true`,children:[(0,a.jsx)(`div`,{className:`skeleton h-10 w-2/3`}),(0,a.jsx)(`div`,{className:`skeleton mt-6 h-4 w-full`}),(0,a.jsx)(`div`,{className:`skeleton mt-3 h-4 w-5/6`}),(0,a.jsx)(`div`,{className:`skeleton mt-3 h-4 w-4/6`})]})}export{s as a,o as i,l as n,u as r,c as t};
@@ -1 +1 @@
1
- import{L as e,R as t,_ as n,dt as r,j as i,n as a,t as o,v as s}from"./queries-B6zKoYoh.js";import{t as c}from"./clock-gFOXe45w.js";import{t as l}from"./lock-keyhole-D62Dl9I8.js";import{t as u}from"./trash-BtYRNn0Z.js";import{g as d,r as f}from"./Field-Clm8umDd.js";import{t as p}from"./Avatar-BM8oUZZw.js";import{t as m}from"./Button-Cdv5jCuw.js";import{d as h,u as g}from"./format-CNMdJ6_8.js";import{t as _}from"./destination-CEcYXsDA.js";var v=r();function y(){let{t:e}=t(`agents`),r=f();return async function(t){if(await r({title:e(`revoke.title`,{name:t.name}),description:e(`revoke.description`),confirmLabel:e(`revoke.confirm`),danger:!0}))try{await n(`/tokens/${t.id}`),await a.invalidateQueries({queryKey:o.tokens}),d.success(e(`revoke.done`))}catch(e){d.error(s(e))}}}function b({token:n,onRevoke:r,onShowActivity:a,inactive:o}){let{t:s}=t(`agents`),d=i(n.scopes,`tasks`),f=i(n.scopes,`docs`),y=n.oauth?_(n.oauth.redirectUri):null,b=n.revokedAt?null:x(n.lastUsedAt??n.createdAt);return(0,v.jsxs)(`article`,{className:e(`rounded-[16px] border border-line bg-surface p-4 shadow-sm`,o&&`opacity-60`),children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(p,{name:n.name,kind:`agent`,size:36}),(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsx)(`h3`,{className:`truncate text-[14.5px] font-semibold`,children:n.name}),y?(0,v.jsx)(`p`,{className:`truncate text-[11.5px] text-ink-3`,children:s(`token.oauth.${y.kind}`,{name:y.name})}):(0,v.jsxs)(`p`,{className:`font-mono text-[11.5px] text-ink-3`,children:[n.prefix,`…`]})]}),r&&(0,v.jsx)(m,{variant:`ghost`,size:`xs`,icon:(0,v.jsx)(u,{}),onClick:r,className:`hover:text-danger`,children:s(`revoke.action`)})]}),(0,v.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[(0,v.jsx)(C,{area:`tasks`,level:d}),(0,v.jsx)(C,{area:`docs`,level:f}),(0,v.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1 rounded-full bg-sunken px-2 text-[11.5px] text-ink-3`,children:[(0,v.jsx)(l,{className:`size-3`}),` `,s(`token.vaultNever`)]}),b!==null&&(0,v.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1 rounded-full bg-sunken px-2 text-[11.5px] font-medium text-warn`,children:[(0,v.jsx)(c,{className:`size-3`}),` `,s(`token.idle`,{days:b})]})]}),(0,v.jsxs)(`dl`,{className:`mt-3 grid grid-cols-3 gap-2 border-t border-line pt-3 text-[11.5px]`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:s(`token.lastUsed`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:n.lastUsedAt?g(n.lastUsedAt):s(`token.never`)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:s(`token.created`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:h(n.createdAt)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:n.revokedAt?s(`token.revoked`):n.oauth?s(`token.expiresUnused`):s(`token.expires`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:n.revokedAt?h(n.revokedAt):n.expiresAt?h(n.expiresAt):s(`token.never`)})]})]}),a&&(0,v.jsx)(`button`,{type:`button`,onClick:a,className:`mt-3 text-[12px] font-medium text-agent hover:underline`,children:s(`token.showActivity`)})]})}function x(e,t=Date.now()){let n=Math.floor((t-new Date(e).getTime())/864e5);return n>=S?n:null}var S=7;function C({area:n,level:r}){let{t:i}=t(`agents`);return(0,v.jsx)(`span`,{className:e(`inline-flex h-6 items-center rounded-full px-2 text-[11.5px] font-medium`,r===`none`?`bg-sunken text-ink-3`:r===`read`?`bg-agent-soft text-agent`:`bg-agent text-agent-ink`),children:i(`token.access.${n}.${r}`)})}export{y as n,b as t};
1
+ import{L as e,R as t,_ as n,dt as r,j as i,n as a,t as o,v as s}from"./queries-DnrECs2M.js";import{t as c}from"./clock-BRq3Eqj4.js";import{t as l}from"./lock-keyhole-D9nhFofN.js";import{t as u}from"./trash-CJAi39PH.js";import{g as d,r as f}from"./Field-BzrGz77l.js";import{t as p}from"./Avatar-Ds47Du6D.js";import{t as m}from"./Button-Btbho6sH.js";import{d as h,u as g}from"./format-DFP4kHwY.js";import{t as _}from"./destination-CEcYXsDA.js";var v=r();function y(){let{t:e}=t(`agents`),r=f();return async function(t){if(await r({title:e(`revoke.title`,{name:t.name}),description:e(`revoke.description`),confirmLabel:e(`revoke.confirm`),danger:!0}))try{await n(`/tokens/${t.id}`),await a.invalidateQueries({queryKey:o.tokens}),d.success(e(`revoke.done`))}catch(e){d.error(s(e))}}}function b({token:n,onRevoke:r,onShowActivity:a,inactive:o}){let{t:s}=t(`agents`),d=i(n.scopes,`tasks`),f=i(n.scopes,`docs`),y=n.oauth?_(n.oauth.redirectUri):null,b=n.revokedAt?null:x(n.lastUsedAt??n.createdAt);return(0,v.jsxs)(`article`,{className:e(`rounded-[16px] border border-line bg-surface p-4 shadow-sm`,o&&`opacity-60`),children:[(0,v.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,v.jsx)(p,{name:n.name,kind:`agent`,size:36}),(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsx)(`h3`,{className:`truncate text-[14.5px] font-semibold`,children:n.name}),y?(0,v.jsx)(`p`,{className:`truncate text-[11.5px] text-ink-3`,children:s(`token.oauth.${y.kind}`,{name:y.name})}):(0,v.jsxs)(`p`,{className:`font-mono text-[11.5px] text-ink-3`,children:[n.prefix,`…`]})]}),r&&(0,v.jsx)(m,{variant:`ghost`,size:`xs`,icon:(0,v.jsx)(u,{}),onClick:r,className:`hover:text-danger`,children:s(`revoke.action`)})]}),(0,v.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[(0,v.jsx)(C,{area:`tasks`,level:d}),(0,v.jsx)(C,{area:`docs`,level:f}),(0,v.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1 rounded-full bg-sunken px-2 text-[11.5px] text-ink-3`,children:[(0,v.jsx)(l,{className:`size-3`}),` `,s(`token.vaultNever`)]}),b!==null&&(0,v.jsxs)(`span`,{className:`inline-flex h-6 items-center gap-1 rounded-full bg-sunken px-2 text-[11.5px] font-medium text-warn`,children:[(0,v.jsx)(c,{className:`size-3`}),` `,s(`token.idle`,{days:b})]})]}),(0,v.jsxs)(`dl`,{className:`mt-3 grid grid-cols-3 gap-2 border-t border-line pt-3 text-[11.5px]`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:s(`token.lastUsed`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:n.lastUsedAt?g(n.lastUsedAt):s(`token.never`)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:s(`token.created`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:h(n.createdAt)})]}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{className:`text-ink-3`,children:n.revokedAt?s(`token.revoked`):n.oauth?s(`token.expiresUnused`):s(`token.expires`)}),(0,v.jsx)(`dd`,{className:`text-ink-2`,children:n.revokedAt?h(n.revokedAt):n.expiresAt?h(n.expiresAt):s(`token.never`)})]})]}),a&&(0,v.jsx)(`button`,{type:`button`,onClick:a,className:`mt-3 text-[12px] font-medium text-agent hover:underline`,children:s(`token.showActivity`)})]})}function x(e,t=Date.now()){let n=Math.floor((t-new Date(e).getTime())/864e5);return n>=S?n:null}var S=7;function C({area:n,level:r}){let{t:i}=t(`agents`);return(0,v.jsx)(`span`,{className:e(`inline-flex h-6 items-center rounded-full px-2 text-[11.5px] font-medium`,r===`none`?`bg-sunken text-ink-3`:r===`read`?`bg-agent-soft text-agent`:`bg-agent text-agent-ink`),children:i(`token.access.${n}.${r}`)})}export{y as n,b as t};