@p4code/cli 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/dist/{AcpMcpStdioBridge-D_JnxPWS.mjs → AcpMcpStdioBridge-CD9BQr2l.mjs} +1 -1
  2. package/dist/{AcpMcpStdioBridge-DBONIB-w.mjs → AcpMcpStdioBridge-DHwGLtep.mjs} +61 -4
  3. package/dist/bin.mjs +2 -2
  4. package/dist/{binCli-DouSNynJ.mjs → binCli-Bgjc_5FL.mjs} +406 -247
  5. package/dist/client/.vite/manifest.json +2125 -2102
  6. package/dist/client/assets/{AnimatedHeight-DoG4b7y8.js → AnimatedHeight-DYUgtGfz.js} +2 -2
  7. package/dist/client/assets/{AuthSurfaceShell-DbeJoeXz.js → AuthSurfaceShell-CfLnzrCc.js} +2 -2
  8. package/dist/client/assets/{CSPContext-DkFc4cYo.js → CSPContext-i9QaQnwk.js} +2 -2
  9. package/dist/client/assets/ChatGptUsageButton-BWTEbaUC.js +2 -0
  10. package/dist/client/assets/ChatMarkdown-C6UsXjP9.js +65 -0
  11. package/dist/client/assets/CodexSetupSection.logic-VTayPks4.js +2 -0
  12. package/dist/client/assets/{ComboboxClear-ZQvkAjz8.js → ComboboxClear-B-iYnTX_.js} +2 -2
  13. package/dist/client/assets/{CommandBlock-c98wFxMU.js → CommandBlock-dh2vBT70.js} +2 -2
  14. package/dist/client/assets/{ComposerPromptEditor-CBuOXkT9.js → ComposerPromptEditor-fIqs_--j.js} +12 -12
  15. package/dist/client/assets/{CompositeRoot-BMUI_bmJ.js → CompositeRoot-JeAqW-33.js} +2 -2
  16. package/dist/client/assets/{ConnectionStatusDot-B69zfKRh.js → ConnectionStatusDot-BCSqqCpf.js} +2 -2
  17. package/dist/client/assets/{DevicePanel-1xw7KQ15.js → DevicePanel-BckpiUTa.js} +2 -2
  18. package/dist/client/assets/{DeviceSetup-DemgUuG-.js → DeviceSetup-L8Q-0h1V.js} +2 -2
  19. package/dist/client/assets/{DialogTitle-BXot7RA0.js → DialogTitle-BRYusK7T.js} +2 -2
  20. package/dist/client/assets/{DiffCommentAnnotation-vAZP7JBy.js → DiffCommentAnnotation-DxxGd0sM.js} +3 -3
  21. package/dist/client/assets/{DiffFileTree-BhqF8nD5.js → DiffFileTree-C2N3dwbB.js} +2 -2
  22. package/dist/client/assets/DiffPanel-0HWHkPjD.js +2 -0
  23. package/dist/client/assets/{DiffWorkerPoolProvider-D4VIo5Vu.js → DiffWorkerPoolProvider-Dd8cIhyy.js} +3 -3
  24. package/dist/client/assets/{EnvironmentMachineIcon-DPQkDtvr.js → EnvironmentMachineIcon-giyHKjbh.js} +2 -2
  25. package/dist/client/assets/{ExpandableText-EZ9C25tN.js → ExpandableText-dJhpznMp.js} +3 -3
  26. package/dist/client/assets/{FieldControl-C4IsJLMZ.js → FieldControl-CxuWXcJE.js} +2 -2
  27. package/dist/client/assets/{FileDiff-H9QHqXa0.js → FileDiff-EWd5oWlS.js} +2 -2
  28. package/dist/client/assets/{FilePreviewPanel-DGm_SU_e.js → FilePreviewPanel-D3kud1xs.js} +4 -4
  29. package/dist/client/assets/{FoldedSettingsSection-BSYFyChk.js → FoldedSettingsSection-CsN_jb3V.js} +2 -2
  30. package/dist/client/assets/{FormContext-DiXpMuU8.js → FormContext-Vk5aZcR6.js} +2 -2
  31. package/dist/client/assets/{Icons-DA4msgfR.js → Icons-DM1SzuL7.js} +2 -2
  32. package/dist/client/assets/{KeybindingsSettings.logic-7EBA0xLE.js → KeybindingsSettings.logic-BcJGxVhV.js} +2 -2
  33. package/dist/client/assets/{NoProjectsHero-YjEc2OIw.js → NoProjectsHero-DrkWMiG4.js} +2 -2
  34. package/dist/client/assets/{PanelLayoutControls-BfRIRM0o.js → PanelLayoutControls-DjmAXscr.js} +8 -8
  35. package/dist/client/assets/{PierreEntryIcon-BxxykifK.js → PierreEntryIcon-BJ8xtDqQ.js} +2 -2
  36. package/dist/client/assets/PreviewPanel-D_JLD7YP.js +2 -0
  37. package/dist/client/assets/ProjectDefaultsSettings-Bqo3T1SR.js +2 -0
  38. package/dist/client/assets/{ProjectFavicon-CiauSitF.js → ProjectFavicon-By6-kpgk.js} +3 -3
  39. package/dist/client/assets/{ProjectIconPickerDialog-GDqk2LEH.js → ProjectIconPickerDialog-Cx-QcJLy.js} +2 -2
  40. package/dist/client/assets/{ProjectMonogram-Bqe3OyZR.js → ProjectMonogram-BJVBhwjz.js} +2 -2
  41. package/dist/client/assets/{ProviderAuthTerminal-D_OC5vdS.js → ProviderAuthTerminal-DBiUwanv.js} +2 -2
  42. package/dist/client/assets/{ProviderModelPicker-Bfpy_Rw1.js → ProviderModelPicker-DV64N-fE.js} +2 -2
  43. package/dist/client/assets/{ProviderSettingsForm-BA6yGdRn.js → ProviderSettingsForm-Tkr5xKCJ.js} +2 -2
  44. package/dist/client/assets/{PullRequestCodeTab-BOM7mgfd.js → PullRequestCodeTab-DijqMjN0.js} +3 -3
  45. package/dist/client/assets/{ReadOnlySourcePreview-C3LnvSkA.js → ReadOnlySourcePreview-CydDaO9-.js} +2 -2
  46. package/dist/client/assets/{RenderErrorBoundary-C-EIIrrq.js → RenderErrorBoundary-D4M2khxk.js} +2 -2
  47. package/dist/client/assets/{ScheduledTasksSettings-DFtwNfb8.js → ScheduledTasksSettings-D_Z_3GVl.js} +4 -4
  48. package/dist/client/assets/ScopedSwitch-B8wdvttG.js +2 -0
  49. package/dist/client/assets/{SecretInput-Be5Akw8x.js → SecretInput-CNWNAhNe.js} +2 -2
  50. package/dist/client/assets/SettingsPanels-DAv_V_mk.js +39 -0
  51. package/dist/client/assets/{SettingsPanels.logic-CLB8Pu-U.js → SettingsPanels.logic-BYa5iHwl.js} +2 -2
  52. package/dist/client/assets/{SettingsScopeNotice-CVoWG1oN.js → SettingsScopeNotice-CcLrVZWz.js} +2 -2
  53. package/dist/client/assets/{T3ConnectAccountPages-ClNzwIQw.js → T3ConnectAccountPages-DjITJ87o.js} +2 -2
  54. package/dist/client/assets/{T3ConnectSidebarSignIn-BqM_Vqe1.js → T3ConnectSidebarSignIn-B-rQNmqG.js} +2 -2
  55. package/dist/client/assets/{ThemeEditorPanel-vVmQV_Vv.js → ThemeEditorPanel-CJGqmeTA.js} +2 -2
  56. package/dist/client/assets/{ThreadTerminalDrawer-aLeVbe6g.js → ThreadTerminalDrawer-Cdl3DAIx.js} +4 -4
  57. package/dist/client/assets/{Virtualizer-DTOYU5Jp.js → Virtualizer-Bk-YJlPj.js} +2 -2
  58. package/dist/client/assets/{WorkspaceBreadcrumb-C9OPPGJE.js → WorkspaceBreadcrumb-DSFWvH19.js} +2 -2
  59. package/dist/client/assets/{WorkspacePageContainer-DtXJ5ept.js → WorkspacePageContainer-BXUbfbEU.js} +2 -2
  60. package/dist/client/assets/{WorkspacePageHeader-5zzLFpEN.js → WorkspacePageHeader-LbIzJCDs.js} +2 -2
  61. package/dist/client/assets/_chat-oHhtDqeh.js +45 -0
  62. package/dist/client/assets/{_chat.index-BP1JWABB.js → _chat.index-CTew1WmI.js} +2 -2
  63. package/dist/client/assets/_chat.new-COSURrfS.js +4 -0
  64. package/dist/client/assets/{_chat.pull-requests-B6-Vck8B.js → _chat.pull-requests-BlXnsqov.js} +2 -2
  65. package/dist/client/assets/{abnfDiagram-VCTEODGH-BXvAfzAg.js → abnfDiagram-VCTEODGH-brKh7bzh.js} +2 -2
  66. package/dist/client/assets/{alert-B-or1ble.js → alert-quTC4YbH.js} +2 -2
  67. package/dist/client/assets/architecture-7GRP2DOG-BMFS-mJW.js +1 -0
  68. package/dist/client/assets/{architectureDiagram-5GKGNRK7-MEUA3QVe.js → architectureDiagram-5GKGNRK7-BVDiXgfK.js} +2 -2
  69. package/dist/client/assets/archive-x-D3w6saMD.js +2 -0
  70. package/dist/client/assets/arrow-left-BFquhiaO.js +1 -0
  71. package/dist/client/assets/arrow-right-DiV8cYUQ.js +1 -0
  72. package/dist/client/assets/arrow-up-down-BDQTjPr1.js +1 -0
  73. package/dist/client/assets/assets-CRmNKuHc.js +2 -0
  74. package/dist/client/assets/bell-BvJp3v99.js +1 -0
  75. package/dist/client/assets/{blockDiagram-I7D4REHJ-BOdLeYJh.js → blockDiagram-I7D4REHJ-CzoRCJDe.js} +2 -2
  76. package/dist/client/assets/blocks-NuR9qdGl.js +1 -0
  77. package/dist/client/assets/bot-mvw1ddnU.js +1 -0
  78. package/dist/client/assets/{browserHistoryStore-BJD0OPpb.js → browserHistoryStore-Cw3ffhOV.js} +2 -2
  79. package/dist/client/assets/{browserLinkTarget-CoogLhhO.js → browserLinkTarget-KTI1tSl7.js} +2 -2
  80. package/dist/client/assets/{c4Diagram-7LVT6UL2-COZrm1O8.js → c4Diagram-7LVT6UL2-CfyobiDu.js} +2 -2
  81. package/dist/client/assets/calendar-clock-CuvWKWXS.js +1 -0
  82. package/dist/client/assets/channel-Cf2J77rP.js +2 -0
  83. package/dist/client/assets/chart-no-axes-column-Hfs9TSWj.js +1 -0
  84. package/dist/client/assets/checkbox-BHsP70Vt.js +2 -0
  85. package/dist/client/assets/{chunk-4HAMMTFA-Bs-Fo0v1.js → chunk-4HAMMTFA-CPnMRFld.js} +2 -2
  86. package/dist/client/assets/{chunk-75Z2AOVW-DpOWzc3R.js → chunk-75Z2AOVW-C85FbOND.js} +2 -2
  87. package/dist/client/assets/{chunk-DU6HZSFF-Bgpi4W6E.js → chunk-DU6HZSFF-s_qrqgaz.js} +2 -2
  88. package/dist/client/assets/{chunk-F27PBJKO-CLxgnzXS.js → chunk-F27PBJKO-90tTgV9x.js} +2 -2
  89. package/dist/client/assets/{chunk-GMAD6QVW-D98J5Pan.js → chunk-GMAD6QVW-CYRPr7hZ.js} +2 -2
  90. package/dist/client/assets/{chunk-GVQU2GXP-VuCIOHGI.js → chunk-GVQU2GXP-CxAvUb1-.js} +2 -2
  91. package/dist/client/assets/{chunk-IMKFNOWR-DXIyBsaE.js → chunk-IMKFNOWR-794woOlB.js} +2 -2
  92. package/dist/client/assets/{chunk-L3NEJ4N5-CrMlU3ZU.js → chunk-L3NEJ4N5-JXcRdiIo.js} +2 -2
  93. package/dist/client/assets/{chunk-OSK3NFVY-V2__4gNB.js → chunk-OSK3NFVY-ToxVvjW1.js} +2 -2
  94. package/dist/client/assets/{chunk-P2QGCYS3-BrPw6V5F.js → chunk-P2QGCYS3-JB1PmfIc.js} +2 -2
  95. package/dist/client/assets/{chunk-POPQ4Y6H-DBQ9Y51x.js → chunk-POPQ4Y6H-RMxlqjhd.js} +2 -2
  96. package/dist/client/assets/{chunk-PWAF6VOD-BN6AAbfF.js → chunk-PWAF6VOD-AB579n2y.js} +2 -2
  97. package/dist/client/assets/{chunk-SHT3W25Y-Vay44dCU.js → chunk-SHT3W25Y-CV2hE9-g.js} +2 -2
  98. package/dist/client/assets/{chunk-SVP7TREG-CcGlNErV.js → chunk-SVP7TREG-b2Gs4u5W.js} +2 -2
  99. package/dist/client/assets/{chunk-TICWLB2K-Dk1P_xkD.js → chunk-TICWLB2K-CtkYqLLJ.js} +2 -2
  100. package/dist/client/assets/classDiagram-ZZMXUADV-D9m4giYc.js +2 -0
  101. package/dist/client/assets/classDiagram-v2-VYDZK3BY-D9m4giYc.js +2 -0
  102. package/dist/client/assets/{color-picker-gBclRe5T.js → color-picker-CFc6YapE.js} +2 -2
  103. package/dist/client/assets/{combobox-C81z_216.js → combobox-WVgW_agq.js} +2 -2
  104. package/dist/client/assets/{command-DnJZPOmf.js → command-w6WcFbeZ.js} +2 -2
  105. package/dist/client/assets/{connect-Am2IS-vZ.js → connect-D_ncSJiK.js} +2 -2
  106. package/dist/client/assets/{connect-agent-Cw1s7hYt.js → connect-agent-8mHL_bau.js} +2 -2
  107. package/dist/client/assets/corner-left-up-DedXC9IG.js +1 -0
  108. package/dist/client/assets/{cynefin-OW5HDTMX-0s30RxOq.js → cynefin-OW5HDTMX-BDIjrXPB.js} +1 -1
  109. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Drd0Msog.js → cynefinDiagram-5FMLGOSQ-h9tw36zs.js} +2 -2
  110. package/dist/client/assets/{dagre-GXQ25YYZ-BMfu7T0o.js → dagre-GXQ25YYZ-D3s1T81F.js} +2 -2
  111. package/dist/client/assets/{device-C_oIGJqy.js → device-DhvzgETq.js} +2 -2
  112. package/dist/client/assets/{diagram-S7CK7UJ4-8egngY0E.js → diagram-S7CK7UJ4-DTawhR4X.js} +2 -2
  113. package/dist/client/assets/{diagram-UQ7AKVKN-BALPQoDH.js → diagram-UQ7AKVKN-CTUDQHKY.js} +2 -2
  114. package/dist/client/assets/{diagram-VSXAHHWV-BjyJZVGC.js → diagram-VSXAHHWV-DsbNNWnj.js} +2 -2
  115. package/dist/client/assets/{diagram-VX7I27RA-B9f6eKkq.js → diagram-VX7I27RA-BBy99N9O.js} +2 -2
  116. package/dist/client/assets/{diagram-Z3DM3KII-CRUj2d3v.js → diagram-Z3DM3KII-CEy69xv1.js} +2 -2
  117. package/dist/client/assets/{dialog-Bn1u_Xoc.js → dialog-CPLO59bH.js} +2 -2
  118. package/dist/client/assets/{diffRendering-C26rfQBu.js → diffRendering-BlmxsRF9.js} +2 -2
  119. package/dist/client/assets/{discovery-list-Fg_u6w-x.js → discovery-list-D0LBmkzJ.js} +2 -2
  120. package/dist/client/assets/{dist-DtKaGeij.js → dist-DZWol-cd.js} +3 -3
  121. package/dist/client/assets/download-CUcdw53T.js +1 -0
  122. package/dist/client/assets/{draft-input-D8eUYug0.js → draft-input-CmvO5rl_.js} +2 -2
  123. package/dist/client/assets/{duoViewer-CBoAg4hS.js → duoViewer-B0QD-fyi.js} +2 -2
  124. package/dist/client/assets/dynamic-tF-2a8Zt.js +3 -0
  125. package/dist/client/assets/earth-BqADiov-.js +1 -0
  126. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BSbPiqg7.js → ebnfDiagram-PWID7BFC-B9LWNbny.js} +2 -2
  127. package/dist/client/assets/ellipsis-BUF_4-Z7.js +1 -0
  128. package/dist/client/assets/{embeddedScripts-Dsi0aZEx.js → embeddedScripts-B1MGNr-e.js} +2 -2
  129. package/dist/client/assets/{empty-C-gDaZ_z.js → empty-tr-EsB66.js} +2 -2
  130. package/dist/client/assets/entities-DqhRur25.js +2 -0
  131. package/dist/client/assets/{erDiagram-RLTQ6QDP-sL_q0j_k.js → erDiagram-RLTQ6QDP-Nu9IMF5-.js} +2 -2
  132. package/dist/client/assets/eventmodeling-NTZA5JFV-CHuv5_8f.js +1 -0
  133. package/dist/client/assets/eye-C8OhITrC.js +1 -0
  134. package/dist/client/assets/file-search-ComEiFQ8.js +1 -0
  135. package/dist/client/assets/{fileLinks-DubkPNVt.js → fileLinks-BHAkEh9k.js} +2 -2
  136. package/dist/client/assets/{fileTreeExpansion-VtSAPhxL.js → fileTreeExpansion-BierCVUV.js} +2 -2
  137. package/dist/client/assets/flowDiagram-HODETNUW-wmC7eeQc.js +1 -0
  138. package/dist/client/assets/folder-git-2-COyuVTXA.js +1 -0
  139. package/dist/client/assets/folder-open-DZzz50kK.js +1 -0
  140. package/dist/client/assets/folder-plus-BzJT8jXs.js +1 -0
  141. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DCiKb0rQ.js → ganttDiagram-EL5Y4UJY-D_s5F9rI.js} +2 -2
  142. package/dist/client/assets/{getDiffFileInput-DU5zpXo3.js → getDiffFileInput-B5j6sQbM.js} +2 -2
  143. package/dist/client/assets/git-branch-CCzcdr93.js +1 -0
  144. package/dist/client/assets/{gitGraph-4MIJSDKK-DfRe6ZT5.js → gitGraph-4MIJSDKK-BASxGOL3.js} +1 -1
  145. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Bt7diV1n.js → gitGraphDiagram-WWUBYQGX-BtA4z_1S.js} +2 -2
  146. package/dist/client/assets/grip-vertical-COceJQZo.js +1 -0
  147. package/dist/client/assets/{guideRunStore-CF9bByzk.js → guideRunStore-C95PbUuP.js} +2 -2
  148. package/dist/client/assets/hard-drive-BKLzbeTS.js +1 -0
  149. package/dist/client/assets/history-CAAEfWkp.js +1 -0
  150. package/dist/client/assets/house-U4txgvXa.js +1 -0
  151. package/dist/client/assets/{htmlRender-vOqAdlJH.js → htmlRender-DgdJ8GkZ.js} +2 -2
  152. package/dist/client/assets/{index-1HGbj0-7.js → index-D_uSeco8.js} +3 -3
  153. package/dist/client/assets/{info-A6RAGUB7-0FtL6-Am.js → info-A6RAGUB7-Q4Qe5TI_.js} +1 -1
  154. package/dist/client/assets/{infoDiagram-27XIBGKW-BPLvtPCc.js → infoDiagram-27XIBGKW-CNnDxcfZ.js} +2 -2
  155. package/dist/client/assets/{input-Cd_0h7h_.js → input-DaCwubQj.js} +2 -2
  156. package/dist/client/assets/{input-group-CJ7ZOvDN.js → input-group-DJwXFHGO.js} +2 -2
  157. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DVcx0XTh.js → ishikawaDiagram-5VMMS53U-Drb03OY6.js} +2 -2
  158. package/dist/client/assets/{journeyDiagram-3NMN7TZE-w46bbjL2.js → journeyDiagram-3NMN7TZE-CynC6Up1.js} +2 -2
  159. package/dist/client/assets/{kanban-definition-UXKFOSKX-C41yE_yV.js → kanban-definition-UXKFOSKX-DfyC_hIe.js} +2 -2
  160. package/dist/client/assets/{kbd-c17EHIx1.js → kbd-R3wkAau0.js} +2 -2
  161. package/dist/client/assets/{keybindings-uYm_vnXl.js → keybindings-QrjnJ5jB.js} +2 -2
  162. package/dist/client/assets/keyboard-kgy5M4lo.js +1 -0
  163. package/dist/client/assets/{lazyRouteComponent-CTVuEvaz.js → lazyRouteComponent-cLZROdN-.js} +2 -2
  164. package/dist/client/assets/{line-tu9XZ0qp.js → line-C3gvAOpf.js} +2 -2
  165. package/dist/client/assets/{link-C4sEUNOK.js → link-Bl21VXlj.js} +2 -2
  166. package/dist/client/assets/link-C1k5F8-V.js +1 -0
  167. package/dist/client/assets/{linkedPrompt-VYl90REW.js → linkedPrompt-DAcv0O_f.js} +2 -2
  168. package/dist/client/assets/list-CU7BIfIS.js +1 -0
  169. package/dist/client/assets/main-BsiZpg85.css +2 -0
  170. package/dist/client/assets/main-uLg3xUJM.js +30 -0
  171. package/dist/client/assets/{mediaReference-BTVvzs2e.js → mediaReference-DN8lzwOF.js} +2 -2
  172. package/dist/client/assets/{mediaSource-DXHFWHMA.js → mediaSource-0nIWHHoL.js} +2 -2
  173. package/dist/client/assets/{mermaid-parser.core-DNd412Oc.js → mermaid-parser.core-B3cYmj0d.js} +4 -4
  174. package/dist/client/assets/{mermaid.core-CyE6QOQY.js → mermaid.core-9ekBSYCO.js} +5 -5
  175. package/dist/client/assets/message-circle-question-mark-wTwD9xwk.js +1 -0
  176. package/dist/client/assets/message-square-dashed-Hcy2Q2EP.js +1 -0
  177. package/dist/client/assets/message-square-lCzwndCW.js +1 -0
  178. package/dist/client/assets/{mindmap-definition-YA3MSWOX-DH1uxdTm.js → mindmap-definition-YA3MSWOX-K4rtZu2z.js} +2 -2
  179. package/dist/client/assets/mouse-pointer-2-BFFAEWXU.js +1 -0
  180. package/dist/client/assets/number-field-pAaF-e0N.js +2 -0
  181. package/dist/client/assets/{observeResize-Csvw3hy4.js → observeResize-BEjNJ-rK.js} +2 -2
  182. package/dist/client/assets/{onboarding-CJPrQc71.js → onboarding--LqcHqO0.js} +2 -2
  183. package/dist/client/assets/openFileInPreview-NwK1GJFN.js +2 -0
  184. package/dist/client/assets/{p4ProjectFile-BWszgcDk.js → p4ProjectFile-CVEoe1SJ.js} +2 -2
  185. package/dist/client/assets/{packet-AYTQ26CC-DflCOkCN.js → packet-AYTQ26CC-kDkfULQq.js} +1 -1
  186. package/dist/client/assets/{pair-Dd_e1jxq.js → pair-Bxo10T5t.js} +2 -2
  187. package/dist/client/assets/palette-BkpHEJXn.js +1 -0
  188. package/dist/client/assets/panel-left-DNz3ps89.js +1 -0
  189. package/dist/client/assets/panels-top-left-bKuZF4FX.js +1 -0
  190. package/dist/client/assets/{pegDiagram-XKGWAZYB-Cnx9j2xX.js → pegDiagram-XKGWAZYB-6b8AqBYd.js} +2 -2
  191. package/dist/client/assets/{phoneViewer-B9EUVDD2.js → phoneViewer-Vql_2ZzY.js} +2 -2
  192. package/dist/client/assets/{pie-WAS4IAKB-CDwew7fN.js → pie-WAS4IAKB-CfoqFIwI.js} +1 -1
  193. package/dist/client/assets/{pieDiagram-E7YTZNPT-BxejSN6k.js → pieDiagram-E7YTZNPT-i8FgTMai.js} +2 -2
  194. package/dist/client/assets/{pierre-icons-C839Otpo.js → pierre-icons-CBmlpFgP.js} +2 -2
  195. package/dist/client/assets/{popover-CKyetthu.js → popover-BXin7C0B.js} +2 -2
  196. package/dist/client/assets/{preview-CjgXQQdj.js → preview-6t42evKb.js} +2 -2
  197. package/dist/client/assets/{preview-CEMnbqVB.js → preview-C9iPHfb1.js} +2 -2
  198. package/dist/client/assets/{previewMiniPlayerStore-B9Lqaaij.js → previewMiniPlayerStore-BDRPsVx0.js} +2 -2
  199. package/dist/client/assets/primary-DOpcfgLH.js +2 -0
  200. package/dist/client/assets/primaryCloudLinkState-Dulej3bP.js +2 -0
  201. package/dist/client/assets/projectFilesQueryState-C1crs3C8.js +2 -0
  202. package/dist/client/assets/projectScriptEditor-ku2tGeKq.js +2 -0
  203. package/dist/client/assets/providerSkills-D0IxW0_5.js +2 -0
  204. package/dist/client/assets/{pullRequestDetail.logic-DTxWqKoX.js → pullRequestDetail.logic-BiwUoz1M.js} +4 -4
  205. package/dist/client/assets/{pullRequestReviewStore-C5gaoGaz.js → pullRequestReviewStore-J7YIGsZ9.js} +2 -2
  206. package/dist/client/assets/pullRequests-BQ9KruZm.js +2 -0
  207. package/dist/client/assets/puzzle-wfhgUaHl.js +1 -0
  208. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-Bj4FEpOg.js → quadrantDiagram-AXDQQJYC-DzvIAxCm.js} +2 -2
  209. package/dist/client/assets/queries-CEjFwxVW.js +2 -0
  210. package/dist/client/assets/query-D5pQUQvZ.js +2 -0
  211. package/dist/client/assets/{radar-RG4KPBEZ-DEopr2Gv.js → radar-RG4KPBEZ-BnTV8utT.js} +1 -1
  212. package/dist/client/assets/{radio-group-fljQQ7Xp.js → radio-group-DhpPG5HP.js} +2 -2
  213. package/dist/client/assets/{railroad-74A4TZTK-BSAOgUn6.js → railroad-74A4TZTK-nxEBKbUo.js} +1 -1
  214. package/dist/client/assets/railroad-abnf-HS5TGJTU-bDIjPMME.js +1 -0
  215. package/dist/client/assets/railroad-ebnf-LZEXJU2U-BREFlihg.js +1 -0
  216. package/dist/client/assets/railroad-peg-WCYAUIDC-B0hEZefb.js +1 -0
  217. package/dist/client/assets/{railroadDiagram-O6MQD6OU-BSOJGJ6v.js → railroadDiagram-O6MQD6OU-DFdlMVKn.js} +2 -2
  218. package/dist/client/assets/{renderScheduler-v8LIpnE2.js → renderScheduler-DWKKtxcJ.js} +2 -2
  219. package/dist/client/assets/{requirementDiagram-BXWQKSXE-Bp5TqEho.js → requirementDiagram-BXWQKSXE-BW8o0F_p.js} +2 -2
  220. package/dist/client/assets/{rightPanelStore-DqMd0tFH.js → rightPanelStore-CQ94819A.js} +2 -2
  221. package/dist/client/assets/rotate-ccw-CkpQmcC5.js +1 -0
  222. package/dist/client/assets/rotate-cw-BAiACGtX.js +1 -0
  223. package/dist/client/assets/runtime-Bsb2I_n2.js +2 -0
  224. package/dist/client/assets/runtime-DkYxB4ri.js +6 -0
  225. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-C7KUHrP7.js → sankeyDiagram-P5KCCOFB-JA6FB6i0.js} +2 -2
  226. package/dist/client/assets/{scheduledTasksSettings.logic-C3Mbc4mh.js → scheduledTasksSettings.logic-C_AdQNVz.js} +3 -3
  227. package/dist/client/assets/{scroll-area-LhpLVf8r.js → scroll-area-BYyfw-9F.js} +2 -2
  228. package/dist/client/assets/select-CjGEfXy_.js +2 -0
  229. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-Bs9mfTLC.js → sequenceDiagram-WJ2MYXX4-DgBrrcVR.js} +2 -2
  230. package/dist/client/assets/server-BYntb2dN.js +2 -0
  231. package/dist/client/assets/session-eLrubJEW.js +2 -0
  232. package/dist/client/assets/{session-logic-DneZDyPZ.js → session-logic-l1juLk9v.js} +5 -5
  233. package/dist/client/assets/settings-2-CDBTJPBs.js +1 -0
  234. package/dist/client/assets/settings-DDvSs7LG.js +1 -0
  235. package/dist/client/assets/{settings-C8FiUQu0.js → settings-xKzLy5aw.js} +2 -2
  236. package/dist/client/assets/settings.appearance-CEA3GKAa.js +2 -0
  237. package/dist/client/assets/settings.archived-DPWjmD2l.js +2 -0
  238. package/dist/client/assets/{settings.computer-use-B3Ujc2AS.js → settings.computer-use-DZu90DiM.js} +2 -2
  239. package/dist/client/assets/settings.connections-BKWbsMUk.js +2 -0
  240. package/dist/client/assets/settings.data-controls-CBrcsSvm.js +2 -0
  241. package/dist/client/assets/{settings.decisions-C5UE4drK.js → settings.decisions-CGz9znLs.js} +2 -2
  242. package/dist/client/assets/settings.diagnostics-DKkOOzoq.js +2 -0
  243. package/dist/client/assets/settings.general-CoPWyKC4.js +2 -0
  244. package/dist/client/assets/{settings.integrations-BCtpk2dY.js → settings.integrations-K3Jwfkyd.js} +2 -2
  245. package/dist/client/assets/{settings.keybindings-DfFrYXxY.js → settings.keybindings-BbR3qnVs.js} +2 -2
  246. package/dist/client/assets/{settings.open-source-licenses-CqRM1gRd.js → settings.open-source-licenses-Mh-zg97k.js} +2 -2
  247. package/dist/client/assets/settings.plugins-BI68kAsM.js +5 -0
  248. package/dist/client/assets/{settings.projects-CT-l0EfX.js → settings.projects-BahZsoyx.js} +4 -4
  249. package/dist/client/assets/settings.providers-Dsnq0-AL.js +3 -0
  250. package/dist/client/assets/settings.scheduled-tasks-BOpVl_XK.js +2 -0
  251. package/dist/client/assets/{settings.snap-shot-BMxV-ClC.js → settings.snap-shot-Bs_DZS7D.js} +2 -2
  252. package/dist/client/assets/settings.source-control-Akrp_mGm.js +2 -0
  253. package/dist/client/assets/{settings.storage-DKm6BZ2r.js → settings.storage-fl2BN0Cu.js} +2 -2
  254. package/dist/client/assets/settingsLayout-DV36_Jgq.js +3 -0
  255. package/dist/client/assets/shield-check-yRjvgn4y.js +1 -0
  256. package/dist/client/assets/shield-question-mark-DyVUewRO.js +1 -0
  257. package/dist/client/assets/{sidebar-DI1ZJMkM.js → sidebar-MBwCdIpv.js} +2 -2
  258. package/dist/client/assets/{sidebarProjectGrouping-DXRKqrOP.js → sidebarProjectGrouping-Sm7y9bd1.js} +2 -2
  259. package/dist/client/assets/{skeleton-BlMPaSbD.js → skeleton-CS8ffFVv.js} +2 -2
  260. package/dist/client/assets/{sortable.esm-CnSn9HhJ.js → sortable.esm-CwrTFe-B.js} +2 -2
  261. package/dist/client/assets/{sourceControl-ogZI3Qhj.js → sourceControl-DyHbbOxl.js} +2 -2
  262. package/dist/client/assets/{spinner-I_NrXl2i.js → spinner-B7a-VUeR.js} +2 -2
  263. package/dist/client/assets/square-pen-BrE59gWn.js +1 -0
  264. package/dist/client/assets/{standalone-page-C0mvdk0N.js → standalone-page-DTvNMgJy.js} +2 -2
  265. package/dist/client/assets/{stateDiagram-D77RDMKH-lcvbm4gc.js → stateDiagram-D77RDMKH-gHEAo7xC.js} +2 -2
  266. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CGT21P8W.js +2 -0
  267. package/dist/client/assets/{swimlanes-42K2YHIH-BftXRbCQ.js → swimlanes-42K2YHIH-_qZ90QGb.js} +2 -2
  268. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D9Ttx7dQ.js +9 -0
  269. package/dist/client/assets/{terminal-links-BWEpET__.js → terminal-links-Dc2HX7Ov.js} +2 -2
  270. package/dist/client/assets/{terminalSessions-CQOPPXfy.js → terminalSessions-DK9WKgga.js} +2 -2
  271. package/dist/client/assets/text-search-CFbEY3qo.js +1 -0
  272. package/dist/client/assets/{textarea-Bu723jDd.js → textarea-CYXHTTG6.js} +2 -2
  273. package/dist/client/assets/{themePalette-CAxv2FDZ.js → themePalette-zVYGoviO.js} +3 -3
  274. package/dist/client/assets/threadSort-Byzu7B1A.js +2 -0
  275. package/dist/client/assets/{timeline-definition-24CTP7MA-_aV_EuqE.js → timeline-definition-24CTP7MA-BxWmcZQs.js} +2 -2
  276. package/dist/client/assets/toast-BX9uiMAh.js +2 -0
  277. package/dist/client/assets/{toggle-B5fidRv0.js → toggle-fk33ppsB.js} +2 -2
  278. package/dist/client/assets/{toggle-group-DCQTLIPb.js → toggle-group-W0bDGcPB.js} +2 -2
  279. package/dist/client/assets/tooltip-B0rhqi5b.js +2 -0
  280. package/dist/client/assets/{treeView-Q6P3EWNA-ALGd5g_W.js → treeView-Q6P3EWNA-BsPhq-Fl.js} +1 -1
  281. package/dist/client/assets/{treemap-WGGIJYW6-CGQrkzMs.js → treemap-WGGIJYW6-DZ3fnU-o.js} +1 -1
  282. package/dist/client/assets/{usage-DmGxFUdr.js → usage-DlNazxzV.js} +2 -2
  283. package/dist/client/assets/{usageAccess-CY-JtQnU.js → usageAccess-Mp1Nbm2r.js} +2 -2
  284. package/dist/client/assets/{usageFormat-Cs-UHzLq.js → usageFormat-ZiOrCBxk.js} +2 -2
  285. package/dist/client/assets/{usageShortcuts-CP952NDO.js → usageShortcuts-Be5hddhr.js} +2 -2
  286. package/dist/client/assets/use-atom-command-RgcuqzP9.js +2 -0
  287. package/dist/client/assets/{useAriaLabelledBy-4I5xhNlP.js → useAriaLabelledBy-D-n0SDV6.js} +2 -2
  288. package/dist/client/assets/{useHandleNewThread-Bzaf_PDE.js → useHandleNewThread-BQ5wqZab.js} +2 -2
  289. package/dist/client/assets/{useLocation-QINZoaPz.js → useLocation-BN5q7LjL.js} +2 -2
  290. package/dist/client/assets/useNavigate-CDvr3Yvg.js +2 -0
  291. package/dist/client/assets/{useNavigateBack-CbbWf0z6.js → useNavigateBack-BWhsiBJ5.js} +2 -2
  292. package/dist/client/assets/{useParams-BTKEXLBT.js → useParams-DQgx0pmy.js} +2 -2
  293. package/dist/client/assets/{usePermissionStatus-Zbsv_90x.js → usePermissionStatus-FtemMvNg.js} +2 -2
  294. package/dist/client/assets/{usePullRequestActions-DGTJ6ne6.js → usePullRequestActions-D97OVSkM.js} +3 -3
  295. package/dist/client/assets/{useRegisterFieldControl-Cr87Snzk.js → useRegisterFieldControl-KOnbOVnX.js} +2 -2
  296. package/dist/client/assets/useScopedModelAvailability-BTR7tHpB.js +2 -0
  297. package/dist/client/assets/useSettings-BIggY3j1.js +3 -0
  298. package/dist/client/assets/{useT3ConnectAuthPrompt-BYqrzQIx.js → useT3ConnectAuthPrompt-CPGDAWRk.js} +2 -2
  299. package/dist/client/assets/{utils-DmfMX1v5.js → utils-BxISc9RR.js} +17 -17
  300. package/dist/client/assets/vcsRefInvalidation-h_E9Figo.js +2 -0
  301. package/dist/client/assets/{vennDiagram-4TSXK5OY-9Jx7JrgE.js → vennDiagram-4TSXK5OY-BnH-hzBf.js} +2 -2
  302. package/dist/client/assets/{wardley-WFR3VGLG-qG58RzFw.js → wardley-WFR3VGLG-BbiFWq4f.js} +1 -1
  303. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-8Ml3tzfR.js → wardleyDiagram-VM6X3IG4-DPf4ISf5.js} +2 -2
  304. package/dist/client/assets/{welcome-CPcQsM9H.js → welcome-DjYohRu3.js} +2 -2
  305. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-C-u_0wo0.js → xychartDiagram-S5SC5T6Z-oaZh5sFY.js} +2 -2
  306. package/dist/client/index.html +1 -1
  307. package/package.json +1 -1
  308. package/dist/client/assets/ChatGptUsageButton-D93cMeTp.js +0 -2
  309. package/dist/client/assets/ChatMarkdown-CLD9Y6dg.js +0 -65
  310. package/dist/client/assets/CodexSetupSection.logic-DJw6xB7P.js +0 -2
  311. package/dist/client/assets/DiffPanel-Dqh76p3E.js +0 -2
  312. package/dist/client/assets/PreviewPanel-QkMfuC1J.js +0 -2
  313. package/dist/client/assets/ProjectDefaultsSettings-C6wxaRmJ.js +0 -2
  314. package/dist/client/assets/ScopedSwitch-DsEcG6rk.js +0 -2
  315. package/dist/client/assets/SettingsPanels-CI-FknGh.js +0 -39
  316. package/dist/client/assets/_chat-BKcYL38S.js +0 -45
  317. package/dist/client/assets/_chat.new-BX5LyFum.js +0 -4
  318. package/dist/client/assets/architecture-7GRP2DOG-DqzmsB35.js +0 -1
  319. package/dist/client/assets/archive-x-BN7DYXYC.js +0 -2
  320. package/dist/client/assets/arrow-left-DI1Oo3nI.js +0 -1
  321. package/dist/client/assets/arrow-right-DRgAj8le.js +0 -1
  322. package/dist/client/assets/arrow-up-down-C6OEPUz7.js +0 -1
  323. package/dist/client/assets/assets-_CWIS9vb.js +0 -2
  324. package/dist/client/assets/bell-DW1iPWzH.js +0 -1
  325. package/dist/client/assets/blocks-DKOyf4K4.js +0 -1
  326. package/dist/client/assets/bot-DYcBiSui.js +0 -1
  327. package/dist/client/assets/calendar-clock-BqL7OneL.js +0 -1
  328. package/dist/client/assets/channel-DbsUczqI.js +0 -2
  329. package/dist/client/assets/chart-no-axes-column-CtQ7A5KE.js +0 -1
  330. package/dist/client/assets/checkbox-CaZu1EKJ.js +0 -2
  331. package/dist/client/assets/classDiagram-ZZMXUADV-DotTjRcO.js +0 -2
  332. package/dist/client/assets/classDiagram-v2-VYDZK3BY-DotTjRcO.js +0 -2
  333. package/dist/client/assets/corner-left-up-BT-2gfvH.js +0 -1
  334. package/dist/client/assets/download-DNjijPHR.js +0 -1
  335. package/dist/client/assets/dynamic-p5s8CQGu.js +0 -3
  336. package/dist/client/assets/earth-DGA4iwBJ.js +0 -1
  337. package/dist/client/assets/ellipsis-Cbd-Ac19.js +0 -1
  338. package/dist/client/assets/entities-82m-Smm-.js +0 -2
  339. package/dist/client/assets/eventmodeling-NTZA5JFV-OEIkdS25.js +0 -1
  340. package/dist/client/assets/eye-BUplLfz9.js +0 -1
  341. package/dist/client/assets/file-search-CcnLiCku.js +0 -1
  342. package/dist/client/assets/fileContextMenu-Dcs50sFI.js +0 -2
  343. package/dist/client/assets/flowDiagram-HODETNUW-BDZPeVYD.js +0 -1
  344. package/dist/client/assets/folder-git-2-5RczFn6m.js +0 -1
  345. package/dist/client/assets/folder-open-PwiT4lvQ.js +0 -1
  346. package/dist/client/assets/folder-plus--IokSBmG.js +0 -1
  347. package/dist/client/assets/git-branch-jf-x2c63.js +0 -1
  348. package/dist/client/assets/grip-vertical-OASdudbE.js +0 -1
  349. package/dist/client/assets/hard-drive-BxN5msOb.js +0 -1
  350. package/dist/client/assets/history-DdVU5lcf.js +0 -1
  351. package/dist/client/assets/house-mbks5FAa.js +0 -1
  352. package/dist/client/assets/keyboard-DckDn_SM.js +0 -1
  353. package/dist/client/assets/link-Dw3ue0Rm.js +0 -1
  354. package/dist/client/assets/list-1rglB5Lq.js +0 -1
  355. package/dist/client/assets/main-BB3F4O6Y.js +0 -30
  356. package/dist/client/assets/main-CnVegMVf.css +0 -2
  357. package/dist/client/assets/message-circle-question-mark-CLPs5tYP.js +0 -1
  358. package/dist/client/assets/message-square-BInn4EwR.js +0 -1
  359. package/dist/client/assets/message-square-dashed-Dea7_sXv.js +0 -1
  360. package/dist/client/assets/mouse-pointer-2-BPl1Yb5N.js +0 -1
  361. package/dist/client/assets/number-field-CVtwAsLe.js +0 -2
  362. package/dist/client/assets/openFileInPreview-C3O_ayUT.js +0 -2
  363. package/dist/client/assets/palette-DC6st-Ld.js +0 -1
  364. package/dist/client/assets/panel-left-BxNE-mqR.js +0 -1
  365. package/dist/client/assets/panels-top-left-CpwWAaSX.js +0 -1
  366. package/dist/client/assets/primary-uszZTzpR.js +0 -2
  367. package/dist/client/assets/primaryCloudLinkState-CWT2YTBZ.js +0 -2
  368. package/dist/client/assets/projectFilesQueryState-ELgLflk5.js +0 -2
  369. package/dist/client/assets/projectScriptEditor-BAuP_HeU.js +0 -2
  370. package/dist/client/assets/pullRequests-DjbQ49mZ.js +0 -2
  371. package/dist/client/assets/puzzle-foT3lPUZ.js +0 -1
  372. package/dist/client/assets/queries-Cq5C9N-K.js +0 -2
  373. package/dist/client/assets/query-DpwJQzeq.js +0 -2
  374. package/dist/client/assets/railroad-abnf-HS5TGJTU-C_4g8TOP.js +0 -1
  375. package/dist/client/assets/railroad-ebnf-LZEXJU2U-CHZB5YoP.js +0 -1
  376. package/dist/client/assets/railroad-peg-WCYAUIDC-B-PbMjlp.js +0 -1
  377. package/dist/client/assets/rotate-ccw-rssHZoOL.js +0 -1
  378. package/dist/client/assets/rotate-cw-D726GGah.js +0 -1
  379. package/dist/client/assets/runtime-BQJQC-Ny.js +0 -6
  380. package/dist/client/assets/runtime-C6FwphD-.js +0 -2
  381. package/dist/client/assets/select-B4VvMEs2.js +0 -2
  382. package/dist/client/assets/server-BD_Y5Gsn.js +0 -2
  383. package/dist/client/assets/session-DsbInyNV.js +0 -2
  384. package/dist/client/assets/settings-2-Qrnq-5XQ.js +0 -1
  385. package/dist/client/assets/settings-MUAsYy_j.js +0 -1
  386. package/dist/client/assets/settings.appearance-B5-X4oyX.js +0 -2
  387. package/dist/client/assets/settings.archived-DVUmF0nS.js +0 -2
  388. package/dist/client/assets/settings.connections-EQYBOa7e.js +0 -2
  389. package/dist/client/assets/settings.diagnostics-CBcOEqPM.js +0 -2
  390. package/dist/client/assets/settings.general-BOmr4mSV.js +0 -2
  391. package/dist/client/assets/settings.plugins-DC4js6dE.js +0 -5
  392. package/dist/client/assets/settings.providers-CJuBTAiR.js +0 -3
  393. package/dist/client/assets/settings.scheduled-tasks-CvLNaadX.js +0 -2
  394. package/dist/client/assets/settings.source-control-DJWucVsM.js +0 -2
  395. package/dist/client/assets/settingsLayout-jP1a50ek.js +0 -3
  396. package/dist/client/assets/shield-check-k2SY7zjx.js +0 -2
  397. package/dist/client/assets/shield-question-mark-kKJBH4Uj.js +0 -1
  398. package/dist/client/assets/square-pen-DilH8raK.js +0 -1
  399. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DuLLhUia.js +0 -2
  400. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-BrHQKVnf.js +0 -9
  401. package/dist/client/assets/text-search-DpDcKspl.js +0 -1
  402. package/dist/client/assets/threadSort-BoaTqeGH.js +0 -2
  403. package/dist/client/assets/toast-CjelgyqV.js +0 -2
  404. package/dist/client/assets/tooltip-taOyJZax.js +0 -2
  405. package/dist/client/assets/use-atom-command-CQHjSXPR.js +0 -2
  406. package/dist/client/assets/useNavigate-4thj06GJ.js +0 -2
  407. package/dist/client/assets/useScopedModelAvailability-BEfh0WXx.js +0 -2
  408. package/dist/client/assets/useSettings-CLtJrOYI.js +0 -3
  409. package/dist/client/assets/vcsRefInvalidation-nP-qgsHs.js +0 -2
@@ -1,9 +0,0 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-oBChb5qS.js";import"./chunk-DU6HZSFF-Bgpi4W6E.js";import"./chunk-75Z2AOVW-DpOWzc3R.js";import"./chunk-PWAF6VOD-BN6AAbfF.js";import"./chunk-GMAD6QVW-D98J5Pan.js";import"./chunk-P2QGCYS3-BrPw6V5F.js";import"./chunk-4HAMMTFA-Bs-Fo0v1.js";import"./chunk-GVQU2GXP-VuCIOHGI.js";import"./chunk-OSK3NFVY-V2__4gNB.js";import"./chunk-F27PBJKO-CLxgnzXS.js";import"./chunk-XXDRQBXY-BvKO0v-W.js";import"./chunk-POPQ4Y6H-DBQ9Y51x.js";import"./chunk-L3NEJ4N5-CrMlU3ZU.js";import{r as t,t as n}from"./chunk-SHT3W25Y-Vay44dCU.js";import"./mermaid.core-CyE6QOQY.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
2
- .swimlane.cluster rect {
3
- stroke: ${e.clusterBorder} !important;
4
- }
5
- [data-look="neo"].cluster rect {
6
- filter: none;
7
- }
8
- `,`getStyles`)});export{r as diagram};
9
- //# sourceMappingURL=swimlanesDiagram-VR7AAH4N-BrHQKVnf.js.map
@@ -1 +0,0 @@
1
- import{Ja as e,Ya as t}from"./main-BB3F4O6Y.js";export{t as __iconNode,e as default};
@@ -1,2 +0,0 @@
1
- import{Bd as e,Bh as t,Bm as n,Hl as r,Hm as i,Kl as a,Nh as o,Nl as s,Rd as c,ah as l,bh as u,ov as d,ph as f,th as p,zm as ee}from"./utils-DmfMX1v5.js";import{pn as m}from"./runtime-C6FwphD-.js";function h(e,t){try{let n=new URL(e).pathname,r=n.indexOf(t);return r>0&&/^\d+(?:\/|$)/u.test(n.slice(r+t.length))}catch{return!1}}function g(e){return e}function _(e,t){if(t.authority===void 0)return!0;try{let n=new URL(e.locator.remoteUrl);if(n.protocol===`http:`||n.protocol===`https:`)return n.host.toLowerCase()===t.authority}catch{}return!0}function v(e,t,n){if(!_(t,n))return!1;let r=c(t,e);return r===n.host.toLowerCase()||r===n.authority}function te(e){return e.displayName??(e.owner&&e.name?`${e.owner}/${e.name}`:null)}function y(e,t,n){let r=te(t);return r!==null&&r.toLowerCase()===n.repository.toLowerCase()&&v(e,t,n)}var b={kind:e.make(`unknown`),label:`source control`,pickerLabel:`source control`,icon:`change-request`,changeRequest:{shortLabel:`change request`,singular:`change request`},repositoryPathHint:`URL`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:()=>null,changeRequestActions:new Set,checkoutCommand:()=>null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(t,n)=>y(e.make(`unknown`),t,n),canReadChangeRequestOnHost:(t,n)=>v(e.make(`unknown`),t,n),isChangeRequestUrl:()=>!1};function ne(e){let t=new Map;for(let n of e){if(t.has(n.kind))throw Error(`Source control host '${n.kind}' is defined more than once.`);t.set(n.kind,n)}return{definitions:e,get:n=>(n==null?e[0]:t.get(n))??b,find:e=>t.get(e),findByPublicHost:t=>{let n=t.toLowerCase();return e.find(e=>e.publicHost===n)},findByChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t)),hostLabelForChangeRequestUrl:t=>e.find(e=>e.isChangeRequestUrl(t))?.label??`the host`}}function re(e,t){let n=u(e),r=n(t??{});if(r._tag===`Some`)return r.value;let i=n({});if(i._tag===`Some`)return i.value;throw Error(`A source control host settings schema must decode an empty object.`)}var x=/^az\s+repos\s+pr\s+checkout\s+(.+)$/i,S=/^https:\/\/(?:dev\.azure\.com\/[^/\s]+\/[^/\s]+|[^/\s]+\.visualstudio\.com\/[^/\s]+)\/_git\/[^/\s]+\/pullrequest\/(\d+)(?:[/?#].*)?$/i;function ie(e){let t=e.trim().split(/\s+/).filter(Boolean);for(let[e,n]of t.entries()){if(n===`--id`||n===`-i`)return t[e+1]??null;if(n.startsWith(`--id=`))return n.slice(5)||null}return t.find(e=>!e.startsWith(`-`))??null}var C=g({kind:e.make(`azure-devops`),label:`Azure DevOps`,pickerLabel:`Azure DevOps`,icon:`azure-devops`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`project/repository`,publicHost:null,publishDescription:`dev.azure.com`,publishHost:()=>`dev.azure.com`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${m(`${e}/${t}`.toLowerCase())}/pullrequest/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`az repos pr checkout --id ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>{let t=x.exec(e)?.[1];return t?ie(t):null},isChangeRequestReference:e=>S.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>_(e,t)&&m(e.canonicalKey.toLowerCase())===m(`${t.host}/${t.repository}`.toLowerCase()),canReadChangeRequestOnHost:()=>!1,isChangeRequestUrl:e=>h(e,`/pullrequest/`)}),w=/^[A-Za-z0-9._/@+=,-]+$/,T=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/,E=e.make(`bitbucket`),D=e=>n.pipe(t(d(``)),f(e)),ae=r({accessToken:D({title:`Access token`,description:`Scoped to one repository, project, or workspace. Create it in that item's Bitbucket settings.`,settingsSecret:!0,providerSettingsForm:{control:`password`}}),email:D({title:`Atlassian account email`,description:`With an API token instead of an access token.`,providerSettingsForm:{placeholder:`you@example.com`}}),apiToken:D({title:`API token`,description:`Reaches every repository your Atlassian account can. Give it read and write access to repositories and pull requests, and read:user:bitbucket.`,settingsSecret:!0,providerSettingsForm:{control:`password`}})},{order:[`accessToken`,`email`,`apiToken`]}),O=g({kind:E,label:`Bitbucket`,pickerLabel:`Bitbucket`,icon:`bitbucket`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`workspace/repository`,publicHost:`bitbucket.org`,publishDescription:`bitbucket.org`,publishHost:()=>`bitbucket.org`,newRepositoryOwner:()=>null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull-requests/${n}`,changeRequestActions:new Set([`merge`,`close`]),checkoutCommand:({number:e,headBranch:t,headRepositoryNameWithOwner:n})=>n&&T.test(n)&&w.test(t)?`git clone --single-branch --branch ${t} https://bitbucket.org/${n}.git t3code-pr-${e}`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>y(E,e,t),canReadChangeRequestOnHost:(e,t)=>v(E,e,t),isChangeRequestUrl:e=>h(e,`/pull-requests/`),settings:ae}),k=/^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i,A=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i,j=e.make(`forgejo`);function M(e){if(!e.webUrl)return null;try{let t=new URL(e.webUrl);return t.protocol===`http:`||t.protocol===`https:`?t:null}catch{return null}}var N=g({kind:j,label:`Forgejo`,pickerLabel:`Forgejo / Gitea`,icon:`forgejo`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`Your signed-in server`,publishHost:e=>e??`your server`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n,remoteUrl:r,webUrl:i})=>{if(i)return`${i.replace(/\/+$/,``)}/pulls/${n}`;try{let i=new URL(r??``);if((i.protocol===`http:`||i.protocol===`https:`)&&(i.hostname.toLowerCase()===e.toLowerCase()||i.host.toLowerCase()===e.toLowerCase()))return`${i.origin}/${t}/pulls/${n}`}catch{}return`https://${e}/${t}/pulls/${n}`},changeRequestActions:new Set([`merge`,`close`,`reopen`,`update-branch`]),checkoutCommand:({number:e,repositoryUrl:t})=>t?`git fetch '${t.replaceAll(`'`,`'\\''`)}' refs/pull/${e}/head && git checkout -B pulls/${e} FETCH_HEAD`:null,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:e=>e===`request-changes`,checkoutCommandArgument:e=>k.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>A.test(e),changeRequestUrlHost:e=>e.host,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>{if(!_(e,t))return!1;let n=M(e);return n?n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&n.pathname.replace(/^\/+|\/+$/g,``).toLowerCase()===t.repository.toLowerCase():y(j,e,t)},canReadChangeRequestOnHost:(e,t)=>{let n=M(e);if(!n)return v(j,e,t);let r=n.pathname.replace(/^\/+|\/+$/g,``).split(`/`).slice(0,-2).join(`/`);return n.host.toLowerCase()===(t.authority??t.host).toLowerCase()&&(!r||t.repository.toLowerCase().startsWith(`${r.toLowerCase()}/`))},isChangeRequestUrl:e=>h(e,`/pulls/`)}),P=new Set([`git.cafe`,`staging.git.cafe`]),F=e.make(`gitcafe`),I=r({token:n.pipe(a,t(d(``)),f({title:`Token`,description:`A git.cafe token, used before CAFE_TOKEN and the cafe login, so GitCafe works without the CLI signed in.`,providerSettingsForm:{control:`password`}}))}),L=g({kind:F,label:`GitCafe`,pickerLabel:`GitCafe`,icon:`gitcafe`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:null,publishDescription:`git.cafe`,publishHost:()=>`git.cafe`,newRepositoryOwner:e=>e?{owner:e}:null,defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pulls/${n}`,changeRequestActions:new Set([`ready`,`draft`,`close`,`reopen`,`merge`,`update-branch`]),checkoutCommand:({number:e})=>`cafe pr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:()=>null,isChangeRequestReference:()=>!1,changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>y(F,e,t),canReadChangeRequestOnHost:(e,t)=>v(F,e,t),isChangeRequestUrl:e=>{try{return P.has(new URL(e).hostname.toLowerCase())&&h(e,`/pulls/`)}catch{return!1}},settings:I}),R=/^gh\s+pr\s+checkout\s+(.+)$/i,z=/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/(\d+)(?:[/?#].*)?$/i,B=e.make(`github`),V=l({account:o(ee),enabled:i.pipe(t(d(!0)))}),H=r({hosts:p(s,V).pipe(t(d({})),f({providerSettingsForm:{hidden:!0}})),tokens:p(s,n).pipe(t(d({})),a,f({providerSettingsForm:{hidden:!0}}))}),U=g({kind:B,label:`GitHub`,pickerLabel:`GitHub`,icon:`github`,changeRequest:{shortLabel:`PR`,singular:`pull request`},repositoryPathHint:`owner/repo`,publicHost:`github.com`,publishDescription:`github.com`,publishHost:()=>`github.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`https`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/pull/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`,`revert`,`approve-workflows`]),checkoutCommand:({number:e})=>`gh pr checkout ${e}`,authorProfileUrl:(e,t)=>e.endsWith(`[bot]`)?null:new URL(`/${encodeURIComponent(e)}`,t).toString(),referenceAutolinkRepositoryUrl:e=>e,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>R.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>z.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:e=>c(e,B),isChangeRequestInRepository:(e,t)=>y(B,e,t),canReadChangeRequestOnHost:(e,t)=>v(B,e,t),isChangeRequestUrl:e=>h(e,`/pull/`),settings:H}),W=/^glab\s+mr\s+checkout\s+(.+)$/i,G=/^https:\/\/[^/\s]*gitlab[^/\s]*\/.+\/-\/merge_requests\/(\d+)(?:[/?#].*)?$/i,K=e.make(`gitlab`),q=ne([U,g({kind:K,label:`GitLab`,pickerLabel:`GitLab`,icon:`gitlab`,changeRequest:{shortLabel:`MR`,singular:`merge request`},repositoryPathHint:`group/project`,publicHost:`gitlab.com`,publishDescription:`gitlab.com`,publishHost:()=>`gitlab.com`,newRepositoryOwner:e=>({owner:e}),defaultCloneTransport:`ssh`,changeRequestUrl:({host:e,repository:t,number:n})=>`https://${e}/${t}/-/merge_requests/${n}`,changeRequestActions:new Set([`merge`,`ready`,`draft`,`close`,`reopen`,`update-branch`,`enable-auto-merge`,`disable-auto-merge`]),checkoutCommand:({number:e})=>`glab mr checkout ${e}`,authorProfileUrl:()=>null,referenceAutolinkRepositoryUrl:()=>null,reviewSummaryRequired:()=>!1,checkoutCommandArgument:e=>W.exec(e)?.[1]?.trim()??null,isChangeRequestReference:e=>G.test(e),changeRequestUrlHost:e=>e.hostname,checkoutChangeRequestHost:()=>null,isChangeRequestInRepository:(e,t)=>y(K,e,t),canReadChangeRequestOnHost:(e,t)=>v(K,e,t),isChangeRequestUrl:e=>h(e,`/-/merge_requests/`)}),L,N,O,C]);function oe(e){return re(H,e.sourceControlHosts.github)}function J(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function Y(...e){for(let t of e){let e=J(t??void 0);if(e!==null)return e}return null}function se(e){if(e.latestUserMessageAt){let t=J(e.latestUserMessageAt);if(t!==null)return t}let t=null;for(let n of e.messages??[]){if(n.role!==`user`)continue;let e=J(n.createdAt);e!==null&&(t=t===null?e:Math.max(t,e))}return t===null?Y(e.updatedAt,e.createdAt)??-1/0:t}function X(e,t){return t===`created_at`?Y(e.createdAt,e.updatedAt)??-1/0:se(e)}function ce(e,t){return e.length<2?[...e]:e.map(e=>({thread:e,timestamp:X(e,t)})).sort((e,t)=>t.timestamp-e.timestamp||(e.thread.id<t.thread.id?1:e.thread.id>t.thread.id?-1:0)).map(({thread:e})=>e)}function le(e,t,n){let r=null,i=-1/0;for(let a of e){if(a.projectId!==t||a.archivedAt!==null)continue;let e=X(a,n);(r===null||e>i||e===i&&a.id>r.id)&&(r=a,i=e)}return r}var Z=`abcdefghijklmnopqrstuvwxyz`;function Q(e){if(e.length===0)return!1;for(let t of e)if(!Z.includes(t))return!1;return e.at(-1)!==Z[0]}function $(e,t){if(t!==``&&e>=t)throw Error(`pinOrderMidpoint: bounds out of order`);if(t!==``){let n=0;for(;(e.charAt(n)||Z[0])===t.charAt(n);)n+=1;if(n>0)return t.slice(0,n)+$(e.slice(n),t.slice(n))}let n=e===``?0:Z.indexOf(e.charAt(0)),r=t===``?26:Z.indexOf(t.charAt(0));return r-n>1?Z.charAt(Math.round((n+r)/2)):t.length>1?t.charAt(0):Z.charAt(n)+$(e.slice(1),``)}function ue(e,t){let n=e??``,r=t??``;return n!==``&&!Q(n)||r!==``&&!Q(r)||r!==``&&n>=r?null:$(n,r)}export{J as a,b as c,ce as i,X as n,oe as o,ue as r,q as s,le as t};
2
- //# sourceMappingURL=threadSort-BoaTqeGH.js.map
@@ -1,2 +0,0 @@
1
- import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$i as r,Ax as i,Cr as a,D as o,Ea as s,Er as c,Gi as l,Ji as u,Ki as d,Ma as f,Mi as p,Ni as m,Oa as h,Qr as g,Th as _,Wm as v,Xi as y,Yc as b,Zi as x,br as S,bt as C,ca as w,di as T,do as E,ea as D,go as O,ha as k,ho as ee,ja as A,ka as te,ki as ne,lr as j,ma as M,na as N,oa as P,rh as F,sa as I,sh as L,sr as R,t as z,ta as B,ua as re,uo as V,vi as H,vo as ie,xm as ae,ya as U,yo as W,zs as oe}from"./utils-DmfMX1v5.js";import{t as se}from"./archive-0Qz6rgBl.js";import{t as ce}from"./circle-alert-B83jEPoh.js";import{t as le}from"./circle-check-Y1T60J9X.js";import{t as ue}from"./clock-bc9N_wA2.js";import{t as de}from"./info-BHB-83EA.js";import{t as fe}from"./pin-DfMqpQHz.js";import{t as pe}from"./trash-2-CiyAV2xI.js";import{t as me}from"./triangle-alert-BiHUyRl3.js";import{t as he}from"./x-CSwbgjBe.js";import{An as ge}from"./runtime-BQJQC-Ny.js";import{c as _e,l as ve,u as ye}from"./tooltip-taOyJZax.js";import{t as be}from"./spinner-I_NrXl2i.js";import{t as xe}from"./useParams-BTKEXLBT.js";var Se=_(b);function Ce(e){return Se(e)&&e.bootstrapThreadDisposition===`deleted`}function we(e){return Se(e)&&e.bootstrapThreadDisposition===`not-created`}var Te=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the T3 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(ge)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function Ee(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&Te.some(e=>e.test(t))}function De(e){return Ee(e)?null:e??null}var G=e(n()),Oe=G.createContext(void 0);function ke(){let e=G.useContext(Oe);if(!e)throw Error(W(73));return e}var Ae=0;function je(e){return Ae+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ae}`}function Me(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function Ne(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Pe=e=>e.toastMetadata,K={toasts:H(e=>e.toasts),isEmpty:H(e=>e.toasts.length===0),toast:H(Pe,(e,t)=>e.get(t)?.value),toastIndex:H(Pe,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:H(Pe,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:H(Pe,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:H(e=>e.hovering),focused:H(e=>e.focused),expanded:H(e=>e.hovering||e.focused),expandedOrOutOfFocus:H(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:H(e=>e.prevFocusElement)},Fe=class extends T{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ne(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||je(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:Ne(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Me(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Me(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Me(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=P.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=N(e);B(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?P.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:Ne(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=D(u(this.state.viewport));if(!this.state.viewport||!B(this.state.viewport,t)||!r(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),i=K.toastIndex(this.state,e),a=null,o=i+1;for(;o<n.length;){if(n[o].transitionStatus!==`ending`){a=n[o];break}o+=1}if(!a)for(o=i-1;o>=0;){if(n[o].transitionStatus!==`ending`){a=n[o];break}--o}a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(k()),Ie=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=ie(()=>new Fe({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return M(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(Oe.Provider,{value:a,children:t})},Le=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),Re=G.forwardRef(function(e,t){let{render:n,className:i,style:a,children:o,...s}=e,c=ke(),f=I(),p=G.useRef(!1),m=G.useRef(!1),h=G.useRef(!1),g=c.useState(`isEmpty`),_=c.useState(`toasts`),v=c.useState(`focused`),b=c.useState(`expanded`),S=c.useState(`prevFocusElement`),C=_[0]?.height??0,w=G.useMemo(()=>_.some(e=>e.transitionStatus===`ending`),[_]),T=G.useMemo(()=>_.filter(e=>e.priority===`high`),[_]);G.useEffect(()=>{let e=c.state.viewport;if(!e)return;function t(t){g||t.key===`F6`&&N(t)!==e&&(t.preventDefault(),c.setPrevFocusElement(D(u(e))),e?.focus({preventScroll:!0}),c.pauseTimers(),c.setFocused(!0))}let n=A(e);return x(n,`keydown`,t)},[c,g]),G.useEffect(()=>{let e=c.state.viewport;if(!e||g)return;let t=A(e);function n(e){N(e)===t&&(c.setIsWindowFocused(!1),c.pauseTimers())}function i(n){if(n.relatedTarget)return;let i=N(n),a=D(u(e));(i===t||!B(e,i)||!r(a))&&c.resumeTimers(),f.start(0,()=>c.setIsWindowFocused(!0))}return y(x(t,`blur`,n,!0),x(t,`focus`,i,!0))},[c,f,g]),G.useEffect(()=>{let e=c.state.viewport;if(!e||g)return;let t=u(e);return x(t,`pointerdown`,c.handleDocumentPointerDown,!0)},[g,c]);function O(e){let t=c.state.viewport;t&&(p.current=!0,e.relatedTarget===t?_[0]?.ref?.current?.focus():c.restoreFocusToPrevElement())}function k(e){e.key===`Tab`&&e.shiftKey&&N(e.nativeEvent)===c.state.viewport&&(e.preventDefault(),c.restoreFocusToPrevElement(),c.resumeTimers())}function ee(){let e=c.state.toasts.some(e=>e.transitionStatus===`ending`);c.state.isWindowFocused&&!e&&!h.current&&m.current&&(c.resumeTimers(),c.setHovering(!1),m.current=!1)}G.useEffect(ee,[w,c]);function te(){c.pauseTimers(),c.setHovering(!0),m.current=!1}function ne(){w||h.current?m.current=!0:(c.resumeTimers(),c.setHovering(!1))}function j(e){e.pointerType===`touch`&&(h.current=!0)}function M(e){e.pointerType===`touch`&&(h.current=!1,ee())}function P(){if(p.current){p.current=!1;return}v||r(D(u(c.state.viewport)))&&(c.setFocused(!0),c.pauseTimers())}function F(e){v&&!B(c.state.viewport,e.relatedTarget)&&(c.setFocused(!1),c.resumeTimers())}let L={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:te,onMouseMove:te,onMouseLeave:ne,onFocus:P,onBlur:F,onKeyDown:k,onClick:P,onPointerDown:j,onPointerUp:M,onPointerCancel:M},R={expanded:b},z=E(`div`,e,{ref:[t,c.setViewport],state:R,props:[L,{style:{[Le.frontmostHeight]:C?`${C}px`:void 0}},s,{children:(0,q.jsxs)(G.Fragment,{children:[!g&&S&&(0,q.jsx)(l,{onFocus:O}),o,!g&&S&&(0,q.jsx)(l,{onFocus:O})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!g&&S&&(0,q.jsx)(l,{onFocus:O}),z,!v&&T.length>0&&(0,q.jsx)(`div`,{style:d,children:T.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),ze=e(re()),Be=G.createContext(void 0);function Ve(){let e=G.useContext(Be);if(!e)throw Error(W(66));return e}var J=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function He(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ue(e){let t=A(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var We={...V,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Ge=40,Ke=10,Y=.5,qe=1,Je=`${ne},${p}`,Ye=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,l=n.positionerProps?.anchor!==void 0,d=[];l||(d=Array.isArray(a)?a:[a]);let f=d.length>0,p=ke(),[m,g]=G.useState(void 0),[_,v]=G.useState(!1),[y,b]=G.useState(!1),[S,C]=G.useState(!1),[T,O]=G.useState({x:0,y:0}),[k,ee]=G.useState({x:0,y:0,scale:1}),[A,ne]=G.useState(),[j,M]=G.useState(),[P,F]=G.useState(null),I=G.useRef(null),L=G.useRef({x:0,y:0}),R=G.useRef({x:0,y:0,scale:1}),z=G.useRef(void 0),re=G.useRef(0),V=G.useRef(!1),H=G.useRef({x:0,y:0}),ie=G.useRef(!1),ae=G.useRef({x:0,y:0}),U=G.useRef(null),W=G.useRef(null),oe=p.useState(`toastIndex`,n.id),se=p.useState(`toastVisibleIndex`,n.id),ce=p.useState(`toastOffsetY`,n.id),le=p.useState(`focused`),ue=p.useState(`expanded`);w({open:n.transitionStatus!==`ending`,ref:I,onComplete(){n.transitionStatus===`ending`&&p.removeToast(n.id)}});let de=te((e=!1)=>{let t=I.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){p.updateToastInternal(n.id,{ref:I,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?ze.flushSync(a):a()});h(de,[de]);function fe(e){ae.current=e,O(e)}h(()=>()=>{W.current?.abort()},[]);function pe(e,t){let n=e,r=t;return!d.includes(`left`)&&!d.includes(`right`)?n=e>0?e**Y:-(Math.abs(e)**Y):(!d.includes(`right`)&&e>0&&(n=e**Y),!d.includes(`left`)&&e<0&&(n=-(Math.abs(e)**Y))),!d.includes(`up`)&&!d.includes(`down`)?r=t>0?t**Y:-(Math.abs(t)**Y):(!d.includes(`down`)&&t>0&&(r=t**Y),!d.includes(`up`)&&t<0&&(r=-(Math.abs(t)**Y))),{x:n,y:r}}let me=te(e=>{if(e.pointerId!==U.current)return;U.current=null,W.current?.abort(),W.current=null,v(!1),b(!1),F(null);let t=R.current;if(e.type===`pointercancel`||V.current){fe({x:t.x,y:t.y}),g(void 0);return}let r=!1,i=ae.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of d){switch(e){case`right`:a>Ge&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>Ge&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(g(s),C(!0),p.closeToast(n.id)):(fe({x:t.x,y:t.y}),g(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&p.pauseTimers();let t=N(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${Je}`))return;if(V.current=!1,z.current=void 0,re.current=0,U.current=e.pointerId,L.current={x:e.clientX,y:e.clientY},H.current=L.current,I.current){let e=Ue(I.current);R.current=e,ee(e),fe({x:e.x,y:e.y})}p.setHovering(!0),v(!0),b(!1),F(null),ie.current=!0;let n=I.current;if(n){W.current?.abort();let t=new AbortController;W.current=t;let r=u(n);r.addEventListener(`pointerup`,me,{signal:t.signal}),r.addEventListener(`pointercancel`,me,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function ge(e){if(e.pointerId!==U.current)return;e.preventDefault(),ie.current&&=(L.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>H.current.y||i>0&&t<H.current.y)&&(H.current={x:H.current.x,y:t}),(r<0&&n>H.current.x||r>0&&n<H.current.x)&&(H.current={x:n,y:H.current.y});let a=n-L.current.x,o=t-L.current.y,s=t-H.current.y,c=n-H.current.x;if(!y&&Math.sqrt(a*a+o*o)>=qe&&(b(!0),P===null)){let e=d.includes(`left`)||d.includes(`right`),t=d.includes(`up`)||d.includes(`down`);e&&t&&F(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!z.current)P===`vertical`?o>0?l=`down`:o<0&&(l=`up`):P===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&d.includes(l)&&(z.current=l,re.current=He(l,a,o),g(l));else{let e=z.current,t=He(e,c,s);t>Ge?(V.current=!1,g(e)):!(d.includes(`left`)&&d.includes(`right`))&&!(d.includes(`up`)&&d.includes(`down`))&&re.current-t>=Ke&&(V.current=!0)}let u=pe(a,o),f=R.current.x,p=R.current.y;P===`horizontal`?(d.includes(`left`)||d.includes(`right`))&&(f+=u.x):(P===`vertical`||(d.includes(`left`)||d.includes(`right`))&&(f+=u.x),(d.includes(`up`)||d.includes(`down`))&&(p+=u.y)),fe({x:f,y:p})}function _e(e){if(e.key===`Escape`){if(!I.current||!B(I.current,D(u(I.current))))return;p.closeToast(n.id)}}G.useEffect(()=>{if(!f)return;let e=I.current;if(!e)return;function t(t){B(e,N(t))&&t.preventDefault()}return x(e,`touchmove`,t,{passive:!1})},[f]);function ve(){if(!_&&T.x===k.x&&T.y===k.y&&!S)return{[J.swipeMovementX]:`0px`,[J.swipeMovementY]:`0px`};let e=T.x-k.x,t=T.y-k.y;return{transition:_?`none`:void 0,transform:_?`translateX(${T.x}px) translateY(${T.y}px) scale(${k.scale})`:void 0,[J.swipeMovementX]:`${e}px`,[J.swipeMovementY]:`${t}px`}}let ye=n.priority===`high`,be={role:ye?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":A,"aria-describedby":j,"aria-hidden":ye&&!le?!0:void 0,onPointerDown:f?he:void 0,onPointerMove:f?ge:void 0,onPointerUp:f?me:void 0,onPointerCancel:f?me:void 0,onKeyDown:_e,inert:c(n.limited),style:{...ve(),[J.index]:n.transitionStatus===`ending`?oe:se,[J.offsetY]:`${ce}px`,[J.height]:n.height?`${n.height}px`:void 0}},xe=G.useMemo(()=>({rootRef:I,toast:n,titleId:A,setTitleId:ne,descriptionId:j,setDescriptionId:M,swiping:_,swipeDirection:m,recalculateHeight:de,index:oe,visibleIndex:se,expanded:ue}),[n,A,j,_,m,de,oe,se,ue]),Se={transitionStatus:n.transitionStatus,expanded:ue,limited:n.limited||!1,type:n.type,swiping:xe.swiping,swipeDirection:xe.swipeDirection},Ce=E(`div`,e,{ref:[t,xe.rootRef],state:Se,stateAttributesMapping:We,props:[be,s]});return(0,q.jsx)(Be.Provider,{value:xe,children:Ce})}),Xe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=Ve(),l=G.useRef(null);return h(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),E(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),Ze=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=Ve(),u=o??c.description,d=!!u,f=U(a);h(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=E(`p`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),Qe=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=Ve(),u=o??c.title,d=!!u,f=U(a);h(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p={type:c.type},m=E(`h2`,e,{ref:t,state:p,props:{...s,id:f,children:u}});return d?m:null}),$e=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...c}=e,l=ke(),{toast:u}=Ve(),d=l.useState(`expanded`),[f,p]=G.useState(!1),{getButtonProps:m,buttonRef:h}=s({disabled:a,native:o}),g={type:u.type};return E(`button`,e,{ref:[t,h],state:g,props:[{"aria-hidden":!d&&!f,onClick(){l.closeToast(u.id)},onFocus(){p(!0)},onBlur(){p(!1)}},c,m]})}),et=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...c}=e,{toast:l}=Ve(),u=l.actionProps?.children??c.children,d=!!u,{getButtonProps:f,buttonRef:p}=s({disabled:a,native:o}),m={type:l.type},h=E(`button`,e,{ref:[t,p],state:m,props:[c,l.actionProps,f,{children:u}]});return d?h:null}),tt=ve,nt=G.createContext(void 0);function rt(){let e=G.useContext(nt);if(e===void 0)throw Error(W(84));return e}var it=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=ke(),o=n.positionerProps??ee,{render:s,className:c,anchor:l=o.anchor,positionMethod:u=o.positionMethod??`absolute`,side:d=o.side??`top`,align:p=o.align??`center`,sideOffset:h=o.sideOffset??0,alignOffset:_=o.alignOffset??0,collisionBoundary:v=o.collisionBoundary??`clipping-ancestors`,collisionPadding:y=o.collisionPadding??5,arrowPadding:b=o.arrowPadding??5,sticky:x=o.sticky??!1,disableAnchorTracking:C=o.disableAnchorTracking??!1,collisionAvoidance:w=o.collisionAvoidance??m,style:T,...E}=r,[D,k]=G.useState(null),A=i.useState(`toastIndex`,n.id),te=i.useState(`toastVisibleIndex`,n.id),ne=f(l)?l:null,j=g({open:!0,onOpenChange:O,elements:{floating:D,reference:ne}}),M=a({anchor:ne,positionMethod:u,floatingRootContext:j,mounted:!0,side:d,sideOffset:h,align:p,alignOffset:_,collisionBoundary:v,collisionPadding:y,sticky:x,arrowPadding:b,disableAnchorTracking:C,keepMounted:!0,collisionAvoidance:w}),N=G.useMemo(()=>({side:M.side,align:M.align,anchorHidden:M.anchorHidden}),[M.side,M.align,M.anchorHidden]),P=S(e,N,{styles:{...M.positionerStyles,[J.index]:n.transitionStatus===`ending`?A:te},transitionStatus:n.transitionStatus,props:E,refs:[t,k]});return(0,q.jsx)(nt.Provider,{value:M,children:P})}),at=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=rt();return E(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ot(){let e=G.useContext(Oe);if(!e)throw Error(W(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function st(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||je(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var ct=t({Action:()=>et,Arrow:()=>at,Close:()=>$e,Content:()=>Xe,Description:()=>Ze,Portal:()=>tt,Positioner:()=>it,Provider:()=>Ie,Root:()=>Ye,Title:()=>Qe,Viewport:()=>Re,createToastManager:()=>st,useToastManager:()=>ot});function lt(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var X=lt(),Z=i(),ut={archive:se,clock:ue,pin:fe,trash:pe};function dt(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(ft,t),null}function ft(){let e=!0,t=new Set,n=()=>{let n=X.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),$.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?ut[r.icon]:null,i=r.actions??[],a=i.find(mt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{X.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&X.getSnapshot().includes(r)&&X.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},secondaryActionVariant:`soft`,hideCopyButton:!0}};t.has(r.id)?$.update(`shared:${r.id}`,s):(t.add(r.id),$.add({...s,id:`shared:${r.id}`}))}},r=X.subscribe(n),i=pt;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),X.setPaused(`web-hidden`,!1);for(let e of t)$.close(`shared:${e}`)}}function pt(){return X.setPaused(`web-hidden`,document.hidden)}function mt(e){return e.primary}var ht=class extends L()(`ClipboardApiUnavailableError`,{target:F}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},gt=class extends L()(`ClipboardWriteError`,{target:F,cause:v()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},_t=class extends L()(`ClipboardReadUnavailableError`,{target:F}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},vt=class extends L()(`ClipboardReadError`,{target:F,cause:v()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function yt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function bt(e,t=`text`,n){if(typeof window>`u`)throw new ht({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[ae];if(r&&(n={...n,"text/html":C(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(yt(e,n))return!0;throw new ht({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new gt({target:t,cause:e})}}async function xt(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new _t({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new vt({target:e,cause:t})}}function St({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{bt(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function Ct(e){return e===`live`}function wt(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function Tt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Et(e){return{draftId:e}}function Dt(e){return!e.environmentId||!e.threadId?null:oe(e.environmentId,e.threadId)}function Ot(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:oe(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function kt(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function At(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function jt(e,t){return t<=1?!1:e>0}function Mt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=Nt(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:Nt(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function Nt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function Pt(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var Q=ye(),$=st(),Ft=st(),It=new Map,Lt={error:ce,info:de,loading:be,success:le,warning:me},Rt=180;function zt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Rt))return`line-clamp-4`}var Bt=`absolute z-20 -top-1.5 -right-1.5`,Vt=z(`inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-popover/92 text-muted-foreground shadow-sm outline-none backdrop-blur-sm`,`transition-[color,background-color,box-shadow] hover:bg-popover hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`);function Ht(e,t,n){n?.(),e.close(t)}function Ut(e){let t=(0,Z.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=St(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=z(`size-3`,c),t[4]=c,t[5]=l);let u=a?Q.Check:Q.Copy,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(_e,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(R,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Wt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function Gt(e){let t=(0,Z.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Kt),t[0]=c):c=t[0];let l=i?Q.ChevronUp:Q.ChevronDown,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(_e,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Wt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Kt(e){return!e}function qt(e){let t=(0,Z.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=z(`min-w-0 select-text wrap-break-word text-muted-foreground`,zt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)(Ze,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)(Ze,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(Gt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Jt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=z(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=z(`min-w-0 select-none wrap-break-word text-muted-foreground`,zt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)(Ze,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?Q.ChevronUp:Q.ChevronDown,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(_e,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Wt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Jt(e){return!e}function Yt(e){let t=e.type?Lt[e.type]:null,n=At(e.actionProps)&&e.data?.actionLayout===`stacked-end`,r=e.data?.actionVariant??`default`,i=e.data?.secondaryActionVariant??`outline`,a=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,o=(e.data?.additionalActions?.length??0)>0,s=e.data?.secondaryActionProps!==void 0,c=a!==null||At(e.actionProps)||o||s;return{Icon:t,stackedActionLayout:n,actionVariant:r,secondaryActionVariant:i,copyErrorText:a,hasTrailingControls:c,inlineContentEndPad:c?`pr-6`:`pr-10`}}function Xt(e){let t=(0,Z.c)(38),{stackedActionLayout:n,Icon:r,copyErrorText:i,actionProps:a,actionVariant:o,secondaryActionVariant:s,hasTrailingControls:c,toastData:l,toastDescription:u,toastType:d}=e,f;t[0]===l?.additionalActions?f=t[1]:(f=l?.additionalActions??[],t[0]=l?.additionalActions,t[1]=f);let p=f,m=l?.secondaryActionProps,h=l?.leadingIcon,g;t[2]===m?g=t[3]:(g=m??{},t[2]=m,t[3]=g);let _,v;t[4]===g?(_=t[5],v=t[6]):({className:_,...v}=g,t[4]=g,t[5]=_,t[6]=v);let y=n?`pr-5`:`flex-1`,b;t[7]===y?b=t[8]:(b=z(`flex min-h-0 min-w-0 flex-col gap-0.5`,y),t[7]=y,t[8]=b);let x;t[9]!==r||t[10]!==h?(x=h?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:h}):r?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(r,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[9]=r,t[10]=h,t[11]=x):x=t[11];let S;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsx)(Qe,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[12]=S):S=t[12];let C;t[13]===x?C=t[14]:(C=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[x,S]}),t[13]=x,t[14]=C);let w;t[15]!==l||t[16]!==u||t[17]!==d?(w=(0,q.jsx)(qt,{toastData:l,toastDescription:u,toastType:d}),t[15]=l,t[16]=u,t[17]=d,t[18]=w):w=t[18];let T;t[19]!==b||t[20]!==C||t[21]!==w?(T=(0,q.jsxs)(`div`,{className:b,children:[C,w]}),t[19]=b,t[20]=C,t[21]=w,t[22]=T):T=t[22];let E;t[23]!==a||t[24]!==o||t[25]!==p||t[26]!==i||t[27]!==c||t[28]!==_||t[29]!==m||t[30]!==v||t[31]!==s||t[32]!==n||t[33]!==l?.sharedToastId?(E=c?(0,q.jsxs)(`div`,{className:z(`flex items-center gap-1.5`,n?`w-full justify-end`:`shrink-0`),children:[i===null?null:(0,q.jsx)(Ut,{text:i}),p.map(e=>{let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(R,{...i,className:r,key:t,size:`xs`,type:`button`,variant:s})}),m?(0,q.jsx)(R,{...v,className:_,size:`xs`,type:`button`,variant:l?.sharedToastId?`solid-neutral`:s}):null,At(a)?(0,q.jsx)(et,{className:z(j({size:`xs`,variant:o}),`shrink-0`),"data-slot":`toast-action`,children:a?.children}):null]}):null,t[23]=a,t[24]=o,t[25]=p,t[26]=i,t[27]=c,t[28]=_,t[29]=m,t[30]=v,t[31]=s,t[32]=n,t[33]=l?.sharedToastId,t[34]=E):E=t[34];let D;return t[35]!==E||t[36]!==T?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[35]=E,t[36]=T,t[37]=D):D=t[37],D}function Zt(){let e=(0,Z.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:Qt},e[0]=t):t=e[0];let n=xe(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=o(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function Qt(e){return Ot(e)}function $t(e){let t=(0,Z.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=It.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,It.delete(n),$.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),It.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function en(e){let t=(0,Z.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(dt,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(tn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(Ie,{toastManager:$,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function tn(e){let t=(0,Z.c)(19),{position:n}=e,{toasts:r}=ot(),i=Zt(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>Pt(e.data,i),t[2]=i,t[3]=s);let c=Mt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(nn));for(let t of It.keys())e.has(t)||It.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=ct,f=ct,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=z(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=jt(r,c.items.length),s=Yt(t),{stackedActionLayout:l,inlineContentEndPad:u}=s;return(0,q.jsxs)(Ye,{className:z(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&X.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&X.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)($t,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),!t.data?.sharedToastId&&(0,q.jsx)(`div`,{className:Bt,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Vt,"data-slot":`toast-close`,onClick:()=>Ht($,t.id,t.data?.onClose),type:`button`,children:(0,q.jsx)(he,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsxs)(Xe,{className:z(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,l?`flex flex-col gap-2 py-2.5 pr-3.5`:z(`py-3`,`flex items-center justify-between gap-2`,t.data?.sharedToastId?`pr-2`:u),a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(Xt,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),t.data?.sharedToastId&&(0,q.jsx)(R,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,onClick:()=>X.dismiss(t.data.sharedToastId),children:(0,q.jsx)(he,{})})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function nn(e){return e.id}function rn(e){let t=(0,Z.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(an,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(Ie,{toastManager:Ft,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function an(){let e=(0,Z.c)(7),{toasts:t}=ot(),n=Zt(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>Pt(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(on),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(tt,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(Re,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function on(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=Yt(e),{stackedActionLayout:i,inlineContentEndPad:a}=r;return n?.anchor?(0,q.jsx)(it,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(Ye,{className:z(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(Xe,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(Qe,{"data-slot":`toast-title`})}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:Bt,children:(0,q.jsx)(`button`,{"aria-label":`Dismiss notification`,className:Vt,"data-slot":`toast-close`,onClick:()=>Ht(Ft,e.id,e.data?.onClose),type:`button`,children:(0,q.jsx)(he,{className:`size-3`,strokeWidth:2.25})})}),(0,q.jsx)(Xe,{className:z(`pointer-events-auto min-h-0 overflow-y-visible pl-3.5 text-sm [overflow-x:clip]`,i?`flex flex-col gap-2 py-2.5 pr-3.5`:z(`py-3`,`flex items-center justify-between gap-1.5`,a)),children:(0,q.jsx)(Xt,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type})})]})})},e.id):null}export{Ce as _,Et as a,kt as c,Ot as d,xt as f,De as g,X as h,$ as i,Dt as l,bt as m,en as n,Tt as o,St as p,Ft as r,Ct as s,rn as t,wt as u,we as v};
2
- //# sourceMappingURL=toast-CjelgyqV.js.map
@@ -1,2 +0,0 @@
1
- import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{$r as r,Aa as i,Ax as a,Cr as o,Dr as s,Er as c,Gr as l,Ji as u,Jr as d,Ma as f,Na as p,Ni as m,Oa as h,Oi as g,Qi as _,Ra as v,Tr as y,Va as b,Wi as x,Xr as S,Yi as C,Yr as w,Za as T,Zi as E,Zr as D,_r as O,ai as k,ao as A,bi as j,br as ee,ca as M,co as N,di as P,do as F,ei as I,fo as L,ga as R,go as z,ha as te,hi as B,ho as V,ii as H,ja as ne,ka as U,la as re,li as ie,mi as ae,na as oe,ni as se,no as ce,oa as le,oi as ue,oo as de,pa as fe,r as pe,ra as me,ri as he,sa as ge,si as _e,t as ve,ta as ye,ti as be,to as xe,ua as Se,ui as Ce,uo as we,va as Te,vi as W,wr as Ee,yc as De,yo as Oe}from"./utils-DmfMX1v5.js";import{t as ke}from"./env-wK1YYxA8.js";var G=e(n()),K=e(te()),Ae=G.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new le,currentIdRef:{current:null},currentContextRef:{current:null}});function je(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=G.useRef(n),a=G.useRef(n),o=G.useRef(null),s=G.useRef(null),c=ge();return(0,K.jsx)(Ae.Provider,{value:G.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Me(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=G.useContext(Ae),[f,p]=G.useState(!1);return h(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),h(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:_(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,R(T))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),h(()=>()=>{l.current=null},[l]),G.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Ne(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Pe(e){return e!=null&&e.clientX!=null}function Fe(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=G.useRef(!1),u=G.useRef(null),[d,f]=G.useState(),[p,m]=G.useState([]),h=U(e=>{i.set(`positionReference`,e)}),g=U((e,t,n)=>{l.current||(!c.current.openEvent||Pe(c.current.openEvent))&&i.set(`positionReference`,Ne(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=U(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=me(d)?o:a;G.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=ne(o);function r(t){let n=oe(t);ye(o,n)?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Pe(c.current.openEvent)?u.current=E(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),G.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),G.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),G.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=G.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return G.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var Ie=a(),Le=e(Se());function Re(e){let[t,n]=G.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function ze(e){let t=i(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=p(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r;return(x(n)!==o||x(r)!==s)&&(n=o,r=s),{width:n,height:r}}var Be=()=>!0;function Ve(e){let{popupElement:t,positionerElement:n,content:r,mounted:i,enabled:a=Be,onMeasureLayout:o,onMeasureLayoutComplete:s,side:c,direction:l}=e,u=re(t,!0,!1),d=fe(),f=G.useRef(null),p=G.useRef(null),m=G.useRef(!0),g=G.useRef(z),_=U(o),v=U(s),y=G.useMemo(()=>{let e=c===`top`,t=c===`left`;return l===`rtl`?(e||=c===`inline-end`,t||=c===`inline-end`):(e||=c===`inline-start`,t||=c===`inline-start`),e?{position:`absolute`,[c===`top`?`bottom`:`top`]:`0`,[t?`right`:`left`]:`0`}:V},[c,l]);h(()=>{if(!i||!a()||typeof ResizeObserver!=`function`){g.current=z,m.current=!0,f.current=null,p.current=null;return}if(!t||!n)return;g.current=Ue(t,y);let e=new ResizeObserver(e=>{let t=e[0];t&&(p.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),We(t,`auto`);let r=He(t,`position`,`static`),o=He(t,`transform`,`none`),s=He(t,`scale`,`1`),c=Ue(n,{"--available-width":`max-content`,"--available-height":`max-content`});function l(){r(),o(),c()}function h(){l(),s()}if(_?.(),m.current||f.current===null){q(n,`max-content`);let r=ze(t);return f.current=r,q(n,r),h(),v?.(null,r),m.current=!1,()=>{e.disconnect(),g.current(),g.current=z}}We(t,`auto`),q(n,`max-content`);let b=f.current??p.current,x=ze(t);if(f.current=x,!b)return q(n,x),h(),v?.(null,x),()=>{e.disconnect(),d.cancel(),g.current(),g.current=z};We(t,b),h(),v?.(b,x),q(n,x);let S=new AbortController;return d.request(()=>{We(t,x),u(()=>{t.style.setProperty(`--popup-width`,`auto`),t.style.setProperty(`--popup-height`,`auto`)},S.signal)}),()=>{e.disconnect(),S.abort(),d.cancel(),g.current(),g.current=z}},[r,t,n,u,d,a,i,_,v,y])}function He(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function Ue(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(He(e,r,i));return n.length?()=>{n.forEach(e=>e())}:z}function We(e,t){let n=t===`auto`?`auto`:`${t.width}px`,r=t===`auto`?`auto`:`${t.height}px`;e.style.setProperty(`--popup-width`,n),e.style.setProperty(`--popup-height`,r)}function q(e,t){let n=t===`max-content`?`max-content`:`${t.width}px`,r=t===`max-content`?`max-content`:`${t.height}px`;e.style.setProperty(`--positioner-width`,n),e.style.setProperty(`--positioner-height`,r)}function Ge(e){let{store:t,side:n,cssVars:r,children:i}=e,a=y(),o=t.useState(`activeTriggerElement`),s=t.useState(`activeTriggerId`),l=t.useState(`open`),d=t.useState(`payload`),f=t.useState(`mounted`),p=t.useState(`popupElement`),m=t.useState(`positionerElement`),g=Re(l?o:null),_=Ye(s,d),v=G.useRef(null),[b,x]=G.useState(null),[S,C]=G.useState(null),w=G.useRef(null),T=G.useRef(null),E=re(w,!0,!1),D=fe(),[O,k]=G.useState(null),[A,j]=G.useState(!1);h(()=>(t.set(`hasViewport`,!0),()=>{t.set(`hasViewport`,!1)}),[t]);let ee=U(()=>{w.current?.style.setProperty(`animation`,`none`),w.current?.style.setProperty(`transition`,`none`),T.current?.style.setProperty(`display`,`none`)}),M=U(e=>{w.current?.style.removeProperty(`animation`),w.current?.style.removeProperty(`transition`),T.current?.style.removeProperty(`display`),e&&k(e)}),N=G.useRef(null);h(()=>{if(o&&g&&o!==g&&N.current!==o&&v.current){x(v.current),j(!0);let e=Je(g,o);C(e),D.request(()=>{Le.flushSync(()=>{j(!1)}),E(()=>{x(null),k(null),v.current=null})}),N.current=o}},[o,g,b,E,D]),h(()=>{let e=w.current;if(!e)return;let t=u(e).createElement(`div`);for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));v.current=t});let P=b!=null,F;F=P?(0,K.jsxs)(G.Fragment,{children:[(0,K.jsx)(`div`,{"data-previous":!0,inert:c(!0),ref:T,style:{...O?{[r.popupWidth]:`${O.width}px`,[r.popupHeight]:`${O.height}px`}:null,position:`absolute`},"data-ending-style":A?void 0:``},`previous`),(0,K.jsx)(`div`,{"data-current":!0,ref:w,"data-starting-style":A?``:void 0,children:i},_)]}):(0,K.jsx)(`div`,{"data-current":!0,ref:w,children:i},_),h(()=>{let e=T.current;e&&b&&e.replaceChildren(...Array.from(b.childNodes))},[b]),Ve({popupElement:p,positionerElement:m,mounted:f,content:d,onMeasureLayout:ee,onMeasureLayoutComplete:M,side:n,direction:a});let I={activationDirection:Ke(S),transitioning:P};return{children:F,state:I}}function Ke(e){if(e)return`${qe(e.horizontal,5,`right`,`left`)} ${qe(e.vertical,5,`down`,`up`)}`}function qe(e,t,n,r){return e>t?n:e<-t?r:``}function Je(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},a={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:a.x-i.x,vertical:a.y-i.y}}function Ye(e,t){let[n,r]=G.useState(0),i=G.useRef(e),a=G.useRef(t),o=G.useRef(!1);return h(()=>{let n=i.current,s=a.current,c=e!==n,l=t!==s;c?(r(e=>e+1),o.current=!l):o.current&&l&&(r(e=>e+1),o.current=!1),i.current=e,a.current=t},[e,t]),`${e??`current`}-${n}`}var Xe=t((e=>{e.Check=[[`path`,{d:`M20 6 9 17l-5-5`}]],e.ChevronDown=[[`path`,{d:`m6 9 6 6 6-6`}]],e.ChevronRight=[[`path`,{d:`m9 18 6-6-6-6`}]],e.ChevronUp=[[`path`,{d:`m18 15-6-6-6 6`}]],e.ChevronsDownUp=[[`path`,{d:`m7 20 5-5 5 5`}],[`path`,{d:`m7 4 5 5 5-5`}]],e.ChevronsUpDown=[[`path`,{d:`m7 15 5 5 5-5`}],[`path`,{d:`m7 9 5-5 5 5`}]],e.Circle=[[`circle`,{cx:`12`,cy:`12`,r:`10`}]],e.CircleAlert=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],e.CircleCheck=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m9 12 2 2 4-4`}]],e.Code2=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],e.Copy=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]],e.CornerUpRight=[[`path`,{d:`m15 14 5-5-5-5`}],[`path`,{d:`M4 20v-7a4 4 0 0 1 4-4h12`}]],e.Eye=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],e.FoldVertical=[[`path`,{d:`M12 22v-6`}],[`path`,{d:`M12 8V2`}],[`path`,{d:`M4 12H2`}],[`path`,{d:`M10 12H8`}],[`path`,{d:`M16 12h-2`}],[`path`,{d:`M22 12h-2`}],[`path`,{d:`m15 19-3-3-3 3`}],[`path`,{d:`m15 5-3 3-3-3`}]],e.Folder=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]],e.FolderClosed=[[`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`}],[`path`,{d:`M2 10h20`}]],e.Image=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]],e.Link=[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}]],e.ListPlus=[[`path`,{d:`M16 5H3`}],[`path`,{d:`M11 12H3`}],[`path`,{d:`M16 19H3`}],[`path`,{d:`M18 9v6`}],[`path`,{d:`M21 12h-6`}]],e.Lock=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]],e.LockOpen=[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`}]],e.Maximize2=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],e.Minimize2=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],e.Minus=[[`path`,{d:`M5 12h14`}]],e.Moon=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]],e.PanelLeft=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],e.PanelLeftClose=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`m16 15-3-3 3-3`}]],e.Plus=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],e.Sun=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]],e.Table2=[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`}]],e.Text=[[`path`,{d:`M21 5H3`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M17 19H3`}]],e.UnfoldVertical=[[`path`,{d:`M12 22v-6`}],[`path`,{d:`M12 8V2`}],[`path`,{d:`M4 12H2`}],[`path`,{d:`M10 12H8`}],[`path`,{d:`M16 12h-2`}],[`path`,{d:`M22 12h-2`}],[`path`,{d:`m15 19-3 3-3-3`}],[`path`,{d:`m15 5-3-3-3 3`}]],e.Volume2=[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`}]],e.VolumeOff=[[`path`,{d:`M16 9a5 5 0 0 1 .95 2.293`}],[`path`,{d:`M19.364 5.636a9 9 0 0 1 1.889 9.96`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11`}],[`path`,{d:`M9.828 4.172A.686.686 0 0 1 11 4.657v.686`}]]})),Ze=G.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=g({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,K.jsxs)(G.Fragment,{children:[l,c&&Le.createPortal(n,c)]})}),Qe=`MmLlHhVvCcSsQqTtAaZz`;function $e(e){let t=[],n=e.length,r=0,i=0,a=0,o=0,s=0,c=null,l=``,u=0,d=0,f=``,p=!1,m=e=>{throw Error(`morphicons: ${e} at d[${r}]`)},h=e=>e>=48&&e<=57,g=()=>{for(;r<n;){let t=e.charCodeAt(r);if(t===32||t===9||t===10||t===13||t===12||t===44)r++;else break}},_=()=>{g();let t=r;r<n&&(e[r]===`+`||e[r]===`-`)&&r++;let i=!1;for(;r<n&&h(e.charCodeAt(r));)r++,i=!0;if(r<n&&e[r]===`.`)for(r++;r<n&&h(e.charCodeAt(r));)r++,i=!0;if(i||m(`expected number`),r<n&&(e[r]===`e`||e[r]===`E`)){let t=r;r++,r<n&&(e[r]===`+`||e[r]===`-`)&&r++;let i=!1;for(;r<n&&h(e.charCodeAt(r));)r++,i=!0;i||(r=t)}return Number(e.slice(t,r))},v=()=>{g();let t=e[r];return t===`0`||t===`1`?(r++,+(t===`1`)):m(`expected arc flag (0|1)`)},y=()=>(p||m(`path must start with M/m`),c||(c={x0:i,y0:a,segs:[],closed:!1},t.push(c)),c),b=!1,x=()=>_()+(b?i:0),S=()=>_()+(b?a:0);for(;g(),!(r>=n);){let n=e[r];switch(Qe.includes(n)?(l=n,r++):l===``?m(`path must start with M/m`):l===`M`?l=`L`:l===`m`?l=`l`:(l===`Z`||l===`z`)&&m(`stray data after Z`),b=l>=`a`,b?l.toUpperCase():l){case`M`:{p=!0;let e=x(),n=S();i=e,a=n,o=e,s=n,c={x0:e,y0:n,segs:[],closed:!1},t.push(c),f=``;break}case`L`:{let e=x(),t=S();y().segs.push([`L`,e,t]),i=e,a=t,f=``;break}case`H`:{let e=x();y().segs.push([`L`,e,a]),i=e,f=``;break}case`V`:{let e=S();y().segs.push([`L`,i,e]),a=e,f=``;break}case`C`:case`S`:{let e,t;l===`C`||l===`c`?(e=x(),t=S()):(e=f===`C`?2*i-u:i,t=f===`C`?2*a-d:a);let n=x(),r=S(),o=x(),s=S();y().segs.push([`C`,e,t,n,r,o,s]),u=n,d=r,i=o,a=s,f=`C`;break}case`Q`:case`T`:{let e,t;l===`Q`||l===`q`?(e=x(),t=S()):(e=f===`Q`?2*i-u:i,t=f===`Q`?2*a-d:a);let n=x(),r=S();y().segs.push([`Q`,e,t,n,r]),u=e,d=t,i=n,a=r,f=`Q`;break}case`A`:{let e=_(),t=_(),n=_(),r=v(),o=v(),s=x(),c=S();y().segs.push([`A`,e,t,n,r,o,s,c]),i=s,a=c,f=``;break}case`Z`:c&&=(c.closed=!0,null),i=o,a=s,f=``;break;default:m(`unsupported command "${l}"`)}}return t.filter(e=>e.segs.length>0)}function et(e){return String(Math.round(e*100)/100)}function tt(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e[r],a=i.length/2;n+=`M${et(i[0])} ${et(i[1])}`;for(let e=1;e<a;e++)n+=`L${et(i[2*e])} ${et(i[2*e+1])}`;t?.[r]&&(n+=`Z`)}return n}function J(e){return String(Math.round(e*1e4)/1e4)}function nt(e){let t=``;for(let{pts:n,closed:r}of e){t+=`M${J(n[0])} ${J(n[1])}`;for(let e=2;e<n.length;e+=6)t+=`C${J(n[e])} ${J(n[e+1])} ${J(n[e+2])} ${J(n[e+3])} ${J(n[e+4])} ${J(n[e+5])}`;r&&(t+=`Z`)}return t}var rt=4/3*Math.tan(Math.PI/8),it=2*Math.PI;function at(e,t){let n=[e,t],r=e,i=t,a=(e,t,a,o,s,c)=>{n.push(e,t,a,o,s,c),r=s,i=c},o=(e,t)=>{Math.abs(e-r)<1e-12&&Math.abs(t-i)<1e-12||a(r+(e-r)/3,i+(t-i)/3,r+2*(e-r)/3,i+2*(t-i)/3,e,t)};return[a,o,(e,t,n,o)=>{a(r+2/3*(e-r),i+2/3*(t-i),n+2/3*(e-n),o+2/3*(t-o),n,o)},(e,t,n,s,c,l,u)=>{let d=r,f=i;if(Math.abs(l-d)<1e-12&&Math.abs(u-f)<1e-12)return;let p=Math.abs(e),m=Math.abs(t);if(p<1e-12||m<1e-12){o(l,u);return}let h=n*Math.PI/180,g=Math.cos(h),_=Math.sin(h),v=(d-l)/2,y=(f-u)/2,b=g*v+_*y,x=-_*v+g*y,S=b*b/(p*p)+x*x/(m*m);if(S>1){let e=Math.sqrt(S);p*=e,m*=e}let C=p*p,w=m*m,T=b*b,E=x*x,D=(C*w-C*E-w*T)/(C*E+w*T);D<0&&(D=0);let O=(s===c?-1:1)*Math.sqrt(D),k=O*p*x/m,A=-O*m*b/p,j=g*k-_*A+(d+l)/2,ee=_*k+g*A+(f+u)/2,M=Math.atan2((x-A)/m,(b-k)/p),N=Math.atan2((-x-A)/m,(-b-k)/p)-M;c===0&&N>0?N-=it:c===1&&N<0&&(N+=it);let P=Math.max(1,Math.ceil(Math.abs(N)/(Math.PI/2)-1e-9)),F=N/P,I=4/3*Math.tan(F/4),L=e=>j+p*Math.cos(e)*g-m*Math.sin(e)*_,R=e=>ee+p*Math.cos(e)*_+m*Math.sin(e)*g,z=e=>-p*Math.sin(e)*g-m*Math.cos(e)*_,te=e=>-p*Math.sin(e)*_+m*Math.cos(e)*g,B=M,V=d,H=f;for(let e=1;e<=P;e++){let t=M+F*e,n=e===P?l:L(t),r=e===P?u:R(t);a(V+I*z(B),H+I*te(B),n-I*z(t),r-I*te(t),n,r),B=t,V=n,H=r}},e=>(e&&o(n[0],n[1]),n.length<8?null:{pts:Float64Array.from(n),closed:e})]}function ot(e){let[t,n,r,i,a]=at(e.x0,e.y0);for(let a of e.segs)switch(a[0]){case`L`:n(a[1],a[2]);break;case`C`:t(a[1],a[2],a[3],a[4],a[5],a[6]);break;case`Q`:r(a[1],a[2],a[3],a[4]);break;case`A`:i(a[1],a[2],a[3],a[4],a[5],a[6],a[7])}return a(e.closed)}function Y(e,t,n=0){let r=e[t];if(r===void 0)return n;let i=typeof r==`number`?r:Number(r);return Number.isFinite(i)?i:n}function st(e){let t=String(e??``).trim();if(!t)return[];let n=t.split(/[\s,]+/).map(Number);if(n.some(e=>!Number.isFinite(e)))throw Error(`morphicons: invalid points: "${t}"`);return n}function ct(e,t){if(e.length<4)return null;let[,n,,,r]=at(e[0],e[1]);for(let t=2;t+1<e.length;t+=2)n(e[t],e[t+1]);return r(t)}function lt(e,t,n,r){if(n<1e-12||r<1e-12)return null;let i=rt*n,a=rt*r,o=e+n,s=e-n,c=t+r,l=t-r,[u,,,,d]=at(o,t);return u(o,t+a,e+i,c,e,c),u(e-i,c,s,t+a,s,t),u(s,t-a,e-i,l,e,l),u(e+i,l,o,t-a,o,t),d(!0)}function ut(e){let t=Y(e,`x`),n=Y(e,`y`),r=Y(e,`width`),i=Y(e,`height`);if(r<1e-12||i<1e-12)return null;let a=Y(e,`rx`,NaN),o=Y(e,`ry`,NaN);if(Number.isNaN(a)&&(a=Number.isNaN(o)?0:o),Number.isNaN(o)&&(o=a),a=Math.min(Math.max(a,0),r/2),o=Math.min(Math.max(o,0),i/2),a<1e-12||o<1e-12)return ct([t,n,t+r,n,t+r,n+i,t,n+i],!0);let s=t+a,c=t+r-a,l=t+r,u=n+o,d=n+i-o,f=n+i,p=rt*a,m=rt*o,[h,g,,,_]=at(s,n);return g(c,n),h(c+p,n,l,u-m,l,u),g(l,d),h(l,d+m,c+p,f,c,f),g(s,f),h(s-p,f,t,d+m,t,d),g(t,u),h(t,u-m,s-p,n,s,n),_(!0)}function dt(e){let t=[],n=e=>{e&&t.push(e)};if(typeof e==`string`){for(let t of $e(e))n(ot(t));return t}for(let[t,r]of e)switch(t){case`path`:for(let e of $e(String(r.d??``)))n(ot(e));break;case`line`:{let[,e,,,t]=at(Y(r,`x1`),Y(r,`y1`));e(Y(r,`x2`),Y(r,`y2`)),n(t(!1));break}case`circle`:{let e=Y(r,`r`);n(lt(Y(r,`cx`),Y(r,`cy`),e,e));break}case`ellipse`:n(lt(Y(r,`cx`),Y(r,`cy`),Y(r,`rx`),Y(r,`ry`)));break;case`rect`:n(ut(r));break;case`polyline`:n(ct(st(r.points),!1));break;case`polygon`:n(ct(st(r.points),!0));break;default:throw Error(`morphicons: unsupported tag <${t}>`)}return t}function ft(e){return e.items.map(()=>new Float64Array(2*e.n))}function pt(e,t,n){for(let r=0;r<e.items.length;r++){let i=e.items[r],a=n[r],o=e.n,s=Math.exp(i.lnSigma*t),c=i.theta*t,l=Math.cos(c)*s,u=Math.sin(c)*s,d,f;if(i.block){let[e,n]=i.block.off,[r,a]=i.block.drift;d=i.ca[0]+r*t+(e*l-n*u-e),f=i.ca[1]+a*t+(e*u+n*l-n)}else d=i.ca[0]+(i.cb[0]-i.ca[0])*t,f=i.ca[1]+(i.cb[1]-i.ca[1])*t;for(let e=0;e<o;e++){let n=i.aC[2*e]+(i.bT[2*e]-i.aC[2*e])*t,r=i.aC[2*e+1]+(i.bT[2*e+1]-i.aC[2*e+1])*t;a[2*e]=d+n*l-r*u,a[2*e+1]=f+n*u+r*l}}}var mt=.35,ht=.05,gt=.005,_t=8,vt=1e5;function X(e){let t=e.length/2,n=0,r=0;for(let i=0;i<t;i++)n+=e[2*i],r+=e[2*i+1];return[n/t,r/t]}function yt(e){let t=e.length/2,n=0;for(let r=1;r<t;r++)n+=Math.hypot(e[2*r]-e[2*r-2],e[2*r+1]-e[2*r-1]);return n}function bt(e){let t=e.length/2,n=new Float64Array(2*t);for(let r=0;r<t;r++)n[2*r]=e[2*(t-1-r)],n[2*r+1]=e[2*(t-1-r)+1];return n}function xt(e,t){let n=e.length/2,r=new Float64Array(2*n);for(let i=0;i<n;i++){let a=(i+t)%n;r[2*i]=e[2*a],r[2*i+1]=e[2*a+1]}return r}function St(e,t,n,r){let i=e.length/2,a=0,o=0,s=0,c=0,l=0,u=0;for(let d=0;d<i;d++){let i=e[2*d]-n[0],f=e[2*d+1]-n[1],p=t[2*d]-r[0],m=t[2*d+1]-r[1];a+=i*p,c+=f*m,o+=i*m,s+=f*p,l+=i*i+f*f,u+=p*p+m*m}let d=Math.atan2(o-s,a+c),f=Math.cos(d)*(a+c)+Math.sin(d)*(o-s),p=l>1e-12?f/l:1;p>1e-6||(p=1e-6);let m=Math.max(0,p*p*l-2*p*f+u),h=u>1e-12?Math.sqrt(m/u):0;return{theta:d,sigma:p,res:h}}function Ct(e,t,n=!1,r=!1){let i=X(e),a=X(t),o=n&&!r,s=o?e:t,c=n||r?s.length/2:1,l=1/0,u=s,d={theta:0,sigma:1,res:0};for(let n=0;n<2;n++){let r=n?bt(s):s;for(let n=0;n<c;n++){let s=n?xt(r,n):r,c=o?St(s,t,i,a):St(e,s,i,a),f=c.res+ht*Math.abs(c.theta)/Math.PI;f<l&&(l=f,u=s,d=c)}}return o?{ca:i,cb:a,a:u,b:t,...d}:{ca:i,cb:a,a:e,b:u,...d}}function wt(e,t){let n=t.map(X),r=t.map(yt);return e.map(e=>{let t=X(e),i=yt(e);return n.map((e,n)=>Math.hypot(t[0]-e[0],t[1]-e[1])+mt*Math.abs(i-r[n]))})}function Tt(e){let t=e.length;if(t>_t){let n=[];for(let r=0;r<t;r++)for(let i=0;i<t;i++)n.push([e[r][i],r,i]);n.sort((e,t)=>e[0]-t[0]);let r=Array(t).fill(-1),i=Array(t).fill(!1);for(let[,e,t]of n)r[e]<0&&!i[t]&&(r[e]=t,i[t]=!0);return r}let n=Array.from({length:t},(e,t)=>t),r=n.slice(),i=1/0,a=(n,o,s)=>{if(!(s>=i)){if(o===t){i=s,r=n.slice();return}for(let r=o;r<t;r++)[n[o],n[r]]=[n[r],n[o]],a(n,o+1,s+e[o][n[o]]),[n[o],n[r]]=[n[r],n[o]]}};return a(n,0,0),r}function Et(e){let t=e.length,n=e[0].length;if(n**t>vt){let r=e.map(e=>{let t=0;for(let n=1;n<e.length;n++)e[n]<e[t]&&(t=n);return t}),i=Array(n).fill(0);for(let e of r)i[e]++;for(let a=0;a<n;a++){if(i[a]>0)continue;let n=-1,o=1/0;for(let s=0;s<t;s++){if(i[r[s]]<2)continue;let t=e[s][a]-e[s][r[s]];t<o&&(o=t,n=s)}i[r[n]]--,r[n]=a,i[a]++}return r}let r=null,i=1/0,a=Array(t),o=Array(n).fill(0),s=(c,l,u)=>{if(!(l>=i||n-u>t-c)){if(c===t){i=l,r=a.slice();return}for(let t=0;t<n;t++)a[c]=t,o[t]++,s(c+1,l+e[c][t],u+ +(o[t]===1)),o[t]--}};if(s(0,0,0),!r)throw Error(`morphicons: no valid surjection (B < S)`);return r}function Dt(e,t){let n=e.length*t,r=new Float64Array(2*n),i=new Float64Array(2*n);e.forEach((e,n)=>{r.set(e.a,2*t*n),i.set(e.bO,2*t*n)});let a=X(r),o=St(r,i,a,X(i));if(o.res>=gt)return;let s=Math.cos(-o.theta),c=Math.sin(-o.theta),l=Math.cos(o.theta),u=Math.sin(o.theta);for(let n of e){let e=0,r=0;for(let i=0;i<t;i++){let t=n.bO[2*i]-n.cb[0],a=n.bO[2*i+1]-n.cb[1];n.bT[2*i]=(t*s-a*c)/o.sigma,n.bT[2*i+1]=(t*c+a*s)/o.sigma;let d=o.sigma*(l*n.aC[2*i]-u*n.aC[2*i+1])-t,f=o.sigma*(u*n.aC[2*i]+l*n.aC[2*i+1])-a;e+=d*d+f*f,r+=t*t+a*a}n.theta=o.theta,n.lnSigma=Math.log(o.sigma),n.res=r>1e-12?Math.sqrt(e/r):0;let i=Math.exp(n.lnSigma),d=Math.cos(n.theta)*i,f=Math.sin(n.theta)*i,p=n.ca[0]-a[0],m=n.ca[1]-a[1],h=p*d-m*f-p,g=p*f+m*d-m;n.block={off:[p,m],drift:[n.cb[0]-n.ca[0]-h,n.cb[1]-n.ca[1]-g]}}}function Ot(e,t){let n=e.length,r=t.length;if(n===0||r===0)throw Error(`morphicons: icon has no subpaths`);let i=e.map(e=>e.pts),a=t.map(e=>e.pts),o=[];if(n===r){let e=Tt(wt(i,a));for(let t=0;t<n;t++)o.push([t,e[t]])}else if(n<r){let e=Et(wt(a,i));for(let t=0;t<r;t++)o.push([e[t],t])}else{let e=Et(wt(i,a));for(let t=0;t<n;t++)o.push([t,e[t]])}let s=i[0].length/2,c=o.map(([n,r])=>{let o=Ct(i[n],a[r],e[n].closed,t[r].closed),c=o.a,l=new Float64Array(2*s),u=new Float64Array(2*s),d=new Float64Array(2*s),f=Math.cos(-o.theta),p=Math.sin(-o.theta);for(let e=0;e<s;e++){l[2*e]=c[2*e]-o.ca[0],l[2*e+1]=c[2*e+1]-o.ca[1];let t=o.b[2*e]-o.cb[0],n=o.b[2*e+1]-o.cb[1];u[2*e]=(t*f-n*p)/o.sigma,u[2*e+1]=(t*p+n*f)/o.sigma,d[2*e]=o.b[2*e],d[2*e+1]=o.b[2*e+1]}return{a:c,aC:l,bT:u,bO:d,ca:o.ca,cb:o.cb,theta:o.theta,lnSigma:Math.log(o.sigma),res:o.res,closed:e[n].closed&&t[r].closed,block:null}});return c.length>1&&Dt(c,s),{items:c,n:s}}var kt=Math.PI/8,At=[.18343464249564978,.525532409916329,.7966664774136267,.9602898564975363],jt=[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626];function Mt(e,t,n){let r=6*t,i=1-n,a=3*i*i,o=6*i*n,s=3*n*n,c=a*(e[r+2]-e[r])+o*(e[r+4]-e[r+2])+s*(e[r+6]-e[r+4]),l=a*(e[r+3]-e[r+1])+o*(e[r+5]-e[r+3])+s*(e[r+7]-e[r+5]);return Math.hypot(c,l)}function Nt(e,t,n=1){let r=n/2,i=0;for(let n=0;n<4;n++)i+=jt[n]*(Mt(e,t,r+r*At[n])+Mt(e,t,r-r*At[n]));return i*r}function Pt(e,t,n,r,i){let a=6*t,o=1-n,s=o*o*o,c=3*o*o*n,l=3*o*n*n,u=n*n*n;r[i]=s*e[a]+c*e[a+2]+l*e[a+4]+u*e[a+6],r[i+1]=s*e[a+1]+c*e[a+3]+l*e[a+5]+u*e[a+7]}function Ft(e,t,n){let r=6*t,i=n?r+6:r,a=n?-1:1;for(let t of n?[4,2,0]:[2,4,6]){let n=a*(e[r+t]-e[i]),o=a*(e[r+t+1]-e[i+1]);if(n*n+o*o>1e-18)return[n,o]}return null}function It(e,t=kt){let n=e.pts,r=(n.length/2-1)/3,i=[];for(let e=0;e<r;e++)Nt(n,e)>1e-9&&i.push(e);if(i.length===0)return[];let a=new Set,o=(e,r)=>{let i=Ft(n,e,!0),o=Ft(n,r,!1);i&&o&&Math.abs(Math.atan2(i[0]*o[1]-i[1]*o[0],i[0]*o[0]+i[1]*o[1]))>t&&a.add(r)};for(let e=0;e+1<i.length;e++)o(i[e],i[e+1]);return e.closed&&i.length>1&&o(i[i.length-1],i[0]),[...a].sort((e,t)=>e-t)}function Lt(e,t,n,r){if(n<=0)return 0;if(n>=r)return 1;let i=0,a=1,o=n/r;for(let s=0;s<12;s++){let s=Nt(e,t,o)-n;if(Math.abs(s)<1e-10*r+1e-14)break;s>0?a=o:i=o;let c=Mt(e,t,o),l=c>1e-12?o-s/c:(i+a)/2;l>i&&l<a||(l=(i+a)/2),o=l}return o}function Rt(e,t=64,n=kt){let r=e.pts,i=(r.length/2-1)/3,a=new Float64Array(2*t),o=()=>{for(let e=0;e<t;e++)a[2*e]=r[0],a[2*e+1]=r[1];return a};if(i<1)return o();let s=Array(i),c=0;for(let e=0;e<i;e++)s[e]=Nt(r,e),c+=s[e];if(c<1e-12)return o();let l=It(e,n),u=e.closed?l.length>0?l:[0]:[...new Set([0,...l,i])].sort((e,t)=>e-t),d=[];if(e.closed)for(let e=0;e<u.length;e++){let t=u[e],n=e+1<u.length?u[e+1]:u[0]+i;d.push([t,n])}else for(let e=0;e+1<u.length;e++)d.push([u[e],u[e+1]]);let f=d.map(([e,t])=>{let n=0;for(let r=e;r<t;r++)n+=s[r%i];return n}),p=e.closed?t:t-1;if(d.length>p)throw Error(`morphicons: N=${t} too small (${d.length} runs)`);let m=f.reduce((e,t)=>e+t,0)||1,h=f.map(e=>p*e/m),g=h.map(e=>Math.max(1,Math.floor(e))),_=p-g.reduce((e,t)=>e+t,0);if(_>0){let e=h.map((e,t)=>[Math.round((e-Math.floor(e))*1e9),t]).sort((e,t)=>t[0]-e[0]||e[1]-t[1]);for(let t=0;t<_;t++)g[e[t%g.length][1]]++}for(;_<0;){let e=0;for(let t=1;t<g.length;t++)g[t]>g[e]&&(e=t);if(g[e]<=1)break;g[e]--,_++}let v=0;for(let e=0;e<d.length;e++){let[t,n]=d[e],o=g[e],c=f[e],l=t%i*6;a[2*v]=r[l],a[2*v+1]=r[l+1],v++;let u=t,p=0;for(let e=1;e<o;e++){let t=c*e/o;for(;u<n-1&&p+s[u%i]<t;)p+=s[u%i],u++;let l=u%i,d=s[l];Pt(r,l,d>1e-12?Lt(r,l,t-p,d):0,a,2*v),v++}}if(!e.closed){let e=6*i;a[2*v]=r[e],a[2*v+1]=r[e+1]}return a}function zt(e,t=64){return dt(e).map(e=>({pts:Rt(e,t),closed:e.closed}))}var Bt=class{x=1;v=0;k=250;c=24;config(e,t){this.k=e,this.c=t}start(){this.x=0,this.v>14&&(this.v=14),this.v<-14&&(this.v=-14)}step(e){let t=Math.max(1,Math.min(16,Math.ceil(e/(1/240)))),n=e/t;for(let e=0;e<t;e++){let e=this.k*(1-this.x)-this.c*this.v;this.v+=e*n,this.x+=this.v*n}return Math.abs(1-this.x)<.001&&Math.abs(this.v)<.02}},Vt={smooth:{k:170,c:26},snappy:{k:420,c:30},bouncy:{k:300,c:14}},Ht=new Set,Z=0,Q=-1;function Ut(e){let t=Q<0?0:Math.min(Math.max((e-Q)/1e3,0),.1);Q=e;for(let e of[...Ht])e(t);Ht.size>0?Z=requestAnimationFrame(Ut):(Z=0,Q=-1)}function Wt(e){Ht.add(e),Z===0&&(Q=-1,Z=requestAnimationFrame(Ut))}function Gt(e){Ht.delete(e),Ht.size===0&&Z!==0&&(cancelAnimationFrame(Z),Z=0,Q=-1)}var Kt=new WeakMap,qt=new WeakMap,Jt=new WeakMap;function $(e){if(typeof e==`string`)return zt(e);let t=Kt.get(e);return t||(t=zt(e),Kt.set(e,t)),t}function Yt(e){if(typeof e==`string`)return e;let t=qt.get(e);return t||(t=nt(dt(e)),qt.set(e,t)),t}function Xt(e,t){if(typeof e==`string`||typeof t==`string`)return Ot($(e),$(t));let n=Jt.get(e);n||(n=new WeakMap,Jt.set(e,n));let r=n.get(t);return r||(r=Ot($(e),$(t)),n.set(t,r)),r}function Zt(e){if(typeof e==`string`)return Vt[e];let t=Vt.snappy;return{k:e?.stiffness??t.k,c:e?.damping??t.c}}function Qt(e,t,n){let r=new Bt,i=n?.reducedMotion??`never`,a=t,o=!0,s=null,c=null,l=null,u=1,d=!1,f=!1;e.setAttribute(`d`,Yt(t));let p=t=>{let n=s,r=c,i=l;n&&r&&i&&(u=t,pt(n,t,r),e.setAttribute(`d`,tt(r,i)))},m=()=>{d&&(d=!1,Gt(h))},h=e=>{let t=r.step(e);p(r.x),t&&(m(),g())},g=()=>{o=!0,s=null,c=null,l=null,u=1,r.x=1,r.v=0,e.setAttribute(`d`,Yt(a))},_=()=>{let e=s,t=c;return o||!e||!t?$(a):t.map((t,n)=>({pts:Float64Array.from(t),closed:e.items[n].closed}))},v=e=>{s=o?Xt(a,e):Ot(_(),$(e)),c=ft(s),l=s.items.map(e=>e.closed),a=e,o=!1},y=e=>{m(),a=e,g()},b=()=>i===`always`?!0:i!==`user`||typeof matchMedia>`u`?!1:matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1,x=(e,t)=>{if(f)return;let n=!o&&s!==null&&e===a;m(),r.v=0,n||v(e),p(t)};return{morphTo(e,t){if(f||e===a&&(o||d))return;if(b()){y(e);return}let{k:n,c:i}=Zt(t);r.config(n,i),v(e),r.start(),d||(d=!0,Wt(h))},set(e){f||y(e)},seek:x,get progress(){return o?1:u},set progress(e){f||x(a,e)},get reducedMotion(){return i},set reducedMotion(e){i=e},destroy(){m(),f=!0,s=null,c=null,l=null}}}var $t=typeof document>`u`?G.useEffect:G.useLayoutEffect;function en(e,t,n){if(n<=0)return Yt(e);if(n>=1)return Yt(t);let r=Ot(zt(e),zt(t)),i=ft(r);return pt(r,n,i),tt(i,r.items.map(e=>e.closed))}var tn=(0,G.forwardRef)(function(e,t){let{icon:n,from:r,to:i,progress:a,spring:o,reducedMotion:s,size:c=24,color:l=`currentColor`,strokeWidth:u=2,absoluteStrokeWidth:d,label:f,...p}=e,m=r!==void 0&&i!==void 0,h=n??r??i,[g]=(0,G.useState)(()=>m?en(r,i,a??0):h===void 0?``:Yt(h)),_=(0,G.useRef)(null),v=(0,G.useRef)(null),y=(0,G.useRef)(o);y.current=o;let b=(0,G.useRef)(s);b.current=s;let x=(0,G.useRef)(n),S=(0,G.useRef)(m),C=(0,G.useRef)(!1),w=(0,G.useRef)(!1),T=(0,G.useRef)(null),E=(0,G.useCallback)(e=>{if(v.current)return v.current;let t=_.current;return C.current||!t?null:(v.current=Qt(t,e,{reducedMotion:b.current}),v.current)},[]);$t(()=>{C.current=!1;let e=_.current;if(e&&h!==void 0){let t=Qt(e,m?r:h,{reducedMotion:b.current});if(v.current=t,m){T.current=[r,i];let e=a??0;e<=0?t.set(r):e>=1?t.set(i):(t.seek(i,e),w.current=!0)}}return()=>{C.current=!0,v.current?.destroy(),v.current=null,w.current=!1,T.current=null}},[]),(0,G.useEffect)(()=>{let e=v.current;e&&(e.reducedMotion=s??`never`)},[s]),(0,G.useEffect)(()=>{let e=S.current&&!m;S.current=m;let t=n!==x.current;if(x.current=n,m||n===void 0||!t&&!e)return;T.current=null,w.current=!1;let r=v.current;r?r.morphTo(n,y.current):E(n)},[n,m,E]),(0,G.useEffect)(()=>{if(!m)return;let e=v.current??E(r);if(!e)return;let t=a??0;(!T.current||T.current[0]!==r||T.current[1]!==i)&&(T.current=[r,i],w.current=!1),t<=0?(e.set(r),w.current=!1):t>=1?(e.set(i),w.current=!1):(w.current||=(e.set(r),!0),e.seek(i,t))},[m,r,i,a,E]),(0,G.useImperativeHandle)(t,()=>({morphTo:(e,t)=>{T.current=null,w.current=!1;let n=v.current;n?n.morphTo(e,t??y.current):E(e)},set:e=>{T.current=null,w.current=!1;let t=v.current;t?t.set(e):E(e)}}),[E]);let D=d?Number(u)*24/Number(c):u;return(0,K.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:c,height:c,viewBox:`0 0 24 24`,fill:`none`,stroke:l,strokeWidth:D,strokeLinecap:`round`,strokeLinejoin:`round`,role:f?`img`:void 0,"aria-hidden":!f||void 0,...p,children:[f?(0,K.jsx)(`title`,{children:f}):null,(0,K.jsx)(`path`,{ref:_,d:g})]})});function nn(e){let t=(0,Ie.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({reducedMotion:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?`user`:r,a;return t[3]!==n||t[4]!==i?(a=(0,K.jsx)(tn,{reducedMotion:i,...n}),t[3]=n,t[4]=i,t[5]=a):a=t[5],a}var rn=G.createContext(void 0);function an(e){let t=G.useContext(rn);if(t===void 0&&!e)throw Error(Oe(72));return t}var on={...be,disabled:W(e=>e.disabled),instantType:W(e=>e.instantType),isInstantPhase:W(e=>e.isInstantPhase),trackCursorAxis:W(e=>e.trackCursorAxis),disableHoverablePopup:W(e=>e.disableHoverablePopup),lastOpenChangeReason:W(e=>e.openChangeReason),closeOnClick:W(e=>e.closeOnClick),closeDelay:W(e=>e.closeDelay),hasViewport:W(e=>e.hasViewport)},sn=class e extends P{constructor(e,t,n=!1){let r=new se,i={...cn(),...e};i.floatingRootContext=I(r,t,n),super(i,{popupRef:G.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},on)}setOpen=(e,t)=>{let n=t.reason,r=n===xe,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0),H(r,e,t.trigger),this.update(r)};r?Le.flushSync(o):o()};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,R(ce,e))}static useStore(t,n){return ie(t,(t,r)=>new e(n,t,r)).store}};function cn(){return{...r(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var ln=ae(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=sn.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});O(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),g=!t&&m,_=p.useState(`activeTriggerId`),y=p.useState(`mounted`),x=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),k(p);let{forceUnmount:S,transitionStatus:C}=ue(g,p),w=p.useState(`isInstantPhase`),T=p.useState(`instantType`),E=p.useState(`lastOpenChangeReason`),D=G.useRef(null);h(()=>{m&&t&&p.setOpen(!1,R(v))},[m,t,p]),h(()=>{C===`ending`&&E===`none`||C!==`ending`&&w?(T!==`delay`&&(D.current=T),p.set(`instantType`,`delay`)):D.current!==null&&(p.set(`instantType`,D.current),D.current=null)},[C,w,E,T,p]),h(()=>{g&&(_??p.set(`payload`,void 0))},[p,_,g]);let A=G.useCallback(()=>{p.setOpen(!1,R(b))},[p]);G.useImperativeHandle(o,()=>({unmount:S,close:A}),[S,A]);let j=g||y||!t&&a!==`none`;return(0,K.jsxs)(rn.Provider,{value:p,children:[j&&(0,K.jsx)(un,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:x}):f]})});function un({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=j(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Fe(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=G.useMemo(()=>L(a.reference,i.reference),[a.reference,i.reference]),s=G.useMemo(()=>L(a.trigger,i.trigger),[a.trigger,i.trigger]),c=G.useMemo(()=>L(he,a.floating,i.floating),[a.floating,i.floating]);return _e(e,{activeTriggerProps:o,inactiveTriggerProps:s,popupProps:c}),null}var dn=G.createContext(void 0);function fn(){return G.useContext(dn)}var pn=function(e){return e[e.popupOpen=A.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),mn=`data-base-ui-tooltip-trigger`;function hn(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;e<t.length;e+=1){let n=t[e];if(f(n))return n}}let t=e.target;return f(t)?t:null}function gn(e){let t=e;for(;t;){if(t.hasAttribute(mn))return t;let e=t.parentElement;if(e){t=e;continue}let n=t.getRootNode();t=`host`in n&&f(n.host)?n.host:null}return null}var _n=B(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:u=!0,closeDelay:f,id:p,...m}=e,h=an(!0),g=a?.store??h;if(!g)throw Error(Oe(82));let _=Te(p),v=g.useState(`isTriggerActive`,_),y=g.useState(`isOpenedByTrigger`,_),b=g.useState(`floatingRootContext`),x=G.useRef(null),w=c??600,T=f??0,{registerTrigger:E,isMountedByThisTrigger:O}=Ce(_,x,g,{payload:o,closeOnClick:u,closeDelay:T}),k=fn(),{delayRef:A,isInstantPhase:j,hasProvider:ee}=Me(b,{open:y}),M=S(b);g.useSyncedValue(`isInstantPhase`,j);let P=g.useState(`disabled`),I=s??P,L=C(I),z=g.useState(`trackCursorAxis`),te=g.useState(`disableHoverablePopup`),B=G.useRef(!1),V=ge(),H=G.useRef(void 0);function ne(){let e=k?.delay,t=typeof A.current==`object`?A.current.open:void 0,n=w;return ee&&(n=t===0?0:c??e??w),n}function U(e){let t=x.current;if(!t||!e)return!1;let n=gn(e);return n!==null&&n!==t&&ye(t,n)}function re(e){let t=U(e);return B.current=t,t&&(M.openChangeTimeout.clear(),M.restTimeout.clear(),M.restTimeoutPending=!1,V.clear()),t}let ie=d(b,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!te&&z!==`both`?l():null,restMs:ne,delay(){let e=typeof A.current==`object`?A.current.close:void 0,t=T;return f==null&&ee&&(t=e),{close:t}},triggerElementRef:x,isActiveTrigger:v,isClosing:()=>g.select(`transitionStatus`)===`ending`,shouldOpen(){return!B.current}}),ae=D(b,{enabled:!I}).reference,oe=e=>{let t=B.current,n=hn(e),r=re(n),i=x.current,a=i&&n&&ye(i,n);if(r&&g.select(`open`)&&g.select(`lastOpenChangeReason`)===`trigger-hover`){g.setOpen(!1,R(xe,e));return}if(t&&!r&&a&&!L.current&&!g.select(`open`)&&i&&me(H.current)){let t=()=>{!B.current&&!L.current&&!g.select(`open`)&&g.setOpen(!0,R(xe,e,i))},n=ne();n===0?(V.clear(),t()):V.start(n,t)}},se=g.useState(`triggerProps`,O);return F(`button`,e,{state:{open:y},ref:[t,E,x],props:[ie,ae,O||z!==`none`?se:void 0,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){U(hn(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){B.current=!1,V.clear(),H.current=void 0},onPointerEnter(e){H.current=e.pointerType},onPointerDown(e){H.current=e.pointerType,g.set(`closeOnClick`,u),u&&!g.select(`open`)&&g.cancelPendingOpen(e.nativeEvent)},onClick(e){u&&!g.select(`open`)&&g.cancelPendingOpen(e.nativeEvent)},id:_,[pn.triggerDisabled]:I?``:void 0,[mn]:I?void 0:``},m],stateAttributesMapping:N})}),vn=G.createContext(void 0);function yn(){let e=G.useContext(vn);if(e===void 0)throw Error(Oe(70));return e}var bn=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return an().useState(`mounted`)||n?(0,K.jsx)(vn.Provider,{value:n,children:(0,K.jsx)(Ze,{ref:t,...r})}):null}),xn=G.createContext(void 0);function Sn(){let e=G.useContext(xn);if(e===void 0)throw Error(Oe(71));return e}var Cn=G.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:s=`top`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=m,style:v,...y}=e,b=an(),x=yn(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`trackCursorAxis`),T=b.useState(`disableHoverablePopup`),E=b.useState(`floatingRootContext`),D=b.useState(`instantType`),O=b.useState(`transitionStatus`),k=b.useState(`hasViewport`),A=o({anchor:i,positionMethod:a,floatingRootContext:E,mounted:C,side:s,sideOffset:l,align:c,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:h,arrowPadding:p,disableAnchorTracking:g,keepMounted:x,collisionAvoidance:_,adaptiveOrigin:k?Ee:void 0}),j=G.useMemo(()=>({open:S,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:w===`none`?D:`tracking-cursor`}),[S,A.side,A.align,A.anchorHidden,w,D]),M=ee(e,j,{styles:A.positionerStyles,transitionStatus:O,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S||w===`both`||T});return(0,K.jsx)(xn.Provider,{value:A,children:M})}),wn={...de,...we},Tn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=an(),{side:c,align:l}=Sn(),u=o.useState(`open`),d=o.useState(`instantType`),f=o.useState(`transitionStatus`),p=o.useState(`popupProps`),m=o.useState(`floatingRootContext`),h=o.useState(`disabled`),g=o.useState(`closeDelay`);M({open:u,ref:o.context.popupRef,onComplete(){u&&o.context.onOpenChangeComplete?.(!0)}}),w(m,{enabled:!h,closeDelay:g});let _=o.useStateSetter(`popupElement`);return F(`div`,e,{state:{open:u,side:c,align:l,instant:d,transitionStatus:f},ref:[t,o.context.popupRef,_],props:[p,s(f),a],stateAttributesMapping:wn})}),En=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=G.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=G.useMemo(()=>({open:t,close:n}),[t,n]);return(0,K.jsx)(dn.Provider,{value:i,children:(0,K.jsx)(je,{delay:a,timeoutMs:r,children:e.children})})},Dn=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({}),On={activationDirection:e=>e?{"data-activation-direction":e}:null},kn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=an(),c=Sn(),l=s.useState(`instantType`),{children:u,state:d}=Ge({store:s,side:c.side,cssVars:Dn,children:a}),f={activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l};return F(`div`,e,{state:f,ref:t,props:[o,{children:u}],stateAttributesMapping:On})}),An=`wco`,jn=`electron`,Mn=`electron-windows`,Nn=52;function Pn(){return typeof navigator>`u`?null:navigator.windowControlsOverlay??null}function Fn(){if(typeof document>`u`)return()=>{};let e=Pn(),t=()=>{document.documentElement.classList.toggle(An,e!==null&&e.visible)};return t(),e?(e.addEventListener(`geometrychange`,t),()=>{e.removeEventListener(`geometrychange`,t)}):()=>{}}function In(e){let t=Pn();return t?.addEventListener(`geometrychange`,e),()=>t?.removeEventListener(`geometrychange`,e)}function Ln(){if(ke&&De(navigator.platform))return Nn;let e=Pn();return e?.visible?e.getTitlebarAreaRect().bottom:0}function Rn(){return(0,G.useSyncExternalStore)(In,Ln,zn)}function zn(){return 0}function Bn(e){return pe(e)?[jn,Mn]:[jn]}function Vn(e){if(typeof document>`u`)return()=>{};let t=Bn(e);return document.documentElement.classList.add(...t),()=>{document.documentElement.classList.remove(...t)}}var Hn=5,Un=En,Wn=(0,G.createContext)(null),Gn=(0,G.createContext)(null);function Kn(e){let t=(0,Ie.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({onScrollCapture:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=(0,G.useRef)(null),a;t[3]===n?a=t[4]:(a=e=>{n?.(e);let t=i.current;t&&!t.trigger.contains(t.trigger.ownerDocument.activeElement)&&(i.current=null,t.actionsRef.current?.close())},t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,K.jsx)(Gn,{value:i,children:(0,K.jsx)(`div`,{...r,onScrollCapture:a})}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function qn(e){let t=(0,G.use)(Gn),n=(0,G.useRef)(null),r=e.actionsRef??n;return(0,G.useEffect)(()=>()=>{t?.current?.actionsRef===r&&(t.current=null)},[r,t]),t?(0,K.jsx)(Wn,{value:r,children:(0,K.jsx)(ln,{...e,actionsRef:r,onOpenChange:(n,i)=>{e.onOpenChange?.(n,i),!n&&!i.isCanceled&&t.current?.actionsRef===r&&(t.current=null)}})}):(0,K.jsx)(ln,{...e})}function Jn(e){let t=(0,G.use)(Gn),n=(0,G.use)(Wn);return!t||!n?(0,K.jsx)(_n,{"data-slot":`tooltip-trigger`,...e}):(0,K.jsx)(_n,{"data-slot":`tooltip-trigger`,...e,onMouseEnter:r=>{e.onMouseEnter?.(r),t.current={trigger:r.currentTarget,actionsRef:n}}})}function Yn(e){let t=(0,Ie.c)(5),n=Hn+Rn(),r;t[0]===n?r=t[1]:(r={top:n,right:Hn,bottom:Hn,left:Hn},t[0]=n,t[1]=r);let i;return t[2]!==e||t[3]!==r?(i=(0,K.jsx)(Cn,{className:`pointer-events-none z-[140] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none`,collisionPadding:r,"data-slot":`tooltip-positioner`,...e}),t[2]=e,t[3]=r,t[4]=i):i=t[4],i}function Xn(e){let t=(0,Ie.c)(25),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({className:i,align:o,sideOffset:s,side:c,variant:l,anchor:n,children:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=o===void 0?`center`:o,d=s===void 0?4:s,f=c===void 0?`top`:c,p=l===void 0?`default`:l,m=p===`glass`?`dropdown-glass shadow-xl shadow-black/25 before:hidden`:p===`inverse`?`rounded-xl border border-foreground bg-foreground text-background shadow-md/10 before:hidden`:`border bg-popover not-dark:bg-clip-padding shadow-md/5`,h=p===`code`?`max-w-120 wrap-anywhere text-left font-mono text-[11px] leading-relaxed`:`max-w-80 wrap-anywhere whitespace-normal leading-snug`,g;t[9]!==i||t[10]!==m||t[11]!==h?(g=ve(`relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md text-popover-foreground text-xs transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,m,h,i),t[9]=i,t[10]=m,t[11]=h,t[12]=g):g=t[12];let _;t[13]===r?_=t[14]:(_=(0,K.jsx)(kn,{className:`relative size-full overflow-clip px-(--viewport-inline-padding) py-1 [--viewport-inline-padding:--spacing(2)] data-instant:transition-none **:data-current:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-ending-style:opacity-0 **:data-previous:data-starting-style:opacity-0 **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:truncate **:data-current:opacity-100 **:data-previous:opacity-100 **:data-current:transition-opacity **:data-previous:transition-opacity`,"data-slot":`tooltip-viewport`,children:r}),t[13]=r,t[14]=_);let v;t[15]!==a||t[16]!==g||t[17]!==_?(v=(0,K.jsx)(Tn,{className:g,"data-slot":`tooltip-popup`,...a,children:_}),t[15]=a,t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;return t[19]!==u||t[20]!==n||t[21]!==f||t[22]!==d||t[23]!==v?(y=(0,K.jsx)(bn,{children:(0,K.jsx)(Yn,{align:u,anchor:n,side:f,sideOffset:d,children:v})}),t[19]=u,t[20]=n,t[21]=f,t[22]=d,t[23]=v,t[24]=y):y=t[24],y}export{Jn as a,nn as c,Ge as d,Re as f,Kn as i,Ze as l,Xn as n,Vn as o,Un as r,Fn as s,qn as t,Xe as u};
2
- //# sourceMappingURL=tooltip-taOyJZax.js.map
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ax as n,Uo as r}from"./utils-DmfMX1v5.js";import{z as i}from"./runtime-BQJQC-Ny.js";var a=n(),o=e(t(),1);function s(e,t){let n=(0,a.c)(6),s=(0,o.useContext)(r),c=typeof t==`string`?t:t?.label??e.label,l=typeof t==`string`?!0:t?.reportFailure??!0,u=typeof t==`string`?!0:t?.reportDefect??!0,d;return n[0]!==e||n[1]!==c||n[2]!==s||n[3]!==u||n[4]!==l?(d=t=>i(s,e,t,{label:c,reportFailure:l,reportDefect:u}),n[0]=e,n[1]=c,n[2]=s,n[3]=u,n[4]=l,n[5]=d):d=n[5],d}export{s as t};
2
- //# sourceMappingURL=use-atom-command-CQHjSXPR.js.map
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{a as n}from"./useParams-BTKEXLBT.js";var r=e(t(),1);function i(e){let t=n();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}export{i as t};
2
- //# sourceMappingURL=useNavigate-4thj06GJ.js.map
@@ -1,2 +0,0 @@
1
- import{Ax as e,Ht as t,Nt as n,Vt as r}from"./utils-DmfMX1v5.js";import{E as i,i as a}from"./useSettings-CLtJrOYI.js";import{B as o}from"./settingsLayout-jP1a50ek.js";var s=e();function c(e,c){let l=(0,s.c)(5),{targets:u}=o(),{environments:d}=i(),f;return l[0]!==c||l[1]!==d||l[2]!==e||l[3]!==u?(f=(i,o)=>{let s=c.find(e=>e.instanceId===i);for(let c of u){let l=d.find(e=>e.environmentId===c.environmentId),u=l?.serverConfig;if(!u)continue;let f=r(t(u.providers),c.settings,c.projectId).find(e=>e.instanceId===i),p=n(a(c.settings,e),u.providers).get(i);if(!f?.enabled||!f.isAvailable||f.driverKind!==s?.driverKind||!p?.some(e=>e.slug===o&&!e.isUnavailable))return`This model is unavailable on ${l?.label??`a selected environment`}. Select that environment to choose its model separately.`}return null},l[0]=c,l[1]=d,l[2]=e,l[3]=u,l[4]=f):f=l[4],f}export{c as t};
2
- //# sourceMappingURL=useScopedModelAvailability-BEfh0WXx.js.map
@@ -1,3 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$h as n,Al as r,Ax as i,Bl as a,Fl as o,Gl as s,Hh as c,Ho as l,If as u,Ko as d,Mh as f,Mp as ee,Nb as p,Ol as te,Qb as m,Qh as ne,Ro as re,S_ as ie,Sl as ae,Th as oe,Tl as se,Uh as ce,Ul as le,Uo as ue,Wf as de,Wl as fe,Wm as pe,Wo as me,Xh as he,Yg as ge,Ym as _e,Zb as ve,_m as ye,al as be,b_ as xe,bh as Se,es as h,fh as Ce,fs as we,gs as Te,hm as Ee,hs as De,il as Oe,jb as g,jl as ke,js as Ae,kb as _,mh as je,mu as Me,ng as Ne,nx as Pe,pm as Fe,rh as Ie,sh as Le,sl as Re,tg as ze,vh as Be,vm as Ve,vs as He,wh as Ue,wl as We,yc as Ge,ym as Ke}from"./utils-DmfMX1v5.js";import{F as qe,L as Je,T as Ye,U as Xe,gt as v,kt as Ze,w as Qe,xn as $e}from"./runtime-BQJQC-Ny.js";import{Ct as et,T as tt,t as nt,yt as rt}from"./runtime-C6FwphD-.js";import{i as y}from"./toast-CjelgyqV.js";import{f as b,h as x,m as it,u as at}from"./server-BD_Y5Gsn.js";import{i as ot,n as st,s as ct,t as lt}from"./session-DsbInyNV.js";import{t as ut}from"./use-atom-command-CQHjSXPR.js";import{B as dt,C as ft,F as pt,N as mt,P as ht,V as gt,b as _t,c as vt,i as S,k as yt,l as bt,n as C,o as xt,r as St,v as Ct,w as wt,x as Tt}from"./themePalette-CAxv2FDZ.js";var w=e(t(),1),T=i();function Et(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function Dt(e){let t=me(t=>d(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=ve(De(n(e.stateAtom(t))),()=>$e);return{entry:r,connection:r.unsupportedReason===void 0?et(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(h(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:d(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return Et(n,i)||(n=i),n}).pipe(h(`environment-presentations`))}}function Ot(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:rt(t.entry)??``,isRelayManaged:Ze(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function kt(e){let t=d(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=m(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=d(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=m(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=me(t=>d(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=Ot(t,r),a=m(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=d(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=m(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(h(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:d(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=m(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:d(n=>{let r=new Map(n(t).map(t=>[t,Re(n(e.presentationAtom(t))?.serverConfig??null)])),i=m(n.self());return i!==null&&Et(i,r)?i:r}),pullRequestsSupportedAtom:d(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var E=Dt({catalogValueAtom:x.catalogValueAtom,stateAtom:x.stateAtom,serverConfigValueAtom:b.configValueAtom}),At=kt({catalogValueAtom:x.catalogValueAtom,presentationAtom:E.presentationAtom}),jt=d(null).pipe(h(`web-environment-presentation:empty`));function Mt(e){let t=(0,T.c)(5),n=l(x.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?jt:E.presentationAtom(e),t[0]=e,t[1]=r);let i=l(r),a;return t[2]!==n.isReady||t[3]!==i?(a={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=a):a=t[4],a}var Nt={status:`idle`},D=Nt,O=null,k=[],A=0,Pt=new Set;function j(e){D=e;for(let e of Pt)e()}function Ft(e){O?.resolve(e);for(let t of k)t.resolve(e);O=null,k=[]}function It(){return D}function Lt(e){return Pt.add(e),()=>{Pt.delete(e)}}function Rt(){A+=1;let e=!0;return()=>{e&&(e=!1,A=Math.max(0,A-1),A===0&&(Ft(!1),j(Nt)))}}function zt(e,t){if(A!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(O||D.status===`closing`){k.push(r);return}O=r,j({status:`confirming`,message:e,variant:r.variant})})}function Bt(){return D.status!==`idle`||O!==null||k.length>0}function Vt(e){if(D.status!==`confirming`||!O)return;let t=O;O=null,t.resolve(e),j({status:`closing`,message:D.message,variant:D.variant})}function Ht(){if(D.status!==`closing`)return;let e=k.shift();if(!e){j(Nt);return}O=e,j({status:`confirming`,message:e.message,variant:e.variant})}var Ut={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Wt(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return Ge(t)?`${n.map(e=>Ut[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Gt=`http://www.w3.org/2000/svg`,Kt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{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`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function qt(e,t){let n=Kt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Gt,`svg`);r.setAttribute(`xmlns`,Gt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Gt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function Jt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Yt(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var M=null;function Xt(){return M!==null}function Zt(){M?.(),M=null}function Qt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,M===c&&(M=null),document.removeEventListener(`keydown`,u),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`contextmenu`,f,!0);let t=Yt(document.activeElement,i);for(let e of i)e.remove();t&&r?.isConnected&&r.focus({preventScroll:!0}),n(e)},u=e=>{e.key===`Escape`&&(e.preventDefault(),l(null))},d=e=>{s&&!Yt(e.target,i)&&l(null)},f=e=>{s&&!Yt(e.target,i)&&(e.preventDefault(),l(null))},ee=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},p=(e,t,n,r,o)=>{ee(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let u=document.createElement(`div`);u.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,u.style.cssText=`max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;`;for(let t of e){if(t.separatorBefore===!0&&u.children.length>0){let e=document.createElement(`div`);e.className=`mx-2 my-1 h-px bg-border`,e.style.cssText=`height:1px;margin:0.25rem 0.5rem;background:var(--contrast-border);`,e.dataset.contextMenuSeparator=`true`,e.setAttribute(`role`,`separator`),u.appendChild(e)}if(t.header===!0){let e=document.createElement(`div`);e.className=`px-2 py-1.5 font-medium text-muted-foreground text-xs`,e.textContent=t.label,u.appendChild(e);continue}let e=Array.isArray(t.children)&&t.children.length>0,n=!e&&(t.destructive===!0||t.id===`delete`),a=document.createElement(`button`);a.type=`button`;let o=t.disabled===!0;a.disabled=o;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(a.className=o?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,a.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?qt(`check`,`neutral`):null;if(e)a.appendChild(e);else{let e=document.createElement(`span`);e.className=`size-4.5 shrink-0 sm:size-4`,e.style.cssText=`display:inline-block;width:1rem;height:1rem;flex-shrink:0;`,e.setAttribute(`aria-hidden`,`true`),a.appendChild(e)}}else if(typeof t.icon==`string`){let e=qt(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let d=document.createElement(`span`);if(d.className=`min-w-0 flex-1 truncate`,d.textContent=t.label,a.appendChild(d),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Wt(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,Ge(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=qt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;p(t.children,o,s,r+1,a),a.setAttribute(`aria-expanded`,`true`);let c=i[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&Jt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{ee(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}u.appendChild(a)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{ee(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{Jt(c,t,n)})};document.addEventListener(`keydown`,u),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`contextmenu`,f,!0),p(e,t?.x??0,t?.y??0,0),M&&M(),M=c,requestAnimationFrame(()=>{s=!0})})}var $t=`t3code:client-settings:v1`;function en(){return typeof window<`u`}function tn(){return en()?Te($t,ae):null}function nn(e){en()&&He($t,e,ae)}var rn;function an(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>zt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Qt(e,t),close:async()=>{window.desktopBridge||Zt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():tn(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);nn(e)}}}}function on(){return an()}function sn(){if(typeof window<`u`)return rn||(rn=on(),rn)}function cn(){let e=sn();if(!e)throw Error(`Local API not found`);return e}var N=`t3code:theme`,ln=`(prefers-color-scheme: dark)`,P={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function un(){return F()}function dn(){return typeof window>`u`?{}:fn()}function F(){if(typeof window>`u`)return null;try{return yt(window.localStorage.getItem(S))}catch{return null}}function fn(){try{let e=JSON.parse(window.localStorage.getItem(`t3code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function pn(e){return`${e?.light??``}|${e?.dark??``}`}var mn=`theme-color`,hn=`meta[name="${mn}"][data-dynamic-theme-color="true"]`,I=class extends Le()(`ThemeStorageError`,{operation:_e([`read`,`write`]),storageKey:Ie,theme:f(xt),cause:pe()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},gn=oe(I),_n=class extends Le()(`DesktopThemeSyncError`,{theme:xt,cause:pe()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},vn=oe(_n),L=[],R=null,yn=!0,bn=null,z=null,B=null;function V(){yn=!0;for(let e of L)e()}function xn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(ln).matches}function Sn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(St);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function Cn(e){return e===`light`||e===`dark`||e===`system`}function H(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(C);if(Cn(e))return e}catch{}return Sn(e)?`system`:_t(e)??`light`}function wn(e){if(typeof window<`u`)try{window.localStorage.setItem(C,e)}catch(e){throw new I({operation:`write`,storageKey:C,cause:e})}}function Tn(){if(typeof window>`u`)return P.theme;let e;try{e=window.localStorage.getItem(N)}catch(e){throw new I({operation:`read`,storageKey:N,cause:e})}return e!==null&&wt(e)?bt(e):P.theme}function En(e){if(typeof window<`u`)try{window.localStorage.setItem(N,e),B=null}catch(t){throw new I({operation:`write`,storageKey:N,theme:e,cause:t})}}function U(){if(B!==null)return P.theme;try{return Tn()}catch(e){let t=gn(e)?e:new I({operation:`read`,storageKey:N,cause:e});return B=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),P.theme}}function Dn(){let e=document.querySelector(hn);return e||(e=document.createElement(`meta`),e.name=mn,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function On(e){let t=e?.trim().toLowerCase();return!t||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0 0 0 / 0)`?null:e?.trim()??null}function kn(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function An(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?On(e.getPropertyValue(`--app-chrome-background`)):null,n=On(getComputedStyle(kn()).backgroundColor),r=On(getComputedStyle(document.body).backgroundColor),i=t??n??r;if(!i)return;document.documentElement.style.backgroundColor=i,document.body.style.backgroundColor=i;let a=document.querySelectorAll(`meta[name="${mn}"]`);if(a.length===0){Dn().setAttribute(`content`,i);return}for(let e of a)e.setAttribute(`content`,i)}function W(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=H(e),i=r===`system`,a=i?xn():!1,o=F();if(z?.theme===e&&z.systemDark===a&&z.followSystem===i&&z.appearanceMode===r&&pn(z.themeHalves)===pn(o)){Mn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=ht(e,a,i,r,o);vt(pt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),z={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},An(),Mn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function jn(e,t,n,r,i=F()){try{await e.setTheme(mt(t,n,r,i))}catch(e){throw new _n({theme:t,cause:e})}}function Mn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=F(),a=mt(e,t,n,i);r&&typeof r.setTheme==`function`&&bn!==a&&(bn=a,jn(r,e,t,n,i).catch(t=>{let n=vn(t)?t:new _n({theme:e,cause:t});console.error(n.message,{theme:n.theme,...v(n)}),bn===a&&(bn=null)}))}typeof document<`u`&&typeof window<`u`&&W(U());function Nn(){if(typeof window>`u`)return P;if(!yn&&R)return R;yn=!1;let e=U(),t=H(e),n=t===`system`,r=n?xn():!1,i=F(),a=ht(e,r,n,t,i);return R&&R.theme===e&&R.resolvedTheme===a&&R.systemDark===r&&R.followSystem===n&&R.appearanceMode===t&&pn(R.themeHalves)===pn(i)||(R={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),R}function Pn(){return P}function Fn(){let e=U();H(e)===`system`&&W(e,{suppressTransitions:!0}),V()}function In(e){e.key===N?(B=null,W(U(),{suppressTransitions:!0}),V()):e.key===`t3code:theme-follow-system`||e.key===`t3code:theme-appearance-mode`||e.key===`t3code:theme-halves:v1`?(W(U(),{suppressTransitions:!0}),V()):(e.key===`t3code:themes:v1`||e.key===null)&&(e.key===null&&(B=null),ft(),z=null,W(U(),{suppressTransitions:!0}),V())}var Ln=null;function Rn(e){if(typeof window>`u`)return()=>{};if(L.push(e),!Ln){let e=typeof window.matchMedia==`function`?window.matchMedia(ln):null;e?.addEventListener(`change`,Fn),window.addEventListener(`storage`,In),Ln=()=>{e?.removeEventListener(`change`,Fn),window.removeEventListener(`storage`,In)}}return()=>{L=L.filter(t=>t!==e),L.length===0&&(Ln?.(),Ln=null)}}function zn(){let e=(0,w.useSyncExternalStore)(Rn,Nn,Pn),{theme:t,resolvedTheme:n}=e,r=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{wn(H(U()));let t=window.localStorage.getItem(S);window.localStorage.removeItem(S);try{En(e)}catch(e){if(t!==null)try{window.localStorage.setItem(S,t)}catch{}throw e}}catch(t){let n=gn(t)?t:new I({operation:`write`,storageKey:N,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...v(n)}),!1}return W(e,{suppressTransitions:!0}),V(),!0},[]),i=(0,w.useCallback)(e=>{if(typeof window>`u`)return!1;try{wn(e)}catch(e){let t=gn(e)?e:new I({operation:`write`,storageKey:C,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return B=null,W(U(),{suppressTransitions:!0}),V(),!0},[]),a=(0,w.useCallback)(e=>{let n=H(t),r=e?`system`:n===`system`?_t(t)??`light`:n;return i(r)},[i,t]),o=(0,w.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...fn()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(S):window.localStorage.setItem(S,JSON.stringify(n))}catch(e){let t=new I({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return W(U(),{suppressTransitions:!0}),V(),!0},[]),s=(0,w.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(S)}catch(e){let t=new I({operation:`write`,storageKey:S,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...v(t)}),!1}return W(U(),{suppressTransitions:!0}),V(),!0},[]),c=(0,w.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(z=null,W(U(),{suppressTransitions:!0,preservePreview:e}),V())},[]);return(0,w.useEffect)(()=>{W(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var Bn=je(Ue(Ce)),Vn=Ne(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\n]*/g,(e,t)=>t?e:``);return t=t.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g,(e,t)=>t?e:``),t=t.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g,(e,t,n)=>t?e:n??``),Bn(t).pipe(ie(e=>e.issue))}),Hn=new he(Vn,ze());n().pipe(ne(ze({space:2})));var Un=e=>Ie.pipe(Be(e,Hn)),Wn={performance:{profile:`performance`,automaticGitFetchInterval:g(15),providerHealthRefreshInterval:_(1),hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:_(2),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:We,providerHealthRefreshInterval:r,hostPowerMonitorActiveInterval:g(30),hostPowerMonitorIdleInterval:_(5),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:g(0),providerHealthRefreshInterval:_(15),hostPowerMonitorActiveInterval:_(1),hostPowerMonitorIdleInterval:_(10),idleClientTtl:g(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function G(e){return Wn[e]}function K(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Gn(e){let t=K(e),n=Wn[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function q(e,t){return p(e)===p(t)}function Kn(e,t){return q(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&q(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&q(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&q(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&q(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function qn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Gn(e),n=[K(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(Kn(t,Wn[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=K(e),i=Wn[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...q(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...q(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...q(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...q(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...q(t.idleClientTtl,i.idleClientTtl)?{}:{idleClientTtl:t.idleClientTtl},...t.pauseWhenHostLocked===i.pauseWhenHostLocked?{}:{pauseWhenHostLocked:t.pauseWhenHostLocked},...t.pauseWhenHostLowPower===i.pauseWhenHostLowPower?{}:{pauseWhenHostLowPower:t.pauseWhenHostLowPower},...t.pauseWhenClientLowPower===i.pauseWhenClientLowPower?{}:{pauseWhenClientLowPower:t.pauseWhenClientLowPower},...t.pauseWhenOnBattery===i.pauseWhenOnBattery?{}:{pauseWhenOnBattery:t.pauseWhenOnBattery}}}}function Jn(e){let t={schemaVersion:1,profile:se,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,i=e.backgroundActivityProfile,a=i!==`balanced`||p(e.automaticGitFetchInterval)!==p(We)||p(e.providerHealthRefreshInterval)!==p(r);return Gn(n&&a?{schemaVersion:1,profile:p(e.automaticGitFetchInterval)===p(G(i).automaticGitFetchInterval)&&p(e.providerHealthRefreshInterval)===p(G(i).providerHealthRefreshInterval)?i:`custom`,baseProfile:i,overrides:{...p(e.automaticGitFetchInterval)===p(G(i).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...p(e.providerHealthRefreshInterval)===p(G(i).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Yn(e){let t=Jn(e);return qn({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}})}var Xn=Un(o);Se(Xn);function Zn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?a(t.instanceId):s(n)}var Qn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>ye.make(e));function $n(e,t,n){let r=[...Qn.map(e=>[Ke(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Qn.includes(t.driver)?[[Ve.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(r===void 0)return null;let[i,a]=r,o=n?.defaultModelSelection,s=e[i]?.config;return o?.instanceId===i&&Ae(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:Ee[a]??Fe[a]??`gpt-6-luna`}}function er(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!fe(e,n,r.instanceId))return e.textGenerationModelSelection;if(t===void 0)return r;let i=t.find(e=>e.instanceId===r.instanceId);return i?.enabled===!0&&Oe(i)&&be(i)?r:e.textGenerationModelSelection}function tr(e,t,n){let r=e.reviewGuideModelSelection;if(r&&fe(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&Oe(e)&&be(e))return r}return er(e,t,n)}function nr(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function rr(e,t){let n=e.favorites===null&&(t.favorites?.length??0)>0?t.favorites:void 0,r=e.providerModelPreferences===null&&Object.keys(t.providerModelPreferences??{}).length>0?t.providerModelPreferences:void 0;return n===void 0&&r===void 0?null:{migrateModelPreferences:{...n===void 0?{}:{favorites:n},...r===void 0?{}:{providerModelPreferences:r}}}}var ir=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function ar(e){let t={},n={};for(let[r,i]of Object.entries(e))ir.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function or(e,t,n,r=n,i=!1){let a=e.textGenerationModelSelection?.instanceId??r?.textGenerationModelSelection.instanceId;return!i&&e.textGenerationModelSelection&&(!n||a!==void 0&&(r?.providerInstances[a]?.driver??a)!==(n.providerInstances[a]?.driver??a)||!Zn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=ce(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:ce(e,[`continueThreadsAfterServerUpdate`])}function sr(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}function cr(e){let t=e.atom(ee(Ye.pipe(xe(e=>Me(e.state)))),{initialValue:Qe});return{stateAtom:t,stateValueAtom:d(e=>ve(De(e(t)),()=>Qe)).pipe(h(`relay-environment-discovery-value`)),refresh:qe(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>Ye.pipe(ge(e=>e.refresh))})}}var lr=cr(nt);function ur(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:rt(t.entry),relayManaged:Ze(t.entry)}}function dr(){let e=(0,T.c)(7),t=l(x.catalogValueAtom),n=l(x.networkStatusValueAtom),r=l(E.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(fr),e[0]=r,e[1]=i);let a=i,o;return e[2]!==t.isReady||e[3]!==a||e[4]!==n||e[5]!==r?(o={isReady:t.isReady,networkStatus:n,environments:a,presentationById:r},e[2]=t.isReady,e[3]=a,e[4]=n,e[5]=r,e[6]=o):o=e[6],o}function fr(e){let[t,n]=e;return ur(t,n)}function pr(){return l(it)}function mr(e){let t=(0,T.c)(3),{presentation:n}=Mt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:ur(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function J(){return mr(pr())}function hr(e){let t=(0,T.c)(2),n=ct(e),r;return t[0]===n?r=t[1]:(r=Pe(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function gr(){return l(lr.stateValueAtom)}function _r(){return l(At.environmentIdsAtom)}function vr(){return l(At.identitiesAtom)}function yr(){return l(At.pullRequestsSupportedAtom)}var br=`[CLIENT_SETTINGS]`,xr=new Set,Sr=new Set,Cr=te,Y=`pending`,X=null,wr=0,Tr=Promise.resolve(),Er=0;function Dr(){for(let e of xr)e()}function Or(){for(let e of Sr)e()}function Z(){return Cr}function kr(e){Cr=e,Dr()}function Ar(e){Y!==e&&(Y=e,Or())}function jr(e){return xr.add(e),Q().catch(()=>void 0),()=>{xr.delete(e)}}function Mr(){return Y===`ready`}function Nr(){return Y}function Pr(e){return Sr.add(e),Q().catch(()=>void 0),()=>{Sr.delete(e)}}async function Q(){if(Y===`ready`)return;if(X)return X;let e=wr;Ar(Y===`failed`||Y===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await cn().persistence.getClientSettings();if(e!==wr)return;t&&kr({...te,...t}),Ar(`ready`)}catch(t){throw e===wr&&Ar(`failed`),console.error(`${br} hydrate failed`,{operation:`hydrate`,...v(t)}),t}})().finally(()=>{X===t&&(X=null)});return X=t,X}var Fr=e=>cn().persistence.setClientSettings(e);function Ir(e){let t=Tr.then(e);return Tr=t.then(()=>void 0,()=>void 0),t}function Lr(e,t=Fr){let n=Y!==`ready`||Er>0;return n?Er+=1:kr({...Z(),...e}),Ir(async()=>{if(n)try{Y!==`ready`&&await Q(),kr({...Z(),...e})}finally{--Er}await t(Z())}).catch(e=>{console.error(`${br} persist failed`,{operation:`persist`,...v(e)})})}async function Rr(e,t=Fr){return Ir(async()=>{for(Y!==`ready`&&await Q();;){let n=Z(),r=e(n);if(await t(r),Z()===n)return kr(r),r}})}var zr=new Set(c(o.fields));function Br(e){let t={},n={};for(let[r,i]of Object.entries(e))zr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Vr(){return Z()}function Hr(){return Q()}function Ur(){return(0,w.useSyncExternalStore)(Pr,Mr,Wr)}function Wr(){return!1}function Gr(){return(0,w.useSyncExternalStore)(Pr,Nr,Kr)}function Kr(){return`pending`}function $(){return(0,w.useSyncExternalStore)(jr,Z,qr)}function qr(){return te}function Jr(e,t){return{...t,...e,...nr(e,t)}}var Yr=new Set;function Xr(e,t){let n=(0,T.c)(8),r=$(),i=Ur(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=ut(b.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Yr.has(e))return;let n=rr(t,r);n&&(Yr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Yr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,w.useEffect)(s,c)}function Zr(e,t){let n=(0,T.c)(6),r=$(),i;n[0]!==r||n[1]!==e?(i=Jr(e,r),n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i,o;return n[3]!==a||n[4]!==t?(o=t?t(a):a,n[3]=a,n[4]=t,n[5]=o):o=n[5],o}function Qr(e){let t=(0,T.c)(3),n=$(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function $r(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function ei(){let e=(0,T.c)(7),t=Ur(),n=$().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=zn(),o=(0,w.useSyncExternalStore)(dt,Tt,ti),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=pt(i,a,r),l=Ct(c);s=$r({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??gt(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function ti(){return null}async function ni(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Hr(),{...rr(e,Vr()),...t}}function ri(e){let t=(0,T.c)(6),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):ai,t[0]=e,t[1]=n);let r=l(n),i=ut(b.updateSettings,`model preferences update`),a;return t[2]!==e||t[3]!==i||t[4]!==r?(a=async t=>{if(!e||!r)return;let n;try{n=await ni(r,t)}catch{y.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=a):a=t[5],a}function ii(e){let t=(0,w.use)(ue),n=(0,w.useRef)(new Map),r=ri(e);return(0,w.useCallback)(async(i,a)=>{if(!e)return;let o=b.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Hr()}catch{y.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=nr(c,Vr()).favorites,u=JSON.stringify([e,i,a]),d=n.current.get(u),f={favorite:!(d&&(d.pending||d.settings.favorites===c.favorites)?d.favorite:l.some(e=>e.provider===i&&e.model===a)),settings:c,pending:!0};n.current.set(u,f);try{let e=await r({setModelFavorites:[{provider:i,model:a,favorite:f.favorite}]});e&&we(e)&&t.get(o)?.favorites===c.favorites&&(f.pending=!1)}finally{f.pending&&n.current.get(u)===f&&(d&&!d.pending&&t.get(o)?.favorites===d.settings.favorites?n.current.set(u,d):n.current.delete(u))}},[e,t,r])}var ai=d(null);function oi(e){let t=(0,T.c)(5),n;t[0]===e?n=t[1]:(n=e?b.settingsValueAtom(e):ai,t[0]=e,t[1]=n);let r=l(n),i=$();Xr(e,r);let a=r??ke,o;return t[2]!==i||t[3]!==a?(o=nr(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function si(e,t){let n=(0,T.c)(2),r;n[0]===e?r=n[1]:(r=b.settingsValueAtom(e),n[0]=e,n[1]=r);let i=l(r);return Xr(e,i),Zr(i??ke,t)}function ci(e){let t=(0,T.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=ut(b.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function li(e){let t=J(),n=l(at);return Xr(t?.environmentId??null,t?.serverConfig?.settings??null),Zr(n,e)}var ui=`This setting is saved on a server, and the hosted app is not anchored to one. Change it from the desktop app or from the server's own address.`;function di(){let e=(0,T.c)(2),t=J(),n;return e[0]===t?n=e[1]:(n=t!==null||!tt(),e[0]=t,e[1]=n),n}function fi(e){let t=(0,T.c)(3),n=e!==void 0&&e,{environments:r}=dr(),i;return t[0]!==r||t[1]!==n?(i=d(e=>r.filter(sr).flatMap(t=>{let r=e(lt.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:m(De(r));return i!==null&&de(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],l(i)}function pi(e){let t=(0,T.c)(10);ot(e,u);let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={label:`server settings update`,reportFailure:!1},t[0]=n):n=t[0];let r=ut(b.updateSettings,n),{environments:i}=dr(),a;t[1]!==i||t[2]!==r?(a=async e=>{let t=await r(e);if(t._tag===`Failure`&&!Je(t)){let n=i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Xe(t);y.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${n}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return t},t[1]=i,t[2]=r,t[3]=a):a=t[3];let o=a,s=fi(!0),c;return t[4]!==e||t[5]!==i||t[6]!==r||t[7]!==o||t[8]!==s?(c=t=>{let{serverPatch:n,clientPatch:a}=Br(t),c=e===null||le(n).every(t=>st(e,t));if(Object.keys(n).length>0&&!c&&y.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${i.find(t=>t.environmentId===e)?.label??`the selected environment`}.`}),Object.keys(n).length>0&&c){let{sharedPatch:t,localPatch:a}=ar(n),c=vi;if(Object.keys(a).length>0&&(e?o({environmentId:e,input:{patch:a}}):c()),Object.keys(t).length>0){let n=i.find(t=>t.environmentId===e)?.serverConfig?.settings,a=new Set(s);e&&a.add(e);let o=[],l=[];for(let r of a){let a=i.find(e=>e.environmentId===r),s=or(t,a?.serverConfig?.environment.capabilities,a?.serverConfig?.settings,n,r===e);if(Object.keys(s).length!==0){if(re.get(lt.sessionStateAtom(r))._tag!==`Initial`&&!le(t).every(e=>st(r,e))){l.push(a?.label??r);continue}o.push({environmentId:r,input:{patch:s}})}}o.length===0?c(l.length>0?`This connection lacks permission to change settings on ${l.join(`, `)}.`:a.size>0?`Update older servers to save this setting.`:void 0):Promise.all(o.map(async e=>({label:i.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await r(e)}))).then(mi)}}Object.keys(a).length>0&&Lr(a)},t[4]=e,t[5]=i,t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function mi(e){let t=e.flatMap(_i);if(t.length===0)return;let n=e.filter(gi).map(hi);y.add({type:`error`,title:n.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...n.length>0?[`Saved on ${n.join(`, `)}.`]:[]].join(`
2
- `)})}function hi(e){let{label:t}=e;return t}function gi(e){let{result:t}=e;return t._tag===`Success`}function _i(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Je(n))return[];let r=Xe(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function vi(e){let t=e===void 0?ui:e;return y.add({type:`warning`,title:`Setting not saved`,description:t})}function yi(e){return pi(e)}function bi(){return pi(J()?.environmentId??null)}function xi(){return Si}function Si(e){return Lr(e)}export{Rt as $,gr as A,Un as B,hr as C,J as D,dr as E,K as F,An as G,un as H,G as I,sn as J,zn as K,qn as L,$n as M,tr as N,pr as O,er as P,It as Q,Yn as R,mr as S,_r as T,dn as U,H as V,Tn as W,Ht as X,Xt as Y,Bt as Z,ii as _,Lr as a,yi as b,Ur as c,oi as d,zt as et,si as f,di as g,li as h,Jr as i,Mt as it,lr as j,yr as k,Gr as l,ci as m,Hr as n,Lt as nt,Rr as o,Xr as p,cn as q,Vr as r,E as rt,Qr as s,ui as t,Vt as tt,ei as u,xi as v,vr as w,bi as x,ri as y,Jn as z};
3
- //# sourceMappingURL=useSettings-CLtJrOYI.js.map
@@ -1,2 +0,0 @@
1
- import{$y as e,Av as t,Ax as n,Cg as r,E_ as i,Ef as a,Go as o,Hg as s,Jy as c,Ko as l,Mv as u,Nv as d,Og as ee,Pg as f,Qg as p,Sv as m,Tg as h,Wf as g,Wo as _,Yg as te,Zb as v,ax as y,c_ as b,es as x,jv as ne,kc as S,lv as C,ov as w,v_ as T,wg as E,wv as D,yv as O}from"./utils-DmfMX1v5.js";import{Kt as k,M as A,O as j,gt as M}from"./runtime-BQJQC-Ny.js";import{$ as N,Q as P,Y as F,et as I,rt as L,tt as R}from"./entities-82m-Smm-.js";import{t as z}from"./runtime-C6FwphD-.js";import{it as re}from"./useSettings-CLtJrOYI.js";import{t as B}from"./session-DsbInyNV.js";import{n as V}from"./query-DpwJQzeq.js";var H=n(),U=`~effect/PartitionedSemaphore`,W=n=>{let r=Math.max(0,n.permits);if(!Number.isFinite(r))return{[U]:U,capacity:r,available:w(r),take:()=>m,release:()=>w(r),withPermits:()=>e=>e,withPermit:()=>e=>e,withPermitsIfAvailable:()=>e=>h(e)};let a=r,o=0,l=t(),f=l[Symbol.iterator](),p=!1,g=0,_=e=>{if(e>0&&(g+=e),!p){p=!0;try{for(;g>0&&o>0;){let e=f.next();if(e.done&&(f=l[Symbol.iterator](),e=f.next(),e.done))break;let t=e.value[1].values().next().value;t!==void 0&&(--t.permits,--o,--g,t.permits===0&&t.resume())}}finally{p=!1}}return o===0&&(a=Math.min(r,a+g),g=0),a},b=(t,n)=>n<=0?m:r<n?i:D(r=>a>=n?(a-=n,e(r,e=>{c(e)&&_(n)}),m):ee(e=>{if(a>=n){e(b(t,n));return}let r=n-a;a>0&&(a=0),o+=r;let i=v(ne(l,t),()=>{let e=new Set;return d(l,t,e),e}),s={permits:r,resume:()=>{c(),e(m)}},c=()=>{i.delete(s)&&i.size===0&&u(l,t)};return i.add(s),C(()=>{c(),o-=s.permits,_(n-s.permits)})})),x=(e,t)=>n=>{if(t<=0)return n;let r=b(e,t);return O(e=>te(e(r),()=>s(e(n),C(()=>{_(t)}))))},S=e=>e<=0?!0:r<e||a<e?!1:(a-=e,!0);return{[U]:U,capacity:r,available:C(()=>a),take:b,release:e=>C(()=>_(e)),withPermits:x,withPermit:e=>x(e,1),withPermitsIfAvailable:t=>n=>t<=0?h(n):D(r=>S(t)?(e(r,()=>{_(t)}),h(n)):w(y()))}};function G(e){if(e.sessionError!==null)return{canReadFiles:!1,isPending:!1,error:e.sessionError};if(e.session===null){let t=!e.isCatalogReady||e.connection?.phase===`connected`||e.connection?.phase===`connecting`||e.connection?.phase===`reconnecting`;return{canReadFiles:!1,isPending:t,error:t?null:e.connection?.error??`This environment is not connected.`}}return{canReadFiles:g(e.session,a),isPending:!1,error:null}}function K(e,t=``,n=!0){let r=n&&L(e,t),i=r?P(e):``;return{isBrowsing:r,directoryPath:i,filterQuery:r&&!R(e)?N(e):``,parentPath:r?I(i):null,canBrowseUp:r&&F(i)}}function q(e,t){let n=t.toLowerCase(),r=t.startsWith(`.`),i=e.filter(e=>e.name.toLowerCase().startsWith(n)&&(r||!e.name.startsWith(`.`)));return{visibleEntries:i,exactEntry:t.length>0?i.find(e=>e.name===t)??null:null}}function J(){let e=0;return{invalidate:()=>{e+=1},run:async(t,n)=>{let r=++e;return await t(),r===e&&(n(),!0)}}}function Y(e){return e===`connected`}function X(e){return{browse:A(e,{label:`environment-data:filesystem:browse`,tag:S.filesystemBrowse})}}var ie=X(z);function ae(e){let t=(0,H.c)(7),n;t[0]===e?n=t[1]:(n=e===null?null:B.sessionStateAtom(e),t[0]=e,t[1]=n);let r=V(n),i=re(e),a=i.presentation?.connection??null,o;return t[2]!==i.isReady||t[3]!==r.data||t[4]!==r.error||t[5]!==a?(o=G({isCatalogReady:i.isReady,connection:a,session:r.data,sessionError:r.error}),t[2]=i.isReady,t[3]=r.data,t[4]=r.error,t[5]=a,t[6]=o):o=t[6],o}var oe=j(),se={mode:`serial`,key:({environmentId:e,input:t})=>JSON.stringify([e,t.cwd])},ce=_(e=>l({revision:0,persistedCacheReadable:!0}).pipe(o,x(`environment-data:vcs:list-refs-state:${e}`))),Z=W({permits:1});function Q(e){return ce(e.environmentId)}function le(e,t,n){e.update(Q(t),e=>({revision:e.revision+1,persistedCacheReadable:n??e.persistedCacheReadable}))}function $(e,t){return Z.withPermit(e)(t)}var ue=p(`VcsRefsState.invalidateCached`)(function*(e,t){let n=yield*k;yield*$(t.environmentId,b(function*(){le(e,t,yield*n.clearVcsRefs(t.environmentId).pipe(E(!0),f(e=>T(`Could not remove invalidated cached Git refs.`).pipe(r({environmentId:t.environmentId,cwd:t.cwd,...M(e)}),E(!1)))))}))});export{oe as a,Y as c,K as d,se as i,J as l,Q as n,ie as o,$ as r,ae as s,ue as t,q as u};
2
- //# sourceMappingURL=vcsRefInvalidation-nP-qgsHs.js.map