decocms 4.613.3 → 4.614.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (433) hide show
  1. package/dist/client/assets/{AlertCircle-DwSzq5uM.js → AlertCircle-DAO8Cblw.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BD53lHXN.js → AreaChart-DmQd6PSL.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BqHCgh-K.js → ArrowLeft-CT2LzszE.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BTBfkPne.js → ArrowRight-pWGgV3sk.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CZDDSEah.js → ArrowUp-BJQg9AA1.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-C9k43IqJ.js → BookOpen01-NJdRqnsB.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-CEwlJSS3.js → CartesianChart-vfIUAkaA.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-BxKUKwEU.js → CategoricalChart-vKY4cy0c.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CQXVMLht.js → CheckCircle-TiszLk0g.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-OTI5djzn.js → ChevronDown-DLp4f_Dh.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-rhJDM4Rj.js → ChevronSelectorVertical-CWnQQEhh.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-B1aDls8C.js → ChevronUp-CWIsOhVe.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BRLPBJsI.js → CreditCard01-Cup3kK-t.js} +1 -1
  14. package/dist/client/assets/{Eye-B7bHPNlI.js → Eye-CpYkFfrM.js} +1 -1
  15. package/dist/client/assets/{File02-C0PbxigR.js → File02-DIeMsRip.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-CgXsJGLm.js → Fingerprint04-DHrTMQWz.js} +1 -1
  17. package/dist/client/assets/{Globe04-BigCPaEo.js → Globe04-B3z7rCIS.js} +1 -1
  18. package/dist/client/assets/{Image01-R03ky3hy.js → Image01-c7d3c0NN.js} +1 -1
  19. package/dist/client/assets/{Key01-BKbEnhve.js → Key01-B4doqhLg.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-CwLIeRIW.js → LayoutLeft-W1QrQNCQ.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-30jdc1Ee.js → LinkBroken01-B1J8elNo.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-DzETEiuY.js → MessageCircle01-B4uczpCj.js} +1 -1
  23. package/dist/client/assets/{Minus-CJw7hyKt.js → Minus-CjA8gEfB.js} +1 -1
  24. package/dist/client/assets/{Monitor01-CILX5aJF.js → Monitor01-Sf2_a_zw.js} +1 -1
  25. package/dist/client/assets/{Play-CupXu5V-.js → Play-BoXUJR8B.js} +1 -1
  26. package/dist/client/assets/{Plus-johmxWOE.js → Plus-C9Aly22c.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-c20DchWo.js → ReferenceLine-CN7wd2Ky.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BF4D-OIS.js → SearchMd-BGdlYs4L.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-BeLSpVUq.js → ShoppingBag01-Csv6OfPx.js} +1 -1
  30. package/dist/client/assets/{Sun-Dionl9S8.js → Sun-BV3Rjj5o.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-DbeDoxGW.js → SwitchHorizontal01-BypmkJpL.js} +1 -1
  32. package/dist/client/assets/{Tool01-m86Phkll.js → Tool01-AKltE4in.js} +1 -1
  33. package/dist/client/assets/{Tooltip-CVw2D6V4.js → Tooltip-CCQIZeI4.js} +1 -1
  34. package/dist/client/assets/{Trash01-CEWo4AIU.js → Trash01-BIsikoZ9.js} +1 -1
  35. package/dist/client/assets/{Upload01-sC3bIoAL.js → Upload01-KlZn1WFA.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-C8hLtzy2.js → UserCheck01--3bpkFxi.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BhtzcYE8.js → UserSquare-DQ1GTm9S.js} +1 -1
  38. package/dist/client/assets/{Users01-CDP9kGkf.js → Users01-1IU76HkK.js} +1 -1
  39. package/dist/client/assets/{XClose-BMX-96qf.js → XClose-DjYKMVV7.js} +1 -1
  40. package/dist/client/assets/{Zap-qmAhMIUT.js → Zap-CAuzJCQQ.js} +1 -1
  41. package/dist/client/assets/{access-gate-CGN7GdVX.js → access-gate-BjKwrEoi.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-h-WyH-Sw.js → add-connection-dialog-BhDktSiS.js} +1 -1
  43. package/dist/client/assets/agent-app-0w4aCRlp.js +1 -0
  44. package/dist/client/assets/{agent-assets-Df94PYf8.js → agent-assets-C3ECJx34.js} +1 -1
  45. package/dist/client/assets/{agent-automation-Z7tLCfNl.js → agent-automation-Bcjl85RL.js} +1 -1
  46. package/dist/client/assets/{agent-automations-CVFz5oDL.js → agent-automations-B2eTQS99.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Q_WLGWXC.js → agent-blog-Cye4FB7J.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-iwA32IPU.js → agent-blog-post-BDlwkMB5.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-CiI2Xczo.js → agent-business-case-BHzosbfk.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-CqR5W-Hq.js → agent-calendar-C7jxdDxm.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-DXLNgo1M.js → agent-capabilities-CqBL254L.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-CvAK-T0n.js → agent-connect-sources-BgiXxdZo.js} +1 -1
  53. package/dist/client/assets/agent-deck-CD3LQQ2o.js +1 -0
  54. package/dist/client/assets/{agent-e2e-DByjXXAj.js → agent-e2e-CRkMEwdK.js} +1 -1
  55. package/dist/client/assets/agent-experiments-BANE_Vte.js +1 -0
  56. package/dist/client/assets/agent-file-h2ha3iyY.js +1 -0
  57. package/dist/client/assets/{agent-hosting-DixRZ6Ox.js → agent-hosting-DSGfXe7D.js} +1 -1
  58. package/dist/client/assets/{agent-icon-Cm7N0-bv.js → agent-icon-0bk2UcIS.js} +1 -1
  59. package/dist/client/assets/agent-library-BlVrt-Mh.js +1 -0
  60. package/dist/client/assets/agent-library-file-DA1vwjxZ.js +1 -0
  61. package/dist/client/assets/agent-overview-BzPLYj0I.js +1 -0
  62. package/dist/client/assets/{agent-releases-DKxTF8La.js → agent-releases-aK-8TPYt.js} +1 -1
  63. package/dist/client/assets/agent-settings-BHHaGITT.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-CtRdDBZU.js → agent-site-editor-CdKQGd7Z.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-B18xGY1I.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-BTzSjidc.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-CsSmNnGy.js +1 -0
  68. package/dist/client/assets/agent-view-D-JWIh6v.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-ChA4W9VC.js → agent-view-guard-DqvQ1F6B.js} +1 -1
  70. package/dist/client/assets/{ai-providers-BH-Mkyt5.js → ai-providers-BeS15LZf.js} +1 -1
  71. package/dist/client/assets/{alert-DgZIrBNI.js → alert-B4E-pz_8.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-CJWXX2N_.js → analytics-sections-Ds7eb47h.js} +1 -1
  73. package/dist/client/assets/api-keys-C9noRsfE.js +1 -0
  74. package/dist/client/assets/{api-keys-CN9LMJJs.js → api-keys-Ca0zqoWz.js} +1 -1
  75. package/dist/client/assets/{app-editor-Dz4PZ47n.js → app-editor-BrH3BC5S.js} +1 -1
  76. package/dist/client/assets/{asset-utils-BcZMmAKN.js → asset-utils-CTNjcxfT.js} +1 -1
  77. package/dist/client/assets/{auth-BkXZCqsk.js → auth-Cp8AG92B.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-FGnFebpX.js → auth-catchall-D0SukS2x.js} +1 -1
  79. package/dist/client/assets/{auth-entry-DheEywcr.js → auth-entry-eEnICvFw.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-C39QkJ1e.js → auth-split-layout-CdXFMg0a.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-DMrLBEfk.js → authenticate-and-persist-oauth-CbpIFClV.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-u4x0HVUA.js → automation-list-row-BrsDauKw.js} +1 -1
  83. package/dist/client/assets/{automation-runs-Bxcc51_7.js → automation-runs-dj99ZHlz.js} +1 -1
  84. package/dist/client/assets/{automations-DqoZex8a.js → automations-DLNV1FeW.js} +1 -1
  85. package/dist/client/assets/{badge-DmhY0k4f.js → badge-MSgPF8i6.js} +1 -1
  86. package/dist/client/assets/{block-document-BCK6nqqi.js → block-document-d5qeh-5R.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-Brgl0CqW.js → blocks-preview-workspace-context-k6_o_sTg.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-C_JjB7qS.js → blocks-tab-states-C8EhNA94.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-CSpGUPLK.js → blog-preview-url-Bd4vzpOU.js} +1 -1
  90. package/dist/client/assets/{blog-schema-B63sQwVb.js → blog-schema-96Hbg5pM.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate-ChaoFSM3.js → blog-source-gate-CVk34e-_.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-BsZjR7OR.js → blog-view-gate-B2RpRsK5.js} +1 -1
  93. package/dist/client/assets/{buckets-DJk6e03b.js → buckets-CxKFg1Rq.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-CEwC-USg.js → build-improve-prompt-doc-D2jdOkRZ.js} +1 -1
  95. package/dist/client/assets/{calendar-CXb62Hgf.js → calendar-BvlMTEJz.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-XyENamfv.js → capability-load-error-BIP7OfRW.js} +1 -1
  97. package/dist/client/assets/{category-editor-DeOWsUFX.js → category-editor-B6OhTBuY.js} +1 -1
  98. package/dist/client/assets/{category-tree-CdjA43Kw.js → category-tree-CfcuYGq1.js} +1 -1
  99. package/dist/client/assets/{chart-BySfFX3r.js → chart-qPtsM-po.js} +1 -1
  100. package/dist/client/assets/{chat-context-BDbYH6DU.js → chat-context-DjT4b8lQ.js} +1 -1
  101. package/dist/client/assets/{chat-draft-Cf1fheTV.js → chat-draft-CCkjIQCm.js} +1 -1
  102. package/dist/client/assets/{checkbox-CWIVoQk6.js → checkbox-DDfyr6g6.js} +1 -1
  103. package/dist/client/assets/{choose-editor-I1gZeGh6.js → choose-editor-C7Ola2VR.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-DsudtvYn.js → cli-auth-success-Cd8H0jhw.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-C7sCBTXN.js → cms-settings-editor-DUScdF0j.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-B0qG7N7H.js → cms-store-drafts-713r2LTs.js} +1 -1
  107. package/dist/client/assets/{collapsible-GnB05mZz.js → collapsible-B2z4b61B.js} +1 -1
  108. package/dist/client/assets/{collection-detail-DpT77Jlo.js → collection-detail-BXtc6ekK.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-DRdttbaG.js → collection-display-button-TJREQ-hZ.js} +1 -1
  110. package/dist/client/assets/{collection-search-mwRnJ2oa.js → collection-search-DMUeYNum.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-CcMxgrQ8.js → collection-table-wrapper-Blb8NJFf.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-D7Vo1f2S.js → collection-tabs-DXVhkE7f.js} +1 -1
  113. package/dist/client/assets/{combobox-LXt8RcDA.js → combobox-DBLqJQwK.js} +1 -1
  114. package/dist/client/assets/{command-rigJJqHv.js → command-CMA98G_b.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-BWd1ZX2P.js → companion-mcps-section-C6ssP1JL.js} +1 -1
  116. package/dist/client/assets/{config-il-mrtJw.js → config-DmE-h3o5.js} +1 -1
  117. package/dist/client/assets/{connect-BjfkeFfN.js → connect-BC31DKmL.js} +1 -1
  118. package/dist/client/assets/{connect-key-8z4sGhvS.js → connect-key-CPt8mh8U.js} +1 -1
  119. package/dist/client/assets/{connect-layout-dfKj_tQM.js → connect-layout-DKIHuML_.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-Dd9Ks3Aq.js → connect-source-dialog-fXZLh_sB.js} +1 -1
  121. package/dist/client/assets/{connection-B5sc0Bj4.js → connection-BwZ4lmw2.js} +1 -1
  122. package/dist/client/assets/{connection-card-Dboxtv4i.js → connection-card-BPzewKTU.js} +1 -1
  123. package/dist/client/assets/{connection-detail-BJbT2Bph.js → connection-detail-TaI_RvqN.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-BJ4Q7lAD.js → connection-form-helpers-Dh-UO47F.js} +1 -1
  125. package/dist/client/assets/{connection-slug-9VOx21AD.js → connection-slug-RL5I0rfj.js} +1 -1
  126. package/dist/client/assets/{connections-ec2e5SmP.js → connections-DGerGDKv.js} +1 -1
  127. package/dist/client/assets/{content-changes-Daox6Zqr.js → content-changes-CHbng7Fl.js} +1 -1
  128. package/dist/client/assets/{content-tab-C2FpsooE.js → content-tab-n2PFPVPw.js} +3 -3
  129. package/dist/client/assets/{context-BcF0ky01.js → context-3oFD507u.js} +1 -1
  130. package/dist/client/assets/{context-menu-D12azdee.js → context-menu-DIpwBrgd.js} +1 -1
  131. package/dist/client/assets/{context-shell-D8-sF_A1.js → context-shell-CNgVrDrh.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-CSi6V0lf.js → create-organization-dialog-CxHpYFD9.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-DAnz5NH_.js → daily-pulse-B1DjserV.js} +1 -1
  134. package/dist/client/assets/{delete-copy-Z7_PHxsx.js → delete-copy-DzXdPBt9.js} +1 -1
  135. package/dist/client/assets/{device-hint-CQvIrenj.js → device-hint-BAwO2-11.js} +1 -1
  136. package/dist/client/assets/{discover-j1IgHy2y.js → discover-Cy4nx0DQ.js} +1 -1
  137. package/dist/client/assets/{domain-settings-_2XhzV61.js → domain-settings-CfCFdjWH.js} +1 -1
  138. package/dist/client/assets/{drawer-CifkTfym.js → drawer--TAK3w4e.js} +1 -1
  139. package/dist/client/assets/{editor-DRWbb7ul.js → editor-Di-PiOHZ.js} +1 -1
  140. package/dist/client/assets/{editor-classes-Ctf0rBwH.js → editor-classes-DoqQAPex.js} +1 -1
  141. package/dist/client/assets/{empty-state-Cnb10iC_.js → empty-state-BxQvC8dr.js} +1 -1
  142. package/dist/client/assets/{empty-state-CMB0iVjA.js → empty-state-DVbcNWDh.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-DuGJxhlA.js → experiments-tab-choice-H9XZQm5N.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-DG39hguA.js → extract-connection-data-BIXY1F36.js} +1 -1
  145. package/dist/client/assets/{feature-gate-CHmgAE37.js → feature-gate-CPiqJcA7.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-DQ4EONHv.js → feature-paywall-DInbXGdg.js} +1 -1
  147. package/dist/client/assets/{file-explorer-sCulZW_U.js → file-explorer-YURfBwo8.js} +1 -1
  148. package/dist/client/assets/{file-preview-DH8J73Em.js → file-preview-69js7s8F.js} +1 -1
  149. package/dist/client/assets/{file-share-button-srSYNesY.js → file-share-button-CKuUsk2M.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-CXoLbYfz.js → file-type-icon-DNMrvTXh.js} +1 -1
  151. package/dist/client/assets/{folder-icon-XXOdM5DT.js → folder-icon-Sye7ezIF.js} +1 -1
  152. package/dist/client/assets/{form-Dm1g6Sbo.js → form-DPvjiqhu.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-BpxU-y8L.js → frame-navigation-A0LVte-y.js} +1 -1
  154. package/dist/client/assets/{gateway-client-C3ZU5-_v.js → gateway-client-BZYQ57Xz.js} +1 -1
  155. package/dist/client/assets/{general-eb4TYqVd.js → general-D2mCv6M6.js} +1 -1
  156. package/dist/client/assets/{github-icon-BHk-XZWW.js → github-icon-Csyi9aVw.js} +1 -1
  157. package/dist/client/assets/{held-block-view-YD6GermY.js → held-block-view-Cz6SKldK.js} +1 -1
  158. package/dist/client/assets/{home-DVWg_gYi.js → home-Cbai8otj.js} +1 -1
  159. package/dist/client/assets/{home-overview-C3xphs6Y.js → home-overview-Beeq-x1h.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-Cz6xDabT.js → hosted-reconcile-BmTwITCX.js} +1 -1
  161. package/dist/client/assets/{icon-button-Ymzn1_Ie.js → icon-button-T38urafn.js} +1 -1
  162. package/dist/client/assets/{index-zaRScPY5.js → index-B4as1hxW.js} +1 -1
  163. package/dist/client/assets/{index-CeUTayYv.js → index-BBtvnV78.js} +1 -1
  164. package/dist/client/assets/{index-CSaPdF21.js → index-BRpTnqSP.js} +1 -1
  165. package/dist/client/assets/{index-toeooV8r.js → index-BTqCAGGA.js} +1 -1
  166. package/dist/client/assets/{index-iIIvyJfN.js → index-Bg2Sq8-p.js} +1 -1
  167. package/dist/client/assets/{index-OSvXQU0Z.js → index-BmFua4_V.js} +3 -3
  168. package/dist/client/assets/{index-C5XlOPVN.js → index-CEvi6MRf.js} +1 -1
  169. package/dist/client/assets/{index-B_ZZ_ftJ.js → index-CHJQo1pu.js} +1 -1
  170. package/dist/client/assets/{index-CTs6ZjMn.js → index-CObSRL90.js} +1 -1
  171. package/dist/client/assets/{index-At64nru8.js → index-CekzbOTN.js} +1 -1
  172. package/dist/client/assets/{index-DTEDDR1x.js → index-CufGYOzR.js} +1 -1
  173. package/dist/client/assets/{index-CENCioIm.js → index-D0kUoV3I.js} +1 -1
  174. package/dist/client/assets/{index-STwqHwlO.js → index-D1g4VlMb.js} +1 -1
  175. package/dist/client/assets/{index-Chk8S0_L.js → index-De6pkEUU.js} +1 -1
  176. package/dist/client/assets/{index-DNIV4h16.js → index-j19Cnreh.js} +1 -1
  177. package/dist/client/assets/{index-alfYFaP0.js → index-qLQc7GJ9.js} +1 -1
  178. package/dist/client/assets/{index-redirect-DXdV-rZ5.js → index-redirect-BURqf7qm.js} +1 -1
  179. package/dist/client/assets/{index-UuYqkkEe.js → index-vb6x8krx.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-Db0Zh8ks.js → infiniteQueryObserver-B07wc3gz.js} +1 -1
  181. package/dist/client/assets/{infra-billing-CDiZ6RBn.js → infra-billing-mI9_ZX9w.js} +1 -1
  182. package/dist/client/assets/{input-BpOitAQg.js → input-BtWx1h9I.js} +3 -3
  183. package/dist/client/assets/{input-CkzjHKcN.js → input-SdMF8jO-.js} +1 -1
  184. package/dist/client/assets/{integration-icon-TVRwnFcy.js → integration-icon-CgXZyLPZ.js} +1 -1
  185. package/dist/client/assets/{item-actions-D8EmGNrI.js → item-actions-CsyJY4hq.js} +1 -1
  186. package/dist/client/assets/{jira-icon-CF5qhLpK.js → jira-icon-c5TocDCn.js} +1 -1
  187. package/dist/client/assets/{label-Csx-3v8Y.js → label-DLrqdV8m.js} +1 -1
  188. package/dist/client/assets/{layout-DAB63K2K.js → layout-CAAWA3dA.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-fjHNTqEg.js → legacy-admin-welcome-dialog-DE1LU3w1.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-BdnWN3od.js → legacy-agents-deep-DuAPkgg8.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-1UI05rOH.js → legacy-main-redirect-DTLo_Dyv.js} +1 -1
  192. package/dist/client/assets/library-DsCGjda2.js +1 -0
  193. package/dist/client/assets/{library-tab-D5IKmTiY.js → library-tab-DeUw_4zK.js} +1 -1
  194. package/dist/client/assets/{login-DurVWD8e.js → login-C2y7Yh92.js} +1 -1
  195. package/dist/client/assets/{markdown-BxJxdoCM.js → markdown-BFHFiMsu.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-Cy0OmtCt.js → mcp-app-renderer-BElODDsa.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-B2OKeCmx.js → mcp-oauth-ac-uLk4g.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-CEDOnwdg.js → mcp-oauth-rLBhBYCb.js} +1 -1
  199. package/dist/client/assets/{members-D4FMAnpu.js → members-Cx0v1fnV.js} +1 -1
  200. package/dist/client/assets/{memory-CztvH23y.js → memory-CUyoxZNc.js} +1 -1
  201. package/dist/client/assets/{mock-board-ByTUxseS.js → mock-board-a3EqpDi2.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-AMxo4H5W.js → monaco-editor-B_7PVA6R.js} +1 -1
  203. package/dist/client/assets/{monitoring-BNFgFK2o.js → monitoring-DO5IV-Bu.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-uNSiwzjZ.js → monitoring-stats-row-BrQLx0B-.js} +1 -1
  205. package/dist/client/assets/{multi-select-BHamke2v.js → multi-select-D7EVDx2J.js} +1 -1
  206. package/dist/client/assets/{mustache-Bc9Tx8tY.js → mustache-Q6yQ8khe.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-vLZOuWhm.js → named-rule-step-CFoc5qUE.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-sostnkLf.js → named-rule-view-DO9utpu1.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-DrWLNe2p.js → new-project-dialog-BZK8ka6l.js} +1 -1
  210. package/dist/client/assets/{new-project-store-_S8_LTiv.js → new-project-store-DwU6DopG.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-CanDqu36.js → oauth-callback-CNfYP0kC.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-dMtvFATR.js → oauth-callback-ai-provider-C2uXF8m_.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-BxpWlIkU.js → oauth-consent-CllrUvYR.js} +1 -1
  214. package/dist/client/assets/{onboarding-D8AU4sYt.js → onboarding-DhXbs-fH.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-jrE_WTun.js → openai-conversation-CD5iNQyb.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DhZJfXDY.js → optimistic-project-sidebar-views-BOWGMupL.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-Bl63d_Ae.js → order-monitor-day-Bg7cKKH8.js} +1 -1
  218. package/dist/client/assets/{organization-choice-BwdPygLb.js → organization-choice-AvOqhGWN.js} +1 -1
  219. package/dist/client/assets/{orgs-C-asS8ND.js → orgs-Djb91Ddh.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-C9hEP3RU.js → own-accounts-section-DY05KyFR.js} +1 -1
  221. package/dist/client/assets/{pair-CDFcpsxO.js → pair-DwdNU8in.js} +1 -1
  222. package/dist/client/assets/{parse-sections-3NET4EaN.js → parse-sections-BfJ0En-V.js} +2 -2
  223. package/dist/client/assets/plan-DsJjzSpH.js +1 -0
  224. package/dist/client/assets/{plan-ladder-C250kgCs.js → plan-ladder-k40NveZy.js} +1 -1
  225. package/dist/client/assets/{plan-page-i6tfsurE.js → plan-page-BWctllEJ.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-CnkpfdI0.js → plan-usage-card-BQXVDdHv.js} +1 -1
  227. package/dist/client/assets/{popover-DOi1uePA.js → popover-DXE2ZxJe.js} +1 -1
  228. package/dist/client/assets/{post-calendar-DgGZhgGv.js → post-calendar-DnnzK0Zf.js} +1 -1
  229. package/dist/client/assets/{post-editor-DKlt5QP3.js → post-editor-CLcH6e9N.js} +1 -1
  230. package/dist/client/assets/{preview-content-db_uBwtX.js → preview-content-Bz-He8KU.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-BH5MI3Sd.js → preview-dialog-wmutK6r5.js} +1 -1
  232. package/dist/client/assets/{preview-panel-CIuV7b2g.js → preview-panel-BLn0wZ0O.js} +1 -1
  233. package/dist/client/assets/{preview-tab-Df_p6W4Z.js → preview-tab-DQ9iO25O.js} +3 -3
  234. package/dist/client/assets/{primitives-EwKHIcqR.js → primitives-DhPOvKh2.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-DNGksfut.js → product-picker-dialog-CU4RdL1t.js} +1 -1
  236. package/dist/client/assets/{profile-DfYCpILk.js → profile-z_q_kXbV.js} +1 -1
  237. package/dist/client/assets/{project-app-view-C5iOrsaX.js → project-app-view-B-aHXB5j.js} +1 -1
  238. package/dist/client/assets/{project-apps-Dgu7yO2X.js → project-apps-BjG-gQ2D.js} +1 -1
  239. package/dist/client/assets/{project-icon-Cmr6SrmT.js → project-icon-DQECQJRO.js} +1 -1
  240. package/dist/client/assets/{project-index-UVS3LS58.js → project-index-Bh9jfwR8.js} +1 -1
  241. package/dist/client/assets/project-reports-Bj7jiUWg.js +1 -0
  242. package/dist/client/assets/project-tasks-BXiKvYiD.js +1 -0
  243. package/dist/client/assets/{projects-vboChuyD.js → projects-BSlWm-Wh.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-BlZ1lAtQ.js → projects-empty-state-CPzIeLmU.js} +1 -1
  245. package/dist/client/assets/{prompts-BIVHYAhc.js → prompts-PfNwUNQI.js} +1 -1
  246. package/dist/client/assets/record-editor-CjhnirQn.js +1 -0
  247. package/dist/client/assets/{redirect-editor-DZ5LR0gN.js → redirect-editor-DPFYJLy_.js} +1 -1
  248. package/dist/client/assets/reports-DIz5OTLp.js +1 -0
  249. package/dist/client/assets/{reports-BgSi_02d.js → reports-_AG0d3B_.js} +1 -1
  250. package/dist/client/assets/{reports-onboarding-BkyvTqGD.js → reports-onboarding-DVc0ggVW.js} +1 -1
  251. package/dist/client/assets/{reports-tab-CEGg1mRb.js → reports-tab-CkaQ9mZO.js} +2 -2
  252. package/dist/client/assets/{repositories-Bb18737J.js → repositories-BY5EZJ6Z.js} +1 -1
  253. package/dist/client/assets/repositories-DGImKazf.js +1 -0
  254. package/dist/client/assets/{repository-binding-DWcsSj-q.js → repository-binding-CabkwAHk.js} +1 -1
  255. package/dist/client/assets/{repository-picker-CG8_WRxv.js → repository-picker-C5foJ37k.js} +1 -1
  256. package/dist/client/assets/{require-capability-vv-HxE0s.js → require-capability-FySDF95c.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-DtSikKoO.js → required-auth-layout-BPH0ESw7.js} +1 -1
  258. package/dist/client/assets/{reset-password-g8uRff77.js → reset-password-Xt58kreD.js} +1 -1
  259. package/dist/client/assets/{resizable-Ci9A7w1l.js → resizable-CD_IWP4z.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-CvkRgOIT.js → resolve-tab-icon-PxjRZX1H.js} +1 -1
  261. package/dist/client/assets/{review-settings-Y1CaoWpM.js → review-settings-kLfb142p.js} +1 -1
  262. package/dist/client/assets/{role-color-BhGPl3zi.js → role-color-IuFM2ryV.js} +1 -1
  263. package/dist/client/assets/{roles-BfIkt_P2.js → roles-ChChHxNe.js} +1 -1
  264. package/dist/client/assets/{route-C_yL94er.js → route-B8iUhppJ.js} +1 -1
  265. package/dist/client/assets/route-BxTybqtK.js +1 -0
  266. package/dist/client/assets/{route-BKrtuNpH.js → route-CrNL-7g4.js} +1 -1
  267. package/dist/client/assets/{route-page-header-agJ7Uv7j.js → route-page-header-DCLl7OR3.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-DlqFzaAD.js → sandbox-git-api-Col1MWY3.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-CkkccyCW.js → sandbox-lifecycle-context-D5b-1gmk.js} +1 -1
  270. package/dist/client/assets/{save-status-qqJSL1T9.js → save-status-DRBFObbb.js} +1 -1
  271. package/dist/client/assets/{schema-Bm0oqglz.js → schema-C9adA9zO.js} +1 -1
  272. package/dist/client/assets/schema-DSiYMOaw.js +1 -0
  273. package/dist/client/assets/{scroll-area-DrQPUtug.js → scroll-area-eq_7FsGx.js} +1 -1
  274. package/dist/client/assets/{search-input-BTXo0rPM.js → search-input-BoK5M9a3.js} +1 -1
  275. package/dist/client/assets/{search-toggle-D8jolQEu.js → search-toggle-BjojcpZc.js} +1 -1
  276. package/dist/client/assets/{secret-picker-ClIgl45d.js → secret-picker-CYgqZ7Hs.js} +1 -1
  277. package/dist/client/assets/{secrets-mknF8fmG.js → secrets-BKHsbBC1.js} +1 -1
  278. package/dist/client/assets/{section-array-field-DllyfmAH.js → section-array-field-CFTEx6aa.js} +1 -1
  279. package/dist/client/assets/{sections-BdP8hHuS.js → sections-dcTP2l6r.js} +1 -1
  280. package/dist/client/assets/{sections-editor-BRkk4nim.js → sections-editor-abMn7yC2.js} +1 -1
  281. package/dist/client/assets/{select-DoQbBnCj.js → select-BeWEAY37.js} +1 -1
  282. package/dist/client/assets/{select-model-818450xb.js → select-model-BYnA0Gwu.js} +1 -1
  283. package/dist/client/assets/{seo-editor-BcgXl8zO.js → seo-editor-DSBQXHQz.js} +1 -1
  284. package/dist/client/assets/{separator-BjQ0Rald.js → separator-NMEa418C.js} +1 -1
  285. package/dist/client/assets/{session-runtime-Cu_NMrs6.js → session-runtime-C2nnx1Yy.js} +1 -1
  286. package/dist/client/assets/settings-tab-CGly607F.js +1 -0
  287. package/dist/client/assets/{sheet-fInBGBxI.js → sheet-kN_qJtMS.js} +1 -1
  288. package/dist/client/assets/{shell-layout-DpAhzjkm.js → shell-layout-3lFHGRrU.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-CxqzZOye.js → site-draft-actions-B9Zn1-TU.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-BGY6xXy2.js → site-draft-view-DNdjn9-p.js} +1 -1
  291. package/dist/client/assets/site-editor-DMFFmEQP.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-DBxnFIyu.js → site-editor-toast-XhGY7zwS.js} +1 -1
  293. package/dist/client/assets/{skills-B4eDJD0R.js → skills-BOhR4tMn.js} +1 -1
  294. package/dist/client/assets/{slider-VRF1NYvp.js → slider-C7epTuZ8.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-DePnbT4r.js → sortable.esm-cU4I4793.js} +1 -1
  296. package/dist/client/assets/{sso-dRpMeHNu.js → sso-DTIktZWR.js} +1 -1
  297. package/dist/client/assets/{suggestion-OMwRo4J1.js → suggestion-DDGRykra.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-C1CFeadh.js → super-agent-icon-DuRj24lp.js} +1 -1
  299. package/dist/client/assets/{switch-C_2jBQUd.js → switch-BDueaRYD.js} +1 -1
  300. package/dist/client/assets/{synced-repos-C7Qyzjr1.js → synced-repos-C9zElGzV.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-tgmE1WHA.js → tab-icon-glyph-DDgZ5H3d.js} +1 -1
  302. package/dist/client/assets/{table-DHolGkDK.js → table-DVo_G9_3.js} +1 -1
  303. package/dist/client/assets/{tabs-Dc_muwGD.js → tabs-CdvvfON1.js} +1 -1
  304. package/dist/client/assets/{task-board-D5OsG9Bh.js → task-board-Yoy13hyS.js} +1 -1
  305. package/dist/client/assets/{task-key-D5k81-kx.js → task-key-C5ElV36G.js} +1 -1
  306. package/dist/client/assets/{task-route-BXv3go2m.js → task-route-Ch0tFEd1.js} +1 -1
  307. package/dist/client/assets/{task-status-BI-AtF2a.js → task-status-DTW_J3bv.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-D76W-EjY.js → taskboard-analytics-DKHMo41r.js} +1 -1
  309. package/dist/client/assets/{tasks-CdDrLQcw.js → tasks-C5GIN5E_.js} +1 -1
  310. package/dist/client/assets/tasks-DvmfNBQ-.js +1 -0
  311. package/dist/client/assets/{textarea-ChOXQSIh.js → textarea-DLWBFN0v.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-W-kBvRGD.js → thread-analytics-BTLWyHKx.js} +1 -1
  313. package/dist/client/assets/{thread-button-CdZ-TuVw.js → thread-button-DhVQCmsX.js} +1 -1
  314. package/dist/client/assets/{thread-intent-B7BYRHTJ.js → thread-intent-_uutGDUM.js} +1 -1
  315. package/dist/client/assets/{thread-route-_rYXa6gz.js → thread-route-6FnoI5qD.js} +1 -1
  316. package/dist/client/assets/{thread-route-pM3iBpC4.js → thread-route-D1CUkAJD.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-BXkFochM.js → thread-sheet-body-Cub1fKq-.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-D6QM55zj.js → time-range-picker-BMwT3626.js} +1 -1
  319. package/dist/client/assets/{toggle-group-D9Igy0TU.js → toggle-group-DWX0nZ4H.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-B7CUsfuy.js → tool-set-selector-ALSL3hVp.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-DilrTlb5.js → toolbar-icon-button-Dqj7VQX8.js} +1 -1
  322. package/dist/client/assets/{tooltip-Cprju8cR.js → tooltip-CZRZIxk-.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-Bl0kANqq.js → tooltipContext-C809C4iy.js} +1 -1
  324. package/dist/client/assets/{track-jbmP2DUz.js → track-bHg709cw.js} +1 -1
  325. package/dist/client/assets/{types-DLbeP8WB.js → types-DlpVggui.js} +1 -1
  326. package/dist/client/assets/{url-slug-a_10dVtL.js → url-slug-BB82g1u7.js} +1 -1
  327. package/dist/client/assets/{usage-stats-C_4X9-qJ.js → usage-stats-DoFb8ztD.js} +1 -1
  328. package/dist/client/assets/{use-ai-providers-BRdMfbSe.js → use-ai-providers-BiyN-WCF.js} +1 -1
  329. package/dist/client/assets/{use-api-keys-TWl5p8YB.js → use-api-keys-Cxi_5Vd-.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-BGfWCdKo.js → use-apply-named-rule-DYECMRmC.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-BxctC8S7.js +1 -0
  332. package/dist/client/assets/{use-automations-CSPsZ4D5.js → use-automations-QvQ9-U2U.js} +1 -1
  333. package/dist/client/assets/{use-autosave-o-tBgwll.js → use-autosave-daygBqez.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-B-t0WNBy.js +1 -0
  335. package/dist/client/assets/use-blog-view-BIvVJJix.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-CtIcGcSR.js → use-chat-layout-state-0AI7ifjI.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-FJJVRnhf.js → use-cms-publish-actions-BftFrua2.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-BI43ttca.js → use-connect-companion-m06ztMgB.js} +1 -1
  339. package/dist/client/assets/{use-connection-Bo77wUI4.js → use-connection-B0cGUNwk.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-CTGZo4Cr.js → use-content-sync-Uc9pHBlX.js} +1 -1
  341. package/dist/client/assets/{use-copy-DEuGqQKY.js → use-copy-DBQlG5IR.js} +1 -1
  342. package/dist/client/assets/{use-current-view-BY4Yr3Ak.js → use-current-view-C2oQ48ps.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-DMkGMXGf.js → use-date-fns-locale-CTETVyWx.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-BZewyMyg.js → use-debounced-autosave-MeU8h_HM.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-jvU6cmtP.js → use-debounced-value-DuUlLfhZ.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-eG1MTgeV.js → use-deco-credits-Uln4dtix.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-BM0ApVN1.js → use-decopilot-events-CMFmWECg.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-208HXUpw.js → use-delete-block-C86wRu-_.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-CNoIHETe.js → use-delete-connection-DOgqGw9b.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-DNEaqLy_.js → use-deployment-admin-D_-Itupi.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-DJbHbqBs.js → use-entitlements-Dia0AILI.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-DkBaYpBC.js → use-fast-preview-draft-url-CknqyNDE.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-91P-D2_R.js → use-file-configs-CzQQ90JX.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-C-lytya_.js → use-id-selection-19rSeTxc.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-CXgr4nxD.js → use-in-settings-Bq0BGd_d.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-CkOBChJk.js → use-inbox-feed-n8hshusZ.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-Bkw4TlTx.js → use-infinite-scroll-BH-5t-Jt.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-BIEpa--C.js → use-join-requests-BL2OdQfH.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-JO_-ERrE.js → use-main-panel-tabs-CC60Yh9H.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-D0FGwEZO.js → use-mcp-auth-status-DSNKfIOW.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-DC1kroLc.js → use-mcp-client-TEXwfWPr.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-CMsHTnDX.js → use-mcp-prompts-BaL3X4-_.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-D_gL0d3W.js → use-mcp-tools-B28YCUnj.js} +1 -1
  364. package/dist/client/assets/{use-mobile-ke5ZDv8p.js → use-mobile-G7Femuy-.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-CkPzsqe2.js → use-move-blocks-DOZBEkmq.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-BBU44HO0.js → use-navigate-to-agent-ecN99SMa.js} +1 -1
  367. package/dist/client/assets/{use-never-published-BPXfnaqL.js → use-never-published-Dx3XaQEP.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-CHGJY6Rv.js → use-org-fs-DJGPTW8O.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-DAIPpLvK.js → use-org-notice-C1K-wnIy.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-hRxa5k48.js → use-org-repo-syncs-BYwpsVLM.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-zv8-dYnz.js → use-org-sso-B8YY7LK8.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-DXEvl8Mj.js → use-organization-settings-DnrsF2IG.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-Khvtzqqe.js → use-panel-navigate-TgZj9ROm.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-C7NO1GQL.js → use-project-native-view-presence-D7VbyaBn.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-BzxL6CLn.js → use-project-scope-LWmEyb6r.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-BaZdSz76.js → use-recent-apps-DfJLp7oI.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-Bgp7rYme.js → use-reports-diagnostic-DkJXZlqi.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-BTlzkAKE.js → use-sandbox-events-B1yboBKL.js} +1 -1
  379. package/dist/client/assets/{use-secrets-DHzfkbap.js → use-secrets-DEk6ozji.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-BpF0MXce.js → use-section-preview-base-C-VDv-6q.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-CmbDjI-Q.js → use-sidebar-collapsed-CHZKq9oZ.js} +1 -1
  382. package/dist/client/assets/{use-tags-DYH5Nm8i.js → use-tags-CoDR1Zmu.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-DbwC5UyL.js → use-task-board-analytics-VYu88gcp.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-CaZulkZP.js → use-task-board-item-prs-BWa7fz4R.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-Cu-LAjNo.js → use-task-board-items--V3JyFqK.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-CExnQ5c1.js → use-task-board-prompts-BwomBVhP.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-B4wWxX-B.js → use-task-metadata-lWqkLjl-.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-B4e3l9Oh.js → use-thread-outputs-BlJPEHoZ.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-DZVyfsp9.js → use-view-draft-kind-C3BJYXR8.js} +1 -1
  390. package/dist/client/assets/{use-voice-input-BU9yzUIU.js → use-voice-input-Cor9Dsop.js} +1 -1
  391. package/dist/client/assets/useInfiniteQuery-F3rbh2kJ.js +1 -0
  392. package/dist/client/assets/{useQueries-Byj3pdb5.js → useQueries-B-JshDOA.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-DltqzRHJ.js +1 -0
  394. package/dist/client/assets/{users-CC7MWtO-.js → users-43nQLl3d.js} +1 -1
  395. package/dist/client/assets/{utils-C6Bks5Ov.js → utils-eOeHxAm4.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-CSqIsMSl.js → variant-calendar-Blbs7r8N.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-BNelNYPY.js → variant-matcher-override-DeKQe6Ib.js} +1 -1
  398. package/dist/client/assets/{view-header-CVQgD12G.js → view-header-K5jK9-59.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-CDsAa6_Y.js → virtual-mcp-CKMXaKii.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-Cy0wnTy4.js → watch-sse-pool-Bcd0P23K.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +401 -401
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-BBW_INrK.js +0 -1
  405. package/dist/client/assets/agent-deck-BF1dU-8v.js +0 -1
  406. package/dist/client/assets/agent-experiments-CL3b9etx.js +0 -1
  407. package/dist/client/assets/agent-file-C2ZLB1fH.js +0 -1
  408. package/dist/client/assets/agent-library-COseJA1F.js +0 -1
  409. package/dist/client/assets/agent-library-file-BdbaxSWq.js +0 -1
  410. package/dist/client/assets/agent-overview-VRlh06Tf.js +0 -1
  411. package/dist/client/assets/agent-settings-D75BvE5p.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-Cndvt_wh.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-CxAWxJNJ.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-DSNRZjpy.js +0 -1
  415. package/dist/client/assets/agent-view-LYcQ2dD7.js +0 -1
  416. package/dist/client/assets/api-keys-CZQLoHQl.js +0 -1
  417. package/dist/client/assets/library-jbCzY4wv.js +0 -1
  418. package/dist/client/assets/plan-DMpOcEfe.js +0 -1
  419. package/dist/client/assets/project-reports-BVeAsS6u.js +0 -1
  420. package/dist/client/assets/project-tasks-KnCd_VBG.js +0 -1
  421. package/dist/client/assets/record-editor-B7mTnaNS.js +0 -1
  422. package/dist/client/assets/reports-BRlneKJb.js +0 -1
  423. package/dist/client/assets/repositories-CGWctOW_.js +0 -1
  424. package/dist/client/assets/route-BATbmHrj.js +0 -1
  425. package/dist/client/assets/schema-Bip4QZH5.js +0 -1
  426. package/dist/client/assets/settings-tab-CmVetGSh.js +0 -1
  427. package/dist/client/assets/site-editor-BE_IMJ7-.js +0 -1
  428. package/dist/client/assets/tasks-VcFNUyV9.js +0 -1
  429. package/dist/client/assets/use-ask-in-chat-CGQ9y3j-.js +0 -1
  430. package/dist/client/assets/use-blocks-v8-project-DI6WOIKx.js +0 -1
  431. package/dist/client/assets/use-blog-view-618wKlvj.js +0 -1
  432. package/dist/client/assets/useInfiniteQuery-Cc6x0EgG.js +0 -1
  433. package/dist/client/assets/useSuspenseInfiniteQuery-D6nr4CLj.js +0 -1
@@ -1 +1 @@
1
- import{c as M,b as Z,J as X,a as V,r as z,j as r,at as re,n as R,a6 as oe,h as ie}from"./index-OSvXQU0Z.js";import{ChatLayout as ne}from"./index-C5XlOPVN.js";import{b as se}from"./input-BpOitAQg.js";import{D as ae,a as me}from"./chat-context-BDbYH6DU.js";import{u as le}from"./use-organization-settings-DXEvl8Mj.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-C3xphs6Y.js";import{I as de}from"./icon-button-Ymzn1_Ie.js";import{T as he,a as W}from"./toggle-group-D9Igy0TU.js";import{a as xe}from"./MessageCircle01-DzETEiuY.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-DH8J73Em.js";import{u as q,a as je}from"./use-org-fs-CHGJY6Rv.js";import{L as Se}from"./preview-dialog-BH5MI3Sd.js";import{t as _e,r as we,s as De}from"./daily-pulse-DAnz5NH_.js";import{N as ke}from"./new-project-dialog-DrWLNe2p.js";import{P as ve}from"./projects-empty-state-BlZ1lAtQ.js";import{b as Be}from"./project-index-UVS3LS58.js";import{u as Ce}from"./use-inbox-feed-CkOBChJk.js";import{b as Ne}from"./use-recent-apps-BaZdSz76.js";import{s as Pe}from"./use-project-scope-BzxL6CLn.js";import{u as $e}from"./repository-binding-DWcsSj-q.js";import"./use-mobile-ke5ZDv8p.js";import"./tooltip-Cprju8cR.js";import"./index-At64nru8.js";import"./XClose-BMX-96qf.js";import"./thread-button-CdZ-TuVw.js";import"./use-sidebar-collapsed-CmbDjI-Q.js";import"./sheet-fInBGBxI.js";import"./use-chat-layout-state-CtIcGcSR.js";import"./use-panel-navigate-Khvtzqqe.js";import"./thread-route-pM3iBpC4.js";import"./toolbar-icon-button-DilrTlb5.js";import"./use-in-settings-CXgr4nxD.js";import"./resizable-Ci9A7w1l.js";import"./route-page-header-agJ7Uv7j.js";import"./LayoutLeft-CwLIeRIW.js";import"./use-current-view-BY4Yr3Ak.js";import"./usage-stats-C_4X9-qJ.js";import"./utils-CVEq3hMx.js";import"./markdown-BxJxdoCM.js";import"./use-copy-DEuGqQKY.js";import"./agent-icon-Cm7N0-bv.js";import"./AlertCircle-DwSzq5uM.js";import"./UserCheck01-C8hLtzy2.js";import"./Tool01-m86Phkll.js";import"./ArrowUp-CZDDSEah.js";import"./ArrowLeft-BqHCgh-K.js";import"./ArrowRight-BTBfkPne.js";import"./BookOpen01-C9k43IqJ.js";import"./Globe04-BigCPaEo.js";import"./CheckCircle-CQXVMLht.js";import"./ChevronDown-OTI5djzn.js";import"./ChevronSelectorVertical-rhJDM4Rj.js";import"./ChevronUp-B1aDls8C.js";import"./UserSquare-BhtzcYE8.js";import"./LinkBroken01-30jdc1Ee.js";import"./CreditCard01-BRLPBJsI.js";import"./File02-C0PbxigR.js";import"./SwitchHorizontal01-DbeDoxGW.js";import"./Eye-B7bHPNlI.js";import"./Fingerprint04-CgXsJGLm.js";import"./Image01-R03ky3hy.js";import"./Key01-BKbEnhve.js";import"./Minus-CJw7hyKt.js";import"./Monitor01-CILX5aJF.js";import"./Sun-Dionl9S8.js";import"./Play-CupXu5V-.js";import"./Plus-johmxWOE.js";import"./SearchMd-BF4D-OIS.js";import"./ShoppingBag01-BeLSpVUq.js";import"./Trash01-CEWo4AIU.js";import"./Upload01-sC3bIoAL.js";import"./Users01-CDP9kGkf.js";import"./Zap-qmAhMIUT.js";import"./task-board-D5OsG9Bh.js";import"./schema-Bip4QZH5.js";import"./gateway-client-C3ZU5-_v.js";import"./form-Dm1g6Sbo.js";import"./label-Csx-3v8Y.js";import"./use-entitlements-DJbHbqBs.js";import"./file-type-icon-CXoLbYfz.js";import"./use-view-draft-kind-DZVyfsp9.js";import"./use-blog-view-618wKlvj.js";import"./thread-intent-B7BYRHTJ.js";import"./use-mcp-client-DC1kroLc.js";import"./auth-BkXZCqsk.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cy0wnTy4.js";import"./session-runtime-Cu_NMrs6.js";import"./chat-draft-Cf1fheTV.js";import"./use-voice-input-BU9yzUIU.js";import"./popover-DOi1uePA.js";import"./drawer-CifkTfym.js";import"./use-ai-providers-BRdMfbSe.js";import"./index-Chk8S0_L.js";import"./checkbox-CWIVoQk6.js";import"./select-DoQbBnCj.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-Dc_muwGD.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-eG1MTgeV.js";import"./input-CkzjHKcN.js";import"./suggestion-OMwRo4J1.js";import"./use-mcp-prompts-CMsHTnDX.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DQ4EONHv.js";import"./plan-ladder-C250kgCs.js";import"./add-connection-dialog-h-WyH-Sw.js";import"./collection-search-mwRnJ2oa.js";import"./extract-connection-data-DG39hguA.js";import"./metadata-D72DunRR.js";import"./connection-B5sc0Bj4.js";import"./url-slug-a_10dVtL.js";import"./connection-card-Dboxtv4i.js";import"./useInfiniteQuery-Cc6x0EgG.js";import"./infiniteQueryObserver-Db0Zh8ks.js";import"./connection-slug-9VOx21AD.js";import"./integration-icon-TVRwnFcy.js";import"./textarea-ChOXQSIh.js";import"./use-connection-Bo77wUI4.js";import"./schema-Bm0oqglz.js";import"./connection-form-helpers-BJ4Q7lAD.js";import"./authenticate-and-persist-oauth-DMrLBEfk.js";import"./mcp-oauth-B2OKeCmx.js";import"./mcp-oauth-CEDOnwdg.js";import"./collection-tabs-D7Vo1f2S.js";import"./badge-DmhY0k4f.js";import"./use-infinite-scroll-Bkw4TlTx.js";import"./useSuspenseInfiniteQuery-D6nr4CLj.js";import"./use-task-board-items-Cu-LAjNo.js";import"./use-decopilot-events-BM0ApVN1.js";import"./connect-key-8z4sGhvS.js";import"./use-api-keys-TWl5p8YB.js";import"./chart-BySfFX3r.js";import"./CategoricalChart-BxKUKwEU.js";import"./index-DTEDDR1x.js";import"./tooltipContext-Bl0kANqq.js";import"./CartesianChart-CEwlJSS3.js";import"./project-icon-Cmr6SrmT.js";import"./project-apps-Dgu7yO2X.js";import"./config-il-mrtJw.js";import"./task-key-D5k81-kx.js";import"./task-route-BXv3go2m.js";import"./ReferenceLine-c20DchWo.js";import"./utils-C6Bks5Ov.js";import"./editor-DRWbb7ul.js";import"./preview-content-db_uBwtX.js";import"./file-share-button-srSYNesY.js";import"./use-navigate-to-agent-BBU44HO0.js";import"./repository-picker-CG8_WRxv.js";import"./github-icon-BHk-XZWW.js";import"./use-debounced-value-jvU6cmtP.js";import"./new-project-store-_S8_LTiv.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
1
+ import{c as M,b as Z,J as X,a as V,r as z,j as r,at as re,n as R,a6 as oe,h as ie}from"./index-BmFua4_V.js";import{ChatLayout as ne}from"./index-CEvi6MRf.js";import{b as se}from"./input-BtWx1h9I.js";import{D as ae,a as me}from"./chat-context-DjT4b8lQ.js";import{u as le}from"./use-organization-settings-DnrsF2IG.js";import{C as pe,u as ce,F as fe,R as ue,M as ge}from"./home-overview-Beeq-x1h.js";import{I as de}from"./icon-button-T38urafn.js";import{T as he,a as W}from"./toggle-group-DWX0nZ4H.js";import{a as xe}from"./MessageCircle01-B4uczpCj.js";import{i as be}from"./sprints-C1z9xhcL.js";import{F as ye}from"./file-preview-69js7s8F.js";import{u as q,a as je}from"./use-org-fs-DJGPTW8O.js";import{L as Se}from"./preview-dialog-wmutK6r5.js";import{t as _e,r as we,s as De}from"./daily-pulse-B1DjserV.js";import{N as ke}from"./new-project-dialog-BZK8ka6l.js";import{P as ve}from"./projects-empty-state-CPzIeLmU.js";import{b as Be}from"./project-index-Bh9jfwR8.js";import{u as Ce}from"./use-inbox-feed-n8hshusZ.js";import{b as Ne}from"./use-recent-apps-DfJLp7oI.js";import{s as Pe}from"./use-project-scope-LWmEyb6r.js";import{u as $e}from"./repository-binding-CabkwAHk.js";import"./use-mobile-G7Femuy-.js";import"./tooltip-CZRZIxk-.js";import"./index-CekzbOTN.js";import"./XClose-DjYKMVV7.js";import"./thread-button-DhVQCmsX.js";import"./use-sidebar-collapsed-CHZKq9oZ.js";import"./sheet-kN_qJtMS.js";import"./use-chat-layout-state-0AI7ifjI.js";import"./use-panel-navigate-TgZj9ROm.js";import"./thread-route-D1CUkAJD.js";import"./toolbar-icon-button-Dqj7VQX8.js";import"./use-in-settings-Bq0BGd_d.js";import"./resizable-CD_IWP4z.js";import"./route-page-header-DCLl7OR3.js";import"./LayoutLeft-W1QrQNCQ.js";import"./use-current-view-C2oQ48ps.js";import"./usage-stats-DoFb8ztD.js";import"./utils-CVEq3hMx.js";import"./markdown-BFHFiMsu.js";import"./use-copy-DBQlG5IR.js";import"./agent-icon-0bk2UcIS.js";import"./AlertCircle-DAO8Cblw.js";import"./UserCheck01--3bpkFxi.js";import"./Tool01-AKltE4in.js";import"./ArrowUp-BJQg9AA1.js";import"./ArrowLeft-CT2LzszE.js";import"./ArrowRight-pWGgV3sk.js";import"./BookOpen01-NJdRqnsB.js";import"./Globe04-B3z7rCIS.js";import"./CheckCircle-TiszLk0g.js";import"./ChevronDown-DLp4f_Dh.js";import"./ChevronSelectorVertical-CWnQQEhh.js";import"./ChevronUp-CWIsOhVe.js";import"./UserSquare-DQ1GTm9S.js";import"./LinkBroken01-B1J8elNo.js";import"./CreditCard01-Cup3kK-t.js";import"./File02-DIeMsRip.js";import"./SwitchHorizontal01-BypmkJpL.js";import"./Eye-CpYkFfrM.js";import"./Fingerprint04-DHrTMQWz.js";import"./Image01-c7d3c0NN.js";import"./Key01-B4doqhLg.js";import"./Minus-CjA8gEfB.js";import"./Monitor01-Sf2_a_zw.js";import"./Sun-BV3Rjj5o.js";import"./Play-BoXUJR8B.js";import"./Plus-C9Aly22c.js";import"./SearchMd-BGdlYs4L.js";import"./ShoppingBag01-Csv6OfPx.js";import"./Trash01-BIsikoZ9.js";import"./Upload01-KlZn1WFA.js";import"./Users01-1IU76HkK.js";import"./Zap-CAuzJCQQ.js";import"./task-board-Yoy13hyS.js";import"./schema-DSiYMOaw.js";import"./gateway-client-BZYQ57Xz.js";import"./form-DPvjiqhu.js";import"./label-DLrqdV8m.js";import"./use-entitlements-Dia0AILI.js";import"./file-type-icon-DNMrvTXh.js";import"./use-view-draft-kind-C3BJYXR8.js";import"./use-blog-view-BIvVJJix.js";import"./thread-intent-_uutGDUM.js";import"./use-mcp-client-TEXwfWPr.js";import"./auth-Cp8AG92B.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Bcd0P23K.js";import"./session-runtime-C2nnx1Yy.js";import"./chat-draft-CCkjIQCm.js";import"./use-voice-input-Cor9Dsop.js";import"./popover-DXE2ZxJe.js";import"./drawer--TAK3w4e.js";import"./use-ai-providers-BiyN-WCF.js";import"./index-De6pkEUU.js";import"./checkbox-DDfyr6g6.js";import"./select-BeWEAY37.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-CdvvfON1.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-Uln4dtix.js";import"./input-SdMF8jO-.js";import"./suggestion-DDGRykra.js";import"./use-mcp-prompts-BaL3X4-_.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DInbXGdg.js";import"./plan-ladder-k40NveZy.js";import"./add-connection-dialog-BhDktSiS.js";import"./collection-search-DMUeYNum.js";import"./extract-connection-data-BIXY1F36.js";import"./metadata-D72DunRR.js";import"./connection-BwZ4lmw2.js";import"./url-slug-BB82g1u7.js";import"./connection-card-BPzewKTU.js";import"./useInfiniteQuery-F3rbh2kJ.js";import"./infiniteQueryObserver-B07wc3gz.js";import"./connection-slug-RL5I0rfj.js";import"./integration-icon-CgXZyLPZ.js";import"./textarea-DLWBFN0v.js";import"./use-connection-B0cGUNwk.js";import"./schema-C9adA9zO.js";import"./connection-form-helpers-Dh-UO47F.js";import"./authenticate-and-persist-oauth-CbpIFClV.js";import"./mcp-oauth-ac-uLk4g.js";import"./mcp-oauth-rLBhBYCb.js";import"./collection-tabs-DXVhkE7f.js";import"./badge-MSgPF8i6.js";import"./use-infinite-scroll-BH-5t-Jt.js";import"./useSuspenseInfiniteQuery-DltqzRHJ.js";import"./use-task-board-items--V3JyFqK.js";import"./use-decopilot-events-CMFmWECg.js";import"./connect-key-CPt8mh8U.js";import"./use-api-keys-Cxi_5Vd-.js";import"./chart-qPtsM-po.js";import"./CategoricalChart-vKY4cy0c.js";import"./index-CufGYOzR.js";import"./tooltipContext-C809C4iy.js";import"./CartesianChart-vfIUAkaA.js";import"./project-icon-DQECQJRO.js";import"./project-apps-BjG-gQ2D.js";import"./config-DmE-h3o5.js";import"./task-key-C5ElV36G.js";import"./task-route-Ch0tFEd1.js";import"./ReferenceLine-CN7wd2Ky.js";import"./utils-eOeHxAm4.js";import"./editor-Di-PiOHZ.js";import"./preview-content-Bz-He8KU.js";import"./file-share-button-CKuUsk2M.js";import"./use-navigate-to-agent-ecN99SMa.js";import"./repository-picker-C5foJ37k.js";import"./github-icon-Csyi9aVw.js";import"./use-debounced-value-DuUlLfhZ.js";import"./new-project-store-DwU6DopG.js";const O="home",Q="brief";function ee(e){return`users/${e}/brief`}function Ee(e,t){return`${e}/${t}.html`}function Fe(e){const t=String(e.getFullYear()).padStart(4,"0"),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Ie(e){if(!e.endsWith(".html"))return null;const t=e.slice(0,-5);return be(t)?t:null}const Te=7;function te(e,t){return Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5)}function Me(e,t){let i=null;for(const s of e){const a=Ie(s);if(!a||i&&a<=i.day)continue;const n=te(a,t);n>=0&&n<Te&&(i={name:s,day:a})}return i}const K=e=>e.slice(e.lastIndexOf("/")+1);function J(e,t,i,s){const a=i.filter(o=>o.kind==="file"),n=Me(a.map(o=>K(o.path)),s),l=n&&a.find(o=>K(o.path)===n.name);return n&&l?{scope:e,path:Ee(t,n.day),filename:n.name,size:l.size,day:n.day,ageDays:te(n.day,s)}:null}function Ae({userId:e,personal:t,org:i,today:s}){return[e?J("personal",ee(e),t,s):null,J("org",Q,i,s)].filter(a=>a!==null)}function Le(e,t){return t===0?e("home.dailyBrief.today"):t===1?e("home.dailyBrief.yesterday"):e("home.dailyBrief.daysAgo",{count:t})}function He(e,t){return new Date(`${t}T12:00:00Z`).toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"})}function Re(){const e=M.c(54),t=Z(),[i]=X(),{data:s}=V.useSession(),a=s?.user?.id,n=q(O,Q),l=a??"";let o;e[0]!==l?(o=ee(l),e[0]=l,e[1]=o):o=e[1];const D=!!a;let h;e[2]!==D?(h={enabled:D},e[2]=D,e[3]=h):h=e[3];const d=q(O,o,h),p=je(O),[k,v]=z.useState(null),[x,u]=z.useState(!1);let f,m,c,b,g,y,j,B,S,_;if(e[4]!==n.data||e[5]!==d.data||e[6]!==i||e[7]!==p||e[8]!==k||e[9]!==t||e[10]!==a){b=Symbol.for("react.early_return_sentinel");e:{const G=Ae({userId:a,personal:d.data??[],org:n.data??[],today:Fe(new Date)});if(m=G.find(T=>T.scope===k)??G[0],!m){b=null;break e}_="flex flex-col overflow-hidden surface";let A;e[21]!==t?(A=t("home.dailyBrief.title"),e[21]=t,e[22]=A):A=e[22];const U=r.jsxs("h2",{className:"flex min-w-0 items-baseline gap-2 text-[0.9rem] font-medium tracking-tight text-foreground",children:[A,r.jsxs("span",{className:"truncate text-xs font-normal text-muted-foreground",children:[Le(t,m.ageDays)," ·"," ",He(i.language,m.day)]})]}),Y=G.length>1&&r.jsxs(he,{type:"single",variant:"segmented",size:"sm",value:m.scope,onValueChange:T=>{(T==="personal"||T==="org")&&v(T)},children:[r.jsx(W,{value:"personal",className:"px-2.5 text-xs",children:t("home.dailyBrief.personal")}),r.jsx(W,{value:"org",className:"px-2.5 text-xs",children:t("home.dailyBrief.org")})]});let E;e[23]!==t?(E=t("home.dailyBrief.fullscreen"),e[23]=t,e[24]=E):E=e[24];let L,H;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!0),H=r.jsx(xe,{size:14}),e[25]=L,e[26]=H):(L=e[25],H=e[26]);let F;e[27]!==E?(F=r.jsx(de,{label:E,onClick:L,children:H}),e[27]=E,e[28]=F):F=e[28];let I;e[29]!==Y||e[30]!==F?(I=r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Y,F]}),e[29]=Y,e[30]=F,e[31]=I):I=e[31],e[32]!==U||e[33]!==I?(c=r.jsxs("div",{className:"flex h-12 items-center justify-between gap-3 border-b border-border/70 px-5",children:[U,I]}),e[32]=U,e[33]=I,e[34]=c):c=e[34],S="h-[32rem]",f=ye,g=m.path,y=m.filename,j=m.size,B=p(m.path)}e[4]=n.data,e[5]=d.data,e[6]=i,e[7]=p,e[8]=k,e[9]=t,e[10]=a,e[11]=f,e[12]=m,e[13]=c,e[14]=b,e[15]=g,e[16]=y,e[17]=j,e[18]=B,e[19]=S,e[20]=_}else f=e[11],m=e[12],c=e[13],b=e[14],g=e[15],y=e[16],j=e[17],B=e[18],S=e[19],_=e[20];if(b!==Symbol.for("react.early_return_sentinel"))return b;let w;e[35]!==g||e[36]!==y||e[37]!==j||e[38]!==B?(w={key:g,filename:y,size:j,downloadUrl:B},e[35]=g,e[36]=y,e[37]=j,e[38]=B,e[39]=w):w=e[39];let C;e[40]!==f||e[41]!==w?(C=r.jsx(f,{file:w}),e[40]=f,e[41]=w,e[42]=C):C=e[42];let N;e[43]!==C||e[44]!==S?(N=r.jsx("div",{className:S,children:C}),e[43]=C,e[44]=S,e[45]=N):N=e[45];let $;e[46]!==m||e[47]!==x?($=x&&r.jsx(Se,{previewPath:`${O}/${m.path}`,onClose:()=>u(!1),showSeeInLibrary:!0}),e[46]=m,e[47]=x,e[48]=$):$=e[48];let P;return e[49]!==c||e[50]!==N||e[51]!==$||e[52]!==_?(P=r.jsxs("section",{className:_,children:[c,N,$]}),e[49]=c,e[50]=N,e[51]=$,e[52]=_,e[53]=P):P=e[53],P}function Oe(e){return e<12?"morning":e<18?"afternoon":"evening"}function ze(e){const t=(e??"").trim().split(/\s+/)[0];return t||null}function Ge(e,t){return t.toLocaleDateString(e,{weekday:"long",day:"numeric",month:"long"})}function Ue(e){return e==="morning"?"overnight":"today"}function Ye(e,t){const i=new Date(t);return i.setHours(0,0,0,0),e==="morning"&&i.setHours(-6),i.getTime()}const Ze={morning:{named:"home.orgHome.greetingMorning",bare:"home.orgHome.greetingMorningBare"},afternoon:{named:"home.orgHome.greetingAfternoon",bare:"home.orgHome.greetingAfternoonBare"},evening:{named:"home.orgHome.greetingEvening",bare:"home.orgHome.greetingEveningBare"}};function Ve(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex min-h-64 items-center justify-center",children:r.jsx(ie,{className:"size-5 text-muted-foreground"})}),e[0]=t):t=e[0],t}function We(e,t,i,s,a){const n=Ue(i)==="overnight",l=[];if(t>0){const o=e(t===1?"home.brief.changeOne":"home.brief.changeMany",{count:t});l.push(e(n?"home.brief.overnightShipped":"home.brief.todayShipped",{changes:o}))}else s===0&&l.push(e(a>0?"home.brief.working":n?"home.brief.quietNight":"home.brief.quietDay"));return l.push(s===0?e("home.brief.waitingNone"):e(s===1?"home.brief.waitingOne":"home.brief.waitingMany",{count:s})),l.join(" ")}function qe(e){const t=M.c(41),{canManageProjects:i,eyebrow:s,greeting:a,slot:n}=e,l=Z(),{org:o}=oe(),{data:D}=V.useSession();let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h={pageSize:1e3},t[0]=h):h=t[0];const d=$e(h),p=ce(),k=Ce(),{recent:v}=Ne(o.slug);let x,u;if(t[1]!==d||t[2]!==i||t[3]!==o.id){u=Symbol.for("react.early_return_sentinel");e:{let N;t[6]!==o.id?(N=P=>P.id!==o.id,t[6]=o.id,t[7]=N):N=t[7];const $=Pe(d).filter(N);if($.length===0){let P;t[8]!==i?(P=r.jsx(ve,{canCreate:i}),t[8]=i,t[9]=P):P=t[9],u=P;break e}x=Be($)}t[1]=d,t[2]=i,t[3]=o.id,t[4]=x,t[5]=u}else x=t[4],u=t[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;const f=x;let m,c;t[10]!==D?.user?.id||t[11]!==n||t[12]!==l||t[13]!==p?(c=_e(p,D?.user?.id),m=We(l,De(p,Ye(n,new Date)),n,c.length,we(p).length),t[10]=D?.user?.id,t[11]=n,t[12]=l,t[13]=p,t[14]=m,t[15]=c):(m=t[14],c=t[15]);const b=m;let g;t[16]!==s?(g=r.jsx("span",{className:"text-xs text-muted-foreground",children:s}),t[16]=s,t[17]=g):g=t[17];let y;t[18]!==b||t[19]!==a?(y=r.jsxs("h1",{className:"max-w-[40ch] text-2xl font-medium text-balance text-foreground",children:[a," ",b]}),t[18]=b,t[19]=a,t[20]=y):y=t[20];let j;t[21]!==g||t[22]!==y?(j=r.jsxs("div",{className:"flex flex-col gap-1",children:[g,y]}),t[21]=g,t[22]=y,t[23]=j):j=t[23];let B;t[24]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx(Re,{}),t[24]=B):B=t[24];let S;t[25]!==k.updates||t[26]!==f||t[27]!==o.slug||t[28]!==p||t[29]!==c?(S=r.jsx(fe,{waiting:c,tasks:p,mentions:k.updates,index:f,orgSlug:o.slug}),t[25]=k.updates,t[26]=f,t[27]=o.slug,t[28]=p,t[29]=c,t[30]=S):S=t[30];let _;t[31]!==o.slug||t[32]!==v?(_=r.jsx(ue,{recent:v,orgSlug:o.slug}),t[31]=o.slug,t[32]=v,t[33]=_):_=t[33];let w;t[34]!==p?(w=r.jsx(ge,{tasks:p}),t[34]=p,t[35]=w):w=t[35];let C;return t[36]!==_||t[37]!==w||t[38]!==j||t[39]!==S?(C=r.jsxs("div",{className:"flex flex-col gap-8",children:[j,B,S,_,w]}),t[36]=_,t[37]=w,t[38]=j,t[39]=S,t[40]=C):C=t[40],C}function Ke(){const e=M.c(25),t=Z(),[i]=X(),s=le("home_task_intake_enabled"),{data:a}=V.useSession(),{granted:n}=re("agents:manage");let l,o,D;if(e[0]!==i.language||e[1]!==a?.user?.name||e[2]!==t){const c=new Date,b=ze(a?.user?.name);o=Oe(c.getHours());const g=Ze[o];l=Ge(i.language,c),D=b?t(g.named,{name:b}):t(g.bare),e[0]=i.language,e[1]=a?.user?.name,e[2]=t,e[3]=l,e[4]=o,e[5]=D}else l=e[3],o=e[4],D=e[5];const h=D;let d;e[6]!==n?(d=n&&r.jsx(ke,{source:"org_home_header"}),e[6]=n,e[7]=d):d=e[7];let p;e[8]!==d?(p=r.jsx(R.Actions,{children:d}),e[8]=d,e[9]=p):p=e[9];let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(pe,{}),e[10]=k):k=e[10];let v;e[11]!==s?(v=s&&r.jsx(z.Suspense,{fallback:null,children:r.jsx(ae,{children:r.jsx(me,{children:r.jsx(se,{homeTaskComposer:!0})})})}),e[11]=s,e[12]=v):v=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Ve,{}),e[13]=x):x=e[13];let u;e[14]!==n||e[15]!==l||e[16]!==h||e[17]!==o?(u=r.jsx(z.Suspense,{fallback:x,children:r.jsx(qe,{canManageProjects:n,eyebrow:l,greeting:h,slot:o})}),e[14]=n,e[15]=l,e[16]=h,e[17]=o,e[18]=u):u=e[18];let f;e[19]!==v||e[20]!==u?(f=r.jsx(R.Content,{children:r.jsxs(R.Container,{width:"wide",className:"flex min-h-full flex-col gap-10",children:[k,v,u]})}),e[19]=v,e[20]=u,e[21]=f):f=e[21];let m;return e[22]!==p||e[23]!==f?(m=r.jsxs(R,{children:[p,f]}),e[22]=p,e[23]=f,e[24]=m):m=e[24],m}function Zo(){const e=M.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(ne.Content,{children:r.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Zo as default};
@@ -1 +1 @@
1
- import{c as A,b as B,a6 as q,at as ne,j as o,m as K,L as P,E as V,an as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-OSvXQU0Z.js";import{i as Z}from"./ArrowRight-BTBfkPne.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-8z4sGhvS.js";import{u as xe}from"./use-api-keys-TWl5p8YB.js";import{u as pe,t as ge}from"./use-task-board-items-Cu-LAjNo.js";import{i as he}from"./AlertCircle-DwSzq5uM.js";import{i as Q}from"./CheckCircle-CQXVMLht.js";import{s as je}from"./Eye-B7bHPNlI.js";import{v as ve,A as ke}from"./agent-icon-Cm7N0-bv.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-BySfFX3r.js";import{P as Se}from"./project-icon-Cmr6SrmT.js";import{T as X,P as Ce,A as Ie}from"./project-apps-Dgu7yO2X.js";import{a as Te}from"./config-il-mrtJw.js";import{t as ze}from"./task-route-BXv3go2m.js";import{p as $e}from"./project-index-UVS3LS58.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-DAnz5NH_.js";import{R as De}from"./ReferenceLine-c20DchWo.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-CEwlJSS3.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
1
+ import{c as A,b as B,a6 as q,at as ne,j as o,m as K,L as P,E as V,an as oe,V as re,h as ae,ag as ie,$ as le,o as ce}from"./index-BmFua4_V.js";import{i as Z}from"./ArrowRight-pWGgV3sk.js";import{C as me,a as fe,b as de,c as ue}from"./connect-key-CPt8mh8U.js";import{u as xe}from"./use-api-keys-Cxi_5Vd-.js";import{u as pe,t as ge}from"./use-task-board-items--V3JyFqK.js";import{i as he}from"./AlertCircle-DAO8Cblw.js";import{i as Q}from"./CheckCircle-TiszLk0g.js";import{s as je}from"./Eye-CpYkFfrM.js";import{v as ve,A as ke}from"./agent-icon-0bk2UcIS.js";import{C as be,a as we,B as ye,b as Ne,c as _e}from"./chart-qPtsM-po.js";import{P as Se}from"./project-icon-DQECQJRO.js";import{T as X,P as Ce,A as Ie}from"./project-apps-BjG-gQ2D.js";import{a as Te}from"./config-DmE-h3o5.js";import{t as ze}from"./task-route-Ch0tFEd1.js";import{p as $e}from"./project-index-Bh9jfwR8.js";import{a as Re,b as Ee,c as Ae,d as Me,R as F,f as G}from"./daily-pulse-B1DjserV.js";import{R as De}from"./ReferenceLine-CN7wd2Ky.js";import{C as Le,X as Be,Y as Ke}from"./CartesianChart-vfIUAkaA.js";const ee=[{name:"Claude",Icon:me,size:[11,14],bg:"#D97757",fg:"#fff"},{name:"Cursor",Icon:fe,size:[10,12],bg:"#000",fg:"#fff"},{name:"Codex",Icon:de,size:[10,12],bg:"#4F46E5",fg:"#fff"}];function wt(t){const e=A.c(22),{dense:a}=t,s=a===void 0?!0:a,l=B(),{org:n}=q();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];const c=s?"h-7 shrink-0 gap-x-2 whitespace-nowrap pl-3 pr-1.5":"flex-wrap gap-x-3 gap-y-2 py-1.5 pl-4 pr-2.5";let r;e[2]!==c?(r=K("group hidden max-w-full @3xl/panel-header:inline-flex items-center justify-center rounded-full bg-card text-sm shadow-edge transition-colors hover:bg-accent",c),e[2]=c,e[3]=r):r=e[3];let m;e[4]!==l?(m=l("home.orgHome.connectPill"),e[4]=l,e[5]=m):m=e[5];let d;e[6]!==m?(d=o.jsx("span",{className:"font-medium text-foreground",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==s?(f=ee.map(j=>{const{name:v,Icon:z,size:_,bg:S,fg:$}=j;return o.jsx("span",{title:v,className:K("flex items-center justify-center rounded-full",s?"size-5":"size-6"),style:{backgroundColor:S,color:$},children:o.jsx(z,{size:s?_[0]:_[1]})},v)}),e[8]=s,e[9]=f):f=e[9];let u;e[10]!==f?(u=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:f}),e[10]=f,e[11]=u):u=e[11];const x=s?"size-3":"size-3.5";let p;e[12]!==x?(p=K(x,"shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"),e[12]=x,e[13]=p):p=e[13];let g;e[14]!==p?(g=o.jsx(Z,{className:p}),e[14]=p,e[15]=g):g=e[15];let h;return e[16]!==g||e[17]!==i||e[18]!==r||e[19]!==d||e[20]!==u?(h=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Oe,className:r,children:[d,u,g]}),e[16]=g,e[17]=i,e[18]=r,e[19]=d,e[20]=u,e[21]=h):h=e[21],h}function Oe(){return V("connect_clients_opened",{source:"org_home"})}function yt(){const t=A.c(13),e=B(),{org:a}=q(),{granted:s}=ne("api-keys:manage");let l;t[0]!==s?(l={enabled:s},t[0]=s,t[1]=l):l=t[1];const{data:n}=xe(l);if(s&&!n||n?.some(Fe))return null;let i;t[2]!==a.slug?(i={org:a.slug},t[2]=a.slug,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":"true",className:"flex items-center gap-1",children:ee.map(Ye)}),t[4]=c):c=t[4];let r;t[5]!==e?(r=e("home.orgHome.connectPill"),t[5]=e,t[6]=r):r=t[6];let m;t[7]!==r?(m=o.jsx("span",{className:"font-medium text-foreground",children:r}),t[7]=r,t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Z,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"}),t[9]=d):d=t[9];let f;return t[10]!==i||t[11]!==m?(f=o.jsxs(P,{to:"/$org/settings/connect",params:i,onClick:Pe,className:"group hidden items-center gap-3 rounded-xl bg-card px-4 py-2.5 text-sm shadow-edge transition-colors hover:bg-accent md:flex",children:[c,m,d]}),t[10]=i,t[11]=m,t[12]=f):f=t[12],f}function Ye(t){const{name:e,Icon:a,size:s,bg:l,fg:n}=t;return o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full",style:{backgroundColor:l,color:n},children:o.jsx(a,{size:s[0]})},e)}function Pe(){return V("connect_clients_opened",{source:"org_home"})}function Fe(t){return t.name.startsWith(ue)}function Nt(){const t=A.c(3),{locator:e}=q(),a=oe();pe();let s;t[0]!==e||t[1]!==a?(s=ge(e,a),t[0]=e,t[1]=a,t[2]=s):s=t[2];const{data:l}=re(s);return l.items}function _t(t){const e=A.c(16),{recent:a,orgSlug:s}=t,l=B();let n,i,c,r;if(e[0]!==s||e[1]!==a||e[2]!==l){r=Symbol.for("react.early_return_sentinel");e:{let d;e[7]!==s||e[8]!==l?(d=u=>{const x={org:s,agentId:u.projectId};if(u.connection){const{label:g,icon:h,id:j,toolName:v}=u.connection;return[{key:`${j}:${v}:${u.projectId}`,label:g,project:u.projectTitle,link:{to:le.app,params:{...x,connectionId:j,toolName:v}},glyph:o.jsx(ke,{icon:h,name:g,size:"md",className:X})}]}const p=Ce[u.app];return p?[{key:`${u.app}:${u.projectId}`,label:l(p.labelKey),project:u.projectTitle,link:{to:p.to,params:x},glyph:o.jsx("span",{className:K(X,"flex items-center",p.tone),children:o.jsx(p.Icon,{size:24})})}]:[]},e[7]=s,e[8]=l,e[9]=d):d=e[9];const f=a.slice(0,8).flatMap(d);if(f.length===0){r=null;break e}n=Ie,e[10]!==l?(i=l("home.overview.recentApps"),e[10]=l,e[11]=i):i=e[11],c=f.map(Ue)}e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r}else n=e[3],i=e[4],c=e[5],r=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;let m;return e[12]!==n||e[13]!==i||e[14]!==c?(m=o.jsx(n,{title:i,children:c}),e[12]=n,e[13]=i,e[14]=c,e[15]=m):m=e[15],m}function Ue(t){return o.jsxs(P,{to:t.link.to,params:t.link.params,className:"group flex shrink-0 flex-col items-center gap-2.5 rounded-xl p-3 text-center transition-[background-color,transform] duration-150 ease-out hover:bg-accent active:scale-[0.97]",children:[t.glyph,o.jsxs("span",{className:"flex w-full min-w-0 flex-col",children:[o.jsx("span",{className:"line-clamp-2 text-xs font-medium break-words text-foreground",children:t.label}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.project})]})]},t.key)}function He(t,e){return{to:ie.tasks,params:{org:t,taskKey:ze(t,e)}}}const Qe={answer:{Icon:ve,tone:"text-warning",reasonKey:"home.needsYou.reasonAnswer"},failed:{Icon:he,tone:"text-destructive",reasonKey:"home.overview.reasonFailed"},review:{Icon:je,tone:"text-warning",reasonKey:"home.needsYou.reasonReview"},running:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.overview.reasonRunning"},assigned:{Icon:Q,tone:"text-muted-foreground",reasonKey:"home.needsYou.reasonAssigned"}},J=["answer","failed","review","running","assigned"];function qe(t,e){const a=new Set,s=[],l=(n,i)=>{a.has(n.id)||(a.add(n.id),s.push({task:n,kind:i}))};for(const n of t)l(n,Re(n));for(const n of e){if(n.status==="done"||n.status==="archived")continue;const i=Te(n);i==="failed"?l(n,"failed"):i==="running"&&l(n,"running")}return s.sort((n,i)=>J.indexOf(n.kind)-J.indexOf(i.kind))}function Xe(t,e){const a=new Map;for(const r of e){if(r.action!=="mentioned"&&r.action!=="commented")continue;const m=a.get(r.taskBoardItemId);(!m||m.action!=="mentioned"&&r.action==="mentioned")&&a.set(r.taskBoardItemId,r)}const s=new Set(t.map(r=>r.task.id)),l=[...a.values()].filter(r=>!s.has(r.taskBoardItemId)).map(r=>({kind:"mention",task:null,mention:r})),n=t.map(({task:r,kind:m})=>({kind:m,task:r,mention:a.get(r.id)??null})),i=n.filter(r=>r.kind==="answer"),c=n.filter(r=>r.kind!=="answer");return[...i,...l,...c]}const Ge=7;function W(t){const e=A.c(6),{mention:a}=t,s=B();let l;e[0]!==a.actorName||e[1]!==s?(l=a.actorName??s("home.overview.someone"),e[0]=a.actorName,e[1]=s,e[2]=l):l=e[2];const n=l,i=a.actorImage??void 0;let c;return e[3]!==n||e[4]!==i?(c=o.jsx(ce,{url:i,fallback:n,shape:"circle",size:"2xs"}),e[3]=n,e[4]=i,e[5]=c):c=e[5],c}function Je(t,e){const a=t.actorName??e("home.overview.someone");return e(t.action==="mentioned"?"home.overview.mentioned":"home.overview.commented",{actor:a})}function St(t){const e=A.c(12),{waiting:a,tasks:s,mentions:l,index:n,orgSlug:i}=t,c=B();let r;if(e[0]!==n||e[1]!==l||e[2]!==i||e[3]!==c||e[4]!==s||e[5]!==a){const m=Xe(qe(a,s),l);let d;e[7]!==c?(d=c("home.overview.forYou"),e[7]=c,e[8]=d):d=e[8];const f=m.length>0&&o.jsx("span",{className:"text-muted-foreground tabular-nums",children:m.length});let u;e[9]!==d||e[10]!==f?(u=o.jsxs("h2",{className:"flex items-center gap-2 px-2 pt-1 pb-1 text-sm font-medium text-foreground",children:[d,f]}),e[9]=d,e[10]=f,e[11]=u):u=e[11],r=o.jsxs("section",{className:"flex flex-col gap-2 surface p-3",children:[u,m.length===0?o.jsxs("div",{className:"flex flex-col items-center gap-3 px-2 py-10 text-center",children:[o.jsx("span",{className:"flex size-10 items-center justify-center rounded-full bg-success/10 text-success",children:o.jsx(Q,{size:20})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:c("home.overview.allClearTitle")}),o.jsx("p",{className:"text-sm text-muted-foreground",children:c("home.overview.allClearDescription")})]})]}):o.jsx("div",{className:"flex flex-col",children:m.slice(0,Ge).map(x=>{const p=x.kind==="mention"?{id:x.mention.taskBoardItemId,keySeq:x.mention.taskKeySeq,title:x.mention.taskTitle}:x.task,g=x.task?$e(x.task,n):null,h=x.kind==="mention"?null:Qe[x.kind],j=x.mention?Je(x.mention,c):h?c(h.reasonKey):"";return o.jsxs(P,{...He(i,p),className:"group flex h-10 items-center gap-3 rounded-lg px-2 transition-colors hover:bg-accent",children:[o.jsx("span",{"aria-hidden":"true",className:K("flex size-4 shrink-0 items-center justify-center",h?.tone),children:x.kind==="mention"?o.jsx(W,{mention:x.mention}):x.kind==="running"?o.jsx(ae,{className:"size-3.5"}):h?o.jsx(h.Icon,{size:16}):null}),o.jsx("span",{className:"min-w-0 truncate text-sm text-foreground",children:p.title}),o.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-sm text-muted-foreground",children:[x.kind!=="mention"&&x.mention&&o.jsx("span",{"aria-hidden":"true",children:o.jsx(W,{mention:x.mention})}),o.jsx("span",{className:"truncate",children:j})]}),g&&o.jsxs("span",{className:"hidden max-w-48 shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex",children:[o.jsx(Se,{icon:g.icon,name:g.title}),o.jsx("span",{className:"truncate",children:g.title})]})]},p.id)})})]}),e[0]=n,e[1]=l,e[2]=i,e[3]=c,e[4]=s,e[5]=a,e[6]=r}else r=e[6];return r}function We(t){if(t<=0)return 1;const e=10**Math.floor(Math.log10(t));for(const a of[1,2,2.5,5,10])if(a*e>=t)return a*e;return 10*e}const Ve=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function U(t){const e=A.c(52),{series:a,start:s,format:l,label:n,averageLabel:i}=t,c=We(Math.max(...a,0));let r;e[0]!==a?(r=a.length===0?0:a.reduce(et,0)/a.length,e[0]=a,e[1]=r):r=e[1];const m=r;let d;if(e[2]!==a||e[3]!==s){let E;e[5]!==s?(E=(te,se)=>({day:Ve.format(new Date(s.getTime()+se*864e5)),value:te}),e[5]=s,e[6]=E):E=e[6],d=a.map(E),e[2]=a,e[3]=s,e[4]=d}else d=e[4];const f=d,u=Math.max(f.length-1,0),x=f[0]?.day;let p;e[7]!==u||e[8]!==f?(p=f[Math.round(u/2)]?.day,e[7]=u,e[8]=f,e[9]=p):p=e[9];const g=f[u]?.day;let h;e[10]!==x||e[11]!==p||e[12]!==g?(h=[x,p,g].filter(Ze),e[10]=x,e[11]=p,e[12]=g,e[13]=h):h=e[13];const j=h;let v;e[14]!==n?(v={value:{label:n,color:"var(--chart-1)"}},e[14]=n,e[15]=v):v=e[15];const z=v;let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_={top:8,right:0,bottom:0,left:0},e[16]=_):_=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Le,{vertical:!1,strokeDasharray:"4 4",stroke:"var(--border)"}),e[17]=S):S=e[17];let $,R;e[18]===Symbol.for("react.memo_cache_sentinel")?($={stroke:"var(--border)"},R={fontSize:12,fill:"var(--muted-foreground)"},e[18]=$,e[19]=R):($=e[18],R=e[19]);let b;e[20]!==j?(b=o.jsx(Be,{dataKey:"day",ticks:j,interval:"preserveStartEnd",tickLine:!1,axisLine:$,tick:R,tickMargin:8}),e[20]=j,e[21]=b):b=e[21];let I;e[22]!==c?(I=[0,c],e[22]=c,e[23]=I):I=e[23];const T=c/2;let w;e[24]!==c||e[25]!==T?(w=[0,T,c],e[24]=c,e[25]=T,e[26]=w):w=e[26];let y;e[27]!==l?(y=E=>E===0?"0":l(E),e[27]=l,e[28]=y):y=e[28];let M;e[29]===Symbol.for("react.memo_cache_sentinel")?(M={fontSize:12,fill:"var(--muted-foreground)"},e[29]=M):M=e[29];let N;e[30]!==I||e[31]!==w||e[32]!==y?(N=o.jsx(Ke,{orientation:"right",domain:I,ticks:w,tickFormatter:y,tickLine:!1,axisLine:!1,tick:M,width:44}),e[30]=I,e[31]=w,e[32]=y,e[33]=N):N=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C={fill:"var(--muted)",opacity:.6},e[34]=C):C=e[34];let k;e[35]!==l||e[36]!==n?(k=o.jsx(be,{cursor:C,content:o.jsx(we,{indicator:"line",formatter:E=>o.jsxs("div",{className:"flex flex-1 items-center justify-between gap-3 leading-none",children:[o.jsx("span",{className:"text-muted-foreground",children:n}),o.jsx("span",{className:"font-medium text-foreground tabular-nums",children:l(Number(E))})]})})}),e[35]=l,e[36]=n,e[37]=k):k=e[37];let D;e[38]!==m||e[39]!==i||e[40]!==l?(D=m>0&&o.jsx(De,{y:m,stroke:"var(--foreground)",strokeOpacity:.6,strokeDasharray:"2 2",label:{value:i(l(m)),position:"insideBottomLeft",fontSize:12,fill:"var(--foreground)"}}),e[38]=m,e[39]=i,e[40]=l,e[41]=D):D=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx(ye,{dataKey:"value",fill:"var(--color-value)",radius:[2,2,0,0],maxBarSize:4,animationDuration:300}),e[42]=O):O=e[42];let L;e[43]!==f||e[44]!==b||e[45]!==N||e[46]!==k||e[47]!==D?(L=o.jsxs(Ne,{data:f,margin:_,barCategoryGap:"30%",children:[S,b,N,k,D,O]}),e[43]=f,e[44]=b,e[45]=N,e[46]=k,e[47]=D,e[48]=L):L=e[48];let Y;return e[49]!==z||e[50]!==L?(Y=o.jsx(_e,{config:z,className:"aspect-auto h-[159px] w-full",children:L}),e[49]=z,e[50]=L,e[51]=Y):Y=e[51],Y}function Ze(t){return!!t}function et(t,e){return t+e}function H(t){const e=A.c(10),{label:a,value:s,chart:l}=t;let n;e[0]!==a?(n=o.jsx("span",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let i;e[2]!==s?(i=o.jsx("span",{className:"text-[32px] leading-none font-medium tracking-tight tabular-nums text-foreground",children:s}),e[2]=s,e[3]=i):i=e[3];let c;e[4]!==n||e[5]!==i?(c=o.jsxs("div",{className:"flex flex-col gap-2.5",children:[n,i]}),e[4]=n,e[5]=i,e[6]=c):c=e[6];let r;return e[7]!==l||e[8]!==c?(r=o.jsxs("section",{className:"flex flex-col gap-6 surface p-5",children:[c,l]}),e[7]=l,e[8]=c,e[9]=r):r=e[9],r}function Ct(t){const e=A.c(58),{tasks:a}=t,s=B();let l,n,i,c,r,m,d,f,u;if(e[0]!==s||e[1]!==a){const j=Ee(a,F),v=Ae(a,F);i=Me(a);const z=st;let _,S;if(e[11]===Symbol.for("react.memo_cache_sentinel")){const k=new Date;S=new Date(k.getFullYear(),k.getMonth(),k.getDate()-(F-1)),_=new Date(k.getFullYear(),k.getMonth(),1),e[11]=_,e[12]=S}else _=e[11],S=e[12];c=_;const $=tt;let R;e[13]!==s?(R=k=>s("home.overview.average",{value:k}),e[13]=s,e[14]=R):R=e[14],n=R,d="grid gap-4 md:grid-cols-3";let b;e[15]!==s?(b=s("home.overview.delivered"),e[15]=s,e[16]=b):b=e[16];const I=String(z(j));let T;e[17]!==s?(T=s("home.overview.delivered"),e[17]=s,e[18]=T):T=e[18];let w;e[19]!==n||e[20]!==j||e[21]!==T?(w=o.jsx(U,{label:T,series:j,start:S,format:$,averageLabel:n}),e[19]=n,e[20]=j,e[21]=T,e[22]=w):w=e[22],e[23]!==w||e[24]!==b||e[25]!==I?(f=o.jsx(H,{label:b,value:I,chart:w}),e[23]=w,e[24]=b,e[25]=I,e[26]=f):f=e[26];let y;e[27]!==s?(y=s("home.overview.agentRuns"),e[27]=s,e[28]=y):y=e[28];const M=String(z(v));let N;e[29]!==s?(N=s("home.overview.agentRuns"),e[29]=s,e[30]=N):N=e[30];let C;e[31]!==n||e[32]!==v||e[33]!==N?(C=o.jsx(U,{label:N,series:v,start:S,format:$,averageLabel:n}),e[31]=n,e[32]=v,e[33]=N,e[34]=C):C=e[34],e[35]!==y||e[36]!==M||e[37]!==C?(u=o.jsx(H,{label:y,value:M,chart:C}),e[35]=y,e[36]=M,e[37]=C,e[38]=u):u=e[38],l=H,e[39]!==s?(r=s("home.overview.agentCost"),e[39]=s,e[40]=r):r=e[40],m=G(z(i)),e[0]=s,e[1]=a,e[2]=l,e[3]=n,e[4]=i,e[5]=c,e[6]=r,e[7]=m,e[8]=d,e[9]=f,e[10]=u}else l=e[2],n=e[3],i=e[4],c=e[5],r=e[6],m=e[7],d=e[8],f=e[9],u=e[10];let x;e[41]!==s?(x=s("home.overview.agentCost"),e[41]=s,e[42]=x):x=e[42];let p;e[43]!==n||e[44]!==i||e[45]!==c||e[46]!==x?(p=o.jsx(U,{label:x,series:i,start:c,format:G,averageLabel:n}),e[43]=n,e[44]=i,e[45]=c,e[46]=x,e[47]=p):p=e[47];let g;e[48]!==l||e[49]!==r||e[50]!==m||e[51]!==p?(g=o.jsx(l,{label:r,value:m,chart:p}),e[48]=l,e[49]=r,e[50]=m,e[51]=p,e[52]=g):g=e[52];let h;return e[53]!==d||e[54]!==f||e[55]!==u||e[56]!==g?(h=o.jsxs("div",{className:d,children:[f,u,g]}),e[53]=d,e[54]=f,e[55]=u,e[56]=g,e[57]=h):h=e[57],h}function tt(t){return String(Math.round(t*10)/10)}function st(t){return t.reduce(nt,0)}function nt(t,e){return t+e}export{yt as C,St as F,Ct as M,_t as R,wt as a,Nt as u};
@@ -1 +1 @@
1
- import{f$ as q,eE as B,g0 as U,c as J,r as Y,fR as P,fS as M,fX as K,fT as N,K as V,fU as X,fW as z,fV as G,fP as R}from"./index-OSvXQU0Z.js";import{ax as Z,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-DBxnFIyu.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-C_JjB7qS.js";async function ce(e,t){return e.inDraft?e.value===void 0?B:U(e.value):await q(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=J.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return X({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];_(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!_(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function $(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function H(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function T(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:$(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function W(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:$(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=W(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Se(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await q(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Me(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===B);if(m.length>0){try{if(!M())throw new p(!0);r=await T(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!M())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const S=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=H(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await T(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=W(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const Q=h.pointers.length===0?h.merged:K(h,b),j=he(d,Q,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return S(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw S(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function _(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,$ as e,ge as f,Ce as g,ce as h,Me as i,pe as j,Se as k,he as l,we as m,de as p,De as u};
1
+ import{f$ as q,eE as B,g0 as U,c as J,r as Y,fR as P,fS as M,fX as K,fT as N,K as V,fU as X,fW as z,fV as G,fP as R}from"./index-BmFua4_V.js";import{ax as Z,au as x,aF as ee,av as te,aw as C,aJ as ne,ay as re,aA as se}from"./site-editor-toast-XhGY7zwS.js";import{a5 as F,ak as oe,a8 as ie,a4 as ae}from"./blocks-tab-states-C8EhNA94.js";async function ce(e,t){return e.inDraft?e.value===void 0?B:U(e.value):await q(null,e.value,t)??null}class Ce{constructor(t){this.now=t,this.loaded=t()}now;copies=new Map;generations=new Map;loaded;settle(){this.loaded||(this.loaded=this.now())}get(t){const n=this.copies.get(t);if(n)return n;if(this.loaded)return{value:this.loaded.blocks[t],inDraft:this.loaded.versionOf(t)!==null}}generation(t){return this.generations.get(t)??0}edited(t){return{generation:this.generation(t),copy:this.get(t)}}guardOf(t,n){return n&&n.generation!==this.generation(t)?n.copy:this.get(t)}hold(t){this.generations.set(t,this.generation(t)+1);const n=this.now();!n||!Object.hasOwn(n.blocks,t)||this.copies.set(t,{value:n.blocks[t],inDraft:n.versionOf(t)!==null})}saved(t,n){this.copies.set(t,{value:n,inDraft:!0})}}const g=new Map,k=new Set,E=new Map;function ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Ee(e,t){const n=new Map(g.get(e)??E);n.set(t,(n.get(t)??0)+1),g.set(e,n);for(const s of k)s()}function le(e){return k.add(e),()=>k.delete(e)}const A=new WeakMap;function fe(e){let t=A.get(e);return t||(t=n=>e.get(n)??0,A.set(e,t)),t}function De(e){const t=J.c(5);let n,s;t[0]!==e?(n=()=>g.get(e)??E,s=()=>g.get(e)??E,t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);const r=Y.useSyncExternalStore(le,n,s);let o;return t[3]!==r?(o=fe(r),t[3]=r,t[4]=o):o=t[4],o}class p extends Error{constructor(t){super("kept their version"),this.deleted=t,this.name="HostedKeptTheirsError"}deleted}const ue=3;function de(e,t,n,s){const r={},o={},i={};for(const a of e)t&&Object.hasOwn(t,a)&&(r[a]=t[a]),Object.hasOwn(n.writes,a)&&(o[a]=n.writes[a]),Object.hasOwn(s,a)&&(i[a]=s[a]);return X({ancestor:r,mine:o,theirs:i})}function he(e,t,n){const s={},r=[];for(const o of e){const i=t[o];_(i)?s[o]=i:Object.hasOwn(n,o)&&r.push(o)}return{writes:s,deletes:r}}function we(e,t){for(const[n,s]of Object.entries(e.writes))if(!Object.hasOwn(t,n)||R(t[n])!==R(s))return!1;return e.deletes.every(n=>!Object.hasOwn(t,n))}function Oe(e,t){if(!_(t))return null;if(F(e,t))return oe(t);const n=typeof t.name=="string"?t.name.trim():"";return n&&n!==e?n:I(e)}function I(e){const t=F(e);if(t)return ie(t);const n=e.split("/").pop()??e;return ae(n).trim()||n}function $(e,...t){for(const n of t){const s=Oe(e,n);if(s)return s}return I(e)}function H(e,t,n){return Object.keys(e.writes).some(r=>!t||!Object.hasOwn(t,r))?e.deletes.filter(r=>!Object.hasOwn(e.writes,r)&&n(r)):[]}async function T(e,t,n){const s=Object.keys(e.writes).filter(i=>!t||!Object.hasOwn(t,i)).map(i=>e.writes[i]),r=n[0];if(await N({kind:"theyDeleted",label:$(r,t?.[r],...s)})==="theirs")throw new p(!0);return{writes:e.writes,deletes:e.deletes.filter(i=>!n.includes(i))}}function W(e){if(e.pointers.length!==1)return null;const t=e.pointers[0],n=t.split("/");if(n.length!==2)return null;const s=n[1].replaceAll("~1","/").replaceAll("~0","~"),r=e.mine[s],o=e.theirs[s];return r===void 0==(o===void 0)?null:{pointer:t,conflict:{kind:o===void 0?"theyDeleted":"youDeleted",label:$(s,r,o,e.ancestor[s])}}}async function pe(e,t,n,s){const r=W(e);if(r)return{[r.pointer]:await N(r.conflict)};const o=z(e,t);return G(e,s?o.map(s):o,n?.author?{...n,author:{...n.author,keyed:!0}}:n)}function Se(e){const t=e.split("/")[1];return t?t.replaceAll("~1","/").replaceAll("~0","~"):null}function ge(e){const t=Object.values(e);return t.length>0&&t.every(n=>n==="theirs")}async function ve(e,t,n){const s=o=>se(e.queryClient,e.cacheKey,o,e.backend);if(t.some(o=>s(o)===void 0))try{await te(e.queryClient,e.backend,e.params,e.cacheKey)}catch{throw new C}const r={};for(const o of t){const i=s(o);if(i===void 0)throw new C;const a=n&&Object.hasOwn(n,o)?await q(i,n[o],P(e.queryClient,e.cacheKey,o)):i;if(a===void 0)throw new C;r[o]=a}return r}async function me(e,t,n,s){if(s&&w(e,t,r=>Object.hasOwn(s,r)?{value:s[r]}:null),!ne(e.queryClient,e.backend,e.cacheKey,n))for(const r of t)await re(e.queryClient,e.backend,e.params,e.cacheKey,r,n);return e.queryClient.getQueryData(V.decofile(e.cacheKey))??{}}async function Me(e,t,n,s){let r=t;const o=s?Object.keys(s):[];let i=o.length===0?n:{...n,...Object.fromEntries(o.map(a=>[a,s[a].value]))};for(let a=0;;a++){const v=r.deletes.filter(l=>!Object.hasOwn(r.writes,l)),d=[...Object.keys(r.writes),...v],O=await ve(e,d,a===0?i:void 0);if(a===0)for(const l of o)Object.hasOwn(O,l)&&(O[l]=await ce(s[l],P(e.queryClient,e.cacheKey,l)));const m=H(r,i,l=>O[l]===B);if(m.length>0){try{if(!M())throw new p(!0);r=await T(r,i,m)}catch(l){throw w(e,d,c=>m.includes(c)||!i||!Object.hasOwn(i,c)?null:{value:i[c]}),l}continue}try{const l=await Z(e.queryClient,e.backend,e.params,e.cacheKey,{set:r.writes,...v.length>0?{delete:v}:{}},O);return w(e,d,c=>Object.hasOwn(r.writes,c)?{value:r.writes[c]}:null),{...l,change:r}}catch(l){if(!x(l))throw l;const c=await me(e,d,l,i);if(a+1>=ue)throw new ee;if(!M())throw l;const D=Object.keys(r.writes).filter(u=>!i||!Object.hasOwn(i,u)),L=r;w(e,D,u=>({value:L.writes[u]}));const S=()=>w(e,D,u=>Object.hasOwn(c,u)?{value:c[u]}:null);try{const u=H(r,i,f=>!!i&&Object.hasOwn(i,f)&&!Object.hasOwn(c,f));if(u.length>0){r=await T(r,i,u),i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]));continue}const h=de(d,i,r,c),b=h.pointers.length===0?{}:await pe(h),y=W(h);if(y&&b[y.pointer]==="theirs")throw new p(y.conflict.kind==="theyDeleted");const Q=h.pointers.length===0?h.merged:K(h,b),j=he(d,Q,c);if(we(j,c)){if(ge(b))throw new p(d.some(f=>!Object.hasOwn(c,f)));return S(),{revision:"",versions:{},change:j}}r=j,i=Object.fromEntries(d.filter(f=>Object.hasOwn(c,f)).map(f=>[f,c[f]]))}catch(u){throw S(),u}}}}function w(e,t,n){e.queryClient.setQueryData(V.decofile(e.cacheKey),s=>{if(!s)return s;const r={...s};for(const o of t){const i=n(o);i?r[o]=i.value:delete r[o]}return r})}function _(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}export{p as H,ve as a,Ee as b,ke as c,ue as d,$ as e,ge as f,Ce as g,ce as h,Me as i,pe as j,Se as k,he as l,we as m,de as p,De as u};
@@ -1 +1 @@
1
- import{c as f,j as p,B as h}from"./index-OSvXQU0Z.js";import{T as j,a as v,c as T}from"./tooltip-Cprju8cR.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
1
+ import{c as f,j as p,B as h}from"./index-BmFua4_V.js";import{T as j,a as v,c as T}from"./tooltip-CZRZIxk-.js";function B(d){const t=f.c(19);let e,o,i,n,r,a;t[0]!==d?({label:o,tooltipSide:n,variant:r,size:a,children:e,...i}=d,t[0]=d,t[1]=e,t[2]=o,t[3]=i,t[4]=n,t[5]=r,t[6]=a):(e=t[1],o=t[2],i=t[3],n=t[4],r=t[5],a=t[6]);const m=n===void 0?"top":n,u=r===void 0?"ghost":r,x=a===void 0?"icon-sm":a;let s;t[7]!==e||t[8]!==o||t[9]!==i||t[10]!==x||t[11]!==u?(s=p.jsx(j,{asChild:!0,children:p.jsx(h,{"data-slot":"icon-button","aria-label":o,variant:u,size:x,...i,children:e})}),t[7]=e,t[8]=o,t[9]=i,t[10]=x,t[11]=u,t[12]=s):s=t[12];let l;t[13]!==o||t[14]!==m?(l=p.jsx(v,{side:m,children:o}),t[13]=o,t[14]=m,t[15]=l):l=t[15];let c;return t[16]!==s||t[17]!==l?(c=p.jsxs(T,{children:[s,l]}),t[16]=s,t[17]=l,t[18]=c):c=t[18],c}export{B as I};
@@ -1 +1 @@
1
- import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-C_4X9-qJ.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-OSvXQU0Z.js";import{C as k}from"./index-B_ZZ_ftJ.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};
1
+ import{B as H,v as U,ab as S,H as X,ac as Z,f as R,ad as J,ae as Q,p as z}from"./usage-stats-DoFb8ztD.js";import{gE as M,hp as C,gD as P,hq as x,hr as L,hs as V,ht as K,hu as _,gG as A,eX as N,r as p,cd as B}from"./index-BmFua4_V.js";import{C as k}from"./index-CHJQo1pu.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof X){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&Z(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const $=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(M(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(C(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,q=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function j(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){q.has(e)||t.style.removeProperty(j(e))}function mt(t,e,i){q.has(e)||t.style.setProperty(j(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=$({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),B.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),B.createPortal(d,u.current)});export{Tt as B};