decocms 4.503.1 → 4.503.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-B4zRtCcX.js → ActiveShapeUtils-CBLSJqBl.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-B7FQmH_M.js → AlertCircle-BFUZ4yx0.js} +1 -1
  3. package/dist/client/assets/{AreaChart-80AfW8ak.js → AreaChart-DKrmhkRJ.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DZes_rvl.js → ArrowLeft-CK2OAC0l.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DJaSaDSt.js → ArrowUp-U6_gobY2.js} +1 -1
  6. package/dist/client/assets/{BarChart-BpCZ5QGT.js → BarChart-DBqZyJQX.js} +1 -1
  7. package/dist/client/assets/{Building02-C692k1Je.js → Building02-Ddm6hNyu.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-FZqnb3jh.js → CategoricalChart-DYWjGYq1.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DTvtIc91.js → CheckCircle-BWW06ZXQ.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-CSoDnwYU.js → ChevronSelectorVertical-DKcwgXpF.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-D6SZVzK-.js → ChevronUp-CTrNq9Nk.js} +1 -1
  12. package/dist/client/assets/{Copy01-CRJ909cy.js → Copy01-TJP2zB12.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DKW3gWt7.js → CreditCard01-Bm6_xB5H.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-DPFiEMJ2.js → DotsVertical-DKl8j3BE.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-D5rQXK1V.js → ErrorBarContext-CR5xIaDQ.js} +1 -1
  16. package/dist/client/assets/{Globe04-CCnzVN5c.js → Globe04-ClrCqE7c.js} +1 -1
  17. package/dist/client/assets/{Image01-CoKdj_km.js → Image01-Cf_YxPro.js} +1 -1
  18. package/dist/client/assets/{Key01-CZ56XYyu.js → Key01-55Z6tHcr.js} +1 -1
  19. package/dist/client/assets/{Link01-QYs7ouJl.js → Link01-DNXOSsg9.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-C8q-hkDW.js → LinkBroken01-Vuoqu_ZW.js} +1 -1
  21. package/dist/client/assets/{Monitor01-DO9PZtsn.js → Monitor01-C-mB2rao.js} +1 -1
  22. package/dist/client/assets/{Play-B8h_fG9j.js → Play-CUFyJJIt.js} +1 -1
  23. package/dist/client/assets/{Plus-CyJJ3XFV.js → Plus-D-GSl2MA.js} +1 -1
  24. package/dist/client/assets/{SearchMd-Yk_yG6_-.js → SearchMd-CkV8MM4H.js} +1 -1
  25. package/dist/client/assets/{Sector-C-MC544L.js → Sector-CNZsIxmG.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-Cr7oTzOr.js → ShoppingBag01-dI1cRqeE.js} +1 -1
  27. package/dist/client/assets/{Sun-DM7-cZiQ.js → Sun-BPl8u-yx.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-Bv6v-_-V.js → SwitchHorizontal01-KDjTaTLX.js} +1 -1
  29. package/dist/client/assets/{Tool01-D_pOnyrM.js → Tool01-CvAlZ6_R.js} +1 -1
  30. package/dist/client/assets/{Trash01-CLvb-vxo.js → Trash01-BzUZQR5Y.js} +1 -1
  31. package/dist/client/assets/{Upload01-DotbRoth.js → Upload01-CdgDB-zC.js} +1 -1
  32. package/dist/client/assets/{User01-DpzyFtdl.js → User01-CinpYulR.js} +1 -1
  33. package/dist/client/assets/{UserSquare-ii6T7SpT.js → UserSquare-0R6kuy9W.js} +1 -1
  34. package/dist/client/assets/{Users01-BEOgMF3y.js → Users01-DFSTtPtZ.js} +1 -1
  35. package/dist/client/assets/{XAxis--67FjR4u.js → XAxis-CMCcO3jI.js} +1 -1
  36. package/dist/client/assets/{XClose-UJ2K7TVC.js → XClose-CXxsMd9c.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-FPIBUWhA.js → ZoomOut-C1rwTYBB.js} +1 -1
  38. package/dist/client/assets/{access-gate-Cj7Rjcug.js → access-gate-BSx5LbNZ.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-DVH8e9NI.js → add-connection-dialog-CNB1XZS8.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-Ce-ZWP9P.js → agent-analytics-BKsJAgnt.js} +1 -1
  41. package/dist/client/assets/agent-app-DBSthuoA.js +1 -0
  42. package/dist/client/assets/{agent-assets-ajh1hAY1.js → agent-assets-CvHLRtfR.js} +1 -1
  43. package/dist/client/assets/{agent-automation-Di1n1bbE.js → agent-automation-DG660AlN.js} +1 -1
  44. package/dist/client/assets/{agent-automations-ClchWctF.js → agent-automations-DkNZsDdV.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-BA7V6yxc.js → agent-connect-sources-DFGjLsvu.js} +1 -1
  46. package/dist/client/assets/agent-deck-DW69LMk-.js +1 -0
  47. package/dist/client/assets/{agent-e2e-D8djWDNu.js → agent-e2e-CTTKhY1C.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-C1rYkq-c.js → agent-experiments-B23reQrT.js} +1 -1
  49. package/dist/client/assets/{agent-file-BPspUfYw.js → agent-file-CFgK4Fqg.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-X7gvVXAz.js → agent-hosting-BL7RyxMT.js} +1 -1
  51. package/dist/client/assets/{agent-icon-B7cHtLmN.js → agent-icon-Bmu0Xuy8.js} +1 -1
  52. package/dist/client/assets/agent-library-D9aAC92j.js +1 -0
  53. package/dist/client/assets/agent-library-file-Dlq-Vts6.js +1 -0
  54. package/dist/client/assets/{agent-monitor-gDwyBiKw.js → agent-monitor-Dxt5K5x_.js} +1 -1
  55. package/dist/client/assets/{agent-overview-CNjRMR9E.js → agent-overview-CAzScYJD.js} +1 -1
  56. package/dist/client/assets/{agent-releases-BRTteMcu.js → agent-releases-RSbZ96r7.js} +1 -1
  57. package/dist/client/assets/agent-settings-5EOlZJW6.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-DSS1gTUU.js → agent-site-editor-DFWKub_t.js} +1 -1
  59. package/dist/client/assets/agent-site-editor-code-I8N3vaXE.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-uhd8Bnc-.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-CV5DbDBm.js +1 -0
  62. package/dist/client/assets/agent-view-QNUTYcIi.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-CCih3VTe.js → agent-view-guard-BwubZYi8.js} +1 -1
  64. package/dist/client/assets/{agents-list-CZjV8bbN.js → agents-list-L7YgNFph.js} +1 -1
  65. package/dist/client/assets/{ai-providers-B6JeYxX2.js → ai-providers-DEeLkiCM.js} +1 -1
  66. package/dist/client/assets/{alert-8kyzY3mC.js → alert-CnRQ3m-7.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-Dhk9OY33.js → alert-dialog-BaBKldUA.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-FNv48nRX.js → analytics-sections-BIEC86HP.js} +1 -1
  69. package/dist/client/assets/api-keys-BgtInlXe.js +1 -0
  70. package/dist/client/assets/{api-keys-D5flq3KN.js → api-keys-CmpJo1Rr.js} +1 -1
  71. package/dist/client/assets/{app-editor-BhVwxJJK.js → app-editor-BqvAOKlk.js} +1 -1
  72. package/dist/client/assets/{asset-utils-C2Mu9meV.js → asset-utils--N2gsOKr.js} +1 -1
  73. package/dist/client/assets/{auth-D-N_o1pb.js → auth-BeK8rRbB.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-BBvN2Rx7.js → auth-catchall-fFMHk_ps.js} +1 -1
  75. package/dist/client/assets/{auth-entry-DbRCvj9z.js → auth-entry-C1_Znn_c.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-CtlyXCmE.js → auth-split-layout-CocPnGfp.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-1LFr51s5.js → authenticate-and-persist-oauth-DJwJCiC8.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-COpQfJ8e.js → automation-list-row-3WI1rtPZ.js} +1 -1
  79. package/dist/client/assets/{automation-runs-DVpJHzv0.js → automation-runs-dkpbdf4I.js} +1 -1
  80. package/dist/client/assets/{automations-C8_YeRwz.js → automations-CaP79ol1.js} +1 -1
  81. package/dist/client/assets/{autosend-BZJ2TdB9.js → autosend-B-VPnrp2.js} +1 -1
  82. package/dist/client/assets/{avatar-nIzU_VyX.js → avatar-yCbsNNbw.js} +1 -1
  83. package/dist/client/assets/{badge-BPqtGuPz.js → badge-Zdi_g359.js} +1 -1
  84. package/dist/client/assets/{block-document-BKQmJN5N.js → block-document-D4x1DRNW.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-k-h3WbAb.js → blocks-preview-workspace-context-CMtVQxL8.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-BBN5TI4p.js → blocks-tab-states-B7_Q2Byx.js} +3 -3
  87. package/dist/client/assets/{blog-schema-BUAdNo1n.js → blog-schema-D0r94Mwa.js} +1 -1
  88. package/dist/client/assets/{board-analytics-DwUwOtky.js → board-analytics-DjFw48Ii.js} +1 -1
  89. package/dist/client/assets/{buckets-CvDtgoPk.js → buckets-DmovZm0n.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-BG4FSKpV.js → build-improve-prompt-doc-Cd4DLFMv.js} +1 -1
  91. package/dist/client/assets/{calendar-CliY99e4.js → calendar-aMW3a7Qx.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-BWT346oK.js → capability-load-error-xmV40q_-.js} +1 -1
  93. package/dist/client/assets/{category-editor-c-rjHBE2.js → category-editor-BYf-_N2d.js} +1 -1
  94. package/dist/client/assets/{chart-BeOqWxx3.js → chart-D1eqwoYD.js} +1 -1
  95. package/dist/client/assets/{chat-context-Bm126Y9d.js → chat-context-C4pDshj1.js} +1 -1
  96. package/dist/client/assets/{chat-draft-DpsQeTSh.js → chat-draft-D5dlb_sl.js} +1 -1
  97. package/dist/client/assets/{checkbox-BHYLtolO.js → checkbox-C2l5tKo2.js} +1 -1
  98. package/dist/client/assets/{choose-editor-BAVCkM9r.js → choose-editor-C_NzKjq2.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-NkKi_-yn.js → cli-auth-success-DSx-mAhh.js} +1 -1
  100. package/dist/client/assets/{client-icons-DiOq8lJC.js → client-icons-BasHQFnS.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-BB3l1bfM.js +1 -0
  102. package/dist/client/assets/{collapsible-Bnza8CXw.js → collapsible-CDZFoOK-.js} +1 -1
  103. package/dist/client/assets/{collection-detail-B-_hN-JC.js → collection-detail-DkNCk0OQ.js} +1 -1
  104. package/dist/client/assets/{collection-display-button-CrvZt97I.js → collection-display-button--eCg5c5n.js} +1 -1
  105. package/dist/client/assets/{collection-search-BJh6F6XQ.js → collection-search-sopr7ssV.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper--ez0DBTz.js → collection-table-wrapper-Cy3Cbckv.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-jNi4Jv0Y.js → collection-tabs-DU5QTifc.js} +1 -1
  108. package/dist/client/assets/{column-rules-BS9JY-Oa.js → column-rules-Z54WqqNc.js} +1 -1
  109. package/dist/client/assets/{combobox-CsaU06Jl.js → combobox-C2hXpc1p.js} +1 -1
  110. package/dist/client/assets/{command-DSORHlWH.js → command-BSGZ-TwS.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-BBesHoiB.js → companion-mcps-section-d9HGklIc.js} +1 -1
  112. package/dist/client/assets/{config-D3uahd_6.js → config-CddNRjRY.js} +1 -1
  113. package/dist/client/assets/{connect-afghfC6I.js → connect-BGfL3A9r.js} +1 -1
  114. package/dist/client/assets/{connect-layout-CWu2TS6d.js → connect-layout-DoM7vuFX.js} +1 -1
  115. package/dist/client/assets/{connection-VFOGX82d.js → connection-B0eFNfCu.js} +1 -1
  116. package/dist/client/assets/{connection-card-CugVHwbe.js → connection-card-BzTYJa6s.js} +1 -1
  117. package/dist/client/assets/{connection-detail-DOnigZIS.js → connection-detail-Cwz-qT82.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-Ht3Y_JTI.js → connection-form-helpers-ChgreO5F.js} +1 -1
  119. package/dist/client/assets/{connections-y4LWYMRk.js → connections-CnirV_66.js} +1 -1
  120. package/dist/client/assets/{content-tab-BbeLE04u.js → content-tab-BIEsoSfa.js} +3 -3
  121. package/dist/client/assets/{context-1CQ99Xh2.js → context-DEuw9CjH.js} +1 -1
  122. package/dist/client/assets/{context-menu-Cf7UvCHV.js → context-menu-CHrxflOD.js} +1 -1
  123. package/dist/client/assets/{core.esm-oiTkWp_q.js → core.esm-CWXW2IWJ.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-Chu_8T3p.js → create-organization-dialog-Bci4qKSS.js} +1 -1
  125. package/dist/client/assets/{daily-pulse-D2siiT-N.js → daily-pulse-CRZ8lDnm.js} +1 -1
  126. package/dist/client/assets/{discover-y_xX0Jww.js → discover-C3iLTVFB.js} +1 -1
  127. package/dist/client/assets/{domain-settings-D3fYG_8u.js → domain-settings-DdY9W_8b.js} +1 -1
  128. package/dist/client/assets/{drawer-BaMAsObr.js → drawer-BpEasqMM.js} +1 -1
  129. package/dist/client/assets/{editor-gEAdAF4z.js → editor-DQK8Gbky.js} +1 -1
  130. package/dist/client/assets/{editor-classes-BkgvFYZG.js → editor-classes-wKHzvXkJ.js} +1 -1
  131. package/dist/client/assets/{empty-state-pgELPzRJ.js → empty-state-Ck0Y0zH4.js} +1 -1
  132. package/dist/client/assets/{empty-state-Qh91SokD.js → empty-state-GUv-DLNf.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-CmhWlbRd.js → extract-connection-data-CyaR6DQN.js} +1 -1
  134. package/dist/client/assets/{feature-gate-D8bbKoJM.js → feature-gate-Cd3TCuYG.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-yY-LJqXW.js → feature-paywall-HnwykYzM.js} +1 -1
  136. package/dist/client/assets/{file-explorer-D61hIry6.js → file-explorer-B8GvovSI.js} +1 -1
  137. package/dist/client/assets/{file-preview-DA9PL3PH.js → file-preview-KNDU2UhF.js} +1 -1
  138. package/dist/client/assets/{file-share-button-Db4oG9-W.js → file-share-button-BX7_JCXp.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-CmCTgogr.js → file-type-icon-C2WSm6EM.js} +1 -1
  140. package/dist/client/assets/flat-project-XWFiDywx.js +1 -0
  141. package/dist/client/assets/{folder-icon-DxKEGodw.js → folder-icon-DOSAeTvE.js} +1 -1
  142. package/dist/client/assets/{form-B2R0FZpl.js → form-Dz-wry37.js} +1 -1
  143. package/dist/client/assets/{general-DGAJ8SIw.js → general-lahSHdvs.js} +1 -1
  144. package/dist/client/assets/{home-DllK7NjJ.js → home-CfslMwmV.js} +1 -1
  145. package/dist/client/assets/{hosted-publish-feedback-C-78qWJE.js → hosted-publish-feedback-D7K1BgAP.js} +1 -1
  146. package/dist/client/assets/{icon-button-BLmb1aFH.js → icon-button-BbQESQAz.js} +1 -1
  147. package/dist/client/assets/{index-Bi4uPXkI.js → index-BFWcpEys.js} +1 -1
  148. package/dist/client/assets/{index-CMSBZHOC.js → index-BX4Ek3Q9.js} +1 -1
  149. package/dist/client/assets/{index-C5kiFY0N.js → index-BhuMySoe.js} +1 -1
  150. package/dist/client/assets/{index-CNnllo6G.js → index-BoB02eW2.js} +2 -2
  151. package/dist/client/assets/{index-DFDhdIkn.js → index-CAsLc9Zw.js} +1 -1
  152. package/dist/client/assets/{index-LQ6JAM7x.js → index-CD1O2KuY.js} +3 -3
  153. package/dist/client/assets/{index-4S552BvA.js → index-COyZFAVd.js} +1 -1
  154. package/dist/client/assets/{index-DlkNBOKp.js → index-CVeMcxNw.js} +1 -1
  155. package/dist/client/assets/{index-D2K6wJdd.js → index-Cdsu1Nw_.js} +1 -1
  156. package/dist/client/assets/{index-JfKaG8r5.js → index-DSuQX-Dj.js} +1 -1
  157. package/dist/client/assets/{index-B8m-k0Po.js → index-DhnL-yRw.js} +1 -1
  158. package/dist/client/assets/{index-BQe9t0ZU.js → index-DuSo48nd.js} +1 -1
  159. package/dist/client/assets/{index-QaFbqB6H.js → index-Fqg3dcpq.js} +1 -1
  160. package/dist/client/assets/{index-k8d57vb2.js → index-mPiuZtAa.js} +1 -1
  161. package/dist/client/assets/{index-cnt3BCfz.js → index-qp2WMoaq.js} +1 -1
  162. package/dist/client/assets/{index-redirect-CDoOQ7Fs.js → index-redirect-LGC8XAQa.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-CqK1S2-W.js → infiniteQueryObserver-BuOPvaCd.js} +1 -1
  164. package/dist/client/assets/{infra-billing-BD6Y6fAa.js → infra-billing-C7a9CxBG.js} +1 -1
  165. package/dist/client/assets/{input-Bue-yNpK.js → input-CC2XqVda.js} +1 -1
  166. package/dist/client/assets/{input-DnkGG1pQ.js → input-Dx6Yl3YV.js} +3 -3
  167. package/dist/client/assets/{integration-icon-Dl2m6ce3.js → integration-icon-YHEiRLgT.js} +1 -1
  168. package/dist/client/assets/{jira-icon-BN8gmoGK.js → jira-icon-i9apovX2.js} +1 -1
  169. package/dist/client/assets/{label-C2MI3yAw.js → label-CsyEQPG4.js} +1 -1
  170. package/dist/client/assets/{layout-D3qT5OMX.js → layout-BT112QdT.js} +1 -1
  171. package/dist/client/assets/{legacy-agents-deep-Bh_GWt30.js → legacy-agents-deep-HgU3c2Dz.js} +1 -1
  172. package/dist/client/assets/{legacy-main-redirect-DlBO4F0C.js → legacy-main-redirect-jScx_XSf.js} +1 -1
  173. package/dist/client/assets/library-CWV47kSp.js +1 -0
  174. package/dist/client/assets/{library-tab-ChjG-ita.js → library-tab-9158ORpA.js} +1 -1
  175. package/dist/client/assets/{login-BJJfll2X.js → login-OE28YT2s.js} +1 -1
  176. package/dist/client/assets/{markdown-BzeS6Mup.js → markdown-TXCHEe-4.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-BHQg4BC0.js → mcp-app-renderer-BAlCN3Lv.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-CCgQhJ0H.js → mcp-oauth-BFqNJ-iQ.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-C9k0QipU.js → mcp-oauth-CuU6LL15.js} +1 -1
  180. package/dist/client/assets/{members-BJ8Q84sj.js → members-CbEEa2ua.js} +1 -1
  181. package/dist/client/assets/{memory-6DQlmI8s.js → memory-malk94i-.js} +1 -1
  182. package/dist/client/assets/{mini-report-page-Dp287JJW.js → mini-report-page-Dhes7qGv.js} +1 -1
  183. package/dist/client/assets/{mock-board-BrRrzkyb.js → mock-board-B4GBU96k.js} +1 -1
  184. package/dist/client/assets/{monaco-editor-Dqlv9Rx3.js → monaco-editor-DIn5LVAo.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-CHv5bry_.js → monitoring-stats-row-CsXWM1-N.js} +1 -1
  186. package/dist/client/assets/{multi-select-CxacBEPt.js → multi-select-jv5l4gKB.js} +1 -1
  187. package/dist/client/assets/{mustache-DewX4fdh.js → mustache-C3mAjW3w.js} +1 -1
  188. package/dist/client/assets/{new-project-dialog-HwZsHJw7.js → new-project-dialog-DCPZVRuS.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-K69Edssh.js → oauth-callback-C7bM7rgT.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-ai-provider-CpEQmEON.js → oauth-callback-ai-provider-maa6Zm5e.js} +1 -1
  191. package/dist/client/assets/{onboarding-CMSxOCHp.js → onboarding-ds1UbiQ9.js} +1 -1
  192. package/dist/client/assets/{openai-conversation-8f12XdbQ.js → openai-conversation-BSvbWT0F.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-qLHxsO7U.js → optimistic-project-sidebar-views-2rlAyeqj.js} +1 -1
  194. package/dist/client/assets/{order-monitor-day-C2C1WPzt.js → order-monitor-day-CZG8_Uqo.js} +1 -1
  195. package/dist/client/assets/{organization-choice-BlYawX8-.js → organization-choice-CGGV7pYx.js} +1 -1
  196. package/dist/client/assets/{orgs-CGBX8gbU.js → orgs-DSh5ncFV.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-BYVKaWGS.js → page-seo-form-BPMiXtW-.js} +1 -1
  198. package/dist/client/assets/{pair-84suUGZ3.js → pair-C9IKm4JE.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-Ct3CUY0O.js → plan-ladder-DbkDT52b.js} +1 -1
  200. package/dist/client/assets/{popover-Ba56Iai5.js → popover-CzNTcDJM.js} +1 -1
  201. package/dist/client/assets/{post-calendar-RpsbnecM.js → post-calendar-DGIFZvru.js} +1 -1
  202. package/dist/client/assets/{post-editor-C9oD8ESN.js → post-editor-BINaZa6q.js} +1 -1
  203. package/dist/client/assets/{preview-content-DF0BMyfw.js → preview-content-BjX4Mivy.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-DlotDPpC.js → preview-dialog-C8Boj2eR.js} +1 -1
  205. package/dist/client/assets/{preview-panel-BFMr1mkC.js → preview-panel-BTtWNKn9.js} +1 -1
  206. package/dist/client/assets/{preview-tab-AtnwySoZ.js → preview-tab-BYhuHpLV.js} +3 -3
  207. package/dist/client/assets/{product-picker-dialog-JlTB9ihe.js → product-picker-dialog-qxyRXjlS.js} +1 -1
  208. package/dist/client/assets/{profile-NePIrfXd.js → profile-Cgb34CQu.js} +1 -1
  209. package/dist/client/assets/{project-app-view-CZBqblIb.js → project-app-view-B5MD1o9B.js} +1 -1
  210. package/dist/client/assets/{project-feed-Y1MpiHk4.js → project-feed-DnDlefHV.js} +1 -1
  211. package/dist/client/assets/{project-icon-CxJtU18v.js → project-icon-CP0m7tWm.js} +1 -1
  212. package/dist/client/assets/project-reports-8XAuspn6.js +1 -0
  213. package/dist/client/assets/project-tasks-CGbl7DTy.js +1 -0
  214. package/dist/client/assets/{projects-CiRkvKrf.js → projects-DmCmaniu.js} +1 -1
  215. package/dist/client/assets/{projects-empty-state-D7-trQYt.js → projects-empty-state-fIhR2Z5I.js} +1 -1
  216. package/dist/client/assets/{prompts-DNcBfJiD.js → prompts-CW5UUH65.js} +1 -1
  217. package/dist/client/assets/record-editor--8X4AXV_.js +1 -0
  218. package/dist/client/assets/{redirect-editor-CC5Q4Ymt.js → redirect-editor-CxJl2CVJ.js} +1 -1
  219. package/dist/client/assets/{reports-DIGilxrB.js → reports-BXGEiRjn.js} +1 -1
  220. package/dist/client/assets/reports-eZ_It7qc.js +1 -0
  221. package/dist/client/assets/{reports-onboarding-B0pJwCjp.js → reports-onboarding-DNEAbZJV.js} +1 -1
  222. package/dist/client/assets/{reports-tab-BGanWho6.js → reports-tab-CwK-fp7x.js} +2 -2
  223. package/dist/client/assets/{repositories-B2bTWPV9.js → repositories-ClghJilC.js} +1 -1
  224. package/dist/client/assets/{repository-binding-DqlrnpeD.js → repository-binding-BYnKmLVI.js} +1 -1
  225. package/dist/client/assets/{repository-import-picker-BQKO3YmL.js → repository-import-picker-De4qAOck.js} +1 -1
  226. package/dist/client/assets/{repository-picker-1U5-cKDz.js → repository-picker-B7BUYgB7.js} +1 -1
  227. package/dist/client/assets/{require-capability-ojXn93H0.js → require-capability-hn1SreP5.js} +1 -1
  228. package/dist/client/assets/{required-auth-layout-D-YJoBk-.js → required-auth-layout-Mqzz7XgH.js} +1 -1
  229. package/dist/client/assets/{reset-password-BmX8ePKp.js → reset-password-BOpvbCSW.js} +1 -1
  230. package/dist/client/assets/{resizable-CbpZQFpZ.js → resizable-DpCFVPH5.js} +1 -1
  231. package/dist/client/assets/{resolve-tab-icon-D2OV9kBN.js → resolve-tab-icon-8PRTNpAS.js} +1 -1
  232. package/dist/client/assets/{review-settings-DK01glaZ.js → review-settings-Bw0A1sn1.js} +1 -1
  233. package/dist/client/assets/{roles-LZWr7__G.js → roles-BMCtr4MB.js} +1 -1
  234. package/dist/client/assets/{route-Gjmz5E23.js → route-DLSqOpoM.js} +1 -1
  235. package/dist/client/assets/{route-ihwuHnpr.js → route-DnP6JRb8.js} +1 -1
  236. package/dist/client/assets/route-yiouOCXy.js +1 -0
  237. package/dist/client/assets/{sandbox-lifecycle-context-CMe6ziY_.js → sandbox-lifecycle-context-Dg7K5ioC.js} +1 -1
  238. package/dist/client/assets/{schema-DvCj02YW.js → schema-D-qEbXZ-.js} +1 -1
  239. package/dist/client/assets/{schema-j2854AG6.js → schema-zU96PUAb.js} +1 -1
  240. package/dist/client/assets/{scroll-area-DRWJ_F1a.js → scroll-area-D_ro8hTm.js} +1 -1
  241. package/dist/client/assets/{search-input-DqG4kyRF.js → search-input-qNQGHbDh.js} +1 -1
  242. package/dist/client/assets/{search-toggle-CGVfCMLJ.js → search-toggle-Dfh8XGYH.js} +1 -1
  243. package/dist/client/assets/{secret-ciphertext-DXqrbEWb.js → secret-ciphertext-DkD2R7dc.js} +1 -1
  244. package/dist/client/assets/{secret-picker-Diad3aWD.js → secret-picker-CmVVvqgZ.js} +1 -1
  245. package/dist/client/assets/{secrets-_pq8fc-A.js → secrets-BDW-A1kb.js} +1 -1
  246. package/dist/client/assets/{sections-editor-jfQPkYiX.js → sections-editor-BKmXdadO.js} +1 -1
  247. package/dist/client/assets/{select-Jex63p6s.js → select-C4iThYr6.js} +1 -1
  248. package/dist/client/assets/{select-model-BpMhMCHG.js → select-model-BND792Uy.js} +1 -1
  249. package/dist/client/assets/{seo-editor-rID5Th2v.js → seo-editor-ClpJZQda.js} +1 -1
  250. package/dist/client/assets/{separator-laGeAgXV.js → separator-DYHY_XVB.js} +1 -1
  251. package/dist/client/assets/{settings-tab-D4oc-m6U.js → settings-tab-A8T1BHYG.js} +1 -1
  252. package/dist/client/assets/{sheet-BjDciyLt.js → sheet-BXRHJIP3.js} +1 -1
  253. package/dist/client/assets/{shell-layout-ohVxtYQn.js → shell-layout-BhM3Q_22.js} +1 -1
  254. package/dist/client/assets/site-editor-LulM9jUZ.js +1 -0
  255. package/dist/client/assets/{site-editor-toast-Cwor802o.js → site-editor-toast-DPPGE5LH.js} +1 -1
  256. package/dist/client/assets/{skills-BjHMkGI4.js → skills-Kw1j3-7B.js} +1 -1
  257. package/dist/client/assets/{slider-BgVX57Hw.js → slider-CpU4rmfX.js} +1 -1
  258. package/dist/client/assets/{sortable.esm--JfVXwY2.js → sortable.esm-CBSg5QWi.js} +1 -1
  259. package/dist/client/assets/{sso-DtpWrT1m.js → sso-GSEhvAQ2.js} +1 -1
  260. package/dist/client/assets/{suggestion-DmWAjig0.js → suggestion-BPVDnpZj.js} +1 -1
  261. package/dist/client/assets/{switch-BXwkRMsQ.js → switch-63WSXheM.js} +1 -1
  262. package/dist/client/assets/{symbol-DMd_AX9i.js → symbol-rviHpBrN.js} +1 -1
  263. package/dist/client/assets/{synced-repos-DXXyL6dr.js → synced-repos-D3YnOlYC.js} +1 -1
  264. package/dist/client/assets/{tab-icon-glyph-WTogvuRL.js → tab-icon-glyph-Dqe-yN6V.js} +1 -1
  265. package/dist/client/assets/{table-BEoFysnY.js → table-CLaOCONQ.js} +1 -1
  266. package/dist/client/assets/{tabs-BUOCNWab.js → tabs-BQUPeDjf.js} +1 -1
  267. package/dist/client/assets/{task-board-et69go2s.js → task-board-DxxiAR5A.js} +1 -1
  268. package/dist/client/assets/{task-route-DRCZxpHC.js → task-route-Ce6MTE8h.js} +1 -1
  269. package/dist/client/assets/{task-status-Clz_ohkz.js → task-status-CMbp-PaL.js} +1 -1
  270. package/dist/client/assets/taskboard-analytics-_ZvfL2sj.js +1 -0
  271. package/dist/client/assets/{tasks-CI2TSEv1.js → tasks-BarD4hla.js} +1 -1
  272. package/dist/client/assets/tasks-DcunZstc.js +1 -0
  273. package/dist/client/assets/{textarea-BP2sfmUn.js → textarea-CxYAsAPe.js} +1 -1
  274. package/dist/client/assets/{thread-analytics-ClTk6JCf.js → thread-analytics-Cjx1orRq.js} +1 -1
  275. package/dist/client/assets/{thread-intent-B3UX1VYD.js → thread-intent-DikZOwd-.js} +1 -1
  276. package/dist/client/assets/{thread-route-Dj3FHeZv.js → thread-route-CRU_aqN9.js} +1 -1
  277. package/dist/client/assets/{thread-route-C-V5eWkC.js → thread-route-ChugAIRh.js} +1 -1
  278. package/dist/client/assets/{thread-sheet-body-DN2xi_yQ.js → thread-sheet-body-DfFj6DBB.js} +1 -1
  279. package/dist/client/assets/{time-range-picker-BGpEdCr4.js → time-range-picker-Bf6M5ihN.js} +1 -1
  280. package/dist/client/assets/{toggle-group-CElgKi93.js → toggle-group-DbSldXZX.js} +1 -1
  281. package/dist/client/assets/{tool-namespace-CSvvZ9-r.js → tool-namespace-pIFYrei5.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-BHgf03SN.js → toolbar-icon-button-B24Twz-b.js} +1 -1
  283. package/dist/client/assets/{tooltip-D39pwdkl.js → tooltip-Bs0EJaD7.js} +1 -1
  284. package/dist/client/assets/{tooltipContext-v4Ov_BWo.js → tooltipContext-fXkDpiI8.js} +1 -1
  285. package/dist/client/assets/{track-D4y7DnsA.js → track-BzGhLw1A.js} +1 -1
  286. package/dist/client/assets/{types-sLIChj1_.js → types-IpdOmnYx.js} +1 -1
  287. package/dist/client/assets/{url-slug-Ui3mV6vi.js → url-slug-CMCbwnaP.js} +1 -1
  288. package/dist/client/assets/{usage-stats-D62oidTL.js → usage-stats-DuvxTL2m.js} +1 -1
  289. package/dist/client/assets/{use-ai-providers-IcsUWN-K.js → use-ai-providers-Becg3IYt.js} +1 -1
  290. package/dist/client/assets/{use-app-takeover-CIvPyTDt.js → use-app-takeover-DFb1RzQs.js} +1 -1
  291. package/dist/client/assets/{use-automations-D4B7ETWW.js → use-automations-Cp9pysoO.js} +1 -1
  292. package/dist/client/assets/{use-autosave-D9eru9Ze.js → use-autosave-C5CskRdQ.js} +1 -1
  293. package/dist/client/assets/{use-chat-navigation-D_OZ7XLd.js → use-chat-navigation-BJSvg7rH.js} +1 -1
  294. package/dist/client/assets/{use-clock-tick-BEO-m3vD.js → use-clock-tick-B1PaG9d4.js} +1 -1
  295. package/dist/client/assets/{use-connect-companion-Cujc6mJy.js → use-connect-companion-ClLk9Ret.js} +1 -1
  296. package/dist/client/assets/{use-connection-BxJdPGkr.js → use-connection-CLmhN_H7.js} +1 -1
  297. package/dist/client/assets/{use-copy-BlMydeoV.js → use-copy-T3xwaExj.js} +1 -1
  298. package/dist/client/assets/{use-create-virtual-mcp-Bd3ICWl5.js → use-create-virtual-mcp-CVTk_yNo.js} +1 -1
  299. package/dist/client/assets/{use-date-fns-locale-BJ-xFgzl.js → use-date-fns-locale-CYDYn543.js} +1 -1
  300. package/dist/client/assets/{use-debounced-autosave-Dt1irWAn.js → use-debounced-autosave-8fEcHiWI.js} +1 -1
  301. package/dist/client/assets/{use-debounced-value-B_S8lb_4.js → use-debounced-value-d254MtLc.js} +1 -1
  302. package/dist/client/assets/{use-deco-credits-nfiVDn98.js → use-deco-credits-BJdkVUlJ.js} +1 -1
  303. package/dist/client/assets/{use-decopilot-events-qheXoFrz.js → use-decopilot-events-D42PqykU.js} +1 -1
  304. package/dist/client/assets/{use-delete-connection-DJv3D_sh.js → use-delete-connection-Bp41mUbu.js} +1 -1
  305. package/dist/client/assets/{use-deployment-admin-BZx-lcmt.js → use-deployment-admin-Cz36UM7j.js} +1 -1
  306. package/dist/client/assets/{use-ensure-project-folder-568pY7Mx.js → use-ensure-project-folder-DV9pI0pa.js} +1 -1
  307. package/dist/client/assets/{use-fast-preview-draft-url-B5I6D4fe.js → use-fast-preview-draft-url-Dbj9pvCB.js} +1 -1
  308. package/dist/client/assets/{use-file-configs-wZCwveLR.js → use-file-configs-D_kGDRPd.js} +1 -1
  309. package/dist/client/assets/{use-infinite-scroll-yxXaBcmD.js → use-infinite-scroll-C47I-wuH.js} +1 -1
  310. package/dist/client/assets/{use-join-requests-DqmeRmXJ.js → use-join-requests-Cy3hlZv5.js} +1 -1
  311. package/dist/client/assets/{use-main-panel-tabs-CUuCqnlA.js → use-main-panel-tabs-DjhEbRyd.js} +1 -1
  312. package/dist/client/assets/{use-mcp-auth-status-BCDRh6Ej.js → use-mcp-auth-status-5SUSMsp-.js} +1 -1
  313. package/dist/client/assets/{use-mcp-client-cb8e4tvm.js → use-mcp-client-CEKqqblF.js} +1 -1
  314. package/dist/client/assets/{use-mcp-prompts-BfEVPVEx.js → use-mcp-prompts-CwF-bqUg.js} +1 -1
  315. package/dist/client/assets/{use-mcp-tools-DZxb1_zu.js → use-mcp-tools-_07-mu_D.js} +1 -1
  316. package/dist/client/assets/{use-members-D7SiQmGu.js → use-members-CFcpHrvE.js} +1 -1
  317. package/dist/client/assets/{use-mobile-BNQyDf1J.js → use-mobile-CYsZ0F3X.js} +1 -1
  318. package/dist/client/assets/{use-navigate-to-agent-D-kAnKoC.js → use-navigate-to-agent-DNsHLJD8.js} +1 -1
  319. package/dist/client/assets/{use-open-billing-url-CdvtCyZf.js → use-open-billing-url-C1m0KS6b.js} +1 -1
  320. package/dist/client/assets/{use-org-auth-client-D3FbjOmE.js → use-org-auth-client-9ZqTxhaU.js} +1 -1
  321. package/dist/client/assets/{use-org-fs-C9g2s6eE.js → use-org-fs-Wo4_O8nn.js} +1 -1
  322. package/dist/client/assets/{use-org-repo-syncs-U8WqzFiL.js → use-org-repo-syncs-HjlHy8Rb.js} +1 -1
  323. package/dist/client/assets/{use-org-sso-s2tGLzu6.js → use-org-sso-BSkklN8h.js} +1 -1
  324. package/dist/client/assets/{use-organization-roles-Bo-TSZF4.js → use-organization-roles-Dga2ANZJ.js} +1 -1
  325. package/dist/client/assets/{use-organization-settings-CtcFsKQW.js → use-organization-settings-DHSMN_14.js} +1 -1
  326. package/dist/client/assets/{use-panel-navigate-BLgl8f3Y.js → use-panel-navigate-62gIHptt.js} +1 -1
  327. package/dist/client/assets/{use-project-native-view-presence-uvlxs5r_.js → use-project-native-view-presence-D12oGF6A.js} +1 -1
  328. package/dist/client/assets/{use-project-scope-DCmZMFkQ.js → use-project-scope-Dk4Q60O6.js} +1 -1
  329. package/dist/client/assets/{use-recent-apps-DlPuhtE-.js → use-recent-apps-CCwo686W.js} +1 -1
  330. package/dist/client/assets/{use-releases-DtKRf56Y.js → use-releases-wK1mECcA.js} +1 -1
  331. package/dist/client/assets/{use-reports-diagnostic-DYrOUUTZ.js → use-reports-diagnostic-CfPcDRof.js} +1 -1
  332. package/dist/client/assets/{use-secrets-WRKR8ecc.js → use-secrets-Cmhjz2bf.js} +1 -1
  333. package/dist/client/assets/{use-section-preview-base-BNxt4jxu.js → use-section-preview-base-DJFgOhQZ.js} +1 -1
  334. package/dist/client/assets/{use-tags-DiN0kMpJ.js → use-tags-D0LqZNOI.js} +1 -1
  335. package/dist/client/assets/{use-task-board-analytics-1JoUE9AJ.js → use-task-board-analytics-BpQqtB1w.js} +1 -1
  336. package/dist/client/assets/{use-task-board-events-BLTRhUg4.js → use-task-board-events-BrTJpTlj.js} +1 -1
  337. package/dist/client/assets/{use-task-board-item-prs-At19hfLC.js → use-task-board-item-prs-BHRZFWqk.js} +1 -1
  338. package/dist/client/assets/{use-task-board-items-CRXCkQuK.js → use-task-board-items-CZjiF2uB.js} +1 -1
  339. package/dist/client/assets/{use-task-metadata-C3llYFZN.js → use-task-metadata-Bef5UioD.js} +1 -1
  340. package/dist/client/assets/{use-thread-analytics-Co1Kx3t4.js → use-thread-analytics-CiJumHRj.js} +1 -1
  341. package/dist/client/assets/{use-thread-outputs-D5eAX3jD.js → use-thread-outputs-BVEM1vsy.js} +1 -1
  342. package/dist/client/assets/useInfiniteQuery-S3a_-GqY.js +1 -0
  343. package/dist/client/assets/{useQueries-BBbNh9lc.js → useQueries-D52x651p.js} +1 -1
  344. package/dist/client/assets/useSuspenseInfiniteQuery-DiRI5XkI.js +1 -0
  345. package/dist/client/assets/{users-vqq5iPZ9.js → users-DfEzbgjc.js} +1 -1
  346. package/dist/client/assets/{utils-D5Pt5WPE.js → utils-DVs-Bhj-.js} +1 -1
  347. package/dist/client/assets/{variant-calendar-CYUJLh9u.js → variant-calendar-B4damr_G.js} +1 -1
  348. package/dist/client/assets/{variant-draft-pointer-3s80HEa9.js → variant-draft-pointer-BnxZeLy_.js} +1 -1
  349. package/dist/client/assets/{view-mode-toggle-BksAfU6L.js → view-mode-toggle-DKlegHXH.js} +1 -1
  350. package/dist/client/assets/{virtual-mcp-CvKEEaVD.js → virtual-mcp-UT0zZzHO.js} +1 -1
  351. package/dist/client/assets/{watch-sse-pool-BqvFDRe4.js → watch-sse-pool-BdkzrgTO.js} +1 -1
  352. package/dist/client/index.html +1 -1
  353. package/dist/server/server.js +4 -4
  354. package/package.json +1 -1
  355. package/dist/client/assets/agent-app-D7ZbeaeS.js +0 -1
  356. package/dist/client/assets/agent-deck-Bfjkqa9C.js +0 -1
  357. package/dist/client/assets/agent-library-Bi2qzW40.js +0 -1
  358. package/dist/client/assets/agent-library-file-CSltTnVe.js +0 -1
  359. package/dist/client/assets/agent-settings-BLtCRmyO.js +0 -1
  360. package/dist/client/assets/agent-site-editor-code-Od55DzQ1.js +0 -2
  361. package/dist/client/assets/agent-site-editor-content-5qi46g26.js +0 -1
  362. package/dist/client/assets/agent-site-editor-preview-CutGG4Ds.js +0 -1
  363. package/dist/client/assets/agent-view-CEr3hNFJ.js +0 -1
  364. package/dist/client/assets/api-keys-WauVetoj.js +0 -1
  365. package/dist/client/assets/cms-settings-editor-Bo6bMjKH.js +0 -1
  366. package/dist/client/assets/flat-project-CHR1TqE9.js +0 -1
  367. package/dist/client/assets/library-CZ6Ii9aX.js +0 -1
  368. package/dist/client/assets/project-reports-CULNrShG.js +0 -1
  369. package/dist/client/assets/project-tasks-Dvm1hFFM.js +0 -1
  370. package/dist/client/assets/record-editor-B2vAy35C.js +0 -1
  371. package/dist/client/assets/reports-BO8CzHO9.js +0 -1
  372. package/dist/client/assets/route-CVqHXXn6.js +0 -1
  373. package/dist/client/assets/site-editor-CaPr9Ncy.js +0 -1
  374. package/dist/client/assets/taskboard-analytics-Dk7dZzQl.js +0 -1
  375. package/dist/client/assets/tasks-DLgTzQCQ.js +0 -1
  376. package/dist/client/assets/useInfiniteQuery-CfgvSeG1.js +0 -1
  377. package/dist/client/assets/useSuspenseInfiniteQuery-BFK9VyAb.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as $,b as j,r as E,j as x,l as q,ah as Tt,t as ue,aX as Xe,a2 as vt,m as At,K as Mt,b4 as St,h as Je}from"./index-CNnllo6G.js";import{a as Ct,n as Ye,E as ie,o as Rt,x as Et,y as P,z as $t,A as _t,B as et,C as N,G as Ee,H as Lt,I as It,J as $e,K as zt,L as Z,N as D,m as H,O as Y,T as tt,R as ke,Q as be,U as Pt,V as Ht,W as jt,X as Nt,Y as Ot,s as Bt,Z as Dt,u as Ft,b as qt}from"./usage-stats-D62oidTL.js";import{T as _,n as Wt,i as Ut,E as Gt}from"./editor-classes-BkgvFYZG.js";import{a as Vt,e as nt,s as Zt,S as Kt}from"./suggestion-DmWAjig0.js";import{B as Qt,c as Xt,t as Jt,C as rt,f as Yt,g as _e,s as en,m as Le,a as Ie,b as tn,d as ze,e as nn,h as rn,i as sn,j as an,k as on,l as ln,n as cn}from"./index-Bi4uPXkI.js";import{ag as un,ah as hn,aj as dn,L as pn,bd as fn,aV as gn}from"./agent-icon-B7cHtLmN.js";import{i as mn}from"./SwitchHorizontal01-Bv6v-_-V.js";import{i as kn}from"./Link01-QYs7ouJl.js";import{s as bn}from"./Trash01-CLvb-vxo.js";import{i as xn,b as wn}from"./use-org-fs-C9g2s6eE.js";import{E as Pe,i as st,c as yn,d as Tn,A as vn,e as An,m as Mn,f as Sn,g as Cn}from"./markdown-BzeS6Mup.js";import{A as Rn}from"./avatar-nIzU_VyX.js";import{d as En,e as $n,c as _n,C as Ln,b as In}from"./command-DSORHlWH.js";import{g as zn}from"./get-initials-D-f_fDFw.js";import{u as Pn}from"./use-org-auth-client-D3FbjOmE.js";import{I as Hn}from"./icon-button-BLmb1aFH.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Wt(a);if(M===""){g();return}if(!Ut(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=x.jsx(kn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=x.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(Tt,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(bn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let v;return e[27]!==T||e[28]!==b?(v=x.jsxs("div",{className:"relative",children:[T,b]}),e[27]=T,e[28]=b,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-[11px] font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},it=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=Ct(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(Qt,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg border border-border bg-popover p-1 shadow-md","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(un,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(hn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(dn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(pn,{size:14})}),x.jsx(le,{}),it.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(He,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(He,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(fn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:it.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=xn(Pe),r=wn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?yn:Tn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Rt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Vn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,b,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,b)=>{T===l&&(m=b+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Et.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Vn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function xe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=xe();function at(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ot=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lt=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ct).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:lt,list:ir,newline:Jn,paragraph:ct,table:O,text:rr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
1
+ import{c as $,b as j,r as E,j as x,l as q,ah as Tt,t as ue,aX as Xe,a2 as vt,m as At,K as Mt,b4 as St,h as Je}from"./index-BoB02eW2.js";import{a as Ct,n as Ye,E as ie,o as Rt,x as Et,y as P,z as $t,A as _t,B as et,C as N,G as Ee,H as Lt,I as It,J as $e,K as zt,L as Z,N as D,m as H,O as Y,T as tt,R as ke,Q as be,U as Pt,V as Ht,W as jt,X as Nt,Y as Ot,s as Bt,Z as Dt,u as Ft,b as qt}from"./usage-stats-DuvxTL2m.js";import{T as _,n as Wt,i as Ut,E as Gt}from"./editor-classes-wKHzvXkJ.js";import{a as Vt,e as nt,s as Zt,S as Kt}from"./suggestion-BPVDnpZj.js";import{B as Qt,c as Xt,t as Jt,C as rt,f as Yt,g as _e,s as en,m as Le,a as Ie,b as tn,d as ze,e as nn,h as rn,i as sn,j as an,k as on,l as ln,n as cn}from"./index-BFWcpEys.js";import{ag as un,ah as hn,aj as dn,L as pn,bd as fn,aV as gn}from"./agent-icon-Bmu0Xuy8.js";import{i as mn}from"./SwitchHorizontal01-KDjTaTLX.js";import{i as kn}from"./Link01-DNXOSsg9.js";import{s as bn}from"./Trash01-BzUZQR5Y.js";import{i as xn,b as wn}from"./use-org-fs-Wo4_O8nn.js";import{E as Pe,i as st,c as yn,d as Tn,A as vn,e as An,m as Mn,f as Sn,g as Cn}from"./markdown-TXCHEe-4.js";import{A as Rn}from"./avatar-yCbsNNbw.js";import{d as En,e as $n,c as _n,C as Ln,b as In}from"./command-BSGZ-TwS.js";import{g as zn}from"./get-initials-D-f_fDFw.js";import{u as Pn}from"./use-org-auth-client-9ZqTxhaU.js";import{I as Hn}from"./icon-button-BbQESQAz.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const M=n.getAttributes("link").href;l(typeof M=="string"?M:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const M=Wt(a);if(M===""){g();return}if(!Ut(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=x.jsx(kn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=x.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md border bg-popover p-1 shadow-md",onBlur:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.preventDefault(),i(!1),n.chain().focus().run())},className:q("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(Tt,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(bn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let v;return e[27]!==T||e[28]!==b?(v=x.jsxs("div",{className:"relative",children:[T,b]}),e[27]=T,e[28]=b,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-[11px] font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},it=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=Ct(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(Qt,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg border border-border bg-popover p-1 shadow-md","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(un,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(hn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(dn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(pn,{size:14})}),x.jsx(le,{}),it.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(He,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(He,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(fn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:it.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=xn(Pe),r=wn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?yn:Tn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new Ye("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Rt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Vn(t,e){return ee.getState(t)?.get(e)}function Zn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((T,b,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,b)=>{T===l&&(m=b+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Et.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=st(g);Zn(h,Vn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function xe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=xe();function at(t){F=t}var O={exec:()=>null};function A(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Jn=/^(?:[ \t]*(?:\n|$))+/,Yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ot=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lt=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nr=A(ot).replace(/bull/g,we).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=A(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct=A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),or=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ct).getRegex(),Ae={blockquote:or,code:Yn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:lt,list:ir,newline:Jn,paragraph:ct,table:O,text:rr},je=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),lr={...Ae,lheading:nr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},cr={...Ae,html:A(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",lt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ur=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ut=/^( {2,}|\\)\n(?!\s*$)/,dr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,pr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),ht=/(?!~)[\p{P}\p{S}]/u,fr=/(?!~)[\s\p{P}\p{S}]/u,gr=/(?:[^\s\p{P}\p{S}]|~)/u,mr=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),dt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kr=A(dt,"u").replace(/punct/g,W).getRegex(),br=A(dt,"u").replace(/punct/g,ht).getRegex(),pt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=A(pt,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),wr=A(pt,"gu").replace(/notPunctSpace/g,gr).replace(/punctSpace/g,fr).replace(/punct/g,ht).getRegex(),yr=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Tr=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),vr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ar=A(vr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Mr=A(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Sr=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cr=A(ve).replace("(?:-->|$)","-->").getRegex(),Rr=A("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Cr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Er=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ft=A(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),gt=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),$r=A("reflink|nolink(?!\\()","g").replace("reflink",ft).replace("nolink",gt).getRegex(),Ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Mr,autolink:Sr,blockSkip:mr,br:ut,code:hr,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:kr,emStrongRDelimAst:xr,emStrongRDelimUnd:yr,escape:ur,link:Er,nolink:gt,punctuation:pr,reflink:ft,reflinkSearch:$r,tag:Rr,text:dr,url:O},_r={...Se,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:wr,emStrongLDelim:br,delLDelim:Tr,delRDelim:Ar,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ne).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ne).getRegex()},Lr={...de,br:A(ut).replace("{2,}","*").getRegex(),text:A(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:lr,pedantic:cr},U={normal:Se,gfm:de,breaks:Lr,pedantic:_r},Ir={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Oe=t=>Ir[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Oe)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Oe);return t}function Be(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function De(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function G(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function zr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Pr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function Fe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Hr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
3
3
  `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
4
4
  `)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:G(n,`
@@ -1 +1 @@
1
- import{c as f,f as p,ax as u,j as s,a_ as x,N as a}from"./index-CNnllo6G.js";import{C as j}from"./capability-load-error-BWT346oK.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
1
+ import{c as f,f as p,ax as u,j as s,a_ as x,N as a}from"./index-BoB02eW2.js";import{C as j}from"./capability-load-error-xmV40q_-.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
@@ -1 +1 @@
1
- import{dq as g,dr as d,ds as v}from"./index-CNnllo6G.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
1
+ import{dq as g,dr as d,ds as v}from"./index-BoB02eW2.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
@@ -1 +1 @@
1
- import{eB as He,cu as Ht,r as S,fl as ie,b4 as $t,c as Z,j as s,f_ as Jt,b as de,g0 as Qt,g1 as Ct,g2 as _t,eU as L,en as ge,B as Ze,b1 as ae,a5 as er}from"./index-CNnllo6G.js";import{i as tr}from"./CreditCard01-DKW3gWt7.js";import{B as C}from"./badge-BPqtGuPz.js";import{M as rr}from"./multi-select-CxacBEPt.js";import{S as nr,d as ir,c as ar,a as sr,b as or}from"./select-Jex63p6s.js";import{T as ee,a as lr,b as $e,c as te,d as cr,e as ur}from"./table-BEoFysnY.js";import{C as fr,Y as dr,A as gr,a as mr}from"./AreaChart-80AfW8ak.js";import{X as yr}from"./XAxis--67FjR4u.js";import{bH as pr,bI as kt,bJ as br,bK as hr,bL as vr,bM as jr,bN as xr,bO as Sr,f as wr,bF as ue,bP as Or,i as D,bQ as Pr,ai as Br,b4 as fe,bR as Ut,u as X,bS as Ar,bT as Tr,Y as Je,bU as Dr,y as Nr,a7 as Er,a8 as qr,g as Mr,Z as Ir,D as se,aj as Rr,r as Lr,p as _r,bV as kr,bE as Ur,bW as Fr,bX as Wr,bY as Kr,bZ as zr,b_ as Vr,b$ as Zr,c0 as Gr,c1 as Yr,c2 as Xr}from"./CategoricalChart-FZqnb3jh.js";import{R as Hr,S as $r}from"./Sector-C-MC544L.js";import{R as Jr}from"./require-capability-ojXn93H0.js";import"./checkbox-BHYLtolO.js";import"./ChevronUp-D6SZVzK-.js";import"./command-DSORHlWH.js";import"./index-C5kiFY0N.js";import"./SearchMd-Yk_yG6_-.js";import"./popover-Ba56Iai5.js";import"./index-BdQq_4o_.js";import"./index-JfKaG8r5.js";import"./index-k8d57vb2.js";import"./access-gate-Cj7Rjcug.js";import"./capability-load-error-BWT346oK.js";var me={},ye={},Qe;function Qr(){return Qe||(Qe=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){const a=new Map;for(let l=0;l<r.length;l++){const o=r[l],u=n(o,l,r);a.has(u)||a.set(u,o)}return Array.from(a.values())}t.uniqBy=e})(ye)),ye}var pe={},Ce;function Cr(){return Ce||(Ce=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){return function(...a){return r.apply(this,a.slice(0,n))}}t.ary=e})(pe)),pe}var be={},et;function Ft(){return et||(et=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r}t.identity=e})(be)),be}var he={},ve={},tt;function en(){return tt||(tt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="object"&&r!==null}t.isObjectLike=e})(ve)),ve}var rt;function tn(){return rt||(rt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=pr(),r=en();function n(a){return r.isObjectLike(a)&&e.isArrayLike(a)}t.isArrayLikeObject=n})(he)),he}var je={},xe={},nt;function rn(){return nt||(nt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=kt();function r(n){return function(a){return e.get(a,n)}}t.property=r})(xe)),xe}var Se={},we={},Oe={},Pe={},it;function Wt(){return it||(it=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null||typeof r!="object"&&typeof r!="function"}t.isPrimitive=e})(Pe)),Pe}var at;function nn(){return at||(at=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=br(),r=Wt(),n=hr();function a(f,i,d){return typeof d!="function"?a(f,i,()=>{}):l(f,i,function b(g,p,v,c,h,j){const O=d(g,p,v,c,h,j);return O!==void 0?!!O:l(g,p,b,j)},new Map)}function l(f,i,d,b){if(i===f)return!0;switch(typeof i){case"object":return o(f,i,d,b);case"function":return Object.keys(i).length>0?l(f,{...i},d,b):n.isEqualsSameValueZero(f,i);default:return e.isObject(f)?typeof i=="string"?i==="":!0:n.isEqualsSameValueZero(f,i)}}function o(f,i,d,b){if(i==null)return!0;if(Array.isArray(i))return m(f,i,d,b);if(i instanceof Map)return u(f,i,d,b);if(i instanceof Set)return y(f,i,d,b);const g=Object.keys(i);if(f==null||r.isPrimitive(f))return g.length===0;if(g.length===0)return!0;if(b?.has(i))return b.get(i)===f;b?.set(i,f);try{for(let p=0;p<g.length;p++){const v=g[p];if(!r.isPrimitive(f)&&!(v in f)||i[v]===void 0&&f[v]!==void 0||i[v]===null&&f[v]!==null||!d(f[v],i[v],v,f,i,b))return!1}return!0}finally{b?.delete(i)}}function u(f,i,d,b){if(i.size===0)return!0;if(!(f instanceof Map))return!1;for(const[g,p]of i.entries()){const v=f.get(g);if(d(v,p,g,f,i,b)===!1)return!1}return!0}function m(f,i,d,b){if(i.length===0)return!0;if(!Array.isArray(f))return!1;const g=new Set;for(let p=0;p<i.length;p++){const v=i[p];let c=!1;for(let h=0;h<f.length;h++){if(g.has(h))continue;const j=f[h];let O=!1;if(d(j,v,p,f,i,b)&&(O=!0),O){g.add(h),c=!0;break}}if(!c)return!1}return!0}function y(f,i,d,b){return i.size===0?!0:f instanceof Set?m([...f],[...i],d,b):!1}t.isMatchWith=a,t.isSetMatch=y})(Oe)),Oe}var st;function Kt(){return st||(st=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nn();function r(n,a){return e.isMatchWith(n,a,()=>{})}t.isMatch=r})(we)),we}var Be={},Ae={},Te={},ot;function an(){return ot||(ot=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}t.getSymbols=e})(Te)),Te}var De={},lt;function Ge(){return lt||(lt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}t.getTag=e})(De)),De}var Ne={},ct;function zt(){return ct||(ct=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",l="[object Arguments]",o="[object Symbol]",u="[object Date]",m="[object Map]",y="[object Set]",f="[object Array]",i="[object Function]",d="[object ArrayBuffer]",b="[object Object]",g="[object Error]",p="[object DataView]",v="[object Uint8Array]",c="[object Uint8ClampedArray]",h="[object Uint16Array]",j="[object Uint32Array]",O="[object BigUint64Array]",x="[object Int8Array]",P="[object Int16Array]",A="[object Int32Array]",B="[object BigInt64Array]",T="[object Float32Array]",E="[object Float64Array]";t.argumentsTag=l,t.arrayBufferTag=d,t.arrayTag=f,t.bigInt64ArrayTag=B,t.bigUint64ArrayTag=O,t.booleanTag=a,t.dataViewTag=p,t.dateTag=u,t.errorTag=g,t.float32ArrayTag=T,t.float64ArrayTag=E,t.functionTag=i,t.int16ArrayTag=P,t.int32ArrayTag=A,t.int8ArrayTag=x,t.mapTag=m,t.numberTag=n,t.objectTag=b,t.regexpTag=e,t.setTag=y,t.stringTag=r,t.symbolTag=o,t.uint16ArrayTag=h,t.uint32ArrayTag=j,t.uint8ArrayTag=v,t.uint8ClampedArrayTag=c})(Ne)),Ne}var Ee={},qe={},ut;function sn(){return ut||(ut=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof He=="object"&&He||(function(){return this})()||Function("return this")();t.globalThis=e})(qe)),qe}var ft;function on(){return ft||(ft=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=sn();function r(n){return typeof e.globalThis.Buffer<"u"&&e.globalThis.Buffer.isBuffer(n)}t.isBuffer=r})(Ee)),Ee}var Me={},dt;function ln(){return dt||(dt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}t.isTypedArray=e})(Me)),Me}var gt;function Vt(){return gt||(gt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=an(),r=Ge(),n=zt(),a=on(),l=Wt(),o=ln();function u(i,d){return m(i,void 0,i,new Map,d)}function m(i,d,b,g=new Map,p=void 0){const v=p?.(i,d,b,g);if(v!==void 0)return v;if(l.isPrimitive(i))return i;if(g.has(i))return g.get(i);if(Array.isArray(i)){const c=new Array(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return Object.hasOwn(i,"index")&&(c.index=i.index),Object.hasOwn(i,"input")&&(c.input=i.input),c}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const c=new RegExp(i.source,i.flags);return c.lastIndex=i.lastIndex,c}if(i instanceof Map){const c=new Map;g.set(i,c);for(const[h,j]of i)c.set(h,m(j,h,b,g,p));return c}if(i instanceof Set){const c=new Set;g.set(i,c);for(const h of i)c.add(m(h,void 0,b,g,p));return c}if(a.isBuffer(i))return i.subarray();if(o.isTypedArray(i)){const c=new(Object.getPrototypeOf(i)).constructor(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return c}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const c=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return g.set(i,c),y(c,i,b,g,p),c}if(typeof File<"u"&&i instanceof File){const c=new File([i],i.name,{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(typeof Blob<"u"&&i instanceof Blob){const c=new Blob([i],{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Error){const c=structuredClone(i);return g.set(i,c),c.message=i.message,c.name=i.name,c.stack=i.stack,c.cause=i.cause,c.constructor=i.constructor,y(c,i,b,g,p),c}if(i instanceof Boolean){const c=new Boolean(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Number){const c=new Number(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof String){const c=new String(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(typeof i=="object"&&f(i)){const c=Object.create(Object.getPrototypeOf(i));return g.set(i,c),y(c,i,b,g,p),c}return i}function y(i,d,b=i,g,p){const v=[...Object.keys(d),...e.getSymbols(d)];for(let c=0;c<v.length;c++){const h=v[c],j=Object.getOwnPropertyDescriptor(i,h);(j==null||j.writable)&&(i[h]=m(d[h],h,b,g,p))}}function f(i){switch(r.getTag(i)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}t.cloneDeepWith=u,t.cloneDeepWithImpl=m,t.copyProperties=y})(Ae)),Ae}var mt;function cn(){return mt||(mt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt();function r(n){return e.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}t.cloneDeep=r})(Be)),Be}var yt;function un(){return yt||(yt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=cn();function n(a){return a=r.cloneDeep(a),l=>e.isMatch(l,a)}t.matches=n})(Se)),Se}var Ie={},Re={},Le={},pt;function fn(){return pt||(pt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt(),r=Ge(),n=zt();function a(l,o){return e.cloneDeepWith(l,(u,m,y,f)=>{const i=o?.(u,m,y,f);if(i!==void 0)return i;if(typeof l=="object"){if(r.getTag(l)===n.objectTag&&typeof l.constructor!="function"){const d={};return f.set(l,d),e.copyProperties(d,l,y,f),d}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new l.constructor(l?.valueOf());return e.copyProperties(d,l),d}case n.argumentsTag:{const d={};return e.copyProperties(d,l),d.length=l.length,d[Symbol.iterator]=l[Symbol.iterator],d}default:return}}})}t.cloneDeepWith=a})(Le)),Le}var bt;function dn(){return bt||(bt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fn();function r(n){return e.cloneDeepWith(n)}t.cloneDeep=r})(Re)),Re}var _e={},ke={},ht;function gn(){return ht||(ht=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ge();function r(n){return n!==null&&typeof n=="object"&&e.getTag(n)==="[object Arguments]"}t.isArguments=r})(ke)),ke}var vt;function mn(){return vt||(vt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=vr(),r=xr(),n=gn(),a=jr();function l(o,u){let m;if(Array.isArray(u)?m=u:typeof u=="string"&&e.isDeepKey(u)&&o?.[u]==null?m=a.toPath(u):m=[u],m.length===0)return!1;let y=o;for(let f=0;f<m.length;f++){const i=m[f];if((y==null||!Object.hasOwn(y,i))&&!((Array.isArray(y)||n.isArguments(y))&&r.isIndex(i)&&i<y.length))return!1;y=y[i]}return!0}t.has=l})(_e)),_e}var jt;function yn(){return jt||(jt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=Sr(),n=dn(),a=kt(),l=mn();function o(u,m){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return m=n.cloneDeep(m),function(y){const f=a.get(y,u);return f===void 0?l.has(y,u):m===void 0?f===void 0:e.isMatch(f,m)}}t.matchesProperty=o})(Ie)),Ie}var xt;function pn(){return xt||(xt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ft(),r=rn(),n=un(),a=yn();function l(o){if(o==null)return e.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?a.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}t.iteratee=l})(je)),je}var St;function bn(){return St||(St=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Qr(),r=Cr(),n=Ft(),a=tn(),l=pn();function o(u,m=n.identity){return a.isArrayLikeObject(u)?e.uniqBy(Array.from(u),r.ary(l.iteratee(m),1)):[]}t.uniqBy=o})(me)),me}var Ue,wt;function hn(){return wt||(wt=1,Ue=bn().uniqBy),Ue}var vn=hn();const Ot=Ht(vn);function jn(t,e,r){return e===!0?Ot(t,r):typeof e=="function"?Ot(t,e):t}var oe=1;function xn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(a=>{if(a!=null){var l=a.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-e.height)>oe||Math.abs(o.left-e.left)>oe||Math.abs(o.top-e.top)>oe||Math.abs(o.width-e.width)>oe)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,n]}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ke.apply(null,arguments)}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(n){Sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sn(t,e,r){return(e=wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wn(t){var e=On(t,"string");return typeof e=="symbol"?e:e+""}function On(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pn(t){return Array.isArray(t)&&ue(t[0])&&ue(t[1])?t.join(" ~ "):t}var J={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Bn(t,e){return e==null?t:Or(t,e)}var An=t=>{var{separator:e=J.separator,contentStyle:r,itemStyle:n,labelStyle:a=J.labelStyle,payload:l,formatter:o,itemSorter:u,wrapperClassName:m,labelClassName:y,label:f,labelFormatter:i,accessibilityLayer:d=J.accessibilityLayer}=t,b=()=>{if(l&&l.length){var x={padding:0,margin:0},P=Bn(l,u),A=P.map((B,T)=>{if(!B||B.type==="none")return null;var E=B.formatter||o||Pn,{value:N,name:_}=B,F=N,W=_;if(E){var M=E(N,_,B,T,l);if(Array.isArray(M))[F,W]=M;else if(M!=null)F=M;else return null}var K=re(re({},J.itemStyle),{},{color:B.color||J.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:K},ue(W)?S.createElement("span",{className:"recharts-tooltip-item-name"},W):null,ue(W)?S.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,S.createElement("span",{className:"recharts-tooltip-item-value"},F),S.createElement("span",{className:"recharts-tooltip-item-unit"},B.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:x},A)}return null},g=re(re({},J.contentStyle),r),p=re({margin:0},a),v=!wr(f),c=v?f:"",h=ie("recharts-default-tooltip",m),j=ie("recharts-tooltip-label",y);v&&i&&l!==void 0&&l!==null&&(c=i(f,l));var O=d?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Ke({className:h,style:g},O),S.createElement("p",{className:j,style:p},S.isValidElement(c)?c:"".concat(c)),b())},ne="recharts-tooltip-wrapper",Tn={visibility:"hidden"};function Dn(t){var{coordinate:e,translateX:r,translateY:n}=t;return ie(ne,{["".concat(ne,"-right")]:D(r)&&e&&D(e.x)&&r>=e.x,["".concat(ne,"-left")]:D(r)&&e&&D(e.x)&&r<e.x,["".concat(ne,"-bottom")]:D(n)&&e&&D(e.y)&&n>=e.y,["".concat(ne,"-top")]:D(n)&&e&&D(e.y)&&n<e.y})}function Bt(t){var{allowEscapeViewBox:e,coordinate:r,key:n,offset:a,position:l,reverseDirection:o,tooltipDimension:u,viewBox:m,viewBoxDimension:y}=t;if(l&&D(l[n]))return l[n];var f=r[n]-u-(a>0?a:0),i=r[n]+a;if(e[n])return o[n]?f:i;var d=m[n];if(d==null)return 0;if(o[n]){var b=f,g=d;return b<g?Math.max(i,d):Math.max(f,d)}if(y==null)return 0;var p=i+u,v=d+y;return p>v?Math.max(f,d):Math.max(i,d)}function Nn(t){var{translateX:e,translateY:r,useTranslate3d:n}=t;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function En(t){var{allowEscapeViewBox:e,coordinate:r,offsetTop:n,offsetLeft:a,position:l,reverseDirection:o,tooltipBox:u,useTranslate3d:m,viewBox:y}=t,f,i,d;return u.height>0&&u.width>0&&r?(i=Bt({allowEscapeViewBox:e,coordinate:r,key:"x",offset:a,position:l,reverseDirection:o,tooltipDimension:u.width,viewBox:y,viewBoxDimension:y.width}),d=Bt({allowEscapeViewBox:e,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:u.height,viewBox:y,viewBoxDimension:y.height}),f=Nn({translateX:i,translateY:d,useTranslate3d:m})):f=Tn,{cssProperties:f,cssClasses:Dn({translateX:i,translateY:d,coordinate:r})}}function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?At(Object(r),!0).forEach(function(n){qn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qn(t,e,r){return(e=Mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mn(t){var e=In(t,"string");return typeof e=="symbol"?e:e+""}function In(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rn(t){if(!(t.prefersReducedMotion&&t.isAnimationActive==="auto")&&t.isAnimationActive&&t.active)return"transform ".concat(t.animationDuration,"ms ").concat(t.animationEasing)}function Ln(t){var e,r,n,a,l,o,u=Pr(),[m,y]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var g=p=>{if(p.key==="Escape"){var v,c,h,j;y({dismissed:!0,dismissedAtCoordinate:{x:(v=(c=t.coordinate)===null||c===void 0?void 0:c.x)!==null&&v!==void 0?v:0,y:(h=(j=t.coordinate)===null||j===void 0?void 0:j.y)!==null&&h!==void 0?h:0}})}};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[(e=t.coordinate)===null||e===void 0?void 0:e.x,(r=t.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(a=t.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((l=(o=t.coordinate)===null||o===void 0?void 0:o.y)!==null&&l!==void 0?l:0)!==m.dismissedAtCoordinate.y)&&y(Q(Q({},m),{},{dismissed:!1}));var{cssClasses:f,cssProperties:i}=En({allowEscapeViewBox:t.allowEscapeViewBox,coordinate:t.coordinate,offsetLeft:typeof t.offset=="number"?t.offset:t.offset.x,offsetTop:typeof t.offset=="number"?t.offset:t.offset.y,position:t.position,reverseDirection:t.reverseDirection,tooltipBox:{height:t.lastBoundingBox.height,width:t.lastBoundingBox.width},useTranslate3d:t.useTranslate3d,viewBox:t.viewBox}),d=t.hasPortalFromProps?{}:Q(Q({transition:Rn({prefersReducedMotion:u,isAnimationActive:t.isAnimationActive,active:t.active,animationDuration:t.animationDuration,animationEasing:t.animationEasing})},i),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=Q(Q({},d),{},{visibility:!m.dismissed&&t.active&&t.hasPayload?"visible":"hidden"},t.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:f,style:b,ref:t.innerRef},t.children)}var _n=S.memo(Ln),kn=["x","y","top","left","width","height","className"];function ze(){return ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ze.apply(null,arguments)}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Un(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(n){Fn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fn(t,e,r){return(e=Wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wn(t){var e=Kn(t,"string");return typeof e=="symbol"?e:e+""}function Kn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zn(t,e){if(t==null)return{};var r,n,a=Vn(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n<l.length;n++)r=l[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Vn(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Zn=(t,e,r,n,a,l)=>"M".concat(t,",").concat(a,"v").concat(n,"M").concat(l,",").concat(e,"h").concat(r),Gn=t=>{var{x:e=0,y:r=0,top:n=0,left:a=0,width:l=0,height:o=0,className:u}=t,m=zn(t,kn),y=Un({x:e,y:r,top:n,left:a,width:l,height:o},m);return!D(e)||!D(r)||!D(l)||!D(o)||!D(n)||!D(a)?null:S.createElement("path",ze({},Br(y),{className:ie("recharts-cross",u),d:Zn(e,r,l,o,n,a)}))};function Yn(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Zt(t){var{cx:e,cy:r,radius:n,startAngle:a,endAngle:l}=t,o=fe(e,r,n,a),u=fe(e,r,n,l);return{points:[o,u],cx:e,cy:r,radius:n,startAngle:a,endAngle:l}}function Xn(t,e,r){if(t==="horizontal")return[{x:e.x,y:r.top},{x:e.x,y:r.top+r.height}];if(t==="vertical")return[{x:r.left,y:e.y},{x:r.left+r.width,y:e.y}];if(Ut(e)){if(t==="centric"){var{cx:n,cy:a,innerRadius:l,outerRadius:o,angle:u}=e,m=fe(n,a,l,u),y=fe(n,a,o,u);return[{x:m.x,y:m.y},{x:y.x,y:y.y}]}return Zt(e)}}function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(n){Hn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hn(t,e,r){return(e=$n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $n(t){var e=Jn(t,"string");return typeof e=="symbol"?e:e+""}function Jn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qn=()=>X(Dr),Cn=()=>{var t=Qn(),e=X(Ar),r=X(Tr);return!t||!r?Je(void 0,e):Je(Nt(Nt({},t),{},{scale:r}),e)};function Ve(){return Ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ve.apply(null,arguments)}function Et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(r),!0).forEach(function(n){ei(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ei(t,e,r){return(e=ti(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ti(t){var e=ri(t,"string");return typeof e=="symbol"?e:e+""}function ri(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ni(t){var{cursor:e,cursorComp:r,cursorProps:n}=t;return S.isValidElement(e)?S.cloneElement(e,n):S.createElement(r,n)}function ii(t){var e,{coordinate:r,payload:n,index:a,offset:l,tooltipAxisBandSize:o,layout:u,cursor:m,tooltipEventType:y,chartName:f}=t,i=r,d=n,b=a;if(!m||!i||f!=="ScatterChart"&&y!=="axis")return null;var g,p,v;if(f==="ScatterChart")g=i,p=Gn,v=se.cursorLine;else if(f==="BarChart")g=Yn(u,i,l,o),p=Hr,v=se.cursorRectangle;else if(u==="radial"&&Ut(i)){var{cx:c,cy:h,radius:j,startAngle:O,endAngle:x}=Zt(i);g={cx:c,cy:h,startAngle:O,endAngle:x,innerRadius:j,outerRadius:j},p=$r,v=se.cursorLine}else g={points:Xn(u,i,l)},p=Rr,v=se.cursorLine;var P=typeof m=="object"&&"className"in m?m.className:void 0,A=le(le(le(le({stroke:"#ccc",pointerEvents:"none"},l),g),Mr(m)),{},{payload:d,payloadIndex:b,className:ie("recharts-tooltip-cursor",P)});return S.createElement(Ir,{zIndex:(e=t.zIndex)!==null&&e!==void 0?e:v},S.createElement(ni,{cursor:m,cursorComp:p,cursorProps:A}))}function ai(t){var e=Cn(),r=Nr(),n=Er(),a=qr();return e==null||r==null||n==null||a==null?null:S.createElement(ii,Ve({},t,{offset:r,layout:n,tooltipAxisBandSize:e,chartName:a}))}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qt(Object(r),!0).forEach(function(n){si(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function si(t,e,r){return(e=oi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oi(t){var e=li(t,"string");return typeof e=="symbol"?e:e+""}function li(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ci(t){return t.dataKey}function ui(t,e){return S.isValidElement(t)?S.cloneElement(t,e):typeof t=="function"?S.createElement(t,e):S.createElement(An,e)}var It=[],fi={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function di(t){var e,r,n=Lr(t,fi),{active:a,allowEscapeViewBox:l,animationDuration:o,animationEasing:u,content:m,filterNull:y,isAnimationActive:f,offset:i,payloadUniqBy:d,position:b,reverseDirection:g,useTranslate3d:p,wrapperStyle:v,cursor:c,shared:h,trigger:j,defaultIndex:O,portal:x,axisId:P}=n,A=_r(),B=typeof O=="number"?String(O):O;S.useEffect(()=>{A(kr({shared:h,trigger:j,axisId:P,active:a,defaultIndex:B}))},[A,h,j,P,a,B]);var T=Ur(),E=Fr(),N=Wr(h),{activeIndex:_,isActive:F}=(e=X(U=>Kr(U,N,j,B)))!==null&&e!==void 0?e:{},W=X(U=>zr(U,N,j,B)),M=X(U=>Vr(U,N,j,B)),K=X(U=>Zr(U,N,j,B)),I=W,z=Gr(),R=(r=a??F)!==null&&r!==void 0?r:!1,[V,H]=xn([I,R]),G=N==="axis"?M:void 0;Yr(N,j,K,G,_,R);var Y=x??z;if(Y==null||T==null||N==null)return null;var q=I??It;R||(q=It),y&&q.length&&(q=jn(q.filter(U=>U.value!=null&&(U.hide!==!0||n.includeHidden)),d,ci));var $=q.length>0,w=Mt(Mt({},n),{},{payload:q,label:G,active:R,activeIndex:_,coordinate:K,accessibilityLayer:E}),k=S.createElement(_n,{allowEscapeViewBox:l,animationDuration:o,animationEasing:u,isAnimationActive:f,active:R,coordinate:K,hasPayload:$,offset:i,position:b,reverseDirection:g,useTranslate3d:p,viewBox:T,wrapperStyle:v,lastBoundingBox:V,innerRef:H,hasPortalFromProps:!!x},ui(m,w));return S.createElement(S.Fragment,null,$t.createPortal(k,Y),R&&S.createElement(ai,{cursor:c,tooltipEventType:N,coordinate:K,payload:q,index:_}))}const Ye=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),Rt=["B","KB","MB","GB","TB","PB"];function Gt(t){if(t<=0)return"0 B";const e=Math.min(Rt.length-1,Math.floor(Math.log(t)/Math.log(1024))),r=t/1024**e;return`${r.toFixed(r>=100||e===0?0:1)} ${Rt[e]}`}const Fe=50,gi="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",mi=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Yt(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function Xe(t){return Yt(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function yi(){const t=new Date;return Array.from({length:12},(e,r)=>{const n=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-r,1));return{value:n.toISOString().slice(0,10),label:n.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function pi(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function Lt(t){const e=Z.c(30),{usage:r,metric:n,colorNum:a,formatValue:l,height:o}=t,u=`var(--chart-${a})`,m=`infra-billing-${n}`;let y;e[0]!==r?(y=r.map(bi),e[0]=r,e[1]=y):y=e[1];const f=y;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,right:4,top:8,bottom:0},e[2]=i):i=e[2];let d,b;e[3]!==u?(d=s.jsx("stop",{offset:"0%",stopColor:u,stopOpacity:.25}),b=s.jsx("stop",{offset:"100%",stopColor:u,stopOpacity:0}),e[3]=u,e[4]=d,e[5]=b):(d=e[4],b=e[5]);let g;e[6]!==m||e[7]!==d||e[8]!==b?(g=s.jsx("defs",{children:s.jsxs("linearGradient",{id:m,x1:"0",y1:"0",x2:"0",y2:"1",children:[d,b]})}),e[6]=m,e[7]=d,e[8]=b,e[9]=g):g=e[9];let p;e[10]!==l||e[11]!==o?(p=o>100&&s.jsxs(s.Fragment,{children:[s.jsx(fr,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(yr,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(dr,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:l,width:68})]}),e[10]=l,e[11]=o,e[12]=p):p=e[12];let v,c;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={stroke:"var(--border)",strokeDasharray:"4 4"},c={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=v,e[14]=c):(v=e[13],c=e[14]);let h;e[15]!==l?(h=s.jsx(di,{cursor:v,contentStyle:c,formatter:A=>l(Number(A)||0)}),e[15]=l,e[16]=h):h=e[16];const j=`url(#${m})`;let O;e[17]!==u||e[18]!==n||e[19]!==j?(O=s.jsx(gr,{type:"linear",dataKey:n,stroke:u,strokeWidth:2,fill:j,dot:!1}),e[17]=u,e[18]=n,e[19]=j,e[20]=O):O=e[20];let x;e[21]!==f||e[22]!==O||e[23]!==g||e[24]!==p||e[25]!==h?(x=s.jsxs(mr,{data:f,margin:i,children:[g,p,h,O]}),e[21]=f,e[22]=O,e[23]=g,e[24]=p,e[25]=h,e[26]=x):x=e[26];let P;return e[27]!==o||e[28]!==x?(P=s.jsx(Xr,{width:"100%",height:o,children:x}),e[27]=o,e[28]=x,e[29]=P):P=e[29],P}function bi(t){return{...t,label:pi(t.date)}}function ce(t,e){return t.reduce((r,n)=>r+n[e],0)}function hi(){const t=Z.c(39),e=de(),{sites:r,isLoading:n}=Qt(),[a,l]=S.useState(null),o=yi(),[u,m]=S.useState(o[0].value);let y;t[0]!==a||t[1]!==r?(y=a??r.slice(0,Fe),t[0]=a,t[1]=r,t[2]=y):y=t[2];const f=y,i=!a&&r.length>Fe,{data:d,isLoading:b}=Ct(f,u),g=_t();if(n){let w;return t[3]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ae,{className:"h-64 w-full"}),t[3]=w):w=t[3],w}if(r.length===0){let w;t[4]!==e?(w=e("settings.infraBilling.noSites"),t[4]=e,t[5]=w):w=t[5];let k;return t[6]!==w?(k=s.jsx(L,{className:"p-6 text-sm text-muted-foreground",children:w}),t[6]=w,t[7]=k):k=t[7],k}const p=d?.usage??[],v=d?.pageviewsAvailable??!1,c=!!d&&!d.usageUnavailable,h=(w,k)=>c?k(ce(p,w)):"—",j=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:v&&c?Ye.format(ce(p,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:h("requests",wi)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:h("dataTransferBytes",Gt)}],O=xi;let x;t[8]!==d?.teams?(x=d?.teams??[],t[8]=d?.teams,t[9]=x):x=t[9];const P=x;let A;t[10]!==d?.siteSlugsWithoutTeam?(A=d?.siteSlugsWithoutTeam??[],t[10]=d?.siteSlugsWithoutTeam,t[11]=A):A=t[11];const B=A,T=P.length===1?P[0]:void 0,E=T?.billing??null,N=P.length+(B.length>0?1:0)>1,_=ce(p,"pageviews"),F=_>0?ce(p,"requests")/_:0,W=v&&c&&_>0?F.toFixed(F<10?1:0):"—";let M;t[12]!==d?.billingUnavailable||t[13]!==T||t[14]!==e||t[15]!==P.length?(M=d?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):P.length>1?e("settings.infraBilling.multipleTeams",{count:String(P.length)}):T?Xt(T,e):e("settings.infraBilling.noTeam"),t[12]=d?.billingUnavailable,t[13]=T,t[14]=e,t[15]=P.length,t[16]=M):M=t[16];const K=M;let I;t[17]!==r?(I=r.map(ji),t[17]=r,t[18]=I):I=t[18];let z;t[19]!==e?(z=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=z):z=t[20];let R;t[21]!==f||t[22]!==I||t[23]!==z?(R=s.jsx(rr,{className:"w-auto min-w-56 max-w-full",options:I,defaultValue:f,maxCount:2,placeholder:z,onValueChange:l}),t[21]=f,t[22]=I,t[23]=z,t[24]=R):R=t[24];let V;t[25]!==e?(V=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=V):V=t[26];let H;t[27]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(sr,{}),t[27]=H):H=t[27];let G;t[28]!==V?(G=s.jsx(or,{className:"w-48","aria-label":V,children:H}),t[28]=V,t[29]=G):G=t[29];let Y;t[30]!==f.length||t[31]!==e?(Y=f.length===0&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=f.length,t[31]=e,t[32]=Y):Y=t[32];let q;t[33]!==e||t[34]!==i?(q=i&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(Fe)})}),t[33]=e,t[34]=i,t[35]=q):q=t[35];let $;return t[36]!==d?.usageUnavailable||t[37]!==e?($=d?.usageUnavailable&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=d?.usageUnavailable,t[37]=e,t[38]=$):$=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[R,s.jsxs(nr,{value:u,onValueChange:m,children:[G,s.jsx(ir,{children:o.map(vi)})]})]}),Y,q,$,f.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(ge,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(L,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tr,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),T&&E?.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:g.isPending,onClick:()=>g.mutate(T.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[E?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),b?s.jsx(ae,{className:"h-5 w-16"}):s.jsx(C,{variant:E.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${E.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:E.nextBillingDate?Xe(E.nextBillingDate):"—"})]})]}):!b&&s.jsx("p",{className:"text-xs text-muted-foreground",children:K}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:W})]})]})]}),j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:o.find(k=>k.value===u)?.label})]}),b?s.jsx(ae,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:w.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:64})})]},w.key))]})}),s.jsx(ge,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:w.description})]}),s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:220})]},w.key))})}),s.jsx(ge,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:d?d.billingUnavailable?s.jsx(L,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[P.map(w=>s.jsx(Oi,{team:w,showSites:N},w.siteSlugs.join(","))),B.length>0&&s.jsxs(L,{className:"flex flex-col gap-1 p-4",children:[N&&s.jsx("span",{className:"text-sm font-medium",children:B.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(L,{children:s.jsx(ae,{className:"m-4 h-24"})})})})]})]})}function vi(t){return s.jsx(ar,{value:t.value,children:t.label},t.value)}function ji(t){return{label:t,value:t}}function xi(t){return t==="dataTransferBytes"?Gt:Si}function Si(t){return Ye.format(t)}function wi(t){return Ye.format(t)}function Xt(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Oi(t){const e=Z.c(13),{team:r,showSites:n}=t,a=de(),l=_t(),o=r.billing;let u;e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==r.siteSlugs?(u=n&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:r.siteSlugs.join(", ")}),o&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(C,{variant:o.planType==="free"?"secondary":"success",children:a(`settings.infraBilling.plan.${o.planType}`)}),o.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:a("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:Xe(o.nextBillingDate)})]}),o.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:l.isPending,onClick:()=>l.mutate(r.siteSlugs),children:a("settings.infraBilling.manageButton")})]})]}),e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=r.siteSlugs,e[5]=u):u=e[5];let m;e[6]!==o||e[7]!==a||e[8]!==r?(m=o?o.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:a("settings.infraBilling.noInvoices")}):s.jsx(Pi,{invoices:o.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:Xt(r,a)}),e[6]=o,e[7]=a,e[8]=r,e[9]=m):m=e[9];let y;return e[10]!==u||e[11]!==m?(y=s.jsxs(L,{className:"gap-0 overflow-x-auto",children:[u,m]}),e[10]=u,e[11]=m,e[12]=y):y=e[12],y}function Pi(t){const e=Z.c(40),{invoices:r}=t,n=de();let a;e[0]!==r?(a=r.some(Bi),e[0]=r,e[1]=a):a=e[1];const l=a;let o;e[2]!==n?(o=n("settings.infraBilling.invoiceReference"),e[2]=n,e[3]=o):o=e[3];let u;e[4]!==o?(u=s.jsx(ee,{children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==n?(m=n("settings.infraBilling.invoiceDue"),e[6]=n,e[7]=m):m=e[7];let y;e[8]!==m?(y=s.jsx(ee,{children:m}),e[8]=m,e[9]=y):y=e[9];let f;e[10]!==n?(f=n("settings.infraBilling.invoiceAmount"),e[10]=n,e[11]=f):f=e[11];let i;e[12]!==f?(i=s.jsx(ee,{children:f}),e[12]=f,e[13]=i):i=e[13];let d;e[14]!==n?(d=n("settings.infraBilling.invoiceStatus"),e[14]=n,e[15]=d):d=e[15];let b;e[16]!==d?(b=s.jsx(ee,{children:d}),e[16]=d,e[17]=b):b=e[17];let g;e[18]!==n?(g=n("settings.infraBilling.invoiceDocuments"),e[18]=n,e[19]=g):g=e[19];let p;e[20]!==g?(p=s.jsx(ee,{children:g}),e[20]=g,e[21]=p):p=e[21];let v;e[22]!==p||e[23]!==u||e[24]!==y||e[25]!==i||e[26]!==b?(v=s.jsx(lr,{children:s.jsxs($e,{children:[u,y,i,b,p]})}),e[22]=p,e[23]=u,e[24]=y,e[25]=i,e[26]=b,e[27]=v):v=e[27];let c;if(e[28]!==r||e[29]!==n||e[30]!==l){let O;e[32]!==n||e[33]!==l?(O=x=>s.jsxs($e,{children:[s.jsx(te,{children:x.referenceMonth?Yt(x.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(te,{children:x.dueDate?Xe(x.dueDate):"—"}),s.jsx(te,{className:"tabular-nums",children:mi.format(x.value)}),s.jsx(te,{children:s.jsx(Ai,{status:x.status})}),s.jsxs(te,{className:"flex gap-2",children:[x.nfUrl&&s.jsx(We,{href:x.nfUrl,label:n("settings.infraBilling.invoiceNf")}),x.bankSlipUrl&&s.jsx(We,{href:x.bankSlipUrl,label:n("settings.infraBilling.invoiceBankSlip")}),!x.bankSlipUrl&&!l&&x.nfUrl&&s.jsx(We,{href:gi,label:n("settings.infraBilling.invoiceBankTransfer")}),!x.nfUrl&&!x.bankSlipUrl&&"—"]})]},x.id),e[32]=n,e[33]=l,e[34]=O):O=e[34],c=r.map(O),e[28]=r,e[29]=n,e[30]=l,e[31]=c}else c=e[31];let h;e[35]!==c?(h=s.jsx(cr,{children:c}),e[35]=c,e[36]=h):h=e[36];let j;return e[37]!==v||e[38]!==h?(j=s.jsxs(ur,{children:[v,h]}),e[37]=v,e[38]=h,e[39]=j):j=e[39],j}function Bi(t){return!!t.bankSlipUrl}function We(t){const e=Z.c(4),{href:r,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(er,{size:14}),e[0]=a):a=e[0];let l;return e[1]!==r||e[2]!==n?(l=s.jsx(Ze,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",children:[a,n]})}),e[1]=r,e[2]=n,e[3]=l):l=e[3],l}function Ai(t){const e=Z.c(14),{status:r}=t,n=de(),a=r.toLowerCase();if(a==="paid"){let o;e[0]!==n?(o=n("settings.infraBilling.statusPaid"),e[0]=n,e[1]=o):o=e[1];let u;return e[2]!==o?(u=s.jsx(C,{variant:"success",children:o}),e[2]=o,e[3]=u):u=e[3],u}if(a==="overdue"){let o;e[4]!==n?(o=n("settings.infraBilling.statusOverdue"),e[4]=n,e[5]=o):o=e[5];let u;return e[6]!==o?(u=s.jsx(C,{variant:"destructive",children:o}),e[6]=o,e[7]=u):u=e[7],u}if(a==="registered"){let o;e[8]!==n?(o=n("settings.infraBilling.statusPending"),e[8]=n,e[9]=o):o=e[9];let u;return e[10]!==o?(u=s.jsx(C,{variant:"warning",children:o}),e[10]=o,e[11]=u):u=e[11],u}let l;return e[12]!==r?(l=s.jsx(C,{variant:"secondary",children:r}),e[12]=r,e[13]=l):l=e[13],l}function Ti(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{group:"billing",children:s.jsx(hi,{})}),t[0]=e):e=t[0],e}function Ji(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jr,{capability:"members:manage",area:"billing",children:s.jsx(Ti,{})}),t[0]=e):e=t[0],e}export{Ji as default};
1
+ import{eB as He,cu as Ht,r as S,fl as ie,b4 as $t,c as Z,j as s,f_ as Jt,b as de,g0 as Qt,g1 as Ct,g2 as _t,eU as L,en as ge,B as Ze,b1 as ae,a5 as er}from"./index-BoB02eW2.js";import{i as tr}from"./CreditCard01-Bm6_xB5H.js";import{B as C}from"./badge-Zdi_g359.js";import{M as rr}from"./multi-select-jv5l4gKB.js";import{S as nr,d as ir,c as ar,a as sr,b as or}from"./select-C4iThYr6.js";import{T as ee,a as lr,b as $e,c as te,d as cr,e as ur}from"./table-CLaOCONQ.js";import{C as fr,Y as dr,A as gr,a as mr}from"./AreaChart-DKrmhkRJ.js";import{X as yr}from"./XAxis-CMCcO3jI.js";import{bH as pr,bI as kt,bJ as br,bK as hr,bL as vr,bM as jr,bN as xr,bO as Sr,f as wr,bF as ue,bP as Or,i as D,bQ as Pr,ai as Br,b4 as fe,bR as Ut,u as X,bS as Ar,bT as Tr,Y as Je,bU as Dr,y as Nr,a7 as Er,a8 as qr,g as Mr,Z as Ir,D as se,aj as Rr,r as Lr,p as _r,bV as kr,bE as Ur,bW as Fr,bX as Wr,bY as Kr,bZ as zr,b_ as Vr,b$ as Zr,c0 as Gr,c1 as Yr,c2 as Xr}from"./CategoricalChart-DYWjGYq1.js";import{R as Hr,S as $r}from"./Sector-CNZsIxmG.js";import{R as Jr}from"./require-capability-hn1SreP5.js";import"./checkbox-C2l5tKo2.js";import"./ChevronUp-CTrNq9Nk.js";import"./command-BSGZ-TwS.js";import"./index-BhuMySoe.js";import"./SearchMd-CkV8MM4H.js";import"./popover-CzNTcDJM.js";import"./index-BdQq_4o_.js";import"./index-DSuQX-Dj.js";import"./index-mPiuZtAa.js";import"./access-gate-BSx5LbNZ.js";import"./capability-load-error-xmV40q_-.js";var me={},ye={},Qe;function Qr(){return Qe||(Qe=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){const a=new Map;for(let l=0;l<r.length;l++){const o=r[l],u=n(o,l,r);a.has(u)||a.set(u,o)}return Array.from(a.values())}t.uniqBy=e})(ye)),ye}var pe={},Ce;function Cr(){return Ce||(Ce=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){return function(...a){return r.apply(this,a.slice(0,n))}}t.ary=e})(pe)),pe}var be={},et;function Ft(){return et||(et=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r}t.identity=e})(be)),be}var he={},ve={},tt;function en(){return tt||(tt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="object"&&r!==null}t.isObjectLike=e})(ve)),ve}var rt;function tn(){return rt||(rt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=pr(),r=en();function n(a){return r.isObjectLike(a)&&e.isArrayLike(a)}t.isArrayLikeObject=n})(he)),he}var je={},xe={},nt;function rn(){return nt||(nt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=kt();function r(n){return function(a){return e.get(a,n)}}t.property=r})(xe)),xe}var Se={},we={},Oe={},Pe={},it;function Wt(){return it||(it=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null||typeof r!="object"&&typeof r!="function"}t.isPrimitive=e})(Pe)),Pe}var at;function nn(){return at||(at=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=br(),r=Wt(),n=hr();function a(f,i,d){return typeof d!="function"?a(f,i,()=>{}):l(f,i,function b(g,p,v,c,h,j){const O=d(g,p,v,c,h,j);return O!==void 0?!!O:l(g,p,b,j)},new Map)}function l(f,i,d,b){if(i===f)return!0;switch(typeof i){case"object":return o(f,i,d,b);case"function":return Object.keys(i).length>0?l(f,{...i},d,b):n.isEqualsSameValueZero(f,i);default:return e.isObject(f)?typeof i=="string"?i==="":!0:n.isEqualsSameValueZero(f,i)}}function o(f,i,d,b){if(i==null)return!0;if(Array.isArray(i))return m(f,i,d,b);if(i instanceof Map)return u(f,i,d,b);if(i instanceof Set)return y(f,i,d,b);const g=Object.keys(i);if(f==null||r.isPrimitive(f))return g.length===0;if(g.length===0)return!0;if(b?.has(i))return b.get(i)===f;b?.set(i,f);try{for(let p=0;p<g.length;p++){const v=g[p];if(!r.isPrimitive(f)&&!(v in f)||i[v]===void 0&&f[v]!==void 0||i[v]===null&&f[v]!==null||!d(f[v],i[v],v,f,i,b))return!1}return!0}finally{b?.delete(i)}}function u(f,i,d,b){if(i.size===0)return!0;if(!(f instanceof Map))return!1;for(const[g,p]of i.entries()){const v=f.get(g);if(d(v,p,g,f,i,b)===!1)return!1}return!0}function m(f,i,d,b){if(i.length===0)return!0;if(!Array.isArray(f))return!1;const g=new Set;for(let p=0;p<i.length;p++){const v=i[p];let c=!1;for(let h=0;h<f.length;h++){if(g.has(h))continue;const j=f[h];let O=!1;if(d(j,v,p,f,i,b)&&(O=!0),O){g.add(h),c=!0;break}}if(!c)return!1}return!0}function y(f,i,d,b){return i.size===0?!0:f instanceof Set?m([...f],[...i],d,b):!1}t.isMatchWith=a,t.isSetMatch=y})(Oe)),Oe}var st;function Kt(){return st||(st=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=nn();function r(n,a){return e.isMatchWith(n,a,()=>{})}t.isMatch=r})(we)),we}var Be={},Ae={},Te={},ot;function an(){return ot||(ot=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}t.getSymbols=e})(Te)),Te}var De={},lt;function Ge(){return lt||(lt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}t.getTag=e})(De)),De}var Ne={},ct;function zt(){return ct||(ct=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",l="[object Arguments]",o="[object Symbol]",u="[object Date]",m="[object Map]",y="[object Set]",f="[object Array]",i="[object Function]",d="[object ArrayBuffer]",b="[object Object]",g="[object Error]",p="[object DataView]",v="[object Uint8Array]",c="[object Uint8ClampedArray]",h="[object Uint16Array]",j="[object Uint32Array]",O="[object BigUint64Array]",x="[object Int8Array]",P="[object Int16Array]",A="[object Int32Array]",B="[object BigInt64Array]",T="[object Float32Array]",E="[object Float64Array]";t.argumentsTag=l,t.arrayBufferTag=d,t.arrayTag=f,t.bigInt64ArrayTag=B,t.bigUint64ArrayTag=O,t.booleanTag=a,t.dataViewTag=p,t.dateTag=u,t.errorTag=g,t.float32ArrayTag=T,t.float64ArrayTag=E,t.functionTag=i,t.int16ArrayTag=P,t.int32ArrayTag=A,t.int8ArrayTag=x,t.mapTag=m,t.numberTag=n,t.objectTag=b,t.regexpTag=e,t.setTag=y,t.stringTag=r,t.symbolTag=o,t.uint16ArrayTag=h,t.uint32ArrayTag=j,t.uint8ArrayTag=v,t.uint8ClampedArrayTag=c})(Ne)),Ne}var Ee={},qe={},ut;function sn(){return ut||(ut=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof He=="object"&&He||(function(){return this})()||Function("return this")();t.globalThis=e})(qe)),qe}var ft;function on(){return ft||(ft=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=sn();function r(n){return typeof e.globalThis.Buffer<"u"&&e.globalThis.Buffer.isBuffer(n)}t.isBuffer=r})(Ee)),Ee}var Me={},dt;function ln(){return dt||(dt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}t.isTypedArray=e})(Me)),Me}var gt;function Vt(){return gt||(gt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=an(),r=Ge(),n=zt(),a=on(),l=Wt(),o=ln();function u(i,d){return m(i,void 0,i,new Map,d)}function m(i,d,b,g=new Map,p=void 0){const v=p?.(i,d,b,g);if(v!==void 0)return v;if(l.isPrimitive(i))return i;if(g.has(i))return g.get(i);if(Array.isArray(i)){const c=new Array(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return Object.hasOwn(i,"index")&&(c.index=i.index),Object.hasOwn(i,"input")&&(c.input=i.input),c}if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp){const c=new RegExp(i.source,i.flags);return c.lastIndex=i.lastIndex,c}if(i instanceof Map){const c=new Map;g.set(i,c);for(const[h,j]of i)c.set(h,m(j,h,b,g,p));return c}if(i instanceof Set){const c=new Set;g.set(i,c);for(const h of i)c.add(m(h,void 0,b,g,p));return c}if(a.isBuffer(i))return i.subarray();if(o.isTypedArray(i)){const c=new(Object.getPrototypeOf(i)).constructor(i.length);g.set(i,c);for(let h=0;h<i.length;h++)c[h]=m(i[h],h,b,g,p);return c}if(i instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&i instanceof SharedArrayBuffer)return i.slice(0);if(i instanceof DataView){const c=new DataView(i.buffer.slice(0),i.byteOffset,i.byteLength);return g.set(i,c),y(c,i,b,g,p),c}if(typeof File<"u"&&i instanceof File){const c=new File([i],i.name,{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(typeof Blob<"u"&&i instanceof Blob){const c=new Blob([i],{type:i.type});return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Error){const c=structuredClone(i);return g.set(i,c),c.message=i.message,c.name=i.name,c.stack=i.stack,c.cause=i.cause,c.constructor=i.constructor,y(c,i,b,g,p),c}if(i instanceof Boolean){const c=new Boolean(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof Number){const c=new Number(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(i instanceof String){const c=new String(i.valueOf());return g.set(i,c),y(c,i,b,g,p),c}if(typeof i=="object"&&f(i)){const c=Object.create(Object.getPrototypeOf(i));return g.set(i,c),y(c,i,b,g,p),c}return i}function y(i,d,b=i,g,p){const v=[...Object.keys(d),...e.getSymbols(d)];for(let c=0;c<v.length;c++){const h=v[c],j=Object.getOwnPropertyDescriptor(i,h);(j==null||j.writable)&&(i[h]=m(d[h],h,b,g,p))}}function f(i){switch(r.getTag(i)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}t.cloneDeepWith=u,t.cloneDeepWithImpl=m,t.copyProperties=y})(Ae)),Ae}var mt;function cn(){return mt||(mt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt();function r(n){return e.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}t.cloneDeep=r})(Be)),Be}var yt;function un(){return yt||(yt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=cn();function n(a){return a=r.cloneDeep(a),l=>e.isMatch(l,a)}t.matches=n})(Se)),Se}var Ie={},Re={},Le={},pt;function fn(){return pt||(pt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Vt(),r=Ge(),n=zt();function a(l,o){return e.cloneDeepWith(l,(u,m,y,f)=>{const i=o?.(u,m,y,f);if(i!==void 0)return i;if(typeof l=="object"){if(r.getTag(l)===n.objectTag&&typeof l.constructor!="function"){const d={};return f.set(l,d),e.copyProperties(d,l,y,f),d}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new l.constructor(l?.valueOf());return e.copyProperties(d,l),d}case n.argumentsTag:{const d={};return e.copyProperties(d,l),d.length=l.length,d[Symbol.iterator]=l[Symbol.iterator],d}default:return}}})}t.cloneDeepWith=a})(Le)),Le}var bt;function dn(){return bt||(bt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fn();function r(n){return e.cloneDeepWith(n)}t.cloneDeep=r})(Re)),Re}var _e={},ke={},ht;function gn(){return ht||(ht=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ge();function r(n){return n!==null&&typeof n=="object"&&e.getTag(n)==="[object Arguments]"}t.isArguments=r})(ke)),ke}var vt;function mn(){return vt||(vt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=vr(),r=xr(),n=gn(),a=jr();function l(o,u){let m;if(Array.isArray(u)?m=u:typeof u=="string"&&e.isDeepKey(u)&&o?.[u]==null?m=a.toPath(u):m=[u],m.length===0)return!1;let y=o;for(let f=0;f<m.length;f++){const i=m[f];if((y==null||!Object.hasOwn(y,i))&&!((Array.isArray(y)||n.isArguments(y))&&r.isIndex(i)&&i<y.length))return!1;y=y[i]}return!0}t.has=l})(_e)),_e}var jt;function yn(){return jt||(jt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Kt(),r=Sr(),n=dn(),a=kt(),l=mn();function o(u,m){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return m=n.cloneDeep(m),function(y){const f=a.get(y,u);return f===void 0?l.has(y,u):m===void 0?f===void 0:e.isMatch(f,m)}}t.matchesProperty=o})(Ie)),Ie}var xt;function pn(){return xt||(xt=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Ft(),r=rn(),n=un(),a=yn();function l(o){if(o==null)return e.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?a.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}t.iteratee=l})(je)),je}var St;function bn(){return St||(St=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Qr(),r=Cr(),n=Ft(),a=tn(),l=pn();function o(u,m=n.identity){return a.isArrayLikeObject(u)?e.uniqBy(Array.from(u),r.ary(l.iteratee(m),1)):[]}t.uniqBy=o})(me)),me}var Ue,wt;function hn(){return wt||(wt=1,Ue=bn().uniqBy),Ue}var vn=hn();const Ot=Ht(vn);function jn(t,e,r){return e===!0?Ot(t,r):typeof e=="function"?Ot(t,e):t}var oe=1;function xn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(a=>{if(a!=null){var l=a.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-e.height)>oe||Math.abs(o.left-e.left)>oe||Math.abs(o.top-e.top)>oe||Math.abs(o.width-e.width)>oe)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,n]}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ke.apply(null,arguments)}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(n){Sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sn(t,e,r){return(e=wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wn(t){var e=On(t,"string");return typeof e=="symbol"?e:e+""}function On(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pn(t){return Array.isArray(t)&&ue(t[0])&&ue(t[1])?t.join(" ~ "):t}var J={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Bn(t,e){return e==null?t:Or(t,e)}var An=t=>{var{separator:e=J.separator,contentStyle:r,itemStyle:n,labelStyle:a=J.labelStyle,payload:l,formatter:o,itemSorter:u,wrapperClassName:m,labelClassName:y,label:f,labelFormatter:i,accessibilityLayer:d=J.accessibilityLayer}=t,b=()=>{if(l&&l.length){var x={padding:0,margin:0},P=Bn(l,u),A=P.map((B,T)=>{if(!B||B.type==="none")return null;var E=B.formatter||o||Pn,{value:N,name:_}=B,F=N,W=_;if(E){var M=E(N,_,B,T,l);if(Array.isArray(M))[F,W]=M;else if(M!=null)F=M;else return null}var K=re(re({},J.itemStyle),{},{color:B.color||J.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:K},ue(W)?S.createElement("span",{className:"recharts-tooltip-item-name"},W):null,ue(W)?S.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,S.createElement("span",{className:"recharts-tooltip-item-value"},F),S.createElement("span",{className:"recharts-tooltip-item-unit"},B.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:x},A)}return null},g=re(re({},J.contentStyle),r),p=re({margin:0},a),v=!wr(f),c=v?f:"",h=ie("recharts-default-tooltip",m),j=ie("recharts-tooltip-label",y);v&&i&&l!==void 0&&l!==null&&(c=i(f,l));var O=d?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Ke({className:h,style:g},O),S.createElement("p",{className:j,style:p},S.isValidElement(c)?c:"".concat(c)),b())},ne="recharts-tooltip-wrapper",Tn={visibility:"hidden"};function Dn(t){var{coordinate:e,translateX:r,translateY:n}=t;return ie(ne,{["".concat(ne,"-right")]:D(r)&&e&&D(e.x)&&r>=e.x,["".concat(ne,"-left")]:D(r)&&e&&D(e.x)&&r<e.x,["".concat(ne,"-bottom")]:D(n)&&e&&D(e.y)&&n>=e.y,["".concat(ne,"-top")]:D(n)&&e&&D(e.y)&&n<e.y})}function Bt(t){var{allowEscapeViewBox:e,coordinate:r,key:n,offset:a,position:l,reverseDirection:o,tooltipDimension:u,viewBox:m,viewBoxDimension:y}=t;if(l&&D(l[n]))return l[n];var f=r[n]-u-(a>0?a:0),i=r[n]+a;if(e[n])return o[n]?f:i;var d=m[n];if(d==null)return 0;if(o[n]){var b=f,g=d;return b<g?Math.max(i,d):Math.max(f,d)}if(y==null)return 0;var p=i+u,v=d+y;return p>v?Math.max(f,d):Math.max(i,d)}function Nn(t){var{translateX:e,translateY:r,useTranslate3d:n}=t;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function En(t){var{allowEscapeViewBox:e,coordinate:r,offsetTop:n,offsetLeft:a,position:l,reverseDirection:o,tooltipBox:u,useTranslate3d:m,viewBox:y}=t,f,i,d;return u.height>0&&u.width>0&&r?(i=Bt({allowEscapeViewBox:e,coordinate:r,key:"x",offset:a,position:l,reverseDirection:o,tooltipDimension:u.width,viewBox:y,viewBoxDimension:y.width}),d=Bt({allowEscapeViewBox:e,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:u.height,viewBox:y,viewBoxDimension:y.height}),f=Nn({translateX:i,translateY:d,useTranslate3d:m})):f=Tn,{cssProperties:f,cssClasses:Dn({translateX:i,translateY:d,coordinate:r})}}function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?At(Object(r),!0).forEach(function(n){qn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qn(t,e,r){return(e=Mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mn(t){var e=In(t,"string");return typeof e=="symbol"?e:e+""}function In(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rn(t){if(!(t.prefersReducedMotion&&t.isAnimationActive==="auto")&&t.isAnimationActive&&t.active)return"transform ".concat(t.animationDuration,"ms ").concat(t.animationEasing)}function Ln(t){var e,r,n,a,l,o,u=Pr(),[m,y]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var g=p=>{if(p.key==="Escape"){var v,c,h,j;y({dismissed:!0,dismissedAtCoordinate:{x:(v=(c=t.coordinate)===null||c===void 0?void 0:c.x)!==null&&v!==void 0?v:0,y:(h=(j=t.coordinate)===null||j===void 0?void 0:j.y)!==null&&h!==void 0?h:0}})}};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[(e=t.coordinate)===null||e===void 0?void 0:e.x,(r=t.coordinate)===null||r===void 0?void 0:r.y]),m.dismissed&&(((n=(a=t.coordinate)===null||a===void 0?void 0:a.x)!==null&&n!==void 0?n:0)!==m.dismissedAtCoordinate.x||((l=(o=t.coordinate)===null||o===void 0?void 0:o.y)!==null&&l!==void 0?l:0)!==m.dismissedAtCoordinate.y)&&y(Q(Q({},m),{},{dismissed:!1}));var{cssClasses:f,cssProperties:i}=En({allowEscapeViewBox:t.allowEscapeViewBox,coordinate:t.coordinate,offsetLeft:typeof t.offset=="number"?t.offset:t.offset.x,offsetTop:typeof t.offset=="number"?t.offset:t.offset.y,position:t.position,reverseDirection:t.reverseDirection,tooltipBox:{height:t.lastBoundingBox.height,width:t.lastBoundingBox.width},useTranslate3d:t.useTranslate3d,viewBox:t.viewBox}),d=t.hasPortalFromProps?{}:Q(Q({transition:Rn({prefersReducedMotion:u,isAnimationActive:t.isAnimationActive,active:t.active,animationDuration:t.animationDuration,animationEasing:t.animationEasing})},i),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=Q(Q({},d),{},{visibility:!m.dismissed&&t.active&&t.hasPayload?"visible":"hidden"},t.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:f,style:b,ref:t.innerRef},t.children)}var _n=S.memo(Ln),kn=["x","y","top","left","width","height","className"];function ze(){return ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ze.apply(null,arguments)}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Un(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(n){Fn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fn(t,e,r){return(e=Wn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wn(t){var e=Kn(t,"string");return typeof e=="symbol"?e:e+""}function Kn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zn(t,e){if(t==null)return{};var r,n,a=Vn(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n<l.length;n++)r=l[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Vn(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Zn=(t,e,r,n,a,l)=>"M".concat(t,",").concat(a,"v").concat(n,"M").concat(l,",").concat(e,"h").concat(r),Gn=t=>{var{x:e=0,y:r=0,top:n=0,left:a=0,width:l=0,height:o=0,className:u}=t,m=zn(t,kn),y=Un({x:e,y:r,top:n,left:a,width:l,height:o},m);return!D(e)||!D(r)||!D(l)||!D(o)||!D(n)||!D(a)?null:S.createElement("path",ze({},Br(y),{className:ie("recharts-cross",u),d:Zn(e,r,l,o,n,a)}))};function Yn(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Zt(t){var{cx:e,cy:r,radius:n,startAngle:a,endAngle:l}=t,o=fe(e,r,n,a),u=fe(e,r,n,l);return{points:[o,u],cx:e,cy:r,radius:n,startAngle:a,endAngle:l}}function Xn(t,e,r){if(t==="horizontal")return[{x:e.x,y:r.top},{x:e.x,y:r.top+r.height}];if(t==="vertical")return[{x:r.left,y:e.y},{x:r.left+r.width,y:e.y}];if(Ut(e)){if(t==="centric"){var{cx:n,cy:a,innerRadius:l,outerRadius:o,angle:u}=e,m=fe(n,a,l,u),y=fe(n,a,o,u);return[{x:m.x,y:m.y},{x:y.x,y:y.y}]}return Zt(e)}}function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(n){Hn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hn(t,e,r){return(e=$n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $n(t){var e=Jn(t,"string");return typeof e=="symbol"?e:e+""}function Jn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qn=()=>X(Dr),Cn=()=>{var t=Qn(),e=X(Ar),r=X(Tr);return!t||!r?Je(void 0,e):Je(Nt(Nt({},t),{},{scale:r}),e)};function Ve(){return Ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ve.apply(null,arguments)}function Et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(r),!0).forEach(function(n){ei(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Et(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ei(t,e,r){return(e=ti(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ti(t){var e=ri(t,"string");return typeof e=="symbol"?e:e+""}function ri(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ni(t){var{cursor:e,cursorComp:r,cursorProps:n}=t;return S.isValidElement(e)?S.cloneElement(e,n):S.createElement(r,n)}function ii(t){var e,{coordinate:r,payload:n,index:a,offset:l,tooltipAxisBandSize:o,layout:u,cursor:m,tooltipEventType:y,chartName:f}=t,i=r,d=n,b=a;if(!m||!i||f!=="ScatterChart"&&y!=="axis")return null;var g,p,v;if(f==="ScatterChart")g=i,p=Gn,v=se.cursorLine;else if(f==="BarChart")g=Yn(u,i,l,o),p=Hr,v=se.cursorRectangle;else if(u==="radial"&&Ut(i)){var{cx:c,cy:h,radius:j,startAngle:O,endAngle:x}=Zt(i);g={cx:c,cy:h,startAngle:O,endAngle:x,innerRadius:j,outerRadius:j},p=$r,v=se.cursorLine}else g={points:Xn(u,i,l)},p=Rr,v=se.cursorLine;var P=typeof m=="object"&&"className"in m?m.className:void 0,A=le(le(le(le({stroke:"#ccc",pointerEvents:"none"},l),g),Mr(m)),{},{payload:d,payloadIndex:b,className:ie("recharts-tooltip-cursor",P)});return S.createElement(Ir,{zIndex:(e=t.zIndex)!==null&&e!==void 0?e:v},S.createElement(ni,{cursor:m,cursorComp:p,cursorProps:A}))}function ai(t){var e=Cn(),r=Nr(),n=Er(),a=qr();return e==null||r==null||n==null||a==null?null:S.createElement(ii,Ve({},t,{offset:r,layout:n,tooltipAxisBandSize:e,chartName:a}))}function qt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qt(Object(r),!0).forEach(function(n){si(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function si(t,e,r){return(e=oi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oi(t){var e=li(t,"string");return typeof e=="symbol"?e:e+""}function li(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ci(t){return t.dataKey}function ui(t,e){return S.isValidElement(t)?S.cloneElement(t,e):typeof t=="function"?S.createElement(t,e):S.createElement(An,e)}var It=[],fi={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function di(t){var e,r,n=Lr(t,fi),{active:a,allowEscapeViewBox:l,animationDuration:o,animationEasing:u,content:m,filterNull:y,isAnimationActive:f,offset:i,payloadUniqBy:d,position:b,reverseDirection:g,useTranslate3d:p,wrapperStyle:v,cursor:c,shared:h,trigger:j,defaultIndex:O,portal:x,axisId:P}=n,A=_r(),B=typeof O=="number"?String(O):O;S.useEffect(()=>{A(kr({shared:h,trigger:j,axisId:P,active:a,defaultIndex:B}))},[A,h,j,P,a,B]);var T=Ur(),E=Fr(),N=Wr(h),{activeIndex:_,isActive:F}=(e=X(U=>Kr(U,N,j,B)))!==null&&e!==void 0?e:{},W=X(U=>zr(U,N,j,B)),M=X(U=>Vr(U,N,j,B)),K=X(U=>Zr(U,N,j,B)),I=W,z=Gr(),R=(r=a??F)!==null&&r!==void 0?r:!1,[V,H]=xn([I,R]),G=N==="axis"?M:void 0;Yr(N,j,K,G,_,R);var Y=x??z;if(Y==null||T==null||N==null)return null;var q=I??It;R||(q=It),y&&q.length&&(q=jn(q.filter(U=>U.value!=null&&(U.hide!==!0||n.includeHidden)),d,ci));var $=q.length>0,w=Mt(Mt({},n),{},{payload:q,label:G,active:R,activeIndex:_,coordinate:K,accessibilityLayer:E}),k=S.createElement(_n,{allowEscapeViewBox:l,animationDuration:o,animationEasing:u,isAnimationActive:f,active:R,coordinate:K,hasPayload:$,offset:i,position:b,reverseDirection:g,useTranslate3d:p,viewBox:T,wrapperStyle:v,lastBoundingBox:V,innerRef:H,hasPortalFromProps:!!x},ui(m,w));return S.createElement(S.Fragment,null,$t.createPortal(k,Y),R&&S.createElement(ai,{cursor:c,tooltipEventType:N,coordinate:K,payload:q,index:_}))}const Ye=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),Rt=["B","KB","MB","GB","TB","PB"];function Gt(t){if(t<=0)return"0 B";const e=Math.min(Rt.length-1,Math.floor(Math.log(t)/Math.log(1024))),r=t/1024**e;return`${r.toFixed(r>=100||e===0?0:1)} ${Rt[e]}`}const Fe=50,gi="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",mi=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function Yt(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function Xe(t){return Yt(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function yi(){const t=new Date;return Array.from({length:12},(e,r)=>{const n=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-r,1));return{value:n.toISOString().slice(0,10),label:n.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function pi(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function Lt(t){const e=Z.c(30),{usage:r,metric:n,colorNum:a,formatValue:l,height:o}=t,u=`var(--chart-${a})`,m=`infra-billing-${n}`;let y;e[0]!==r?(y=r.map(bi),e[0]=r,e[1]=y):y=e[1];const f=y;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={left:0,right:4,top:8,bottom:0},e[2]=i):i=e[2];let d,b;e[3]!==u?(d=s.jsx("stop",{offset:"0%",stopColor:u,stopOpacity:.25}),b=s.jsx("stop",{offset:"100%",stopColor:u,stopOpacity:0}),e[3]=u,e[4]=d,e[5]=b):(d=e[4],b=e[5]);let g;e[6]!==m||e[7]!==d||e[8]!==b?(g=s.jsx("defs",{children:s.jsxs("linearGradient",{id:m,x1:"0",y1:"0",x2:"0",y2:"1",children:[d,b]})}),e[6]=m,e[7]=d,e[8]=b,e[9]=g):g=e[9];let p;e[10]!==l||e[11]!==o?(p=o>100&&s.jsxs(s.Fragment,{children:[s.jsx(fr,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(yr,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(dr,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:l,width:68})]}),e[10]=l,e[11]=o,e[12]=p):p=e[12];let v,c;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={stroke:"var(--border)",strokeDasharray:"4 4"},c={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=v,e[14]=c):(v=e[13],c=e[14]);let h;e[15]!==l?(h=s.jsx(di,{cursor:v,contentStyle:c,formatter:A=>l(Number(A)||0)}),e[15]=l,e[16]=h):h=e[16];const j=`url(#${m})`;let O;e[17]!==u||e[18]!==n||e[19]!==j?(O=s.jsx(gr,{type:"linear",dataKey:n,stroke:u,strokeWidth:2,fill:j,dot:!1}),e[17]=u,e[18]=n,e[19]=j,e[20]=O):O=e[20];let x;e[21]!==f||e[22]!==O||e[23]!==g||e[24]!==p||e[25]!==h?(x=s.jsxs(mr,{data:f,margin:i,children:[g,p,h,O]}),e[21]=f,e[22]=O,e[23]=g,e[24]=p,e[25]=h,e[26]=x):x=e[26];let P;return e[27]!==o||e[28]!==x?(P=s.jsx(Xr,{width:"100%",height:o,children:x}),e[27]=o,e[28]=x,e[29]=P):P=e[29],P}function bi(t){return{...t,label:pi(t.date)}}function ce(t,e){return t.reduce((r,n)=>r+n[e],0)}function hi(){const t=Z.c(39),e=de(),{sites:r,isLoading:n}=Qt(),[a,l]=S.useState(null),o=yi(),[u,m]=S.useState(o[0].value);let y;t[0]!==a||t[1]!==r?(y=a??r.slice(0,Fe),t[0]=a,t[1]=r,t[2]=y):y=t[2];const f=y,i=!a&&r.length>Fe,{data:d,isLoading:b}=Ct(f,u),g=_t();if(n){let w;return t[3]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ae,{className:"h-64 w-full"}),t[3]=w):w=t[3],w}if(r.length===0){let w;t[4]!==e?(w=e("settings.infraBilling.noSites"),t[4]=e,t[5]=w):w=t[5];let k;return t[6]!==w?(k=s.jsx(L,{className:"p-6 text-sm text-muted-foreground",children:w}),t[6]=w,t[7]=k):k=t[7],k}const p=d?.usage??[],v=d?.pageviewsAvailable??!1,c=!!d&&!d.usageUnavailable,h=(w,k)=>c?k(ce(p,w)):"—",j=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:v&&c?Ye.format(ce(p,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:h("requests",wi)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:h("dataTransferBytes",Gt)}],O=xi;let x;t[8]!==d?.teams?(x=d?.teams??[],t[8]=d?.teams,t[9]=x):x=t[9];const P=x;let A;t[10]!==d?.siteSlugsWithoutTeam?(A=d?.siteSlugsWithoutTeam??[],t[10]=d?.siteSlugsWithoutTeam,t[11]=A):A=t[11];const B=A,T=P.length===1?P[0]:void 0,E=T?.billing??null,N=P.length+(B.length>0?1:0)>1,_=ce(p,"pageviews"),F=_>0?ce(p,"requests")/_:0,W=v&&c&&_>0?F.toFixed(F<10?1:0):"—";let M;t[12]!==d?.billingUnavailable||t[13]!==T||t[14]!==e||t[15]!==P.length?(M=d?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):P.length>1?e("settings.infraBilling.multipleTeams",{count:String(P.length)}):T?Xt(T,e):e("settings.infraBilling.noTeam"),t[12]=d?.billingUnavailable,t[13]=T,t[14]=e,t[15]=P.length,t[16]=M):M=t[16];const K=M;let I;t[17]!==r?(I=r.map(ji),t[17]=r,t[18]=I):I=t[18];let z;t[19]!==e?(z=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=z):z=t[20];let R;t[21]!==f||t[22]!==I||t[23]!==z?(R=s.jsx(rr,{className:"w-auto min-w-56 max-w-full",options:I,defaultValue:f,maxCount:2,placeholder:z,onValueChange:l}),t[21]=f,t[22]=I,t[23]=z,t[24]=R):R=t[24];let V;t[25]!==e?(V=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=V):V=t[26];let H;t[27]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(sr,{}),t[27]=H):H=t[27];let G;t[28]!==V?(G=s.jsx(or,{className:"w-48","aria-label":V,children:H}),t[28]=V,t[29]=G):G=t[29];let Y;t[30]!==f.length||t[31]!==e?(Y=f.length===0&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=f.length,t[31]=e,t[32]=Y):Y=t[32];let q;t[33]!==e||t[34]!==i?(q=i&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(Fe)})}),t[33]=e,t[34]=i,t[35]=q):q=t[35];let $;return t[36]!==d?.usageUnavailable||t[37]!==e?($=d?.usageUnavailable&&s.jsx(L,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=d?.usageUnavailable,t[37]=e,t[38]=$):$=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[R,s.jsxs(nr,{value:u,onValueChange:m,children:[G,s.jsx(ir,{children:o.map(vi)})]})]}),Y,q,$,f.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(ge,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(L,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(tr,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),T&&E?.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:g.isPending,onClick:()=>g.mutate(T.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[E?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),b?s.jsx(ae,{className:"h-5 w-16"}):s.jsx(C,{variant:E.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${E.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:E.nextBillingDate?Xe(E.nextBillingDate):"—"})]})]}):!b&&s.jsx("p",{className:"text-xs text-muted-foreground",children:K}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:W})]})]})]}),j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:o.find(k=>k.value===u)?.label})]}),b?s.jsx(ae,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:w.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:64})})]},w.key))]})}),s.jsx(ge,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:j.map(w=>s.jsxs(L,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:w.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:w.description})]}),s.jsx(Lt,{usage:p,metric:w.key,colorNum:w.colorNum,formatValue:O(w.key),height:220})]},w.key))})}),s.jsx(ge,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:d?d.billingUnavailable?s.jsx(L,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[P.map(w=>s.jsx(Oi,{team:w,showSites:N},w.siteSlugs.join(","))),B.length>0&&s.jsxs(L,{className:"flex flex-col gap-1 p-4",children:[N&&s.jsx("span",{className:"text-sm font-medium",children:B.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(L,{children:s.jsx(ae,{className:"m-4 h-24"})})})})]})]})}function vi(t){return s.jsx(ar,{value:t.value,children:t.label},t.value)}function ji(t){return{label:t,value:t}}function xi(t){return t==="dataTransferBytes"?Gt:Si}function Si(t){return Ye.format(t)}function wi(t){return Ye.format(t)}function Xt(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Oi(t){const e=Z.c(13),{team:r,showSites:n}=t,a=de(),l=_t(),o=r.billing;let u;e[0]!==o||e[1]!==l||e[2]!==n||e[3]!==a||e[4]!==r.siteSlugs?(u=n&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:r.siteSlugs.join(", ")}),o&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(C,{variant:o.planType==="free"?"secondary":"success",children:a(`settings.infraBilling.plan.${o.planType}`)}),o.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:a("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:Xe(o.nextBillingDate)})]}),o.canManageSubscription&&s.jsx(Ze,{variant:"outline",size:"sm",disabled:l.isPending,onClick:()=>l.mutate(r.siteSlugs),children:a("settings.infraBilling.manageButton")})]})]}),e[0]=o,e[1]=l,e[2]=n,e[3]=a,e[4]=r.siteSlugs,e[5]=u):u=e[5];let m;e[6]!==o||e[7]!==a||e[8]!==r?(m=o?o.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:a("settings.infraBilling.noInvoices")}):s.jsx(Pi,{invoices:o.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:Xt(r,a)}),e[6]=o,e[7]=a,e[8]=r,e[9]=m):m=e[9];let y;return e[10]!==u||e[11]!==m?(y=s.jsxs(L,{className:"gap-0 overflow-x-auto",children:[u,m]}),e[10]=u,e[11]=m,e[12]=y):y=e[12],y}function Pi(t){const e=Z.c(40),{invoices:r}=t,n=de();let a;e[0]!==r?(a=r.some(Bi),e[0]=r,e[1]=a):a=e[1];const l=a;let o;e[2]!==n?(o=n("settings.infraBilling.invoiceReference"),e[2]=n,e[3]=o):o=e[3];let u;e[4]!==o?(u=s.jsx(ee,{children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==n?(m=n("settings.infraBilling.invoiceDue"),e[6]=n,e[7]=m):m=e[7];let y;e[8]!==m?(y=s.jsx(ee,{children:m}),e[8]=m,e[9]=y):y=e[9];let f;e[10]!==n?(f=n("settings.infraBilling.invoiceAmount"),e[10]=n,e[11]=f):f=e[11];let i;e[12]!==f?(i=s.jsx(ee,{children:f}),e[12]=f,e[13]=i):i=e[13];let d;e[14]!==n?(d=n("settings.infraBilling.invoiceStatus"),e[14]=n,e[15]=d):d=e[15];let b;e[16]!==d?(b=s.jsx(ee,{children:d}),e[16]=d,e[17]=b):b=e[17];let g;e[18]!==n?(g=n("settings.infraBilling.invoiceDocuments"),e[18]=n,e[19]=g):g=e[19];let p;e[20]!==g?(p=s.jsx(ee,{children:g}),e[20]=g,e[21]=p):p=e[21];let v;e[22]!==p||e[23]!==u||e[24]!==y||e[25]!==i||e[26]!==b?(v=s.jsx(lr,{children:s.jsxs($e,{children:[u,y,i,b,p]})}),e[22]=p,e[23]=u,e[24]=y,e[25]=i,e[26]=b,e[27]=v):v=e[27];let c;if(e[28]!==r||e[29]!==n||e[30]!==l){let O;e[32]!==n||e[33]!==l?(O=x=>s.jsxs($e,{children:[s.jsx(te,{children:x.referenceMonth?Yt(x.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(te,{children:x.dueDate?Xe(x.dueDate):"—"}),s.jsx(te,{className:"tabular-nums",children:mi.format(x.value)}),s.jsx(te,{children:s.jsx(Ai,{status:x.status})}),s.jsxs(te,{className:"flex gap-2",children:[x.nfUrl&&s.jsx(We,{href:x.nfUrl,label:n("settings.infraBilling.invoiceNf")}),x.bankSlipUrl&&s.jsx(We,{href:x.bankSlipUrl,label:n("settings.infraBilling.invoiceBankSlip")}),!x.bankSlipUrl&&!l&&x.nfUrl&&s.jsx(We,{href:gi,label:n("settings.infraBilling.invoiceBankTransfer")}),!x.nfUrl&&!x.bankSlipUrl&&"—"]})]},x.id),e[32]=n,e[33]=l,e[34]=O):O=e[34],c=r.map(O),e[28]=r,e[29]=n,e[30]=l,e[31]=c}else c=e[31];let h;e[35]!==c?(h=s.jsx(cr,{children:c}),e[35]=c,e[36]=h):h=e[36];let j;return e[37]!==v||e[38]!==h?(j=s.jsxs(ur,{children:[v,h]}),e[37]=v,e[38]=h,e[39]=j):j=e[39],j}function Bi(t){return!!t.bankSlipUrl}function We(t){const e=Z.c(4),{href:r,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(er,{size:14}),e[0]=a):a=e[0];let l;return e[1]!==r||e[2]!==n?(l=s.jsx(Ze,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:r,target:"_blank",rel:"noreferrer",children:[a,n]})}),e[1]=r,e[2]=n,e[3]=l):l=e[3],l}function Ai(t){const e=Z.c(14),{status:r}=t,n=de(),a=r.toLowerCase();if(a==="paid"){let o;e[0]!==n?(o=n("settings.infraBilling.statusPaid"),e[0]=n,e[1]=o):o=e[1];let u;return e[2]!==o?(u=s.jsx(C,{variant:"success",children:o}),e[2]=o,e[3]=u):u=e[3],u}if(a==="overdue"){let o;e[4]!==n?(o=n("settings.infraBilling.statusOverdue"),e[4]=n,e[5]=o):o=e[5];let u;return e[6]!==o?(u=s.jsx(C,{variant:"destructive",children:o}),e[6]=o,e[7]=u):u=e[7],u}if(a==="registered"){let o;e[8]!==n?(o=n("settings.infraBilling.statusPending"),e[8]=n,e[9]=o):o=e[9];let u;return e[10]!==o?(u=s.jsx(C,{variant:"warning",children:o}),e[10]=o,e[11]=u):u=e[11],u}let l;return e[12]!==r?(l=s.jsx(C,{variant:"secondary",children:r}),e[12]=r,e[13]=l):l=e[13],l}function Ti(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jt,{group:"billing",children:s.jsx(hi,{})}),t[0]=e):e=t[0],e}function Ji(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Jr,{capability:"members:manage",area:"billing",children:s.jsx(Ti,{})}),t[0]=e):e=t[0],e}export{Ji as default};
@@ -1 +1 @@
1
- import{c as H,r as C,b as Z,j as h,t as N,a3 as xe,v as ke,aM as we,s as be,B as Pe,q as Ce,D as Se,o as de,a2 as ue,K as G,y as O,ex as me,ey as oe,ez as z,l as _e}from"./index-CNnllo6G.js";import{S as fe,s as Fe}from"./suggestion-DmWAjig0.js";import{l as Ie,n as De,o as ve,f as B,p as je,P as ie,q as Me,c as Re,u as Le,r as Ae,e as Ee,j as Ne,F as Te,s as Qe,b as Oe}from"./usage-stats-D62oidTL.js";import{aV as Ue}from"./agent-icon-B7cHtLmN.js";import"./chat-context-Bm126Y9d.js";import{m as $e,i as qe,b as Ke}from"./index-BQe9t0ZU.js";import{u as pe}from"./use-mcp-client-cb8e4tvm.js";import{b as ze}from"./repository-binding-DqlrnpeD.js";import{l as Be}from"./use-project-native-view-presence-uvlxs5r_.js";import{g as ne,s as he}from"./tool-namespace-CSvvZ9-r.js";import{l as ae,g as ge}from"./use-mcp-prompts-BfEVPVEx.js";import{f as He,a as Je}from"./use-org-fs-C9g2s6eE.js";async function Ve(t,e,r,s,i,o){if(!$e(e)){N.error("Selected model does not support file uploads");return}const a=r.type||"application/octet-stream";if(!qe(a,e)){const f=Ke(e).parts.map(x=>o(x)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:f}):N.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${f}.`});return}const l=10*1024*1024;if(r.size>l){N.error(`File "${r.name}" exceeds 10MB limit`);return}try{const f=new FileReader,k=new Promise((n,u)=>{f.onload=()=>{const d=f.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const w=d.includes(",")?d.split(",")[1]??d:d;n(w)},f.onerror=u});f.readAsDataURL(r);const x=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:x};Ie(t,{from:s,to:s},p)}catch(f){console.error("Failed to process file:",f),N.error(`Failed to load file "${r.name}"`)}}function We(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const a=Array.from(i);return(async()=>{let l=o.pos;for(const f of a)await s(f,l),l=t.state.selection.to})(),!0}function Xe(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=Z(),a=C.useRef(Ge);let l,f;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(l=()=>{a.current=async(p,n)=>{await Ve(r,s,p,n,i,o)}},f=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=l,e[5]=f):(l=e[4],f=e[5]),C.useEffect(l,f);let k,x;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new ve({key:p,props:{handleDrop:(d,w,F,S)=>We(d,w,S,(_,D)=>a.current(_,D)),handlePaste:(d,w)=>{const F=w.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(Ye);return S.length===0?!1:(w.preventDefault(),(async()=>{let _=d.state.selection.from;for(const D of S){const v=D.getAsFile();v&&(await a.current?.(v,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},x=[r],e[6]=r,e[7]=k,e[8]=x):(k=e[7],x=e[8]),C.useEffect(k,x),null}function Ye(t){return t.kind==="file"}function Ge(){return Promise.resolve()}function St(t){const e=H.c(43),{info:r,onClose:s}=t,i=Z(),o=r!==null;let a;e[0]!==s?(a=I=>!I&&s(),e[0]=s,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=l):l=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:l.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=f):f=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(xe,{size:18})}),e[4]=k):k=e[4];let x;e[5]!==i?(x=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=x):x=e[6];let p;e[7]!==x?(p=h.jsx(ke,{className:"text-xl font-semibold tracking-tight",children:x}),e[7]=x,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let w;e[13]!==d||e[14]!==u?(w=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=w):w=e[15];let F;e[16]!==w||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[f,h.jsxs(be,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,w]})]})]}),e[16]=w,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let D;e[22]!==_?(D=h.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=D):D=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=v):v=e[24];const L=r?.accepted;let j;e[25]!==L?(j=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[v,h.jsx("span",{className:"capitalize",children:L})]}),e[25]=L,e[26]=j):j=e[26];let c;e[27]!==D||e[28]!==j?(c=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"rounded-xl border border-border p-4",children:[D,j]})}),e[27]=D,e[28]=j,e[29]=c):c=e[29];let m;e[30]!==i?(m=i("chat.uploader.gotIt"),e[30]=i,e[31]=m):m=e[31];let y;e[32]!==s||e[33]!==m?(y=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(Pe,{onClick:s,children:m})}),e[32]=s,e[33]=m,e[34]=y):y=e[34];let P;e[35]!==F||e[36]!==c||e[37]!==y?(P=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ze,children:[F,c,y]}),e[35]=F,e[36]=c,e[37]=y,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==a||e[41]!==P?(M=h.jsx(Se,{open:o,onOpenChange:a,children:P}),e[39]=o,e[40]=a,e[41]=P,e[42]=M):M=e[42],M}function Ze(t){return t.preventDefault()}function _t(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}const et=t=>{const e=H.c(53),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=Z(),a=de(),{org:l}=ue(),f=ze();let k;e[0]!==f?(k=Be(f),e[0]=f,e[1]=k):k=e[1];const x=k;let p;e[2]!==l.id||e[3]!==l.slug||e[4]!==s?(p={connectionId:s,orgId:l.id,orgSlug:l.slug},e[2]=l.id,e[3]=l.slug,e[4]=s,e[5]=p):p=e[5];const n=pe(p);let u;e[6]!==l.id||e[7]!==s?(u=G.virtualMcpResources(s,l.id),e[6]=l.id,e[7]=s,e[8]=u):u=e[8];const d=u,[w,F]=C.useState("categories");let S;e[9]!==w?(S=()=>w,e[9]=w,e[10]=S):S=e[10];const _=C.useEffectEvent(S),D=C.useRef(null),v=C.useRef(!1),L=s??"default";let j;e[11]!==w||e[12]!==l.id||e[13]!==L?(j=["at-mention",l.id,L,w],e[11]=w,e[12]=l.id,e[13]=L,e[14]=j):j=e[14];const c=j;let m;e[15]!==o?(m=o("chat.mentionAt.agentsTitle"),e[15]=o,e[16]=m):m=e[16];let y;e[17]!==o?(y=o("chat.mentionAt.agentsDescription"),e[17]=o,e[18]=y):y=e[18];let P;e[19]!==m||e[20]!==y?(P={name:"agents",title:m,description:y,kind:"category",drillable:!0},e[19]=m,e[20]=y,e[21]=P):P=e[21];let M;e[22]!==o?(M=o("chat.mentionAt.resourcesTitle"),e[22]=o,e[23]=M):M=e[23];let I;e[24]!==o?(I=o("chat.mentionAt.resourcesDescription"),e[24]=o,e[25]=I):I=e[25];let T;e[26]!==M||e[27]!==I?(T={name:"resources",title:M,description:I,kind:"category",drillable:!0},e[26]=M,e[27]=I,e[28]=T):T=e[28];let U;e[29]!==T||e[30]!==P?(U=[P,T],e[29]=T,e[30]=P,e[31]=U):U=e[31];const q=U;let g;e[32]!==n||e[33]!==r||e[34]!==o?(g=async $=>{const{item:b,range:K}=$;if(O("chat_picker_item_selected",{picker:"@",item_kind:b.kind,item_name:b.name}),b.kind!=="category"&&(v.current=!0),b.kind==="category")return F(b.name==="agents"?"agents":"resources"),!1;if(b.kind==="agent"&&b.agentId){B(r,K,{id:b.agentId,name:b.name,metadata:{agentId:b.agentId,title:b.name},char:"@"}),F("categories");return}if(b.kind==="resource"&&b.uri&&n){try{const Q=await me(n,b.uri);B(r,K,{id:b.uri,name:b.uri,metadata:Q.contents,char:"@"})}catch(Q){console.error("[at-mention] Failed to fetch resource:",Q),N.error(o("chat.mentionAt.failedToLoadResource"))}F("categories");return}},e[32]=n,e[33]=r,e[34]=o,e[35]=g):g=e[35];const ee=g;let J;e[36]!==f||e[37]!==q||e[38]!==n||e[39]!==x||e[40]!==_||e[41]!==a||e[42]!==d||e[43]!==s?(J=async $=>{const{query:b}=$,K=_();if(K==="categories"){if(!b.trim())return q;const A=b.toLowerCase(),R=f.filter(E=>E.status==="active"&&(!E.id||!oe(E.id))&&!x.has(E.id)&&E.id!==s&&(E.title.toLowerCase().includes(A)||E.description?.toLowerCase().includes(A))).map(tt),Y=await(async()=>{if(!n)return[];let E=a.getQueryData(d);return E||(E=await a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4})),(E?.resources??[]).filter(re=>re.uri.toLowerCase().includes(A)||re.name?.toLowerCase().includes(A)||re.description?.toLowerCase().includes(A)).map(st)})();return[...R,...Y]}if(K==="agents"){let A=f.filter(R=>R.status==="active"&&(!R.id||!oe(R.id))&&!x.has(R.id)&&R.id!==s);if(b.trim()){const R=b.toLowerCase();A=A.filter(Y=>Y.title.toLowerCase().includes(R)||Y.description?.toLowerCase().includes(R))}return A.map(rt)}if(!n)return[];let Q=a.getQueryData(d);Q?a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4}).catch(nt):Q=await a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4});let X=Q?.resources??[];if(b.trim()){const A=b.toLowerCase();X=X.filter(R=>R.uri.toLowerCase().includes(A)||R.name?.toLowerCase().includes(A)||R.description?.toLowerCase().includes(A))}return X.map(ot)},e[36]=f,e[37]=q,e[38]=n,e[39]=x,e[40]=_,e[41]=a,e[42]=d,e[43]=s,e[44]=J):J=e[44];const te=J;let V;e[45]!==i?(V=$=>{if(i&&(i.current=$),$)D.current=Date.now(),v.current=!1,O("chat_picker_opened",{picker:"@"});else{const b=D.current;O("chat_picker_closed",{picker:"@",outcome:v.current?"selected":"dismissed",duration_ms:b?Date.now()-b:null}),D.current=null,F("categories")}},e[45]=i,e[46]=V):V=e[46];const se=V;let W;return e[47]!==r||e[48]!==te||e[49]!==ee||e[50]!==se||e[51]!==c?(W=h.jsx(fe,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:c,queryFn:te,onSelect:ee,onOpenChange:se}),e[47]=r,e[48]=te,e[49]=ee,e[50]=se,e[51]=c,e[52]=W):W=e[52],W};function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function rt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function nt(){}function ot(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function le(t,e,r,s,i,o,a){try{const l=await ge(r,s,o);B(t,e,{id:s,name:he(s,i),metadata:l.messages,char:"/",kind:"prompt",args:o})}catch(l){console.error("[slash] Failed to fetch prompt:",l),N.error(a.t("chat.mentionSlash.failedLoadPrompt"))}}async function it(t,e,r,s,i){try{const o=await me(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),N.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function at(t,e,r,s,i){try{const{files:o,omittedPaths:a}=await He(r,s.volume,s.path),l={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:a};B(t,e,{id:s.id,name:s.name,metadata:l,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),N.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const lt=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=Z(),i=de(),{org:o}=ue(),a=pe({connectionId:e,orgId:o.id,orgSlug:o.slug}),l=G.virtualMcpPrompts(e,o.id),f=G.virtualMcpResources(e,o.id),k=G.slashSkills(o.id),x=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),w=je(t);w&&(w.onEditChip=async c=>{if(a)try{const y=(await ce(i,l,a)).find(P=>P.name===c.promptId);if(!y?.arguments||y.arguments.length===0)return;d({...c,prompt:y})}catch(m){console.error("[slash] Failed to load prompt for editing:",m),N.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:c,range:m})=>{if(O("chat_picker_item_selected",{picker:"/",item_kind:c.kind,item_name:c.name}),S.current=!0,!!a)if(c.kind==="prompt"){if(c.arguments&&c.arguments.length>0){n({range:m,item:c});return}const y=ne(c._meta);await le(t,m,a,c.name,y,void 0,{t:s})}else c.kind==="skill"?c.skill&&await at(t,m,o.slug,c.skill,{t:s}):c.uri&&await it(t,m,a,c.uri,{t:s})},D=async c=>{if(!p||!a)return;const{range:m,item:y}=p,P=ne(y._meta);await le(t,m,a,y.name,P,c,{t:s}),n(null)},v=async c=>{if(!(!u||!a)){if(!Me(t,u.pos,u.promptId)){N.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const m=await ge(a,u.promptId,c),y=ne(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Re({id:u.promptId,name:he(u.promptId,y),metadata:m.messages,char:"/",kind:"prompt",args:c})).run(),O("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(m){console.error("[slash] Failed to update prompt:",m),N.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},L=async c=>{const{query:m}=c;if(!a)return[];const[y,P,M]=await Promise.all([ce(i,l,a),dt(i,f,a),ct(i,k,o.slug)]),I=m.trim().toLowerCase(),T=(y??[]).filter(g=>!I||g.name.toLowerCase().includes(I)||g.title?.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name,title:g.title,description:g.description,kind:"prompt",arguments:g.arguments,_meta:g._meta})),U=(P??[]).filter(g=>!I||g.uri.toLowerCase().includes(I)||g.name?.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name??g.uri,title:g.name,description:g.description,kind:"resource",uri:g.uri})),q=(M??[]).filter(g=>!I||g.name.toLowerCase().includes(I)||g.id.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name,title:g.name,description:g.description??void 0,kind:"skill",skill:g}));return[...T,...U,...q]},j=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(fe,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:x,queryFn:L,onSelect:_,onOpenChange:c=>{if(r&&(r.current=c),c)F.current=Date.now(),S.current=!1,O("chat_picker_opened",{picker:"/"});else{const m=F.current;O("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:m?Date.now()-m:null}),F.current=null}}}),h.jsx(ie,{prompt:j,setPrompt:()=>n(null),onSubmit:D}),h.jsx(ie,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:v,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ce(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>ae(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>ae(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function ct(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Je(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function dt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ye="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Qe.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Fe.configure({placeholder:()=>t.current??ye,showOnlyWhenEditable:!1}),Ne,Te]}function Ft({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:a,children:l}){const f=C.useRef(o),k=C.useRef(e),x=C.useRef(s),p=C.useRef(i),n=Le({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ye,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&x.current&&!a?.current?(d.preventDefault(),f.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{f.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{x.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Ae.Provider,{value:{editor:n},children:l})}function It(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:a,suggestionOpenRef:l,ref:f,className:k}=t,x=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:y=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(y)},syncVoiceText:(y,P)=>{if(n&&(n.commands.setContent(y||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:y=>{n&&n.commands.setContent(y||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(f??null,u,d),!n)return null;const w=x&&"cursor-not-allowed opacity-70",F=x&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==w||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",w,F),e[3]=k,e[4]=w,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Oe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const D=s??null;let v;e[10]!==n||e[11]!==l||e[12]!==D?(v=h.jsx(C.Suspense,{fallback:null,children:h.jsx(lt,{editor:n,virtualMcpId:D,suggestionOpenRef:l})}),e[10]=n,e[11]=l,e[12]=D,e[13]=v):v=e[13];const L=s??null;let j;e[14]!==n||e[15]!==l||e[16]!==L?(j=h.jsx(C.Suspense,{fallback:null,children:h.jsx(et,{editor:n,virtualMcpId:L,suggestionOpenRef:l})}),e[14]=n,e[15]=l,e[16]=L,e[17]=j):j=e[17];let c;e[18]!==x||e[19]!==n||e[20]!==a||e[21]!==o||e[22]!==p?(c=p&&o&&!x?h.jsx(Xe,{editor:n,selectedModel:o,onUnsupportedFile:a}):null,e[18]=x,e[19]=n,e[20]=a,e[21]=o,e[22]=p,e[23]=c):c=e[23];let m;return e[24]!==v||e[25]!==j||e[26]!==c||e[27]!==_?(m=h.jsxs(h.Fragment,{children:[_,v,j,c]}),e[24]=v,e[25]=j,e[26]=c,e[27]=_,e[28]=m):m=e[28],m}export{Ft as T,St as U,It as a,Ve as p,_t as u};
1
+ import{c as H,r as C,b as Z,j as h,t as N,a3 as xe,v as ke,aM as we,s as be,B as Pe,q as Ce,D as Se,o as de,a2 as ue,K as G,y as O,ex as me,ey as oe,ez as z,l as _e}from"./index-BoB02eW2.js";import{S as fe,s as Fe}from"./suggestion-BPVDnpZj.js";import{l as Ie,n as De,o as ve,f as B,p as je,P as ie,q as Me,c as Re,u as Le,r as Ae,e as Ee,j as Ne,F as Te,s as Qe,b as Oe}from"./usage-stats-DuvxTL2m.js";import{aV as Ue}from"./agent-icon-Bmu0Xuy8.js";import"./chat-context-C4pDshj1.js";import{m as $e,i as qe,b as Ke}from"./index-DuSo48nd.js";import{u as pe}from"./use-mcp-client-CEKqqblF.js";import{b as ze}from"./repository-binding-BYnKmLVI.js";import{l as Be}from"./use-project-native-view-presence-D12oGF6A.js";import{g as ne,s as he}from"./tool-namespace-pIFYrei5.js";import{l as ae,g as ge}from"./use-mcp-prompts-CwF-bqUg.js";import{f as He,a as Je}from"./use-org-fs-Wo4_O8nn.js";async function Ve(t,e,r,s,i,o){if(!$e(e)){N.error("Selected model does not support file uploads");return}const a=r.type||"application/octet-stream";if(!qe(a,e)){const f=Ke(e).parts.map(x=>o(x)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:f}):N.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${f}.`});return}const l=10*1024*1024;if(r.size>l){N.error(`File "${r.name}" exceeds 10MB limit`);return}try{const f=new FileReader,k=new Promise((n,u)=>{f.onload=()=>{const d=f.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const w=d.includes(",")?d.split(",")[1]??d:d;n(w)},f.onerror=u});f.readAsDataURL(r);const x=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:x};Ie(t,{from:s,to:s},p)}catch(f){console.error("Failed to process file:",f),N.error(`Failed to load file "${r.name}"`)}}function We(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const a=Array.from(i);return(async()=>{let l=o.pos;for(const f of a)await s(f,l),l=t.state.selection.to})(),!0}function Xe(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=Z(),a=C.useRef(Ge);let l,f;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(l=()=>{a.current=async(p,n)=>{await Ve(r,s,p,n,i,o)}},f=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=l,e[5]=f):(l=e[4],f=e[5]),C.useEffect(l,f);let k,x;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new ve({key:p,props:{handleDrop:(d,w,F,S)=>We(d,w,S,(_,D)=>a.current(_,D)),handlePaste:(d,w)=>{const F=w.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(Ye);return S.length===0?!1:(w.preventDefault(),(async()=>{let _=d.state.selection.from;for(const D of S){const v=D.getAsFile();v&&(await a.current?.(v,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},x=[r],e[6]=r,e[7]=k,e[8]=x):(k=e[7],x=e[8]),C.useEffect(k,x),null}function Ye(t){return t.kind==="file"}function Ge(){return Promise.resolve()}function St(t){const e=H.c(43),{info:r,onClose:s}=t,i=Z(),o=r!==null;let a;e[0]!==s?(a=I=>!I&&s(),e[0]=s,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=l):l=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:l.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=f):f=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(xe,{size:18})}),e[4]=k):k=e[4];let x;e[5]!==i?(x=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=x):x=e[6];let p;e[7]!==x?(p=h.jsx(ke,{className:"text-xl font-semibold tracking-tight",children:x}),e[7]=x,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let w;e[13]!==d||e[14]!==u?(w=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=w):w=e[15];let F;e[16]!==w||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[f,h.jsxs(be,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,w]})]})]}),e[16]=w,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let D;e[22]!==_?(D=h.jsx("div",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=D):D=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=v):v=e[24];const L=r?.accepted;let j;e[25]!==L?(j=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[v,h.jsx("span",{className:"capitalize",children:L})]}),e[25]=L,e[26]=j):j=e[26];let c;e[27]!==D||e[28]!==j?(c=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"rounded-xl border border-border p-4",children:[D,j]})}),e[27]=D,e[28]=j,e[29]=c):c=e[29];let m;e[30]!==i?(m=i("chat.uploader.gotIt"),e[30]=i,e[31]=m):m=e[31];let y;e[32]!==s||e[33]!==m?(y=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(Pe,{onClick:s,children:m})}),e[32]=s,e[33]=m,e[34]=y):y=e[34];let P;e[35]!==F||e[36]!==c||e[37]!==y?(P=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ze,children:[F,c,y]}),e[35]=F,e[36]=c,e[37]=y,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==a||e[41]!==P?(M=h.jsx(Se,{open:o,onOpenChange:a,children:P}),e[39]=o,e[40]=a,e[41]=P,e[42]=M):M=e[42],M}function Ze(t){return t.preventDefault()}function _t(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}const et=t=>{const e=H.c(53),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=Z(),a=de(),{org:l}=ue(),f=ze();let k;e[0]!==f?(k=Be(f),e[0]=f,e[1]=k):k=e[1];const x=k;let p;e[2]!==l.id||e[3]!==l.slug||e[4]!==s?(p={connectionId:s,orgId:l.id,orgSlug:l.slug},e[2]=l.id,e[3]=l.slug,e[4]=s,e[5]=p):p=e[5];const n=pe(p);let u;e[6]!==l.id||e[7]!==s?(u=G.virtualMcpResources(s,l.id),e[6]=l.id,e[7]=s,e[8]=u):u=e[8];const d=u,[w,F]=C.useState("categories");let S;e[9]!==w?(S=()=>w,e[9]=w,e[10]=S):S=e[10];const _=C.useEffectEvent(S),D=C.useRef(null),v=C.useRef(!1),L=s??"default";let j;e[11]!==w||e[12]!==l.id||e[13]!==L?(j=["at-mention",l.id,L,w],e[11]=w,e[12]=l.id,e[13]=L,e[14]=j):j=e[14];const c=j;let m;e[15]!==o?(m=o("chat.mentionAt.agentsTitle"),e[15]=o,e[16]=m):m=e[16];let y;e[17]!==o?(y=o("chat.mentionAt.agentsDescription"),e[17]=o,e[18]=y):y=e[18];let P;e[19]!==m||e[20]!==y?(P={name:"agents",title:m,description:y,kind:"category",drillable:!0},e[19]=m,e[20]=y,e[21]=P):P=e[21];let M;e[22]!==o?(M=o("chat.mentionAt.resourcesTitle"),e[22]=o,e[23]=M):M=e[23];let I;e[24]!==o?(I=o("chat.mentionAt.resourcesDescription"),e[24]=o,e[25]=I):I=e[25];let T;e[26]!==M||e[27]!==I?(T={name:"resources",title:M,description:I,kind:"category",drillable:!0},e[26]=M,e[27]=I,e[28]=T):T=e[28];let U;e[29]!==T||e[30]!==P?(U=[P,T],e[29]=T,e[30]=P,e[31]=U):U=e[31];const q=U;let g;e[32]!==n||e[33]!==r||e[34]!==o?(g=async $=>{const{item:b,range:K}=$;if(O("chat_picker_item_selected",{picker:"@",item_kind:b.kind,item_name:b.name}),b.kind!=="category"&&(v.current=!0),b.kind==="category")return F(b.name==="agents"?"agents":"resources"),!1;if(b.kind==="agent"&&b.agentId){B(r,K,{id:b.agentId,name:b.name,metadata:{agentId:b.agentId,title:b.name},char:"@"}),F("categories");return}if(b.kind==="resource"&&b.uri&&n){try{const Q=await me(n,b.uri);B(r,K,{id:b.uri,name:b.uri,metadata:Q.contents,char:"@"})}catch(Q){console.error("[at-mention] Failed to fetch resource:",Q),N.error(o("chat.mentionAt.failedToLoadResource"))}F("categories");return}},e[32]=n,e[33]=r,e[34]=o,e[35]=g):g=e[35];const ee=g;let J;e[36]!==f||e[37]!==q||e[38]!==n||e[39]!==x||e[40]!==_||e[41]!==a||e[42]!==d||e[43]!==s?(J=async $=>{const{query:b}=$,K=_();if(K==="categories"){if(!b.trim())return q;const A=b.toLowerCase(),R=f.filter(E=>E.status==="active"&&(!E.id||!oe(E.id))&&!x.has(E.id)&&E.id!==s&&(E.title.toLowerCase().includes(A)||E.description?.toLowerCase().includes(A))).map(tt),Y=await(async()=>{if(!n)return[];let E=a.getQueryData(d);return E||(E=await a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4})),(E?.resources??[]).filter(re=>re.uri.toLowerCase().includes(A)||re.name?.toLowerCase().includes(A)||re.description?.toLowerCase().includes(A)).map(st)})();return[...R,...Y]}if(K==="agents"){let A=f.filter(R=>R.status==="active"&&(!R.id||!oe(R.id))&&!x.has(R.id)&&R.id!==s);if(b.trim()){const R=b.toLowerCase();A=A.filter(Y=>Y.title.toLowerCase().includes(R)||Y.description?.toLowerCase().includes(R))}return A.map(rt)}if(!n)return[];let Q=a.getQueryData(d);Q?a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4}).catch(nt):Q=await a.fetchQuery({queryKey:d,queryFn:()=>z(n),staleTime:6e4});let X=Q?.resources??[];if(b.trim()){const A=b.toLowerCase();X=X.filter(R=>R.uri.toLowerCase().includes(A)||R.name?.toLowerCase().includes(A)||R.description?.toLowerCase().includes(A))}return X.map(ot)},e[36]=f,e[37]=q,e[38]=n,e[39]=x,e[40]=_,e[41]=a,e[42]=d,e[43]=s,e[44]=J):J=e[44];const te=J;let V;e[45]!==i?(V=$=>{if(i&&(i.current=$),$)D.current=Date.now(),v.current=!1,O("chat_picker_opened",{picker:"@"});else{const b=D.current;O("chat_picker_closed",{picker:"@",outcome:v.current?"selected":"dismissed",duration_ms:b?Date.now()-b:null}),D.current=null,F("categories")}},e[45]=i,e[46]=V):V=e[46];const se=V;let W;return e[47]!==r||e[48]!==te||e[49]!==ee||e[50]!==se||e[51]!==c?(W=h.jsx(fe,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:c,queryFn:te,onSelect:ee,onOpenChange:se}),e[47]=r,e[48]=te,e[49]=ee,e[50]=se,e[51]=c,e[52]=W):W=e[52],W};function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}function rt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function nt(){}function ot(t){return{name:t.name??t.uri,title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function le(t,e,r,s,i,o,a){try{const l=await ge(r,s,o);B(t,e,{id:s,name:he(s,i),metadata:l.messages,char:"/",kind:"prompt",args:o})}catch(l){console.error("[slash] Failed to fetch prompt:",l),N.error(a.t("chat.mentionSlash.failedLoadPrompt"))}}async function it(t,e,r,s,i){try{const o=await me(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),N.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function at(t,e,r,s,i){try{const{files:o,omittedPaths:a}=await He(r,s.volume,s.path),l={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:a};B(t,e,{id:s.id,name:s.name,metadata:l,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),N.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const lt=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=Z(),i=de(),{org:o}=ue(),a=pe({connectionId:e,orgId:o.id,orgSlug:o.slug}),l=G.virtualMcpPrompts(e,o.id),f=G.virtualMcpResources(e,o.id),k=G.slashSkills(o.id),x=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),w=je(t);w&&(w.onEditChip=async c=>{if(a)try{const y=(await ce(i,l,a)).find(P=>P.name===c.promptId);if(!y?.arguments||y.arguments.length===0)return;d({...c,prompt:y})}catch(m){console.error("[slash] Failed to load prompt for editing:",m),N.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:c,range:m})=>{if(O("chat_picker_item_selected",{picker:"/",item_kind:c.kind,item_name:c.name}),S.current=!0,!!a)if(c.kind==="prompt"){if(c.arguments&&c.arguments.length>0){n({range:m,item:c});return}const y=ne(c._meta);await le(t,m,a,c.name,y,void 0,{t:s})}else c.kind==="skill"?c.skill&&await at(t,m,o.slug,c.skill,{t:s}):c.uri&&await it(t,m,a,c.uri,{t:s})},D=async c=>{if(!p||!a)return;const{range:m,item:y}=p,P=ne(y._meta);await le(t,m,a,y.name,P,c,{t:s}),n(null)},v=async c=>{if(!(!u||!a)){if(!Me(t,u.pos,u.promptId)){N.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const m=await ge(a,u.promptId,c),y=ne(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Re({id:u.promptId,name:he(u.promptId,y),metadata:m.messages,char:"/",kind:"prompt",args:c})).run(),O("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(m){console.error("[slash] Failed to update prompt:",m),N.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},L=async c=>{const{query:m}=c;if(!a)return[];const[y,P,M]=await Promise.all([ce(i,l,a),dt(i,f,a),ct(i,k,o.slug)]),I=m.trim().toLowerCase(),T=(y??[]).filter(g=>!I||g.name.toLowerCase().includes(I)||g.title?.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name,title:g.title,description:g.description,kind:"prompt",arguments:g.arguments,_meta:g._meta})),U=(P??[]).filter(g=>!I||g.uri.toLowerCase().includes(I)||g.name?.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name??g.uri,title:g.name,description:g.description,kind:"resource",uri:g.uri})),q=(M??[]).filter(g=>!I||g.name.toLowerCase().includes(I)||g.id.toLowerCase().includes(I)||g.description?.toLowerCase().includes(I)).map(g=>({name:g.name,title:g.name,description:g.description??void 0,kind:"skill",skill:g}));return[...T,...U,...q]},j=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(fe,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:x,queryFn:L,onSelect:_,onOpenChange:c=>{if(r&&(r.current=c),c)F.current=Date.now(),S.current=!1,O("chat_picker_opened",{picker:"/"});else{const m=F.current;O("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:m?Date.now()-m:null}),F.current=null}}}),h.jsx(ie,{prompt:j,setPrompt:()=>n(null),onSubmit:D}),h.jsx(ie,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:v,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ce(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>ae(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>ae(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function ct(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Je(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function dt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ye="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Qe.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Fe.configure({placeholder:()=>t.current??ye,showOnlyWhenEditable:!1}),Ne,Te]}function Ft({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:a,children:l}){const f=C.useRef(o),k=C.useRef(e),x=C.useRef(s),p=C.useRef(i),n=Le({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ye,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[15px] p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&x.current&&!a?.current?(d.preventDefault(),f.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{f.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{x.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Ae.Provider,{value:{editor:n},children:l})}function It(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:a,suggestionOpenRef:l,ref:f,className:k}=t,x=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:y=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(y)},syncVoiceText:(y,P)=>{if(n&&(n.commands.setContent(y||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:y=>{n&&n.commands.setContent(y||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(f??null,u,d),!n)return null;const w=x&&"cursor-not-allowed opacity-70",F=x&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==w||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",w,F),e[3]=k,e[4]=w,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Oe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const D=s??null;let v;e[10]!==n||e[11]!==l||e[12]!==D?(v=h.jsx(C.Suspense,{fallback:null,children:h.jsx(lt,{editor:n,virtualMcpId:D,suggestionOpenRef:l})}),e[10]=n,e[11]=l,e[12]=D,e[13]=v):v=e[13];const L=s??null;let j;e[14]!==n||e[15]!==l||e[16]!==L?(j=h.jsx(C.Suspense,{fallback:null,children:h.jsx(et,{editor:n,virtualMcpId:L,suggestionOpenRef:l})}),e[14]=n,e[15]=l,e[16]=L,e[17]=j):j=e[17];let c;e[18]!==x||e[19]!==n||e[20]!==a||e[21]!==o||e[22]!==p?(c=p&&o&&!x?h.jsx(Xe,{editor:n,selectedModel:o,onUnsupportedFile:a}):null,e[18]=x,e[19]=n,e[20]=a,e[21]=o,e[22]=p,e[23]=c):c=e[23];let m;return e[24]!==v||e[25]!==j||e[26]!==c||e[27]!==_?(m=h.jsxs(h.Fragment,{children:[_,v,j,c]}),e[24]=v,e[25]=j,e[26]=c,e[27]=_,e[28]=m):m=e[28],m}export{Ft as T,St as U,It as a,Ve as p,_t as u};