decocms 4.2.0 → 4.3.0

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 (227) hide show
  1. package/dist/client/assets/{AlertCircle-HztvGgEK.js → AlertCircle-DC-zDzV-.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CD45Pqa3.js → ArrowUpRight-OJZisFPQ.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-B93tZkib.js → CheckCircle-Cgnheu-R.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BHp2n33E.js → ChevronDown-DyHvxYlc.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-CkLGnzyI.js → ChevronLeft-dyRjFCmp.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-HkVZWjVD.js → ChevronRight-Cpfh3gza.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DLoyITzq.js → ChevronUp-DBpw6M-L.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-DBVnta3o.js → DotsVertical-5jSu3d1f.js} +1 -1
  9. package/dist/client/assets/{Eye-BuXBYPNx.js → Eye-bojNLUjA.js} +1 -1
  10. package/dist/client/assets/{FilterLines-JdWf41nd.js → FilterLines-CFl65nng.js} +1 -1
  11. package/dist/client/assets/{Globe01-DbyYsbkQ.js → Globe01-CyfpzbeQ.js} +1 -1
  12. package/dist/client/assets/{Globe04-ht6-fzwU.js → Globe04-DFpdKSRI.js} +1 -1
  13. package/dist/client/assets/{HardDrive-QsbiOkra.js → HardDrive-B1mtnaeA.js} +1 -1
  14. package/dist/client/assets/{Key01-B-rzooWI.js → Key01-CwrJlZo0.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-CvZZnjM_.js → LayoutLeft-fsm0LcB8.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-C75h4nTA.js → LinkExternal01-BHwVyDja.js} +1 -1
  17. package/dist/client/assets/{Monitor01-C751a6VH.js → Monitor01-ChA6ov2I.js} +1 -1
  18. package/dist/client/assets/{Palette-Cw4TmFXF.js → Palette-DusYqL0W.js} +1 -1
  19. package/dist/client/assets/{Play-BaPiITj6.js → Play-CnXG8qqP.js} +1 -1
  20. package/dist/client/assets/{Plus-cqzweyhV.js → Plus-eGxBB1d8.js} +1 -1
  21. package/dist/client/assets/{SearchLg-BgcbIGrG.js → SearchLg-CDpA_lbT.js} +1 -1
  22. package/dist/client/assets/{SearchMd-B_E38g9S.js → SearchMd-ujiTPCmg.js} +1 -1
  23. package/dist/client/assets/{Settings02-HJQMPAnK.js → Settings02-BcAnTzm5.js} +1 -1
  24. package/dist/client/assets/{Shield01-CYOeouzJ.js → Shield01-ZxmFmrvL.js} +1 -1
  25. package/dist/client/assets/{Star01-BLuwEqBm.js → Star01-DHEkWySe.js} +1 -1
  26. package/dist/client/assets/{Stars01-bmKEIBXR.js → Stars01-BdCaKqhF.js} +1 -1
  27. package/dist/client/assets/{Stars02-CO1akjaP.js → Stars02-qnq-_X9g.js} +1 -1
  28. package/dist/client/assets/{Sun-DGf33qzc.js → Sun-lTiqxOzH.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CtPAye2M.js → SwitchHorizontal01-DAZXInW8.js} +1 -1
  30. package/dist/client/assets/{Tool01-Dc5WA1H4.js → Tool01-CvnpFI53.js} +1 -1
  31. package/dist/client/assets/{Trash01-Dn19EDIc.js → Trash01-ByxlxTiZ.js} +1 -1
  32. package/dist/client/assets/{Upload01-AmIm4zQN.js → Upload01-Z77n1bV8.js} +1 -1
  33. package/dist/client/assets/{User01-CYnD1B0h.js → User01-COQtf360.js} +1 -1
  34. package/dist/client/assets/{Users01-B3f8K1I8.js → Users01-wtRJYQKX.js} +1 -1
  35. package/dist/client/assets/{Users03-B7auzTEh.js → Users03-DknrDMtT.js} +1 -1
  36. package/dist/client/assets/{X-BJ5AK9_B.js → X-DrMVHLcw.js} +1 -1
  37. package/dist/client/assets/{XCircle-BEhXc7sQ.js → XCircle-Ct0eqqsw.js} +1 -1
  38. package/dist/client/assets/{XClose-BaODJMh0.js → XClose-BaZ908gw.js} +1 -1
  39. package/dist/client/assets/{Zap-CDSogr5w.js → Zap-wRIFSWIq.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-CmmJkOPb.js → ZapSquare-PMiGcZpW.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-9WiOjKDc.js → ZoomOut-6ix2H92j.js} +1 -1
  42. package/dist/client/assets/{access-gate-Bwf2CoM1.js → access-gate-D6dGDGRI.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-CmQEBOgZ.js → add-section-modal-DOhGqRCL.js} +1 -1
  44. package/dist/client/assets/{agent-icon-Ba-0ZYgG.js → agent-icon-oDx9Z_Be.js} +1 -1
  45. package/dist/client/assets/{agents-list-D5VkOHIG.js → agents-list-BgSM_QG_.js} +1 -1
  46. package/dist/client/assets/{ai-providers-CZ5SMOKO.js → ai-providers-Crp7kidL.js} +1 -1
  47. package/dist/client/assets/{alert-nxT5lZho.js → alert-CKj_5smu.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-Bqe6OAIL.js → alert-dialog-CYizItFp.js} +2 -2
  49. package/dist/client/assets/app-editor-Xoia35dq.js +1 -0
  50. package/dist/client/assets/{auth-CqOhN4mO.js → auth-Bej0Tx2Y.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-CNFrjBAq.js → auth-catchall-CmNVpp-8.js} +1 -1
  52. package/dist/client/assets/{auth-entry-DPV3aDXY.js → auth-entry-PwLVm-jX.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-Dp0-2xO6.js → auth-split-layout-5YwPgbAb.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-BkWGH7gY.js → authenticate-and-persist-oauth-DoPUB_Bh.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-CjVzmIPj.js → automation-list-row-CsTyBm4M.js} +1 -1
  56. package/dist/client/assets/{automation-runs-DIDLqvYF.js → automation-runs-B-dNDEWH.js} +1 -1
  57. package/dist/client/assets/{automations-DEtrS6hH.js → automations-D395202A.js} +1 -1
  58. package/dist/client/assets/{avatar-DUFWGs9Z.js → avatar-CJP1BOq4.js} +1 -1
  59. package/dist/client/assets/{badge-ULvYE549.js → badge-DhpSM7g_.js} +1 -1
  60. package/dist/client/assets/{block-document-Cl3urvMb.js → block-document-B2vhG8Ii.js} +1 -1
  61. package/dist/client/assets/{brand-context-DU7I0d5o.js → brand-context-BRpHgxfT.js} +1 -1
  62. package/dist/client/assets/{buckets-4u7bKclV.js → buckets-DDR0G33f.js} +1 -1
  63. package/dist/client/assets/{bulk-category-panel-Bqpqm_Qj.js → bulk-category-panel-CM1bMunr.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-Xikv63T6.js → capability-load-error-CCgNL5xi.js} +1 -1
  65. package/dist/client/assets/{card-DuZccs_2.js → card-BFb5m83e.js} +1 -1
  66. package/dist/client/assets/category-editor-2T4Y_ABL.js +1 -0
  67. package/dist/client/assets/{chat-context-Ba1J4Wbr.js → chat-context-n9syhvq-.js} +4 -4
  68. package/dist/client/assets/{checkbox-CZumSc8B.js → checkbox-DmOzmKLP.js} +1 -1
  69. package/dist/client/assets/{cli-auth-success-Ca86Sm5z.js → cli-auth-success-BVPtMYcv.js} +1 -1
  70. package/dist/client/assets/{collection-detail-2DizOat2.js → collection-detail-BQKV3UU7.js} +1 -1
  71. package/dist/client/assets/{collection-display-button-DTaFqStv.js → collection-display-button-Bf9dlJRy.js} +1 -1
  72. package/dist/client/assets/{collection-search-D2jsOcE8.js → collection-search-8iNXnGlM.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-BlI5WHJs.js → collection-tabs-KA2be3wH.js} +1 -1
  74. package/dist/client/assets/{command-ClUS1KMM.js → command-C34397s2.js} +1 -1
  75. package/dist/client/assets/{commerce-onboarding-C9kK24Mf.js → commerce-onboarding-D2H83R0U.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-DPJKYCn-.js → connect-desktop-dialog-Brra3cMC.js} +1 -1
  77. package/dist/client/assets/{connection-card-CEtBve6r.js → connection-card-C6NYo4Gp.js} +1 -1
  78. package/dist/client/assets/{connection-detail-dUoqAHFY.js → connection-detail-gJ5ITUXe.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-DtWH2w6r.js → connection-form-helpers-CwZx7WkC.js} +1 -1
  80. package/dist/client/assets/{connections-SZjaegFI.js → connections-CicrEJbU.js} +1 -1
  81. package/dist/client/assets/{context-menu-VSlW1NY7.js → context-menu-BW_OZBmV.js} +1 -1
  82. package/dist/client/assets/{decopilot-Y0nnLngo.js → decopilot-BItqS11w.js} +1 -1
  83. package/dist/client/assets/{decopilot-sse-pool-BR9ewfWR.js → decopilot-sse-pool-CvYk1hkc.js} +1 -1
  84. package/dist/client/assets/{dialog-onqVrhoh.js → dialog-BAqFyO8a.js} +1 -1
  85. package/dist/client/assets/{domain-settings-D6CfPi24.js → domain-settings-r_E3rHsG.js} +1 -1
  86. package/dist/client/assets/{drawer-D6-83PZ_.js → drawer-CFkqEC3w.js} +1 -1
  87. package/dist/client/assets/{dropdown-menu-D9g8Sl4X.js → dropdown-menu-C62KNjwK.js} +1 -1
  88. package/dist/client/assets/{empty-state-0bsCiepl.js → empty-state-Sh_DuDcy.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-Dk45baha.js → extract-connection-data-D6bQrejT.js} +1 -1
  90. package/dist/client/assets/file-explorer-C8pgfKCz.js +2 -0
  91. package/dist/client/assets/{file-type-icon-B1XEm_9k.js → file-type-icon-DPWxBpNL.js} +1 -1
  92. package/dist/client/assets/{files-BvKHt3eY.js → files-B9ekmQa_.js} +1 -1
  93. package/dist/client/assets/{form-Dvd73W2C.js → form-DGE2mWLL.js} +1 -1
  94. package/dist/client/assets/{general-DrBGUycq.js → general-BMDKtyZB.js} +1 -1
  95. package/dist/client/assets/{github-repo-picker-CB-ypGEp.js → github-repo-picker-B5tZucJa.js} +1 -1
  96. package/dist/client/assets/{hooks-tDbCB3C5.js → hooks-CUSV6Enf.js} +1 -1
  97. package/dist/client/assets/{import-from-deco-dialog-wTIFbH1Y.js → import-from-deco-dialog-M3CP3Gmn.js} +1 -1
  98. package/dist/client/assets/index-B2yJy2sB.js +1 -0
  99. package/dist/client/assets/{index-1nPke5TY.js → index-B6hcksS9.js} +1 -1
  100. package/dist/client/assets/{index-DrUwfEHA.js → index-Bb-tYGNK.js} +1 -1
  101. package/dist/client/assets/index-BqKQnks_.css +1 -0
  102. package/dist/client/assets/{index-DmjWDqcd.js → index-CFiyU0D9.js} +3 -3
  103. package/dist/client/assets/index-CRxAjd1d.js +513 -0
  104. package/dist/client/assets/{index-DkjetCaY.js → index-CkTyYAY1.js} +1 -1
  105. package/dist/client/assets/{index-BFlpjafk.js → index-DGzNvPy2.js} +1 -1
  106. package/dist/client/assets/{index-D3WaYPH4.js → index-DIBoN36v.js} +1 -1
  107. package/dist/client/assets/{index-BTZwvNmT.js → index-DQnTjiix.js} +1 -1
  108. package/dist/client/assets/{index-DeiWC-uz.js → index-D_S_Rq8A.js} +1 -1
  109. package/dist/client/assets/{index-Ftnw_1Xy.js → index-Dj7TxcSd.js} +1 -1
  110. package/dist/client/assets/{index-B_kMLuGG.js → index-hmJjUPum.js} +1 -1
  111. package/dist/client/assets/{index--njjOK24.js → index-jBUpmiBg.js} +1 -1
  112. package/dist/client/assets/{index-D3mRtkEB.js → index-mEtg0zTM.js} +1 -1
  113. package/dist/client/assets/{index-redirect-B6SIDrdt.js → index-redirect-C9Kkmz45.js} +1 -1
  114. package/dist/client/assets/{input-BlaLo4Ee.js → input-BwRH-Gsz.js} +1 -1
  115. package/dist/client/assets/{integration-icon-BF4ETuj8.js → integration-icon-LQhkkaLl.js} +1 -1
  116. package/dist/client/assets/{label-GEC2UjFS.js → label-CdBSUJpf.js} +1 -1
  117. package/dist/client/assets/{login-DiR83Uim.js → login-d0UWtw9N.js} +1 -1
  118. package/dist/client/assets/{mcp-oauth-sGspCuYg.js → mcp-oauth-IblqU9XT.js} +1 -1
  119. package/dist/client/assets/{members-BDtCBiR9.js → members-Bpdrl2e9.js} +1 -1
  120. package/dist/client/assets/{monaco-editor-BKh1966p.js → monaco-editor-5JIc-lnc.js} +1 -1
  121. package/dist/client/assets/{monitoring-stats-row-Bdo8nd6T.js → monitoring-stats-row-DPsQ-OAn.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-BexQI-2W.js → oauth-callback-B1AvYYRn.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-ai-provider-1VSCaYAB.js → oauth-callback-ai-provider-BtGHmjpp.js} +1 -1
  124. package/dist/client/assets/{onboarding-CZfsqsuP.js → onboarding-DfUmI7F5.js} +1 -1
  125. package/dist/client/assets/{org-install-BCHSGKR9.js → org-install-CpJAFt1s.js} +1 -1
  126. package/dist/client/assets/{org-layout-D5zV7CtT.js → org-layout-BsuFzdH_.js} +1 -1
  127. package/dist/client/assets/{organization-choice-B_qzGE3r.js → organization-choice-DrxWffZp.js} +1 -1
  128. package/dist/client/assets/{page-seo-form-Cg3EP0Kg.js → page-seo-form-BLqpZnj6.js} +1 -1
  129. package/dist/client/assets/page-seo-sheet-C7jjKuEW.js +1 -0
  130. package/dist/client/assets/{popover-BxWSrnHV.js → popover-BXFiEQtN.js} +1 -1
  131. package/dist/client/assets/post-editor-Tve7DmSa.js +1 -0
  132. package/dist/client/assets/{preview-dialog-B6mTIXuI.js → preview-dialog-CQgf0QcR.js} +2 -2
  133. package/dist/client/assets/{primitives-DikyHxBV.js → primitives-BF1opf4F.js} +1 -1
  134. package/dist/client/assets/{profile-CR2pTbhO.js → profile-C8meo3ry.js} +1 -1
  135. package/dist/client/assets/project-app-view-BR2-hR46.js +1 -0
  136. package/dist/client/assets/record-editor-DbXO7U7E.js +1 -0
  137. package/dist/client/assets/registry-jjhvqeDq.js +2 -0
  138. package/dist/client/assets/{registry-layout-BQTxWcaj.js → registry-layout-C4UMhzml.js} +1 -1
  139. package/dist/client/assets/{require-capability-B1UdIHXr.js → require-capability--mIKExbX.js} +1 -1
  140. package/dist/client/assets/{required-auth-layout-CykGSzYq.js → required-auth-layout-DDJmFi3U.js} +1 -1
  141. package/dist/client/assets/{reset-password-BKTSF6vw.js → reset-password-CuNa1ife.js} +1 -1
  142. package/dist/client/assets/{roles-tVsESxlL.js → roles-BMhGnq_F.js} +1 -1
  143. package/dist/client/assets/{scroll-area-B8CDvPWi.js → scroll-area-BM-54tW1.js} +1 -1
  144. package/dist/client/assets/{search-input-L82tU3Bd.js → search-input-M7ubuBMG.js} +1 -1
  145. package/dist/client/assets/{secrets-BPwXng2k.js → secrets-BN1JMG5V.js} +1 -1
  146. package/dist/client/assets/{sections-editor-CuKTooG7.js → sections-editor-Buouhx1S.js} +2 -2
  147. package/dist/client/assets/{select-ySr8WoR1.js → select-C6v8Xcth.js} +1 -1
  148. package/dist/client/assets/{select-model-DdjL4UVJ.js → select-model-Cz9R_UN3.js} +1 -1
  149. package/dist/client/assets/seo-editor-D9o3utSQ.js +1 -0
  150. package/dist/client/assets/{settings-layout-BBsWbAB4.js → settings-layout-CSaUQUXv.js} +1 -1
  151. package/dist/client/assets/{settings-section-ysOtzM09.js → settings-section-MeT61nuY.js} +1 -1
  152. package/dist/client/assets/{sheet-X3VztLnq.js → sheet-DyU03ddw.js} +1 -1
  153. package/dist/client/assets/{shell-controls-DTY4r0Sw.js → shell-controls-DtGb6E4l.js} +1 -1
  154. package/dist/client/assets/{shell-layout-CdseotG7.js → shell-layout-Nyz7GHu7.js} +1 -1
  155. package/dist/client/assets/{shell-route-loading-DNSXVK6N.js → shell-route-loading-BRcTX0VT.js} +1 -1
  156. package/dist/client/assets/{sidebar-H8VlLCcE.js → sidebar-BNrafefE.js} +1 -1
  157. package/dist/client/assets/{skeleton-DknPHMRJ.js → skeleton-B0I93PJP.js} +1 -1
  158. package/dist/client/assets/{sortable.esm-Ctxa79RM.js → sortable.esm-MymOIPKk.js} +1 -1
  159. package/dist/client/assets/{sso-WkG_Ya3-.js → sso-CfyYgWAs.js} +1 -1
  160. package/dist/client/assets/{store-BisoAFLO.js → store-T7GJ1SPI.js} +1 -1
  161. package/dist/client/assets/store-registry-B-YJeGRV.js +2 -0
  162. package/dist/client/assets/{studio-tools-BWRE75AX.js → studio-tools-CNO5iCKk.js} +1 -1
  163. package/dist/client/assets/{switch-DR4CkZQD.js → switch-CCMIMmOF.js} +1 -1
  164. package/dist/client/assets/{table-C4Cy5HHY.js → table-DeNuxLMl.js} +1 -1
  165. package/dist/client/assets/{tabs-C77-FnFK.js → tabs-Ca0vDJqc.js} +1 -1
  166. package/dist/client/assets/{task-status-DIimAguz.js → task-status-B3nPzwP7.js} +1 -1
  167. package/dist/client/assets/{textarea-DzC7ppsf.js → textarea-BYT525JZ.js} +1 -1
  168. package/dist/client/assets/{toggle-group-DUz2fIQy.js → toggle-group-9TrYMc69.js} +1 -1
  169. package/dist/client/assets/toolbar-p8VcpV1N.js +1 -0
  170. package/dist/client/assets/{tools-list-CTCIGteU.js → tools-list-uWC3Ij6C.js} +1 -1
  171. package/dist/client/assets/{tooltip-Cr9AJTu1.js → tooltip-DrpiSbRG.js} +1 -1
  172. package/dist/client/assets/{types-DIYYFrZY.js → types-C7syjwde.js} +4 -4
  173. package/dist/client/assets/{use-ai-providers-DnoPML_E.js → use-ai-providers-C7KmiuqP.js} +1 -1
  174. package/dist/client/assets/{use-automations-B4dRXrYb.js → use-automations-RMjkwkxX.js} +1 -1
  175. package/dist/client/assets/{use-capability-CDOjpxJe.js → use-capability-C6Dwri-U.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-DfB4yM8e.js → use-clock-tick-BcxdOJLx.js} +1 -1
  177. package/dist/client/assets/{use-collections-C6o5d0Mn.js → use-collections-B4atckEK.js} +1 -1
  178. package/dist/client/assets/{use-connection-RPVug9uL.js → use-connection-Dz29RF9P.js} +1 -1
  179. package/dist/client/assets/{use-copy-DByELpSB.js → use-copy-Xy0buIqd.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-DYyOoMN3.js → use-create-virtual-mcp-DVmI--_C.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-D9laFBFB.js → use-debounced-autosave-B4mbwJnu.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-Bs78etny.js → use-debounced-value-C6U3mliE.js} +1 -1
  183. package/dist/client/assets/{use-decopilot-events-DavYF-aF.js → use-decopilot-events-CpQNzv3e.js} +1 -1
  184. package/dist/client/assets/{use-delete-connection-9x3-oXog.js → use-delete-connection-CqeuxO_6.js} +1 -1
  185. package/dist/client/assets/{use-file-configs-YQp2GWKp.js → use-file-configs-CFCmr--W.js} +1 -1
  186. package/dist/client/assets/{use-infinite-scroll-BmnUwDlC.js → use-infinite-scroll-BX1nHHVY.js} +1 -1
  187. package/dist/client/assets/{use-join-requests-wdTUrAXP.js → use-join-requests-j9WpmFq7.js} +1 -1
  188. package/dist/client/assets/{use-mcp-client-NDJy9UEP.js → use-mcp-client-xOK-OF8p.js} +2 -2
  189. package/dist/client/assets/{use-mcp-prompts-ziW0oQXD.js → use-mcp-prompts-Crr3H7P7.js} +1 -1
  190. package/dist/client/assets/{use-mcp-tools-ByN1fg_5.js → use-mcp-tools-C8tMWwG9.js} +1 -1
  191. package/dist/client/assets/{use-members-CqCv95kS.js → use-members-BMNjJExY.js} +1 -1
  192. package/dist/client/assets/{use-mobile-C1ok2Oda.js → use-mobile-NlF-3RoP.js} +1 -1
  193. package/dist/client/assets/{use-navigate-to-agent-GB89TSmS.js → use-navigate-to-agent-DZubxUSm.js} +1 -1
  194. package/dist/client/assets/{use-org-auth-client-a0tV0I4a.js → use-org-auth-client-C_UJ3Vg_.js} +1 -1
  195. package/dist/client/assets/{use-org-fs-C4An_fXX.js → use-org-fs-DyK8omii.js} +1 -1
  196. package/dist/client/assets/{use-org-sso-DXOaOrbn.js → use-org-sso-DkqH8Zpz.js} +1 -1
  197. package/dist/client/assets/{use-organization-roles-CsUVzen8.js → use-organization-roles-Cu69Rnex.js} +1 -1
  198. package/dist/client/assets/{use-organization-settings-rqcqUUeR.js → use-organization-settings-DksiQdGc.js} +1 -1
  199. package/dist/client/assets/{use-registry-connections-BHtQ89zr.js → use-registry-connections-BOZLpkM5.js} +1 -1
  200. package/dist/client/assets/{use-secrets-CQoqzufN.js → use-secrets-CLmhH-Rb.js} +1 -1
  201. package/dist/client/assets/{use-status-sounds-yeVUNOcg.js → use-status-sounds-DxV7deix.js} +1 -1
  202. package/dist/client/assets/{use-view-mode-D7GDuIV9.js → use-view-mode-C2dllj6L.js} +1 -1
  203. package/dist/client/assets/{use-virtual-mcp-DQxIBquV.js → use-virtual-mcp-2U_MnYnK.js} +1 -1
  204. package/dist/client/assets/useInfiniteQuery-RUqqRph1.js +1 -0
  205. package/dist/client/assets/useSuspenseInfiniteQuery-fRYRtDkY.js +1 -0
  206. package/dist/client/assets/{useSuspenseQueries-DM2UC-1d.js → useSuspenseQueries-Cysvk68n.js} +1 -1
  207. package/dist/client/assets/{variant-calendar-Dkf9XIru.js → variant-calendar-mZn_D1Zo.js} +1 -1
  208. package/dist/client/assets/{view-mode-toggle-1VKSbXaL.js → view-mode-toggle-4CQodGfa.js} +1 -1
  209. package/dist/client/index.html +2 -2
  210. package/dist/server/cli.js +1 -1
  211. package/package.json +1 -1
  212. package/dist/client/assets/app-editor-Cfln2sHr.js +0 -1
  213. package/dist/client/assets/category-editor-BT4Cxoo3.js +0 -1
  214. package/dist/client/assets/file-explorer-BtYpNmrX.js +0 -2
  215. package/dist/client/assets/index-1MQY-aKx.css +0 -1
  216. package/dist/client/assets/index-DL5xoOQh.js +0 -513
  217. package/dist/client/assets/index-PHpiDror.js +0 -1
  218. package/dist/client/assets/page-seo-sheet-fP6EiExR.js +0 -1
  219. package/dist/client/assets/post-editor-CpIwB3m_.js +0 -1
  220. package/dist/client/assets/project-app-view-AkqKN49v.js +0 -1
  221. package/dist/client/assets/record-editor-Dm0nCNn9.js +0 -1
  222. package/dist/client/assets/registry-DhcyXlrd.js +0 -2
  223. package/dist/client/assets/seo-editor-BXwxtymi.js +0 -1
  224. package/dist/client/assets/store-registry-DKSrdFtG.js +0 -2
  225. package/dist/client/assets/toolbar-1nBak56S.js +0 -1
  226. package/dist/client/assets/useInfiniteQuery-BiSAb_zK.js +0 -1
  227. package/dist/client/assets/useSuspenseInfiniteQuery-9J-jWStM.js +0 -1
@@ -1,5 +1,5 @@
1
- import{r as h,aM as tn,c as J,l as xe,j as a,J as nn,i as rn,B as Z,K as Ke,k as sn,ae as on,D as ln,m as an,t as Pe,ag as cn,G as un,e as dn}from"./index-DmjWDqcd.js";import{c as fn,d as mn,g as pn,b as hn,e as xn,a as gn,h as vn}from"./ZoomOut-9WiOjKDc.js";import{c as wn,a as Ve,d as yt,e as bt}from"./dialog-onqVrhoh.js";import{T as oe,a as le,b as ae}from"./tooltip-Cr9AJTu1.js";import{n as Re,i as St}from"./Globe01-DbyYsbkQ.js";import{n as zt}from"./LinkExternal01-C75h4nTA.js";import{s as yn}from"./XClose-BaODJMh0.js";import{S as $e}from"./skeleton-DknPHMRJ.js";import{l as bn,F as Sn}from"./index-1nPke5TY.js";import{F as Xe,M as zn}from"./file-type-icon-B1XEm_9k.js";import{D as jn,a as kn,b as Pn,c as it}from"./dropdown-menu-D9g8Sl4X.js";import{i as Cn}from"./LayoutLeft-CvZZnjM_.js";import{i as En,f as jt,n as Nn,d as kt,e as $n}from"./use-org-fs-C4An_fXX.js";import{I as Mn}from"./input-BlaLo4Ee.js";import{a as In,P as Rn,b as Dn}from"./popover-BxWSrnHV.js";import{i as Ln}from"./ChevronUp-DLoyITzq.js";import{a as _n}from"./Eye-BuXBYPNx.js";import{i as An}from"./Key01-B-rzooWI.js";const Ae=h.createContext(null);Ae.displayName="PanelGroupContext";const K={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Qe=10,pe=h.useLayoutEffect,ot=tn.useId,Tn=typeof ot=="function"?ot:()=>null;let Hn=0;function Ze(t=null){const e=Tn(),n=h.useRef(t||e||null);return n.current===null&&(n.current=""+Hn++),t??n.current}function Pt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:l,minSize:c,onCollapse:d,onExpand:m,onResize:u,order:f,style:v,tagName:x="div",...k}){const b=h.useContext(Ae);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:C,getPanelSize:I,getPanelStyle:j,groupId:F,isPanelCollapsed:$,reevaluatePanelConstraints:g,registerPanel:G,resizePanel:W,unregisterPanel:O}=b,A=Ze(o),D=h.useRef({callbacks:{onCollapse:d,onExpand:m,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:l,minSize:c},id:A,idIsFromProps:o!==void 0,order:f});h.useRef({didLogMissingDefaultSizeWarning:!1}),pe(()=>{const{callbacks:_,constraints:L}=D.current,T={...L};D.current.id=A,D.current.idIsFromProps=o!==void 0,D.current.order=f,_.onCollapse=d,_.onExpand=m,_.onResize=u,L.collapsedSize=n,L.collapsible=r,L.defaultSize=s,L.maxSize=l,L.minSize=c,(T.collapsedSize!==L.collapsedSize||T.collapsible!==L.collapsible||T.maxSize!==L.maxSize||T.minSize!==L.minSize)&&g(D.current,T)}),pe(()=>{const _=D.current;return G(_),()=>{O(_)}},[f,A,G,O]),h.useImperativeHandle(i,()=>({collapse:()=>{w(D.current)},expand:_=>{C(D.current,_)},getId(){return A},getSize(){return I(D.current)},isCollapsed(){return $(D.current)},isExpanded(){return!$(D.current)},resize:_=>{W(D.current,_)}}),[w,C,I,$,A,W]);const V=j(D.current,s);return h.createElement(x,{...k,children:t,className:e,id:A,style:{...V,...v},[K.groupId]:F,[K.panel]:"",[K.panelCollapsible]:r||void 0,[K.panelId]:A,[K.panelSize]:parseFloat(""+V.flexGrow).toFixed(1)})}const Ct=h.forwardRef((t,e)=>h.createElement(Pt,{...t,forwardedRef:e}));Pt.displayName="Panel";Ct.displayName="forwardRef(Panel)";let Ye=null,Ie=-1,de=null;function On(t,e){if(e){const n=(e&It)!==0,r=(e&Rt)!==0,s=(e&Dt)!==0,i=(e&Lt)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Un(){de!==null&&(document.head.removeChild(de),Ye=null,de=null,Ie=-1)}function Fe(t,e){var n,r;const s=On(t,e);if(Ye!==s){if(Ye=s,de===null&&(de=document.createElement("style"),document.head.appendChild(de)),Ie>=0){var i;(i=de.sheet)===null||i===void 0||i.removeRule(Ie)}Ie=(n=(r=de.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Et(t){return t.type==="keydown"}function Nt(t){return t.type.startsWith("pointer")}function $t(t){return t.type.startsWith("mouse")}function Te(t){if(Nt(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if($t(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Fn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Wn(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Bn(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:ct(t),b:ct(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;N(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:at(lt(n.a)),b:at(lt(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let l=i.length;for(;l--;){const c=i[l];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const Gn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qn(t){var e;const n=getComputedStyle((e=Mt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kn(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qn(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Gn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function lt(t){let e=t.length;for(;e--;){const n=t[e];if(N(n,"Missing node"),Kn(n))return n}return null}function at(t){return t&&Number(getComputedStyle(t).zIndex)||0}function ct(t){const e=[];for(;t;)e.push(t),t=Mt(t);return e}function Mt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const It=1,Rt=2,Dt=4,Lt=8,Vn=Fn()==="coarse";let re=[],be=!1,me=new Map,He=new Map;const Ce=new Set;function Xn(t,e,n,r,s){var i;const{ownerDocument:o}=e,l={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=me.get(o))!==null&&i!==void 0?i:0;return me.set(o,c+1),Ce.add(l),De(),function(){var m;He.delete(t),Ce.delete(l);const u=(m=me.get(o))!==null&&m!==void 0?m:1;if(me.set(o,u-1),De(),u===1&&me.delete(o),re.includes(l)){const f=re.indexOf(l);f>=0&&re.splice(f,1),tt(),s("up",!0,null)}}}function Yn(t){const{target:e}=t,{x:n,y:r}=Te(t);be=!0,et({target:e,x:n,y:r}),De(),re.length>0&&(Le("down",t),t.preventDefault(),_t(e)||t.stopImmediatePropagation())}function We(t){const{x:e,y:n}=Te(t);if(be&&t.buttons===0&&(be=!1,Le("up",t)),!be){const{target:r}=t;et({target:r,x:e,y:n})}Le("move",t),tt(),re.length>0&&t.preventDefault()}function Be(t){const{target:e}=t,{x:n,y:r}=Te(t);He.clear(),be=!1,re.length>0&&(t.preventDefault(),_t(e)||t.stopImmediatePropagation()),Le("up",t),et({target:e,x:n,y:r}),tt(),De()}function _t(t){let e=t;for(;e;){if(e.hasAttribute(K.resizeHandle))return!0;e=e.parentElement}return!1}function et({target:t,x:e,y:n}){re.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ce.forEach(s=>{const{element:i,hitAreaMargins:o}=s,l=i.getBoundingClientRect(),{bottom:c,left:d,right:m,top:u}=l,f=Vn?o.coarse:o.fine;if(e>=d-f&&e<=m+f&&n>=u-f&&n<=c+f){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&Bn(r,i)>0){let x=r,k=!1;for(;x&&!x.contains(i);){if(Wn(x.getBoundingClientRect(),l)){k=!0;break}x=x.parentElement}if(k)return}re.push(s)}})}function Ge(t,e){He.set(t,e)}function tt(){let t=!1,e=!1;re.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;He.forEach(r=>{n|=r}),t&&e?Fe("intersection",n):t?Fe("horizontal",n):e?Fe("vertical",n):Un()}let qe=new AbortController;function De(){qe.abort(),qe=new AbortController;const t={capture:!0,signal:qe.signal};Ce.size&&(be?(re.length>0&&me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Be,t),r.addEventListener("pointerleave",We,t),r.addEventListener("pointermove",We,t))}),window.addEventListener("pointerup",Be,t),window.addEventListener("pointercancel",Be,t)):me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Yn,t),r.addEventListener("pointermove",We,t))}))}function Le(t,e){Ce.forEach(n=>{const{setResizeHandlerState:r}=n,s=re.includes(n);r(t,s,e)})}function Jn(){const[t,e]=h.useState(0);return h.useCallback(()=>e(n=>n+1),[])}function N(t,e){if(!t)throw console.error(e),Error(e)}function he(t,e,n=Qe){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ce(t,e,n=Qe){return he(t,e,n)===0}function ee(t,e,n){return he(t,e,n)===0}function Qn(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],i=e[r];if(!ee(s,i,n))return!1}return!0}function ye({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];N(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:i,maxSize:o=100,minSize:l=0}=r;if(he(n,l)<0)if(i){const c=(s+l)/2;he(n,c)<0?n=s:n=l}else n=l;return n=Math.min(o,n),n=parseFloat(n.toFixed(Qe)),n}function je({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:i}){if(ee(t,0))return e;const o=[...e],[l,c]=r;N(l!=null,"Invalid first pivot index"),N(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=t<0?c:l,f=n[u];N(f,`Panel constraints not found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,v)){const w=k-b;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const u=t<0?l:c,f=n[u];N(f,`No panel constraints found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,k)){const w=b-v;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const u=t<0?1:-1;let f=t<0?c:l,v=0;for(;;){const k=e[f];N(k!=null,`Previous layout not found for panel index ${f}`);const w=ye({panelConstraints:n,panelIndex:f,size:100})-k;if(v+=w,f+=u,f<0||f>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(v));t=t<0?0-x:x}{let f=t<0?l:c;for(;f>=0&&f<n.length;){const v=Math.abs(t)-Math.abs(d),x=e[f];N(x!=null,`Previous layout not found for panel index ${f}`);const k=x-v,b=ye({panelConstraints:n,panelIndex:f,size:k});if(!ee(x,b)&&(d+=x-b,o[f]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(Qn(s,o))return s;{const u=t<0?c:l,f=e[u];N(f!=null,`Previous layout not found for panel index ${u}`);const v=f+d,x=ye({panelConstraints:n,panelIndex:u,size:v});if(o[u]=x,!ee(x,v)){let k=v-x,w=t<0?c:l;for(;w>=0&&w<n.length;){const C=o[w];N(C!=null,`Previous layout not found for panel index ${w}`);const I=C+k,j=ye({panelConstraints:n,panelIndex:w,size:I});if(ee(C,j)||(k-=j-C,o[w]=j),ee(k,0))break;t>0?w--:w++}}}const m=o.reduce((u,f)=>f+u,0);return ee(m,100)?o:s}function Zn({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const l=n[0];N(l!=null,"No pivot index found"),e.forEach((u,f)=>{const{constraints:v}=u,{maxSize:x=100,minSize:k=0}=v;f===l?(r=k,s=x):(i+=k,o+=x)});const c=Math.min(s,100-i),d=Math.max(r,100-o),m=t[l];return{valueMax:c,valueMin:d,valueNow:m}}function Ee(t,e=document){return Array.from(e.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${t}"]`))}function At(t,e,n=document){const s=Ee(t,n).findIndex(i=>i.getAttribute(K.resizeHandleId)===e);return s??null}function Tt(t,e,n){const r=At(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Ht(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Oe(t,e=document){const n=e.querySelector(`[${K.resizeHandleId}="${t}"]`);return n||null}function er(t,e,n,r=document){var s,i,o,l;const c=Oe(e,r),d=Ee(t,r),m=c?d.indexOf(c):-1,u=(s=(i=n[m])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,f=(o=(l=n[m+1])===null||l===void 0?void 0:l.id)!==null&&o!==void 0?o:null;return[u,f]}function tr({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){h.useRef({didWarnAboutMissingResizeHandle:!1}),pe(()=>{if(!i)return;const l=Ee(n,i);for(let c=0;c<s.length-1;c++){const{valueMax:d,valueMin:m,valueNow:u}=Zn({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),f=l[c];if(f!=null){const v=s[c];N(v,`No panel data found for index "${c}"`),f.setAttribute("aria-controls",v.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(m)),f.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{l.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),h.useEffect(()=>{if(!i)return;const l=e.current;N(l,"Eager values not found");const{panelDataArray:c}=l,d=Ht(n,i);N(d!=null,`No group found for id "${n}"`);const m=Ee(n,i);N(m,`No resize handles found for group id "${n}"`);const u=m.map(f=>{const v=f.getAttribute(K.resizeHandleId);N(v,"Resize handle element has no handle id attribute");const[x,k]=er(n,v,c,i);if(x==null||k==null)return()=>{};const b=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const C=c.findIndex(I=>I.id===x);if(C>=0){const I=c[C];N(I,`No panel data found for index ${C}`);const j=r[C],{collapsedSize:F=0,collapsible:$,minSize:g=0}=I.constraints;if(j!=null&&$){const G=je({delta:ee(j,F)?g-F:F-j,initialLayout:r,panelConstraints:c.map(W=>W.constraints),pivotIndices:Tt(n,v,i),prevLayout:r,trigger:"keyboard"});r!==G&&o(G)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{u.forEach(f=>f())}},[i,t,e,n,r,s,o])}function ut(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ot(t,e){const n=t==="horizontal",{x:r,y:s}=Te(e);return n?r:s}function nr(t,e,n,r,s){const i=n==="horizontal",o=Oe(e,s);N(o,`No resize handle element found for id "${e}"`);const l=o.getAttribute(K.groupId);N(l,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const d=Ot(n,t),m=Ht(l,s);N(m,`No group element found for id "${l}"`);const u=m.getBoundingClientRect(),f=i?u.width:u.height;return(d-c)/f*100}function rr(t,e,n,r,s,i){if(Et(t)){const o=n==="horizontal";let l=0;t.shiftKey?l=100:s!=null?l=s:l=10;let c=0;switch(t.key){case"ArrowDown":c=o?0:l;break;case"ArrowLeft":c=o?-l:0;break;case"ArrowRight":c=o?l:0;break;case"ArrowUp":c=o?0:-l;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:nr(t,e,n,r,i)}function sr({panelDataArray:t}){const e=Array(t.length),n=t.map(i=>i.constraints);let r=0,s=100;for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;l!=null&&(r++,e[i]=l,s-=l)}for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;if(l!=null)continue;const c=t.length-r,d=s/c;r++,e[i]=d,s-=d}return e}function ge(t,e,n){e.forEach((r,s)=>{const i=t[s];N(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:l,id:c}=i,{collapsedSize:d=0,collapsible:m}=l,u=n[c];if(u==null||r!==u){n[c]=r;const{onCollapse:f,onExpand:v,onResize:x}=o;x&&x(r,u),m&&(f||v)&&(v&&(u==null||ce(u,d))&&!ce(r,d)&&v(),f&&(u==null||!ce(u,d))&&ce(r,d)&&f())}})}function Me(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function ir({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:i=3}){const o=n[s];let l;return o==null?l=t!=null?t.toPrecision(i):"1":r.length===1?l="1":l=o.toPrecision(i),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function or(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function dt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Ut(t){return`react-resizable-panels:${t}`}function Ft(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Wt(t,e){try{const n=Ut(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function lr(t,e,n){var r,s;const i=(r=Wt(t,n))!==null&&r!==void 0?r:{},o=Ft(e);return(s=i[o])!==null&&s!==void 0?s:null}function ar(t,e,n,r,s){var i;const o=Ut(t),l=Ft(e),c=(i=Wt(t,s))!==null&&i!==void 0?i:{};c[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function ft({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!ee(r,100)&&n.length>0)for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=100/r*o;n[i]=l}let s=0;for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=ye({panelConstraints:e,panelIndex:i,size:o});o!=l&&(s+=o-l,n[i]=l)}if(!ee(s,0))for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=o+s,c=ye({panelConstraints:e,panelIndex:i,size:l});if(o!==c&&(s-=c-o,n[i]=c,ee(s,0)))break}return n}const cr=100,ke={getItem:t=>(dt(ke),ke.getItem(t)),setItem:(t,e)=>{dt(ke),ke.setItem(t,e)}},mt={};function Bt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:l=null,storage:c=ke,style:d,tagName:m="div",...u}){const f=Ze(i),v=h.useRef(null),[x,k]=h.useState(null),[b,w]=h.useState([]),C=Jn(),I=h.useRef({}),j=h.useRef(new Map),F=h.useRef(0),$=h.useRef({autoSaveId:t,direction:r,dragState:x,id:f,keyboardResizeBy:l,onLayout:o,storage:c}),g=h.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});h.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),h.useImperativeHandle(s,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:p}=g.current;return p},setLayout:p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current,y=ft({layout:p,panelConstraints:P.map(E=>E.constraints)});ut(M,y)||(w(y),g.current.layout=y,z&&z(y),ge(P,y,I.current))}}),[]),pe(()=>{$.current.autoSaveId=t,$.current.direction=r,$.current.dragState=x,$.current.id=f,$.current.onLayout=o,$.current.storage=c}),tr({committedValuesRef:$,eagerValuesRef:g,groupId:f,layout:b,panelDataArray:g.current.panelDataArray,setLayout:w,panelGroupElement:v.current}),h.useEffect(()=>{const{panelDataArray:p}=g.current;if(t){if(b.length===0||b.length!==p.length)return;let z=mt[t];z==null&&(z=or(ar,cr),mt[t]=z);const M=[...p],P=new Map(j.current);z(t,M,P,b,c)}},[t,b,c]),h.useEffect(()=>{});const G=h.useCallback(p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current;if(p.constraints.collapsible){const y=P.map(se=>se.constraints),{collapsedSize:E=0,panelSize:U,pivotIndices:X}=fe(P,p,M);if(N(U!=null,`Panel size not found for panel "${p.id}"`),!ce(U,E)){j.current.set(p.id,U);const ie=ve(P,p)===P.length-1?U-E:E-U,q=je({delta:ie,initialLayout:M,panelConstraints:y,pivotIndices:X,prevLayout:M,trigger:"imperative-api"});Me(M,q)||(w(q),g.current.layout=q,z&&z(q),ge(P,q,I.current))}}},[]),W=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current;if(p.constraints.collapsible){const E=y.map(ne=>ne.constraints),{collapsedSize:U=0,panelSize:X=0,minSize:se=0,pivotIndices:ie}=fe(y,p,P),q=z??se;if(ce(X,U)){const ne=j.current.get(p.id),Se=ne!=null&&ne>=q?ne:q,Ue=ve(y,p)===y.length-1?X-Se:Se-X,Q=je({delta:Ue,initialLayout:P,panelConstraints:E,pivotIndices:ie,prevLayout:P,trigger:"imperative-api"});Me(P,Q)||(w(Q),g.current.layout=Q,M&&M(Q),ge(y,Q,I.current))}}},[]),O=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{panelSize:P}=fe(M,p,z);return N(P!=null,`Panel size not found for panel "${p.id}"`),P},[]),A=h.useCallback((p,z)=>{const{panelDataArray:M}=g.current,P=ve(M,p);return ir({defaultSize:z,dragState:x,layout:b,panelData:M,panelIndex:P})},[x,b]),D=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),y===!0&&ce(E,P)},[]),V=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),!y||he(E,P)>0},[]),_=h.useCallback(p=>{const{panelDataArray:z}=g.current;z.push(p),z.sort((M,P)=>{const y=M.order,E=P.order;return y==null&&E==null?0:y==null?-1:E==null?1:y-E}),g.current.panelDataArrayChanged=!0,C()},[C]);pe(()=>{if(g.current.panelDataArrayChanged){g.current.panelDataArrayChanged=!1;const{autoSaveId:p,onLayout:z,storage:M}=$.current,{layout:P,panelDataArray:y}=g.current;let E=null;if(p){const X=lr(p,y,M);X&&(j.current=new Map(Object.entries(X.expandToSizes)),E=X.layout)}E==null&&(E=sr({panelDataArray:y}));const U=ft({layout:E,panelConstraints:y.map(X=>X.constraints)});ut(P,U)||(w(U),g.current.layout=U,z&&z(U),ge(y,U,I.current))}}),pe(()=>{const p=g.current;return()=>{p.layout=[]}},[]);const L=h.useCallback(p=>{let z=!1;const M=v.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(y){y.preventDefault();const E=v.current;if(!E)return()=>null;const{direction:U,dragState:X,id:se,keyboardResizeBy:ie,onLayout:q}=$.current,{layout:ne,panelDataArray:Se}=g.current,{initialLayout:Ne}=X??{},Ue=Tt(se,p,E);let Q=rr(y,p,U,X,ie,E);const rt=U==="horizontal";rt&&z&&(Q=-Q);const Zt=Se.map(en=>en.constraints),ze=je({delta:Q,initialLayout:Ne??ne,panelConstraints:Zt,pivotIndices:Ue,prevLayout:ne,trigger:Et(y)?"keyboard":"mouse-or-touch"}),st=!Me(ne,ze);(Nt(y)||$t(y))&&F.current!=Q&&(F.current=Q,!st&&Q!==0?rt?Ge(p,Q<0?It:Rt):Ge(p,Q<0?Dt:Lt):Ge(p,0)),st&&(w(ze),g.current.layout=ze,q&&q(ze),ge(Se,ze,I.current))}},[]),T=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current,E=y.map(ne=>ne.constraints),{panelSize:U,pivotIndices:X}=fe(y,p,P);N(U!=null,`Panel size not found for panel "${p.id}"`);const ie=ve(y,p)===y.length-1?U-z:z-U,q=je({delta:ie,initialLayout:P,panelConstraints:E,pivotIndices:X,prevLayout:P,trigger:"imperative-api"});Me(P,q)||(w(q),g.current.layout=q,M&&M(q),ge(y,q,I.current))},[]),H=h.useCallback((p,z)=>{const{layout:M,panelDataArray:P}=g.current,{collapsedSize:y=0,collapsible:E}=z,{collapsedSize:U=0,collapsible:X,maxSize:se=100,minSize:ie=0}=p.constraints,{panelSize:q}=fe(P,p,M);q!=null&&(E&&X&&ce(q,y)?ce(y,U)||T(p,U):q<ie?T(p,ie):q>se&&T(p,se))},[T]),Y=h.useCallback((p,z)=>{const{direction:M}=$.current,{layout:P}=g.current;if(!v.current)return;const y=Oe(p,v.current);N(y,`Drag handle element not found for id "${p}"`);const E=Ot(M,z);k({dragHandleId:p,dragHandleRect:y.getBoundingClientRect(),initialCursorPosition:E,initialLayout:P})},[]),te=h.useCallback(()=>{k(null)},[]),B=h.useCallback(p=>{const{panelDataArray:z}=g.current,M=ve(z,p);M>=0&&(z.splice(M,1),delete I.current[p.id],g.current.panelDataArrayChanged=!0,C())},[C]),S=h.useMemo(()=>({collapsePanel:G,direction:r,dragState:x,expandPanel:W,getPanelSize:O,getPanelStyle:A,groupId:f,isPanelCollapsed:D,isPanelExpanded:V,reevaluatePanelConstraints:H,registerPanel:_,registerResizeHandle:L,resizePanel:T,startDragging:Y,stopDragging:te,unregisterPanel:B,panelGroupElement:v.current}),[G,x,r,W,O,A,f,D,V,H,_,L,T,Y,te,B]),R={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return h.createElement(Ae.Provider,{value:S},h.createElement(m,{...u,children:e,className:n,id:i,ref:v,style:{...R,...d},[K.group]:"",[K.groupDirection]:r,[K.groupId]:f}))}const Gt=h.forwardRef((t,e)=>h.createElement(Bt,{...t,forwardedRef:e}));Bt.displayName="PanelGroup";Gt.displayName="forwardRef(PanelGroup)";function ve(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function fe(t,e,n){const r=ve(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function ur({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){h.useEffect(()=>{if(t||n==null||r==null)return;const s=Oe(e,r);if(s==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const l=s.getAttribute(K.groupId);N(l,`No group element found for id "${l}"`);const c=Ee(l,r),d=At(l,e,r);N(d!==null,`No resize element found for id "${e}"`);const m=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[m].focus();break}}};return s.addEventListener("keydown",i),()=>{s.removeEventListener("keydown",i)}},[r,t,e,n])}function qt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onClick:o,onDragging:l,onFocus:c,onPointerDown:d,onPointerUp:m,style:u={},tabIndex:f=0,tagName:v="div",...x}){var k,b;const w=h.useRef(null),C=h.useRef({onClick:o,onDragging:l,onPointerDown:d,onPointerUp:m});h.useEffect(()=>{C.current.onClick=o,C.current.onDragging=l,C.current.onPointerDown=d,C.current.onPointerUp=m});const I=h.useContext(Ae);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:j,groupId:F,registerResizeHandle:$,startDragging:g,stopDragging:G,panelGroupElement:W}=I,O=Ze(s),[A,D]=h.useState("inactive"),[V,_]=h.useState(!1),[L,T]=h.useState(null),H=h.useRef({state:A});pe(()=>{H.current.state=A}),h.useEffect(()=>{if(n)T(null);else{const S=$(O);T(()=>S)}},[n,O,$]);const Y=(k=r?.coarse)!==null&&k!==void 0?k:15,te=(b=r?.fine)!==null&&b!==void 0?b:5;h.useEffect(()=>{if(n||L==null)return;const S=w.current;N(S,"Element ref not attached");let R=!1;return Xn(O,S,j,{coarse:Y,fine:te},(z,M,P)=>{if(!M){D("inactive");return}switch(z){case"down":{D("drag"),R=!1,N(P,'Expected event to be defined for "down" action'),g(O,P);const{onDragging:y,onPointerDown:E}=C.current;y?.(!0),E?.();break}case"move":{const{state:y}=H.current;R=!0,y!=="drag"&&D("hover"),N(P,'Expected event to be defined for "move" action'),L(P);break}case"up":{D("hover"),G();const{onClick:y,onDragging:E,onPointerUp:U}=C.current;E?.(!1),U?.(),R||y?.();break}}})},[Y,j,n,te,$,O,L,g,G]),ur({disabled:n,handleId:O,resizeHandler:L,panelGroupElement:W});const B={touchAction:"none",userSelect:"none"};return h.createElement(v,{...x,children:t,className:e,id:s,onBlur:()=>{_(!1),i?.()},onFocus:()=>{_(!0),c?.()},ref:w,role:"separator",style:{...B,...u},tabIndex:f,[K.groupDirection]:j,[K.groupId]:F,[K.resizeHandle]:"",[K.resizeHandleActive]:A==="drag"?"pointer":V?"keyboard":void 0,[K.resizeHandleEnabled]:!n,[K.resizeHandleId]:O,[K.resizeHandleState]:A})}qt.displayName="PanelResizeHandle";function ls(t){const e=J.c(10);let n,r,s;e[0]!==t?({className:n,ref:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[4]=n,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==s||e[8]!==i?(o=a.jsx(Gt,{ref:s,"data-slot":"resizable-panel-group",className:i,...r}),e[6]=r,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function as(t){const e=J.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=a.jsx(Ct,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function cs(t){const e=J.c(12);let n,r,s;e[0]!==t?({withHandle:s,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=i):i=e[5];let o;e[6]!==s?(o=s&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(fn,{className:"size-2.5"})}),e[6]=s,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==i||e[10]!==o?(l=a.jsx(qt,{"data-slot":"resizable-handle",className:i,...r,children:o}),e[8]=r,e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function dr(t){if(!t||t.includes("\\")||t.includes("..")||t.includes("\0"))return!0;try{const e=decodeURIComponent(t);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==t&&e.includes("/")){const n=(t.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>n)return!0}return!1}catch{return!0}}function fr(t){if(dr(t))throw new Error(`Invalid block key: ${t||"(empty)"}`)}function mr(t){try{return decodeURIComponent(t)}catch{return t}}function pr(t){return fr(t),encodeURIComponent(t)}function hr(t){return`.deco/blocks/${pr(t)}.json`}function us(t){return`/${hr(t)}`}const ds=1e4,xr=3;function Je(t){return t.trim()?(t.startsWith("/")?t:`/${t}`).replace(/\/+/g,"/"):"/"}function nt(t){return t.startsWith("/")?t.slice(1):t}function _e(t){return t.trim()?t.startsWith("/")?t:`/${t}`:"/"}function gr(t){const e=_e(t);if(e==="/")return"/";const n=e.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function fs(t,e){const n=e.replace(/^\/+|\/+$/g,"");return _e(n?`${t==="/"?"":t}/${n}`:t)}function ms(t,e){return e==="directory"?t:gr(t)}function ps(t){const e=t.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function vr(t){const e=nt(t);return e?e.split("/").filter(Boolean).length:0}function hs(t,e,n,r=!1){return{files:[...new Set([...t,...n.files])],directories:[...new Set([...e,...n.directories??[]])],truncated:r||!!n.truncated}}function xs(t,e){return vr(t)>=xr&&!e.has(t)}function gs(t,e,n=[]){const r=nt(t);if(e.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return e.some(i=>i.startsWith(s))||n.some(i=>i.startsWith(s))}function vs(t){const e=nt(t),n=".deco/blocks/";if(!e.startsWith(n)||!e.endsWith(".json"))return null;const r=e.slice(n.length,-5);return mr(r)}function wr(t){if(!t)return"plaintext";const e=t.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function ws(t){const e=Je(t).split("/").filter(Boolean),n=["/"];let r="";for(const s of e.slice(0,-1))r+=`/${s}`,n.push(r);return n}function ys(t,e=[]){const n={children:[]},r=i=>{const l=Je(i).split("/").filter(Boolean);let c=n,d="";for(const m of l){d+=`/${m}`;let u=c.children.find(f=>f.name===m);u?u.kind==="file"&&(u.kind="directory"):(u={name:m,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of t){const l=Je(i).split("/").filter(Boolean);let c=n,d="";l.forEach((m,u)=>{d+=`/${m}`;const f=u===l.length-1;let v=c.children.find(x=>x.name===m);v||(v={name:m,path:d,kind:f?"file":"directory",children:[]},c.children.push(v)),c=v})}for(const i of e)r(_e(i));const s=i=>{i.sort((o,l)=>o.kind!==l.kind?o.kind==="directory"?-1:1:o.name.localeCompare(l.name));for(const o of i)o.children.length>0&&s(o.children)};return s(n.children),n.children}function yr(t,e,n=0){const r=[];for(const s of t)s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&e.has(s.path)&&r.push(...yr(s.children,e,n+1)));return r}function bs(t){return t.split(`
1
+ import{r as h,aN as tn,c as J,l as xe,j as a,J as nn,i as rn,B as Z,K as Ke,k as sn,ae as on,D as ln,m as an,t as Pe,ag as cn,G as un,e as dn}from"./index-CFiyU0D9.js";import{c as fn,d as mn,g as pn,b as hn,e as xn,a as gn,h as vn}from"./ZoomOut-6ix2H92j.js";import{c as wn,a as Ve,d as yt,e as bt}from"./dialog-BAqFyO8a.js";import{T as oe,a as le,b as ae}from"./tooltip-DrpiSbRG.js";import{n as Re,i as St}from"./Globe01-CyfpzbeQ.js";import{n as zt}from"./LinkExternal01-BHwVyDja.js";import{s as yn}from"./XClose-BaZ908gw.js";import{S as $e}from"./skeleton-B0I93PJP.js";import{l as bn,F as Sn}from"./index-B6hcksS9.js";import{F as Xe,M as zn}from"./file-type-icon-DPWxBpNL.js";import{D as jn,a as kn,b as Pn,c as it}from"./dropdown-menu-C62KNjwK.js";import{i as Cn}from"./LayoutLeft-fsm0LcB8.js";import{i as En,f as jt,n as Nn,d as kt,e as $n}from"./use-org-fs-DyK8omii.js";import{I as Mn}from"./input-BwRH-Gsz.js";import{a as In,P as Rn,b as Dn}from"./popover-BXFiEQtN.js";import{i as Ln}from"./ChevronUp-DBpw6M-L.js";import{a as _n}from"./Eye-bojNLUjA.js";import{i as An}from"./Key01-CwrJlZo0.js";const Ae=h.createContext(null);Ae.displayName="PanelGroupContext";const K={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Qe=10,pe=h.useLayoutEffect,ot=tn.useId,Tn=typeof ot=="function"?ot:()=>null;let Hn=0;function Ze(t=null){const e=Tn(),n=h.useRef(t||e||null);return n.current===null&&(n.current=""+Hn++),t??n.current}function Pt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:l,minSize:c,onCollapse:d,onExpand:m,onResize:u,order:f,style:v,tagName:x="div",...k}){const b=h.useContext(Ae);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:C,getPanelSize:I,getPanelStyle:j,groupId:F,isPanelCollapsed:$,reevaluatePanelConstraints:g,registerPanel:G,resizePanel:W,unregisterPanel:O}=b,A=Ze(o),D=h.useRef({callbacks:{onCollapse:d,onExpand:m,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:l,minSize:c},id:A,idIsFromProps:o!==void 0,order:f});h.useRef({didLogMissingDefaultSizeWarning:!1}),pe(()=>{const{callbacks:_,constraints:L}=D.current,T={...L};D.current.id=A,D.current.idIsFromProps=o!==void 0,D.current.order=f,_.onCollapse=d,_.onExpand=m,_.onResize=u,L.collapsedSize=n,L.collapsible=r,L.defaultSize=s,L.maxSize=l,L.minSize=c,(T.collapsedSize!==L.collapsedSize||T.collapsible!==L.collapsible||T.maxSize!==L.maxSize||T.minSize!==L.minSize)&&g(D.current,T)}),pe(()=>{const _=D.current;return G(_),()=>{O(_)}},[f,A,G,O]),h.useImperativeHandle(i,()=>({collapse:()=>{w(D.current)},expand:_=>{C(D.current,_)},getId(){return A},getSize(){return I(D.current)},isCollapsed(){return $(D.current)},isExpanded(){return!$(D.current)},resize:_=>{W(D.current,_)}}),[w,C,I,$,A,W]);const V=j(D.current,s);return h.createElement(x,{...k,children:t,className:e,id:A,style:{...V,...v},[K.groupId]:F,[K.panel]:"",[K.panelCollapsible]:r||void 0,[K.panelId]:A,[K.panelSize]:parseFloat(""+V.flexGrow).toFixed(1)})}const Ct=h.forwardRef((t,e)=>h.createElement(Pt,{...t,forwardedRef:e}));Pt.displayName="Panel";Ct.displayName="forwardRef(Panel)";let Ye=null,Ie=-1,de=null;function On(t,e){if(e){const n=(e&It)!==0,r=(e&Rt)!==0,s=(e&Dt)!==0,i=(e&Lt)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Un(){de!==null&&(document.head.removeChild(de),Ye=null,de=null,Ie=-1)}function Fe(t,e){var n,r;const s=On(t,e);if(Ye!==s){if(Ye=s,de===null&&(de=document.createElement("style"),document.head.appendChild(de)),Ie>=0){var i;(i=de.sheet)===null||i===void 0||i.removeRule(Ie)}Ie=(n=(r=de.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Et(t){return t.type==="keydown"}function Nt(t){return t.type.startsWith("pointer")}function $t(t){return t.type.startsWith("mouse")}function Te(t){if(Nt(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if($t(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Fn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Wn(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Bn(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:ct(t),b:ct(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;N(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:at(lt(n.a)),b:at(lt(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let l=i.length;for(;l--;){const c=i[l];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const Gn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qn(t){var e;const n=getComputedStyle((e=Mt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kn(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qn(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Gn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function lt(t){let e=t.length;for(;e--;){const n=t[e];if(N(n,"Missing node"),Kn(n))return n}return null}function at(t){return t&&Number(getComputedStyle(t).zIndex)||0}function ct(t){const e=[];for(;t;)e.push(t),t=Mt(t);return e}function Mt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const It=1,Rt=2,Dt=4,Lt=8,Vn=Fn()==="coarse";let re=[],be=!1,me=new Map,He=new Map;const Ce=new Set;function Xn(t,e,n,r,s){var i;const{ownerDocument:o}=e,l={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=me.get(o))!==null&&i!==void 0?i:0;return me.set(o,c+1),Ce.add(l),De(),function(){var m;He.delete(t),Ce.delete(l);const u=(m=me.get(o))!==null&&m!==void 0?m:1;if(me.set(o,u-1),De(),u===1&&me.delete(o),re.includes(l)){const f=re.indexOf(l);f>=0&&re.splice(f,1),tt(),s("up",!0,null)}}}function Yn(t){const{target:e}=t,{x:n,y:r}=Te(t);be=!0,et({target:e,x:n,y:r}),De(),re.length>0&&(Le("down",t),t.preventDefault(),_t(e)||t.stopImmediatePropagation())}function We(t){const{x:e,y:n}=Te(t);if(be&&t.buttons===0&&(be=!1,Le("up",t)),!be){const{target:r}=t;et({target:r,x:e,y:n})}Le("move",t),tt(),re.length>0&&t.preventDefault()}function Be(t){const{target:e}=t,{x:n,y:r}=Te(t);He.clear(),be=!1,re.length>0&&(t.preventDefault(),_t(e)||t.stopImmediatePropagation()),Le("up",t),et({target:e,x:n,y:r}),tt(),De()}function _t(t){let e=t;for(;e;){if(e.hasAttribute(K.resizeHandle))return!0;e=e.parentElement}return!1}function et({target:t,x:e,y:n}){re.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ce.forEach(s=>{const{element:i,hitAreaMargins:o}=s,l=i.getBoundingClientRect(),{bottom:c,left:d,right:m,top:u}=l,f=Vn?o.coarse:o.fine;if(e>=d-f&&e<=m+f&&n>=u-f&&n<=c+f){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&Bn(r,i)>0){let x=r,k=!1;for(;x&&!x.contains(i);){if(Wn(x.getBoundingClientRect(),l)){k=!0;break}x=x.parentElement}if(k)return}re.push(s)}})}function Ge(t,e){He.set(t,e)}function tt(){let t=!1,e=!1;re.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;He.forEach(r=>{n|=r}),t&&e?Fe("intersection",n):t?Fe("horizontal",n):e?Fe("vertical",n):Un()}let qe=new AbortController;function De(){qe.abort(),qe=new AbortController;const t={capture:!0,signal:qe.signal};Ce.size&&(be?(re.length>0&&me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Be,t),r.addEventListener("pointerleave",We,t),r.addEventListener("pointermove",We,t))}),window.addEventListener("pointerup",Be,t),window.addEventListener("pointercancel",Be,t)):me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Yn,t),r.addEventListener("pointermove",We,t))}))}function Le(t,e){Ce.forEach(n=>{const{setResizeHandlerState:r}=n,s=re.includes(n);r(t,s,e)})}function Jn(){const[t,e]=h.useState(0);return h.useCallback(()=>e(n=>n+1),[])}function N(t,e){if(!t)throw console.error(e),Error(e)}function he(t,e,n=Qe){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ce(t,e,n=Qe){return he(t,e,n)===0}function ee(t,e,n){return he(t,e,n)===0}function Qn(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],i=e[r];if(!ee(s,i,n))return!1}return!0}function ye({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];N(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:i,maxSize:o=100,minSize:l=0}=r;if(he(n,l)<0)if(i){const c=(s+l)/2;he(n,c)<0?n=s:n=l}else n=l;return n=Math.min(o,n),n=parseFloat(n.toFixed(Qe)),n}function je({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:i}){if(ee(t,0))return e;const o=[...e],[l,c]=r;N(l!=null,"Invalid first pivot index"),N(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=t<0?c:l,f=n[u];N(f,`Panel constraints not found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,v)){const w=k-b;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const u=t<0?l:c,f=n[u];N(f,`No panel constraints found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,k)){const w=b-v;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const u=t<0?1:-1;let f=t<0?c:l,v=0;for(;;){const k=e[f];N(k!=null,`Previous layout not found for panel index ${f}`);const w=ye({panelConstraints:n,panelIndex:f,size:100})-k;if(v+=w,f+=u,f<0||f>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(v));t=t<0?0-x:x}{let f=t<0?l:c;for(;f>=0&&f<n.length;){const v=Math.abs(t)-Math.abs(d),x=e[f];N(x!=null,`Previous layout not found for panel index ${f}`);const k=x-v,b=ye({panelConstraints:n,panelIndex:f,size:k});if(!ee(x,b)&&(d+=x-b,o[f]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(Qn(s,o))return s;{const u=t<0?c:l,f=e[u];N(f!=null,`Previous layout not found for panel index ${u}`);const v=f+d,x=ye({panelConstraints:n,panelIndex:u,size:v});if(o[u]=x,!ee(x,v)){let k=v-x,w=t<0?c:l;for(;w>=0&&w<n.length;){const C=o[w];N(C!=null,`Previous layout not found for panel index ${w}`);const I=C+k,j=ye({panelConstraints:n,panelIndex:w,size:I});if(ee(C,j)||(k-=j-C,o[w]=j),ee(k,0))break;t>0?w--:w++}}}const m=o.reduce((u,f)=>f+u,0);return ee(m,100)?o:s}function Zn({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const l=n[0];N(l!=null,"No pivot index found"),e.forEach((u,f)=>{const{constraints:v}=u,{maxSize:x=100,minSize:k=0}=v;f===l?(r=k,s=x):(i+=k,o+=x)});const c=Math.min(s,100-i),d=Math.max(r,100-o),m=t[l];return{valueMax:c,valueMin:d,valueNow:m}}function Ee(t,e=document){return Array.from(e.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${t}"]`))}function At(t,e,n=document){const s=Ee(t,n).findIndex(i=>i.getAttribute(K.resizeHandleId)===e);return s??null}function Tt(t,e,n){const r=At(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Ht(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Oe(t,e=document){const n=e.querySelector(`[${K.resizeHandleId}="${t}"]`);return n||null}function er(t,e,n,r=document){var s,i,o,l;const c=Oe(e,r),d=Ee(t,r),m=c?d.indexOf(c):-1,u=(s=(i=n[m])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,f=(o=(l=n[m+1])===null||l===void 0?void 0:l.id)!==null&&o!==void 0?o:null;return[u,f]}function tr({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){h.useRef({didWarnAboutMissingResizeHandle:!1}),pe(()=>{if(!i)return;const l=Ee(n,i);for(let c=0;c<s.length-1;c++){const{valueMax:d,valueMin:m,valueNow:u}=Zn({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),f=l[c];if(f!=null){const v=s[c];N(v,`No panel data found for index "${c}"`),f.setAttribute("aria-controls",v.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(m)),f.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{l.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),h.useEffect(()=>{if(!i)return;const l=e.current;N(l,"Eager values not found");const{panelDataArray:c}=l,d=Ht(n,i);N(d!=null,`No group found for id "${n}"`);const m=Ee(n,i);N(m,`No resize handles found for group id "${n}"`);const u=m.map(f=>{const v=f.getAttribute(K.resizeHandleId);N(v,"Resize handle element has no handle id attribute");const[x,k]=er(n,v,c,i);if(x==null||k==null)return()=>{};const b=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const C=c.findIndex(I=>I.id===x);if(C>=0){const I=c[C];N(I,`No panel data found for index ${C}`);const j=r[C],{collapsedSize:F=0,collapsible:$,minSize:g=0}=I.constraints;if(j!=null&&$){const G=je({delta:ee(j,F)?g-F:F-j,initialLayout:r,panelConstraints:c.map(W=>W.constraints),pivotIndices:Tt(n,v,i),prevLayout:r,trigger:"keyboard"});r!==G&&o(G)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{u.forEach(f=>f())}},[i,t,e,n,r,s,o])}function ut(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ot(t,e){const n=t==="horizontal",{x:r,y:s}=Te(e);return n?r:s}function nr(t,e,n,r,s){const i=n==="horizontal",o=Oe(e,s);N(o,`No resize handle element found for id "${e}"`);const l=o.getAttribute(K.groupId);N(l,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const d=Ot(n,t),m=Ht(l,s);N(m,`No group element found for id "${l}"`);const u=m.getBoundingClientRect(),f=i?u.width:u.height;return(d-c)/f*100}function rr(t,e,n,r,s,i){if(Et(t)){const o=n==="horizontal";let l=0;t.shiftKey?l=100:s!=null?l=s:l=10;let c=0;switch(t.key){case"ArrowDown":c=o?0:l;break;case"ArrowLeft":c=o?-l:0;break;case"ArrowRight":c=o?l:0;break;case"ArrowUp":c=o?0:-l;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:nr(t,e,n,r,i)}function sr({panelDataArray:t}){const e=Array(t.length),n=t.map(i=>i.constraints);let r=0,s=100;for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;l!=null&&(r++,e[i]=l,s-=l)}for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;if(l!=null)continue;const c=t.length-r,d=s/c;r++,e[i]=d,s-=d}return e}function ge(t,e,n){e.forEach((r,s)=>{const i=t[s];N(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:l,id:c}=i,{collapsedSize:d=0,collapsible:m}=l,u=n[c];if(u==null||r!==u){n[c]=r;const{onCollapse:f,onExpand:v,onResize:x}=o;x&&x(r,u),m&&(f||v)&&(v&&(u==null||ce(u,d))&&!ce(r,d)&&v(),f&&(u==null||!ce(u,d))&&ce(r,d)&&f())}})}function Me(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function ir({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:i=3}){const o=n[s];let l;return o==null?l=t!=null?t.toPrecision(i):"1":r.length===1?l="1":l=o.toPrecision(i),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function or(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function dt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Ut(t){return`react-resizable-panels:${t}`}function Ft(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Wt(t,e){try{const n=Ut(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function lr(t,e,n){var r,s;const i=(r=Wt(t,n))!==null&&r!==void 0?r:{},o=Ft(e);return(s=i[o])!==null&&s!==void 0?s:null}function ar(t,e,n,r,s){var i;const o=Ut(t),l=Ft(e),c=(i=Wt(t,s))!==null&&i!==void 0?i:{};c[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function ft({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!ee(r,100)&&n.length>0)for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=100/r*o;n[i]=l}let s=0;for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=ye({panelConstraints:e,panelIndex:i,size:o});o!=l&&(s+=o-l,n[i]=l)}if(!ee(s,0))for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=o+s,c=ye({panelConstraints:e,panelIndex:i,size:l});if(o!==c&&(s-=c-o,n[i]=c,ee(s,0)))break}return n}const cr=100,ke={getItem:t=>(dt(ke),ke.getItem(t)),setItem:(t,e)=>{dt(ke),ke.setItem(t,e)}},mt={};function Bt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:l=null,storage:c=ke,style:d,tagName:m="div",...u}){const f=Ze(i),v=h.useRef(null),[x,k]=h.useState(null),[b,w]=h.useState([]),C=Jn(),I=h.useRef({}),j=h.useRef(new Map),F=h.useRef(0),$=h.useRef({autoSaveId:t,direction:r,dragState:x,id:f,keyboardResizeBy:l,onLayout:o,storage:c}),g=h.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});h.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),h.useImperativeHandle(s,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:p}=g.current;return p},setLayout:p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current,y=ft({layout:p,panelConstraints:P.map(E=>E.constraints)});ut(M,y)||(w(y),g.current.layout=y,z&&z(y),ge(P,y,I.current))}}),[]),pe(()=>{$.current.autoSaveId=t,$.current.direction=r,$.current.dragState=x,$.current.id=f,$.current.onLayout=o,$.current.storage=c}),tr({committedValuesRef:$,eagerValuesRef:g,groupId:f,layout:b,panelDataArray:g.current.panelDataArray,setLayout:w,panelGroupElement:v.current}),h.useEffect(()=>{const{panelDataArray:p}=g.current;if(t){if(b.length===0||b.length!==p.length)return;let z=mt[t];z==null&&(z=or(ar,cr),mt[t]=z);const M=[...p],P=new Map(j.current);z(t,M,P,b,c)}},[t,b,c]),h.useEffect(()=>{});const G=h.useCallback(p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current;if(p.constraints.collapsible){const y=P.map(se=>se.constraints),{collapsedSize:E=0,panelSize:U,pivotIndices:X}=fe(P,p,M);if(N(U!=null,`Panel size not found for panel "${p.id}"`),!ce(U,E)){j.current.set(p.id,U);const ie=ve(P,p)===P.length-1?U-E:E-U,q=je({delta:ie,initialLayout:M,panelConstraints:y,pivotIndices:X,prevLayout:M,trigger:"imperative-api"});Me(M,q)||(w(q),g.current.layout=q,z&&z(q),ge(P,q,I.current))}}},[]),W=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current;if(p.constraints.collapsible){const E=y.map(ne=>ne.constraints),{collapsedSize:U=0,panelSize:X=0,minSize:se=0,pivotIndices:ie}=fe(y,p,P),q=z??se;if(ce(X,U)){const ne=j.current.get(p.id),Se=ne!=null&&ne>=q?ne:q,Ue=ve(y,p)===y.length-1?X-Se:Se-X,Q=je({delta:Ue,initialLayout:P,panelConstraints:E,pivotIndices:ie,prevLayout:P,trigger:"imperative-api"});Me(P,Q)||(w(Q),g.current.layout=Q,M&&M(Q),ge(y,Q,I.current))}}},[]),O=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{panelSize:P}=fe(M,p,z);return N(P!=null,`Panel size not found for panel "${p.id}"`),P},[]),A=h.useCallback((p,z)=>{const{panelDataArray:M}=g.current,P=ve(M,p);return ir({defaultSize:z,dragState:x,layout:b,panelData:M,panelIndex:P})},[x,b]),D=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),y===!0&&ce(E,P)},[]),V=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),!y||he(E,P)>0},[]),_=h.useCallback(p=>{const{panelDataArray:z}=g.current;z.push(p),z.sort((M,P)=>{const y=M.order,E=P.order;return y==null&&E==null?0:y==null?-1:E==null?1:y-E}),g.current.panelDataArrayChanged=!0,C()},[C]);pe(()=>{if(g.current.panelDataArrayChanged){g.current.panelDataArrayChanged=!1;const{autoSaveId:p,onLayout:z,storage:M}=$.current,{layout:P,panelDataArray:y}=g.current;let E=null;if(p){const X=lr(p,y,M);X&&(j.current=new Map(Object.entries(X.expandToSizes)),E=X.layout)}E==null&&(E=sr({panelDataArray:y}));const U=ft({layout:E,panelConstraints:y.map(X=>X.constraints)});ut(P,U)||(w(U),g.current.layout=U,z&&z(U),ge(y,U,I.current))}}),pe(()=>{const p=g.current;return()=>{p.layout=[]}},[]);const L=h.useCallback(p=>{let z=!1;const M=v.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(y){y.preventDefault();const E=v.current;if(!E)return()=>null;const{direction:U,dragState:X,id:se,keyboardResizeBy:ie,onLayout:q}=$.current,{layout:ne,panelDataArray:Se}=g.current,{initialLayout:Ne}=X??{},Ue=Tt(se,p,E);let Q=rr(y,p,U,X,ie,E);const rt=U==="horizontal";rt&&z&&(Q=-Q);const Zt=Se.map(en=>en.constraints),ze=je({delta:Q,initialLayout:Ne??ne,panelConstraints:Zt,pivotIndices:Ue,prevLayout:ne,trigger:Et(y)?"keyboard":"mouse-or-touch"}),st=!Me(ne,ze);(Nt(y)||$t(y))&&F.current!=Q&&(F.current=Q,!st&&Q!==0?rt?Ge(p,Q<0?It:Rt):Ge(p,Q<0?Dt:Lt):Ge(p,0)),st&&(w(ze),g.current.layout=ze,q&&q(ze),ge(Se,ze,I.current))}},[]),T=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current,E=y.map(ne=>ne.constraints),{panelSize:U,pivotIndices:X}=fe(y,p,P);N(U!=null,`Panel size not found for panel "${p.id}"`);const ie=ve(y,p)===y.length-1?U-z:z-U,q=je({delta:ie,initialLayout:P,panelConstraints:E,pivotIndices:X,prevLayout:P,trigger:"imperative-api"});Me(P,q)||(w(q),g.current.layout=q,M&&M(q),ge(y,q,I.current))},[]),H=h.useCallback((p,z)=>{const{layout:M,panelDataArray:P}=g.current,{collapsedSize:y=0,collapsible:E}=z,{collapsedSize:U=0,collapsible:X,maxSize:se=100,minSize:ie=0}=p.constraints,{panelSize:q}=fe(P,p,M);q!=null&&(E&&X&&ce(q,y)?ce(y,U)||T(p,U):q<ie?T(p,ie):q>se&&T(p,se))},[T]),Y=h.useCallback((p,z)=>{const{direction:M}=$.current,{layout:P}=g.current;if(!v.current)return;const y=Oe(p,v.current);N(y,`Drag handle element not found for id "${p}"`);const E=Ot(M,z);k({dragHandleId:p,dragHandleRect:y.getBoundingClientRect(),initialCursorPosition:E,initialLayout:P})},[]),te=h.useCallback(()=>{k(null)},[]),B=h.useCallback(p=>{const{panelDataArray:z}=g.current,M=ve(z,p);M>=0&&(z.splice(M,1),delete I.current[p.id],g.current.panelDataArrayChanged=!0,C())},[C]),S=h.useMemo(()=>({collapsePanel:G,direction:r,dragState:x,expandPanel:W,getPanelSize:O,getPanelStyle:A,groupId:f,isPanelCollapsed:D,isPanelExpanded:V,reevaluatePanelConstraints:H,registerPanel:_,registerResizeHandle:L,resizePanel:T,startDragging:Y,stopDragging:te,unregisterPanel:B,panelGroupElement:v.current}),[G,x,r,W,O,A,f,D,V,H,_,L,T,Y,te,B]),R={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return h.createElement(Ae.Provider,{value:S},h.createElement(m,{...u,children:e,className:n,id:i,ref:v,style:{...R,...d},[K.group]:"",[K.groupDirection]:r,[K.groupId]:f}))}const Gt=h.forwardRef((t,e)=>h.createElement(Bt,{...t,forwardedRef:e}));Bt.displayName="PanelGroup";Gt.displayName="forwardRef(PanelGroup)";function ve(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function fe(t,e,n){const r=ve(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function ur({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){h.useEffect(()=>{if(t||n==null||r==null)return;const s=Oe(e,r);if(s==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const l=s.getAttribute(K.groupId);N(l,`No group element found for id "${l}"`);const c=Ee(l,r),d=At(l,e,r);N(d!==null,`No resize element found for id "${e}"`);const m=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[m].focus();break}}};return s.addEventListener("keydown",i),()=>{s.removeEventListener("keydown",i)}},[r,t,e,n])}function qt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onClick:o,onDragging:l,onFocus:c,onPointerDown:d,onPointerUp:m,style:u={},tabIndex:f=0,tagName:v="div",...x}){var k,b;const w=h.useRef(null),C=h.useRef({onClick:o,onDragging:l,onPointerDown:d,onPointerUp:m});h.useEffect(()=>{C.current.onClick=o,C.current.onDragging=l,C.current.onPointerDown=d,C.current.onPointerUp=m});const I=h.useContext(Ae);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:j,groupId:F,registerResizeHandle:$,startDragging:g,stopDragging:G,panelGroupElement:W}=I,O=Ze(s),[A,D]=h.useState("inactive"),[V,_]=h.useState(!1),[L,T]=h.useState(null),H=h.useRef({state:A});pe(()=>{H.current.state=A}),h.useEffect(()=>{if(n)T(null);else{const S=$(O);T(()=>S)}},[n,O,$]);const Y=(k=r?.coarse)!==null&&k!==void 0?k:15,te=(b=r?.fine)!==null&&b!==void 0?b:5;h.useEffect(()=>{if(n||L==null)return;const S=w.current;N(S,"Element ref not attached");let R=!1;return Xn(O,S,j,{coarse:Y,fine:te},(z,M,P)=>{if(!M){D("inactive");return}switch(z){case"down":{D("drag"),R=!1,N(P,'Expected event to be defined for "down" action'),g(O,P);const{onDragging:y,onPointerDown:E}=C.current;y?.(!0),E?.();break}case"move":{const{state:y}=H.current;R=!0,y!=="drag"&&D("hover"),N(P,'Expected event to be defined for "move" action'),L(P);break}case"up":{D("hover"),G();const{onClick:y,onDragging:E,onPointerUp:U}=C.current;E?.(!1),U?.(),R||y?.();break}}})},[Y,j,n,te,$,O,L,g,G]),ur({disabled:n,handleId:O,resizeHandler:L,panelGroupElement:W});const B={touchAction:"none",userSelect:"none"};return h.createElement(v,{...x,children:t,className:e,id:s,onBlur:()=>{_(!1),i?.()},onFocus:()=>{_(!0),c?.()},ref:w,role:"separator",style:{...B,...u},tabIndex:f,[K.groupDirection]:j,[K.groupId]:F,[K.resizeHandle]:"",[K.resizeHandleActive]:A==="drag"?"pointer":V?"keyboard":void 0,[K.resizeHandleEnabled]:!n,[K.resizeHandleId]:O,[K.resizeHandleState]:A})}qt.displayName="PanelResizeHandle";function ls(t){const e=J.c(10);let n,r,s;e[0]!==t?({className:n,ref:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[4]=n,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==s||e[8]!==i?(o=a.jsx(Gt,{ref:s,"data-slot":"resizable-panel-group",className:i,...r}),e[6]=r,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function as(t){const e=J.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=a.jsx(Ct,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function cs(t){const e=J.c(12);let n,r,s;e[0]!==t?({withHandle:s,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=i):i=e[5];let o;e[6]!==s?(o=s&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(fn,{className:"size-2.5"})}),e[6]=s,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==i||e[10]!==o?(l=a.jsx(qt,{"data-slot":"resizable-handle",className:i,...r,children:o}),e[8]=r,e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function dr(t){if(!t||t.includes("\\")||t.includes("..")||t.includes("\0"))return!0;try{const e=decodeURIComponent(t);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==t&&e.includes("/")){const n=(t.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>n)return!0}return!1}catch{return!0}}function fr(t){if(dr(t))throw new Error(`Invalid block key: ${t||"(empty)"}`)}function mr(t){try{return decodeURIComponent(t)}catch{return t}}function pr(t){return fr(t),encodeURIComponent(t)}function hr(t){return`.deco/blocks/${pr(t)}.json`}function us(t){return`/${hr(t)}`}const ds=1e4,xr=3;function Je(t){return t.trim()?(t.startsWith("/")?t:`/${t}`).replace(/\/+/g,"/"):"/"}function nt(t){return t.startsWith("/")?t.slice(1):t}function _e(t){return t.trim()?t.startsWith("/")?t:`/${t}`:"/"}function gr(t){const e=_e(t);if(e==="/")return"/";const n=e.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function fs(t,e){const n=e.replace(/^\/+|\/+$/g,"");return _e(n?`${t==="/"?"":t}/${n}`:t)}function ms(t,e){return e==="directory"?t:gr(t)}function ps(t){const e=t.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function vr(t){const e=nt(t);return e?e.split("/").filter(Boolean).length:0}function hs(t,e,n,r=!1){return{files:[...new Set([...t,...n.files])],directories:[...new Set([...e,...n.directories??[]])],truncated:r||!!n.truncated}}function xs(t,e){return vr(t)>=xr&&!e.has(t)}function gs(t,e,n=[]){const r=nt(t);if(e.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return e.some(i=>i.startsWith(s))||n.some(i=>i.startsWith(s))}function vs(t){const e=nt(t),n=".deco/blocks/";if(!e.startsWith(n)||!e.endsWith(".json"))return null;const r=e.slice(n.length,-5);return mr(r)}function wr(t){if(!t)return"plaintext";const e=t.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function ws(t){const e=Je(t).split("/").filter(Boolean),n=["/"];let r="";for(const s of e.slice(0,-1))r+=`/${s}`,n.push(r);return n}function ys(t,e=[]){const n={children:[]},r=i=>{const l=Je(i).split("/").filter(Boolean);let c=n,d="";for(const m of l){d+=`/${m}`;let u=c.children.find(f=>f.name===m);u?u.kind==="file"&&(u.kind="directory"):(u={name:m,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of t){const l=Je(i).split("/").filter(Boolean);let c=n,d="";l.forEach((m,u)=>{d+=`/${m}`;const f=u===l.length-1;let v=c.children.find(x=>x.name===m);v||(v={name:m,path:d,kind:f?"file":"directory",children:[]},c.children.push(v)),c=v})}for(const i of e)r(_e(i));const s=i=>{i.sort((o,l)=>o.kind!==l.kind?o.kind==="directory"?-1:1:o.name.localeCompare(l.name));for(const o of i)o.children.length>0&&s(o.children)};return s(n.children),n.children}function yr(t,e,n=0){const r=[];for(const s of t)s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&e.has(s.path)&&r.push(...yr(s.children,e,n+1)));return r}function bs(t){return t.split(`
2
2
  `).map(e=>{const n=e.match(/^\d+\t(.*)/);return n?n[1]:e}).join(`
3
3
  `)}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function br(t){const e=J.c(11),{value:n,filename:r}=t,[s]=nn(),i=s.theme==="dark"||s.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=wr(r),e[0]=r,e[1]=o):o=e[1];const l=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsx(rn,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},m={top:12,bottom:12},e[3]=d,e[4]=m):(d=e[3],m=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:m,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let f;return e[6]!==r||e[7]!==o||e[8]!==l||e[9]!==n?(f=a.jsx(Sn,{path:r,language:o,value:n,theme:l,loading:c,options:u},r),e[6]=r,e[7]=o,e[8]=l,e[9]=n,e[10]=f):f=e[10],f}function Kt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}const Sr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),zr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),pt=2*1024*1024;function jr(t,e){const n=t.split(".").pop()?.toLowerCase()??"";return Sr.has(n)?"image":n==="pdf"?"pdf":n==="html"||n==="htm"?"html":n==="md"||n==="markdown"?e<=pt?"markdown":"download":zr.has(n)&&e<=pt?"text":"download"}function Vt(){const t=J.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx($e,{className:"h-6 w-2/3"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,a.jsxs("div",{className:"flex flex-col gap-1.5",children:[a.jsx($e,{className:"h-3 w-full"}),a.jsx($e,{className:"h-3 w-5/6"}),a.jsx($e,{className:"h-3 w-2/3"})]})]})}),t[1]=n):n=t[1],n}function Xt(t){const e=J.c(20),{file:n,note:r}=t;let s;e[0]!==n.filename?(s=a.jsx(Xe,{filename:n.filename,className:"h-12 w-10"}),e[0]=n.filename,e[1]=s):s=e[1];let i;e[2]!==n.filename?(i=a.jsx("span",{className:"text-sm font-medium text-foreground",children:n.filename}),e[2]=n.filename,e[3]=i):i=e[3];let o;e[4]!==n.size?(o=Kt(n.size),e[4]=n.size,e[5]=o):o=e[5];const l=r?` · ${r}`:"";let c;e[6]!==o||e[7]!==l?(c=a.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,l]}),e[6]=o,e[7]=l,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=a.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Re,{size:14}),e[12]=m):m=e[12];let u;e[13]!==n.downloadUrl||e[14]!==n.filename?(u=a.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:a.jsxs("a",{href:n.downloadUrl,download:n.filename,children:[m,"Download"]})}),e[13]=n.downloadUrl,e[14]=n.filename,e[15]=u):u=e[15];let f;return e[16]!==s||e[17]!==d||e[18]!==u?(f=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[s,d,u]})}),e[16]=s,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function ht(t){const e=J.c(16),{file:n,markdown:r}=t;let s;e[0]!==n.downloadUrl?(s=Ke.fileText(n.downloadUrl),e[0]=n.downloadUrl,e[1]=s):s=e[1];let i;e[2]!==n.downloadUrl?(i=async()=>{const u=await fetch(n.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=n.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==s||e[5]!==i?(o={queryKey:s,queryFn:i,staleTime:6e4,retry:!1},e[4]=s,e[5]=i,e[6]=o):o=e[6];const{data:l,isPending:c,isError:d}=sn(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(Vt,{}),e[7]=u):u=e[7],u}if(d||l===void 0){let u;return e[8]!==n?(u=a.jsx(Xt,{file:n,note:"preview unavailable"}),e[8]=n,e[9]=u):u=e[9],u}if(r){const u=`file-preview-${n.key}`;let f;return e[10]!==l||e[11]!==u?(f=a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:a.jsx(zn,{id:u,text:l})})}),e[10]=l,e[11]=u,e[12]=f):f=e[12],f}let m;return e[13]!==l||e[14]!==n.filename?(m=a.jsx(br,{value:l,filename:n.filename}),e[13]=l,e[14]=n.filename,e[15]=m):m=e[15],m}function kr(t){const e=J.c(15),{file:n}=t;switch(jr(n.filename,n.size)){case"image":{let s;return e[0]!==n.downloadUrl||e[1]!==n.filename?(s=a.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:a.jsx("img",{src:n.downloadUrl,alt:n.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=n.downloadUrl,e[1]=n.filename,e[2]=s):s=e[2],s}case"pdf":{let s;return e[3]!==n.downloadUrl||e[4]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,className:"block h-full w-full bg-white"}),e[3]=n.downloadUrl,e[4]=n.filename,e[5]=s):s=e[5],s}case"html":{let s;return e[6]!==n.downloadUrl||e[7]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=n.downloadUrl,e[7]=n.filename,e[8]=s):s=e[8],s}case"markdown":{let s;return e[9]!==n?(s=a.jsx(ht,{file:n,markdown:!0}),e[9]=n,e[10]=s):s=e[10],s}case"text":{let s;return e[11]!==n?(s=a.jsx(ht,{file:n,markdown:!1}),e[11]=n,e[12]=s):s=e[12],s}default:{let s;return e[13]!==n?(s=a.jsx(Xt,{file:n}),e[13]=n,e[14]=s):s=e[14],s}}}function Pr(t){const e=J.c(40),{readUrl:n,editor:r,downloadName:s,trailing:i}=t;let o;e[0]!==n?(o=new URL(n,window.location.origin).toString(),e[0]=n,e[1]=o):o=e[1];const l=o;let c;e[2]!==r?(c=r.deckDetected&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.railOpen?"secondary":"ghost",size:"icon","aria-label":r.railOpen?"Hide slide list":"Show slide list",onClick:()=>r.setRailOpen(!r.railOpen),children:a.jsx(Cn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==l?(d=()=>window.open(l,"_blank","noopener"),e[4]=l,e[5]=d):d=e[5];let m;e[6]!==l?(m=a.jsx("span",{className:"truncate",children:l}),e[6]=l,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==d||e[10]!==m?(u=a.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:l,children:m}),e[8]=l,e[9]=d,e[10]=m,e[11]=u):u=e[11];let f;e[12]!==r.agentUpdated||e[13]!==r.reload?(f=r.agentUpdated&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:r.reload,children:[a.jsx(on,{size:12}),"Agent updated — reload"]})}),a.jsx(ae,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=r.agentUpdated,e[13]=r.reload,e[14]=f):f=e[14];let v;e[15]!==r.saving?(v=r.saving&&a.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=r.saving,e[16]=v):v=e[16];let x;e[17]!==r?(x=r.deckDetected&&r.writable&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.editMode?"secondary":"ghost",size:"icon","aria-label":r.editMode?"Done editing":"Edit inline",className:xe(r.editMode&&"text-primary"),onClick:()=>r.setEditMode(!r.editMode),children:a.jsx(mn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=r,e[18]=x):x=e[18];let k;e[19]!==l||e[20]!==s||e[21]!==r.deckDetected?(k=r.deckDetected?a.jsxs(jn,{children:[a.jsx(kn,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:a.jsx(Re,{size:14})})}),a.jsxs(Pn,{align:"end",children:[a.jsxs(it,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[a.jsx(pn,{size:14}),"Export as PDF"]}),a.jsx(it,{asChild:!0,children:a.jsxs("a",{href:l,download:s,children:[a.jsx(hn,{size:14}),"Download HTML"]})})]})]}):a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:a.jsx("a",{href:l,download:s,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),e[19]=l,e[20]=s,e[21]=r.deckDetected,e[22]=k):k=e[22];let b;e[23]!==l?(b=()=>window.open(l,"_blank","noopener"),e[23]=l,e[24]=b):b=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(zt,{size:14}),e[25]=w):w=e[25];let C;e[26]!==b?(C=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:w})}),e[26]=b,e[27]=C):C=e[27];let I;e[28]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx(ae,{side:"bottom",children:"Open in new tab"}),e[28]=I):I=e[28];let j;e[29]!==C?(j=a.jsxs(oe,{children:[C,I]}),e[29]=C,e[30]=j):j=e[30];let F;return e[31]!==j||e[32]!==c||e[33]!==u||e[34]!==f||e[35]!==v||e[36]!==x||e[37]!==k||e[38]!==i?(F=a.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,f,v,x,k,j,i]}),e[31]=j,e[32]=c,e[33]=u,e[34]=f,e[35]=v,e[36]=x,e[37]=k,e[38]=i,e[39]=F):F=e[39],F}const we=1;function Cr(t){if(typeof t!="object"||t===null||t.v!==we||t.source!=="deck-viewer")return null;const e=t;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ue extends Error{constructor(e,n){super(e),this.code=n,this.name="DeckOpError"}code}function Yt(t){return[...t.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Er(t){const n=new DOMParser().parseFromString(t,"text/html").querySelector("deck-viewer");return n?Yt(n).length:null}function Nr(t,e){const n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelector("deck-viewer");if(!r)throw new ue("no <deck-viewer> element in source","no-viewer");const s=Yt(r),i=e.kind==="move"?e.from:e.at,o=s[i];if(!o)throw new ue(`slide index ${i} out of range (${s.length})`,"stale-index");switch(e.kind){case"remove":{if(s.length<=1)throw new ue("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=s.length)throw new ue(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?s[e.to]:s[e.to].nextSibling;r.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ue(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ue("replace html has no root element","bad-op");o.replaceWith(n.importNode(d,!0));break}default:throw new ue(`unknown op kind: ${e.kind}`,"bad-op")}return`${t.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
4
4
  `:""}${n.documentElement.outerHTML}
5
- `}const xt="home",$r=400,Mr=800;function Ir(t){const e=t.savePath!==void 0,{org:n}=ln(),r=an(),s=En(xt),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,m]=h.useState(!1),[u,f]=h.useState(!1),[v,x]=h.useState(!1),[k,b]=h.useState(!1),[w,C]=h.useState(null),[I,j]=h.useState(null),[F,$]=h.useState(0),[g]=h.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),G=i||k||v,W=()=>{t.savePath!==void 0&&(r.invalidateQueries({queryKey:Ke.orgFsStat(n.id,xt,t.savePath)}),r.invalidateQueries({queryKey:Ke.orgFsRecent(n.id)}))},O=S=>{g.iframe?.contentWindow?.postMessage(S,"*")},A=()=>{g.source=null,f(!1),I&&C(I),$(S=>S+1),W()};t.statMarker!==I&&(j(t.statMarker),t.statMarker!==null&&(w===null?C(t.statMarker):g.selfMarkers.has(t.statMarker)||t.statMarker!==w&&(G?f(!0):(g.source=null,C(t.statMarker)))));const D=async()=>{g.saveTimer=null;const S=g.source;if(S===null){b(!1);return}x(!0);try{const R=await s.mutateAsync({path:t.savePath,body:S});g.selfMarkers.add(jt(R)),W()}catch(R){console.error("[deck-editor] save failed",R),Pe.error("Couldn't save deck edits — reloading the preview."),H.current.reload()}finally{x(!1),b(!1)}},V=S=>{b(!0),g.saveTimer&&clearTimeout(g.saveTimer),g.saveTimer=setTimeout(()=>{H.current.flushSave()},S)},_=(S,R,p)=>{O({v:we,type:"ack",opId:S,ok:R,error:p})},L=async S=>{if(!e){_(S.opId,!1,"read-only preview");return}try{if(g.source===null){const p=await fetch(t.readUrl,{credentials:"include"});if(!p.ok)throw new Error(`HTTP ${p.status}`);g.source=await p.text()}const R=Er(g.source);if(R===null||R!==S.witness.childCount)throw new ue(`slide count drifted (source ${R}, iframe ${S.witness.childCount})`,"stale-index");g.source=Nr(g.source,S.op),_(S.opId,!0),V(S.op.kind==="replace"?Mr:$r)}catch(R){console.error("[deck-editor] op failed",S.op,R),_(S.opId,!1,R instanceof Error?R.message:String(R)),Pe.error("That edit couldn't be saved — reloading the preview."),H.current.reload()}},T=S=>{if(!g.iframe||S.source!==g.iframe.contentWindow)return;const R=Cr(S.data);if(R){if(R.type==="ready"){c(!0),H.current.editMode?O({v:we,type:"set-edit-mode",enabled:!0}):H.current.railOpen&&O({v:we,type:"set-rail",open:!0});return}R.type==="op"&&(g.queue=g.queue.then(()=>H.current.handleOp(R)).catch(()=>{}))}},H=h.useRef({onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d});H.current={onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d};const[Y]=h.useState(()=>{let S=null;return R=>{if(R){g.iframe=R;const p=z=>H.current.onMessage(z);window.addEventListener("message",p),S=()=>window.removeEventListener("message",p)}else S?.(),S=null,g.iframe=null}}),te=S=>{m(S),O({v:we,type:"set-rail",open:S})},B=S=>{o(S),O({v:we,type:"set-edit-mode",enabled:S}),S&&m(!0),!S&&u&&!k&&!v&&A()};return{iframeRef:Y,deckDetected:l,writable:e,displayedMarker:w===null?null:`${w}.${F}`,editMode:i,setEditMode:B,railOpen:d,setRailOpen:te,saving:v,agentUpdated:u,reload:A,postToIframe:O}}const Rr=300;function Dr({readUrl:t,marker:e,title:n,savePath:r,trailing:s}){const i=Ir({readUrl:t,statMarker:e,savePath:r}),[o,l]=h.useState(null);if(i.displayedMarker===null)return null;const c=t.includes("?")?"&":"?",d=`${t}${c}v=${encodeURIComponent(i.displayedMarker)}`,m=o===d;return a.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[a.jsx(Pr,{readUrl:t,editor:i,downloadName:n.split("/").pop()??n,trailing:s}),a.jsx("div",{className:"relative flex-1",children:a.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>l(d),sandbox:"allow-scripts",className:xe("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",m?"opacity-100":"opacity-0"),style:{transitionDuration:`${Rr}ms`},title:n},d)})]})}const Lr=[{mode:"private",label:"Org only",Icon:cn},{mode:"public",label:"Public",Icon:St},{mode:"password",label:"Password",Icon:An}];function Jt(t){const e=J.c(38),{volume:n,path:r,kind:s,shareMode:i,effectivePublic:o,url:l}=t,c=Nn(n),{data:d}=kt(n,r),m=d?.shareMode??i,f=(d?.effectivePublic??o)&&m==="private",v=s==="dir",x=v?"folder":"file",[k,b]=h.useState(!1),[w,C]=h.useState(""),[I,j]=h.useState(!1);let F;e[0]!==r||e[1]!==c||e[2]!==x?(F=(B,S)=>{c.mutate({path:r,mode:B,password:S},{onSuccess:()=>{b(!1),C(""),Pe.success(B==="private"?`This ${x} is now org-only`:B==="public"?`Anyone with the link can now view this ${x}`:`This ${x} is now password-protected`)},onError:_r})},e[0]=r,e[1]=c,e[2]=x,e[3]=F):F=e[3];const $=F;let g;e[4]!==$?(g=B=>{if(B==="password"){b(!0);return}b(!1),$(B)},e[4]=$,e[5]=g):g=e[5];const G=g,W=k?"password":m;let O;e[6]!==l?(O=async()=>{l&&(await navigator.clipboard.writeText(l),j(!0),Pe.success("Link copied to clipboard"),setTimeout(()=>j(!1),2e3))},e[6]=l,e[7]=O):O=e[7];const A=O;let D;e[8]!==I||e[9]!==A||e[10]!==l?(D=l?a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[a.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l}),a.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:A,"aria-label":"Copy link",children:I?a.jsx(Ln,{size:12,className:"text-green-600"}):a.jsx(_n,{size:12})})]}):null,e[8]=I,e[9]=A,e[10]=l,e[11]=D):D=e[11];const V=D;if(f){let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:a.jsx(St,{size:16})}),e[12]=B):B=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=S):S=e[13];const R=v?"files in this folder":"this file";let p;e[14]!==R?(p=a.jsxs("div",{className:"flex items-start gap-3",children:[B,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S,a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",R,". Manage sharing on the parent folder."]})]})]}),e[14]=R,e[15]=p):p=e[15];let z;return e[16]!==V||e[17]!==p?(z=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[p,V]}),e[16]=V,e[17]=p,e[18]=z):z=e[18],z}let _;e[19]!==W||e[20]!==G||e[21]!==c.isPending?(_=Lr.map(B=>{const{mode:S,label:R,Icon:p}=B;return a.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>G(S),className:xe("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",W===S?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(p,{size:15}),R]},S)}),e[19]=W,e[20]=G,e[21]=c.isPending,e[22]=_):_=e[22];let L;e[23]!==_?(L=a.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:_}),e[23]=_,e[24]=L):L=e[24];const T=W==="private"?`Only members of your organization can open ${v?"these files":"this link"}.`:W==="public"?v?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${v?"files in this folder":"this file"}.`;let H;e[25]!==T?(H=a.jsx("p",{className:"text-xs text-muted-foreground",children:T}),e[25]=T,e[26]=H):H=e[26];let Y;e[27]!==W||e[28]!==$||e[29]!==m||e[30]!==w||e[31]!==c.isPending?(Y=W==="password"&&a.jsxs("form",{className:"flex items-center gap-2",onSubmit:B=>{B.preventDefault(),w&&$("password",w)},children:[a.jsx(Mn,{type:"password",value:w,onChange:B=>C(B.target.value),placeholder:m==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),a.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!w||c.isPending,children:m==="password"?"Update":"Set"})]}),e[27]=W,e[28]=$,e[29]=m,e[30]=w,e[31]=c.isPending,e[32]=Y):Y=e[32];let te;return e[33]!==V||e[34]!==L||e[35]!==H||e[36]!==Y?(te=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[L,H,Y,V]}),e[33]=V,e[34]=L,e[35]=H,e[36]=Y,e[37]=te):te=e[37],te}function _r(t){return Pe.error(t instanceof Error?t.message:"Failed to update sharing")}function gt(t){const e=J.c(7),{volume:n,path:r,shareMode:s,effectivePublic:i,url:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(In,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:a.jsx(xn,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Share"})]}),e[0]=l):l=e[0];let c;return e[1]!==i||e[2]!==r||e[3]!==s||e[4]!==o||e[5]!==n?(c=a.jsxs(Rn,{children:[l,a.jsx(Dn,{align:"end",className:"w-80 p-3",children:a.jsx(Jt,{volume:n,path:r,kind:"file",shareMode:s,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=r,e[3]=s,e[4]=o,e[5]=n,e[6]=c):c=e[6],c}function Ss(t){const e=J.c(11),{target:n,onOpenChange:r}=t,s=!!n,i=n?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=a.jsx(wn,{children:a.jsxs(Ve,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n?(l=n&&a.jsx(Jt,{...n}),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==l?(c=a.jsxs(yt,{className:"sm:max-w-md",children:[o,l]}),e[4]=o,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==s||e[9]!==c?(d=a.jsx(bt,{open:s,onOpenChange:r,children:c}),e[7]=r,e[8]=s,e[9]=c,e[10]=d):d=e[10],d}function Ar(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",r=n?e[1]??null:null,s=n?r?`public-${r}`:null:e[0]??null,i=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:s,dirPath:i,isPublic:n,publicSet:r,readOnly:n}}function zs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const vt="public-";function Tr(t){return t.startsWith(vt)?t.slice(vt.length):null}function js(t,e){const n=Tr(t);return n?`public/${n}/${e}`:`${t}/${e}`}function Hr(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Or(t){const e=J.c(11),{org:n,previewPath:r}=t;let s;e[0]!==r?(s=r.split("/").slice(0,-1).join("/"),e[0]=r,e[1]=s):s=e[1];const i=s;let o;e[2]!==n?(o={org:n},e[2]=n,e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==r?(l={path:i,preview:r},e[4]=i,e[5]=r,e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(gn,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==l?(d=a.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:a.jsxs(un,{to:"/$org/files",params:o,search:l,children:[c,"See in library"]})}),e[8]=o,e[9]=l,e[10]=d):d=e[10],d}const Ur=t=>/\.html?$/i.test(t);function wt(t){const e=J.c(6),{onClose:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yn,{size:14}),e[0]=r):r=e[0];let s;e[1]!==n?(s=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:n,children:r})}),e[1]=n,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(ae,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==s?(o=a.jsxs(oe,{children:[s,i]}),e[4]=s,e[5]=o):o=e[5],o}function Qt(t){const e=J.c(37),{previewPath:n,onClose:r,showSeeInLibrary:s,variant:i}=t,o=s===void 0?!1:s;let l;e[0]!==n?(l=Ar(n),e[0]=n,e[1]=l):l=e[1];const c=l,{volume:d,dirPath:m}=c,{data:u,isPending:f}=kt(d,m),v=$n(d??""),x=Hr(m);let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={strict:!1},e[2]=k):k=e[2];const{org:b}=dn(k),w=i==="dialog";let C;e[3]!==b||e[4]!==n||e[5]!==o?(C=o&&b?a.jsx(Or,{org:b,previewPath:n}):null,e[3]=b,e[4]=n,e[5]=o,e[6]=C):C=e[6];const I=C,j=u&&u.kind==="file"?{key:n,filename:x,size:u.size,downloadUrl:v(u.path)}:null;if(j&&u&&Ur(x)){const O=j.downloadUrl;let A;e[7]!==u?(A=jt(u),e[7]=u,e[8]=A):A=e[8];const D=d??"",V=u.shareMode??"private",_=u.effectivePublic??!1,L=window.location.origin+j.downloadUrl;let T;e[9]!==m||e[10]!==L||e[11]!==D||e[12]!==V||e[13]!==_?(T=a.jsx(gt,{volume:D,path:m,shareMode:V,effectivePublic:_,url:L}),e[9]=m,e[10]=L,e[11]=D,e[12]=V,e[13]=_,e[14]=T):T=e[14];let H;e[15]!==w||e[16]!==r?(H=w?a.jsx("div",{className:"w-8 shrink-0"}):a.jsx(wt,{onClose:r}),e[15]=w,e[16]=r,e[17]=H):H=e[17];let Y;return e[18]!==I||e[19]!==T||e[20]!==H?(Y=a.jsxs(a.Fragment,{children:[T,I,H]}),e[18]=I,e[19]=T,e[20]=H,e[21]=Y):Y=e[21],a.jsxs(a.Fragment,{children:[w&&a.jsx(Ve,{className:"sr-only",children:x}),a.jsx(Dr,{readUrl:O,marker:A,title:x,savePath:d==="home"?m:void 0,trailing:Y},n)]})}const F=w?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let $;e[22]!==F?($=xe("flex shrink-0 items-center gap-1 border-b border-border/60",F),e[22]=F,e[23]=$):$=e[23];let g;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==j||e[27]!==m||e[28]!==d?(g=j&&a.jsxs(a.Fragment,{children:[a.jsx(gt,{volume:d??"",path:m,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+j.downloadUrl}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:a.jsx("a",{href:j.downloadUrl,download:j.filename,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(j.downloadUrl,"_blank","noopener"),children:a.jsx(zt,{size:14})})}),a.jsx(ae,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=j,e[27]=m,e[28]=d,e[29]=g):g=e[29];let G;e[30]!==w||e[31]!==r?(G=!w&&a.jsx(wt,{onClose:r}),e[30]=w,e[31]=r,e[32]=G):G=e[32];let W;return e[33]!==j||e[34]!==x||e[35]!==f?(W=a.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:j?a.jsx(kr,{file:j}):f?a.jsx(Vt,{}):a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[a.jsx(Xe,{filename:x,className:"h-7.5 w-6"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=j,e[34]=x,e[35]=f,e[36]=W):W=e[36],a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:$,children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[a.jsx(Xe,{filename:x,className:"h-4.5 w-3.5 shrink-0"}),w?a.jsx(Ve,{className:"truncate text-xs font-medium text-foreground",children:x}):a.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:x}),j&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Kt(j.size)})]}),I,g,G]}),W]})}function ks(t){const e=J.c(4),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;return e[0]!==r||e[1]!==n||e[2]!==i?(o=a.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"panel"})}),e[0]=r,e[1]=n,e[2]=i,e[3]=o):o=e[3],o}function Fr(t){const e=J.c(5),{icon:n}=t;if(n.kind==="component"){const{Component:s}=n;let i;return e[0]!==s?(i=a.jsx(s,{className:"size-4"}),e[0]=s,e[1]=i):i=e[1],i}if(n.kind==="url"){let s;return e[2]!==n.src?(s=a.jsx("img",{src:n.src,alt:"",className:"size-4 rounded-sm object-cover"}),e[2]=n.src,e[3]=s):s=e[3],s}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(vn,{className:"size-4"}),e[4]=r):r=e[4],r}function Ps(t){const e=J.c(13),{title:n,icon:r,active:s,onClick:i}=t,o=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let l;e[0]!==o?(l=xe("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]",o),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==r?(c=a.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:a.jsx(Fr,{icon:r})}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==n?(d=a.jsx("span",{className:"whitespace-nowrap text-sm font-medium leading-none",children:n}),e[4]=n,e[5]=d):d=e[5];let m;return e[6]!==s||e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d||e[11]!==n?(m=a.jsxs("button",{type:"button",onClick:i,"aria-pressed":s,"aria-label":n,className:l,children:[c,d]}),e[6]=s,e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=n,e[12]=m):m=e[12],m}function Cs(t){const e=J.c(9),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;e[0]!==r?(o=d=>{d||r()},e[0]=r,e[1]=o):o=e[1];let l;e[2]!==r||e[3]!==n||e[4]!==i?(l=a.jsx(yt,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"dialog"})}),e[2]=r,e[3]=n,e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==l?(c=a.jsx(bt,{open:!0,onOpenChange:o,children:l}),e[6]=o,e[7]=l,e[8]=c):c=e[8],c}export{gr as A,fs as B,gs as C,vs as D,xr as E,Vt as F,hs as G,Dr as H,ks as L,as as R,Ss as S,Fr as T,us as a,fr as b,kr as c,hr as d,gt as e,Kt as f,wr as g,cs as h,ls as i,Ps as j,Cs as k,Hr as l,zs as m,Tr as n,js as o,Ar as p,ds as q,ws as r,ys as s,yr as t,ms as u,nt as v,_e as w,xs as x,bs as y,ps as z};
5
+ `}const xt="home",$r=400,Mr=800;function Ir(t){const e=t.savePath!==void 0,{org:n}=ln(),r=an(),s=En(xt),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,m]=h.useState(!1),[u,f]=h.useState(!1),[v,x]=h.useState(!1),[k,b]=h.useState(!1),[w,C]=h.useState(null),[I,j]=h.useState(null),[F,$]=h.useState(0),[g]=h.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),G=i||k||v,W=()=>{t.savePath!==void 0&&(r.invalidateQueries({queryKey:Ke.orgFsStat(n.id,xt,t.savePath)}),r.invalidateQueries({queryKey:Ke.orgFsRecent(n.id)}))},O=S=>{g.iframe?.contentWindow?.postMessage(S,"*")},A=()=>{g.source=null,f(!1),I&&C(I),$(S=>S+1),W()};t.statMarker!==I&&(j(t.statMarker),t.statMarker!==null&&(w===null?C(t.statMarker):g.selfMarkers.has(t.statMarker)||t.statMarker!==w&&(G?f(!0):(g.source=null,C(t.statMarker)))));const D=async()=>{g.saveTimer=null;const S=g.source;if(S===null){b(!1);return}x(!0);try{const R=await s.mutateAsync({path:t.savePath,body:S});g.selfMarkers.add(jt(R)),W()}catch(R){console.error("[deck-editor] save failed",R),Pe.error("Couldn't save deck edits — reloading the preview."),H.current.reload()}finally{x(!1),b(!1)}},V=S=>{b(!0),g.saveTimer&&clearTimeout(g.saveTimer),g.saveTimer=setTimeout(()=>{H.current.flushSave()},S)},_=(S,R,p)=>{O({v:we,type:"ack",opId:S,ok:R,error:p})},L=async S=>{if(!e){_(S.opId,!1,"read-only preview");return}try{if(g.source===null){const p=await fetch(t.readUrl,{credentials:"include"});if(!p.ok)throw new Error(`HTTP ${p.status}`);g.source=await p.text()}const R=Er(g.source);if(R===null||R!==S.witness.childCount)throw new ue(`slide count drifted (source ${R}, iframe ${S.witness.childCount})`,"stale-index");g.source=Nr(g.source,S.op),_(S.opId,!0),V(S.op.kind==="replace"?Mr:$r)}catch(R){console.error("[deck-editor] op failed",S.op,R),_(S.opId,!1,R instanceof Error?R.message:String(R)),Pe.error("That edit couldn't be saved — reloading the preview."),H.current.reload()}},T=S=>{if(!g.iframe||S.source!==g.iframe.contentWindow)return;const R=Cr(S.data);if(R){if(R.type==="ready"){c(!0),H.current.editMode?O({v:we,type:"set-edit-mode",enabled:!0}):H.current.railOpen&&O({v:we,type:"set-rail",open:!0});return}R.type==="op"&&(g.queue=g.queue.then(()=>H.current.handleOp(R)).catch(()=>{}))}},H=h.useRef({onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d});H.current={onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d};const[Y]=h.useState(()=>{let S=null;return R=>{if(R){g.iframe=R;const p=z=>H.current.onMessage(z);window.addEventListener("message",p),S=()=>window.removeEventListener("message",p)}else S?.(),S=null,g.iframe=null}}),te=S=>{m(S),O({v:we,type:"set-rail",open:S})},B=S=>{o(S),O({v:we,type:"set-edit-mode",enabled:S}),S&&m(!0),!S&&u&&!k&&!v&&A()};return{iframeRef:Y,deckDetected:l,writable:e,displayedMarker:w===null?null:`${w}.${F}`,editMode:i,setEditMode:B,railOpen:d,setRailOpen:te,saving:v,agentUpdated:u,reload:A,postToIframe:O}}const Rr=300;function Dr({readUrl:t,marker:e,title:n,savePath:r,trailing:s}){const i=Ir({readUrl:t,statMarker:e,savePath:r}),[o,l]=h.useState(null);if(i.displayedMarker===null)return null;const c=t.includes("?")?"&":"?",d=`${t}${c}v=${encodeURIComponent(i.displayedMarker)}`,m=o===d;return a.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[a.jsx(Pr,{readUrl:t,editor:i,downloadName:n.split("/").pop()??n,trailing:s}),a.jsx("div",{className:"relative flex-1",children:a.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>l(d),sandbox:"allow-scripts",className:xe("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",m?"opacity-100":"opacity-0"),style:{transitionDuration:`${Rr}ms`},title:n},d)})]})}const Lr=[{mode:"private",label:"Org only",Icon:cn},{mode:"public",label:"Public",Icon:St},{mode:"password",label:"Password",Icon:An}];function Jt(t){const e=J.c(38),{volume:n,path:r,kind:s,shareMode:i,effectivePublic:o,url:l}=t,c=Nn(n),{data:d}=kt(n,r),m=d?.shareMode??i,f=(d?.effectivePublic??o)&&m==="private",v=s==="dir",x=v?"folder":"file",[k,b]=h.useState(!1),[w,C]=h.useState(""),[I,j]=h.useState(!1);let F;e[0]!==r||e[1]!==c||e[2]!==x?(F=(B,S)=>{c.mutate({path:r,mode:B,password:S},{onSuccess:()=>{b(!1),C(""),Pe.success(B==="private"?`This ${x} is now org-only`:B==="public"?`Anyone with the link can now view this ${x}`:`This ${x} is now password-protected`)},onError:_r})},e[0]=r,e[1]=c,e[2]=x,e[3]=F):F=e[3];const $=F;let g;e[4]!==$?(g=B=>{if(B==="password"){b(!0);return}b(!1),$(B)},e[4]=$,e[5]=g):g=e[5];const G=g,W=k?"password":m;let O;e[6]!==l?(O=async()=>{l&&(await navigator.clipboard.writeText(l),j(!0),Pe.success("Link copied to clipboard"),setTimeout(()=>j(!1),2e3))},e[6]=l,e[7]=O):O=e[7];const A=O;let D;e[8]!==I||e[9]!==A||e[10]!==l?(D=l?a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[a.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l}),a.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:A,"aria-label":"Copy link",children:I?a.jsx(Ln,{size:12,className:"text-green-600"}):a.jsx(_n,{size:12})})]}):null,e[8]=I,e[9]=A,e[10]=l,e[11]=D):D=e[11];const V=D;if(f){let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:a.jsx(St,{size:16})}),e[12]=B):B=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=S):S=e[13];const R=v?"files in this folder":"this file";let p;e[14]!==R?(p=a.jsxs("div",{className:"flex items-start gap-3",children:[B,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S,a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",R,". Manage sharing on the parent folder."]})]})]}),e[14]=R,e[15]=p):p=e[15];let z;return e[16]!==V||e[17]!==p?(z=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[p,V]}),e[16]=V,e[17]=p,e[18]=z):z=e[18],z}let _;e[19]!==W||e[20]!==G||e[21]!==c.isPending?(_=Lr.map(B=>{const{mode:S,label:R,Icon:p}=B;return a.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>G(S),className:xe("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",W===S?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(p,{size:15}),R]},S)}),e[19]=W,e[20]=G,e[21]=c.isPending,e[22]=_):_=e[22];let L;e[23]!==_?(L=a.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:_}),e[23]=_,e[24]=L):L=e[24];const T=W==="private"?`Only members of your organization can open ${v?"these files":"this link"}.`:W==="public"?v?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${v?"files in this folder":"this file"}.`;let H;e[25]!==T?(H=a.jsx("p",{className:"text-xs text-muted-foreground",children:T}),e[25]=T,e[26]=H):H=e[26];let Y;e[27]!==W||e[28]!==$||e[29]!==m||e[30]!==w||e[31]!==c.isPending?(Y=W==="password"&&a.jsxs("form",{className:"flex items-center gap-2",onSubmit:B=>{B.preventDefault(),w&&$("password",w)},children:[a.jsx(Mn,{type:"password",value:w,onChange:B=>C(B.target.value),placeholder:m==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),a.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!w||c.isPending,children:m==="password"?"Update":"Set"})]}),e[27]=W,e[28]=$,e[29]=m,e[30]=w,e[31]=c.isPending,e[32]=Y):Y=e[32];let te;return e[33]!==V||e[34]!==L||e[35]!==H||e[36]!==Y?(te=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[L,H,Y,V]}),e[33]=V,e[34]=L,e[35]=H,e[36]=Y,e[37]=te):te=e[37],te}function _r(t){return Pe.error(t instanceof Error?t.message:"Failed to update sharing")}function gt(t){const e=J.c(7),{volume:n,path:r,shareMode:s,effectivePublic:i,url:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(In,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:a.jsx(xn,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Share"})]}),e[0]=l):l=e[0];let c;return e[1]!==i||e[2]!==r||e[3]!==s||e[4]!==o||e[5]!==n?(c=a.jsxs(Rn,{children:[l,a.jsx(Dn,{align:"end",className:"w-80 p-3",children:a.jsx(Jt,{volume:n,path:r,kind:"file",shareMode:s,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=r,e[3]=s,e[4]=o,e[5]=n,e[6]=c):c=e[6],c}function Ss(t){const e=J.c(11),{target:n,onOpenChange:r}=t,s=!!n,i=n?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=a.jsx(wn,{children:a.jsxs(Ve,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n?(l=n&&a.jsx(Jt,{...n}),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==l?(c=a.jsxs(yt,{className:"sm:max-w-md",children:[o,l]}),e[4]=o,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==s||e[9]!==c?(d=a.jsx(bt,{open:s,onOpenChange:r,children:c}),e[7]=r,e[8]=s,e[9]=c,e[10]=d):d=e[10],d}function Ar(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",r=n?e[1]??null:null,s=n?r?`public-${r}`:null:e[0]??null,i=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:s,dirPath:i,isPublic:n,publicSet:r,readOnly:n}}function zs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const vt="public-";function Tr(t){return t.startsWith(vt)?t.slice(vt.length):null}function js(t,e){const n=Tr(t);return n?`public/${n}/${e}`:`${t}/${e}`}function Hr(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Or(t){const e=J.c(11),{org:n,previewPath:r}=t;let s;e[0]!==r?(s=r.split("/").slice(0,-1).join("/"),e[0]=r,e[1]=s):s=e[1];const i=s;let o;e[2]!==n?(o={org:n},e[2]=n,e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==r?(l={path:i,preview:r},e[4]=i,e[5]=r,e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(gn,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==l?(d=a.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:a.jsxs(un,{to:"/$org/files",params:o,search:l,children:[c,"See in library"]})}),e[8]=o,e[9]=l,e[10]=d):d=e[10],d}const Ur=t=>/\.html?$/i.test(t);function wt(t){const e=J.c(6),{onClose:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yn,{size:14}),e[0]=r):r=e[0];let s;e[1]!==n?(s=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:n,children:r})}),e[1]=n,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(ae,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==s?(o=a.jsxs(oe,{children:[s,i]}),e[4]=s,e[5]=o):o=e[5],o}function Qt(t){const e=J.c(37),{previewPath:n,onClose:r,showSeeInLibrary:s,variant:i}=t,o=s===void 0?!1:s;let l;e[0]!==n?(l=Ar(n),e[0]=n,e[1]=l):l=e[1];const c=l,{volume:d,dirPath:m}=c,{data:u,isPending:f}=kt(d,m),v=$n(d??""),x=Hr(m);let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={strict:!1},e[2]=k):k=e[2];const{org:b}=dn(k),w=i==="dialog";let C;e[3]!==b||e[4]!==n||e[5]!==o?(C=o&&b?a.jsx(Or,{org:b,previewPath:n}):null,e[3]=b,e[4]=n,e[5]=o,e[6]=C):C=e[6];const I=C,j=u&&u.kind==="file"?{key:n,filename:x,size:u.size,downloadUrl:v(u.path)}:null;if(j&&u&&Ur(x)){const O=j.downloadUrl;let A;e[7]!==u?(A=jt(u),e[7]=u,e[8]=A):A=e[8];const D=d??"",V=u.shareMode??"private",_=u.effectivePublic??!1,L=window.location.origin+j.downloadUrl;let T;e[9]!==m||e[10]!==L||e[11]!==D||e[12]!==V||e[13]!==_?(T=a.jsx(gt,{volume:D,path:m,shareMode:V,effectivePublic:_,url:L}),e[9]=m,e[10]=L,e[11]=D,e[12]=V,e[13]=_,e[14]=T):T=e[14];let H;e[15]!==w||e[16]!==r?(H=w?a.jsx("div",{className:"w-8 shrink-0"}):a.jsx(wt,{onClose:r}),e[15]=w,e[16]=r,e[17]=H):H=e[17];let Y;return e[18]!==I||e[19]!==T||e[20]!==H?(Y=a.jsxs(a.Fragment,{children:[T,I,H]}),e[18]=I,e[19]=T,e[20]=H,e[21]=Y):Y=e[21],a.jsxs(a.Fragment,{children:[w&&a.jsx(Ve,{className:"sr-only",children:x}),a.jsx(Dr,{readUrl:O,marker:A,title:x,savePath:d==="home"?m:void 0,trailing:Y},n)]})}const F=w?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let $;e[22]!==F?($=xe("flex shrink-0 items-center gap-1 border-b border-border/60",F),e[22]=F,e[23]=$):$=e[23];let g;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==j||e[27]!==m||e[28]!==d?(g=j&&a.jsxs(a.Fragment,{children:[a.jsx(gt,{volume:d??"",path:m,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+j.downloadUrl}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:a.jsx("a",{href:j.downloadUrl,download:j.filename,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(j.downloadUrl,"_blank","noopener"),children:a.jsx(zt,{size:14})})}),a.jsx(ae,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=j,e[27]=m,e[28]=d,e[29]=g):g=e[29];let G;e[30]!==w||e[31]!==r?(G=!w&&a.jsx(wt,{onClose:r}),e[30]=w,e[31]=r,e[32]=G):G=e[32];let W;return e[33]!==j||e[34]!==x||e[35]!==f?(W=a.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:j?a.jsx(kr,{file:j}):f?a.jsx(Vt,{}):a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[a.jsx(Xe,{filename:x,className:"h-7.5 w-6"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=j,e[34]=x,e[35]=f,e[36]=W):W=e[36],a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:$,children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[a.jsx(Xe,{filename:x,className:"h-4.5 w-3.5 shrink-0"}),w?a.jsx(Ve,{className:"truncate text-xs font-medium text-foreground",children:x}):a.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:x}),j&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Kt(j.size)})]}),I,g,G]}),W]})}function ks(t){const e=J.c(4),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;return e[0]!==r||e[1]!==n||e[2]!==i?(o=a.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"panel"})}),e[0]=r,e[1]=n,e[2]=i,e[3]=o):o=e[3],o}function Fr(t){const e=J.c(5),{icon:n}=t;if(n.kind==="component"){const{Component:s}=n;let i;return e[0]!==s?(i=a.jsx(s,{className:"size-4"}),e[0]=s,e[1]=i):i=e[1],i}if(n.kind==="url"){let s;return e[2]!==n.src?(s=a.jsx("img",{src:n.src,alt:"",className:"size-4 rounded-sm object-cover"}),e[2]=n.src,e[3]=s):s=e[3],s}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(vn,{className:"size-4"}),e[4]=r):r=e[4],r}function Ps(t){const e=J.c(13),{title:n,icon:r,active:s,onClick:i}=t,o=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let l;e[0]!==o?(l=xe("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]",o),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==r?(c=a.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:a.jsx(Fr,{icon:r})}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==n?(d=a.jsx("span",{className:"whitespace-nowrap text-sm font-medium leading-none",children:n}),e[4]=n,e[5]=d):d=e[5];let m;return e[6]!==s||e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d||e[11]!==n?(m=a.jsxs("button",{type:"button",onClick:i,"aria-pressed":s,"aria-label":n,className:l,children:[c,d]}),e[6]=s,e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=n,e[12]=m):m=e[12],m}function Cs(t){const e=J.c(9),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;e[0]!==r?(o=d=>{d||r()},e[0]=r,e[1]=o):o=e[1];let l;e[2]!==r||e[3]!==n||e[4]!==i?(l=a.jsx(yt,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"dialog"})}),e[2]=r,e[3]=n,e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==l?(c=a.jsx(bt,{open:!0,onOpenChange:o,children:l}),e[6]=o,e[7]=l,e[8]=c):c=e[8],c}export{gr as A,fs as B,gs as C,vs as D,xr as E,Vt as F,hs as G,Dr as H,ks as L,ls as R,Ss as S,Fr as T,us as a,fr as b,kr as c,hr as d,gt as e,Kt as f,wr as g,cs as h,as as i,Ps as j,Cs as k,Hr as l,zs as m,Tr as n,js as o,Ar as p,ds as q,ws as r,ys as s,yr as t,ms as u,nt as v,_e as w,xs as x,bs as y,ps as z};
@@ -1 +1 @@
1
- import{c as h,r as y,l as j,j as f}from"./index-DmjWDqcd.js";import{a5 as A}from"./agent-icon-Ba-0ZYgG.js";import{s as N}from"./Plus-cqzweyhV.js";import{s as _}from"./Trash01-Dn19EDIc.js";const S=700;function R(r,e,o){const t=h.c(7),s=S,[n,c]=y.useState(r),[l,u]=y.useState(r),[x,p]=y.useState(!1),i=y.useRef(null);r!==l&&(u(r),x||c(r));let a;t[0]!==s||t[1]!==e?(a=g=>{c(g),p(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p(!1),e(g)},s)},t[0]=s,t[1]=e,t[2]=a):a=t[2];const d=a;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=g=>{c(g),i.current&&clearTimeout(i.current),i.current=null,p(!1)},t[3]=m):m=t[3];const v=m;let b;return t[4]!==n||t[5]!==d?(b=[n,d,v],t[4]=n,t[5]=d,t[6]=b):b=t[6],b}function T(r){const e=h.c(14),{value:o,onChange:t,placeholder:s,className:n,onFocus:c,onBlur:l,onKeyDown:u,spellCheck:x,inputRef:p}=r,i=x===void 0?!0:x;let a;e[0]!==t?(a=v=>t(v.target.value),e[0]=t,e[1]=a):a=e[1];let d;e[2]!==n?(d=j("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==s||e[9]!==i||e[10]!==a||e[11]!==d||e[12]!==o?(m=f.jsx("textarea",{ref:p,value:o,onChange:a,onInput:w,onFocus:c,onBlur:l,onKeyDown:u,placeholder:s,spellCheck:i,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=c,e[7]=u,e[8]=s,e[9]=i,e[10]=a,e[11]=d,e[12]=o,e[13]=m):m=e[13],m}function w(r){const e=r.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function D(r){return typeof r=="string"?r:""}function B(r){const e=h.c(11);let o,t;e[0]!==r?({className:o,...t}=r,e[0]=r,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=j(o,"pr-9"),e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t||e[6]!==s?(n=f.jsx(T,{...t,className:s}),e[5]=t,e[6]=s,e[7]=n):n=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=f.jsx(A,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=c):c=e[8];let l;return e[9]!==n?(l=f.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,c]}),e[9]=n,e[10]=l):l=e[10],l}function F(r){const e=h.c(5),{label:o,onClick:t,disabled:s}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(N,{size:13}),e[0]=n):n=e[0];let c;return e[1]!==s||e[2]!==o||e[3]!==t?(c=f.jsxs("button",{type:"button",onClick:t,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,o]}),e[1]=s,e[2]=o,e[3]=t,e[4]=c):c=e[4],c}function I(r){const e=h.c(4),{label:o,onClick:t}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(_,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==o||e[2]!==t?(n=f.jsx("button",{type:"button","aria-label":o,onClick:t,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=o,e[2]=t,e[3]=n):n=e[3],n}function J(r){const e=h.c(2),{children:o}=r;let t;return e[0]!==o?(t=f.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:o}),e[0]=o,e[1]=t):t=e[1],t}function O(r){const e=h.c(8),{active:o,label:t,onClick:s,children:n}=r,c=o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==c?(l=j("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",c),e[0]=c,e[1]=l):l=e[1];let u;return e[2]!==o||e[3]!==n||e[4]!==t||e[5]!==s||e[6]!==l?(u=f.jsx("button",{type:"button","aria-label":t,"aria-pressed":o,onMouseDown:$,onClick:s,className:l,children:n}),e[2]=o,e[3]=n,e[4]=t,e[5]=s,e[6]=l,e[7]=u):u=e[7],u}function $(r){return r.preventDefault()}function H(r){if(Array.isArray(r))return r;if(typeof r!="string"||r.trim()==="")return[];try{const e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}}export{F as A,B as E,J as F,T as I,I as R,O as T,H as p,D as s,R as u};
1
+ import{c as h,r as y,l as j,j as f}from"./index-CFiyU0D9.js";import{a5 as A}from"./agent-icon-oDx9Z_Be.js";import{s as N}from"./Plus-eGxBB1d8.js";import{s as _}from"./Trash01-ByxlxTiZ.js";const S=700;function R(r,e,o){const t=h.c(7),s=S,[n,c]=y.useState(r),[l,u]=y.useState(r),[x,p]=y.useState(!1),i=y.useRef(null);r!==l&&(u(r),x||c(r));let a;t[0]!==s||t[1]!==e?(a=g=>{c(g),p(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,p(!1),e(g)},s)},t[0]=s,t[1]=e,t[2]=a):a=t[2];const d=a;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=g=>{c(g),i.current&&clearTimeout(i.current),i.current=null,p(!1)},t[3]=m):m=t[3];const v=m;let b;return t[4]!==n||t[5]!==d?(b=[n,d,v],t[4]=n,t[5]=d,t[6]=b):b=t[6],b}function T(r){const e=h.c(14),{value:o,onChange:t,placeholder:s,className:n,onFocus:c,onBlur:l,onKeyDown:u,spellCheck:x,inputRef:p}=r,i=x===void 0?!0:x;let a;e[0]!==t?(a=v=>t(v.target.value),e[0]=t,e[1]=a):a=e[1];let d;e[2]!==n?(d=j("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",n),e[2]=n,e[3]=d):d=e[3];let m;return e[4]!==p||e[5]!==l||e[6]!==c||e[7]!==u||e[8]!==s||e[9]!==i||e[10]!==a||e[11]!==d||e[12]!==o?(m=f.jsx("textarea",{ref:p,value:o,onChange:a,onInput:w,onFocus:c,onBlur:l,onKeyDown:u,placeholder:s,spellCheck:i,rows:1,className:d}),e[4]=p,e[5]=l,e[6]=c,e[7]=u,e[8]=s,e[9]=i,e[10]=a,e[11]=d,e[12]=o,e[13]=m):m=e[13],m}function w(r){const e=r.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function D(r){return typeof r=="string"?r:""}function B(r){const e=h.c(11);let o,t;e[0]!==r?({className:o,...t}=r,e[0]=r,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let s;e[3]!==o?(s=j(o,"pr-9"),e[3]=o,e[4]=s):s=e[4];let n;e[5]!==t||e[6]!==s?(n=f.jsx(T,{...t,className:s}),e[5]=t,e[6]=s,e[7]=n):n=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=f.jsx(A,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=c):c=e[8];let l;return e[9]!==n?(l=f.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-muted/50 focus-within:bg-muted/50",children:[n,c]}),e[9]=n,e[10]=l):l=e[10],l}function F(r){const e=h.c(5),{label:o,onClick:t,disabled:s}=r;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(N,{size:13}),e[0]=n):n=e[0];let c;return e[1]!==s||e[2]!==o||e[3]!==t?(c=f.jsxs("button",{type:"button",onClick:t,disabled:s,className:"flex items-center gap-1.5 rounded-md border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[n,o]}),e[1]=s,e[2]=o,e[3]=t,e[4]=c):c=e[4],c}function I(r){const e=h.c(4),{label:o,onClick:t}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsx(_,{size:13}),e[0]=s):s=e[0];let n;return e[1]!==o||e[2]!==t?(n=f.jsx("button",{type:"button","aria-label":o,onClick:t,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-opacity hover:text-destructive group-hover/item:opacity-100 cursor-pointer",children:s}),e[1]=o,e[2]=t,e[3]=n):n=e[3],n}function J(r){const e=h.c(2),{children:o}=r;let t;return e[0]!==o?(t=f.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md border bg-popover p-0.5 shadow-md",children:o}),e[0]=o,e[1]=t):t=e[1],t}function O(r){const e=h.c(8),{active:o,label:t,onClick:s,children:n}=r,c=o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground";let l;e[0]!==c?(l=j("flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-sm transition-colors cursor-pointer",c),e[0]=c,e[1]=l):l=e[1];let u;return e[2]!==o||e[3]!==n||e[4]!==t||e[5]!==s||e[6]!==l?(u=f.jsx("button",{type:"button","aria-label":t,"aria-pressed":o,onMouseDown:$,onClick:s,className:l,children:n}),e[2]=o,e[3]=n,e[4]=t,e[5]=s,e[6]=l,e[7]=u):u=e[7],u}function $(r){return r.preventDefault()}function H(r){if(Array.isArray(r))return r;if(typeof r!="string"||r.trim()==="")return[];try{const e=JSON.parse(r);return Array.isArray(e)?e:[]}catch{return[]}}export{F as A,B as E,J as F,T as I,I as R,O as T,H as p,D as s,R as u};
@@ -1 +1 @@
1
- import{c as V,j as t,a as D,p as R,af as q,J as B,v as N,t as T}from"./index-DmjWDqcd.js";import{P as L}from"./index-DrUwfEHA.js";import{A as U}from"./avatar-DUFWGs9Z.js";import{S as I}from"./switch-DR4CkZQD.js";import{d as G,b as Y,a as $,S as J}from"./select-ySr8WoR1.js";import{T as K,a as z}from"./toggle-group-DUz2fIQy.js";import{I as O}from"./input-BlaLo4Ee.js";import{i as H}from"./Monitor01-C751a6VH.js";import{n as M,a as Q}from"./Sun-DGf33qzc.js";import{i as W}from"./Play-BaPiITj6.js";import{u as X}from"./use-debounced-autosave-D9laFBFB.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-D3WaYPH4.js";import{c as te,b as A,S as E,a as F}from"./settings-section-ysOtzM09.js";import"./sidebar-H8VlLCcE.js";import"./LayoutLeft-CvZZnjM_.js";import"./use-mobile-C1ok2Oda.js";import"./sheet-X3VztLnq.js";import"./X-BJ5AK9_B.js";import"./tooltip-Cr9AJTu1.js";import"./User01-CYnD1B0h.js";import"./ChevronUp-DLoyITzq.js";import"./ChevronDown-BHp2n33E.js";import"./card-DuZccs_2.js";import"./ArrowUpRight-CD45Pqa3.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await D.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(O,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(K,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(J,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{De as default};
1
+ import{c as V,j as t,a as D,p as R,af as q,J as B,v as N,t as T}from"./index-CFiyU0D9.js";import{P as L}from"./index-Bb-tYGNK.js";import{A as U}from"./avatar-CJP1BOq4.js";import{S as I}from"./switch-CCMIMmOF.js";import{d as G,b as Y,a as $,S as J}from"./select-C6v8Xcth.js";import{T as K,a as z}from"./toggle-group-9TrYMc69.js";import{I as O}from"./input-BwRH-Gsz.js";import{i as H}from"./Monitor01-ChA6ov2I.js";import{n as M,a as Q}from"./Sun-lTiqxOzH.js";import{i as W}from"./Play-CnXG8qqP.js";import{u as X}from"./use-debounced-autosave-B4mbwJnu.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-DIBoN36v.js";import{c as te,b as A,S as E,a as F}from"./settings-section-MeT61nuY.js";import"./sidebar-BNrafefE.js";import"./LayoutLeft-fsm0LcB8.js";import"./use-mobile-NlF-3RoP.js";import"./sheet-DyU03ddw.js";import"./X-DrMVHLcw.js";import"./tooltip-DrpiSbRG.js";import"./User01-COQtf360.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./card-BFb5m83e.js";import"./ArrowUpRight-OJZisFPQ.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await D.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(O,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(K,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(J,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{De as default};
@@ -0,0 +1 @@
1
+ import{c as $,D as H,j as A}from"./index-CFiyU0D9.js";import{l as L,g as E,s as y}from"./scroll-area-BM-54tW1.js";import{p as O,u as k}from"./use-mcp-client-xOK-OF8p.js";import{b as q,c as B}from"./use-mcp-tools-C8tMWwG9.js";import{u as Y}from"./index-CRxAjd1d.js";import{c as G}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-C7syjwde.js";import{u as z,b as F}from"./chat-context-n9syhvq-.js";import{b as J}from"./shell-layout-Nyz7GHu7.js";import"./agent-icon-oDx9Z_Be.js";import"./AlertCircle-DC-zDzV-.js";import"./Tool01-CvnpFI53.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./Settings02-BcAnTzm5.js";import"./XCircle-Ct0eqqsw.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./ChevronRight-Cpfh3gza.js";import"./DotsVertical-5jSu3d1f.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LayoutLeft-fsm0LcB8.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./Plus-eGxBB1d8.js";import"./SearchLg-CDpA_lbT.js";import"./SearchMd-ujiTPCmg.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./X-DrMVHLcw.js";import"./Zap-wRIFSWIq.js";import"./use-clock-tick-BcxdOJLx.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Xy0buIqd.js";import"./tooltip-DrpiSbRG.js";import"./file-type-icon-DPWxBpNL.js";import"./dialog-BAqFyO8a.js";import"./use-mobile-NlF-3RoP.js";import"./tab-id-BptcWVWa.js";import"./hooks-CUSV6Enf.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CNO5iCKk.js";import"./sheet-DyU03ddw.js";import"./integration-icon-LQhkkaLl.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./use-collections-B4atckEK.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./use-connection-Dz29RF9P.js";import"./use-mcp-prompts-Crr3H7P7.js";import"./form-DGE2mWLL.js";import"./label-CdBSUJpf.js";import"./input-BwRH-Gsz.js";import"./select-C6v8Xcth.js";import"./auth-Bej0Tx2Y.js";import"./index-mEtg0zTM.js";import"./drawer-CFkqEC3w.js";import"./collection-search-8iNXnGlM.js";import"./tabs-Ca0vDJqc.js";import"./toggle-group-9TrYMc69.js";import"./sortable.esm-MymOIPKk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C6NYo4Gp.js";import"./use-registry-connections-BOZLpkM5.js";import"./use-organization-settings-DksiQdGc.js";import"./useInfiniteQuery-RUqqRph1.js";import"./use-infinite-scroll-BX1nHHVY.js";import"./extract-connection-data-D6bQrejT.js";import"./card-BFb5m83e.js";import"./collection-tabs-KA2be3wH.js";import"./badge-DhpSM7g_.js";import"./textarea-BYT525JZ.js";import"./connection-form-helpers-CwZx7WkC.js";import"./authenticate-and-persist-oauth-DoPUB_Bh.js";import"./mcp-oauth-IblqU9XT.js";import"./useSuspenseInfiniteQuery-fRYRtDkY.js";import"./use-ai-providers-C7KmiuqP.js";import"./connect-desktop-dialog-Brra3cMC.js";import"./decopilot-BItqS11w.js";import"./checkbox-DmOzmKLP.js";import"./skeleton-B0I93PJP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CJP1BOq4.js";import"./settings-section-MeT61nuY.js";import"./popover-BXFiEQtN.js";import"./command-C34397s2.js";import"./index-jBUpmiBg.js";import"./use-org-fs-DyK8omii.js";import"./dropdown-menu-C62KNjwK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxV7deix.js";import"./use-decopilot-events-CpQNzv3e.js";import"./empty-state-Sh_DuDcy.js";import"./toolbar-p8VcpV1N.js";import"./preview-dialog-CQgf0QcR.js";import"./index-B6hcksS9.js";import"./use-capability-C6Dwri-U.js";import"./shell-route-loading-BRcTX0VT.js";import"./tools-list-uWC3Ij6C.js";import"./alert-dialog-CYizItFp.js";import"./switch-CCMIMmOF.js";import"./use-debounced-autosave-B4mbwJnu.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./search-input-M7ubuBMG.js";import"./github-repo-picker-B5tZucJa.js";import"./use-debounced-value-C6U3mliE.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLmhH-Rb.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-B-dNDEWH.js";import"./table-DeNuxLMl.js";import"./use-members-BMNjJExY.js";import"./use-org-auth-client-C_UJ3Vg_.js";import"./task-status-B3nPzwP7.js";import"./use-automations-RMjkwkxX.js";import"./use-file-configs-CFCmr--W.js";import"./monaco-editor-5JIc-lnc.js";import"./select-model-Cz9R_UN3.js";import"./automation-list-row-CsTyBm4M.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function we(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{we as AppViewContent};
@@ -0,0 +1 @@
1
+ import{c as S,j as r}from"./index-CFiyU0D9.js";import{I as T}from"./input-BwRH-Gsz.js";import{L as C}from"./label-CdBSUJpf.js";import{T as L}from"./textarea-BYT525JZ.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-CRxAjd1d.js";import{u as M,s as P}from"./primitives-BF1opf4F.js";import"./index-mEtg0zTM.js";import"./SwitchHorizontal01-DAZXInW8.js";import"./chat-context-n9syhvq-.js";import"./hooks-CUSV6Enf.js";import"./use-mcp-client-xOK-OF8p.js";import"./auth-Bej0Tx2Y.js";import"./decopilot-sse-pool-CvYk1hkc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-2U_MnYnK.js";import"./use-collections-B4atckEK.js";import"./use-ai-providers-C7KmiuqP.js";import"./studio-tools-CNO5iCKk.js";import"./use-decopilot-events-CpQNzv3e.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-DksiQdGc.js";import"./scroll-area-BM-54tW1.js";import"./agent-icon-oDx9Z_Be.js";import"./AlertCircle-DC-zDzV-.js";import"./Tool01-CvnpFI53.js";import"./Settings02-BcAnTzm5.js";import"./XCircle-Ct0eqqsw.js";import"./ArrowUpRight-OJZisFPQ.js";import"./ZapSquare-PMiGcZpW.js";import"./Users03-DknrDMtT.js";import"./CheckCircle-Cgnheu-R.js";import"./ChevronUp-DBpw6M-L.js";import"./ChevronDown-DyHvxYlc.js";import"./ChevronLeft-dyRjFCmp.js";import"./ChevronRight-Cpfh3gza.js";import"./DotsVertical-5jSu3d1f.js";import"./Stars02-qnq-_X9g.js";import"./Eye-bojNLUjA.js";import"./ZoomOut-6ix2H92j.js";import"./Globe01-CyfpzbeQ.js";import"./FilterLines-CFl65nng.js";import"./Star01-DHEkWySe.js";import"./Globe04-DFpdKSRI.js";import"./HardDrive-B1mtnaeA.js";import"./Key01-CwrJlZo0.js";import"./LayoutLeft-fsm0LcB8.js";import"./LinkExternal01-BHwVyDja.js";import"./Monitor01-ChA6ov2I.js";import"./Sun-lTiqxOzH.js";import"./Palette-DusYqL0W.js";import"./Play-CnXG8qqP.js";import"./Plus-eGxBB1d8.js";import"./SearchLg-CDpA_lbT.js";import"./SearchMd-ujiTPCmg.js";import"./Shield01-ZxmFmrvL.js";import"./Stars01-BdCaKqhF.js";import"./Trash01-ByxlxTiZ.js";import"./Upload01-Z77n1bV8.js";import"./User01-COQtf360.js";import"./Users01-wtRJYQKX.js";import"./XClose-BaZ908gw.js";import"./X-DrMVHLcw.js";import"./Zap-wRIFSWIq.js";import"./use-clock-tick-BcxdOJLx.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Xy0buIqd.js";import"./tooltip-DrpiSbRG.js";import"./file-type-icon-DPWxBpNL.js";import"./dialog-BAqFyO8a.js";import"./use-mobile-NlF-3RoP.js";import"./content-blocks-o63cs2vh.js";import"./types-C7syjwde.js";import"./shell-layout-Nyz7GHu7.js";import"./avatar-CJP1BOq4.js";import"./required-auth-layout-DDJmFi3U.js";import"./use-org-sso-DkqH8Zpz.js";import"./sheet-DyU03ddw.js";import"./integration-icon-LQhkkaLl.js";import"./use-navigate-to-agent-DZubxUSm.js";import"./use-connection-Dz29RF9P.js";import"./use-mcp-prompts-Crr3H7P7.js";import"./form-DGE2mWLL.js";import"./select-C6v8Xcth.js";import"./drawer-CFkqEC3w.js";import"./collection-search-8iNXnGlM.js";import"./tabs-Ca0vDJqc.js";import"./toggle-group-9TrYMc69.js";import"./sortable.esm-MymOIPKk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C6NYo4Gp.js";import"./use-registry-connections-BOZLpkM5.js";import"./useInfiniteQuery-RUqqRph1.js";import"./use-infinite-scroll-BX1nHHVY.js";import"./extract-connection-data-D6bQrejT.js";import"./card-BFb5m83e.js";import"./collection-tabs-KA2be3wH.js";import"./badge-DhpSM7g_.js";import"./connection-form-helpers-CwZx7WkC.js";import"./authenticate-and-persist-oauth-DoPUB_Bh.js";import"./mcp-oauth-IblqU9XT.js";import"./useSuspenseInfiniteQuery-fRYRtDkY.js";import"./connect-desktop-dialog-Brra3cMC.js";import"./decopilot-BItqS11w.js";import"./checkbox-DmOzmKLP.js";import"./skeleton-B0I93PJP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-MeT61nuY.js";import"./popover-BXFiEQtN.js";import"./command-C34397s2.js";import"./index-jBUpmiBg.js";import"./use-org-fs-DyK8omii.js";import"./dropdown-menu-C62KNjwK.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DxV7deix.js";import"./empty-state-Sh_DuDcy.js";import"./toolbar-p8VcpV1N.js";import"./preview-dialog-CQgf0QcR.js";import"./index-B6hcksS9.js";import"./use-mcp-tools-C8tMWwG9.js";import"./use-capability-C6Dwri-U.js";import"./shell-route-loading-BRcTX0VT.js";import"./tools-list-uWC3Ij6C.js";import"./alert-dialog-CYizItFp.js";import"./switch-CCMIMmOF.js";import"./use-debounced-autosave-B4mbwJnu.js";import"./index-Bb-tYGNK.js";import"./sidebar-BNrafefE.js";import"./search-input-M7ubuBMG.js";import"./github-repo-picker-B5tZucJa.js";import"./use-debounced-value-C6U3mliE.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLmhH-Rb.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-B-dNDEWH.js";import"./table-DeNuxLMl.js";import"./use-members-BMNjJExY.js";import"./use-org-auth-client-C_UJ3Vg_.js";import"./task-status-B3nPzwP7.js";import"./use-automations-RMjkwkxX.js";import"./use-file-configs-CFCmr--W.js";import"./monaco-editor-5JIc-lnc.js";import"./select-model-Cz9R_UN3.js";import"./automation-list-row-CsTyBm4M.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Nr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Nr as RecordEditor};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C4UMhzml.js","assets/index-CFiyU0D9.js","assets/index-BqKQnks_.css","assets/XCircle-Ct0eqqsw.js","assets/CheckCircle-Cgnheu-R.js","assets/Settings02-BcAnTzm5.js","assets/use-mcp-client-xOK-OF8p.js","assets/auth-Bej0Tx2Y.js","assets/useInfiniteQuery-RUqqRph1.js","assets/use-infinite-scroll-BX1nHHVY.js","assets/studio-tools-CNO5iCKk.js","assets/badge-DhpSM7g_.js","assets/input-BwRH-Gsz.js","assets/dropdown-menu-C62KNjwK.js","assets/ChevronUp-DBpw6M-L.js","assets/ChevronRight-Cpfh3gza.js","assets/DotsVertical-5jSu3d1f.js","assets/table-DeNuxLMl.js","assets/toggle-group-9TrYMc69.js","assets/use-view-mode-C2dllj6L.js","assets/use-mobile-NlF-3RoP.js","assets/FilterLines-CFl65nng.js","assets/Globe01-CyfpzbeQ.js","assets/SearchMd-ujiTPCmg.js","assets/dialog-BAqFyO8a.js","assets/X-DrMVHLcw.js","assets/AlertCircle-DC-zDzV-.js","assets/Upload01-Z77n1bV8.js","assets/alert-dialog-CYizItFp.js","assets/card-BFb5m83e.js","assets/Trash01-ByxlxTiZ.js","assets/label-CdBSUJpf.js","assets/select-C6v8Xcth.js","assets/tooltip-DrpiSbRG.js","assets/ChevronDown-DyHvxYlc.js","assets/switch-CCMIMmOF.js","assets/textarea-BYT525JZ.js","assets/checkbox-DmOzmKLP.js","assets/Eye-bojNLUjA.js","assets/LinkExternal01-BHwVyDja.js","assets/use-copy-Xy0buIqd.js","assets/Key01-CwrJlZo0.js","assets/Plus-eGxBB1d8.js","assets/mcp-oauth-IblqU9XT.js","assets/Play-CnXG8qqP.js"])))=>i.map(i=>d[i]);
2
+ import{c as s,j as e,r as i,i as a,am as o}from"./index-CFiyU0D9.js";import{R as m}from"./require-capability--mIKExbX.js";import"./use-capability-C6Dwri-U.js";import"./access-gate-D6dGDGRI.js";import"./capability-load-error-CCgNL5xi.js";const n=i.lazy(()=>o(()=>import("./registry-layout-C4UMhzml.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1,4 +1,4 @@
1
- import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,be as qs,bf as Bs}from"./index-DmjWDqcd.js";import{c as Jt,b as Qs,d as ds,i as Vs,a as Gs,t as Ks,f as Ys,n as Hs,e as Ws}from"./XCircle-BEhXc7sQ.js";import{i as qe}from"./CheckCircle-B93tZkib.js";import{s as Mt,c as Js,b as Zs,i as Xs,a as er}from"./Settings02-HJQMPAnK.js";import{S as Me,u as Ie,W as tr}from"./use-mcp-client-NDJy9UEP.js";import{u as us}from"./useInfiniteQuery-BiSAb_zK.js";import{u as _e}from"./studio-tools-BWRE75AX.js";import{B as F}from"./badge-ULvYE549.js";import{I as ue}from"./input-BlaLo4Ee.js";import{a as dt,c as Ne,D as ut,b as mt,h as Zt,k as Xt,g as sr}from"./dropdown-menu-D9g8Sl4X.js";import{c as Et,d as Dt,a as Be,e as ae,b as At,T as oe}from"./table-C4Cy5HHY.js";import{T as rr,a as es}from"./toggle-group-DUz2fIQy.js";import{u as nr}from"./use-view-mode-D7GDuIV9.js";import{i as $t}from"./DotsVertical-DBVnta3o.js";import{i as ir}from"./FilterLines-JdWf41nd.js";import{n as lr,i as ms}from"./Globe01-DbyYsbkQ.js";import{i as ar}from"./SearchMd-B_E38g9S.js";import{c as xt,a as pt,b as ht,D as ft,d as gt,e as jt}from"./dialog-onqVrhoh.js";import{i as Ye}from"./AlertCircle-HztvGgEK.js";import{i as ts}from"./Upload01-AmIm4zQN.js";import{c as He,b as We,d as Je,A as Ze,g as Xe,e as et,a as tt,f as st}from"./alert-dialog-Bqe6OAIL.js";import{C as ne}from"./card-DuZccs_2.js";import{s as rt}from"./Trash01-Dn19EDIc.js";import{L as te}from"./label-GEC2UjFS.js";import{d as or,b as cr,c as dr,S as ur,a as St}from"./select-ySr8WoR1.js";import{S as ze}from"./switch-DR4CkZQD.js";import{T as vt}from"./textarea-DzC7ppsf.js";import{i as mr}from"./X-BJ5AK9_B.js";import{t as xr}from"./ChevronDown-BHp2n33E.js";import{n as pr,i as Rt}from"./ChevronUp-DLoyITzq.js";import{C as ss}from"./checkbox-CZumSc8B.js";import{s as xs,a as Tt}from"./Eye-BuXBYPNx.js";import{n as hr}from"./LinkExternal01-C75h4nTA.js";import{u as fr}from"./use-infinite-scroll-BmnUwDlC.js";import{u as It}from"./use-copy-DByELpSB.js";import{i as gr}from"./Key01-B-rzooWI.js";import{s as jr}from"./Plus-cqzweyhV.js";import{a as vr,b as br,T as yr}from"./tooltip-Cr9AJTu1.js";import{i as Nr,a as wr}from"./mcp-oauth-sGspCuYg.js";import{i as _r}from"./Play-BaPiITj6.js";import"./auth-CqOhN4mO.js";import"./ChevronRight-HkVZWjVD.js";import"./use-mobile-C1ok2Oda.js";const Ue="private-registry",Cr=`
1
+ import{c as W,D as fe,k as Re,m as Te,d as be,t as Q,r as T,j as t,B as V,i as Fe,l as Z,bf as qs,bg as Bs}from"./index-CFiyU0D9.js";import{c as Jt,b as Qs,d as ds,i as Vs,a as Gs,t as Ks,f as Ys,n as Hs,e as Ws}from"./XCircle-Ct0eqqsw.js";import{i as qe}from"./CheckCircle-Cgnheu-R.js";import{s as Mt,c as Js,b as Zs,i as Xs,a as er}from"./Settings02-BcAnTzm5.js";import{S as Me,u as Ie,W as tr}from"./use-mcp-client-xOK-OF8p.js";import{u as us}from"./useInfiniteQuery-RUqqRph1.js";import{u as _e}from"./studio-tools-CNO5iCKk.js";import{B as F}from"./badge-DhpSM7g_.js";import{I as ue}from"./input-BwRH-Gsz.js";import{a as dt,c as Ne,D as ut,b as mt,h as Zt,k as Xt,g as sr}from"./dropdown-menu-C62KNjwK.js";import{c as Et,d as Dt,a as Be,e as ae,b as At,T as oe}from"./table-DeNuxLMl.js";import{T as rr,a as es}from"./toggle-group-9TrYMc69.js";import{u as nr}from"./use-view-mode-C2dllj6L.js";import{i as $t}from"./DotsVertical-5jSu3d1f.js";import{i as ir}from"./FilterLines-CFl65nng.js";import{n as lr,i as ms}from"./Globe01-CyfpzbeQ.js";import{i as ar}from"./SearchMd-ujiTPCmg.js";import{c as xt,a as pt,b as ht,D as ft,d as gt,e as jt}from"./dialog-BAqFyO8a.js";import{i as Ye}from"./AlertCircle-DC-zDzV-.js";import{i as ts}from"./Upload01-Z77n1bV8.js";import{c as He,b as We,d as Je,A as Ze,g as Xe,e as et,a as tt,f as st}from"./alert-dialog-CYizItFp.js";import{C as ne}from"./card-BFb5m83e.js";import{s as rt}from"./Trash01-ByxlxTiZ.js";import{L as te}from"./label-CdBSUJpf.js";import{d as or,b as cr,c as dr,S as ur,a as St}from"./select-C6v8Xcth.js";import{S as ze}from"./switch-CCMIMmOF.js";import{T as vt}from"./textarea-BYT525JZ.js";import{i as mr}from"./X-DrMVHLcw.js";import{t as xr}from"./ChevronDown-DyHvxYlc.js";import{n as pr,i as Rt}from"./ChevronUp-DBpw6M-L.js";import{C as ss}from"./checkbox-DmOzmKLP.js";import{s as xs,a as Tt}from"./Eye-bojNLUjA.js";import{n as hr}from"./LinkExternal01-BHwVyDja.js";import{u as fr}from"./use-infinite-scroll-BX1nHHVY.js";import{u as It}from"./use-copy-Xy0buIqd.js";import{i as gr}from"./Key01-CwrJlZo0.js";import{s as jr}from"./Plus-eGxBB1d8.js";import{a as vr,b as br,T as yr}from"./tooltip-DrpiSbRG.js";import{i as Nr,a as wr}from"./mcp-oauth-IblqU9XT.js";import{i as _r}from"./Play-CnXG8qqP.js";import"./auth-Bej0Tx2Y.js";import"./ChevronRight-Cpfh3gza.js";import"./use-mobile-NlF-3RoP.js";const Ue="private-registry",Cr=`
2
2
  You are an MCP tool tester running automated integration checks.
3
3
 
4
4
  Goal:
@@ -1 +1 @@
1
- import{c as p,j as m}from"./index-DmjWDqcd.js";import{u as l}from"./use-capability-CDOjpxJe.js";import{A as u}from"./access-gate-Bwf2CoM1.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
1
+ import{c as p,j as m}from"./index-CFiyU0D9.js";import{u as l}from"./use-capability-C6Dwri-U.js";import{A as u}from"./access-gate-D6dGDGRI.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
@@ -1 +1 @@
1
- import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-DmjWDqcd.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(f,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function g(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{g as R};
1
+ import{c as l,j as s,A as a,S as m,f as h,h as u,N as f}from"./index-CFiyU0D9.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(f,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function g(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{g as R};
@@ -1 +1 @@
1
- import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-DmjWDqcd.js";import{I as L}from"./input-BlaLo4Ee.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let g;e[22]!==a||e[23]!==t?(g=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=g):g=e[24];let f;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(f=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=f):f=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==g||e[42]!==f||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,g,f,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=g,e[42]=f,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
1
+ import{c as q,u as Y,b as A,r as B,d as G,j as s,B as z,a as K}from"./index-CFiyU0D9.js";import{I as L}from"./input-BwRH-Gsz.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let g;e[22]!==a||e[23]!==t?(g=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=g):g=e[24];let f;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(f=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=f):f=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==g||e[42]!==f||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,g,f,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=g,e[42]=f,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};