decocms 4.518.1 → 4.518.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-Bis8M8cE.js → ActiveShapeUtils-EYkJV7tD.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-CF7oV00-.js → AlertCircle-CzTXJ0ax.js} +1 -1
  3. package/dist/client/assets/{AreaChart-rRgwbDdY.js → AreaChart-8lCOmLfE.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BYRX2oWU.js → ArrowLeft-BQThfb60.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C-Wi5Wp-.js → ArrowUp-DUhCibLH.js} +1 -1
  6. package/dist/client/assets/{BarChart-B-Yzzi8V.js → BarChart-2wCpTPJ2.js} +1 -1
  7. package/dist/client/assets/{Building02-BTo5ALb8.js → Building02-BOLEL9nK.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-D4q-R38l.js → CartesianChart-CmRg3x8T.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-DTvqZVLo.js → CategoricalChart-BtQQT8Ex.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-B7DLXg5D.js → CheckCircle-OCgBlAwW.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-ByVW2vd8.js → ChevronSelectorVertical-DaDJpoIU.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-i4o2LTaN.js → ChevronUp-DtSKb4be.js} +1 -1
  13. package/dist/client/assets/{Copy01-Ck9G4OUr.js → Copy01-DVWv3lef.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-DBL8NXSk.js → CreditCard01-Bw5uGiku.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DGS_x5nz.js → DotsVertical-CEoX1VVK.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-ClwVJba6.js → ErrorBarContext-i8geYMQV.js} +1 -1
  17. package/dist/client/assets/{Globe04-lKXBAfc3.js → Globe04-CMBPkECo.js} +1 -1
  18. package/dist/client/assets/{Image01-Cwrowq3c.js → Image01-D_y3XkIW.js} +1 -1
  19. package/dist/client/assets/{Key01-CEbPGYnm.js → Key01-p2EsnMlr.js} +1 -1
  20. package/dist/client/assets/{Link01-DXqb71Uu.js → Link01-D28gAr0F.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-DhWTb9MO.js → LinkBroken01-Dz2vlPBe.js} +1 -1
  22. package/dist/client/assets/{Minus-C9yYSfDR.js → Minus-DNpWuD14.js} +1 -1
  23. package/dist/client/assets/{Monitor01-BL3DAm_1.js → Monitor01-CYm-wjzD.js} +1 -1
  24. package/dist/client/assets/{Play-CZ7QKkqf.js → Play-cNq95jJS.js} +1 -1
  25. package/dist/client/assets/{Plus-BRxUqR_F.js → Plus-C4rGoU1F.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-D1hjyX4I.js → ReferenceLine-BvmA07RC.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DiO3q0AT.js → SearchMd-BYCOzBqa.js} +1 -1
  28. package/dist/client/assets/{Sector-XuiRQ9ct.js → Sector-23KRNcXn.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-B4aQ0-ny.js → ShoppingBag01-DvN3FHxE.js} +1 -1
  30. package/dist/client/assets/{Sun-DqiY7Z2B.js → Sun-DFIh8Vd-.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-BbdJtypW.js → SwitchHorizontal01-D6mwjnXs.js} +1 -1
  32. package/dist/client/assets/{Tool01-C0vFHYhV.js → Tool01-_CVpzZpk.js} +1 -1
  33. package/dist/client/assets/{Trash01-bhcUMroB.js → Trash01-CgNTH-jr.js} +1 -1
  34. package/dist/client/assets/{Upload01-BwEuXdMa.js → Upload01-CiTZ5ZQQ.js} +1 -1
  35. package/dist/client/assets/{User01-DSs11bSF.js → User01-vLr2BfmM.js} +1 -1
  36. package/dist/client/assets/{UserSquare-DXYtKMfd.js → UserSquare-B7fe7FYj.js} +1 -1
  37. package/dist/client/assets/{Users01-CTqd0ZAH.js → Users01-BgSWeeD_.js} +1 -1
  38. package/dist/client/assets/{XClose-CxYwKo3k.js → XClose-B_rQyiiY.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-D-Ww048N.js → ZoomOut-DzrH576O.js} +1 -1
  40. package/dist/client/assets/{access-gate-Bq22oyfg.js → access-gate-CjdHb0j3.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-CQYwaYCv.js → add-connection-dialog-DyCA7E5B.js} +1 -1
  42. package/dist/client/assets/agent-analytics-C_1r2ktq.js +1 -0
  43. package/dist/client/assets/agent-app-DADhKCUS.js +1 -0
  44. package/dist/client/assets/{agent-assets-4YMODB__.js → agent-assets-AUU4xJcf.js} +1 -1
  45. package/dist/client/assets/{agent-automation-CmK6_mc6.js → agent-automation-H4qJ1HOM.js} +1 -1
  46. package/dist/client/assets/{agent-automations-BCX_o1aB.js → agent-automations-BCHMa4q1.js} +1 -1
  47. package/dist/client/assets/agent-calendar-BIC31eZQ.js +1 -0
  48. package/dist/client/assets/{agent-connect-sources-Bxy4Jo7k.js → agent-connect-sources-DO6Zn3Mx.js} +1 -1
  49. package/dist/client/assets/agent-deck-DfcsXmVh.js +1 -0
  50. package/dist/client/assets/{agent-e2e-BdqM7Rx1.js → agent-e2e-BswlcjA7.js} +1 -1
  51. package/dist/client/assets/agent-experiments-DacDH6n9.js +1 -0
  52. package/dist/client/assets/agent-file-DvvjQBtI.js +1 -0
  53. package/dist/client/assets/{agent-hosting-yUCKeG5I.js → agent-hosting-CgIJCVf2.js} +1 -1
  54. package/dist/client/assets/{agent-icon-CCDPFoN-.js → agent-icon-BVqmbz-P.js} +1 -1
  55. package/dist/client/assets/agent-library-D07m5-2P.js +1 -0
  56. package/dist/client/assets/agent-library-file-CKXkh_Ag.js +1 -0
  57. package/dist/client/assets/agent-monitor-T2Kisepj.js +1 -0
  58. package/dist/client/assets/{agent-overview-D27q04-k.js → agent-overview-BnCn329o.js} +1 -1
  59. package/dist/client/assets/{agent-releases-DhOHbzAx.js → agent-releases-PaWDRDlN.js} +1 -1
  60. package/dist/client/assets/agent-settings-CtpQVMq0.js +1 -0
  61. package/dist/client/assets/{agent-site-editor-CoubOLH6.js → agent-site-editor-Dgv9OUYF.js} +1 -1
  62. package/dist/client/assets/agent-site-editor-code-DEyTlk7z.js +2 -0
  63. package/dist/client/assets/agent-site-editor-content-CO78zdWN.js +1 -0
  64. package/dist/client/assets/agent-site-editor-preview-C8DxePtH.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-BIS7z4mW.js → agent-view-guard-CIz__L_S.js} +1 -1
  66. package/dist/client/assets/agent-view-zDoYJpqf.js +1 -0
  67. package/dist/client/assets/{agents-list-CpVGk57l.js → agents-list-B9ydQIh8.js} +1 -1
  68. package/dist/client/assets/{ai-providers-C8dIcjWL.js → ai-providers-BvGFGpkW.js} +1 -1
  69. package/dist/client/assets/{alert-CmByshZi.js → alert-COKmPgNZ.js} +1 -1
  70. package/dist/client/assets/{alert-dialog-BcRtAren.js → alert-dialog-Bbqu21pF.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-CTEkK2Tf.js → analytics-sections-CXA9Djw5.js} +1 -1
  72. package/dist/client/assets/{analytics-tab-DPVT4KOA.js → analytics-tab-CNbGVSyT.js} +2 -2
  73. package/dist/client/assets/api-keys-rvaVQMbg.js +1 -0
  74. package/dist/client/assets/{api-keys-DYTxKYWP.js → api-keys-zMWE0eW-.js} +1 -1
  75. package/dist/client/assets/{app-editor-C1ZA1u8T.js → app-editor-BnLt2HBc.js} +1 -1
  76. package/dist/client/assets/{asset-utils-DIN0M3zp.js → asset-utils-CQBKR3VN.js} +1 -1
  77. package/dist/client/assets/{auth-vu0NBiVX.js → auth-BypL5L1O.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-vhsgYqnn.js → auth-catchall-BeibfVV0.js} +1 -1
  79. package/dist/client/assets/{auth-entry-C6zNerIy.js → auth-entry-DgsnWxp_.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-DKwsje6s.js → auth-split-layout-Daxd6Ypw.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-Dj1wDkpb.js → authenticate-and-persist-oauth-ClTAD7nN.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-DucKF7kG.js → automation-list-row-CvwYuhxk.js} +1 -1
  83. package/dist/client/assets/{automation-runs-Ui7o3JfN.js → automation-runs-CApbL_Sf.js} +1 -1
  84. package/dist/client/assets/{automations-CmK0evd4.js → automations-Di1Er6hW.js} +1 -1
  85. package/dist/client/assets/{autosend-ClHP6mj3.js → autosend-B4f5gabb.js} +1 -1
  86. package/dist/client/assets/{avatar-BfW8_V1B.js → avatar-CFO-sRGJ.js} +1 -1
  87. package/dist/client/assets/{badge-CqxA0I5-.js → badge-CYEiaJVw.js} +1 -1
  88. package/dist/client/assets/{block-document-l9rZniOP.js → block-document-C4MOQYjr.js} +1 -1
  89. package/dist/client/assets/{blocks-preview-workspace-context-DIzgwExA.js → blocks-preview-workspace-context-Bq9hpUEB.js} +1 -1
  90. package/dist/client/assets/{blocks-tab-states-D014yZyw.js → blocks-tab-states-CwfYFgj9.js} +1 -1
  91. package/dist/client/assets/{blog-schema-p025Q_3k.js → blog-schema-CgYPJyE9.js} +1 -1
  92. package/dist/client/assets/{buckets-C4799eWK.js → buckets-DoEfEinO.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-C9nuC795.js → build-improve-prompt-doc-BByi4O7Q.js} +1 -1
  94. package/dist/client/assets/{calendar-C7UsyFmW.js → calendar-AEesHfNc.js} +1 -1
  95. package/dist/client/assets/{campaigns-view-Cz4ACJMm.js → campaigns-view-DTbZCmg6.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-rgxsCr8U.js → capability-load-error-BfKRzvUM.js} +1 -1
  97. package/dist/client/assets/{category-editor-CldKargp.js → category-editor-sR05FPNS.js} +1 -1
  98. package/dist/client/assets/cdn-tab-9RYVl35J.js +1 -0
  99. package/dist/client/assets/{chart-7lusH4mk.js → chart-D7lvPdFx.js} +1 -1
  100. package/dist/client/assets/{chat-context-DaG-xhpe.js → chat-context-DqNUlJMY.js} +1 -1
  101. package/dist/client/assets/{chat-draft-B4qXFQ20.js → chat-draft-DeylAkNb.js} +1 -1
  102. package/dist/client/assets/{checkbox-k3S7hbYo.js → checkbox-JO6XiJJq.js} +1 -1
  103. package/dist/client/assets/{choose-editor-DhoxAjmj.js → choose-editor-CQPIEsfr.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-9cwHK6DP.js → cli-auth-success-DksDQz1c.js} +1 -1
  105. package/dist/client/assets/{client-icons-XJM50Gvn.js → client-icons-DbBtP136.js} +1 -1
  106. package/dist/client/assets/cms-settings-editor-CD6Fhdzj.js +1 -0
  107. package/dist/client/assets/{collapsible-CCUbGddy.js → collapsible-CXUiqrZ3.js} +1 -1
  108. package/dist/client/assets/{collection-detail-BQphYH0i.js → collection-detail-BXm00G6J.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-DtypHbWr.js → collection-display-button-BYX1WGsT.js} +1 -1
  110. package/dist/client/assets/{collection-search-DFZiZHgj.js → collection-search-CVvFJ5Bb.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-D5vvhE9_.js → collection-table-wrapper-_tytodYv.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-5oBppmJp.js → collection-tabs-8dvqqnDR.js} +1 -1
  113. package/dist/client/assets/{column-rules-DikbPDpl.js → column-rules-iw7Orhw0.js} +1 -1
  114. package/dist/client/assets/{combobox--wUI1bJn.js → combobox-CS_HItwQ.js} +1 -1
  115. package/dist/client/assets/{command-A6J0_nSj.js → command-C9iGFbUT.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-DHW4_WEu.js → companion-mcps-section-DuvDeify.js} +1 -1
  117. package/dist/client/assets/{config-0cyLL49J.js → config-Ba5RPb40.js} +1 -1
  118. package/dist/client/assets/{connect-Bi8fTNRc.js → connect-Q-Yb-tbQ.js} +1 -1
  119. package/dist/client/assets/{connect-layout-BXupI1uo.js → connect-layout-BsURWVqR.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-DUESoily.js → connect-source-dialog-Cugh2Kwq.js} +1 -1
  121. package/dist/client/assets/{connection-card-SGeLl-3V.js → connection-card-C_97TUuR.js} +1 -1
  122. package/dist/client/assets/{connection-detail-8iT2pzkA.js → connection-detail-B2pboQAc.js} +1 -1
  123. package/dist/client/assets/{connection-form-helpers-5dAreg1i.js → connection-form-helpers-B61Y3llL.js} +1 -1
  124. package/dist/client/assets/{connection-DP0Tkqpu.js → connection-y8T_LUE4.js} +1 -1
  125. package/dist/client/assets/{connections-Ba0FzDee.js → connections-BtM211zd.js} +1 -1
  126. package/dist/client/assets/{content-tab-Co7UZ0ue.js → content-tab-6aM6SPfn.js} +3 -3
  127. package/dist/client/assets/{context-DSH71GyO.js → context-Dhzbo3rE.js} +1 -1
  128. package/dist/client/assets/{context-menu-m7JMy9Ts.js → context-menu-DvfYSbOF.js} +1 -1
  129. package/dist/client/assets/{context-shell-CHo3-a1U.js → context-shell-DQlTMTgZ.js} +3 -3
  130. package/dist/client/assets/{core.esm-BT3eS5hh.js → core.esm-Bnj1keGH.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-t8CuAC-D.js → create-organization-dialog-BJw0GqGQ.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-EoXIBNAG.js → daily-pulse-ambOqGdx.js} +1 -1
  133. package/dist/client/assets/{discover-r5fXEWQj.js → discover-BaCG_0h-.js} +1 -1
  134. package/dist/client/assets/{domain-settings-Zd079_oe.js → domain-settings-DvRELpY-.js} +1 -1
  135. package/dist/client/assets/{drawer-BfInv3z-.js → drawer-txFUQcqx.js} +1 -1
  136. package/dist/client/assets/{editor-CpWj2GSL.js → editor-DxbkHv3R.js} +1 -1
  137. package/dist/client/assets/{editor-classes-5vsxGGPA.js → editor-classes-C__SrxMV.js} +1 -1
  138. package/dist/client/assets/{empty-state-BThdzdI0.js → empty-state-BCgDvmX-.js} +1 -1
  139. package/dist/client/assets/{empty-state-C97rGNTx.js → empty-state-bJzQYitF.js} +1 -1
  140. package/dist/client/assets/experiments-tab-DmhKoZxz.js +1 -0
  141. package/dist/client/assets/{experiments-tab-choice-CJxPrnzq.js → experiments-tab-choice-Ie5k_O6x.js} +1 -1
  142. package/dist/client/assets/{extract-connection-data-BJcueAXf.js → extract-connection-data-DrQExIK1.js} +1 -1
  143. package/dist/client/assets/{feature-gate-DOUh8nVg.js → feature-gate-Q2dMtYpF.js} +1 -1
  144. package/dist/client/assets/{feature-paywall-skggPdmN.js → feature-paywall-XpETcjbv.js} +1 -1
  145. package/dist/client/assets/{file-explorer-BB5wuYW2.js → file-explorer-CfVYwLoJ.js} +1 -1
  146. package/dist/client/assets/{file-preview-DYLPzEi6.js → file-preview-Dd06GGvy.js} +1 -1
  147. package/dist/client/assets/{file-share-button-B1svbxuR.js → file-share-button-BxZcqmJb.js} +1 -1
  148. package/dist/client/assets/{file-type-icon-Dh-YpP4t.js → file-type-icon-CIdo5ojc.js} +1 -1
  149. package/dist/client/assets/{folder-icon-CPXfYDTX.js → folder-icon-EiO3M0UC.js} +1 -1
  150. package/dist/client/assets/{form-Diz2j79C.js → form-uqsH1s-y.js} +1 -1
  151. package/dist/client/assets/{general-5pQPx87d.js → general-Vd-hJfIm.js} +1 -1
  152. package/dist/client/assets/{home-Dnlsm-wz.js → home-HWe4c99-.js} +1 -1
  153. package/dist/client/assets/{icon-button-DuuXKRCk.js → icon-button-BUDG7R_U.js} +1 -1
  154. package/dist/client/assets/{index-5O453B2L.js → index-7jvcir73.js} +1 -1
  155. package/dist/client/assets/{index-BvwkkTca.js → index-B4zmwgCj.js} +1 -1
  156. package/dist/client/assets/{index-D2_QRuAQ.js → index-B7PBSrog.js} +1 -1
  157. package/dist/client/assets/{index-Bw7ZdG0V.js → index-BCGh3XTH.js} +1 -1
  158. package/dist/client/assets/{index-CtJ5bSic.js → index-BP0spIbU.js} +1 -1
  159. package/dist/client/assets/{index-DY9jv8u5.js → index-BphI8pNH.js} +4 -4
  160. package/dist/client/assets/{index-Bpjyo8cb.js → index-BtufcGJ5.js} +1 -1
  161. package/dist/client/assets/{index-DPyR1fyZ.js → index-C5xgscqu.js} +1 -1
  162. package/dist/client/assets/{index-CH_rHFJ7.js → index-CW0mTKOH.js} +1 -1
  163. package/dist/client/assets/{index-u06bTyUt.js → index-C_7vDyVA.js} +1 -1
  164. package/dist/client/assets/{index-vOiCoekF.js → index-Codsxxmu.js} +1 -1
  165. package/dist/client/assets/{index-BMri_gPt.js → index-DDtLrgkt.js} +1 -1
  166. package/dist/client/assets/index-MPdUOMBb.css +1 -0
  167. package/dist/client/assets/{index-CjCEGRSu.js → index-kjyiSPIZ.js} +1 -1
  168. package/dist/client/assets/{index-redirect-BF2Ze6CX.js → index-redirect-TlUNx3Dt.js} +1 -1
  169. package/dist/client/assets/{index-hWaEVFzi.js → index-unPBFo0y.js} +1 -1
  170. package/dist/client/assets/{index-fElQwNzQ.js → index-v9zzzqiT.js} +1 -1
  171. package/dist/client/assets/{infiniteQueryObserver-Glyohd4p.js → infiniteQueryObserver-CD6zPv_B.js} +1 -1
  172. package/dist/client/assets/{infra-billing-Bd2bFoZ5.js → infra-billing-gJ1Pxkhj.js} +1 -1
  173. package/dist/client/assets/{input-Ca18CK1P.js → input-DeNGl9cT.js} +1 -1
  174. package/dist/client/assets/{input-F0XP3M77.js → input-otZYQGEr.js} +3 -3
  175. package/dist/client/assets/{integration-icon-BZ0SYBCb.js → integration-icon-C-_9oW7G.js} +1 -1
  176. package/dist/client/assets/{jira-icon-66RPgyoE.js → jira-icon-7kZdJvHs.js} +1 -1
  177. package/dist/client/assets/{label-CUbZuKc3.js → label-BXumUTqC.js} +1 -1
  178. package/dist/client/assets/{layout-Cedqx0JP.js → layout-Ba0KZf90.js} +1 -1
  179. package/dist/client/assets/{legacy-agents-deep-D41zNkt6.js → legacy-agents-deep-D4pxgM1l.js} +1 -1
  180. package/dist/client/assets/{legacy-main-redirect-B7bd3WDG.js → legacy-main-redirect-BQ_7LpiD.js} +1 -1
  181. package/dist/client/assets/library-1V2C8s_K.js +1 -0
  182. package/dist/client/assets/{login-BEUSAD5h.js → login-CtcB6JMd.js} +1 -1
  183. package/dist/client/assets/{markdown-CQTrkEJG.js → markdown-Bqq3R66p.js} +1 -1
  184. package/dist/client/assets/{mcp-app-renderer-CfeFa2D0.js → mcp-app-renderer-tCfKhIA1.js} +1 -1
  185. package/dist/client/assets/{mcp-oauth-DqI-dLnK.js → mcp-oauth-CaTRnuQU.js} +1 -1
  186. package/dist/client/assets/{mcp-oauth-dZFQnVjg.js → mcp-oauth-ZxlBJ_T6.js} +1 -1
  187. package/dist/client/assets/{members-D8letp2p.js → members-Ds3beXMQ.js} +1 -1
  188. package/dist/client/assets/{memory-C9mu7Zkb.js → memory-CgI9n1je.js} +1 -1
  189. package/dist/client/assets/{mini-report-page-JqpGP2GL.js → mini-report-page-C4CjzrcA.js} +1 -1
  190. package/dist/client/assets/{mock-board-BGHy2qG4.js → mock-board-x9OA1kIr.js} +3 -3
  191. package/dist/client/assets/{monaco-editor-nJc5wgpu.js → monaco-editor-DZ2Rp_C7.js} +1 -1
  192. package/dist/client/assets/monitoring-BkpBpvIZ.js +1 -0
  193. package/dist/client/assets/{monitoring-stats-row-BAFX8tUf.js → monitoring-stats-row-tdOtylzh.js} +1 -1
  194. package/dist/client/assets/{multi-select-DpaHzZAz.js → multi-select-BnYAqN90.js} +1 -1
  195. package/dist/client/assets/{mustache-CewpKCP1.js → mustache-DuPMqXPT.js} +1 -1
  196. package/dist/client/assets/{named-rule-uses-939Puzgt.js → named-rule-uses-BFHY2QY4.js} +1 -1
  197. package/dist/client/assets/{named-rule-view-CML2JnRp.js → named-rule-view-DHbEzjpv.js} +1 -1
  198. package/dist/client/assets/{new-project-dialog-BDUYA1Q9.js → new-project-dialog-Cs8HMQlb.js} +1 -1
  199. package/dist/client/assets/{oauth-callback-ClogQ-NW.js → oauth-callback-DSM8XE33.js} +1 -1
  200. package/dist/client/assets/{oauth-callback-ai-provider-aAWOChDT.js → oauth-callback-ai-provider-DgCpBfDW.js} +1 -1
  201. package/dist/client/assets/{onboarding-DkM2lBLt.js → onboarding-DeVuIfK9.js} +1 -1
  202. package/dist/client/assets/{openai-conversation-CnNyoZHy.js → openai-conversation-CXYNFSGC.js} +1 -1
  203. package/dist/client/assets/{optimistic-project-sidebar-views-Dd9HCPLE.js → optimistic-project-sidebar-views-VOTXYU3D.js} +1 -1
  204. package/dist/client/assets/{order-monitor-day-D7yGjq7b.js → order-monitor-day-Bxp4gXEu.js} +1 -1
  205. package/dist/client/assets/{organization-choice-CVq2K-mi.js → organization-choice-BhCIGMjr.js} +1 -1
  206. package/dist/client/assets/{orgs-riRdPSVS.js → orgs-BPDKksL2.js} +1 -1
  207. package/dist/client/assets/{page-seo-form-DHiOVvvv.js → page-seo-form-WBlhJY38.js} +1 -1
  208. package/dist/client/assets/{pair-BiwOJOFx.js → pair-DRaIXAj-.js} +1 -1
  209. package/dist/client/assets/{parse-sections-Ce8e3CyM.js → parse-sections-ClqXxi6i.js} +1 -1
  210. package/dist/client/assets/{plan-Cpl6bs6l.js → plan-DVQ6L_2j.js} +1 -1
  211. package/dist/client/assets/{plan-ladder-DJwAssQD.js → plan-ladder-BJOn0tjJ.js} +1 -1
  212. package/dist/client/assets/{popover-B1ABR0kS.js → popover-D-MLGIKG.js} +1 -1
  213. package/dist/client/assets/{post-calendar-CtSEncUE.js → post-calendar-Ywpfpf68.js} +1 -1
  214. package/dist/client/assets/{post-editor-Cxxxfb0r.js → post-editor-tA48ONL1.js} +1 -1
  215. package/dist/client/assets/{preview-content-ULOD_UZt.js → preview-content-0nJULLLy.js} +1 -1
  216. package/dist/client/assets/{preview-dialog-CZYisvNu.js → preview-dialog-DweVJd_n.js} +1 -1
  217. package/dist/client/assets/{preview-panel-ItJi6Jc0.js → preview-panel-BJ3KrhDy.js} +1 -1
  218. package/dist/client/assets/{preview-tab-B6Q-8P-_.js → preview-tab-C3IiVwf1.js} +3 -3
  219. package/dist/client/assets/{product-picker-dialog-BHrHoQQK.js → product-picker-dialog-CCIg354O.js} +1 -1
  220. package/dist/client/assets/{profile-B6Cd5Dxw.js → profile-ZCnKsIdj.js} +1 -1
  221. package/dist/client/assets/{project-app-view-B1-HxYgX.js → project-app-view-BLZBQKeL.js} +1 -1
  222. package/dist/client/assets/{project-apps-Dler5z99.js → project-apps-FJ0TrEc6.js} +1 -1
  223. package/dist/client/assets/{project-feed-BwWFdPBj.js → project-feed-CZ6ECbBu.js} +1 -1
  224. package/dist/client/assets/{project-icon-BtGD--7Z.js → project-icon-J_TfV9WN.js} +1 -1
  225. package/dist/client/assets/project-reports-IwgSFkuk.js +1 -0
  226. package/dist/client/assets/project-tasks-DIh-1w8l.js +1 -0
  227. package/dist/client/assets/{projects-BbyUgZdk.js → projects-BGlrrPvQ.js} +1 -1
  228. package/dist/client/assets/{projects-empty-state-cl5VGT1T.js → projects-empty-state-B699jX9t.js} +1 -1
  229. package/dist/client/assets/{prompts-C7IgVGhQ.js → prompts-CL3pb_We.js} +1 -1
  230. package/dist/client/assets/record-editor-v6loIaK5.js +1 -0
  231. package/dist/client/assets/{redirect-editor-DGmg8IhI.js → redirect-editor-DwpwMdsP.js} +1 -1
  232. package/dist/client/assets/{releases-api-CS8wgmr5.js → releases-api-DX2L3yOb.js} +1 -1
  233. package/dist/client/assets/reports-VklqwHN4.js +1 -0
  234. package/dist/client/assets/{reports-J6WeamZr.js → reports-fz3ShzPV.js} +1 -1
  235. package/dist/client/assets/{reports-onboarding-BskSIDus.js → reports-onboarding-mTQFH_iA.js} +1 -1
  236. package/dist/client/assets/{reports-tab-a3KJftGt.js → reports-tab-Bon4oiNK.js} +2 -2
  237. package/dist/client/assets/repositories-DVBlDnPs.js +1 -0
  238. package/dist/client/assets/{repositories-BZocQhoR.js → repositories-Pjwn0cqi.js} +1 -1
  239. package/dist/client/assets/{repository-binding-DEE5HjOP.js → repository-binding-CqjA7Tko.js} +1 -1
  240. package/dist/client/assets/{repository-import-picker-WAot3Ghn.js → repository-import-picker-DRcn5MCM.js} +1 -1
  241. package/dist/client/assets/{repository-picker-DKd6y_Vd.js → repository-picker-BL6xlIly.js} +1 -1
  242. package/dist/client/assets/{require-capability-BdR5kRbu.js → require-capability-gPmNE28i.js} +1 -1
  243. package/dist/client/assets/{required-auth-layout-CXS5DXAp.js → required-auth-layout-BA3Gxw_5.js} +1 -1
  244. package/dist/client/assets/{reset-password-Br9V0wHS.js → reset-password-qyVzV1QI.js} +1 -1
  245. package/dist/client/assets/{resizable-CkWJ6g0G.js → resizable-Bu3AyxKl.js} +1 -1
  246. package/dist/client/assets/{resolve-tab-icon-BXRYZg2i.js → resolve-tab-icon-DXt8FU1X.js} +1 -1
  247. package/dist/client/assets/{review-settings-CfpCP4zo.js → review-settings-O8K_mvh6.js} +1 -1
  248. package/dist/client/assets/{roles-D-ySNiDm.js → roles-CCLRm2p0.js} +1 -1
  249. package/dist/client/assets/{route-DIJ9is23.js → route-DMrkbv9t.js} +1 -1
  250. package/dist/client/assets/{route-Bor9ph6H.js → route-DaeLPCnk.js} +1 -1
  251. package/dist/client/assets/route-jSSJr7H8.js +1 -0
  252. package/dist/client/assets/{runnable-block-editor-D1duQp0J.js → runnable-block-editor-DXVt1mRj.js} +3 -3
  253. package/dist/client/assets/{sandbox-lifecycle-context-DJrMSxNE.js → sandbox-lifecycle-context-CAD11jz7.js} +1 -1
  254. package/dist/client/assets/{schema-BiVd-UM7.js → schema-BKLQwKnK.js} +1 -1
  255. package/dist/client/assets/{schema-BXxpoJF8.js → schema-Ddw2ah-q.js} +1 -1
  256. package/dist/client/assets/{scroll-area-DdvxCYsk.js → scroll-area-GNWuujdQ.js} +1 -1
  257. package/dist/client/assets/{search-input-UGzUEySU.js → search-input-i8DAXvnS.js} +1 -1
  258. package/dist/client/assets/{search-toggle-09QkRcdu.js → search-toggle-C2BWIs4O.js} +1 -1
  259. package/dist/client/assets/{secret-ciphertext-D7Z8GkTt.js → secret-ciphertext-BA15G7qe.js} +1 -1
  260. package/dist/client/assets/{secret-picker-jW2RoOXq.js → secret-picker-CwZHe4Yx.js} +1 -1
  261. package/dist/client/assets/{secrets--oDOIL-g.js → secrets-BWNDO0aL.js} +1 -1
  262. package/dist/client/assets/{sections-Cktygxsr.js → sections-DhRieK41.js} +1 -1
  263. package/dist/client/assets/{sections-editor-Ykrd9ksj.js → sections-editor-TqSLQIU8.js} +1 -1
  264. package/dist/client/assets/{select-C48ly-p-.js → select-BAxIwkW7.js} +1 -1
  265. package/dist/client/assets/{select-model-qC-ddNWu.js → select-model-DKcSOpKv.js} +1 -1
  266. package/dist/client/assets/{seo-editor-vkCR941s.js → seo-editor-BhgypNCN.js} +1 -1
  267. package/dist/client/assets/{separator-CfwhkXab.js → separator-gKWGw3ec.js} +1 -1
  268. package/dist/client/assets/settings-tab-Cp66Lx0x.js +1 -0
  269. package/dist/client/assets/{sheet-C78dW_OW.js → sheet-Dy9d78N0.js} +1 -1
  270. package/dist/client/assets/{shell-layout-7jtYUd9L.js → shell-layout-DPflSDI7.js} +1 -1
  271. package/dist/client/assets/{site-draft-actions-DyZ1f4ik.js → site-draft-actions-BjAr6xi6.js} +1 -1
  272. package/dist/client/assets/site-draft-view-Bpwq-4Im.js +2 -0
  273. package/dist/client/assets/site-editor-CP2FSMmX.js +1 -0
  274. package/dist/client/assets/{site-editor-toast-C_UZBEd9.js → site-editor-toast-n7tT-SpR.js} +1 -1
  275. package/dist/client/assets/{skills-CHltBKqG.js → skills-C-lfUnzb.js} +1 -1
  276. package/dist/client/assets/{slider-DueO9EFe.js → slider-DMzP4oef.js} +1 -1
  277. package/dist/client/assets/{sortable.esm-D411R8sQ.js → sortable.esm-BEpH5tbt.js} +1 -1
  278. package/dist/client/assets/{sso-C7rH2Jsc.js → sso-Bdl8tzvn.js} +1 -1
  279. package/dist/client/assets/{suggestion-_sJX1Xs_.js → suggestion-BfzPP8A_.js} +1 -1
  280. package/dist/client/assets/{switch-Wb17Bg4i.js → switch-B0lPkF5_.js} +1 -1
  281. package/dist/client/assets/{symbol-CN-EQDYU.js → symbol-CcauWbN2.js} +1 -1
  282. package/dist/client/assets/{synced-repos-BRIUeky9.js → synced-repos-cKAzeg2x.js} +1 -1
  283. package/dist/client/assets/{tab-icon-glyph-BeHT1AU_.js → tab-icon-glyph-C2nHjzae.js} +1 -1
  284. package/dist/client/assets/{table-ChqbkXkJ.js → table-CeULXNQ2.js} +1 -1
  285. package/dist/client/assets/{tabs-D-bShRzz.js → tabs-fkqYJpP8.js} +1 -1
  286. package/dist/client/assets/{task-assignee-avatar-Db7T5j33.js → task-assignee-avatar-BuSQPIHq.js} +1 -1
  287. package/dist/client/assets/{task-board-NNGstnYy.js → task-board-Cv7D_3uN.js} +1 -1
  288. package/dist/client/assets/{task-route-BYz8Txhc.js → task-route-dMm35uIv.js} +1 -1
  289. package/dist/client/assets/{task-status-BtnjgBne.js → task-status-D3EaEAgF.js} +1 -1
  290. package/dist/client/assets/{taskboard-analytics-BiCEJijC.js → taskboard-analytics-C2Yib8gP.js} +1 -1
  291. package/dist/client/assets/tasks-5wUjot9O.js +1 -0
  292. package/dist/client/assets/{tasks-DscpmhWw.js → tasks-Cx6Zd4fY.js} +1 -1
  293. package/dist/client/assets/{textarea-DXNX9E30.js → textarea-aGNI5bvN.js} +1 -1
  294. package/dist/client/assets/{thread-analytics-BxM1u9ID.js → thread-analytics-B9HcTgTh.js} +1 -1
  295. package/dist/client/assets/{thread-intent-BYXYhdV9.js → thread-intent-BQGp3MKl.js} +1 -1
  296. package/dist/client/assets/{thread-route--lOZYDN5.js → thread-route-BEIPJEss.js} +1 -1
  297. package/dist/client/assets/{thread-route-EPwO0Tp5.js → thread-route-D147zL8e.js} +1 -1
  298. package/dist/client/assets/{thread-sheet-body-Doh4mgo7.js → thread-sheet-body-i2u8ULqW.js} +1 -1
  299. package/dist/client/assets/{time-range-picker-bYUcsgps.js → time-range-picker-0kVuNsQb.js} +1 -1
  300. package/dist/client/assets/{toggle-group-C__89QW8.js → toggle-group-DaYieoyW.js} +1 -1
  301. package/dist/client/assets/{tool-namespace-CjWGrg1d.js → tool-namespace-DqsoHKmd.js} +1 -1
  302. package/dist/client/assets/{toolbar-icon-button-Bn0QMDhj.js → toolbar-icon-button-3blDPoB6.js} +1 -1
  303. package/dist/client/assets/{tooltip-CjIqGzku.js → tooltip-2YCPx1DM.js} +1 -1
  304. package/dist/client/assets/{tooltipContext-BlJpYj2n.js → tooltipContext-CgeI21sB.js} +1 -1
  305. package/dist/client/assets/{track-DiwbUXrF.js → track-DO9rvMbw.js} +1 -1
  306. package/dist/client/assets/{types-2FdJQAcI.js → types-6BxgL_uJ.js} +1 -1
  307. package/dist/client/assets/{url-slug-SgUmhnUm.js → url-slug-DxJ8K4M_.js} +1 -1
  308. package/dist/client/assets/{usage-stats-mjbSmunu.js → usage-stats-BHO2m1GZ.js} +1 -1
  309. package/dist/client/assets/{use-ai-providers-Ui8zDguo.js → use-ai-providers-D11veeve.js} +1 -1
  310. package/dist/client/assets/{use-apply-named-rule-DqZvErCE.js → use-apply-named-rule-B4OGys4b.js} +1 -1
  311. package/dist/client/assets/{use-automations-C1_nM6XA.js → use-automations-tbwaowTj.js} +1 -1
  312. package/dist/client/assets/{use-autosave-DUE5eTHe.js → use-autosave-DfMGkaud.js} +1 -1
  313. package/dist/client/assets/{use-chat-layout-state-Civkwlwx.js → use-chat-layout-state-CIyU-XxO.js} +1 -1
  314. package/dist/client/assets/{use-clock-tick-BglfF91b.js → use-clock-tick-DRqivY5H.js} +1 -1
  315. package/dist/client/assets/{use-connect-companion-DXE20Cit.js → use-connect-companion-pRfQU03M.js} +1 -1
  316. package/dist/client/assets/{use-connection-DjG9Ar0-.js → use-connection-hBtWetVy.js} +1 -1
  317. package/dist/client/assets/{use-content-sync-UBduiNPN.js → use-content-sync-DTts1O7D.js} +1 -1
  318. package/dist/client/assets/{use-copy-D-ZUZJVe.js → use-copy-Ctyjo3u8.js} +1 -1
  319. package/dist/client/assets/{use-create-virtual-mcp-zb51VTao.js → use-create-virtual-mcp-BoVnWYo_.js} +1 -1
  320. package/dist/client/assets/{use-date-fns-locale-DDB69sAw.js → use-date-fns-locale-BL151nA9.js} +1 -1
  321. package/dist/client/assets/{use-debounced-autosave-sMVb1_hn.js → use-debounced-autosave-XfpamUxh.js} +1 -1
  322. package/dist/client/assets/{use-debounced-value-0e-te_rl.js → use-debounced-value-DppuiHxU.js} +1 -1
  323. package/dist/client/assets/{use-deco-credits-zw0Jw-tt.js → use-deco-credits-DAnq8bae.js} +1 -1
  324. package/dist/client/assets/{use-decopilot-events-BQLXDAAl.js → use-decopilot-events-CmWo-JmL.js} +1 -1
  325. package/dist/client/assets/{use-delete-connection-CcIoRjhU.js → use-delete-connection-D4L5Nbwc.js} +1 -1
  326. package/dist/client/assets/{use-deployment-admin-s7tGTRS4.js → use-deployment-admin-CqRFItVm.js} +1 -1
  327. package/dist/client/assets/{use-fast-preview-draft-url-B9Iu3h_6.js → use-fast-preview-draft-url-6n7ATrzr.js} +1 -1
  328. package/dist/client/assets/{use-file-configs-CDeU2xvZ.js → use-file-configs-BukUB2a7.js} +1 -1
  329. package/dist/client/assets/{use-inbox-feed-CFSuERBJ.js → use-inbox-feed-DWwwp0yB.js} +1 -1
  330. package/dist/client/assets/{use-infinite-scroll-BopUCEp4.js → use-infinite-scroll-CAGEOw6T.js} +1 -1
  331. package/dist/client/assets/{use-join-requests-D2jJesnC.js → use-join-requests-C5RVOca9.js} +1 -1
  332. package/dist/client/assets/{use-main-panel-tabs--2YvNIZr.js → use-main-panel-tabs-C_SiePFc.js} +1 -1
  333. package/dist/client/assets/{use-mcp-auth-status-DEXNa6Oz.js → use-mcp-auth-status-CPaTWfZe.js} +1 -1
  334. package/dist/client/assets/{use-mcp-client-owuI-9F9.js → use-mcp-client-DsrOnW9o.js} +1 -1
  335. package/dist/client/assets/{use-mcp-prompts-8FxF45h0.js → use-mcp-prompts-B5RvuVy4.js} +1 -1
  336. package/dist/client/assets/{use-mcp-tools-qNpUlzik.js → use-mcp-tools-oOqD73aG.js} +1 -1
  337. package/dist/client/assets/{use-members-VmpszULL.js → use-members-DQZYP7Cb.js} +1 -1
  338. package/dist/client/assets/{use-mobile-CqyBz8Dx.js → use-mobile-DruvZ2zF.js} +1 -1
  339. package/dist/client/assets/{use-move-blocks-Cnva5RwQ.js → use-move-blocks-C7t8R0hh.js} +1 -1
  340. package/dist/client/assets/{use-navigate-to-agent-DdSspEm5.js → use-navigate-to-agent-CfXi671z.js} +1 -1
  341. package/dist/client/assets/{use-open-billing-url-CO2ZloNb.js → use-open-billing-url-0u6Rqj8b.js} +1 -1
  342. package/dist/client/assets/{use-org-auth-client-BQ7kloKy.js → use-org-auth-client-CSFZu3Wj.js} +1 -1
  343. package/dist/client/assets/{use-org-fs-CvYQh_B2.js → use-org-fs-Bndw9m25.js} +1 -1
  344. package/dist/client/assets/{use-org-repo-syncs-BtFmt_qd.js → use-org-repo-syncs-DgWzYW9F.js} +1 -1
  345. package/dist/client/assets/{use-org-sso-B9p-4KH7.js → use-org-sso-B7o6rhq2.js} +1 -1
  346. package/dist/client/assets/{use-organization-roles-Cu4J92yA.js → use-organization-roles-DPfq-0hG.js} +1 -1
  347. package/dist/client/assets/{use-organization-settings-BcSo4teS.js → use-organization-settings-B2e749tN.js} +1 -1
  348. package/dist/client/assets/{use-panel-navigate-Co0XZmSD.js → use-panel-navigate-C-ip5ing.js} +1 -1
  349. package/dist/client/assets/{use-project-native-view-presence-BRsKjCEJ.js → use-project-native-view-presence-iEIqgCZR.js} +1 -1
  350. package/dist/client/assets/{use-project-scope-BL3NRFI4.js → use-project-scope-DN9qkINS.js} +1 -1
  351. package/dist/client/assets/{use-recent-apps-RjVee3Pq.js → use-recent-apps-Dieru2LM.js} +1 -1
  352. package/dist/client/assets/{use-releases-vjl0fUb-.js → use-releases-DJrTmfLZ.js} +1 -1
  353. package/dist/client/assets/{use-reports-diagnostic-B0L8y4wc.js → use-reports-diagnostic-BdDNwhZy.js} +1 -1
  354. package/dist/client/assets/{use-sandbox-events-Bjcn7PU6.js → use-sandbox-events-B-rKhgAE.js} +1 -1
  355. package/dist/client/assets/{use-secrets-D9Bq6nE_.js → use-secrets-C3hSYvUx.js} +1 -1
  356. package/dist/client/assets/{use-section-preview-base-Vjigvtig.js → use-section-preview-base-NrYdhHI5.js} +1 -1
  357. package/dist/client/assets/{use-session-runtime-C-ErRuug.js → use-session-runtime-RS_ZeJDS.js} +1 -1
  358. package/dist/client/assets/{use-sidebar-collapsed-oSws9nsi.js → use-sidebar-collapsed-C9KH2wzy.js} +1 -1
  359. package/dist/client/assets/{use-tags-pfCDbF9Z.js → use-tags-DBJgOg0Z.js} +1 -1
  360. package/dist/client/assets/{use-task-board-analytics-CopE-4zr.js → use-task-board-analytics-Bl-3jKgS.js} +1 -1
  361. package/dist/client/assets/{use-task-board-events-C280-Zim.js → use-task-board-events-CemAfTjA.js} +1 -1
  362. package/dist/client/assets/{use-task-board-item-prs-x7ZAMu8t.js → use-task-board-item-prs-83sFKoAa.js} +1 -1
  363. package/dist/client/assets/{use-task-metadata-CDV-25sQ.js → use-task-metadata-DYSGuNJN.js} +1 -1
  364. package/dist/client/assets/{use-thread-analytics-RcDxA37Q.js → use-thread-analytics-B-gfPcTz.js} +1 -1
  365. package/dist/client/assets/{use-thread-outputs-orGxjs9L.js → use-thread-outputs-9KkInEd1.js} +1 -1
  366. package/dist/client/assets/useInfiniteQuery-Ctv8zOi3.js +1 -0
  367. package/dist/client/assets/{useQueries-M-H4-oNf.js → useQueries-BRUig2bT.js} +1 -1
  368. package/dist/client/assets/useSuspenseInfiniteQuery-DRLUIOlU.js +1 -0
  369. package/dist/client/assets/{users-Yugcw0oy.js → users-zGj6iqQJ.js} +1 -1
  370. package/dist/client/assets/{utils-Cwt2fdOd.js → utils-DnxtSQ0E.js} +1 -1
  371. package/dist/client/assets/{variant-calendar-r5D0JiAM.js → variant-calendar-DzngKeid.js} +1 -1
  372. package/dist/client/assets/{variant-matcher-override-Dcw_0UNB.js → variant-matcher-override-BvLc7beb.js} +1 -1
  373. package/dist/client/assets/{virtual-mcp-D9lu2UG3.js → virtual-mcp-CKcyAjRE.js} +1 -1
  374. package/dist/client/assets/{watch-sse-pool-BEBGvoea.js → watch-sse-pool-B6MhK1l7.js} +1 -1
  375. package/dist/client/index.html +2 -2
  376. package/dist/server/server.js +1 -1
  377. package/package.json +1 -1
  378. package/dist/client/assets/agent-analytics-B-zaohtV.js +0 -1
  379. package/dist/client/assets/agent-app-BbV2xIu_.js +0 -1
  380. package/dist/client/assets/agent-calendar-Ddf3r2JM.js +0 -1
  381. package/dist/client/assets/agent-deck-UP8oQtvT.js +0 -1
  382. package/dist/client/assets/agent-experiments-CrVBOIKR.js +0 -1
  383. package/dist/client/assets/agent-file-Cb4leotK.js +0 -1
  384. package/dist/client/assets/agent-library-DMqKWgMi.js +0 -1
  385. package/dist/client/assets/agent-library-file-DOe-l166.js +0 -1
  386. package/dist/client/assets/agent-monitor-DpSfxETg.js +0 -1
  387. package/dist/client/assets/agent-settings-D_kjSJft.js +0 -1
  388. package/dist/client/assets/agent-site-editor-code-CdfJCg4-.js +0 -2
  389. package/dist/client/assets/agent-site-editor-content-C-o-blM5.js +0 -1
  390. package/dist/client/assets/agent-site-editor-preview-D1F79zUW.js +0 -1
  391. package/dist/client/assets/agent-view-PuW3-X6q.js +0 -1
  392. package/dist/client/assets/api-keys-CNy2dZat.js +0 -1
  393. package/dist/client/assets/cms-settings-editor-VytgeION.js +0 -1
  394. package/dist/client/assets/experiments-tab-BQyQ_6Nt.js +0 -1
  395. package/dist/client/assets/index-DjdMnw7p.css +0 -1
  396. package/dist/client/assets/library-D71H_oBI.js +0 -1
  397. package/dist/client/assets/monitor-v8-CHgzPfyd.js +0 -1
  398. package/dist/client/assets/monitoring-BtZh6NEX.js +0 -1
  399. package/dist/client/assets/project-reports-DigBj5UN.js +0 -1
  400. package/dist/client/assets/project-tasks-ckZ9YIhp.js +0 -1
  401. package/dist/client/assets/record-editor-DulCdbwX.js +0 -1
  402. package/dist/client/assets/reports-ChrL-50F.js +0 -1
  403. package/dist/client/assets/repositories-BS-pBlSH.js +0 -1
  404. package/dist/client/assets/route-DTfdE-p1.js +0 -1
  405. package/dist/client/assets/settings-tab-BR68FSDQ.js +0 -1
  406. package/dist/client/assets/site-draft-view-BRWWuiN5.js +0 -2
  407. package/dist/client/assets/site-editor-JG7QILYD.js +0 -1
  408. package/dist/client/assets/tasks-CtzEjcDR.js +0 -1
  409. package/dist/client/assets/useInfiniteQuery-C3FB4QSd.js +0 -1
  410. package/dist/client/assets/useSuspenseInfiniteQuery-zAujesU3.js +0 -1
@@ -1 +1 @@
1
- import{k as V,p as B,aG as E,A as C,aT as R,aU as O,aV as h,aN as A,aR as x,N as P,l as j}from"./parse-sections-Ce8e3CyM.js";function W(e,n){const t=n.pages===1?e("sectionsEditor.namedRuleUses.countPageOne"):n.pages>1?e("sectionsEditor.namedRuleUses.countPages",{count:String(n.pages)}):null,o=n.sections===1?e("sectionsEditor.namedRuleUses.countSectionOne"):n.sections>1?e("sectionsEditor.namedRuleUses.countSections",{count:String(n.sections)}):null,s=t&&o?e("sectionsEditor.namedRuleUses.countBoth",{pages:t,sections:o}):t??o;return s?{places:s,one:n.pages+n.sections===1}:null}const k=()=>({weak:new WeakMap,strong:new Map,has:!1}),v=new Map;function d(e,n,t){let o=v.get(e)??k();v.set(e,o);for(const s of n){const i=typeof s=="object"&&s!==null||typeof s=="function";let a=i?o.weak.get(s):o.strong.get(s);a||(a=k(),i?o.weak.set(s,a):o.strong.set(s,a)),o=a}return o.has||(o.value=t(),o.has=!0),o.value}function D(e){return d("uses",[e.decofile,e.meta,e.changeCount,e.sides],()=>L(e))}function L(e){const n=R(e.decofile,e.meta),t=e.changeCount===0?e.decofile:e.sides?O(e.decofile,e.sides):null;if(t===null)return{refs:h(n,n),published:null};const o=t===e.decofile?n:R(t,e.meta);return{refs:h(n,o),published:t}}const F=e=>e.length===0||e.length===1&&e[0]==="section";function _(e){const n=e[0]==="section"?e.slice(1):e;return n[0]==="variants"&&typeof n[1]=="number"?n[1]:void 0}function y(e,n){return n&&F(e)?n.index:_(e)}function z(e,n,t){if(e==="section"){const l=y(t?.containerPath??n,t);return l===void 0?{}:{variant:l}}const o=t?.containerPath??n;if(o[0]!=="sections")return{};if(t&&o.length===1)return{pageVariant:t.index};let s=o.slice(1),i;s[0]==="variants"&&typeof s[1]=="number"&&(i=s[1],s=s.slice(2),s[0]==="value"&&(s=s.slice(1)),s[0]==="value"&&(s=s.slice(1)));const a=i===void 0?{}:{pageVariant:i},[c,...u]=s;if(typeof c!="number")return a;a.section=c;const r=y(u,t);return r!==void 0&&(a.variant=r),a}function I(e,n,t,o,s){const i=r=>U(r,e,o,s),a=[],c=new Set,u=r=>{const l=w(r);c.has(l)||(c.add(l),a.push(r))};if(t===null){for(const r of e.refs[n].wholeBlock)u({blockKey:r.blockKey,...i(r.blockKey),wholeBlock:!0,state:r.state});return g(a)}for(const r of e.refs[n].byName.get(t)??[]){if(r.savedRule)continue;const l=i(r.blockKey),f=z(l.blockKind,r.path,r.variant),b=l.blockKind==="page"?T(r.blockKey,f,r.state,e,o):void 0;u({blockKey:r.blockKey,...l,...r.variant?{variant:r.variant.index+1}:{},...b?{section:b}:{},focus:f,wholeBlock:!1,state:r.state})}return g(a)}function w(e){const n=e.focus??{};return[e.blockKey,n.pageVariant??"",n.section??"",e.variant??"",e.wholeBlock].join("#")}function T(e,n,t,o,s){if(n.section===void 0)return;const i=t!=="removed-in-draft"&&e in s?s:o.published??s,a=V(i,e,n.pageVariant??0),c=B(a,i,!0)[n.section];return c?c.variantOf??c.label:void 0}function U(e,n,t,o){const s=t[e]??(n.published?n.published[e]:void 0),i=E(e,s,o);if(i)return{blockKind:"page",title:i.name,path:i.path};const a=s&&typeof s=="object"&&!Array.isArray(s)?s:{};return{blockKind:"section",title:C(G(e),a)}}function g(e){const n=t=>t.state==="removed-in-draft"?1:0;return e.sort((t,o)=>n(t)-n(o)||t.title.localeCompare(o.title)||(t.focus?.pageVariant??0)-(o.focus?.pageVariant??0)||(t.focus?.section??0)-(o.focus?.section??0)||(t.variant??0)-(o.variant??0))}function m(e,n,t){return d("missing",[e,t,n],()=>{const o=A(t,n);if(o.kind==="conflict")return[];const s=[];for(const[i,a]of e.refs[n].byName)x(o,i)||a.some(c=>c.state!=="removed-in-draft")&&s.push(i);return s})}function q(e,n,t,o){return N(e,n,t,o).rows}function J(e,n,t,o){return N(e,n,t,o).names}function N(e,n,t,o){return d("missingRows",[e,t,o,n],()=>{const s=[],i=new Set;let a=0;for(const c of m(e,n,t)){let u=!1;for(const r of I(e,n,c,t,o)){if(r.state==="removed-in-draft")continue;u=!0;const l=w(r);i.has(l)||(i.add(l),s.push(r))}u&&a++}return{rows:g(s),names:a}})}function K(e){return P.filter(n=>j(e,n)==="available")}function p(e,n){return D({decofile:e,meta:n,changeCount:0,sides:void 0})}function Q(e,n){return d("blocksUsingMissing",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o)for(const a of m(s,i,e))for(const c of s.refs[i].byName.get(a)??[]){const u=t.get(c.blockKey)??[];u.includes(i)||u.push(i),t.set(c.blockKey,u)}return t})}function X(e,n){return d("missingUseCounts",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o){const a=new Set;let c=0;for(const r of m(s,i,e)){let l=!1;for(const f of s.refs[i].byName.get(r)??[])f.savedRule||(a.add(f.blockKey),l=!0);l&&c++}const u=M(a,s,e,n);u.pages+u.sections>0&&t.set(i,{...u,names:c})}return t})}function Y(e,n,t){return S(e,n,t).size}function Z(e,n,t,o){const s=p(e,n);return M(S(s,t,o),s,e,n)}function S(e,n,t){const o=new Set;for(const s of e.refs[n].byName.get(t)??[])s.savedRule||s.state==="removed-in-draft"||o.add(s.blockKey);return o}function M(e,n,t,o){const s={pages:0,sections:0};for(const i of e)U(i,n,t,o).blockKind==="page"?s.pages++:s.sections++;return s}function G(e){try{return decodeURIComponent(e)}catch{return e}}export{w as a,Q as b,Z as c,D as d,q as e,J as f,I as g,Y as h,X as m,W as n};
1
+ import{k as V,p as B,aG as E,A as C,aT as R,aU as O,aV as h,aN as A,aR as x,N as P,l as j}from"./parse-sections-ClqXxi6i.js";function W(e,n){const t=n.pages===1?e("sectionsEditor.namedRuleUses.countPageOne"):n.pages>1?e("sectionsEditor.namedRuleUses.countPages",{count:String(n.pages)}):null,o=n.sections===1?e("sectionsEditor.namedRuleUses.countSectionOne"):n.sections>1?e("sectionsEditor.namedRuleUses.countSections",{count:String(n.sections)}):null,s=t&&o?e("sectionsEditor.namedRuleUses.countBoth",{pages:t,sections:o}):t??o;return s?{places:s,one:n.pages+n.sections===1}:null}const k=()=>({weak:new WeakMap,strong:new Map,has:!1}),v=new Map;function d(e,n,t){let o=v.get(e)??k();v.set(e,o);for(const s of n){const i=typeof s=="object"&&s!==null||typeof s=="function";let a=i?o.weak.get(s):o.strong.get(s);a||(a=k(),i?o.weak.set(s,a):o.strong.set(s,a)),o=a}return o.has||(o.value=t(),o.has=!0),o.value}function D(e){return d("uses",[e.decofile,e.meta,e.changeCount,e.sides],()=>L(e))}function L(e){const n=R(e.decofile,e.meta),t=e.changeCount===0?e.decofile:e.sides?O(e.decofile,e.sides):null;if(t===null)return{refs:h(n,n),published:null};const o=t===e.decofile?n:R(t,e.meta);return{refs:h(n,o),published:t}}const F=e=>e.length===0||e.length===1&&e[0]==="section";function _(e){const n=e[0]==="section"?e.slice(1):e;return n[0]==="variants"&&typeof n[1]=="number"?n[1]:void 0}function y(e,n){return n&&F(e)?n.index:_(e)}function z(e,n,t){if(e==="section"){const l=y(t?.containerPath??n,t);return l===void 0?{}:{variant:l}}const o=t?.containerPath??n;if(o[0]!=="sections")return{};if(t&&o.length===1)return{pageVariant:t.index};let s=o.slice(1),i;s[0]==="variants"&&typeof s[1]=="number"&&(i=s[1],s=s.slice(2),s[0]==="value"&&(s=s.slice(1)),s[0]==="value"&&(s=s.slice(1)));const a=i===void 0?{}:{pageVariant:i},[c,...u]=s;if(typeof c!="number")return a;a.section=c;const r=y(u,t);return r!==void 0&&(a.variant=r),a}function I(e,n,t,o,s){const i=r=>U(r,e,o,s),a=[],c=new Set,u=r=>{const l=w(r);c.has(l)||(c.add(l),a.push(r))};if(t===null){for(const r of e.refs[n].wholeBlock)u({blockKey:r.blockKey,...i(r.blockKey),wholeBlock:!0,state:r.state});return g(a)}for(const r of e.refs[n].byName.get(t)??[]){if(r.savedRule)continue;const l=i(r.blockKey),f=z(l.blockKind,r.path,r.variant),b=l.blockKind==="page"?T(r.blockKey,f,r.state,e,o):void 0;u({blockKey:r.blockKey,...l,...r.variant?{variant:r.variant.index+1}:{},...b?{section:b}:{},focus:f,wholeBlock:!1,state:r.state})}return g(a)}function w(e){const n=e.focus??{};return[e.blockKey,n.pageVariant??"",n.section??"",e.variant??"",e.wholeBlock].join("#")}function T(e,n,t,o,s){if(n.section===void 0)return;const i=t!=="removed-in-draft"&&e in s?s:o.published??s,a=V(i,e,n.pageVariant??0),c=B(a,i,!0)[n.section];return c?c.variantOf??c.label:void 0}function U(e,n,t,o){const s=t[e]??(n.published?n.published[e]:void 0),i=E(e,s,o);if(i)return{blockKind:"page",title:i.name,path:i.path};const a=s&&typeof s=="object"&&!Array.isArray(s)?s:{};return{blockKind:"section",title:C(G(e),a)}}function g(e){const n=t=>t.state==="removed-in-draft"?1:0;return e.sort((t,o)=>n(t)-n(o)||t.title.localeCompare(o.title)||(t.focus?.pageVariant??0)-(o.focus?.pageVariant??0)||(t.focus?.section??0)-(o.focus?.section??0)||(t.variant??0)-(o.variant??0))}function m(e,n,t){return d("missing",[e,t,n],()=>{const o=A(t,n);if(o.kind==="conflict")return[];const s=[];for(const[i,a]of e.refs[n].byName)x(o,i)||a.some(c=>c.state!=="removed-in-draft")&&s.push(i);return s})}function q(e,n,t,o){return N(e,n,t,o).rows}function J(e,n,t,o){return N(e,n,t,o).names}function N(e,n,t,o){return d("missingRows",[e,t,o,n],()=>{const s=[],i=new Set;let a=0;for(const c of m(e,n,t)){let u=!1;for(const r of I(e,n,c,t,o)){if(r.state==="removed-in-draft")continue;u=!0;const l=w(r);i.has(l)||(i.add(l),s.push(r))}u&&a++}return{rows:g(s),names:a}})}function K(e){return P.filter(n=>j(e,n)==="available")}function p(e,n){return D({decofile:e,meta:n,changeCount:0,sides:void 0})}function Q(e,n){return d("blocksUsingMissing",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o)for(const a of m(s,i,e))for(const c of s.refs[i].byName.get(a)??[]){const u=t.get(c.blockKey)??[];u.includes(i)||u.push(i),t.set(c.blockKey,u)}return t})}function X(e,n){return d("missingUseCounts",[e,n],()=>{const t=new Map,o=K(n);if(o.length===0)return t;const s=p(e,n);for(const i of o){const a=new Set;let c=0;for(const r of m(s,i,e)){let l=!1;for(const f of s.refs[i].byName.get(r)??[])f.savedRule||(a.add(f.blockKey),l=!0);l&&c++}const u=M(a,s,e,n);u.pages+u.sections>0&&t.set(i,{...u,names:c})}return t})}function Y(e,n,t){return S(e,n,t).size}function Z(e,n,t,o){const s=p(e,n);return M(S(s,t,o),s,e,n)}function S(e,n,t){const o=new Set;for(const s of e.refs[n].byName.get(t)??[])s.savedRule||s.state==="removed-in-draft"||o.add(s.blockKey);return o}function M(e,n,t,o){const s={pages:0,sections:0};for(const i of e)U(i,n,t,o).blockKind==="page"?s.pages++:s.sections++;return s}function G(e){try{return decodeURIComponent(e)}catch{return e}}export{w as a,Q as b,Z as c,D as d,q as e,J as f,I as g,Y as h,X as m,W as n};
@@ -1 +1 @@
1
- import{c as N,j as m,B as P,b as C,l as J,z as Q,r as M,t as B,v as ee,I as W,q as te,D as se}from"./index-DY9jv8u5.js";import{i as ne}from"./ArrowLeft-BYRX2oWU.js";import{B as z}from"./badge-CqxA0I5-.js";import{L as ae}from"./label-CUbZuKc3.js";import{aN as j,aP as L,aS as X,aX as le,l as ie,aY as oe,aZ as re}from"./parse-sections-Ce8e3CyM.js";import{p as Y,z as Z,d as de}from"./blocks-tab-states-D014yZyw.js";import{s as ce}from"./Trash01-bhcUMroB.js";import{a as me,n as ue,c as fe,d as xe,e as ge,f as pe,g as A}from"./named-rule-uses-939Puzgt.js";import{ar as he,as as K,u as ve,D as Re,ag as Ne,ac as be}from"./site-editor-toast-C_UZBEd9.js";import{b as je}from"./ZoomOut-D-Ww048N.js";import{a as we}from"./UserSquare-DXYtKMfd.js";import{u as ye}from"./use-apply-named-rule-DqZvErCE.js";const Xe="p-4";function Ye(s){const e=N.c(14),{intro:t,back:n,actions:l}=s;let d;e[0]!==l?(d=l?m.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:l}):null,e[0]=l,e[1]=d):d=e[1];const r=d;if(n){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(ne,{size:16}),e[2]=i):i=e[2];let c;e[3]!==n.label||e[4]!==n.onClick?(c=m.jsxs(P,{variant:"ghost",size:"sm",onClick:n.onClick,children:[i,n.label]}),e[3]=n.label,e[4]=n.onClick,e[5]=c):c=e[5];let u;return e[6]!==r||e[7]!==c?(u=m.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[c,r]}),e[6]=r,e[7]=c,e[8]=u):u=e[8],u}let o;e[9]!==t?(o=m.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:t}),e[9]=t,e[10]=o):o=e[10];let a;return e[11]!==r||e[12]!==o?(a=m.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[o,r]}),e[11]=r,e[12]=o,e[13]=a):a=e[13],a}function Ce(s,e,t,n){const l=j(s,e);return l.kind==="conflict"?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ee(s,e,t,n){const l=j(s,e);if(l.kind==="conflict")return{problem:"conflict"};const d=Y(t,Object.keys(l.values));return d?{problem:d}:{change:Ce(s,e,t.trim(),n)}}function Ue(s,e,t){const n=j(s,e);return n.kind!=="saved"||!Object.hasOwn(n.block,t)?null:{writes:{[L(e).blockKey]:le(n.block,t)}}}function Se(s,e,t,n){if(n===void 0)return null;const l=j(s,e);return l.kind==="conflict"||Object.hasOwn(l.block,t)?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ze(s,e,t,n){if(!s)return null;const l=j(s,e);return l.kind!=="saved"||!Object.hasOwn(l.values,t)?"new":ke(l.values[t],n)?"published":"changed"}function Ge(s,e,t){if(!s)return;const n=j(s,e);if(n.kind==="saved")return n.values[t]}function Je(s,e,t){if(!e)return[];const n=j(e,t);if(n.kind!=="saved")return[];const l=j(s,t),d=l.kind==="conflict"?{}:l.values;return Object.keys(n.values).filter(r=>!Object.hasOwn(d,r))}function ke(s,e){return typeof s=="number"||typeof e=="number"?s===e:q(s.start,e.start)&&q(s.end,e.end)}function q(s,e){return s===void 0||e===void 0?s===e:s===e||new Date(s).getTime()===new Date(e).getTime()}function Qe(s){const e=N.c(21),{kind:t,rows:n,wholeRows:l,loading:d,marked:r,onOpen:o}=s,a=C(),i=t==="experiments";let c;e[0]!==a?(c=a("sectionsEditor.namedRuleUses.title"),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==c?(u=m.jsx("h3",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==a||e[9]!==i?(f=d?m.jsx("p",{className:"text-sm text-muted-foreground",children:a("sectionsEditor.namedRuleUses.loading")}):n.length===0?m.jsx("p",{className:"text-sm text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.emptyTests":"sectionsEditor.namedRuleUses.emptyCampaigns")}):m.jsx(F,{rows:n,marked:r,onOpen:o}),e[4]=d,e[5]=r,e[6]=o,e[7]=n,e[8]=a,e[9]=i,e[10]=f):f=e[10];let x;e[11]!==r||e[12]!==o||e[13]!==a||e[14]!==i||e[15]!==l?(x=l.length>0&&m.jsxs("div",{className:"mt-3 flex flex-col gap-1",children:[m.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTests":"sectionsEditor.namedRuleUses.wholeCampaigns")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTestsHint":"sectionsEditor.namedRuleUses.wholeCampaignsHint")}),m.jsx(F,{rows:l,marked:r,onOpen:o})]}),e[11]=r,e[12]=o,e[13]=a,e[14]=i,e[15]=l,e[16]=x):x=e[16];let g;return e[17]!==u||e[18]!==f||e[19]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-used-by",children:[u,f,x]}),e[17]=u,e[18]=f,e[19]=x,e[20]=g):g=e[20],g}function F(s){const e=N.c(11),{rows:t,marked:n,onOpen:l}=s,d=C();let r;if(e[0]!==n||e[1]!==l||e[2]!==t||e[3]!==d){let a;e[5]!==n||e[6]!==l||e[7]!==d?(a=i=>{const c=i.blockKind==="page"?we:je,u=i.state==="removed-in-draft";return m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2","data-use-state":i.state,children:[m.jsx(c,{size:14,className:"shrink-0 text-muted-foreground"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:J("truncate text-sm",u&&"text-muted-foreground line-through"),children:i.title}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[i.path,i.section,i.variant?d("sectionsEditor.namedRuleUses.variant",{index:String(i.variant)}):null].filter(Boolean).join(" · ")})]}),n&&i.state==="draft-only"&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.draftOnly")}),n&&u&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.removed")}),l&&!u&&m.jsxs(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(i),children:[d("sectionsEditor.namedRuleUses.open"),m.jsx(Q,{size:14})]})]},me(i))},e[5]=n,e[6]=l,e[7]=d,e[8]=a):a=e[8],r=t.map(a),e[0]=n,e[1]=l,e[2]=t,e[3]=d,e[4]=r}else r=e[4];let o;return e[9]!==r?(o=m.jsx("ul",{className:"divide-y divide-border/60 rounded-md border border-border/60",children:r}),e[9]=r,e[10]=o):o=e[10],o}function Oe(s){const e=N.c(12),{kind:t,rows:n,names:l,onOpen:d}=s,r=C();if(n.length===0)return null;let o;e[0]!==t||e[1]!==l||e[2]!==r?(o=r(t==="experiments"?l===1?"sectionsEditor.namedRuleUses.missingTestOne":"sectionsEditor.namedRuleUses.missingTests":l===1?"sectionsEditor.namedRuleUses.missingCampaignOne":"sectionsEditor.namedRuleUses.missingCampaigns"),e[0]=t,e[1]=l,e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=m.jsx("p",{className:"text-sm text-muted-foreground",children:o}),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==d||e[7]!==n?(i=m.jsx(F,{rows:n,marked:!1,onOpen:d}),e[6]=d,e[7]=n,e[8]=i):i=e[8];let c;return e[9]!==a||e[10]!==i?(c=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-missing-uses",children:[a,i]}),e[9]=a,e[10]=i,e[11]=c):c=e[11],c}function De({kind:s,name:e,meta:t,pending:n,apply:l,reread:d,onDeleted:r,onUndo:o}){const a=C(),i=s==="experiments",[c,u]=M.useState(!1),f=async()=>{const p=await d();return p||B.info(a("sectionsEditor.namedRules.unavailable"),{...K,description:a("sectionsEditor.namedRules.unavailableHint")}),p},x=async p=>{const h=await f();if(!h)return;const R=Se(h,s,e,p);if(R){o(R);return}const y=j(h,s).kind==="conflict";B.info(a(y?"sectionsEditor.namedRules.changedMeanwhile":"sectionsEditor.namedRules.alreadyBack"),{...K,description:a(y?"sectionsEditor.namedRules.changedMeanwhileHint":"sectionsEditor.namedRules.alreadyBackHint")})},g=async()=>{u(!0);let p;try{p=await f()}finally{u(!1)}if(!p)return;const h=Ue(p,s,e);if(!h)return;const R=j(p,s),y=R.kind==="saved"?R.block[e]:void 0,v=ue(a,fe(p,t,s,e));(await l(h)).ok&&(r(),B.success(i?a("experiments.v8.deleted",{name:e}):a("sandbox.dateCampaigns.deleted",{name:e}),{id:he,description:v?.one?a("sectionsEditor.namedRuleDelete.stillUsedOne",{places:v.places}):v?a("sectionsEditor.namedRuleDelete.stillUsed",{places:v.places}):a(i?"experiments.v8.deletedHint":"sandbox.dateCampaigns.deletedHint"),action:{label:a("sectionsEditor.namedRules.undo"),onClick:()=>{x(y)}}}))};return m.jsxs(P,{type:"button",variant:"ghost",size:"sm",disabled:n||c,onClick:()=>{g()},children:[m.jsx(ce,{size:16}),a(i?"experiments.v8.delete":"sandbox.dateCampaigns.delete")]})}function Te(s){const e=N.c(11);let t;e[0]!==s.branch||e[1]!==s.orgSlug||e[2]!==s.virtualMcpId?(t={orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch},e[0]=s.branch,e[1]=s.orgSlug,e[2]=s.virtualMcpId,e[3]=t):t=e[3];const n=t,l=ve(s.virtualMcpId,s.branch),d=Re(n),r=Ne(l,d||null),o=be(l,d||null,r.data);if(!s.decofile)return null;let a;e[4]!==r.data?(a=r.data?Object.keys(r.data.changes).length:void 0,e[4]=r.data,e[5]=a):a=e[5];const i=o.data?.entries;let c;return e[6]!==s.decofile||e[7]!==s.meta||e[8]!==a||e[9]!==i?(c=xe({decofile:s.decofile,meta:s.meta,changeCount:a,sides:i}),e[6]=s.decofile,e[7]=s.meta,e[8]=a,e[9]=i,e[10]=c):c=e[10],c}function U(s,e){return e==="experiments"?{new:s("experiments.v8.new"),usedBy:t=>s("experiments.v8.usedBy",{count:String(t)}),notUsed:s("experiments.v8.notUsed"),stateNew:s("experiments.v8.state.new"),stateChanged:s("experiments.v8.state.changed"),removedTitle:s("experiments.v8.removedTitle"),removedHint:s("experiments.v8.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdTest",{name:t}),renamed:t=>s("experiments.v8.renamed",{name:t}),renameHint:s("experiments.v8.renameHint"),renameWholeHint:s("experiments.v8.renameWholeHint")}:{new:s("sandbox.dateCampaigns.new"),usedBy:t=>s("sandbox.dateCampaigns.usedBy",{count:String(t)}),notUsed:s("sandbox.dateCampaigns.notUsed"),stateNew:s("sandbox.dateCampaigns.state.new"),stateChanged:s("sandbox.dateCampaigns.state.changed"),removedTitle:s("sandbox.dateCampaigns.removedTitle"),removedHint:s("sandbox.dateCampaigns.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdCampaign",{name:t}),renamed:t=>s("sandbox.dateCampaigns.renamed",{name:t}),renameHint:s("sandbox.dateCampaigns.renameHint"),renameWholeHint:s("sandbox.dateCampaigns.renameWholeHint")}}function He(s,e,t){const n=ie(e,t);return n!=="available"?n:j(s,t).kind==="conflict"?"conflict":null}function et(s,e){const t=N.c(48),n=C(),{orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a}=e;let i;t[0]!==r||t[1]!==o||t[2]!==a||t[3]!==l||t[4]!==d?(i={orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a},t[0]=r,t[1]=o,t[2]=a,t[3]=l,t[4]=d,t[5]=i):i=t[5];const c=Te(i);let u;t[6]!==r||t[7]!==l||t[8]!==d?(u={orgSlug:l,virtualMcpId:d,branch:r},t[6]=r,t[7]=l,t[8]=d,t[9]=u):u=t[9];const{apply:f,reread:x,planStored:g,isPending:p}=ye(u),[h,R]=M.useState(null),[y,v]=M.useState(!1);let E;t[10]!==f||t[11]!==n?(E=async(b,_)=>{const T=_===void 0?n("sectionsEditor.namedRules.saved"):_;if(!b)return!1;const H=await f(b);return H.ok&&B.success(T,{...K,description:n("sectionsEditor.namedRules.savedHint")}),H.ok},t[10]=f,t[11]=n,t[12]=E):E=t[12];const w=E;let I;t[13]!==o||t[14]!==s||t[15]!==w||t[16]!==n?(I=b=>{if(b.kind!==s||!b.create)return;const _=b.kind==="experiments"?b.create.share:b.create.window,T=Ee(o,s,b.name,_);if(!("change"in T)){B.info(T.problem==="conflict"?n("sectionsEditor.namedRules.changedMeanwhile"):Z(n,T.problem),K);return}const H=b.name.trim();w(T.change,U(n,s).created(H)).then(G=>{G&&(v(!1),R(H))})},t[13]=o,t[14]=s,t[15]=w,t[16]=n,t[17]=I):I=t[17];const V=I;let S;t[18]!==o||t[19]!==s||t[20]!==a?(S=He(o,a,s),t[18]=o,t[19]=s,t[20]=a,t[21]=S):S=t[21];let k;t[22]!==o||t[23]!==s||t[24]!==a||t[25]!==c?(k=c?ge(c,s,o,a):[],t[22]=o,t[23]=s,t[24]=a,t[25]=c,t[26]=k):k=t[26];let O;t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==c?(O=c?pe(c,s,o,a):0,t[27]=o,t[28]=s,t[29]=a,t[30]=c,t[31]=O):O=t[31];let D;t[32]!==w?(D=b=>{w(b)},t[32]=w,t[33]=D):D=t[33];let $;return t[34]!==f||t[35]!==V||t[36]!==y||t[37]!==p||t[38]!==h||t[39]!==g||t[40]!==x||t[41]!==w||t[42]!==S||t[43]!==k||t[44]!==O||t[45]!==D||t[46]!==c?($={uses:c,apply:f,reread:x,planStored:g,isPending:p,openName:h,setOpenName:R,creating:y,setCreating:v,blocked:S,missing:k,missingNames:O,save:w,create:V,undo:D},t[34]=f,t[35]=V,t[36]=y,t[37]=p,t[38]=h,t[39]=g,t[40]=x,t[41]=w,t[42]=S,t[43]=k,t[44]=O,t[45]=D,t[46]=c,t[47]=$):$=t[47],$}function tt(s){const e=N.c(23),{kind:t,open:n,onOpenChange:l,existingNames:d,pending:r,onCreate:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];let c;e[3]!==i.new?(c=m.jsx(ee,{className:"sr-only",children:i.new}),e[3]=i.new,e[4]=c):c=e[4];let u;e[5]!==a?(u=a("sectionsEditor.namedRules.create"),e[5]=a,e[6]=u):u=e[6];let f;e[7]!==l?(f=()=>l(!1),e[7]=l,e[8]=f):f=e[8];let x;e[9]!==d||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==u||e[14]!==f?(x=m.jsx(de,{kind:t,initialName:"",existingNames:d,pending:r,submitLabel:u,dismiss:"cancel",standalone:!0,onBack:f,onSubmit:o}),e[9]=d,e[10]=t,e[11]=o,e[12]=r,e[13]=u,e[14]=f,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=m.jsxs(te,{className:"p-0 sm:max-w-md",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let p;return e[19]!==l||e[20]!==n||e[21]!==g?(p=m.jsx(se,{open:n,onOpenChange:l,children:g}),e[19]=l,e[20]=n,e[21]=g,e[22]=p):p=e[22],p}function st(s){const e=N.c(14),{kind:t,missing:n,missingNames:l,removed:d,onOpenUse:r}=s,o=C();let a;e[0]!==t||e[1]!==o?(a=U(o,t),e[0]=t,e[1]=o,e[2]=a):a=e[2];const i=a;let c;e[3]!==t||e[4]!==n||e[5]!==l||e[6]!==r?(c=m.jsx(Oe,{kind:t,rows:n,names:l,onOpen:r}),e[3]=t,e[4]=n,e[5]=l,e[6]=r,e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==d?(u=d.length>0&&m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-sm font-medium",children:i.removedTitle}),m.jsx("p",{className:"text-xs text-muted-foreground",children:i.removedHint}),m.jsx("ul",{className:"text-sm text-muted-foreground",children:d.map(Be)})]}),e[8]=i,e[9]=d,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==u?(f=m.jsxs(m.Fragment,{children:[c,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f}function Be(s){return m.jsx("li",{className:"line-through",children:s},s)}function nt(s,e,t){const n=U(s,e);return t>0?n.usedBy(t):n.notUsed}function Ie(s){const e=N.c(7),{kind:t,state:n,changed:l}=s,d=l===void 0?!0:l,r=C();let o;e[0]!==t||e[1]!==r?(o=U(r,t),e[0]=t,e[1]=r,e[2]=o):o=e[2];const a=o;if(n==="new"){let i;return e[3]!==a.stateNew?(i=m.jsx(z,{variant:"muted",children:a.stateNew}),e[3]=a.stateNew,e[4]=i):i=e[4],i}if(n==="changed"&&d){let i;return e[5]!==a.stateChanged?(i=m.jsx(z,{variant:"muted",children:a.stateChanged}),e[5]=a.stateChanged,e[6]=i):i=e[6],i}return null}function at(s){const e=N.c(9),{kind:t,name:n,status:l,entryState:d}=s;let r;e[0]!==n?(r=m.jsx("h2",{className:"text-lg font-semibold",children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==d||e[3]!==t?(o=m.jsx(Ie,{kind:t,state:d,changed:!1}),e[2]=d,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==r||e[7]!==o?(a=m.jsxs("div",{className:"flex items-center gap-3",children:[r,l,o]}),e[5]=l,e[6]=r,e[7]=o,e[8]=a):a=e[8],a}function lt(s){const e=N.c(9),{kind:t,detail:n}=s;let l;return e[0]!==n.apply||e[1]!==n.meta||e[2]!==n.onDeleted||e[3]!==n.onUndo||e[4]!==n.pending||e[5]!==n.reread||e[6]!==n.row.name||e[7]!==t?(l=m.jsx(De,{kind:t,name:n.row.name,meta:n.meta,pending:n.pending,apply:n.apply,reread:n.reread,onDeleted:n.onDeleted,onUndo:n.onUndo}),e[0]=n.apply,e[1]=n.meta,e[2]=n.onDeleted,e[3]=n.onUndo,e[4]=n.pending,e[5]=n.reread,e[6]=n.row.name,e[7]=t,e[8]=l):l=e[8],l}function it(s,e,t){return{row:e,decofile:t.decofile,meta:t.meta,uses:s.uses,pending:s.isPending,onBack:()=>s.setOpenName(null),onOpenUse:t.onOpenUse,onSave:s.save,onRenamed:s.setOpenName,apply:s.apply,reread:s.reread,planStored:s.planStored,onDeleted:()=>s.setOpenName(null),onUndo:s.undo}}function ot(s,e,t,n,l){return{useRows:t?A(t,s,e,n,l):[],wholeRows:t?A(t,s,null,n,l):[]}}function rt(s,e){const t=N.c(23),n=C(),l=e.row.name,[d,r]=M.useState(l);let o;t[0]!==d?(o=d.trim(),t[0]=d,t[1]=o):o=t[1];const a=o===l;let i,c,u,f,x,g;if(t[2]!==l||t[3]!==s||t[4]!==d||t[5]!==e||t[6]!==n||t[7]!==a){let R;t[14]!==l?(R=v=>v!==l,t[14]=l,t[15]=R):R=t[15];const y=oe(j(e.decofile,s)).filter(R);i=a?null:Y(d,y),c=async()=>{const v=d.trim();if(i||v===l)return;const E=await e.planStored(w=>re(w,s,l,v,e.meta));E&&await e.onSave(E,U(n,s).renamed(v))&&e.onRenamed(v)},u=l,f=d,x=r,g=i?Z(n,i):null,t[2]=l,t[3]=s,t[4]=d,t[5]=e,t[6]=n,t[7]=a,t[8]=i,t[9]=c,t[10]=u,t[11]=f,t[12]=x,t[13]=g}else i=t[8],c=t[9],u=t[10],f=t[11],x=t[12],g=t[13];const p=!!i||a;let h;return t[16]!==c||t[17]!==u||t[18]!==f||t[19]!==x||t[20]!==g||t[21]!==p?(h={savedName:u,name:f,setName:x,message:g,blocked:p,rename:c},t[16]=c,t[17]=u,t[18]=f,t[19]=x,t[20]=g,t[21]=p,t[22]=h):h=t[22],h}function dt(s){const e=N.c(19),{kind:t,id:n,rename:l,pending:d,wholeUses:r,locked:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];const c=i;let u;e[3]!==a?(u=a("sectionsEditor.namedRules.nameLabel"),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=m.jsx(ae,{htmlFor:n,children:u}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let x;e[8]!==c||e[9]!==n||e[10]!==o||e[11]!==d||e[12]!==l||e[13]!==a||e[14]!==r?(x=o?m.jsxs(m.Fragment,{children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.savedName,readOnly:!0,disabled:!0}),o]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.name,onChange:p=>l.setName(p.target.value)}),m.jsx(P,{size:"sm",variant:"outline",disabled:d||l.blocked,onClick:()=>{l.rename()},children:a("sectionsEditor.namedRules.rename")})]}),l.message&&m.jsx("p",{className:"text-xs text-destructive",children:l.message}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameHint}),r>0&&m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameWholeHint})]}),e[8]=c,e[9]=n,e[10]=o,e[11]=d,e[12]=l,e[13]=a,e[14]=r,e[15]=x):x=e[15];let g;return e[16]!==f||e[17]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2",children:[f,x]}),e[16]=f,e[17]=x,e[18]=g):g=e[18],g}export{st as N,Xe as S,nt as a,Ie as b,rt as c,ot as d,at as e,dt as f,Ye as g,tt as h,lt as i,Qe as j,Ze as k,Ge as l,Je as m,it as n,Ce as p,et as u};
1
+ import{c as N,j as m,B as P,b as C,l as J,z as Q,r as M,t as B,v as ee,I as W,q as te,D as se}from"./index-BphI8pNH.js";import{i as ne}from"./ArrowLeft-BQThfb60.js";import{B as z}from"./badge-CYEiaJVw.js";import{L as ae}from"./label-BXumUTqC.js";import{aN as j,aP as L,aS as X,aX as le,l as ie,aY as oe,aZ as re}from"./parse-sections-ClqXxi6i.js";import{p as Y,z as Z,d as de}from"./blocks-tab-states-CwfYFgj9.js";import{s as ce}from"./Trash01-CgNTH-jr.js";import{a as me,n as ue,c as fe,d as xe,e as ge,f as pe,g as A}from"./named-rule-uses-BFHY2QY4.js";import{ar as he,as as K,u as ve,D as Re,ag as Ne,ac as be}from"./site-editor-toast-n7tT-SpR.js";import{b as je}from"./ZoomOut-DzrH576O.js";import{a as we}from"./UserSquare-B7fe7FYj.js";import{u as ye}from"./use-apply-named-rule-B4OGys4b.js";const Xe="p-4";function Ye(s){const e=N.c(14),{intro:t,back:n,actions:l}=s;let d;e[0]!==l?(d=l?m.jsx("div",{className:"flex shrink-0 items-center gap-2","data-slot":"view-actions",children:l}):null,e[0]=l,e[1]=d):d=e[1];const r=d;if(n){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(ne,{size:16}),e[2]=i):i=e[2];let c;e[3]!==n.label||e[4]!==n.onClick?(c=m.jsxs(P,{variant:"ghost",size:"sm",onClick:n.onClick,children:[i,n.label]}),e[3]=n.label,e[4]=n.onClick,e[5]=c):c=e[5];let u;return e[6]!==r||e[7]!==c?(u=m.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4","data-testid":"site-draft-view-header",children:[c,r]}),e[6]=r,e[7]=c,e[8]=u):u=e[8],u}let o;e[9]!==t?(o=m.jsx("p",{className:"min-w-0 flex-1 text-sm text-muted-foreground",children:t}),e[9]=t,e[10]=o):o=e[10];let a;return e[11]!==r||e[12]!==o?(a=m.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-x-4 gap-y-2 px-4 pt-4","data-testid":"site-draft-view-header",children:[o,r]}),e[11]=r,e[12]=o,e[13]=a):a=e[13],a}function Ce(s,e,t,n){const l=j(s,e);return l.kind==="conflict"?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ee(s,e,t,n){const l=j(s,e);if(l.kind==="conflict")return{problem:"conflict"};const d=Y(t,Object.keys(l.values));return d?{problem:d}:{change:Ce(s,e,t.trim(),n)}}function Ue(s,e,t){const n=j(s,e);return n.kind!=="saved"||!Object.hasOwn(n.block,t)?null:{writes:{[L(e).blockKey]:le(n.block,t)}}}function Se(s,e,t,n){if(n===void 0)return null;const l=j(s,e);return l.kind==="conflict"||Object.hasOwn(l.block,t)?null:{writes:{[L(e).blockKey]:X(l.block,e,t,n)}}}function Ze(s,e,t,n){if(!s)return null;const l=j(s,e);return l.kind!=="saved"||!Object.hasOwn(l.values,t)?"new":ke(l.values[t],n)?"published":"changed"}function Ge(s,e,t){if(!s)return;const n=j(s,e);if(n.kind==="saved")return n.values[t]}function Je(s,e,t){if(!e)return[];const n=j(e,t);if(n.kind!=="saved")return[];const l=j(s,t),d=l.kind==="conflict"?{}:l.values;return Object.keys(n.values).filter(r=>!Object.hasOwn(d,r))}function ke(s,e){return typeof s=="number"||typeof e=="number"?s===e:q(s.start,e.start)&&q(s.end,e.end)}function q(s,e){return s===void 0||e===void 0?s===e:s===e||new Date(s).getTime()===new Date(e).getTime()}function Qe(s){const e=N.c(21),{kind:t,rows:n,wholeRows:l,loading:d,marked:r,onOpen:o}=s,a=C(),i=t==="experiments";let c;e[0]!==a?(c=a("sectionsEditor.namedRuleUses.title"),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==c?(u=m.jsx("h3",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==r||e[6]!==o||e[7]!==n||e[8]!==a||e[9]!==i?(f=d?m.jsx("p",{className:"text-sm text-muted-foreground",children:a("sectionsEditor.namedRuleUses.loading")}):n.length===0?m.jsx("p",{className:"text-sm text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.emptyTests":"sectionsEditor.namedRuleUses.emptyCampaigns")}):m.jsx(F,{rows:n,marked:r,onOpen:o}),e[4]=d,e[5]=r,e[6]=o,e[7]=n,e[8]=a,e[9]=i,e[10]=f):f=e[10];let x;e[11]!==r||e[12]!==o||e[13]!==a||e[14]!==i||e[15]!==l?(x=l.length>0&&m.jsxs("div",{className:"mt-3 flex flex-col gap-1",children:[m.jsx("h4",{className:"text-xs font-medium text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTests":"sectionsEditor.namedRuleUses.wholeCampaigns")}),m.jsx("p",{className:"text-xs text-muted-foreground",children:a(i?"sectionsEditor.namedRuleUses.wholeTestsHint":"sectionsEditor.namedRuleUses.wholeCampaignsHint")}),m.jsx(F,{rows:l,marked:r,onOpen:o})]}),e[11]=r,e[12]=o,e[13]=a,e[14]=i,e[15]=l,e[16]=x):x=e[16];let g;return e[17]!==u||e[18]!==f||e[19]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-used-by",children:[u,f,x]}),e[17]=u,e[18]=f,e[19]=x,e[20]=g):g=e[20],g}function F(s){const e=N.c(11),{rows:t,marked:n,onOpen:l}=s,d=C();let r;if(e[0]!==n||e[1]!==l||e[2]!==t||e[3]!==d){let a;e[5]!==n||e[6]!==l||e[7]!==d?(a=i=>{const c=i.blockKind==="page"?we:je,u=i.state==="removed-in-draft";return m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2","data-use-state":i.state,children:[m.jsx(c,{size:14,className:"shrink-0 text-muted-foreground"}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:J("truncate text-sm",u&&"text-muted-foreground line-through"),children:i.title}),m.jsx("p",{className:"truncate text-xs text-muted-foreground",children:[i.path,i.section,i.variant?d("sectionsEditor.namedRuleUses.variant",{index:String(i.variant)}):null].filter(Boolean).join(" · ")})]}),n&&i.state==="draft-only"&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.draftOnly")}),n&&u&&m.jsx(z,{variant:"muted",children:d("sectionsEditor.namedRuleUses.removed")}),l&&!u&&m.jsxs(P,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(i),children:[d("sectionsEditor.namedRuleUses.open"),m.jsx(Q,{size:14})]})]},me(i))},e[5]=n,e[6]=l,e[7]=d,e[8]=a):a=e[8],r=t.map(a),e[0]=n,e[1]=l,e[2]=t,e[3]=d,e[4]=r}else r=e[4];let o;return e[9]!==r?(o=m.jsx("ul",{className:"divide-y divide-border/60 rounded-md border border-border/60",children:r}),e[9]=r,e[10]=o):o=e[10],o}function Oe(s){const e=N.c(12),{kind:t,rows:n,names:l,onOpen:d}=s,r=C();if(n.length===0)return null;let o;e[0]!==t||e[1]!==l||e[2]!==r?(o=r(t==="experiments"?l===1?"sectionsEditor.namedRuleUses.missingTestOne":"sectionsEditor.namedRuleUses.missingTests":l===1?"sectionsEditor.namedRuleUses.missingCampaignOne":"sectionsEditor.namedRuleUses.missingCampaigns"),e[0]=t,e[1]=l,e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=m.jsx("p",{className:"text-sm text-muted-foreground",children:o}),e[4]=o,e[5]=a):a=e[5];let i;e[6]!==d||e[7]!==n?(i=m.jsx(F,{rows:n,marked:!1,onOpen:d}),e[6]=d,e[7]=n,e[8]=i):i=e[8];let c;return e[9]!==a||e[10]!==i?(c=m.jsxs("section",{className:"flex flex-col gap-2","data-testid":"named-rule-missing-uses",children:[a,i]}),e[9]=a,e[10]=i,e[11]=c):c=e[11],c}function De({kind:s,name:e,meta:t,pending:n,apply:l,reread:d,onDeleted:r,onUndo:o}){const a=C(),i=s==="experiments",[c,u]=M.useState(!1),f=async()=>{const p=await d();return p||B.info(a("sectionsEditor.namedRules.unavailable"),{...K,description:a("sectionsEditor.namedRules.unavailableHint")}),p},x=async p=>{const h=await f();if(!h)return;const R=Se(h,s,e,p);if(R){o(R);return}const y=j(h,s).kind==="conflict";B.info(a(y?"sectionsEditor.namedRules.changedMeanwhile":"sectionsEditor.namedRules.alreadyBack"),{...K,description:a(y?"sectionsEditor.namedRules.changedMeanwhileHint":"sectionsEditor.namedRules.alreadyBackHint")})},g=async()=>{u(!0);let p;try{p=await f()}finally{u(!1)}if(!p)return;const h=Ue(p,s,e);if(!h)return;const R=j(p,s),y=R.kind==="saved"?R.block[e]:void 0,v=ue(a,fe(p,t,s,e));(await l(h)).ok&&(r(),B.success(i?a("experiments.v8.deleted",{name:e}):a("sandbox.dateCampaigns.deleted",{name:e}),{id:he,description:v?.one?a("sectionsEditor.namedRuleDelete.stillUsedOne",{places:v.places}):v?a("sectionsEditor.namedRuleDelete.stillUsed",{places:v.places}):a(i?"experiments.v8.deletedHint":"sandbox.dateCampaigns.deletedHint"),action:{label:a("sectionsEditor.namedRules.undo"),onClick:()=>{x(y)}}}))};return m.jsxs(P,{type:"button",variant:"ghost",size:"sm",disabled:n||c,onClick:()=>{g()},children:[m.jsx(ce,{size:16}),a(i?"experiments.v8.delete":"sandbox.dateCampaigns.delete")]})}function Te(s){const e=N.c(11);let t;e[0]!==s.branch||e[1]!==s.orgSlug||e[2]!==s.virtualMcpId?(t={orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch},e[0]=s.branch,e[1]=s.orgSlug,e[2]=s.virtualMcpId,e[3]=t):t=e[3];const n=t,l=ve(s.virtualMcpId,s.branch),d=Re(n),r=Ne(l,d||null),o=be(l,d||null,r.data);if(!s.decofile)return null;let a;e[4]!==r.data?(a=r.data?Object.keys(r.data.changes).length:void 0,e[4]=r.data,e[5]=a):a=e[5];const i=o.data?.entries;let c;return e[6]!==s.decofile||e[7]!==s.meta||e[8]!==a||e[9]!==i?(c=xe({decofile:s.decofile,meta:s.meta,changeCount:a,sides:i}),e[6]=s.decofile,e[7]=s.meta,e[8]=a,e[9]=i,e[10]=c):c=e[10],c}function U(s,e){return e==="experiments"?{new:s("experiments.v8.new"),usedBy:t=>s("experiments.v8.usedBy",{count:String(t)}),notUsed:s("experiments.v8.notUsed"),stateNew:s("experiments.v8.state.new"),stateChanged:s("experiments.v8.state.changed"),removedTitle:s("experiments.v8.removedTitle"),removedHint:s("experiments.v8.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdTest",{name:t}),renamed:t=>s("experiments.v8.renamed",{name:t}),renameHint:s("experiments.v8.renameHint"),renameWholeHint:s("experiments.v8.renameWholeHint")}:{new:s("sandbox.dateCampaigns.new"),usedBy:t=>s("sandbox.dateCampaigns.usedBy",{count:String(t)}),notUsed:s("sandbox.dateCampaigns.notUsed"),stateNew:s("sandbox.dateCampaigns.state.new"),stateChanged:s("sandbox.dateCampaigns.state.changed"),removedTitle:s("sandbox.dateCampaigns.removedTitle"),removedHint:s("sandbox.dateCampaigns.removedHint"),created:t=>s("sectionsEditor.namedRulePicker.createdCampaign",{name:t}),renamed:t=>s("sandbox.dateCampaigns.renamed",{name:t}),renameHint:s("sandbox.dateCampaigns.renameHint"),renameWholeHint:s("sandbox.dateCampaigns.renameWholeHint")}}function He(s,e,t){const n=ie(e,t);return n!=="available"?n:j(s,t).kind==="conflict"?"conflict":null}function et(s,e){const t=N.c(48),n=C(),{orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a}=e;let i;t[0]!==r||t[1]!==o||t[2]!==a||t[3]!==l||t[4]!==d?(i={orgSlug:l,virtualMcpId:d,branch:r,decofile:o,meta:a},t[0]=r,t[1]=o,t[2]=a,t[3]=l,t[4]=d,t[5]=i):i=t[5];const c=Te(i);let u;t[6]!==r||t[7]!==l||t[8]!==d?(u={orgSlug:l,virtualMcpId:d,branch:r},t[6]=r,t[7]=l,t[8]=d,t[9]=u):u=t[9];const{apply:f,reread:x,planStored:g,isPending:p}=ye(u),[h,R]=M.useState(null),[y,v]=M.useState(!1);let E;t[10]!==f||t[11]!==n?(E=async(b,_)=>{const T=_===void 0?n("sectionsEditor.namedRules.saved"):_;if(!b)return!1;const H=await f(b);return H.ok&&B.success(T,{...K,description:n("sectionsEditor.namedRules.savedHint")}),H.ok},t[10]=f,t[11]=n,t[12]=E):E=t[12];const w=E;let I;t[13]!==o||t[14]!==s||t[15]!==w||t[16]!==n?(I=b=>{if(b.kind!==s||!b.create)return;const _=b.kind==="experiments"?b.create.share:b.create.window,T=Ee(o,s,b.name,_);if(!("change"in T)){B.info(T.problem==="conflict"?n("sectionsEditor.namedRules.changedMeanwhile"):Z(n,T.problem),K);return}const H=b.name.trim();w(T.change,U(n,s).created(H)).then(G=>{G&&(v(!1),R(H))})},t[13]=o,t[14]=s,t[15]=w,t[16]=n,t[17]=I):I=t[17];const V=I;let S;t[18]!==o||t[19]!==s||t[20]!==a?(S=He(o,a,s),t[18]=o,t[19]=s,t[20]=a,t[21]=S):S=t[21];let k;t[22]!==o||t[23]!==s||t[24]!==a||t[25]!==c?(k=c?ge(c,s,o,a):[],t[22]=o,t[23]=s,t[24]=a,t[25]=c,t[26]=k):k=t[26];let O;t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==c?(O=c?pe(c,s,o,a):0,t[27]=o,t[28]=s,t[29]=a,t[30]=c,t[31]=O):O=t[31];let D;t[32]!==w?(D=b=>{w(b)},t[32]=w,t[33]=D):D=t[33];let $;return t[34]!==f||t[35]!==V||t[36]!==y||t[37]!==p||t[38]!==h||t[39]!==g||t[40]!==x||t[41]!==w||t[42]!==S||t[43]!==k||t[44]!==O||t[45]!==D||t[46]!==c?($={uses:c,apply:f,reread:x,planStored:g,isPending:p,openName:h,setOpenName:R,creating:y,setCreating:v,blocked:S,missing:k,missingNames:O,save:w,create:V,undo:D},t[34]=f,t[35]=V,t[36]=y,t[37]=p,t[38]=h,t[39]=g,t[40]=x,t[41]=w,t[42]=S,t[43]=k,t[44]=O,t[45]=D,t[46]=c,t[47]=$):$=t[47],$}function tt(s){const e=N.c(23),{kind:t,open:n,onOpenChange:l,existingNames:d,pending:r,onCreate:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];let c;e[3]!==i.new?(c=m.jsx(ee,{className:"sr-only",children:i.new}),e[3]=i.new,e[4]=c):c=e[4];let u;e[5]!==a?(u=a("sectionsEditor.namedRules.create"),e[5]=a,e[6]=u):u=e[6];let f;e[7]!==l?(f=()=>l(!1),e[7]=l,e[8]=f):f=e[8];let x;e[9]!==d||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==u||e[14]!==f?(x=m.jsx(de,{kind:t,initialName:"",existingNames:d,pending:r,submitLabel:u,dismiss:"cancel",standalone:!0,onBack:f,onSubmit:o}),e[9]=d,e[10]=t,e[11]=o,e[12]=r,e[13]=u,e[14]=f,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=m.jsxs(te,{className:"p-0 sm:max-w-md",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let p;return e[19]!==l||e[20]!==n||e[21]!==g?(p=m.jsx(se,{open:n,onOpenChange:l,children:g}),e[19]=l,e[20]=n,e[21]=g,e[22]=p):p=e[22],p}function st(s){const e=N.c(14),{kind:t,missing:n,missingNames:l,removed:d,onOpenUse:r}=s,o=C();let a;e[0]!==t||e[1]!==o?(a=U(o,t),e[0]=t,e[1]=o,e[2]=a):a=e[2];const i=a;let c;e[3]!==t||e[4]!==n||e[5]!==l||e[6]!==r?(c=m.jsx(Oe,{kind:t,rows:n,names:l,onOpen:r}),e[3]=t,e[4]=n,e[5]=l,e[6]=r,e[7]=c):c=e[7];let u;e[8]!==i||e[9]!==d?(u=d.length>0&&m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-sm font-medium",children:i.removedTitle}),m.jsx("p",{className:"text-xs text-muted-foreground",children:i.removedHint}),m.jsx("ul",{className:"text-sm text-muted-foreground",children:d.map(Be)})]}),e[8]=i,e[9]=d,e[10]=u):u=e[10];let f;return e[11]!==c||e[12]!==u?(f=m.jsxs(m.Fragment,{children:[c,u]}),e[11]=c,e[12]=u,e[13]=f):f=e[13],f}function Be(s){return m.jsx("li",{className:"line-through",children:s},s)}function nt(s,e,t){const n=U(s,e);return t>0?n.usedBy(t):n.notUsed}function Ie(s){const e=N.c(7),{kind:t,state:n,changed:l}=s,d=l===void 0?!0:l,r=C();let o;e[0]!==t||e[1]!==r?(o=U(r,t),e[0]=t,e[1]=r,e[2]=o):o=e[2];const a=o;if(n==="new"){let i;return e[3]!==a.stateNew?(i=m.jsx(z,{variant:"muted",children:a.stateNew}),e[3]=a.stateNew,e[4]=i):i=e[4],i}if(n==="changed"&&d){let i;return e[5]!==a.stateChanged?(i=m.jsx(z,{variant:"muted",children:a.stateChanged}),e[5]=a.stateChanged,e[6]=i):i=e[6],i}return null}function at(s){const e=N.c(9),{kind:t,name:n,status:l,entryState:d}=s;let r;e[0]!==n?(r=m.jsx("h2",{className:"text-lg font-semibold",children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==d||e[3]!==t?(o=m.jsx(Ie,{kind:t,state:d,changed:!1}),e[2]=d,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==r||e[7]!==o?(a=m.jsxs("div",{className:"flex items-center gap-3",children:[r,l,o]}),e[5]=l,e[6]=r,e[7]=o,e[8]=a):a=e[8],a}function lt(s){const e=N.c(9),{kind:t,detail:n}=s;let l;return e[0]!==n.apply||e[1]!==n.meta||e[2]!==n.onDeleted||e[3]!==n.onUndo||e[4]!==n.pending||e[5]!==n.reread||e[6]!==n.row.name||e[7]!==t?(l=m.jsx(De,{kind:t,name:n.row.name,meta:n.meta,pending:n.pending,apply:n.apply,reread:n.reread,onDeleted:n.onDeleted,onUndo:n.onUndo}),e[0]=n.apply,e[1]=n.meta,e[2]=n.onDeleted,e[3]=n.onUndo,e[4]=n.pending,e[5]=n.reread,e[6]=n.row.name,e[7]=t,e[8]=l):l=e[8],l}function it(s,e,t){return{row:e,decofile:t.decofile,meta:t.meta,uses:s.uses,pending:s.isPending,onBack:()=>s.setOpenName(null),onOpenUse:t.onOpenUse,onSave:s.save,onRenamed:s.setOpenName,apply:s.apply,reread:s.reread,planStored:s.planStored,onDeleted:()=>s.setOpenName(null),onUndo:s.undo}}function ot(s,e,t,n,l){return{useRows:t?A(t,s,e,n,l):[],wholeRows:t?A(t,s,null,n,l):[]}}function rt(s,e){const t=N.c(23),n=C(),l=e.row.name,[d,r]=M.useState(l);let o;t[0]!==d?(o=d.trim(),t[0]=d,t[1]=o):o=t[1];const a=o===l;let i,c,u,f,x,g;if(t[2]!==l||t[3]!==s||t[4]!==d||t[5]!==e||t[6]!==n||t[7]!==a){let R;t[14]!==l?(R=v=>v!==l,t[14]=l,t[15]=R):R=t[15];const y=oe(j(e.decofile,s)).filter(R);i=a?null:Y(d,y),c=async()=>{const v=d.trim();if(i||v===l)return;const E=await e.planStored(w=>re(w,s,l,v,e.meta));E&&await e.onSave(E,U(n,s).renamed(v))&&e.onRenamed(v)},u=l,f=d,x=r,g=i?Z(n,i):null,t[2]=l,t[3]=s,t[4]=d,t[5]=e,t[6]=n,t[7]=a,t[8]=i,t[9]=c,t[10]=u,t[11]=f,t[12]=x,t[13]=g}else i=t[8],c=t[9],u=t[10],f=t[11],x=t[12],g=t[13];const p=!!i||a;let h;return t[16]!==c||t[17]!==u||t[18]!==f||t[19]!==x||t[20]!==g||t[21]!==p?(h={savedName:u,name:f,setName:x,message:g,blocked:p,rename:c},t[16]=c,t[17]=u,t[18]=f,t[19]=x,t[20]=g,t[21]=p,t[22]=h):h=t[22],h}function dt(s){const e=N.c(19),{kind:t,id:n,rename:l,pending:d,wholeUses:r,locked:o}=s,a=C();let i;e[0]!==t||e[1]!==a?(i=U(a,t),e[0]=t,e[1]=a,e[2]=i):i=e[2];const c=i;let u;e[3]!==a?(u=a("sectionsEditor.namedRules.nameLabel"),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=m.jsx(ae,{htmlFor:n,children:u}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let x;e[8]!==c||e[9]!==n||e[10]!==o||e[11]!==d||e[12]!==l||e[13]!==a||e[14]!==r?(x=o?m.jsxs(m.Fragment,{children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.savedName,readOnly:!0,disabled:!0}),o]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(W,{id:n,className:"max-w-xs",value:l.name,onChange:p=>l.setName(p.target.value)}),m.jsx(P,{size:"sm",variant:"outline",disabled:d||l.blocked,onClick:()=>{l.rename()},children:a("sectionsEditor.namedRules.rename")})]}),l.message&&m.jsx("p",{className:"text-xs text-destructive",children:l.message}),m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameHint}),r>0&&m.jsx("p",{className:"text-xs text-muted-foreground",children:c.renameWholeHint})]}),e[8]=c,e[9]=n,e[10]=o,e[11]=d,e[12]=l,e[13]=a,e[14]=r,e[15]=x):x=e[15];let g;return e[16]!==f||e[17]!==x?(g=m.jsxs("section",{className:"flex flex-col gap-2",children:[f,x]}),e[16]=f,e[17]=x,e[18]=g):g=e[18],g}export{st as N,Xe as S,nt as a,Ie as b,rt as c,ot as d,at as e,dt as f,Ye as g,tt as h,lt as i,Qe as j,Ze as k,Ge as l,Je as m,it as n,Ce as p,et as u};
@@ -1 +1 @@
1
- import{c as y,j as t,r as w,y as _,b as S,B as N,D as k,q as K,s as A,v as R,aM as E,I as T,l as V,t as $}from"./index-DY9jv8u5.js";import{i as B}from"./ArrowLeft-BYRX2oWU.js";import{s as F}from"./Plus-BRxUqR_F.js";import{L as H}from"./label-CUbZuKc3.js";import{R as L}from"./repository-import-picker-WAot3Ghn.js";import{u as O}from"./use-navigate-to-agent-DdSspEm5.js";import{S as z}from"./thread-intent-BYXYhdV9.js";import{d as Z}from"./repository-binding-DEE5HjOP.js";const D={viewBox:"0 0 96 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},l={stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};function q(a){const e=y.c(9),{className:n}=a;let r,o,s,c,i,u,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M22 46V22",...l,opacity:.7}),o=t.jsx("circle",{cx:"22",cy:"18",r:"4",...l,opacity:.8}),s=t.jsx("circle",{cx:"22",cy:"50",r:"4",...l,opacity:.8}),c=t.jsx("path",{d:"M22 32h14a6 6 0 0 1 6 6v4",...l,opacity:.6}),i=t.jsx("circle",{cx:"42",cy:"46",r:"4",...l,opacity:.7}),u=t.jsx("path",{d:"M56 22h9l3 4h14a3 3 0 0 1 3 3v20a3 3 0 0 1-3 3H56a3 3 0 0 1-3-3V25a3 3 0 0 1 3-3Z",...l,opacity:.75}),h=t.jsx("path",{d:"M53 34h32",...l,opacity:.5}),e[0]=r,e[1]=o,e[2]=s,e[3]=c,e[4]=i,e[5]=u,e[6]=h):(r=e[0],o=e[1],s=e[2],c=e[3],i=e[4],u=e[5],h=e[6]);let d;return e[7]!==n?(d=t.jsxs("svg",{...D,className:n,children:[r,o,s,c,i,u,h]}),e[7]=n,e[8]=d):d=e[8],d}function I(a){const e=y.c(4),{className:n}=a;let r,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M16 22a4 4 0 0 1 4-4h14l6 6h20a4 4 0 0 1 4 4v20a4 4 0 0 1-4 4H20a4 4 0 0 1-4-4V22Z",...l,opacity:.8}),o=t.jsx("path",{d:"M16 28h64",...l,opacity:.5}),e[0]=r,e[1]=o):(r=e[0],o=e[1]);let s;return e[2]!==n?(s=t.jsxs("svg",{...D,className:n,children:[r,o]}),e[2]=n,e[3]=s):s=e[3],s}function ie(a){const e=y.c(5),{className:n}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:"46",y:"16",width:"128",height:"88",rx:"8",...l}),t.jsx("path",{d:"M46 34h128",...l,opacity:.6}),t.jsx("circle",{cx:"56",cy:"25",r:"2",fill:"currentColor",opacity:.6}),t.jsx("circle",{cx:"64",cy:"25",r:"2",fill:"currentColor",opacity:.45}),t.jsx("circle",{cx:"72",cy:"25",r:"2",fill:"currentColor",opacity:.3}),t.jsx("rect",{x:"58",y:"44",width:"104",height:"24",rx:"4",...l,opacity:.5}),t.jsx("rect",{x:"58",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.4}),t.jsx("rect",{x:"95",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.3}),t.jsx("rect",{x:"132",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.22})]}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("g",{transform:"rotate(-8 44 92)",children:[t.jsx("rect",{x:"22",y:"52",width:"44",height:"76",rx:"8",...l,fill:"var(--color-background)"}),t.jsx("path",{d:"M37 60h14",...l,opacity:.5}),t.jsx("rect",{x:"29",y:"68",width:"30",height:"20",rx:"3",...l,opacity:.45}),t.jsx("path",{d:"M29 96h30M29 104h20",...l,opacity:.35}),t.jsx("rect",{x:"29",y:"112",width:"30",height:"8",rx:"4",...l,opacity:.5})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("g",{transform:"rotate(10 168 104)",children:[t.jsx("path",{d:"M150 92h30a6 6 0 0 1 6 6v26a6 6 0 0 1-6 6h-30a6 6 0 0 1-6-6V98a6 6 0 0 1 6-6Z",...l,fill:"var(--color-background)"}),t.jsx("circle",{cx:"165",cy:"104",r:"3.5",...l}),t.jsx("path",{d:"M152 116h26M152 124h16",...l,opacity:.45})]}),e[2]=s):s=e[2];let c;return e[3]!==n?(c=t.jsxs("svg",{viewBox:"0 0 220 140",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:n,children:[r,o,s]}),e[3]=n,e[4]=c):c=e[4],c}const v=new z(!1);let M="unknown",P=null;function U(a,e){M=a,P=e?.onCreated??null,_("project_create_clicked",{source:a}),v.set(!0)}function le(){const a=y.c(2),e=w.useSyncExternalStore(v.subscribe,v.get);let n;return a[0]!==e?(n=[e,v.set],a[0]=e,a[1]=n):n=a[1],n}function C(a){const e=P;P=null,e?.(a)}function pe(){return M}const W={repository:{titleKey:"projects.new.path.repository",hintKey:"projects.new.path.repository.hint",art:q,plate:"bg-chart-5/10 group-hover:bg-chart-5/16",art_:"text-chart-5"},folder:{titleKey:"projects.new.path.folder",hintKey:"projects.new.path.folder.hint",art:I,plate:"bg-chart-1/10 group-hover:bg-chart-1/16",art_:"text-chart-1"}},G=["repository","folder"];function J(a){const e=y.c(25),{path:n,onSelect:r}=a,o=S(),s=W[n],c=s.art;let i;e[0]!==s.art_||e[1]!==s.plate?(i=V("flex h-28 items-center justify-center rounded-lg transition-colors",s.plate,s.art_),e[0]=s.art_,e[1]=s.plate,e[2]=i):i=e[2];let u;e[3]!==c?(u=t.jsx(c,{className:"h-20"}),e[3]=c,e[4]=u):u=e[4];let h;e[5]!==i||e[6]!==u?(h=t.jsx("span",{className:i,children:u}),e[5]=i,e[6]=u,e[7]=h):h=e[7];let d;e[8]!==s.titleKey||e[9]!==o?(d=o(s.titleKey),e[8]=s.titleKey,e[9]=o,e[10]=d):d=e[10];let x;e[11]!==d?(x=t.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),e[11]=d,e[12]=x):x=e[12];let f;e[13]!==s.hintKey||e[14]!==o?(f=o(s.hintKey),e[13]=s.hintKey,e[14]=o,e[15]=f):f=e[15];let j;e[16]!==f?(j=t.jsx("span",{className:"text-xs text-muted-foreground",children:f}),e[16]=f,e[17]=j):j=e[17];let m;e[18]!==x||e[19]!==j?(m=t.jsxs("span",{className:"flex flex-col gap-0.5 px-1 pb-1",children:[x,j]}),e[18]=x,e[19]=j,e[20]=m):m=e[20];let g;return e[21]!==r||e[22]!==h||e[23]!==m?(g=t.jsxs("button",{type:"button",onClick:r,className:"group flex flex-col gap-3 surface p-3 text-left focus-ring transition-[transform,background-color] duration-200 hover:-translate-y-0.5 hover:bg-accent motion-reduce:transition-none motion-reduce:hover:translate-y-0",children:[h,m]}),e[21]=r,e[22]=h,e[23]=m,e[24]=g):g=e[24],g}function Q(a){const e=y.c(8),{label:n,children:r,hint:o}=a;let s;e[0]!==n?(s=t.jsx(H,{children:n}),e[0]=n,e[1]=s):s=e[1];let c;e[2]!==o?(c=o&&t.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let i;return e[4]!==r||e[5]!==s||e[6]!==c?(i=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[s,r,c]}),e[4]=r,e[5]=s,e[6]=c,e[7]=i):i=e[7],i}function he({open:a,onOpenChange:e,source:n="org_home"}){const r=S(),o=Z(),s=O(),[c,i]=w.useState(null),[u,h]=w.useState(""),[d,x]=w.useState(null),f=w.useRef(null),j=()=>{i(null),h(""),x(null)},m=()=>{e(!1),j()};if(c==="repository")return t.jsx(L,{open:!0,onOpenChange:p=>{p||m()},onImportComplete:({virtualMcpId:p})=>{p&&(C(p),s(p)),m()}});const g=async()=>{if(o.create.isPending)return;const p=u.trim();if(!p){x(r("projects.new.nameRequired"));return}try{const b=(await o.create.mutateAsync({title:p,description:null,status:"active",pinned:!1,connections:[],metadata:{instructions:null,project:{storeUrl:null},ui:{pinnedViews:null,layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}}}))?.id;_("project_created",{source:n,path:c}),m(),b&&(C(b),s(b)),$.success(r("projects.new.created",{title:p}))}catch{x(r("projects.new.failed"))}};return t.jsx(k,{open:a,onOpenChange:p=>{p?e(!0):m()},children:t.jsxs(K,{className:"sm:max-w-3xl",ref:f,onOpenAutoFocus:p=>{p.preventDefault(),f.current?.focus()},children:[t.jsxs(A,{children:[t.jsx(R,{children:r("projects.new.title")}),t.jsx(E,{children:r(c?"projects.new.step.folder.title":"projects.new.subtitle")})]}),c===null?t.jsx("div",{className:"grid grid-cols-1 gap-3 animate-in fade-in-0 duration-200 sm:grid-cols-2 motion-reduce:animate-none",children:G.map(p=>t.jsx(J,{path:p,onSelect:()=>{_("project_create_path_selected",{source:n,path:p}),i(p)}},p))}):t.jsxs("form",{className:"flex flex-col gap-4 animate-in fade-in-0 slide-in-from-right-2 duration-200 motion-reduce:animate-none",onSubmit:p=>{p.preventDefault(),x(null),g()},children:[t.jsx(Q,{label:r("projects.new.nameLabel"),children:t.jsx(T,{autoFocus:!0,value:u,onChange:p=>h(p.target.value),placeholder:r("projects.new.namePlaceholder")})}),d&&t.jsx("p",{className:"text-sm text-destructive",children:d}),t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[t.jsxs(N,{type:"button",variant:"ghost",onClick:()=>j(),children:[t.jsx(B,{size:14}),r("projects.new.back")]}),t.jsx(N,{type:"submit",disabled:o.create.isPending,children:o.create.isPending?r("projects.new.creating"):r("projects.new.create")})]})]})]})})}function de(a){const e=y.c(11),{source:n,variant:r,size:o,label:s}=a,c=r===void 0?"default":r,i=o===void 0?"sm":o,u=S();let h;e[0]!==n?(h=()=>U(n),e[0]=n,e[1]=h):h=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(F,{size:14}),e[2]=d):d=e[2];let x;e[3]!==s||e[4]!==u?(x=s??u("projects.home.newProject"),e[3]=s,e[4]=u,e[5]=x):x=e[5];let f;return e[6]!==i||e[7]!==h||e[8]!==x||e[9]!==c?(f=t.jsxs(N,{size:i,variant:c,onClick:h,children:[d,x]}),e[6]=i,e[7]=h,e[8]=x,e[9]=c,e[10]=f):f=e[10],f}export{ie as E,de as N,he as a,pe as n,U as o,le as u};
1
+ import{c as y,j as t,r as w,y as _,b as S,B as N,D as k,q as K,s as A,v as R,aM as E,I as T,l as V,t as $}from"./index-BphI8pNH.js";import{i as B}from"./ArrowLeft-BQThfb60.js";import{s as F}from"./Plus-C4rGoU1F.js";import{L as H}from"./label-BXumUTqC.js";import{R as L}from"./repository-import-picker-DRcn5MCM.js";import{u as O}from"./use-navigate-to-agent-CfXi671z.js";import{S as z}from"./thread-intent-BQGp3MKl.js";import{d as Z}from"./repository-binding-CqjA7Tko.js";const D={viewBox:"0 0 96 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},l={stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"};function q(a){const e=y.c(9),{className:n}=a;let r,o,s,c,i,u,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M22 46V22",...l,opacity:.7}),o=t.jsx("circle",{cx:"22",cy:"18",r:"4",...l,opacity:.8}),s=t.jsx("circle",{cx:"22",cy:"50",r:"4",...l,opacity:.8}),c=t.jsx("path",{d:"M22 32h14a6 6 0 0 1 6 6v4",...l,opacity:.6}),i=t.jsx("circle",{cx:"42",cy:"46",r:"4",...l,opacity:.7}),u=t.jsx("path",{d:"M56 22h9l3 4h14a3 3 0 0 1 3 3v20a3 3 0 0 1-3 3H56a3 3 0 0 1-3-3V25a3 3 0 0 1 3-3Z",...l,opacity:.75}),h=t.jsx("path",{d:"M53 34h32",...l,opacity:.5}),e[0]=r,e[1]=o,e[2]=s,e[3]=c,e[4]=i,e[5]=u,e[6]=h):(r=e[0],o=e[1],s=e[2],c=e[3],i=e[4],u=e[5],h=e[6]);let d;return e[7]!==n?(d=t.jsxs("svg",{...D,className:n,children:[r,o,s,c,i,u,h]}),e[7]=n,e[8]=d):d=e[8],d}function I(a){const e=y.c(4),{className:n}=a;let r,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("path",{d:"M16 22a4 4 0 0 1 4-4h14l6 6h20a4 4 0 0 1 4 4v20a4 4 0 0 1-4 4H20a4 4 0 0 1-4-4V22Z",...l,opacity:.8}),o=t.jsx("path",{d:"M16 28h64",...l,opacity:.5}),e[0]=r,e[1]=o):(r=e[0],o=e[1]);let s;return e[2]!==n?(s=t.jsxs("svg",{...D,className:n,children:[r,o]}),e[2]=n,e[3]=s):s=e[3],s}function ie(a){const e=y.c(5),{className:n}=a;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:"46",y:"16",width:"128",height:"88",rx:"8",...l}),t.jsx("path",{d:"M46 34h128",...l,opacity:.6}),t.jsx("circle",{cx:"56",cy:"25",r:"2",fill:"currentColor",opacity:.6}),t.jsx("circle",{cx:"64",cy:"25",r:"2",fill:"currentColor",opacity:.45}),t.jsx("circle",{cx:"72",cy:"25",r:"2",fill:"currentColor",opacity:.3}),t.jsx("rect",{x:"58",y:"44",width:"104",height:"24",rx:"4",...l,opacity:.5}),t.jsx("rect",{x:"58",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.4}),t.jsx("rect",{x:"95",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.3}),t.jsx("rect",{x:"132",y:"76",width:"30",height:"16",rx:"3",...l,opacity:.22})]}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("g",{transform:"rotate(-8 44 92)",children:[t.jsx("rect",{x:"22",y:"52",width:"44",height:"76",rx:"8",...l,fill:"var(--color-background)"}),t.jsx("path",{d:"M37 60h14",...l,opacity:.5}),t.jsx("rect",{x:"29",y:"68",width:"30",height:"20",rx:"3",...l,opacity:.45}),t.jsx("path",{d:"M29 96h30M29 104h20",...l,opacity:.35}),t.jsx("rect",{x:"29",y:"112",width:"30",height:"8",rx:"4",...l,opacity:.5})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("g",{transform:"rotate(10 168 104)",children:[t.jsx("path",{d:"M150 92h30a6 6 0 0 1 6 6v26a6 6 0 0 1-6 6h-30a6 6 0 0 1-6-6V98a6 6 0 0 1 6-6Z",...l,fill:"var(--color-background)"}),t.jsx("circle",{cx:"165",cy:"104",r:"3.5",...l}),t.jsx("path",{d:"M152 116h26M152 124h16",...l,opacity:.45})]}),e[2]=s):s=e[2];let c;return e[3]!==n?(c=t.jsxs("svg",{viewBox:"0 0 220 140",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,className:n,children:[r,o,s]}),e[3]=n,e[4]=c):c=e[4],c}const v=new z(!1);let M="unknown",P=null;function U(a,e){M=a,P=e?.onCreated??null,_("project_create_clicked",{source:a}),v.set(!0)}function le(){const a=y.c(2),e=w.useSyncExternalStore(v.subscribe,v.get);let n;return a[0]!==e?(n=[e,v.set],a[0]=e,a[1]=n):n=a[1],n}function C(a){const e=P;P=null,e?.(a)}function pe(){return M}const W={repository:{titleKey:"projects.new.path.repository",hintKey:"projects.new.path.repository.hint",art:q,plate:"bg-chart-5/10 group-hover:bg-chart-5/16",art_:"text-chart-5"},folder:{titleKey:"projects.new.path.folder",hintKey:"projects.new.path.folder.hint",art:I,plate:"bg-chart-1/10 group-hover:bg-chart-1/16",art_:"text-chart-1"}},G=["repository","folder"];function J(a){const e=y.c(25),{path:n,onSelect:r}=a,o=S(),s=W[n],c=s.art;let i;e[0]!==s.art_||e[1]!==s.plate?(i=V("flex h-28 items-center justify-center rounded-lg transition-colors",s.plate,s.art_),e[0]=s.art_,e[1]=s.plate,e[2]=i):i=e[2];let u;e[3]!==c?(u=t.jsx(c,{className:"h-20"}),e[3]=c,e[4]=u):u=e[4];let h;e[5]!==i||e[6]!==u?(h=t.jsx("span",{className:i,children:u}),e[5]=i,e[6]=u,e[7]=h):h=e[7];let d;e[8]!==s.titleKey||e[9]!==o?(d=o(s.titleKey),e[8]=s.titleKey,e[9]=o,e[10]=d):d=e[10];let x;e[11]!==d?(x=t.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),e[11]=d,e[12]=x):x=e[12];let f;e[13]!==s.hintKey||e[14]!==o?(f=o(s.hintKey),e[13]=s.hintKey,e[14]=o,e[15]=f):f=e[15];let j;e[16]!==f?(j=t.jsx("span",{className:"text-xs text-muted-foreground",children:f}),e[16]=f,e[17]=j):j=e[17];let m;e[18]!==x||e[19]!==j?(m=t.jsxs("span",{className:"flex flex-col gap-0.5 px-1 pb-1",children:[x,j]}),e[18]=x,e[19]=j,e[20]=m):m=e[20];let g;return e[21]!==r||e[22]!==h||e[23]!==m?(g=t.jsxs("button",{type:"button",onClick:r,className:"group flex flex-col gap-3 surface p-3 text-left focus-ring transition-[transform,background-color] duration-200 hover:-translate-y-0.5 hover:bg-accent motion-reduce:transition-none motion-reduce:hover:translate-y-0",children:[h,m]}),e[21]=r,e[22]=h,e[23]=m,e[24]=g):g=e[24],g}function Q(a){const e=y.c(8),{label:n,children:r,hint:o}=a;let s;e[0]!==n?(s=t.jsx(H,{children:n}),e[0]=n,e[1]=s):s=e[1];let c;e[2]!==o?(c=o&&t.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let i;return e[4]!==r||e[5]!==s||e[6]!==c?(i=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[s,r,c]}),e[4]=r,e[5]=s,e[6]=c,e[7]=i):i=e[7],i}function he({open:a,onOpenChange:e,source:n="org_home"}){const r=S(),o=Z(),s=O(),[c,i]=w.useState(null),[u,h]=w.useState(""),[d,x]=w.useState(null),f=w.useRef(null),j=()=>{i(null),h(""),x(null)},m=()=>{e(!1),j()};if(c==="repository")return t.jsx(L,{open:!0,onOpenChange:p=>{p||m()},onImportComplete:({virtualMcpId:p})=>{p&&(C(p),s(p)),m()}});const g=async()=>{if(o.create.isPending)return;const p=u.trim();if(!p){x(r("projects.new.nameRequired"));return}try{const b=(await o.create.mutateAsync({title:p,description:null,status:"active",pinned:!1,connections:[],metadata:{instructions:null,project:{storeUrl:null},ui:{pinnedViews:null,layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}}}))?.id;_("project_created",{source:n,path:c}),m(),b&&(C(b),s(b)),$.success(r("projects.new.created",{title:p}))}catch{x(r("projects.new.failed"))}};return t.jsx(k,{open:a,onOpenChange:p=>{p?e(!0):m()},children:t.jsxs(K,{className:"sm:max-w-3xl",ref:f,onOpenAutoFocus:p=>{p.preventDefault(),f.current?.focus()},children:[t.jsxs(A,{children:[t.jsx(R,{children:r("projects.new.title")}),t.jsx(E,{children:r(c?"projects.new.step.folder.title":"projects.new.subtitle")})]}),c===null?t.jsx("div",{className:"grid grid-cols-1 gap-3 animate-in fade-in-0 duration-200 sm:grid-cols-2 motion-reduce:animate-none",children:G.map(p=>t.jsx(J,{path:p,onSelect:()=>{_("project_create_path_selected",{source:n,path:p}),i(p)}},p))}):t.jsxs("form",{className:"flex flex-col gap-4 animate-in fade-in-0 slide-in-from-right-2 duration-200 motion-reduce:animate-none",onSubmit:p=>{p.preventDefault(),x(null),g()},children:[t.jsx(Q,{label:r("projects.new.nameLabel"),children:t.jsx(T,{autoFocus:!0,value:u,onChange:p=>h(p.target.value),placeholder:r("projects.new.namePlaceholder")})}),d&&t.jsx("p",{className:"text-sm text-destructive",children:d}),t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[t.jsxs(N,{type:"button",variant:"ghost",onClick:()=>j(),children:[t.jsx(B,{size:14}),r("projects.new.back")]}),t.jsx(N,{type:"submit",disabled:o.create.isPending,children:o.create.isPending?r("projects.new.creating"):r("projects.new.create")})]})]})]})})}function de(a){const e=y.c(11),{source:n,variant:r,size:o,label:s}=a,c=r===void 0?"default":r,i=o===void 0?"sm":o,u=S();let h;e[0]!==n?(h=()=>U(n),e[0]=n,e[1]=h):h=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(F,{size:14}),e[2]=d):d=e[2];let x;e[3]!==s||e[4]!==u?(x=s??u("projects.home.newProject"),e[3]=s,e[4]=u,e[5]=x):x=e[5];let f;return e[6]!==i||e[7]!==h||e[8]!==x||e[9]!==c?(f=t.jsxs(N,{size:i,variant:c,onClick:h,children:[d,x]}),e[6]=i,e[7]=h,e[8]=x,e[9]=c,e[10]=f):f=e[10],f}export{ie as E,de as N,he as a,pe as n,U as o,le as u};
@@ -1 +1 @@
1
- import{b as o,r as c,j as e,h as n}from"./index-DY9jv8u5.js";import{h as u}from"./mcp-oauth-DqI-dLnK.js";import"./auth-vu0NBiVX.js";function f(){const t=o(),[a,l]=c.useState(null),[r,i]=c.useState(!1);return c.useEffect(()=>{(async()=>{try{const s=await u();if(!s.success){l(s.error||t("routes.oauthCallback.authenticationFailed")),setTimeout(()=>{window.close()},3e3);return}i(!0),setTimeout(()=>{window.close()},1500)}catch(s){l(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!a&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{className:"size-8 text-primary"})}),a&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t(a?"routes.oauthCallback.authenticationFailedTitle":r?"routes.oauthCallback.authenticationSuccessfulTitle":"routes.oauthCallback.authenticationInProgressTitle")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:a?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:t("routes.oauthCallback.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:a}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]})]}):r?e.jsxs("p",{children:[t("routes.oauthCallback.authenticationComplete"),e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]}):e.jsx("p",{children:t("routes.oauthCallback.processingAuthentication")})})]})]})})}export{f as default};
1
+ import{b as o,r as c,j as e,h as n}from"./index-BphI8pNH.js";import{h as u}from"./mcp-oauth-CaTRnuQU.js";import"./auth-BypL5L1O.js";function f(){const t=o(),[a,l]=c.useState(null),[r,i]=c.useState(!1);return c.useEffect(()=>{(async()=>{try{const s=await u();if(!s.success){l(s.error||t("routes.oauthCallback.authenticationFailed")),setTimeout(()=>{window.close()},3e3);return}i(!0),setTimeout(()=>{window.close()},1500)}catch(s){l(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!a&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{className:"size-8 text-primary"})}),a&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t(a?"routes.oauthCallback.authenticationFailedTitle":r?"routes.oauthCallback.authenticationSuccessfulTitle":"routes.oauthCallback.authenticationInProgressTitle")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:a?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:t("routes.oauthCallback.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:a}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]})]}):r?e.jsxs("p",{children:[t("routes.oauthCallback.authenticationComplete"),e.jsx("br",{}),t("routes.oauthCallback.windowClosingAutomatically")]}):e.jsx("p",{children:t("routes.oauthCallback.processingAuthentication")})})]})]})})}export{f as default};
@@ -1 +1 @@
1
- import{b as d,r as a,j as e,h}from"./index-DY9jv8u5.js";function x(){const r=d(),[s,o]=a.useState("loading"),[l,u]=a.useState(null),c=a.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),i=t.get("code"),n=t.get("state");if(!i||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:i,stateToken:n},window.location.origin),o("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),u(t instanceof Error?t.message:String(t)),o("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(h,{className:"size-8 text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:r(s==="error"?"routes.oauthCallbackAiProvider.authFailed":s==="success"?"routes.oauthCallbackAiProvider.authSuccess":"routes.oauthCallbackAiProvider.authInProgress")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:r("routes.oauthCallbackAiProvider.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:l}),e.jsx("p",{className:"mt-2",children:r("routes.oauthCallbackAiProvider.windowCloseAuto")})]}):s==="success"?e.jsx("p",{children:r("routes.oauthCallbackAiProvider.authCompleteCloseAuto")}):e.jsx("p",{children:r("routes.oauthCallbackAiProvider.processingAuth")})})]})]})})}export{x as default};
1
+ import{b as d,r as a,j as e,h}from"./index-BphI8pNH.js";function x(){const r=d(),[s,o]=a.useState("loading"),[l,u]=a.useState(null),c=a.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),i=t.get("code"),n=t.get("state");if(!i||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:i,stateToken:n},window.location.origin),o("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),u(t instanceof Error?t.message:String(t)),o("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(h,{className:"size-8 text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:r(s==="error"?"routes.oauthCallbackAiProvider.authFailed":s==="success"?"routes.oauthCallbackAiProvider.authSuccess":"routes.oauthCallbackAiProvider.authInProgress")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:r("routes.oauthCallbackAiProvider.errorOccurred")}),e.jsx("p",{className:"text-destructive",children:l}),e.jsx("p",{className:"mt-2",children:r("routes.oauthCallbackAiProvider.windowCloseAuto")})]}):s==="success"?e.jsx("p",{children:r("routes.oauthCallbackAiProvider.authCompleteCloseAuto")}):e.jsx("p",{children:r("routes.oauthCallbackAiProvider.processingAuth")})})]})]})})}export{x as default};
@@ -1 +1 @@
1
- import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,x as ze,I as Le,l as ae,t as he}from"./index-DY9jv8u5.js";import{R as _e}from"./required-auth-layout-CXS5DXAp.js";import{A as oe}from"./auth-split-layout-DKwsje6s.js";import{O as Ee}from"./organization-choice-CVq2K-mi.js";import{A as ve}from"./avatar-BfW8_V1B.js";import{L as Ae}from"./label-CUbZuKc3.js";import{S as De}from"./switch-Wb17Bg4i.js";import{t as Pe}from"./Building02-BTo5ALb8.js";import{i as Re}from"./CheckCircle-B7DLXg5D.js";import{t as Fe}from"./Globe04-lKXBAfc3.js";import{i as Me}from"./Upload01-BwEuXdMa.js";import"./Plus-BRxUqR_F.js";import"./User01-DSs11bSF.js";const $e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function at(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_e,{children:t.jsx(Te,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:o}=i;let a;e[0]!==o||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let l;e[5]!==m?(l=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=l):l=e[6];let s;e[7]!==f||e[8]!==l?(s=t.jsxs("div",{className:"space-y-2",children:[f,l]}),e[7]=f,e[8]=l,e[9]=s):s=e[9];let j;return e[10]!==a||e[11]!==s?(j=t.jsxs("div",{className:"grid gap-10",children:[a,s]}),e[10]=a,e[11]=s,e[12]=j):j=e[12],j}function Te(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let o;return i[1]!==n||i[2]!==m?(o=t.jsx(qe,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=o):o=i[3],o}function qe(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),o=b.split("@")[1]?.toLowerCase()??"",a=!!o&&!$e.has(o),f=o.split(".")[0]??"",l=f.charAt(0).toUpperCase()+f.slice(1);let s;e[0]!==l||e[1]!==a||e[2]!==m?(s=a?l:m?.split(" ")[0]??"",e[0]=l,e[1]=a,e[2]=m,e[3]=s):s=e[3];const j=s,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(o),queryFn:Be,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=r):r=e[5],t.jsx(oe,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[r,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:o})})]})})}if(u){let r;e[6]!==w?(r=()=>w(),e[6]=w,e[7]=r):r=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==r||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:r,children:d}),e[10]=r,e[11]=d,e[12]=h):h=e[12],t.jsx(oe,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:o})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Ke),A=N.some(Ie),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let r;e[16]!==m?(r=m?.split(" ")[0]??"",e[16]=m,e[17]=r):r=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==l||e[21]!==o||e[22]!==a||e[23]!==r||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:r,allowDomainClaim:!1,onBack:d}),e[20]=l,e[21]=o,e[22]=a,e[23]=r,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let r;e[26]!==p||e[27]!==N.length||e[28]!==n?(r=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=r):r=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==r||e[34]!==d?(h=t.jsx(fe,{title:r,description:d}),e[33]=r,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==o||e[40]!==_||e[41]!==O?(C=t.jsx(Ee,{organizations:N,domain:o,requestedSlugs:_,onRequestedSlug:O,onJoined:Ue}),e[38]=N,e[39]=o,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(oe,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==l||e[56]!==o||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:j}),e[54]=j,e[55]=l,e[56]=o,e[57]=a,e[58]=D):D=e[58],D}function Ue(i,e){window.location.href=`/${e}`}function Ie(i){return i.joinMode==="auto"}function Ke(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Be(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:o,allowDomainClaim:a,onBack:f}=i,l=a===void 0?!0:a,s=de(),j=b&&l?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(o),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const r=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(oe,{children:t.jsx(Ge,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=r.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||r.error||null;let z;e[22]!==l||e[23]!==O||e[24]!==r||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&l?p.mutate():r.mutate())},e[22]=l,e[23]=O,e[24]=r,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==s?(k=s("routes.onboarding.welcomeTitle"),e[28]=s,e[29]=k):k=e[29];let L;e[30]!==s?(L=s("routes.onboarding.setupDescription"),e[30]=s,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==s?(F=s("routes.onboarding.orgAvatar"),e[35]=s,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==s?(q=s("routes.onboarding.optional"),e[39]=s,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==o||e[47]!==c?(K=(c.trim()||o||"?").charAt(0).toUpperCase(),e[46]=o,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Je,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==s?(G=s("routes.onboarding.orgName"),e[56]=s,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ae,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let le;e[60]===Symbol.for("react.memo_cache_sentinel")?(le=x=>v(x.target.value),e[60]=le):le=e[60];let H;e[61]!==o||e[62]!==s?(H=o||s("routes.onboarding.myOrganizationPlaceholder"),e[61]=o,e[62]=s,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(Le,{id:"org-name",value:c,onChange:le,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==l||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==s?(V=b&&l&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:s("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(De,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=l,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=s,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"surface divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==s?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:s("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=s,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==s?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",s("routes.onboarding.creating")]}):s("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=s,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let se;e[93]!==f||e[94]!==s?(se=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:s("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=s,e[95]=se):se=e[95];let re;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==se?(re=t.jsx(oe,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,se]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=se,e[102]=re):re=e[102],re}function Je(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:o}=i,a=de(),f=P.useRef(null);let l;e[0]!==n||e[1]!==a?(l=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=l):l=e[2];const s=l;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==o||e[7]!==s?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),e[6]=o,e[7]=s,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Me,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==o||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":c,children:[v,w,g]}),e[13]=o,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:Pe,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Fe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:ze,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0}],Se=1500,je=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Ge({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),o=we.filter(s=>b||!s.claimOnly),[a,f]=P.useState(0),l=P.useRef(!1);if(!l.current){l.current=!0;for(let s=1;s<o.length;s++)setTimeout(()=>f(s),Se*s)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:o.map((s,j)=>{const c=s.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(s.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Re,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},s.labelKey)})})]})}export{at as default};
1
+ import{c as ie,j as t,a as ye,h as ce,b as de,m as Ce,K as Oe,r as P,B as Ne,e as pe,x as ze,I as Le,l as ae,t as he}from"./index-BphI8pNH.js";import{R as _e}from"./required-auth-layout-BA3Gxw_5.js";import{A as oe}from"./auth-split-layout-Daxd6Ypw.js";import{O as Ee}from"./organization-choice-BhCIGMjr.js";import{A as ve}from"./avatar-CFO-sRGJ.js";import{L as Ae}from"./label-BXumUTqC.js";import{S as De}from"./switch-B0lPkF5_.js";import{t as Pe}from"./Building02-BOLEL9nK.js";import{i as Re}from"./CheckCircle-OCgBlAwW.js";import{t as Fe}from"./Globe04-CMBPkECo.js";import{i as Me}from"./Upload01-CiTZ5ZQQ.js";import"./Plus-C4rGoU1F.js";import"./User01-vLr2BfmM.js";const $e=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function xe(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function at(){const i=ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(_e,{children:t.jsx(Te,{})}),i[0]=e):e=i[0],e}function fe(i){const e=ie.c(13),{title:b,description:m,logoUrl:n,logoFallback:o}=i;let a;e[0]!==o||e[1]!==n?(a=t.jsx("div",{children:n?t.jsx(ve,{url:n,fallback:o??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=o,e[1]=n,e[2]=a):a=e[2];let f;e[3]!==b?(f=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:b}),e[3]=b,e[4]=f):f=e[4];let l;e[5]!==m?(l=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:m}),e[5]=m,e[6]=l):l=e[6];let s;e[7]!==f||e[8]!==l?(s=t.jsxs("div",{className:"space-y-2",children:[f,l]}),e[7]=f,e[8]=l,e[9]=s):s=e[9];let j;return e[10]!==a||e[11]!==s?(j=t.jsxs("div",{className:"grid gap-10",children:[a,s]}),e[10]=a,e[11]=s,e[12]=j):j=e[12],j}function Te(){const i=ie.c(4),{data:e,isPending:b}=ye.useSession();if(b){let a;return i[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(ce,{className:"size-3.5 text-muted-foreground"})})}),i[0]=a):a=i[0],a}const m=e?.user?.email??"",n=e?.user?.name;let o;return i[1]!==n||i[2]!==m?(o=t.jsx(qe,{email:m,userName:n}),i[1]=n,i[2]=m,i[3]=o):o=i[3],o}function qe(i){const e=ie.c(59),{email:b,userName:m}=i,n=de(),o=b.split("@")[1]?.toLowerCase()??"",a=!!o&&!$e.has(o),f=o.split(".")[0]??"",l=f.charAt(0).toUpperCase()+f.slice(1);let s;e[0]!==l||e[1]!==a||e[2]!==m?(s=a?l:m?.split(" ")[0]??"",e[0]=l,e[1]=a,e[2]=m,e[3]=s):s=e[3];const j=s,{data:c,isLoading:v,isError:u,refetch:w}=Ce({queryKey:Oe.domainLookup(o),queryFn:Be,enabled:a});let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=new Set,e[4]=g):g=e[4];const[_,M]=P.useState(g),[$,y]=P.useState(!1);if(v){let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(ce,{className:"size-3.5 text-muted-foreground"}),e[5]=r):r=e[5],t.jsx(oe,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[r,t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checking",{domain:o})})]})})}if(u){let r;e[6]!==w?(r=()=>w(),e[6]=w,e[7]=r):r=e[7];let d;e[8]!==n?(d=n("routes.onboarding.retry"),e[8]=n,e[9]=d):d=e[9];let h;return e[10]!==r||e[11]!==d?(h=t.jsx(Ne,{variant:"outline",size:"sm",onClick:r,children:d}),e[10]=r,e[11]=d,e[12]=h):h=e[12],t.jsx(oe,{children:t.jsxs("div",{className:"flex flex-col items-start gap-3 py-4",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:n("routes.onboarding.checkFailed",{domain:o})}),h]})})}let N,A;e[13]!==c?.organizations?(N=(c?.organizations??[]).flatMap(Ke),A=N.some(Ie),e[13]=c?.organizations,e[14]=N,e[15]=A):(N=e[14],A=e[15]);const p=A;if($){let r;e[16]!==m?(r=m?.split(" ")[0]??"",e[16]=m,e[17]=r):r=e[17];let d;e[18]!==y?(d=()=>y(!1),e[18]=y,e[19]=d):d=e[19];let h;return e[20]!==l||e[21]!==o||e[22]!==a||e[23]!==r||e[24]!==d?(h=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:r,allowDomainClaim:!1,onBack:d}),e[20]=l,e[21]=o,e[22]=a,e[23]=r,e[24]=d,e[25]=h):h=e[25],h}if(N.length>0){let r;e[26]!==p||e[27]!==N.length||e[28]!==n?(r=p?N.length===1?n("routes.onboarding.accessSingle"):n("routes.onboarding.accessMultiple"):n("routes.onboarding.requestAccess"),e[26]=p,e[27]=N.length,e[28]=n,e[29]=r):r=e[29];let d;e[30]!==p||e[31]!==n?(d=n(p?"routes.onboarding.emailMatchesOrg":"routes.onboarding.emailMatchesOrgApproval"),e[30]=p,e[31]=n,e[32]=d):d=e[32];let h;e[33]!==r||e[34]!==d?(h=t.jsx(fe,{title:r,description:d}),e[33]=r,e[34]=d,e[35]=h):h=e[35];let O;e[36]!==M?(O=R=>M(F=>new Set(F).add(R)),e[36]=M,e[37]=O):O=e[37];let C;e[38]!==N||e[39]!==o||e[40]!==_||e[41]!==O?(C=t.jsx(Ee,{organizations:N,domain:o,requestedSlugs:_,onRequestedSlug:O,onJoined:Ue}),e[38]=N,e[39]=o,e[40]=_,e[41]=O,e[42]=C):C=e[42];let z;e[43]!==y?(z=()=>y(!0),e[43]=y,e[44]=z):z=e[44];let E;e[45]!==n?(E=n("routes.onboarding.createNewOrg"),e[45]=n,e[46]=E):E=e[46];let k;e[47]!==E||e[48]!==z?(k=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:z,children:E}),e[47]=E,e[48]=z,e[49]=k):k=e[49];let L;return e[50]!==k||e[51]!==h||e[52]!==C?(L=t.jsx(oe,{children:t.jsxs("div",{className:"grid gap-10",children:[h,C,k]})}),e[50]=k,e[51]=h,e[52]=C,e[53]=L):L=e[53],L}let D;return e[54]!==j||e[55]!==l||e[56]!==o||e[57]!==a?(D=t.jsx(be,{isCorporateEmail:a,emailDomain:o,domainLabel:l,defaultName:j}),e[54]=j,e[55]=l,e[56]=o,e[57]=a,e[58]=D):D=e[58],D}function Ue(i,e){window.location.href=`/${e}`}function Ie(i){return i.joinMode==="auto"}function Ke(i){return i.joinMode==="auto"||i.joinMode==="request"?[{id:i.id,name:i.name,slug:i.slug,logo:i.logo,joinMode:i.joinMode}]:[]}async function Be(){const i=await fetch("/api/auth/custom/domain-lookup",{credentials:"include"});if(!i.ok)throw new Error(`Failed to look up domain (${i.status})`);return i.json()}function be(i){const e=ie.c(103),{isCorporateEmail:b,emailDomain:m,domainLabel:n,defaultName:o,allowDomainClaim:a,onBack:f}=i,l=a===void 0?!0:a,s=de(),j=b&&l?`https://www.google.com/s2/favicons?domain=${m}&sz=128`:null,[c,v]=P.useState(o),[u,w]=P.useState(j),[g,_]=P.useState(!0),[M,$]=P.useState(null);let y;e[0]!==g||e[1]!==u||e[2]!==c?(y=async()=>{const x=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.trim()||void 0,logo:u??void 0,claimDomain:g})}),S=await x.json();if(!x.ok||!S.success)throw new Error(S.error||"Failed to set up organization");return S},e[0]=g,e[1]=u,e[2]=c,e[3]=y):y=e[3];let N;e[4]!==g?(N=x=>{if(!x.slug)return;const S=we.filter(ke=>g||!ke.claimOnly).length,ne=Se*(S-1)+800;$(x.slug),setTimeout(()=>{window.location.href=`/${x.slug}`},ne)},e[4]=g,e[5]=N):N=e[5];let A;e[6]!==y||e[7]!==N?(A={mutationFn:y,onSuccess:N},e[6]=y,e[7]=N,e[8]=A):A=e[8];const p=pe(A);let D;e[9]!==u||e[10]!==c?(D={mutationFn:async()=>{const x=c.trim(),S=xe(x);if(!S)throw new Error("Invalid organization name");const ne=await ye.organization.create({name:x,slug:S,...u?{logo:u}:{}});if(ne?.error)throw new Error(ne.error.message||"Failed to create organization");window.location.href=`/${ne?.data?.slug??S}`}},e[9]=u,e[10]=c,e[11]=D):D=e[11];const r=pe(D);if(p.isPending||M){let x;e[12]!==n||e[13]!==c?(x=c.trim()||n,e[12]=n,e[13]=c,e[14]=x):x=e[14];let S;return e[15]!==g||e[16]!==m||e[17]!==u||e[18]!==x?(S=t.jsx(oe,{children:t.jsx(Ge,{orgName:x,domain:m,claimDomain:g,logoUrl:u})}),e[15]=g,e[16]=m,e[17]=u,e[18]=x,e[19]=S):S=e[19],S}const d=r.isPending;let h;e[20]!==c?(h=xe(c.trim()),e[20]=c,e[21]=h):h=e[21];const O=!!h,C=p.error||r.error||null;let z;e[22]!==l||e[23]!==O||e[24]!==r||e[25]!==p||e[26]!==b?(z=x=>{x.preventDefault(),O&&(b&&l?p.mutate():r.mutate())},e[22]=l,e[23]=O,e[24]=r,e[25]=p,e[26]=b,e[27]=z):z=e[27];const E=z;let k;e[28]!==s?(k=s("routes.onboarding.welcomeTitle"),e[28]=s,e[29]=k):k=e[29];let L;e[30]!==s?(L=s("routes.onboarding.setupDescription"),e[30]=s,e[31]=L):L=e[31];let R;e[32]!==k||e[33]!==L?(R=t.jsx(fe,{title:k,description:L}),e[32]=k,e[33]=L,e[34]=R):R=e[34];let F;e[35]!==s?(F=s("routes.onboarding.orgAvatar"),e[35]=s,e[36]=F):F=e[36];let T;e[37]!==F?(T=t.jsx("p",{className:"text-sm font-medium",children:F}),e[37]=F,e[38]=T):T=e[38];let q;e[39]!==s?(q=s("routes.onboarding.optional"),e[39]=s,e[40]=q):q=e[40];let U;e[41]!==q?(U=t.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[41]=q,e[42]=U):U=e[42];let I;e[43]!==T||e[44]!==U?(I=t.jsxs("div",{className:"space-y-0.5",children:[T,U]}),e[43]=T,e[44]=U,e[45]=I):I=e[45];let K;e[46]!==o||e[47]!==c?(K=(c.trim()||o||"?").charAt(0).toUpperCase(),e[46]=o,e[47]=c,e[48]=K):K=e[48];const me=d||p.isPending;let B;e[49]!==u||e[50]!==K||e[51]!==me?(B=t.jsx(Je,{value:u,fallback:K,onChange:w,disabled:me}),e[49]=u,e[50]=K,e[51]=me,e[52]=B):B=e[52];let J;e[53]!==I||e[54]!==B?(J=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[I,B]}),e[53]=I,e[54]=B,e[55]=J):J=e[55];let G;e[56]!==s?(G=s("routes.onboarding.orgName"),e[56]=s,e[57]=G):G=e[57];let Y;e[58]!==G?(Y=t.jsx(Ae,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:G}),e[58]=G,e[59]=Y):Y=e[59];let le;e[60]===Symbol.for("react.memo_cache_sentinel")?(le=x=>v(x.target.value),e[60]=le):le=e[60];let H;e[61]!==o||e[62]!==s?(H=o||s("routes.onboarding.myOrganizationPlaceholder"),e[61]=o,e[62]=s,e[63]=H):H=e[63];const ue=d||p.isPending;let Q;e[64]!==c||e[65]!==H||e[66]!==ue?(Q=t.jsx(Le,{id:"org-name",value:c,onChange:le,placeholder:H,disabled:ue,className:"h-10 max-w-[220px]"}),e[64]=c,e[65]=H,e[66]=ue,e[67]=Q):Q=e[67];let W;e[68]!==Y||e[69]!==Q?(W=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[Y,Q]}),e[68]=Y,e[69]=Q,e[70]=W):W=e[70];let V;e[71]!==l||e[72]!==g||e[73]!==p.isPending||e[74]!==m||e[75]!==b||e[76]!==d||e[77]!==s?(V=b&&l&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:s("routes.onboarding.allowSignups",{domain:m})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("routes.onboarding.allowSignupsDescription",{domain:m})})]}),t.jsx(De,{checked:g,onCheckedChange:_,disabled:d||p.isPending})]}),e[71]=l,e[72]=g,e[73]=p.isPending,e[74]=m,e[75]=b,e[76]=d,e[77]=s,e[78]=V):V=e[78];let X;e[79]!==J||e[80]!==W||e[81]!==V?(X=t.jsxs("div",{className:"surface divide-y divide-border",children:[J,W,V]}),e[79]=J,e[80]=W,e[81]=V,e[82]=X):X=e[82];let Z;e[83]!==C||e[84]!==s?(Z=C&&t.jsx("p",{className:"text-xs text-destructive",children:C instanceof Error?C.message:s("routes.onboarding.failedCreateOrg")}),e[83]=C,e[84]=s,e[85]=Z):Z=e[85];const ge=!O||d||p.isPending;let ee;e[86]!==p.isPending||e[87]!==d||e[88]!==s?(ee=d||p.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ce,{className:"size-3.5"})," ",s("routes.onboarding.creating")]}):s("routes.onboarding.continue"),e[86]=p.isPending,e[87]=d,e[88]=s,e[89]=ee):ee=e[89];let te;e[90]!==ge||e[91]!==ee?(te=t.jsx(Ne,{type:"submit",size:"xl",className:"w-full",disabled:ge,children:ee}),e[90]=ge,e[91]=ee,e[92]=te):te=e[92];let se;e[93]!==f||e[94]!==s?(se=f&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:f,children:s("routes.onboarding.seeAvailableOrgs")}),e[93]=f,e[94]=s,e[95]=se):se=e[95];let re;return e[96]!==E||e[97]!==R||e[98]!==X||e[99]!==Z||e[100]!==te||e[101]!==se?(re=t.jsx(oe,{children:t.jsxs("form",{onSubmit:E,className:"grid gap-10",children:[R,X,Z,te,se]})}),e[96]=E,e[97]=R,e[98]=X,e[99]=Z,e[100]=te,e[101]=se,e[102]=re):re=e[102],re}function Je(i){const e=ie.c(18),{value:b,fallback:m,onChange:n,disabled:o}=i,a=de(),f=P.useRef(null);let l;e[0]!==n||e[1]!==a?(l=M=>{const $=M.target.files?.[0];if(!$)return;if($.size>2097152){he.error(a("routes.onboarding.imageTooLarge")),f.current&&(f.current.value="");return}const y=new FileReader;y.onerror=()=>he.error(a("routes.onboarding.failedReadImage")),y.onloadend=()=>{y.result&&n(y.result),f.current&&(f.current.value="")},y.readAsDataURL($)},e[0]=n,e[1]=a,e[2]=l):l=e[2];const s=l;let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f.current?.click(),e[3]=j):j=e[3];let c;e[4]!==a?(c=a("routes.onboarding.uploadOrgLogo"),e[4]=a,e[5]=c):c=e[5];let v;e[6]!==o||e[7]!==s?(v=t.jsx("input",{ref:f,type:"file",accept:"image/*",onChange:s,className:"hidden",disabled:o}),e[6]=o,e[7]=s,e[8]=v):v=e[8];const u=b??void 0;let w;e[9]!==m||e[10]!==u?(w=t.jsx(ve,{url:u,fallback:m,shape:"square",size:"base"}),e[9]=m,e[10]=u,e[11]=w):w=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(Me,{size:14,className:"text-white"})}),e[12]=g):g=e[12];let _;return e[13]!==o||e[14]!==c||e[15]!==v||e[16]!==w?(_=t.jsxs("button",{type:"button",onClick:j,disabled:o,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":c,children:[v,w,g]}),e[13]=o,e[14]=c,e[15]=v,e[16]=w,e[17]=_):_=e[17],_}const we=[{icon:Pe,labelKey:"routes.onboarding.step.creatingOrg",claimOnly:!1},{icon:Fe,labelKey:"routes.onboarding.step.claimingDomain",claimOnly:!0},{icon:ze,labelKey:"routes.onboarding.step.enablingAutoJoin",claimOnly:!0}],Se=1500,je=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Ge({orgName:i,domain:e,claimDomain:b,logoUrl:m}){const n=de(),o=we.filter(s=>b||!s.claimOnly),[a,f]=P.useState(0),l=P.useRef(!1);if(!l.current){l.current=!0;for(let s=1;s<o.length;s++)setTimeout(()=>f(s),Se*s)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(fe,{title:n("routes.onboarding.settingUp",{orgName:i}),description:n("routes.onboarding.gettingReady",{domain:e}),logoUrl:m??null,logoFallback:i.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:o.map((s,j)=>{const c=s.icon,v=j===a,u=j<a,w=je[j%je.length],g=n(s.labelKey);return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:u||v?1:.4},children:[t.jsxs("span",{className:ae("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!u&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:u?{backgroundColor:w.bg,color:w.fg}:void 0,children:[t.jsx(Re,{size:16,className:ae("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",u?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(ce,{className:ae("absolute size-4","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0")}),t.jsx(c,{size:16,className:ae("absolute motion-safe:transition-opacity motion-safe:duration-200",!u&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:ae("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||u?"text-foreground":"text-muted-foreground"),children:g})]},s.labelKey)})})]})}export{at as default};
@@ -1,3 +1,3 @@
1
- import{e as J,f as B}from"./input-F0XP3M77.js";import{aF as A,aG as _,d1 as C,aW as U,bV as W}from"./index-DY9jv8u5.js";import"./usage-stats-mjbSmunu.js";import"./tool-namespace-CjWGrg1d.js";import"./form-Diz2j79C.js";import"./label-CUbZuKc3.js";import"./utils-CVEq3hMx.js";import"./markdown-CQTrkEJG.js";import"./use-copy-D-ZUZJVe.js";import"./Copy01-Ck9G4OUr.js";import"./ZoomOut-D-Ww048N.js";import"./location-V0VwTJTt.js";import"./use-mobile-CqyBz8Dx.js";import"./use-panel-navigate-Co0XZmSD.js";import"./thread-route--lOZYDN5.js";import"./use-project-scope-BL3NRFI4.js";import"./repository-binding-DEE5HjOP.js";import"./use-mcp-client-owuI-9F9.js";import"./auth-vu0NBiVX.js";import"./tooltip-CjIqGzku.js";import"./index-DPyR1fyZ.js";import"./agent-icon-CCDPFoN-.js";import"./AlertCircle-CF7oV00-.js";import"./Tool01-C0vFHYhV.js";import"./ArrowUp-C-Wi5Wp-.js";import"./ArrowLeft-BYRX2oWU.js";import"./LinkBroken01-DhWTb9MO.js";import"./ShoppingBag01-B4aQ0-ny.js";import"./Building02-BTo5ALb8.js";import"./CheckCircle-B7DLXg5D.js";import"./ChevronUp-i4o2LTaN.js";import"./ChevronSelectorVertical-ByVW2vd8.js";import"./UserSquare-DXYtKMfd.js";import"./CreditCard01-DBL8NXSk.js";import"./DotsVertical-DGS_x5nz.js";import"./Image01-Cwrowq3c.js";import"./Globe04-lKXBAfc3.js";import"./SwitchHorizontal01-BbdJtypW.js";import"./Key01-CEbPGYnm.js";import"./Link01-DXqb71Uu.js";import"./Minus-C9yYSfDR.js";import"./Monitor01-BL3DAm_1.js";import"./Sun-DqiY7Z2B.js";import"./Play-CZ7QKkqf.js";import"./Plus-BRxUqR_F.js";import"./SearchMd-DiO3q0AT.js";import"./Trash01-bhcUMroB.js";import"./Upload01-BwEuXdMa.js";import"./User01-DSs11bSF.js";import"./Users01-CTqd0ZAH.js";import"./XClose-CxYwKo3k.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-BQLXDAAl.js";import"./thread-intent-BYXYhdV9.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BEBGvoea.js";import"./task-board-NNGstnYy.js";import"./schema-BXxpoJF8.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-DaG-xhpe.js";import"./autosend-ClHP6mj3.js";import"./use-ai-providers-Ui8zDguo.js";import"./use-organization-settings-BcSo4teS.js";import"./icon-button-DuuXKRCk.js";import"./file-type-icon-Dh-YpP4t.js";import"./shell-layout-7jtYUd9L.js";import"./avatar-BfW8_V1B.js";import"./use-clock-tick-BglfF91b.js";import"./command-A6J0_nSj.js";import"./index-CH_rHFJ7.js";import"./integration-icon-BZ0SYBCb.js";import"./project-icon-BtGD--7Z.js";import"./new-project-dialog-BDUYA1Q9.js";import"./repository-import-picker-WAot3Ghn.js";import"./use-navigate-to-agent-DdSspEm5.js";import"./repository-picker-DKd6y_Vd.js";import"./useInfiniteQuery-C3FB4QSd.js";import"./infiniteQueryObserver-Glyohd4p.js";import"./collection-search-DFZiZHgj.js";import"./use-debounced-value-0e-te_rl.js";import"./required-auth-layout-CXS5DXAp.js";import"./use-org-sso-B9p-4KH7.js";import"./chat-draft-B4qXFQ20.js";import"./use-session-runtime-C-ErRuug.js";import"./select-C48ly-p-.js";import"./index-BdQq_4o_.js";import"./tabs-D-bShRzz.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-zw0Jw-tt.js";import"./toggle-group-C__89QW8.js";import"./use-open-billing-url-CO2ZloNb.js";import"./index-Bpjyo8cb.js";import"./checkbox-k3S7hbYo.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-B1ABR0kS.js";import"./drawer-BfInv3z-.js";import"./input-Ca18CK1P.js";import"./suggestion-_sJX1Xs_.js";import"./use-mcp-prompts-8FxF45h0.js";import"./use-org-fs-CvYQh_B2.js";import"./question-004-sINsf4GQ.js";import"./use-members-VmpszULL.js";import"./use-org-auth-client-BQ7kloKy.js";import"./feature-paywall-skggPdmN.js";import"./plan-ladder-DJwAssQD.js";import"./add-connection-dialog-CQYwaYCv.js";import"./extract-connection-data-BJcueAXf.js";import"./metadata-D72DunRR.js";import"./connection-DP0Tkqpu.js";import"./url-slug-SgUmhnUm.js";import"./connection-card-SGeLl-3V.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DXNX9E30.js";import"./use-connection-DjG9Ar0-.js";import"./schema-BiVd-UM7.js";import"./connection-form-helpers-5dAreg1i.js";import"./authenticate-and-persist-oauth-Dj1wDkpb.js";import"./mcp-oauth-dZFQnVjg.js";import"./mcp-oauth-DqI-dLnK.js";import"./collection-tabs-5oBppmJp.js";import"./badge-CqxA0I5-.js";import"./use-infinite-scroll-BopUCEp4.js";import"./useSuspenseInfiniteQuery-zAujesU3.js";import"./use-task-board-events-C280-Zim.js";import"./use-chat-layout-state-Civkwlwx.js";class X{constructor(t,n=4e3){this.onDisconnect=t,this.graceMs=n}onDisconnect;graceMs;timer;report(t){if(t==="connected"){clearTimeout(this.timer),this.timer=void 0;return}if(t==="failed"||t==="closed"){clearTimeout(this.timer),this.timer=void 0,this.onDisconnect();return}t==="disconnected"&&!this.timer&&(this.timer=setTimeout(this.onDisconnect,this.graceMs))}dispose(){clearTimeout(this.timer),this.timer=void 0}}const F=A({type:W(["session.input_transcript.delta","session.output_transcript.delta"]),event_id:_(),delta:_(),start_ms:U().nonnegative(),end_ms:U().nonnegative()}),H=A({type:C("session.delegation.created"),offset_ms:U().nonnegative(),delegation:A({id:_(),target:C("client")})});class ${constructor(t,n){this.send=t,this.callbacks=n}send;callbacks;closed=!1;fragments=[];seen=new Set;delegated=new Set;consumed=new Set;pending=new Map;contexts=new Map;awaitingContext=new Map;receive(t,n=Date.now()){if(this.closed)return;const r=F.safeParse(t);if(r.success){const e=r.data;if(this.seen.has(e.event_id))return;this.seen.add(e.event_id);const s=e.type==="session.input_transcript.delta"?"user":"agent";if(this.fragments.push({role:s,text:e.delta,start:e.start_ms,end:e.end_ms,arrivedAt:n,id:e.event_id}),this.fragments.sort((o,i)=>o.start-i.start),this.fragments.length>4e3){this.callbacks.onError();return}this.callbacks.onMessage({role:s,message:e.delta,event_id:e.event_id});return}const a=H.safeParse(t);if(a.success){const{id:e}=a.data.delegation;if(this.delegated.has(e)||this.pending.has(e))return;if(this.delegated.size+this.pending.size>=40){this.callbacks.onError();return}this.pending.set(e,{offset:a.data.offset_ms,receivedAt:n});return}const m=A({type:C("session.thinking.appended"),client_event_id:_()}).safeParse(t);if(m.success){const e=m.data.client_event_id,s=this.awaitingContext.get(e);this.awaitingContext.delete(e),s&&(s.remaining.delete(e),s.remaining.size===0&&this.send({type:"session.commentary.append",event_id:crypto.randomUUID(),delegation_id:s.delegationId??null,content:"Studio has supplied the complete background result as context for this request. Briefly explain that result, including any failure or required approval. Acceptance or task creation alone does not mean the work completed."}));return}const p=A({type:_()}).safeParse(t);p.success&&p.data.type==="error"&&this.callbacks.onError()}tick(t=Date.now()){if(!this.closed)for(const[n,r]of this.pending){const a=this.fragments.filter(o=>o.start<r.offset),m=a.reduce((o,i)=>i.role==="user"?Math.max(o,i.arrivedAt):o,r.receivedAt);if(t-m<500)continue;const p=a.filter(o=>o.role==="user"&&!this.consumed.has(o.id));if(!p.length&&t-r.receivedAt<3e3)continue;if(this.pending.delete(n),this.delegated.add(n),!p.length){this.publishUpdate({delivery:"announce",delegationId:n,text:"No new transcribed request is available. No work was started. Ask the user to repeat the request."});continue}const e=p.map(o=>o.text).join("").trim(),s=[];for(const o of a){if(p.includes(o))continue;const i=s.at(-1);i?.role===o.role?i.text+=o.text:s.push({role:o.role,text:o.text})}if(e.length>J){this.publishUpdate({delivery:"announce",delegationId:n,text:"The spoken request is too long. No work was started. Ask the user to shorten it or continue in text."});continue}for(const o of p)this.consumed.add(o.id);this.callbacks.onDelegate({request:e,delegationId:n,transcript:B(s.map(({role:o,text:i})=>({role:o,text:i.trim()})).filter(({text:o})=>o))}).then(o=>{this.closed||this.publishUpdate({delivery:o.status==="rejected"?"announce":"context",delegationId:n,text:JSON.stringify(o)})}).catch(()=>{this.publishUpdate({delivery:"announce",delegationId:n,text:"Studio could not accept this request. Do not claim work started."})})}}publishUpdate(t){if(this.closed)return;if(t.contextId){if(this.contexts.get(t.contextId)===t.text)return;this.contexts.set(t.contextId,t.text)}const r=(t.contextId?`Updated ${t.contextId} data, superseding earlier values:
1
+ import{e as J,f as B}from"./input-otZYQGEr.js";import{aF as A,aG as _,d1 as C,aW as U,bV as W}from"./index-BphI8pNH.js";import"./usage-stats-BHO2m1GZ.js";import"./tool-namespace-DqsoHKmd.js";import"./form-uqsH1s-y.js";import"./label-BXumUTqC.js";import"./utils-CVEq3hMx.js";import"./markdown-Bqq3R66p.js";import"./use-copy-Ctyjo3u8.js";import"./Copy01-DVWv3lef.js";import"./ZoomOut-DzrH576O.js";import"./location-V0VwTJTt.js";import"./use-mobile-DruvZ2zF.js";import"./use-panel-navigate-C-ip5ing.js";import"./thread-route-BEIPJEss.js";import"./use-project-scope-DN9qkINS.js";import"./repository-binding-CqjA7Tko.js";import"./use-mcp-client-DsrOnW9o.js";import"./auth-BypL5L1O.js";import"./tooltip-2YCPx1DM.js";import"./index-C5xgscqu.js";import"./agent-icon-BVqmbz-P.js";import"./AlertCircle-CzTXJ0ax.js";import"./Tool01-_CVpzZpk.js";import"./ArrowUp-DUhCibLH.js";import"./ArrowLeft-BQThfb60.js";import"./LinkBroken01-Dz2vlPBe.js";import"./ShoppingBag01-DvN3FHxE.js";import"./Building02-BOLEL9nK.js";import"./CheckCircle-OCgBlAwW.js";import"./ChevronUp-DtSKb4be.js";import"./ChevronSelectorVertical-DaDJpoIU.js";import"./UserSquare-B7fe7FYj.js";import"./CreditCard01-Bw5uGiku.js";import"./DotsVertical-CEoX1VVK.js";import"./Image01-D_y3XkIW.js";import"./Globe04-CMBPkECo.js";import"./SwitchHorizontal01-D6mwjnXs.js";import"./Key01-p2EsnMlr.js";import"./Link01-D28gAr0F.js";import"./Minus-DNpWuD14.js";import"./Monitor01-CYm-wjzD.js";import"./Sun-DFIh8Vd-.js";import"./Play-cNq95jJS.js";import"./Plus-C4rGoU1F.js";import"./SearchMd-BYCOzBqa.js";import"./Trash01-CgNTH-jr.js";import"./Upload01-CiTZ5ZQQ.js";import"./User01-vLr2BfmM.js";import"./Users01-BgSWeeD_.js";import"./XClose-B_rQyiiY.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-CmWo-JmL.js";import"./thread-intent-BQGp3MKl.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B6MhK1l7.js";import"./task-board-Cv7D_3uN.js";import"./schema-Ddw2ah-q.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-DqNUlJMY.js";import"./autosend-B4f5gabb.js";import"./use-ai-providers-D11veeve.js";import"./use-organization-settings-B2e749tN.js";import"./icon-button-BUDG7R_U.js";import"./file-type-icon-CIdo5ojc.js";import"./shell-layout-DPflSDI7.js";import"./avatar-CFO-sRGJ.js";import"./use-clock-tick-DRqivY5H.js";import"./command-C9iGFbUT.js";import"./index-CW0mTKOH.js";import"./integration-icon-C-_9oW7G.js";import"./project-icon-J_TfV9WN.js";import"./new-project-dialog-Cs8HMQlb.js";import"./repository-import-picker-DRcn5MCM.js";import"./use-navigate-to-agent-CfXi671z.js";import"./repository-picker-BL6xlIly.js";import"./useInfiniteQuery-Ctv8zOi3.js";import"./infiniteQueryObserver-CD6zPv_B.js";import"./collection-search-CVvFJ5Bb.js";import"./use-debounced-value-DppuiHxU.js";import"./required-auth-layout-BA3Gxw_5.js";import"./use-org-sso-B7o6rhq2.js";import"./chat-draft-DeylAkNb.js";import"./use-session-runtime-RS_ZeJDS.js";import"./select-BAxIwkW7.js";import"./index-BdQq_4o_.js";import"./tabs-fkqYJpP8.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DAnq8bae.js";import"./toggle-group-DaYieoyW.js";import"./use-open-billing-url-0u6Rqj8b.js";import"./index-BtufcGJ5.js";import"./checkbox-JO6XiJJq.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-D-MLGIKG.js";import"./drawer-txFUQcqx.js";import"./input-DeNGl9cT.js";import"./suggestion-BfzPP8A_.js";import"./use-mcp-prompts-B5RvuVy4.js";import"./use-org-fs-Bndw9m25.js";import"./question-004-sINsf4GQ.js";import"./use-members-DQZYP7Cb.js";import"./use-org-auth-client-CSFZu3Wj.js";import"./feature-paywall-XpETcjbv.js";import"./plan-ladder-BJOn0tjJ.js";import"./add-connection-dialog-DyCA7E5B.js";import"./extract-connection-data-DrQExIK1.js";import"./metadata-D72DunRR.js";import"./connection-y8T_LUE4.js";import"./url-slug-DxJ8K4M_.js";import"./connection-card-C_97TUuR.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-aGNI5bvN.js";import"./use-connection-hBtWetVy.js";import"./schema-BKLQwKnK.js";import"./connection-form-helpers-B61Y3llL.js";import"./authenticate-and-persist-oauth-ClTAD7nN.js";import"./mcp-oauth-ZxlBJ_T6.js";import"./mcp-oauth-CaTRnuQU.js";import"./collection-tabs-8dvqqnDR.js";import"./badge-CYEiaJVw.js";import"./use-infinite-scroll-CAGEOw6T.js";import"./useSuspenseInfiniteQuery-DRLUIOlU.js";import"./use-task-board-events-CemAfTjA.js";import"./use-chat-layout-state-CIyU-XxO.js";class X{constructor(t,n=4e3){this.onDisconnect=t,this.graceMs=n}onDisconnect;graceMs;timer;report(t){if(t==="connected"){clearTimeout(this.timer),this.timer=void 0;return}if(t==="failed"||t==="closed"){clearTimeout(this.timer),this.timer=void 0,this.onDisconnect();return}t==="disconnected"&&!this.timer&&(this.timer=setTimeout(this.onDisconnect,this.graceMs))}dispose(){clearTimeout(this.timer),this.timer=void 0}}const F=A({type:W(["session.input_transcript.delta","session.output_transcript.delta"]),event_id:_(),delta:_(),start_ms:U().nonnegative(),end_ms:U().nonnegative()}),H=A({type:C("session.delegation.created"),offset_ms:U().nonnegative(),delegation:A({id:_(),target:C("client")})});class ${constructor(t,n){this.send=t,this.callbacks=n}send;callbacks;closed=!1;fragments=[];seen=new Set;delegated=new Set;consumed=new Set;pending=new Map;contexts=new Map;awaitingContext=new Map;receive(t,n=Date.now()){if(this.closed)return;const r=F.safeParse(t);if(r.success){const e=r.data;if(this.seen.has(e.event_id))return;this.seen.add(e.event_id);const s=e.type==="session.input_transcript.delta"?"user":"agent";if(this.fragments.push({role:s,text:e.delta,start:e.start_ms,end:e.end_ms,arrivedAt:n,id:e.event_id}),this.fragments.sort((o,i)=>o.start-i.start),this.fragments.length>4e3){this.callbacks.onError();return}this.callbacks.onMessage({role:s,message:e.delta,event_id:e.event_id});return}const a=H.safeParse(t);if(a.success){const{id:e}=a.data.delegation;if(this.delegated.has(e)||this.pending.has(e))return;if(this.delegated.size+this.pending.size>=40){this.callbacks.onError();return}this.pending.set(e,{offset:a.data.offset_ms,receivedAt:n});return}const m=A({type:C("session.thinking.appended"),client_event_id:_()}).safeParse(t);if(m.success){const e=m.data.client_event_id,s=this.awaitingContext.get(e);this.awaitingContext.delete(e),s&&(s.remaining.delete(e),s.remaining.size===0&&this.send({type:"session.commentary.append",event_id:crypto.randomUUID(),delegation_id:s.delegationId??null,content:"Studio has supplied the complete background result as context for this request. Briefly explain that result, including any failure or required approval. Acceptance or task creation alone does not mean the work completed."}));return}const p=A({type:_()}).safeParse(t);p.success&&p.data.type==="error"&&this.callbacks.onError()}tick(t=Date.now()){if(!this.closed)for(const[n,r]of this.pending){const a=this.fragments.filter(o=>o.start<r.offset),m=a.reduce((o,i)=>i.role==="user"?Math.max(o,i.arrivedAt):o,r.receivedAt);if(t-m<500)continue;const p=a.filter(o=>o.role==="user"&&!this.consumed.has(o.id));if(!p.length&&t-r.receivedAt<3e3)continue;if(this.pending.delete(n),this.delegated.add(n),!p.length){this.publishUpdate({delivery:"announce",delegationId:n,text:"No new transcribed request is available. No work was started. Ask the user to repeat the request."});continue}const e=p.map(o=>o.text).join("").trim(),s=[];for(const o of a){if(p.includes(o))continue;const i=s.at(-1);i?.role===o.role?i.text+=o.text:s.push({role:o.role,text:o.text})}if(e.length>J){this.publishUpdate({delivery:"announce",delegationId:n,text:"The spoken request is too long. No work was started. Ask the user to shorten it or continue in text."});continue}for(const o of p)this.consumed.add(o.id);this.callbacks.onDelegate({request:e,delegationId:n,transcript:B(s.map(({role:o,text:i})=>({role:o,text:i.trim()})).filter(({text:o})=>o))}).then(o=>{this.closed||this.publishUpdate({delivery:o.status==="rejected"?"announce":"context",delegationId:n,text:JSON.stringify(o)})}).catch(()=>{this.publishUpdate({delivery:"announce",delegationId:n,text:"Studio could not accept this request. Do not claim work started."})})}}publishUpdate(t){if(this.closed)return;if(t.contextId){if(this.contexts.get(t.contextId)===t.text)return;this.contexts.set(t.contextId,t.text)}const r=(t.contextId?`Updated ${t.contextId} data, superseding earlier values:
2
2
  `:`Studio result data:
3
3
  `)+t.text,a=new TextEncoder,m=t.delivery==="announce"&&a.encode(r).length>480,p={remaining:new Set,delegationId:t.delegationId};let e="",s=0;const o=()=>{if(!e)return;const i=crypto.randomUUID();m&&(p.remaining.add(i),this.awaitingContext.set(i,p)),this.send({type:t.delivery==="announce"&&!m?"session.commentary.append":"session.thinking.append",event_id:i,delegation_id:t.delegationId??null,content:e}),e="",s=0};for(const i of r){const v=a.encode(i).length;s+v>480&&o(),e+=i,s+=v}o()}close(){this.closed=!0,this.pending.clear(),this.awaitingContext.clear()}}async function go(E,t,n){n.throwIfAborted();const r=new RTCPeerConnection,a=r.createDataChannel("oai-events"),m=document.createElement("audio");m.autoplay=!0;let p,e,s,o,i=!1,v=!1,h,O,L=0,P=0,g,w,y=!1;const I=Promise.withResolvers(),x=Promise.withResolvers();x.promise.catch(()=>{});const b=new $(d=>{!i&&a.readyState==="open"&&a.send(JSON.stringify(d))},t),q=new X(()=>{i||t.onDisconnect()}),M=async()=>{if(!i){i=!0,q.dispose(),b.close(),clearInterval(O),n.removeEventListener("abort",T),a.close(),r.close();for(const d of p?.getTracks()??[])d.stop();m.pause(),m.srcObject=null,e&&e.state!=="closed"&&await e.close().catch(()=>{})}},T=()=>{M()};n.addEventListener("abort",T,{once:!0});const u=AbortSignal.any([n,AbortSignal.timeout(3e4)]),j=x.promise,z=()=>x.reject(u.reason);u.addEventListener("abort",z,{once:!0}),j.catch(()=>{}),a.onmessage=({data:d})=>{if(!(i||typeof d!="string"))try{const l=JSON.parse(d);typeof l=="object"&&l!==null&&"type"in l&&(l.type==="session.started"&&(v=!0,x.resolve()),l.type==="session.closed"&&(I.resolve(),h||t.onDisconnect())),h||b.receive(l)}catch{t.onError()}},a.onclose=()=>{x.reject(new Error("Voice connection closed")),I.resolve(),!i&&!h&&t.onDisconnect()},r.onconnectionstatechange=()=>{i||q.report(r.connectionState)},r.ontrack=({streams:d,track:l})=>{if(i)return;const D=d[0]??new MediaStream([l]);m.srcObject=D,e??=new AudioContext,s=e.createAnalyser(),s.fftSize=256,o=new Uint8Array(s.fftSize),e.createMediaStreamSource(D).connect(s),e.resume().catch(()=>t.onError()),m.play().catch(()=>t.onError())};function N(){if(!s||!o||i)return 0;s.getByteTimeDomainData(o);let d=0;for(const l of o)d+=((l-128)/128)**2;return Math.min(1,Math.sqrt(d/o.length)*4)}try{const d=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(c=>{if(i||u.aborted){for(const f of c.getTracks())f.stop();throw new DOMException("Voice connection cancelled","AbortError")}return p=c,c}),l=await Promise.race([d,new Promise((c,f)=>u.addEventListener("abort",()=>f(u.reason),{once:!0}))]);e??=new AudioContext,g=e.createAnalyser(),g.fftSize=256,w=new Uint8Array(g.fftSize),e.createMediaStreamSource(l).connect(g),await e.resume();for(const c of l.getAudioTracks())r.addTrack(c,l);const D=await r.createOffer();await r.setLocalDescription(D),u.throwIfAborted(),r.iceGatheringState!=="complete"&&await new Promise((c,f)=>{const S=()=>{r.iceGatheringState==="complete"&&(G(),c())},k=()=>{G(),f(u.reason)},G=()=>{r.removeEventListener("icegatheringstatechange",S),u.removeEventListener("abort",k)};r.addEventListener("icegatheringstatechange",S),u.addEventListener("abort",k,{once:!0}),S(),u.aborted&&k()});const V=r.localDescription?.sdp;if(!V)throw new Error("Missing voice offer");const R=await E(V,u);return await r.setRemoteDescription({type:"answer",sdp:R.sdp}),await j,n.throwIfAborted(),u.removeEventListener("abort",z),n.removeEventListener("abort",T),t.onConnect(),O=setInterval(()=>{if(i||h)return;if(b.tick(),g&&w&&!y){g.getByteTimeDomainData(w);const f=w.reduce((S,k)=>S+((k-128)/128)**2,0)/w.length;Math.sqrt(f)>.025&&(P=Date.now())}t.onUserSpeaking(!y&&Date.now()-P<400),N()>.02&&(L=Date.now()),t.onModeChange({mode:Date.now()-L<400?"speaking":"listening"})},100),{endSession:()=>(h??=(async()=>{b.close();for(const c of p?.getTracks()??[])c.stop();if(m.pause(),v&&a.readyState==="open"){a.send(JSON.stringify({type:"session.close"}));let c;await Promise.race([I.promise,new Promise(f=>{c=setTimeout(f,3e3)})]),clearTimeout(c)}await M()})(),h),publishUpdate:c=>b.publishUpdate(c),setMicMuted:c=>{y=c;for(const f of p?.getAudioTracks()??[])f.enabled=!y;y&&t.onUserSpeaking(!1)},getOutputVolume:N}}catch(d){throw await M(),d}}export{go as startOpenAIConversation};
@@ -1 +1 @@
1
- import{c as a,a2 as f,m as S,K as y,o as v}from"./index-DY9jv8u5.js";import{a as d}from"./use-project-native-view-presence-BRsKjCEJ.js";function c(e,i){return y.optimisticProjectSidebarViews(e,i)}function l(e){return typeof e=="object"&&e!==null}function b(e,i){return e[1]===i&&e[3]==="collection"&&e[4]==="VIRTUAL_MCP"}function P(e,i){if(!l(e))return e;if("item"in e&&l(e.item)&&e.item.id===i.id)return{...e,item:i};if(!("structuredContent"in e)||!l(e.structuredContent))return e;const s=e.structuredContent.items;if(!Array.isArray(s))return e;let r=!1;const t=s.map(n=>!l(n)||n.id!==i.id?n:(r=!0,i));return r?{...e,structuredContent:{...e.structuredContent,items:t}}:e}function x(e,i,s){e.setQueriesData({predicate:r=>b(r.queryKey,i)},r=>P(r,s))}function A(e,i,s){const r=e.getQueriesData({predicate:t=>b(t.queryKey,i)&&t.queryKey[5]===s});for(const[,t]of r)if(t?.item?.id===s)return t.item;return null}function V(e,i,s){return e.getQueryData(c(i,s))??null}function j(e,i){if(i)return{sidebarViews:[...i.views],sidebarViewsVersion:d};const s=e?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:e?.sidebarViewsVersion}}function K(e,i,s){return i?{sidebarViews:[...i.views],sidebarViewsVersion:d}:s===void 0?{sidebarViews:e.sidebarViews===null?null:e.sidebarViews?[...e.sidebarViews]:void 0,sidebarViewsVersion:e.sidebarViewsVersion}:j(s,null)}function p(e,i,s,r,t){const n=V(e,i,s),o={revision:(n?.revision??0)+1,views:[...r],rollbackViews:n?[...n.rollbackViews]:[...t]};return e.setQueryData(c(i,s),o),{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}}function C(e,i,s){const r=V(e,i,s);return r?{revision:r.revision,views:[...r.views],persistedViews:[...r.rollbackViews]}:null}function m(e,i){const s=new Set(e),r=new Set(i);return s.size===r.size&&[...s].every(t=>r.has(t))}function R(e){return e?!m(e.views,e.persistedViews):!1}function k(e,i,s,{snapshot:r,saved:t,authoritativeViews:n}){if(!r)return{settledLatest:!1,reconciledViews:null};const o=V(e,i,s);if(!o||r.revision>o.revision)return{settledLatest:!1,reconciledViews:null};const u=n!==void 0?[...n]:t?[...r.views]:null,w={...o,rollbackViews:u??o.rollbackViews};return w.rollbackViews!==o.rollbackViews&&e.setQueryData(c(i,s),w),r.revision!==o.revision?{settledLatest:!1,reconciledViews:null}:(e.setQueryData(c(i,s),null),{settledLatest:!0,reconciledViews:t?u&&!m(u,r.views)?u:null:[...w.rollbackViews]})}function _(e){const i=a.c(5),{org:s}=f(),r=e??"";let t;i[0]!==s.id||i[1]!==r?(t=c(s.id,r),i[0]=s.id,i[1]=r,i[2]=t):t=i[2];let n;i[3]!==t?(n={queryKey:t,queryFn:O,enabled:!1,staleTime:Number.POSITIVE_INFINITY},i[3]=t,i[4]=n):n=i[4];const{data:o}=S(n);return o?.views}async function O(){return null}function L(e){const i=a.c(4),{org:s}=f(),r=v();let t;return i[0]!==s||i[1]!==r||i[2]!==e?(t={stage:(n,o)=>p(r,s.id,e,n,o),snapshot:()=>C(r,s.id,e),settle:n=>k(r,s.id,e,n)},i[0]=s,i[1]=r,i[2]=e,i[3]=t):t=i[3],t}export{L as a,b,j as i,R as o,K as p,A as r,_ as u,x as w};
1
+ import{c as a,a2 as f,m as S,K as y,o as v}from"./index-BphI8pNH.js";import{a as d}from"./use-project-native-view-presence-iEIqgCZR.js";function c(e,i){return y.optimisticProjectSidebarViews(e,i)}function l(e){return typeof e=="object"&&e!==null}function b(e,i){return e[1]===i&&e[3]==="collection"&&e[4]==="VIRTUAL_MCP"}function P(e,i){if(!l(e))return e;if("item"in e&&l(e.item)&&e.item.id===i.id)return{...e,item:i};if(!("structuredContent"in e)||!l(e.structuredContent))return e;const s=e.structuredContent.items;if(!Array.isArray(s))return e;let r=!1;const t=s.map(n=>!l(n)||n.id!==i.id?n:(r=!0,i));return r?{...e,structuredContent:{...e.structuredContent,items:t}}:e}function x(e,i,s){e.setQueriesData({predicate:r=>b(r.queryKey,i)},r=>P(r,s))}function A(e,i,s){const r=e.getQueriesData({predicate:t=>b(t.queryKey,i)&&t.queryKey[5]===s});for(const[,t]of r)if(t?.item?.id===s)return t.item;return null}function V(e,i,s){return e.getQueryData(c(i,s))??null}function j(e,i){if(i)return{sidebarViews:[...i.views],sidebarViewsVersion:d};const s=e?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:e?.sidebarViewsVersion}}function K(e,i,s){return i?{sidebarViews:[...i.views],sidebarViewsVersion:d}:s===void 0?{sidebarViews:e.sidebarViews===null?null:e.sidebarViews?[...e.sidebarViews]:void 0,sidebarViewsVersion:e.sidebarViewsVersion}:j(s,null)}function p(e,i,s,r,t){const n=V(e,i,s),o={revision:(n?.revision??0)+1,views:[...r],rollbackViews:n?[...n.rollbackViews]:[...t]};return e.setQueryData(c(i,s),o),{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}}function C(e,i,s){const r=V(e,i,s);return r?{revision:r.revision,views:[...r.views],persistedViews:[...r.rollbackViews]}:null}function m(e,i){const s=new Set(e),r=new Set(i);return s.size===r.size&&[...s].every(t=>r.has(t))}function R(e){return e?!m(e.views,e.persistedViews):!1}function k(e,i,s,{snapshot:r,saved:t,authoritativeViews:n}){if(!r)return{settledLatest:!1,reconciledViews:null};const o=V(e,i,s);if(!o||r.revision>o.revision)return{settledLatest:!1,reconciledViews:null};const u=n!==void 0?[...n]:t?[...r.views]:null,w={...o,rollbackViews:u??o.rollbackViews};return w.rollbackViews!==o.rollbackViews&&e.setQueryData(c(i,s),w),r.revision!==o.revision?{settledLatest:!1,reconciledViews:null}:(e.setQueryData(c(i,s),null),{settledLatest:!0,reconciledViews:t?u&&!m(u,r.views)?u:null:[...w.rollbackViews]})}function _(e){const i=a.c(5),{org:s}=f(),r=e??"";let t;i[0]!==s.id||i[1]!==r?(t=c(s.id,r),i[0]=s.id,i[1]=r,i[2]=t):t=i[2];let n;i[3]!==t?(n={queryKey:t,queryFn:O,enabled:!1,staleTime:Number.POSITIVE_INFINITY},i[3]=t,i[4]=n):n=i[4];const{data:o}=S(n);return o?.views}async function O(){return null}function L(e){const i=a.c(4),{org:s}=f(),r=v();let t;return i[0]!==s||i[1]!==r||i[2]!==e?(t={stage:(n,o)=>p(r,s.id,e,n,o),snapshot:()=>C(r,s.id,e),settle:n=>k(r,s.id,e,n)},i[0]=s,i[1]=r,i[2]=e,i[3]=t):t=i[3],t}export{L as a,b,j as i,R as o,K as p,A as r,_ as u,x as w};