@objectstack/console 17.3.0 → 17.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/dist/.objectui-sha +1 -1
  3. package/dist/assets/{ActionResultDialog-CQwenjVA.js → ActionResultDialog-Bsr2GS71.js} +1 -1
  4. package/dist/assets/{AiPendingActionsPage-7gZ8zlOy.js → AiPendingActionsPage-DB-UVcdM.js} +1 -1
  5. package/dist/assets/{ApiConsolePage-DUF0ysH7.js → ApiConsolePage-Bzqo2owc.js} +1 -1
  6. package/dist/assets/{AppDocsIndex-CP_AVG4X.js → AppDocsIndex-KhVqdZ-P.js} +1 -1
  7. package/dist/assets/{AppManagementPage-BJktnoa5.js → AppManagementPage-CsZ0LMQn.js} +1 -1
  8. package/dist/assets/{ApprovalsInboxPage-DlnxY-uy.js → ApprovalsInboxPage-D_LOnhJ7.js} +1 -1
  9. package/dist/assets/{AuditLogPage-DIJPRjji.js → AuditLogPage-B9eqwuzl.js} +1 -1
  10. package/dist/assets/{ComponentNavView-C84QByT7.js → ComponentNavView-DeokLfkW.js} +1 -1
  11. package/dist/assets/{CreateViewDialog-Zbd9Cagm.js → CreateViewDialog-BMdQ4ZYy.js} +1 -1
  12. package/dist/assets/{DashboardView-UyKHklBx.js → DashboardView-DHZboRi8.js} +1 -1
  13. package/dist/assets/{DeveloperHubPage-BRyNdrCJ.js → DeveloperHubPage-C_VYirN0.js} +1 -1
  14. package/dist/assets/{DocPage-Bx8ZXCYt.js → DocPage-_9x-3Dbi.js} +1 -1
  15. package/dist/assets/{DocShell-Ipy_IDvh.js → DocShell-D4dSPfBz.js} +1 -1
  16. package/dist/assets/{DocsIndex-CmY-7OQR.js → DocsIndex-CJVRa_hE.js} +1 -1
  17. package/dist/assets/{DocsLayout-BNsSvaz2.js → DocsLayout-C-tYgUZv.js} +1 -1
  18. package/dist/assets/{DocsSlug-Cb_NMM1k.js → DocsSlug-DmyGpfEy.js} +1 -1
  19. package/dist/assets/{ExpressionProvider-DqGWVuxV.js → ExpressionProvider-B6z09kM6.js} +1 -1
  20. package/dist/assets/{FlowRunsPage-B6ustUgi.js → FlowRunsPage-OjGJi-JU.js} +1 -1
  21. package/dist/assets/{IntegrationsPage-chOxmiyU.js → IntegrationsPage-CrDMDe62.js} +1 -1
  22. package/dist/assets/{InterfaceListPage-DVETnQm5.js → InterfaceListPage-P3y6hqTX.js} +1 -1
  23. package/dist/assets/{MarketplaceInstalledPage-DA5pjhAz.js → MarketplaceInstalledPage-CQek7WnV.js} +1 -1
  24. package/dist/assets/{MarketplacePackagePage-dCIVHBFi.js → MarketplacePackagePage-DL2ivKSc.js} +1 -1
  25. package/dist/assets/{MarketplacePage-wJb6g1p7.js → MarketplacePage-B-6EokyB.js} +1 -1
  26. package/dist/assets/{MetadataInspector-Cu-n1FYz.js → MetadataInspector-IQGUoLyp.js} +1 -1
  27. package/dist/assets/{ObjectDataPage-CP-YSZYQ.js → ObjectDataPage-Bmc3RQhM.js} +1 -1
  28. package/dist/assets/{PageView-B1_ibRuM.js → PageView-DzUZqB_h.js} +1 -1
  29. package/dist/assets/{ProfilePage-DEr5iZVB.js → ProfilePage-NklCqPxc.js} +1 -1
  30. package/dist/assets/{PublicFormsPage-CBcKQbNl.js → PublicFormsPage-CItIvcLQ.js} +1 -1
  31. package/dist/assets/RecordDetailView-XWxuegfV.js +3 -0
  32. package/dist/assets/{RecordFormPage-CGQlYWDk.js → RecordFormPage-B-yrhs7J.js} +1 -1
  33. package/dist/assets/{ReportDefaultInspector-R_p6YStL.js → ReportDefaultInspector-D5Kro5_t.js} +1 -1
  34. package/dist/assets/{ReportView-BTMrtcGH.js → ReportView-COpZ8PQT.js} +1 -1
  35. package/dist/assets/{RuntimeDraftBar-agGU39FL.js → RuntimeDraftBar-CSVtuByp.js} +1 -1
  36. package/dist/assets/{SchemaForm-DJbupOno.js → SchemaForm-DIsxxOZF.js} +1 -1
  37. package/dist/assets/{SearchResultsPage-CHhZUc6L.js → SearchResultsPage-B2r6kgni.js} +1 -1
  38. package/dist/assets/{SettingsHub-BGLR_gS7.js → SettingsHub-DQz2HDtZ.js} +1 -1
  39. package/dist/assets/{SettingsView-Bq-7Zkzs.js → SettingsView-BfOEalDW.js} +1 -1
  40. package/dist/assets/{SkeletonDetail-B4-UKxai.js → SkeletonDetail-DMOa5zcl.js} +1 -1
  41. package/dist/assets/{SystemHubPage-CVZVag1e.js → SystemHubPage-DM2VRSIP.js} +1 -1
  42. package/dist/assets/{abnfDiagram-VCTEODGH-DUS5D5dU.js → abnfDiagram-VCTEODGH-DaPlU6Hz.js} +1 -1
  43. package/dist/assets/{app-shell-eager-leaves-BB0oaPx6.js → app-shell-eager-leaves-wjbiJgVZ.js} +1 -1
  44. package/dist/assets/architectureDiagram-5GKGNRK7-Cq014PwG.js +36 -0
  45. package/dist/assets/{blockDiagram-OSKFZWR5-Bz2hnVmp.js → blockDiagram-OSKFZWR5-vtlcoeZc.js} +1 -1
  46. package/dist/assets/{c4Diagram-7LVT6UL2-DU3u1Y6c.js → c4Diagram-7LVT6UL2-BrdwRG2M.js} +1 -1
  47. package/dist/assets/channel-D2IgUFnY.js +1 -0
  48. package/dist/assets/{chunk-3NF5O7KM-B8Q7HUio.js → chunk-3NF5O7KM-CjWAf_Jo.js} +1 -1
  49. package/dist/assets/{chunk-4HAMMTFA-BPKwX4iB.js → chunk-4HAMMTFA-BtV_msXT.js} +1 -1
  50. package/dist/assets/chunk-75Z2AOVW-DdRL9yNr.js +2 -0
  51. package/dist/assets/chunk-CLGD4ZFX-De9kMAXh.js +1 -0
  52. package/dist/assets/{chunk-DU6HZSFF-BkY4hAzc.js → chunk-DU6HZSFF-DqjylQO-.js} +1 -1
  53. package/dist/assets/chunk-F27PBJKO-tEB_K-iD.js +1 -0
  54. package/dist/assets/{chunk-GMAD6QVW-DZo_NykZ.js → chunk-GMAD6QVW-BMzd_HHM.js} +1 -1
  55. package/dist/assets/{chunk-GVQU2GXP-9ELY9S6X.js → chunk-GVQU2GXP-B1p1nHC0.js} +1 -1
  56. package/dist/assets/{chunk-H2I77ZZE-vCr_buP7.js → chunk-H2I77ZZE-ioXC4dHO.js} +1 -1
  57. package/dist/assets/{chunk-HLEWEB6X-iPkY2ESt.js → chunk-HLEWEB6X-zZ3ZMup3.js} +1 -1
  58. package/dist/assets/chunk-L3NEJ4N5-DePXufTQ.js +1 -0
  59. package/dist/assets/{chunk-LQGUR6SS-iVI0GACK.js → chunk-LQGUR6SS-BUWUp_dz.js} +1 -1
  60. package/dist/assets/{chunk-OSK3NFVY-DcRwXCQD.js → chunk-OSK3NFVY-L7nTUJKT.js} +2 -2
  61. package/dist/assets/{chunk-P2QGCYS3-nx2-dM5t.js → chunk-P2QGCYS3-BG-i3rdI.js} +1 -1
  62. package/dist/assets/{chunk-POPQ4Y6H-BxLOacOG.js → chunk-POPQ4Y6H-DLEB8EqK.js} +1 -1
  63. package/dist/assets/{chunk-PWAF6VOD-2mst9kZu.js → chunk-PWAF6VOD-Be_prJjm.js} +1 -1
  64. package/dist/assets/{chunk-SVP7TREG-C3BMpr4x.js → chunk-SVP7TREG-BdJpxJji.js} +1 -1
  65. package/dist/assets/chunk-XXDRQBXY-CEXsCcSu.js +1 -0
  66. package/dist/assets/{chunk-ZLD2IHE6-ZFqtFJbj.js → chunk-ZLD2IHE6-BLIPZykR.js} +1 -1
  67. package/dist/assets/classDiagram-CYGNFDIV-BielDdJQ.js +1 -0
  68. package/dist/assets/classDiagram-v2-TLXNO2FR-BielDdJQ.js +1 -0
  69. package/dist/assets/cose-bilkent-JH36ORCC-CnLWv9XE.js +1 -0
  70. package/dist/assets/{createDerive-Best2JCj.js → createDerive-DtfnFzGm.js} +1 -1
  71. package/dist/assets/{cynefinDiagram-5FMLGOSQ-Lnly8IJd.js → cynefinDiagram-5FMLGOSQ-Do1SZz4I.js} +1 -1
  72. package/dist/assets/{dagre-OS7QT2EB-CdXLxmTK.js → dagre-OS7QT2EB-CqmZ9Y9O.js} +1 -1
  73. package/dist/assets/data-adapter-1YRpH3h_.js +5 -0
  74. package/dist/assets/{default-inspector-registry-DeEG98bO.js → default-inspector-registry-CmSpNwTr.js} +1 -1
  75. package/dist/assets/{diagram-S7CK7UJ4-DE8I3gxQ.js → diagram-S7CK7UJ4-CMpcDWop.js} +1 -1
  76. package/dist/assets/{diagram-UQ7AKVKN-D2xQpbEq.js → diagram-UQ7AKVKN-DLK_4yej.js} +1 -1
  77. package/dist/assets/{diagram-VSXAHHWV-DnttDSlO.js → diagram-VSXAHHWV-MAILxw0S.js} +1 -1
  78. package/dist/assets/diagram-VX7I27RA-DGiXGVX7.js +24 -0
  79. package/dist/assets/{diagram-Z3DM3KII-BgB9f0Nv.js → diagram-Z3DM3KII-BywboeGI.js} +1 -1
  80. package/dist/assets/dist-B88JFSFg.js +5 -0
  81. package/dist/assets/{ebnfDiagram-PWID7BFC-32WvKbS2.js → ebnfDiagram-PWID7BFC-DdMLbnuP.js} +1 -1
  82. package/dist/assets/{erDiagram-2YWLMYGG-Dwf8uAdl.js → erDiagram-2YWLMYGG-O6raGx2P.js} +1 -1
  83. package/dist/assets/flowDiagram-T62WH6J4-CkAxOnqU.js +1 -0
  84. package/dist/assets/framework-DFE_Mws9.js +36 -0
  85. package/dist/assets/{ganttDiagram-EL5Y4UJY-DqYIE0Cu.js → ganttDiagram-EL5Y4UJY-Dijdjc50.js} +2 -2
  86. package/dist/assets/{getIcon-CgyYxSEC.js → getIcon-B4Pp7Q-0.js} +1 -1
  87. package/dist/assets/gitGraphDiagram-WWUBYQGX-Cfl4OIGG.js +106 -0
  88. package/dist/assets/{highlighted-body-OFNGDK62-BxO9mjPI.js → highlighted-body-OFNGDK62-BlqGRgbU.js} +1 -1
  89. package/dist/assets/{i18n-Cfqor-xb.js → i18n-DGcOKnTh.js} +1 -1
  90. package/dist/assets/{i18n-locales-Bz4c8KXc.js → i18n-locales-BBA090ve.js} +10 -10
  91. package/dist/assets/index-C5Fu9Kda.css +2 -0
  92. package/dist/assets/index-ClPLLRzK.js +20 -0
  93. package/dist/assets/{infoDiagram-FKFFQAWI-Cr1-5_Am.js → infoDiagram-FKFFQAWI-oOVNWlVA.js} +1 -1
  94. package/dist/assets/{infrastructure-CIpDEFyQ.js → infrastructure-B4zG1jNa.js} +2 -2
  95. package/dist/assets/{ishikawaDiagram-5VMMS53U-Bsjx7BsE.js → ishikawaDiagram-5VMMS53U-BUfTfup1.js} +1 -1
  96. package/dist/assets/{journeyDiagram-EYS64GPL-1scn5Z5c.js → journeyDiagram-EYS64GPL-4fyU8Ui9.js} +2 -2
  97. package/dist/assets/{kanban-definition-UXKFOSKX-DjLQAv5U.js → kanban-definition-UXKFOSKX-qwquHo2y.js} +1 -1
  98. package/dist/assets/mermaid-GHXKKRXX-_UhQGe8N.js +1 -0
  99. package/dist/assets/{mermaid.core-pW40dd4u.js → mermaid.core-RfBGJVq5.js} +2 -2
  100. package/dist/assets/{metadata-admin-pawEBYI9.js → metadata-admin-Bo-vWW2Z.js} +3 -3
  101. package/dist/assets/{mindmap-definition-THT77NOG-CUcYMB9H.js → mindmap-definition-THT77NOG-cOVHgGB_.js} +1 -1
  102. package/dist/assets/{pegDiagram-XKGWAZYB-CT1r3sRa.js → pegDiagram-XKGWAZYB-DQikOuPL.js} +1 -1
  103. package/dist/assets/{pieDiagram-E7YTZNPT-CSi-V1LQ.js → pieDiagram-E7YTZNPT-Cu9wPXiv.js} +2 -2
  104. package/dist/assets/plugin-calendar-DqlnPeWE.js +1 -0
  105. package/dist/assets/plugin-charts-hJ5C1pY-.js +7 -0
  106. package/dist/assets/{plugin-chatbot-BGnkLzFS.js → plugin-chatbot-BeSLDg4N.js} +5 -5
  107. package/dist/assets/plugin-dashboard-d1o52lHr.js +6 -0
  108. package/dist/assets/{plugin-form-_fjHxKTV.js → plugin-form-D8x_rH5w.js} +1 -1
  109. package/dist/assets/plugin-gantt-B2GTMGPH.js +63 -0
  110. package/dist/assets/plugin-grid-DGXy_yQF.js +9 -0
  111. package/dist/assets/{plugin-kanban-DA0eW6yj.js → plugin-kanban-CVf6Nj3e.js} +1 -1
  112. package/dist/assets/plugin-map-hkbw1bGS.js +1 -0
  113. package/dist/assets/{plugin-markdown-B7zwZHmn.js → plugin-markdown-Bdb2UThR.js} +4 -4
  114. package/dist/assets/plugin-report-CelulaB7.js +59 -0
  115. package/dist/assets/{plugin-timeline-B6rsNNAK.js → plugin-timeline-DTcJ-hts.js} +1 -1
  116. package/dist/assets/plugin-tree-Bk5vG9la.js +1 -0
  117. package/dist/assets/{plugin-view-5qxxRyZZ.js → plugin-view-CKs41t7o.js} +1 -1
  118. package/dist/assets/plugins-views-DZmsFOak.js +4 -0
  119. package/dist/assets/{quadrantDiagram-AXDQQJYC-DUJ_94hm.js → quadrantDiagram-AXDQQJYC-DqTU6p89.js} +3 -3
  120. package/dist/assets/{railroadDiagram-O6MQD6OU-CEyfAhzM.js → railroadDiagram-O6MQD6OU-CHGgIBKb.js} +1 -1
  121. package/dist/assets/{requirementDiagram-IS5BZ75X-CAK7hvBg.js → requirementDiagram-IS5BZ75X-B20mHS5h.js} +1 -1
  122. package/dist/assets/{runtime-metadata-persistence-DYPxFzHI.js → runtime-metadata-persistence-DzS2YaNb.js} +1 -1
  123. package/dist/assets/{sankeyDiagram-P5KCCOFB-DgYJh7uz.js → sankeyDiagram-P5KCCOFB-oqGY91Cw.js} +3 -3
  124. package/dist/assets/{sequenceDiagram-WJ2MYXX4-DsQerPtC.js → sequenceDiagram-WJ2MYXX4-CVMm7Aid.js} +1 -1
  125. package/dist/assets/{src-CVJP2nIc.js → src-D7tZqf12.js} +1 -1
  126. package/dist/assets/{src-_DxAIBqo.js → src-DCXZnd2l.js} +1 -1
  127. package/dist/assets/{src-S6pzKItc.js → src-DEMdKbQy.js} +1 -1
  128. package/dist/assets/src-hcMLuWxG.js +17 -0
  129. package/dist/assets/stateDiagram-XQSTLZYL-3oM7IdVe.js +1 -0
  130. package/dist/assets/stateDiagram-v2-IH3M54BS-BznjPAgb.js +1 -0
  131. package/dist/assets/studioEntry-BUFsLXCL.js +1 -0
  132. package/dist/assets/{submitRedirect-UXd9NsjL.js → submitRedirect-7ExeC4kw.js} +1 -1
  133. package/dist/assets/{swimlanes-V6O3JKXN-BiKyiEJr.js → swimlanes-V6O3JKXN-Djgbrkmh.js} +1 -1
  134. package/dist/assets/swimlanesDiagram-JKAHXJPX-DHJJ3qZq.js +8 -0
  135. package/dist/assets/{timeline-definition-24CTP7MA-CW5rY3PX.js → timeline-definition-24CTP7MA-k2lbfDvL.js} +2 -2
  136. package/dist/assets/ui-components-CMHDBJEm.js +37 -0
  137. package/dist/assets/{ui-layout-UUTFXV6S.js → ui-layout-Jk_qY9Ni.js} +1 -1
  138. package/dist/assets/{use-book-data-qUZAxIs0.js → use-book-data-CM73PGvc.js} +1 -1
  139. package/dist/assets/{useActionModal-CkM-zGdy.js → useActionModal-D_iilsul.js} +1 -1
  140. package/dist/assets/{usePackageL10n-F9isJ9pn.js → usePackageL10n-BfPqgsRL.js} +1 -1
  141. package/dist/assets/{useSettingsLabel-CSZBfUiw.js → useSettingsLabel-CW2sBbmj.js} +1 -1
  142. package/dist/assets/vendor-charts-BBlPrtHS.js +67 -0
  143. package/dist/assets/{vendor-i18n-C1AQDWux.js → vendor-i18n-CzBLXLJU.js} +1 -1
  144. package/dist/assets/vendor-objectstack-BU0HrnMy.js +270 -0
  145. package/dist/assets/{vendor-zod-r9lyeyrU.js → vendor-zod-Bwe8XZZa.js} +3 -3
  146. package/dist/assets/{vennDiagram-4TSXK5OY-C79cMc25.js → vennDiagram-4TSXK5OY-zweM554s.js} +1 -1
  147. package/dist/assets/{wardleyDiagram-VM6X3IG4-BAO0_jUk.js → wardleyDiagram-VM6X3IG4-Dg9r6Ajz.js} +1 -1
  148. package/dist/assets/{xychartDiagram-S5SC5T6Z-BIRd7YRo.js → xychartDiagram-S5SC5T6Z-CraplxeN.js} +2 -2
  149. package/dist/eager-closure.json +87 -87
  150. package/dist/index.html +4 -4
  151. package/package.json +1 -1
  152. package/dist/assets/RecordDetailView-A8bbPnkK.js +0 -3
  153. package/dist/assets/architectureDiagram-5GKGNRK7-mGW8P1lC.js +0 -36
  154. package/dist/assets/channel-FD4s9EIH.js +0 -1
  155. package/dist/assets/chunk-75Z2AOVW-CkSdnmiC.js +0 -2
  156. package/dist/assets/chunk-CLGD4ZFX-BTkDISwp.js +0 -1
  157. package/dist/assets/chunk-F27PBJKO-DUKg0YWV.js +0 -1
  158. package/dist/assets/chunk-L3NEJ4N5-Bzz35TZJ.js +0 -1
  159. package/dist/assets/chunk-XXDRQBXY-iNC8aYmk.js +0 -1
  160. package/dist/assets/classDiagram-CYGNFDIV-D5Pd2TCl.js +0 -1
  161. package/dist/assets/classDiagram-v2-TLXNO2FR-D5Pd2TCl.js +0 -1
  162. package/dist/assets/cose-bilkent-JH36ORCC-CPQv9aQH.js +0 -1
  163. package/dist/assets/data-adapter-DL25qpAe.js +0 -5
  164. package/dist/assets/diagram-VX7I27RA-BSEwkn7K.js +0 -24
  165. package/dist/assets/dist-BpPy7hlB.js +0 -5
  166. package/dist/assets/flowDiagram-T62WH6J4-CqVSNJ8T.js +0 -1
  167. package/dist/assets/framework-BfSv4Kb0.js +0 -36
  168. package/dist/assets/gitGraphDiagram-WWUBYQGX-D1dYmoGu.js +0 -106
  169. package/dist/assets/index-BU-FzlQ6.js +0 -20
  170. package/dist/assets/index-_VyGO4ms.css +0 -2
  171. package/dist/assets/mermaid-GHXKKRXX-NzEcDxBh.js +0 -1
  172. package/dist/assets/plugin-calendar-BwiiCIjv.js +0 -1
  173. package/dist/assets/plugin-charts-CDGkx7z5.js +0 -7
  174. package/dist/assets/plugin-dashboard-Bj4ldCX6.js +0 -6
  175. package/dist/assets/plugin-gantt-zR8DkpEg.js +0 -63
  176. package/dist/assets/plugin-grid-kkbz4uec.js +0 -9
  177. package/dist/assets/plugin-map-DukneTNg.js +0 -1
  178. package/dist/assets/plugin-report-DaPtlsJr.js +0 -59
  179. package/dist/assets/plugin-tree-DauauLFc.js +0 -1
  180. package/dist/assets/plugins-views-iYcMmImr.js +0 -4
  181. package/dist/assets/src-JX1BkhmR.js +0 -17
  182. package/dist/assets/stateDiagram-XQSTLZYL-BJndPKik.js +0 -1
  183. package/dist/assets/stateDiagram-v2-IH3M54BS-Bi94bTLl.js +0 -1
  184. package/dist/assets/studioEntry-C6G8U-LG.js +0 -1
  185. package/dist/assets/swimlanesDiagram-JKAHXJPX-DKIR852g.js +0 -8
  186. package/dist/assets/ui-components-D2lrjG-t.js +0 -43
  187. package/dist/assets/vendor-charts-CY9WhhzX.js +0 -67
  188. package/dist/assets/vendor-objectstack-BeKUVjuj.js +0 -270
package/CHANGELOG.md CHANGED
@@ -1,5 +1,92 @@
1
1
  # @objectstack/console
2
2
 
3
+ ## 17.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 30b0990: Console (objectui) refreshed to `53ded82bf7a4`. Frontend changes in this range:
8
+
9
+ Derived from the changesets objectui declared over the range — 23 releasing of 28 changesets added across 34 non-merge commits; omitted: 5 release-nothing changesets, 7 commits carrying no changeset (they ship no package code).
10
+
11
+ - **minor** — Array filters on analytics aggregates were posted un-lowered and refused by the runtime with 400; they are now lowered to the canonical `FilterCondition` before the wire. (objectui `53ded82bf`)
12
+ - **minor** — Retire `ChatbotSchema.displayMode` — and its copy on `ChatbotFloatingSchema` — as an ADR-0049 retirement tombstone, and remove the `chatbot-floating` registration's "Display Mode"… (objectui `3e377c931`)
13
+ - **minor** — `ChartDataSeriesSchema` (and its TS twin `ChartDataSeries`) now REFUSES `chartType` on a chart series BY NAME and points at `type` — the renderer-internal spelling the non-strict… (objectui `caf477fa8`)
14
+ - **minor** — `DataScopeManager` now **denies** a row when a row-level scope rule carries an operator its evaluator does not implement. It used to **admit** the row. (objectui `83c77dc30`)
15
+ - **minor** — One home for the `datetime` display convention (objectui#7443). (objectui `81a2eb1fb`)
16
+ - **minor** — **`BaseSchema.visible` / `.hidden` / `.disabled` now declare the CEL envelope object the renderer already evaluates, as one named wire type** (objectui#7530, maintainer ruling 202… (objectui `c354ce5db`)
17
+ - **minor** — **Breaking for authored metadata:** `MarkdownSchema.sanitize` and `MarkdownSchema.components` are RETIRED (objectui#6972, ADR-0049 enforce-or-remove). A `markdown` node that autho… (objectui `446d93d4e`)
18
+ - **minor** — One named, importable authoring-face type per `plugin-chatbot` registration: `ChatbotEnhancedSchema` and `ChatbotFloatingSchema` join `ChatbotSchema` (objectui#7655, under the obj… (objectui `4ce14f125`)
19
+ - **minor** — Six user-visible fixes across the maker surface, the assistant rail and the dataset captions. (objectui `64dae8e71`)
20
+ - **minor** — `DrillDownConfigSchema` is the zod mirror of `DrillDownConfig`, and both declarations that carry `drillDown` reference it — `ChartSchema` (`zod/data-display.zod.ts`) and `ObjectDa… (objectui `52c8cf741`)
21
+ - **minor** — `ObjectGallerySchema` and `ObjectDataTableSchema` are members of `ObjectQLComponentSchema` on both faces — the TS union in `objectql.ts` and the zod union in `zod/objectql.zod.ts`… (objectui `52c8cf741`)
22
+ - **minor** — `ChartDataSeriesSchema` (and its TS twin `ChartDataSeries`) declares the six series keys the renderer reads — `label`, `variant`, `opacity`, `dashArray`, `stack`, `yAxis` — which… (objectui `8fe8e5c16`)
23
+ - **minor** — `AlertDialogSchema` now declares the four keys the `alert-dialog` renderer actually reads (objectui#7104): `content` (the dialog body, `SchemaNode | SchemaNode[]` like every sibli… (objectui `8ad218d58`)
24
+ - **minor** — **BREAKING** — `SchemaRegistry['kanban']` stops describing a component it cannot name (objectui `bc640ec56`)
25
+ - **minor** — One authority per exported type name, batch 3 of objectui#6349: `ComboboxOption`, `NamedActionDef`, `OrgTranslate`. (objectui `6e8863093`)
26
+ - **minor** — **Removes two published exports.** Retire the `MobileResponsiveConfig` and `GestureConfig` types (objectui#7519, ADR-0049 enforce-or-remove). Both names are deleted from `@object-… (objectui `51eb51558`)
27
+ - **minor** — Retire `FloatingChatbotConfig.triggerIcon` (objectui#7654, ADR-0049 enforce-or-remove). (objectui `a3eb5d07a`)
28
+ - **minor** — One shared record-source ladder, five plugins delegate (objectui#7632). (objectui `ce2aaefe1`)
29
+ - **patch** — The published `@default` documentation on two `layout.ts` members now matches the value the renderer actually applies. `ContainerSchema.maxWidth` documented `'lg'` while `containe… (objectui `e546222b3`)
30
+ - **patch** — Declare `avatar` and `avatarFallback` on `ChatMessage`, on both faces (objectui#7295 — the residue of objectui#4424, whose `RuntimeOnlyMessageKeys` named only the three keys API m… (objectui `858cd72e3`)
31
+ - **patch** — `ClassNameStylePropsSchema` describes itself by its two keys (objectui#7578). (objectui `9587fc959`)
32
+ - **patch** — Declare `wrapperClass` on `CheckboxSchema`, on both faces (objectui#6938 — the residue of that card; its `context-menu` half landed with objectui#6939 group 1). (objectui `b74a8598d`)
33
+ - **patch** — The standalone runner renders `AppAction.items` from its declared type only, which makes `AppActionSchema.onClick`'s retirement message true again (objectui#6854, maintainer rulin… (objectui `adb2a86db`)
34
+
35
+ ⚠️ 2 of these carry a breaking change: 2 by the author's own breaking annotation in the changeset body — objectui declares no `major` inside a launch window (`scripts/check-changeset-no-major.mjs`). Each is marked **BREAKING** in the list above — read them before compiling the release record.
36
+
37
+ **In this console build, declared nowhere** — objectui merged 7 commits in this range with no `.changeset/*.md`. The code is inside the pin above and ships here, but nothing upstream declared them, so they appear in no objectui CHANGELOG and in no entry above. Listed by subject rather than counted, because a count cannot tell a dependency bump from a form-behaviour change (objectstack#6174); the upstream gate that would prevent this is objectui#3387.
38
+
39
+ - _(no changeset)_ fix(hooks): read the edited path from the key the routed tool carries (#7686) (objectui `565f2b6aa`)
40
+ - _(no changeset)_ fix(schema-catalog): drop the undeclared `variant` key from the dropdown-menu Delete item (#7717) (objectui `f96a781c8`)
41
+ - _(no changeset)_ fix(hooks): an escaped quote inside a double-quoted word does not close it (#7695) (objectui `6eebc54b6`)
42
+ - _(no changeset)_ docs(skills): correct six wrong shipped-API facts in the published objectui guides (#7677) (objectui `ab771d2dd`)
43
+ - _(no changeset)_ docs(skills): record ComponentInput's five ADR-0049 tombstones in the plugin guide (objectui#7636) (#7647) (objectui `09163884f`)
44
+ - _(no changeset)_ docs(agents): state the changeset gate's full population, not `src/` alone (#7640) (objectui `0b1e39d4a`)
45
+ - _(no changeset)_ docs(charts): rewrite the inline-series chart examples into the model the renderer implements (#7679) (objectui `d3f5256ce`)
46
+
47
+ <!-- adr-0087: not-required (no-migration-prescription) All TWO declared-breaking entries in the range `a472b07167a3...53ded82bf7a4` are judged ONE AT A TIME against `packages/spec`'s authorable surface at this HEAD, re-measured here rather than quoted from upstream prose. (1) objectui `446d93d4e` (objectui#6972) retires `MarkdownSchema.sanitize` and `MarkdownSchema.components` as ADR-0049 tombstones on objectui's OWN SDUI `markdown` node. That node is not an ObjectStack-authorable component: `MarkdownSchema` has ZERO occurrences under `packages/spec`, its single hit anywhere in `packages/` being one line of published history in `packages/console/CHANGELOG.md`; and `sanitize` occurs ZERO times as an authored key in `packages/spec/src` — its five textual hits are a namespace-charset helper, two SQL-injection docblocks and one `view.zod.ts` refusal message, none of them a schema member. The `markdown` spelling this repo DOES declare is a data FIELD type (`packages/spec/src/data/field.zod.ts:2263`, `data/field-value.zod.ts:58`) — a long-text field kind that carries neither retired key. No accepted ObjectStack key moves and no stored `sys_metadata` row can carry either spelling. (2) objectui `bc640ec56` (objectui#7645) narrows the VALUE side of one entry in `@object-ui/types`' `SchemaRegistry` type map to `BaseSchema & { type: 'kanban' }`; upstream states `keyof SchemaRegistry` and the published `ComponentType` union are unchanged. This repo's own `SchemaRegistry` shares the NAME and nothing else — all 16 files matching it under `packages/spec/src` are ObjectStack's metadata-registry contract surface (`contracts/metadata-service.ts`, `contracts/objectql-engine.ts`'s `EngineSchemaRegistryView`, the error-code ledger), never objectui's component-type map, and `packages/spec/src` imports from `@object-ui/*` ZERO times. `KanbanSchema` has 2 occurrences under `packages/spec/src` and BOTH are prose — a comment at `ui/component.test.ts:2783` and a docblock at `ui/component.zod.ts:2679` — neither a declaration nor an import. Neither entry is reachable through `@objectstack/console` in any case, re-measured against `packages/console/package.json` at this HEAD: it publishes a frozen prebuilt SPA whose `files` list is ["dist", "README.md", "CHANGELOG.md"], whose sole `exports` entry is `./package.json` and whose `dependencies` are empty, so it forwards no `@object-ui/*` module entry point and re-exports none of these types; and no `package.json` in this workspace declares an `@object-ui/*` dependency at all (0 files, re-measured). This diff is `.objectui-sha`, this changeset, the four `packages/spec/src` sources whose objectui pin CITATIONS the bump refreshes — comment-only, and measured so: the base and head versions of all four compile to AST-identical output under TypeScript with `removeComments`, which string literals survive, so no describe text, alias or tombstone literal moved — and the two generated pin records the bump gates require (`scripts/sdui-manifest.record.json`, `packages/sdui-parser/objectui-lockstep.json`). No `packages/spec` schema, no authorable metadata key and no protocol surface changes in it — so there is no stored-metadata rewrite for `objectstack migrate meta` to prescribe and therefore no ADR-0087 ledger entry to write or to name from THIS bump. This bump adds no ledger entry and claims none. -->
48
+
49
+ objectui range: `a472b07167a3...53ded82bf7a4`
50
+ - 236f2df: Console (objectui) refreshed to `a472b07167a3`. Frontend changes in this range:
51
+
52
+ Derived from the changesets objectui declared over the range — 15 releasing of 18 changesets added across 29 non-merge commits; omitted: 3 release-nothing changesets, 11 commits carrying no changeset (they ship no package code).
53
+
54
+ - **minor** — **BREAKING** — Converge the lookup/user widget metadata on the spec's camelCase — one concept, one spelling (objectui#7155, maintainer ruling A′ of 2026-09-03, director decision batch #19). (objectui `351eb3181`)
55
+ - **minor** — **BREAKING** — One authority for `KanbanSchema` / `KanbanColumn` / `KanbanCard`: the bare names now belong to `@object-ui/plugin-kanban` (objectui#6172, closing the cross-package half of objectu… (objectui `2c71482ea`)
56
+ - **minor** — Retire `ComponentInput.inputType` — the fifth and last key objectui#5905 named (ADR-0049 enforce-or-remove, maintainer ruling 2026-08-31, option B). (objectui `1ec291c0d`)
57
+ - **minor** — `@object-ui/core` publishes `resolveRecordSourceObjectName`, the ONE reader for "which object is this block bound to" (objectui#7627). (objectui `b041b9c0c`)
58
+ - **minor** — **Published TS surface narrowed:** `DashboardComponentSchema` no longer declares the dashboard-root `title` member (objectui#7623). (objectui `5d0876c5c`)
59
+ - **minor** — **BREAKING** — BREAKING (`@object-ui/components`): the chart primitives — `ChartContainer`, `ChartTooltip`, `ChartTooltipContent`, `ChartLegend`, `ChartLegendContent`, `ChartStyle` and the `Char… (objectui `7bf244bea`)
60
+ - **minor** — ListView: fold `data={{ provider: 'object', object }}` onto `objectName`, and read the author's view kind from `specType` / `type` (objectui#7477 — step 6 of #2890, released by th… (objectui `00d2fa682`)
61
+ - **minor** — Retire the dashboard-**root** `title` read across all five surfaces (objectui#7509, maintainer ruling 2026-09-04, decision batch #29, option C, under ADR-0049). (objectui `1cca678ba`)
62
+ - **minor** — **BREAKING** — Re-home the breakpoint layout vocabulary and delete the two dead responsive implementations (objectui#7580, maintainer ruling 2026-09-04, option A). (objectui `e62c44e7e`)
63
+ - **minor** — `@object-ui/types/zod`: the zod const `StylePropsSchema` is renamed to `ClassNameStylePropsSchema` (objectui#5928). **The old name is gone** — there is no deprecated alias and no… (objectui `24e027e93`)
64
+ - **patch** — Fix `extractToc` eating the underscores out of a `SCREAMING_SNAKE` heading, so its `#id` links resolve to the heading they name again (objectui#7667). (objectui `a472b0716`)
65
+ - **patch** — Remove `src/ui/toast.tsx`, an unreferenced primitive, and the dependency only it imported (objectui `2f61238b9`)
66
+ - **patch** — Fix `extractToc` deleting tag-shaped text that lives INSIDE an inline code span, so its `#id` links resolve to the heading they name again (objectui#7658). (objectui `90c6d090d`)
67
+ - **patch** — A record-page URL now names the object the clicked rows actually came from, in `ObjectTree` and `ObjectCalendar` (objectui#7638). (objectui `2ce2612df`)
68
+ - **patch** — fix(app-shell): the object-field options editor no longer drops `default` and `visibleWhen` on save (objectui `97c3e1972`)
69
+
70
+ ⚠️ 4 of these carry a breaking change: 4 by the author's own breaking annotation in the changeset body — objectui declares no `major` inside a launch window (`scripts/check-changeset-no-major.mjs`). Each is marked **BREAKING** in the list above — read them before compiling the release record.
71
+
72
+ **In this console build, declared nowhere** — objectui merged 11 commits in this range with no `.changeset/*.md`. The code is inside the pin above and ships here, but nothing upstream declared them, so they appear in no objectui CHANGELOG and in no entry above. Listed by subject rather than counted, because a count cannot tell a dependency bump from a form-behaviour change (objectstack#6174); the upstream gate that would prevent this is objectui#3387.
73
+
74
+ - _(no changeset)_ fix(scripts): check-doc-links resolves the #fragment, not just the file (objectui#7644) (#7657) (objectui `f7cf7e8a9`)
75
+ - _(no changeset)_ docs(plugin-chatbot): document chatbot-floating's seven declared inputs keys (objectui#7594) (#7656) (objectui `8e501cb97`)
76
+ - _(no changeset)_ docs(agents): record the never-approve seat rule beside the governed never-list (#7630) (objectui `2e99852ca`)
77
+ - _(no changeset)_ refactor(examples): drop the inert root `title` from six catalog dashboards (#7634) (objectui `46cde8264`)
78
+ - _(no changeset)_ docs(check-skill-examples): drop the stale zero-jsonc-fences claim (#7631) (objectui `0b24d7f85`)
79
+ - _(no changeset)_ docs(governed-guard): replace the retired sha pin with the ruled approval-record predicate (#7616) (objectui `11edab88f`)
80
+ - _(no changeset)_ docs(skills): split multi-document JSON fences, drop the `...` elisions, mark every parsing fence (#7608) (objectui `89d6adf37`)
81
+ - _(no changeset)_ fix(scripts): judge spec citations at member granularity, and stop the header teaching a retired filter (objectui#7513) (#7617) (objectui `d28d87bf4`)
82
+ - _(no changeset)_ fix(governed-guard): an authorised approval record satisfies the queue leg on any commit (#7606) (objectui `0d8fd7ce3`)
83
+ - _(no changeset)_ chore(deps): Bump fumadocs-core from 16.14.4 to 16.15.4 (#7059) (objectui `1bae75bb8`)
84
+ - _(no changeset)_ docs(claude-md): collapse the two AGENTS.md excerpts to rule + hook + pointer (#7600) (objectui `c70ebaaeb`)
85
+
86
+ <!-- adr-0087: not-required (no-migration-prescription) All FOUR declared-breaking entries in the range `00d3f09c500c...a472b07167a3` are judged ONE AT A TIME against `packages/spec`'s authorable surface at this HEAD, not as a batch, and every count below was re-measured here rather than quoted from upstream prose. (1) objectui `351eb3181` (objectui#7155) converges objectui's WIDGET metadata bags `LookupFieldMetadata` / `UserFieldMetadata` onto the spec's camelCase, removing the snake members. It moves TOWARD this repo's contract, not away from it: `packages/spec/src/data/field.zod.ts` already declares `displayField` (`:835`, `:1342`), `descriptionField` (`:1343`) and `lookupFilters` (`:1355`), and the snake spellings have ZERO occurrences under `packages/spec/src` — `display_field` 0, `description_field` 0, `lookup_filters` 0, `id_field` 0 (the single apparent `id_field` hit is the substring inside `invalid_field` in an unrelated `api/protocol.test.ts` fixture). The snake dialect was never an ObjectStack-authorable key, so no accepted key moves, no stored `sys_metadata` row can carry a retired spelling, and there is nothing here for `objectstack migrate meta` to act on. (2) objectui `2c71482ea` (objectui#6172) is a TypeScript export rename inside `@object-ui/types` giving the bare Kanban trio to `@object-ui/plugin-kanban`; `KanbanSchema`, `KanbanColumn` and `KanbanCard` have ZERO occurrences under `packages/spec/src`, and upstream states no member, no optionality and no accept/reject behaviour moves with it. (3) objectui `7bf244bea` (objectui#7397) removes the duplicated React chart primitives from `@object-ui/components`. This repo's own `ChartConfigSchema` / `ChartConfig` (`packages/spec/src/ui/chart.zod.ts:539`) is an independently declared ObjectStack metadata schema that shares a NAME with the removed objectui type and nothing else: `packages/spec/src` imports from `@object-ui/*` zero times (re-measured), so none of the removed React exports sits on any ObjectStack surface. (4) objectui `e62c44e7e` (objectui#7580) re-homes `BreakpointName` and `BreakpointColumnMap` into objectui packages and deletes the two dead responsive implementations. This repo retired that whole vocabulary itself in objectstack#11027 and its ADR-0087 ledger entries ALREADY EXIST on this side — `RETIRED_DEFS_BY_MAJOR[18]` carries `ui/BreakpointName`, `ui/BreakpointColumnMap` and `ui/BreakpointOrderMap` — so this entry is objectui catching up to a retirement already registered here, and it prescribes nothing new. None of the four is reachable through `@objectstack/console` in any case, re-measured against `packages/console/package.json` at this HEAD: it publishes a frozen prebuilt SPA whose `files` list is ["dist", "README.md", "CHANGELOG.md"] and whose sole `exports` entry is `./package.json`, so it forwards no `@object-ui/*` module entry point and re-exports none of these types; and no `package.json` in this workspace declares an `@object-ui/*` dependency at all (0 files, re-measured). This diff is `.objectui-sha`, this changeset and the regenerated console provenance records the pin gates require, and nothing else — no `packages/spec` schema, no authorable metadata key and no protocol surface change is in it. This bump adds no ledger entry and claims none. -->
87
+
88
+ objectui range: `00d3f09c500c...a472b07167a3`
89
+
3
90
  ## 17.3.0
4
91
 
5
92
  ### Minor Changes
@@ -1 +1 @@
1
- 00d3f09c500c4a45b5f27aca8af80349412faaf1
1
+ 53ded82bf7a494f54e344e19099dbf00854b8694
@@ -1,4 +1,4 @@
1
- import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{b as n,r}from"./vendor-react-CsWFRkED.js";import{g as i}from"./infrastructure-CIpDEFyQ.js";import{Fr as a,Tt as o,Wn as s,qn as c,qr as l}from"./framework-BfSv4Kb0.js";import{a as u,y as d}from"./i18n-locales-Bz4c8KXc.js";import{Bn as f,Cr as p,Cs as m,Fs as h,G as g,Sr as _,Ss as v,Xr as y,_ as b,br as x,gc as S,p as C,vr as w,xr as T,yr as E}from"./ui-components-D2lrjG-t.js";var D=e(n(),1),O=r(),k=(0,D.createContext)({favorites:null,recent:null,flowPaletteRecents:null}),A=(0,D.createContext)(null);function j({children:e}){let[t,n]=(0,D.useState)({favorites:null,recent:null,flowPaletteRecents:null}),r=(0,D.useRef)({attach:(e,t)=>{n(n=>n[e]===t?n:{...n,[e]:t})}});return(0,O.jsx)(A.Provider,{value:r.current,children:(0,O.jsx)(k.Provider,{value:t,children:e})})}function M(e){return(0,D.useContext)(k)[e]}function ee(){let e=(0,D.useContext)(A);return(0,D.useCallback)((t,n)=>{e?.attach(t,n)},[e])}function N(e,t){return t?`${e}:u:${t}`:e}function P(e,t){let n=(0,D.useRef)(t);n.current=t,(0,D.useEffect)(()=>{if(typeof window>`u`)return;let t=t=>{if(t.key===e&&t.storageArea===localStorage){if(t.newValue==null){n.current(null);return}try{n.current(JSON.parse(t.newValue))}catch{n.current(null)}}};return window.addEventListener(`storage`,t),()=>window.removeEventListener(`storage`,t)},[e])}function F(e,t=500){let n=null,r=null,i=!1,a=async()=>{if(n&&=(clearTimeout(n),null),!i)return;let t=r;i=!1,r=null;try{await e(t)}catch{}};return{schedule:e=>{r=e,i=!0,n&&clearTimeout(n),n=setTimeout(()=>{n=null,a()},t)},flush:a,cancel:()=>{n&&clearTimeout(n),n=null,i=!1,r=null}}}var I=`objectui-recent-items`,L=8;function R(e){try{let t=localStorage.getItem(N(I,e));return t?JSON.parse(t):[]}catch{return[]}}function z(e,t){try{localStorage.setItem(N(I,t),JSON.stringify(e))}catch{}}var B=(0,D.createContext)(null);function te({children:e}){let{user:t}=i(),n=t?.id??null,r=M(`recent`),[a,o]=(0,D.useState)(()=>R(n));(0,D.useEffect)(()=>{o(R(n))},[n]),P(N(I,n),e=>{o(Array.isArray(e)?e.filter(e=>e&&typeof e.id==`string`).slice(0,L):[])});let s=(0,D.useRef)(0);(0,D.useEffect)(()=>{if(!r)return;let e=++s.current,t=!1;return(async()=>{try{let i=await r.load();if(t||e!==s.current)return;let a=(Array.isArray(i)?i:[]).filter(e=>e&&typeof e.id==`string`).slice(0,L);o(a),z(a,n)}catch{}})(),()=>{t=!0}},[r,n]);let c=(0,D.useMemo)(()=>F(async e=>{r&&await r.save(e)},500),[r]);(0,D.useEffect)(()=>()=>{c.flush()},[c]);let l=(0,D.useCallback)(e=>{z(e,n),r&&c.schedule(e)},[n,r,c]),u=(0,D.useCallback)(e=>{o(t=>{let n=t.filter(t=>t.id!==e.id),r=[{...e,visitedAt:new Date().toISOString()},...n].slice(0,L);return l(r),r})},[l]),d=(0,D.useCallback)(()=>{o([]),l([])},[l]),f=(0,D.useMemo)(()=>({recentItems:a,addRecentItem:u,clearRecentItems:d}),[a,u,d]);return(0,O.jsx)(B.Provider,{value:f,children:e})}function ne(){return(0,D.useContext)(B)||{recentItems:[],addRecentItem:()=>{},clearRecentItems:()=>{}}}var re={checkbox:`boolean`,reference:`lookup`,"datetime-local":`datetime`};function V(e){return b(re[e]??e)}var ie=new Set([`lookup`,`master_detail`]);function H(e){return ie.has(V(e.type))&&!e.referenceTo}function U(e){let t=V(e.type);H(e)&&(t=`text`);let n={name:e.name,label:e.label,type:t,required:e.required,placeholder:e.placeholder,options:e.options,multiple:e.multiple,accept:e.accept,maxSize:e.maxSize};return t===`boolean`&&(n.widget=`checkbox`),a.has(t)&&Object.assign(n,{reference_to:e.referenceTo,display_field:e.displayField,id_field:e.idField,description_field:e.descriptionField,title_format:e.titleFormat,lookup_columns:e.lookupColumns,lookup_filters:e.lookupFilters,lookup_page_size:e.lookupPageSize,depends_on:e.dependsOn}),n}function ae(e,t,n){return e.filter(e=>{let r=e.visible;return l(r)?typeof r==`boolean`?r:c(r,null,{fallback:!0,scope:t,rowless:!0,warnOnError:!0,label:n?`param "${e.name}" of action "${n}"`:`param "${e.name}"`}):!0})}function oe(e,t){let n=new Set;for(let t of e){let e=U(t).type;(e===`file`||e===`image`)&&n.add(t.name)}if(n.size===0)return t;let r=e=>g(e)??e,i={...t};for(let e of n){let t=i[e];t!=null&&(i[e]=Array.isArray(t)?t.map(r):r(t))}return i}function se(){return(0,O.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded-md bg-muted`,"aria-hidden":`true`})}function ce({state:e,onOpenChange:t}){let{t:n,language:r}=d(),[i,a]=(0,D.useState)({}),[c,l]=(0,D.useState)({}),[m,h]=(0,D.useState)({}),g=Object.values(m).some(Boolean),v=o(),b=(0,D.useMemo)(()=>ae(e.params,v,e.title),[e.params,v,e.title]);(0,D.useEffect)(()=>{if(e.open){let e={};for(let t of b)t.defaultValue!==void 0&&(e[t.name]=t.defaultValue);a(e),l({}),h({})}},[e.open,b]);let S=e=>e==null?!0:typeof e==`string`?e.trim()===``:Array.isArray(e)?e.length===0:!1,k=()=>{if(g)return;let n={};for(let e of b)e.required&&S(i[e.name])&&(n[e.name]=!0);if(Object.keys(n).length>0){l(n);return}e.resolve?.(oe(b,i)),t(!1)},A=()=>{e.resolve?.(null),t(!1)},j=(e,t)=>{a(n=>({...n,[e]:t})),l(t=>({...t,[e]:!1}))};return(0,O.jsx)(w,{open:e.open,onOpenChange:e=>{e||A()},children:(0,O.jsxs)(E,{children:[(0,O.jsxs)(_,{children:[(0,O.jsx)(p,{children:e.title||n(`actionDialog.title`)}),(0,O.jsx)(x,{className:`whitespace-pre-line`,children:e.description||n(`actionDialog.description`)})]}),(0,O.jsx)(`div`,{className:`grid gap-4 py-4`,children:b.map(e=>{let t={...e,label:u(e.label,r),helpText:e.helpText==null?e.helpText:u(e.helpText,r),options:e.options?.map(e=>({...e,label:u(e.label,r)}))},a=U(t),o=C(a.type),l=a.type===`file`||a.type===`image`?{onUploadingChange:e=>h(n=>({...n,[t.name]:e}))}:{},d=s.has(a.type)?{dependentValues:i}:{},p=H(t);return a.type===`select`&&!a.placeholder&&(a.placeholder=n(`actionDialog.selectPlaceholder`,{label:t.label})),p&&!a.placeholder&&(a.placeholder=n(`actionDialog.lookupPlaceholder`,{label:t.label})),a.type===`boolean`?(0,O.jsxs)(`div`,{className:`grid gap-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(`div`,{className:`size-4 mt-0.5 animate-pulse rounded-sm bg-muted`,"aria-hidden":`true`}),children:(0,O.jsx)(o,{id:t.name,value:i[t.name]===!0,onChange:e=>j(t.name,e===!0),field:a,className:`mt-0.5`,"aria-required":t.required||void 0})}),(0,O.jsxs)(f,{htmlFor:t.name,className:`font-normal cursor-pointer`,children:[t.label,t.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,"aria-hidden":`true`,children:`*`})]})]}),c[t.name]&&(0,O.jsx)(`p`,{className:`text-xs text-destructive ml-6`,children:n(`actionDialog.requiredError`,{label:t.label})}),t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground ml-6`,children:t.helpText})]},t.name):(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsxs)(f,{htmlFor:t.name,children:[t.label,t.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,"aria-hidden":`true`,children:`*`})]}),(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(se,{}),children:(0,O.jsx)(o,{id:t.name,value:i[t.name]??null,onChange:e=>j(t.name,e),field:a,className:c[t.name]?`border-destructive`:``,"aria-required":t.required||void 0,...l,...d})}),c[t.name]&&(0,O.jsx)(`p`,{className:`text-xs text-destructive`,children:n(`actionDialog.requiredError`,{label:t.label})}),t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.helpText}),p&&!t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`actionDialog.lookupHelpText`)})]},t.name)})}),(0,O.jsxs)(T,{children:[(0,O.jsx)(y,{variant:`outline`,onClick:A,children:n(`actionDialog.cancel`)}),(0,O.jsx)(y,{onClick:k,disabled:g,children:n(g?`actionDialog.uploading`:`actionDialog.confirm`)})]})]})})}var le=t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),W=t((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),G=t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),ue=t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),de=t(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),fe=t((e=>{var t=W().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),pe=t((e=>{var t=W().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),me=t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),K=t((e=>{var t=G(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),he=t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),ge=t((e=>{var t=he();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_e=t(((e,t)=>{var n=ge();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),q=t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),J=t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
1
+ import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{b as n,r}from"./vendor-react-CsWFRkED.js";import{g as i}from"./infrastructure-B4zG1jNa.js";import{Rr as a,Tt as o,Xn as s,Xr as c,qn as l}from"./framework-DFE_Mws9.js";import{a as u,y as d}from"./i18n-locales-BBA090ve.js";import{Bn as f,Cr as p,Cs as m,Fs as h,G as g,Sr as _,Ss as v,Xr as y,_ as b,br as x,gc as S,p as C,vr as w,xr as T,yr as E}from"./ui-components-CMHDBJEm.js";var D=e(n(),1),O=r(),k=(0,D.createContext)({favorites:null,recent:null,flowPaletteRecents:null}),A=(0,D.createContext)(null);function j({children:e}){let[t,n]=(0,D.useState)({favorites:null,recent:null,flowPaletteRecents:null}),r=(0,D.useRef)({attach:(e,t)=>{n(n=>n[e]===t?n:{...n,[e]:t})}});return(0,O.jsx)(A.Provider,{value:r.current,children:(0,O.jsx)(k.Provider,{value:t,children:e})})}function M(e){return(0,D.useContext)(k)[e]}function ee(){let e=(0,D.useContext)(A);return(0,D.useCallback)((t,n)=>{e?.attach(t,n)},[e])}function N(e,t){return t?`${e}:u:${t}`:e}function P(e,t){let n=(0,D.useRef)(t);n.current=t,(0,D.useEffect)(()=>{if(typeof window>`u`)return;let t=t=>{if(t.key===e&&t.storageArea===localStorage){if(t.newValue==null){n.current(null);return}try{n.current(JSON.parse(t.newValue))}catch{n.current(null)}}};return window.addEventListener(`storage`,t),()=>window.removeEventListener(`storage`,t)},[e])}function F(e,t=500){let n=null,r=null,i=!1,a=async()=>{if(n&&=(clearTimeout(n),null),!i)return;let t=r;i=!1,r=null;try{await e(t)}catch{}};return{schedule:e=>{r=e,i=!0,n&&clearTimeout(n),n=setTimeout(()=>{n=null,a()},t)},flush:a,cancel:()=>{n&&clearTimeout(n),n=null,i=!1,r=null}}}var I=`objectui-recent-items`,L=8;function R(e){try{let t=localStorage.getItem(N(I,e));return t?JSON.parse(t):[]}catch{return[]}}function z(e,t){try{localStorage.setItem(N(I,t),JSON.stringify(e))}catch{}}var B=(0,D.createContext)(null);function te({children:e}){let{user:t}=i(),n=t?.id??null,r=M(`recent`),[a,o]=(0,D.useState)(()=>R(n));(0,D.useEffect)(()=>{o(R(n))},[n]),P(N(I,n),e=>{o(Array.isArray(e)?e.filter(e=>e&&typeof e.id==`string`).slice(0,L):[])});let s=(0,D.useRef)(0);(0,D.useEffect)(()=>{if(!r)return;let e=++s.current,t=!1;return(async()=>{try{let i=await r.load();if(t||e!==s.current)return;let a=(Array.isArray(i)?i:[]).filter(e=>e&&typeof e.id==`string`).slice(0,L);o(a),z(a,n)}catch{}})(),()=>{t=!0}},[r,n]);let c=(0,D.useMemo)(()=>F(async e=>{r&&await r.save(e)},500),[r]);(0,D.useEffect)(()=>()=>{c.flush()},[c]);let l=(0,D.useCallback)(e=>{z(e,n),r&&c.schedule(e)},[n,r,c]),u=(0,D.useCallback)(e=>{o(t=>{let n=t.filter(t=>t.id!==e.id),r=[{...e,visitedAt:new Date().toISOString()},...n].slice(0,L);return l(r),r})},[l]),d=(0,D.useCallback)(()=>{o([]),l([])},[l]),f=(0,D.useMemo)(()=>({recentItems:a,addRecentItem:u,clearRecentItems:d}),[a,u,d]);return(0,O.jsx)(B.Provider,{value:f,children:e})}function ne(){return(0,D.useContext)(B)||{recentItems:[],addRecentItem:()=>{},clearRecentItems:()=>{}}}var re={checkbox:`boolean`,reference:`lookup`,"datetime-local":`datetime`};function V(e){return b(re[e]??e)}var ie=new Set([`lookup`,`master_detail`]);function H(e){return ie.has(V(e.type))&&!e.referenceTo}function U(e){let t=V(e.type);H(e)&&(t=`text`);let n={name:e.name,label:e.label,type:t,required:e.required,placeholder:e.placeholder,options:e.options,multiple:e.multiple,accept:e.accept,maxSize:e.maxSize};return t===`boolean`&&(n.widget=`checkbox`),a.has(t)&&Object.assign(n,{reference_to:e.referenceTo,displayField:e.displayField,idField:e.idField,descriptionField:e.descriptionField,title_format:e.titleFormat,lookup_columns:e.lookupColumns,lookupFilters:e.lookupFilters,lookup_page_size:e.lookupPageSize,depends_on:e.dependsOn}),n}function ae(e,t,n){return e.filter(e=>{let r=e.visible;return c(r)?typeof r==`boolean`?r:s(r,null,{fallback:!0,scope:t,rowless:!0,warnOnError:!0,label:n?`param "${e.name}" of action "${n}"`:`param "${e.name}"`}):!0})}function oe(e,t){let n=new Set;for(let t of e){let e=U(t).type;(e===`file`||e===`image`)&&n.add(t.name)}if(n.size===0)return t;let r=e=>g(e)??e,i={...t};for(let e of n){let t=i[e];t!=null&&(i[e]=Array.isArray(t)?t.map(r):r(t))}return i}function se(){return(0,O.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded-md bg-muted`,"aria-hidden":`true`})}function ce({state:e,onOpenChange:t}){let{t:n,language:r}=d(),[i,a]=(0,D.useState)({}),[s,c]=(0,D.useState)({}),[m,h]=(0,D.useState)({}),g=Object.values(m).some(Boolean),v=o(),b=(0,D.useMemo)(()=>ae(e.params,v,e.title),[e.params,v,e.title]);(0,D.useEffect)(()=>{if(e.open){let e={};for(let t of b)t.defaultValue!==void 0&&(e[t.name]=t.defaultValue);a(e),c({}),h({})}},[e.open,b]);let S=e=>e==null?!0:typeof e==`string`?e.trim()===``:Array.isArray(e)?e.length===0:!1,k=()=>{if(g)return;let n={};for(let e of b)e.required&&S(i[e.name])&&(n[e.name]=!0);if(Object.keys(n).length>0){c(n);return}e.resolve?.(oe(b,i)),t(!1)},A=()=>{e.resolve?.(null),t(!1)},j=(e,t)=>{a(n=>({...n,[e]:t})),c(t=>({...t,[e]:!1}))};return(0,O.jsx)(w,{open:e.open,onOpenChange:e=>{e||A()},children:(0,O.jsxs)(E,{children:[(0,O.jsxs)(_,{children:[(0,O.jsx)(p,{children:e.title||n(`actionDialog.title`)}),(0,O.jsx)(x,{className:`whitespace-pre-line`,children:e.description||n(`actionDialog.description`)})]}),(0,O.jsx)(`div`,{className:`grid gap-4 py-4`,children:b.map(e=>{let t={...e,label:u(e.label,r),helpText:e.helpText==null?e.helpText:u(e.helpText,r),options:e.options?.map(e=>({...e,label:u(e.label,r)}))},a=U(t),o=C(a.type),c=a.type===`file`||a.type===`image`?{onUploadingChange:e=>h(n=>({...n,[t.name]:e}))}:{},d=l.has(a.type)?{dependentValues:i}:{},p=H(t);return a.type===`select`&&!a.placeholder&&(a.placeholder=n(`actionDialog.selectPlaceholder`,{label:t.label})),p&&!a.placeholder&&(a.placeholder=n(`actionDialog.lookupPlaceholder`,{label:t.label})),a.type===`boolean`?(0,O.jsxs)(`div`,{className:`grid gap-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(`div`,{className:`size-4 mt-0.5 animate-pulse rounded-sm bg-muted`,"aria-hidden":`true`}),children:(0,O.jsx)(o,{id:t.name,value:i[t.name]===!0,onChange:e=>j(t.name,e===!0),field:a,className:`mt-0.5`,"aria-required":t.required||void 0})}),(0,O.jsxs)(f,{htmlFor:t.name,className:`font-normal cursor-pointer`,children:[t.label,t.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,"aria-hidden":`true`,children:`*`})]})]}),s[t.name]&&(0,O.jsx)(`p`,{className:`text-xs text-destructive ml-6`,children:n(`actionDialog.requiredError`,{label:t.label})}),t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground ml-6`,children:t.helpText})]},t.name):(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsxs)(f,{htmlFor:t.name,children:[t.label,t.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,"aria-hidden":`true`,children:`*`})]}),(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(se,{}),children:(0,O.jsx)(o,{id:t.name,value:i[t.name]??null,onChange:e=>j(t.name,e),field:a,className:s[t.name]?`border-destructive`:``,"aria-required":t.required||void 0,...c,...d})}),s[t.name]&&(0,O.jsx)(`p`,{className:`text-xs text-destructive`,children:n(`actionDialog.requiredError`,{label:t.label})}),t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.helpText}),p&&!t.helpText&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`actionDialog.lookupHelpText`)})]},t.name)})}),(0,O.jsxs)(T,{children:[(0,O.jsx)(y,{variant:`outline`,onClick:A,children:n(`actionDialog.cancel`)}),(0,O.jsx)(y,{onClick:k,disabled:g,children:n(g?`actionDialog.uploading`:`actionDialog.confirm`)})]})]})})}var le=t(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),W=t((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),G=t((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),ue=t(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),de=t(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),fe=t((e=>{var t=W().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),pe=t((e=>{var t=W().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),me=t((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),K=t((e=>{var t=G(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),he=t((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),ge=t((e=>{var t=he();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_e=t(((e,t)=>{var n=ge();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),q=t((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),J=t((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
2
2
  ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),Y=t((e=>{var t=q(),n=J();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),ve=t((e=>{var t=W(),n=K(),r=G(),i=Y(),a=q(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),ye=t((e=>{var t=W(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),be=t(((e,t)=>{var n=Y();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),xe=t(((e,t)=>{var n=Y(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),Se=t(((e,t)=>{var n=Y();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),Ce=t(((e,t)=>{var n=Y(),r=W();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),we=t(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),Te=t((e=>{var t=Y(),n=be(),r=xe(),i=Se(),a=Ce(),o=J(),s=W(),c=we();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
4
4
  Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Ee=t((e=>{var t=W(),n=G(),r=ue(),i=de(),a=fe(),o=pe(),s=me(),c=K(),l=_e(),u=ve(),d=ye(),f=Y(),p=Te();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{n as r}from"./plugin-chatbot-BGnkLzFS.js";var i=e(t(),1),a=n();function o(){let e={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_SERVER_URL:``,VITE_USE_MOCK_SERVER:`false`},t=e.VITE_AI_BASE_URL;return t?t.replace(/\/$/,``):`${(e.VITE_SERVER_URL??``).replace(/\/$/,``)}/api/v1/ai`}function s(){let e=(0,i.useMemo)(()=>o(),[]);return(0,a.jsxs)(`div`,{className:`p-6 max-w-6xl mx-auto`,children:[(0,a.jsxs)(`div`,{className:`mb-4`,children:[(0,a.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`AI Approvals`}),(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Review actions an AI agent proposed. Approve to execute them server-side; reject to send a reason back to the model so it can revise the next turn.`})]}),(0,a.jsx)(r,{apiBase:e,variant:`card`,title:`Queue`,description:`Polled every 5 seconds. Decisions are recorded under your identity.`})]})}export{s as AiPendingActionsPage,s as default};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{n as r}from"./plugin-chatbot-BeSLDg4N.js";var i=e(t(),1),a=n();function o(){let e={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_SERVER_URL:``,VITE_USE_MOCK_SERVER:`false`},t=e.VITE_AI_BASE_URL;return t?t.replace(/\/$/,``):`${(e.VITE_SERVER_URL??``).replace(/\/$/,``)}/api/v1/ai`}function s(){let e=(0,i.useMemo)(()=>o(),[]);return(0,a.jsxs)(`div`,{className:`p-6 max-w-6xl mx-auto`,children:[(0,a.jsxs)(`div`,{className:`mb-4`,children:[(0,a.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`AI Approvals`}),(0,a.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Review actions an AI agent proposed. Approve to execute them server-side; reject to send a reason back to the model so it can revise the next turn.`})]}),(0,a.jsx)(r,{apiBase:e,variant:`card`,title:`Queue`,description:`Polled every 5 seconds. Decisions are recorded under your identity.`})]})}export{s as AiPendingActionsPage,s as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{M as r,q as i}from"./framework-BfSv4Kb0.js";import{Da as a,Er as o,Fs as s,Jo as c,Pr as l,Si as u,Tr as d,Us as f,aa as p,gc as m,hc as h,ka as g,ni as _,pc as v,va as y,vo as b,wr as ee}from"./ui-components-D2lrjG-t.js";import"./src-JX1BkhmR.js";var x=e(t(),1),S=[`plugin`,`plugins`,`kind`,`package`];function C(e){return[{method:`POST`,path:`${e}/sign-in/email`,desc:`Sign in (email)`,group:`Auth`,bodyTemplate:{email:`user@example.com`,password:``}},{method:`POST`,path:`${e}/sign-up/email`,desc:`Sign up (email)`,group:`Auth`,bodyTemplate:{email:``,password:``,name:``}},{method:`POST`,path:`${e}/sign-out`,desc:`Sign out`,group:`Auth`},{method:`GET`,path:`${e}/get-session`,desc:`Get session`,group:`Auth`}]}var w={ai:{group:`AI`,defaultRoute:`/api/v1/ai`,endpoints:[{method:`POST`,path:`/chat`,desc:`Chat completion (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`POST`,path:`/chat/stream`,desc:`Streaming chat (SSE)`,bodyTemplate:{messages:[{role:`user`,content:``}]}},{method:`POST`,path:`/complete`,desc:`Text completion`,bodyTemplate:{prompt:``}},{method:`GET`,path:`/models`,desc:`List available models`},{method:`GET`,path:`/status`,desc:`Active LLM adapter provenance`},{method:`GET`,path:`/effective-model`,desc:`Effective model ids and where they came from`},{method:`POST`,path:`/conversations`,desc:`Create conversation`,bodyTemplate:{}},{method:`GET`,path:`/conversations`,desc:`List conversations`},{method:`GET`,path:`/conversations/:id`,desc:`Get conversation with message history`},{method:`PATCH`,path:`/conversations/:id`,desc:`Update conversation (title, metadata)`,bodyTemplate:{title:``}},{method:`DELETE`,path:`/conversations/:id`,desc:`Delete conversation`},{method:`POST`,path:`/conversations/:id/messages`,desc:`Add message to conversation`,bodyTemplate:{role:`user`,content:``}},{method:`GET`,path:`/conversations/:id/debug`,desc:`Reconcile a build conversation: agent-claimed vs live metadata`},{method:`GET`,path:`/agents`,desc:`List active agents`},{method:`POST`,path:`/agents/:agentName/chat`,desc:`Chat with a named agent (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/assistant`,desc:`Resolve the default assistant and its active skills`},{method:`GET`,path:`/assistant/skills`,desc:`List active skills for a context`},{method:`POST`,path:`/assistant/chat`,desc:`Ambient chat — auto-resolves agent and skills (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/tools`,desc:`List registered AI tools`},{method:`POST`,path:`/tools/:toolName/execute`,desc:`Execute one tool directly (playground)`,bodyTemplate:{parameters:{}}},{method:`GET`,path:`/pending-actions`,desc:`List pending actions awaiting approval`},{method:`GET`,path:`/pending-actions/:id`,desc:`Get one pending action`},{method:`POST`,path:`/pending-actions/:id/approve`,desc:`Approve a pending action and execute it`,bodyTemplate:{}},{method:`POST`,path:`/pending-actions/:id/reject`,desc:`Reject a pending action`,bodyTemplate:{reason:``}},{method:`POST`,path:`/evals/runs`,desc:`Run an eval case — ai:admin, makes paid LLM calls`,bodyTemplate:{caseId:``}},{method:`GET`,path:`/usage`,desc:`AI quota headroom per meter (console usage indicator)`}]},realtime:{group:`Realtime`,defaultRoute:`/api/v1/realtime`,endpoints:[{method:`POST`,path:`/connect`,desc:`Establish realtime connection`,bodyTemplate:{transport:`websocket`}},{method:`POST`,path:`/disconnect`,desc:`Close realtime connection`,bodyTemplate:{connectionId:``}},{method:`POST`,path:`/subscribe`,desc:`Subscribe to channel`,bodyTemplate:{channel:``}},{method:`POST`,path:`/unsubscribe`,desc:`Unsubscribe from channel`,bodyTemplate:{channel:``}},{method:`PUT`,path:`/presence/:channel`,desc:`Set presence state`,bodyTemplate:{status:`online`}},{method:`GET`,path:`/presence/:channel`,desc:`Get channel presence`}]},notification:{group:`Notifications`,defaultRoute:`/api/v1/notifications`,endpoints:[{method:`GET`,path:``,desc:`List notifications`},{method:`POST`,path:`/devices`,desc:`Register device for push`,bodyTemplate:{token:``,platform:`web`}},{method:`DELETE`,path:`/devices/:deviceId`,desc:`Unregister device`},{method:`GET`,path:`/preferences`,desc:`Get notification preferences`},{method:`PATCH`,path:`/preferences`,desc:`Update notification preferences`,bodyTemplate:{email:!0,push:!0}},{method:`POST`,path:`/read`,desc:`Mark notifications as read`,bodyTemplate:{ids:[]}},{method:`POST`,path:`/read/all`,desc:`Mark all as read`}]},analytics:{group:`Analytics`,defaultRoute:`/api/v1/analytics`,endpoints:[{method:`POST`,path:`/query`,desc:`Execute analytics query`,bodyTemplate:{measures:[],dimensions:[]}},{method:`GET`,path:`/meta`,desc:`Get analytics metadata`}]},automation:{group:`Automation`,defaultRoute:`/api/v1/automation`,endpoints:[{method:`POST`,path:`/trigger`,desc:`Trigger automation`,bodyTemplate:{name:``,params:{}}}]},i18n:{group:`i18n`,defaultRoute:`/api/v1/i18n`,endpoints:[{method:`GET`,path:`/locales`,desc:`Get available locales`},{method:`GET`,path:`/translations/:locale`,desc:`Get translations for locale`},{method:`GET`,path:`/labels/:object/:locale`,desc:`Get translated field labels`}]},ui:{group:`UI`,defaultRoute:`/api/v1/ui`,endpoints:[{method:`GET`,path:`/views`,desc:`List views`},{method:`GET`,path:`/views/:id`,desc:`Get view by ID`},{method:`POST`,path:`/views`,desc:`Create view`,bodyTemplate:{name:``,object:``,type:`list`}},{method:`PATCH`,path:`/views/:id`,desc:`Update view`,bodyTemplate:{name:``}},{method:`DELETE`,path:`/views/:id`,desc:`Delete view`}]},"file-storage":{group:`Storage`,defaultRoute:`/api/v1/storage`,endpoints:[{method:`POST`,path:`/upload`,desc:`Upload file (multipart/form-data)`},{method:`GET`,path:`/:fileId`,desc:`Download file`},{method:`DELETE`,path:`/:fileId`,desc:`Delete file`}]}},T={"file-storage":`storage`};function E(e,t){let n=w[e];return n?n.endpoints.map(e=>({method:e.method,path:`${t}${e.path}`,desc:e.desc,group:n.group,...e.bodyTemplate?{bodyTemplate:e.bodyTemplate}:{}})):[]}function te(){let e=i(),[t,n]=(0,x.useState)([]),[a,o]=(0,x.useState)([]),[s,c]=(0,x.useState)(!0),[l,u]=(0,x.useState)(null),d=(0,x.useCallback)(async()=>{c(!0),u(null);let t=`/api/v1`,i=`${t}/discovery`,a=[{method:`GET`,path:i,desc:`API Discovery`,group:`System`},{method:`GET`,path:`${t}/meta/types`,desc:`List metadata types`,group:`Metadata`},{method:`GET`,path:`${t}/packages`,desc:`List packages`,group:`System`},{method:`GET`,path:`/api/v1/health`,desc:`Health check`,group:`System`}];try{let s=`/api/v1/auth`,c={},l={};try{let e=await fetch(i);if(e.ok){let t=await e.json(),n=t?.data??t;l=n?.routes??{},c=n?.services??{},l.auth&&(s=l.auth)}}catch{}let u=[];for(let[e,t]of Object.entries(w)){let n=T[e],i=(n?c[n]:void 0)??c[e],a=i?r(i):!1,o=i?.route??l[e]??t.defaultRoute;a&&u.push(...E(e,o))}let d=e?.getClient?.(),f=[];try{let e=await d?.meta?.getTypes?.();e&&Array.isArray(e.types)?f=e.types:Array.isArray(e)&&(f=e)}catch{}let p=[];try{let e=f.includes(`object`)?`object`:null;if(e&&d?.meta?.getItems){let t=await d.meta.getItems(e),n=[];Array.isArray(t)?n=t:t&&Array.isArray(t.items)?n=t.items:t&&Array.isArray(t.value)&&(n=t.value),p=n.map(e=>e.name||e.id).filter(Boolean)}}catch{}let m=p.flatMap(e=>{let n=e.startsWith(`sys_`)?`Data: system tables`:`Data: ${e}`;return[{method:`GET`,path:`${t}/data/${e}`,desc:`List ${e}`,group:n},{method:`POST`,path:`${t}/data/${e}`,desc:`Create ${e}`,group:n,bodyTemplate:{name:`example`}},{method:`GET`,path:`${t}/data/${e}/:id`,desc:`Get ${e} by ID`,group:n},{method:`PATCH`,path:`${t}/data/${e}/:id`,desc:`Update ${e}`,group:n,bodyTemplate:{name:`updated`}},{method:`DELETE`,path:`${t}/data/${e}/:id`,desc:`Delete ${e}`,group:n}]}),h=f.filter(e=>!S.includes(e)).map(e=>({method:`GET`,path:`${t}/meta/${e}`,desc:`List ${e} metadata`,group:`Metadata`})),g=p.map(e=>({method:`GET`,path:`${t}/meta/object/${e}`,desc:`${e} schema`,group:`Metadata`})),_=[...a,...C(s),...u,...h,...g,...m],v=new Map;for(let e of _){let t=v.get(e.group)||[];t.push(e),v.set(e.group,t)}let y=[`System`,`Auth`,`AI`,`Workflow`,`Realtime`,`Notifications`,`Analytics`,`Automation`,`i18n`,`UI`,`Feed`,`Storage`,`Metadata`],b=Array.from(v.entries()).sort(([e],[t])=>{let n=y.indexOf(e),r=y.indexOf(t);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.localeCompare(t):1:-1}).map(([e,t])=>({key:e,label:e,endpoints:t}));n(b),o(_)}catch(e){u(e.message||`Failed to discover APIs`)}finally{c(!1)}},[e]);return(0,x.useEffect)(()=>{d()},[d]),{groups:t,allEndpoints:a,loading:s,error:l,refresh:d}}var D=n(),O={GET:`text-emerald-600 bg-emerald-50 border-emerald-200 dark:text-emerald-400 dark:bg-emerald-950/50`,POST:`text-blue-600 bg-blue-50 border-blue-200 dark:text-blue-400 dark:bg-blue-950/50`,PATCH:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,PUT:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,DELETE:`text-red-600 bg-red-50 border-red-200 dark:text-red-400 dark:bg-red-950/50`},ne={2:`text-emerald-600 dark:text-emerald-400`,3:`text-blue-600 dark:text-blue-400`,4:`text-amber-600 dark:text-amber-400`,5:`text-red-600 dark:text-red-400`},re=[{key:`$top`,placeholder:`10`,hint:`limit`},{key:`$skip`,placeholder:`0`,hint:`offset`},{key:`$sort`,placeholder:`name`,hint:`sort field`},{key:`$select`,placeholder:`name,email`,hint:`fields`},{key:`$count`,placeholder:`true`,hint:`total count`},{key:`$filter`,placeholder:`status eq 'active'`,hint:`OData filter`}],k=1;function A(){let e=i()?.getClient?.(),{groups:t,loading:n,refresh:r}=te(),[S,C]=(0,x.useState)(``),[w,T]=(0,x.useState)(new Set),[E,A]=(0,x.useState)(null),[ie,j]=(0,x.useState)(``),[ae,M]=(0,x.useState)(``),[N,P]=(0,x.useState)(``),[F,I]=(0,x.useState)([]),[L,R]=(0,x.useState)(!1),[z,B]=(0,x.useState)(null),[V,H]=(0,x.useState)([]),[U,oe]=(0,x.useState)(null),[W,G]=(0,x.useState)(!1),K=(0,x.useMemo)(()=>{if(!S)return t;let e=S.toLowerCase();return t.map(t=>({...t,endpoints:t.endpoints.filter(t=>t.desc.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)||t.method.toLowerCase().includes(e))})).filter(e=>e.endpoints.length>0)},[t,S]),se=(0,x.useCallback)(e=>{T(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ce=(0,x.useCallback)(e=>{A(e),j(e.method),M(e.path),P(e.bodyTemplate?JSON.stringify(e.bodyTemplate,null,2):``),I([]),B(null)},[]),q=ie||E?.method||`GET`,J=ae||E?.path||``,Y=(0,x.useMemo)(()=>{let e=F.filter(e=>e.enabled&&e.key.trim());if(e.length===0)return J;let t=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${J}?${t}`},[J,F]),X=(0,x.useCallback)((e=``,t=``)=>{I(n=>[...n,{id:k++,key:e,value:t,enabled:!0}])},[]),le=(0,x.useCallback)(e=>{I(t=>t.filter(t=>t.id!==e))},[]),Z=(0,x.useCallback)((e,t,n)=>{I(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),ue=(0,x.useCallback)(e=>{I(t=>t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t))},[]),Q=(0,x.useCallback)(async()=>{if(L||!Y)return;let t=`${e?.baseUrl??``}${Y}`;R(!0);let n=performance.now();try{let e={method:q,headers:{"Content-Type":`application/json`}};[`POST`,`PATCH`,`PUT`].includes(q)&&N.trim()&&(e.body=N);let r=await fetch(t,e),i=Math.round(performance.now()-n),a;if((r.headers.get(`content-type`)??``).includes(`json`)){let e=await r.json();a=JSON.stringify(e,null,2)}else a=await r.text();let o={status:r.status,body:a,duration:i};B(o),H(e=>[{id:Date.now(),method:q,url:Y,body:N||void 0,status:r.status,duration:i,response:a,timestamp:new Date},...e].slice(0,50))}catch(e){let t=Math.round(performance.now()-n);B({status:0,body:`Network Error: ${e.message}`,duration:t})}finally{R(!1)}},[e,Y,q,N,L]),de=(0,x.useCallback)(e=>{j(e.method);let[t,n]=e.url.split(`?`);if(M(t),P(e.body||``),n){let e=new URLSearchParams(n),t=[];e.forEach((e,n)=>{t.push({id:k++,key:n,value:e,enabled:!0})}),I(t)}else I([]);B(null),A(null)},[]),fe=(0,x.useCallback)(()=>{z?.body&&(navigator.clipboard.writeText(z.body),G(!0),setTimeout(()=>G(!1),1500))},[z]),$=e=>ne[String(e)[0]]??`text-muted-foreground`;return(0,D.jsxs)(`div`,{className:`flex flex-1 min-h-0 overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`w-72 shrink-0 border-r flex flex-col overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-2`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`h3`,{className:`text-sm font-semibold text-foreground flex-1`,children:`API Endpoints`}),(0,D.jsx)(`button`,{type:`button`,onClick:r,disabled:n,className:`p-1 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground`,title:`Refresh endpoints`,children:(0,D.jsx)(y,{className:`h-3.5 w-3.5 ${n?`animate-spin`:``}`})})]}),(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(p,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,D.jsx)(`input`,{type:`text`,value:S,onChange:e=>C(e.target.value),placeholder:`Search endpoints...`,className:`w-full rounded-md border bg-background pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,D.jsx)(`div`,{className:`flex-1 overflow-auto p-2 space-y-1`,children:n?(0,D.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(b,{className:`h-4 w-4 animate-spin mr-2`}),`Discovering APIs...`]}):K.length===0?(0,D.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(c,{className:`h-6 w-6 opacity-30 mb-2`}),(0,D.jsx)(`span`,{children:S?`No matching endpoints`:`No endpoints found`})]}):K.map(e=>{let t=w.has(e.key)||!!S;return(0,D.jsxs)(ee,{open:t,onOpenChange:()=>se(e.key),children:[(0,D.jsx)(o,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,className:`w-full flex items-center gap-1.5 px-2 py-1.5 rounded-md text-xs font-medium text-muted-foreground hover:bg-muted/50 hover:text-foreground transition-colors`,children:[(0,D.jsx)(v,{className:`h-3 w-3 shrink-0 transition-transform duration-200 ${t?`rotate-90`:``}`}),(0,D.jsx)(`span`,{className:`flex-1 text-left truncate`,children:e.label}),(0,D.jsx)(`span`,{className:`shrink-0 text-[10px] tabular-nums opacity-60`,children:e.endpoints.length})]})}),(0,D.jsx)(d,{children:(0,D.jsx)(`div`,{className:`ml-3 space-y-0.5 mt-0.5`,children:e.endpoints.map((e,t)=>(0,D.jsxs)(`button`,{type:`button`,onClick:()=>ce(e),className:`w-full text-left flex items-center gap-1.5 px-2 py-1 rounded text-xs transition-colors ${E===e?`bg-accent text-accent-foreground`:`hover:bg-muted/50 text-muted-foreground hover:text-foreground`}`,children:[(0,D.jsx)(l,{variant:`outline`,className:`font-mono text-[9px] shrink-0 px-1 py-0 ${O[e.method]||``}`,children:e.method}),(0,D.jsx)(`span`,{className:`truncate`,children:e.desc})]},`${e.method}-${e.path}-${t}`))})})]},e.key)})}),(0,D.jsxs)(`div`,{className:`p-3 border-t space-y-2`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(`h4`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:`Query Parameters`}),(0,D.jsxs)(`button`,{type:`button`,onClick:()=>X(),className:`inline-flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,D.jsx)(a,{className:`h-3 w-3`}),`Add`]})]}),(0,D.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:re.map(e=>(0,D.jsx)(`button`,{type:`button`,onClick:()=>X(e.key,``),className:`text-[10px] px-1.5 py-0.5 rounded border bg-muted/30 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors font-mono`,title:e.hint,children:e.key},e.key))}),F.length>0&&(0,D.jsx)(`div`,{className:`space-y-1`,children:F.map(e=>(0,D.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:()=>ue(e.id),className:`h-3 w-3 shrink-0 rounded border accent-primary`}),(0,D.jsx)(`input`,{type:`text`,value:e.key,onChange:t=>Z(e.id,`key`,t.target.value),placeholder:`key`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,D.jsx)(`input`,{type:`text`,value:e.value,onChange:t=>Z(e.id,`value`,t.target.value),placeholder:`value`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>le(e.id),className:`shrink-0 p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors`,children:(0,D.jsx)(_,{className:`h-3 w-3`})})]},e.id))})]})]}),(0,D.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`select`,{value:q,onChange:e=>j(e.target.value),className:`rounded-md border bg-background px-2 py-1.5 font-mono text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${O[q]||``}`,children:[`GET`,`POST`,`PATCH`,`PUT`,`DELETE`].map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))}),(0,D.jsx)(`input`,{type:`text`,value:J,onChange:e=>M(e.target.value),className:`flex-1 rounded-md border bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-1 focus:ring-ring`,placeholder:`/api/v1/...`,onKeyDown:e=>{e.key===`Enter`&&Q()}}),(0,D.jsxs)(`button`,{type:`button`,onClick:Q,disabled:L||!Y,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors`,children:[L?(0,D.jsx)(b,{className:`h-3.5 w-3.5 animate-spin`}):(0,D.jsx)(g,{className:`h-3.5 w-3.5`}),`Send`]})]}),F.some(e=>e.enabled&&e.key.trim())&&(0,D.jsxs)(`div`,{className:`text-[10px] font-mono text-muted-foreground truncate pl-1`,children:[`→ `,Y]})]}),(0,D.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 overflow-auto`,children:[[`POST`,`PATCH`,`PUT`].includes(q)&&(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,D.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Request Body (JSON)`}),(0,D.jsx)(`textarea`,{value:N,onChange:e=>P(e.target.value),rows:5,className:`w-full rounded-md border bg-background px-3 py-2 font-mono text-xs focus:outline-none focus:ring-1 focus:ring-ring resize-y`,placeholder:`{ "key": "value" }`})]}),L&&(0,D.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(b,{className:`h-4 w-4 animate-spin mr-2`}),`Sending request...`]}),z&&!L&&(0,D.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-muted/30 border-b`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,D.jsx)(`span`,{className:`font-mono font-semibold ${$(z.status)}`,children:z.status||`ERR`}),(0,D.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1`,children:[(0,D.jsx)(f,{className:`h-3 w-3`}),z.duration,`ms`]})]}),(0,D.jsxs)(`button`,{type:`button`,onClick:fe,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[W?(0,D.jsx)(m,{className:`h-3 w-3`}):(0,D.jsx)(s,{className:`h-3 w-3`}),W?`Copied`:`Copy`]})]}),(0,D.jsx)(`pre`,{className:`flex-1 overflow-auto p-3 text-xs font-mono bg-muted/10 whitespace-pre-wrap break-all`,children:z.body})]}),!z&&!L&&(0,D.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:(0,D.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,D.jsx)(c,{className:`h-10 w-10 mx-auto opacity-20`}),(0,D.jsxs)(`p`,{children:[`Select an endpoint or type a URL and click `,(0,D.jsx)(`strong`,{children:`Send`})]}),(0,D.jsx)(`p`,{className:`text-xs opacity-60`,children:`All registered APIs are auto-discovered from the platform`})]})}),V.length>0&&(0,D.jsxs)(`div`,{className:`border-t`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,D.jsxs)(`h4`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:[`History (`,V.length,`)`]}),(0,D.jsxs)(`button`,{type:`button`,onClick:()=>H([]),className:`inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,D.jsx)(u,{className:`h-3 w-3`}),`Clear`]})]}),(0,D.jsx)(`div`,{className:`space-y-0.5 px-2 pb-2 max-h-60 overflow-auto`,children:V.map(e=>(0,D.jsxs)(`div`,{className:`rounded border`,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:()=>oe(U===e.id?null:e.id),className:`w-full flex items-center gap-2 px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors`,children:[U===e.id?(0,D.jsx)(h,{className:`h-3 w-3 shrink-0`}):(0,D.jsx)(v,{className:`h-3 w-3 shrink-0`}),(0,D.jsx)(l,{variant:`outline`,className:`font-mono text-[9px] shrink-0 ${O[e.method]||``}`,children:e.method}),(0,D.jsx)(`span`,{className:`font-mono truncate text-left flex-1`,children:e.url}),(0,D.jsx)(`span`,{className:`ml-auto shrink-0 font-mono ${$(e.status)}`,children:e.status}),(0,D.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[e.duration,`ms`]}),(0,D.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),de(e)},className:`shrink-0 p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors`,title:`Replay request`,children:(0,D.jsx)(g,{className:`h-2.5 w-2.5`})})]}),U===e.id&&(0,D.jsx)(`pre`,{className:`px-3 py-2 text-xs font-mono bg-muted/10 border-t overflow-auto max-h-40 whitespace-pre-wrap break-all`,children:e.response})]},e.id))})]})]})]})]})}export{A as ApiConsolePage};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{M as r,q as i}from"./framework-DFE_Mws9.js";import{Da as a,Er as o,Fs as s,Jo as c,Pr as l,Si as u,Tr as d,Us as f,aa as p,gc as m,hc as h,ka as g,ni as _,pc as v,va as y,vo as b,wr as ee}from"./ui-components-CMHDBJEm.js";import"./src-hcMLuWxG.js";var x=e(t(),1),S=[`plugin`,`plugins`,`kind`,`package`];function C(e){return[{method:`POST`,path:`${e}/sign-in/email`,desc:`Sign in (email)`,group:`Auth`,bodyTemplate:{email:`user@example.com`,password:``}},{method:`POST`,path:`${e}/sign-up/email`,desc:`Sign up (email)`,group:`Auth`,bodyTemplate:{email:``,password:``,name:``}},{method:`POST`,path:`${e}/sign-out`,desc:`Sign out`,group:`Auth`},{method:`GET`,path:`${e}/get-session`,desc:`Get session`,group:`Auth`}]}var w={ai:{group:`AI`,defaultRoute:`/api/v1/ai`,endpoints:[{method:`POST`,path:`/chat`,desc:`Chat completion (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`POST`,path:`/chat/stream`,desc:`Streaming chat (SSE)`,bodyTemplate:{messages:[{role:`user`,content:``}]}},{method:`POST`,path:`/complete`,desc:`Text completion`,bodyTemplate:{prompt:``}},{method:`GET`,path:`/models`,desc:`List available models`},{method:`GET`,path:`/status`,desc:`Active LLM adapter provenance`},{method:`GET`,path:`/effective-model`,desc:`Effective model ids and where they came from`},{method:`POST`,path:`/conversations`,desc:`Create conversation`,bodyTemplate:{}},{method:`GET`,path:`/conversations`,desc:`List conversations`},{method:`GET`,path:`/conversations/:id`,desc:`Get conversation with message history`},{method:`PATCH`,path:`/conversations/:id`,desc:`Update conversation (title, metadata)`,bodyTemplate:{title:``}},{method:`DELETE`,path:`/conversations/:id`,desc:`Delete conversation`},{method:`POST`,path:`/conversations/:id/messages`,desc:`Add message to conversation`,bodyTemplate:{role:`user`,content:``}},{method:`GET`,path:`/conversations/:id/debug`,desc:`Reconcile a build conversation: agent-claimed vs live metadata`},{method:`GET`,path:`/agents`,desc:`List active agents`},{method:`POST`,path:`/agents/:agentName/chat`,desc:`Chat with a named agent (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/assistant`,desc:`Resolve the default assistant and its active skills`},{method:`GET`,path:`/assistant/skills`,desc:`List active skills for a context`},{method:`POST`,path:`/assistant/chat`,desc:`Ambient chat — auto-resolves agent and skills (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/tools`,desc:`List registered AI tools`},{method:`POST`,path:`/tools/:toolName/execute`,desc:`Execute one tool directly (playground)`,bodyTemplate:{parameters:{}}},{method:`GET`,path:`/pending-actions`,desc:`List pending actions awaiting approval`},{method:`GET`,path:`/pending-actions/:id`,desc:`Get one pending action`},{method:`POST`,path:`/pending-actions/:id/approve`,desc:`Approve a pending action and execute it`,bodyTemplate:{}},{method:`POST`,path:`/pending-actions/:id/reject`,desc:`Reject a pending action`,bodyTemplate:{reason:``}},{method:`POST`,path:`/evals/runs`,desc:`Run an eval case — ai:admin, makes paid LLM calls`,bodyTemplate:{caseId:``}},{method:`GET`,path:`/usage`,desc:`AI quota headroom per meter (console usage indicator)`}]},realtime:{group:`Realtime`,defaultRoute:`/api/v1/realtime`,endpoints:[{method:`POST`,path:`/connect`,desc:`Establish realtime connection`,bodyTemplate:{transport:`websocket`}},{method:`POST`,path:`/disconnect`,desc:`Close realtime connection`,bodyTemplate:{connectionId:``}},{method:`POST`,path:`/subscribe`,desc:`Subscribe to channel`,bodyTemplate:{channel:``}},{method:`POST`,path:`/unsubscribe`,desc:`Unsubscribe from channel`,bodyTemplate:{channel:``}},{method:`PUT`,path:`/presence/:channel`,desc:`Set presence state`,bodyTemplate:{status:`online`}},{method:`GET`,path:`/presence/:channel`,desc:`Get channel presence`}]},notification:{group:`Notifications`,defaultRoute:`/api/v1/notifications`,endpoints:[{method:`GET`,path:``,desc:`List notifications`},{method:`POST`,path:`/devices`,desc:`Register device for push`,bodyTemplate:{token:``,platform:`web`}},{method:`DELETE`,path:`/devices/:deviceId`,desc:`Unregister device`},{method:`GET`,path:`/preferences`,desc:`Get notification preferences`},{method:`PATCH`,path:`/preferences`,desc:`Update notification preferences`,bodyTemplate:{email:!0,push:!0}},{method:`POST`,path:`/read`,desc:`Mark notifications as read`,bodyTemplate:{ids:[]}},{method:`POST`,path:`/read/all`,desc:`Mark all as read`}]},analytics:{group:`Analytics`,defaultRoute:`/api/v1/analytics`,endpoints:[{method:`POST`,path:`/query`,desc:`Execute analytics query`,bodyTemplate:{measures:[],dimensions:[]}},{method:`GET`,path:`/meta`,desc:`Get analytics metadata`}]},automation:{group:`Automation`,defaultRoute:`/api/v1/automation`,endpoints:[{method:`POST`,path:`/trigger`,desc:`Trigger automation`,bodyTemplate:{name:``,params:{}}}]},i18n:{group:`i18n`,defaultRoute:`/api/v1/i18n`,endpoints:[{method:`GET`,path:`/locales`,desc:`Get available locales`},{method:`GET`,path:`/translations/:locale`,desc:`Get translations for locale`},{method:`GET`,path:`/labels/:object/:locale`,desc:`Get translated field labels`}]},ui:{group:`UI`,defaultRoute:`/api/v1/ui`,endpoints:[{method:`GET`,path:`/views`,desc:`List views`},{method:`GET`,path:`/views/:id`,desc:`Get view by ID`},{method:`POST`,path:`/views`,desc:`Create view`,bodyTemplate:{name:``,object:``,type:`list`}},{method:`PATCH`,path:`/views/:id`,desc:`Update view`,bodyTemplate:{name:``}},{method:`DELETE`,path:`/views/:id`,desc:`Delete view`}]},"file-storage":{group:`Storage`,defaultRoute:`/api/v1/storage`,endpoints:[{method:`POST`,path:`/upload`,desc:`Upload file (multipart/form-data)`},{method:`GET`,path:`/:fileId`,desc:`Download file`},{method:`DELETE`,path:`/:fileId`,desc:`Delete file`}]}},T={"file-storage":`storage`};function E(e,t){let n=w[e];return n?n.endpoints.map(e=>({method:e.method,path:`${t}${e.path}`,desc:e.desc,group:n.group,...e.bodyTemplate?{bodyTemplate:e.bodyTemplate}:{}})):[]}function te(){let e=i(),[t,n]=(0,x.useState)([]),[a,o]=(0,x.useState)([]),[s,c]=(0,x.useState)(!0),[l,u]=(0,x.useState)(null),d=(0,x.useCallback)(async()=>{c(!0),u(null);let t=`/api/v1`,i=`${t}/discovery`,a=[{method:`GET`,path:i,desc:`API Discovery`,group:`System`},{method:`GET`,path:`${t}/meta/types`,desc:`List metadata types`,group:`Metadata`},{method:`GET`,path:`${t}/packages`,desc:`List packages`,group:`System`},{method:`GET`,path:`/api/v1/health`,desc:`Health check`,group:`System`}];try{let s=`/api/v1/auth`,c={},l={};try{let e=await fetch(i);if(e.ok){let t=await e.json(),n=t?.data??t;l=n?.routes??{},c=n?.services??{},l.auth&&(s=l.auth)}}catch{}let u=[];for(let[e,t]of Object.entries(w)){let n=T[e],i=(n?c[n]:void 0)??c[e],a=i?r(i):!1,o=i?.route??l[e]??t.defaultRoute;a&&u.push(...E(e,o))}let d=e?.getClient?.(),f=[];try{let e=await d?.meta?.getTypes?.();e&&Array.isArray(e.types)?f=e.types:Array.isArray(e)&&(f=e)}catch{}let p=[];try{let e=f.includes(`object`)?`object`:null;if(e&&d?.meta?.getItems){let t=await d.meta.getItems(e),n=[];Array.isArray(t)?n=t:t&&Array.isArray(t.items)?n=t.items:t&&Array.isArray(t.value)&&(n=t.value),p=n.map(e=>e.name||e.id).filter(Boolean)}}catch{}let m=p.flatMap(e=>{let n=e.startsWith(`sys_`)?`Data: system tables`:`Data: ${e}`;return[{method:`GET`,path:`${t}/data/${e}`,desc:`List ${e}`,group:n},{method:`POST`,path:`${t}/data/${e}`,desc:`Create ${e}`,group:n,bodyTemplate:{name:`example`}},{method:`GET`,path:`${t}/data/${e}/:id`,desc:`Get ${e} by ID`,group:n},{method:`PATCH`,path:`${t}/data/${e}/:id`,desc:`Update ${e}`,group:n,bodyTemplate:{name:`updated`}},{method:`DELETE`,path:`${t}/data/${e}/:id`,desc:`Delete ${e}`,group:n}]}),h=f.filter(e=>!S.includes(e)).map(e=>({method:`GET`,path:`${t}/meta/${e}`,desc:`List ${e} metadata`,group:`Metadata`})),g=p.map(e=>({method:`GET`,path:`${t}/meta/object/${e}`,desc:`${e} schema`,group:`Metadata`})),_=[...a,...C(s),...u,...h,...g,...m],v=new Map;for(let e of _){let t=v.get(e.group)||[];t.push(e),v.set(e.group,t)}let y=[`System`,`Auth`,`AI`,`Workflow`,`Realtime`,`Notifications`,`Analytics`,`Automation`,`i18n`,`UI`,`Feed`,`Storage`,`Metadata`],b=Array.from(v.entries()).sort(([e],[t])=>{let n=y.indexOf(e),r=y.indexOf(t);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.localeCompare(t):1:-1}).map(([e,t])=>({key:e,label:e,endpoints:t}));n(b),o(_)}catch(e){u(e.message||`Failed to discover APIs`)}finally{c(!1)}},[e]);return(0,x.useEffect)(()=>{d()},[d]),{groups:t,allEndpoints:a,loading:s,error:l,refresh:d}}var D=n(),O={GET:`text-emerald-600 bg-emerald-50 border-emerald-200 dark:text-emerald-400 dark:bg-emerald-950/50`,POST:`text-blue-600 bg-blue-50 border-blue-200 dark:text-blue-400 dark:bg-blue-950/50`,PATCH:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,PUT:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,DELETE:`text-red-600 bg-red-50 border-red-200 dark:text-red-400 dark:bg-red-950/50`},ne={2:`text-emerald-600 dark:text-emerald-400`,3:`text-blue-600 dark:text-blue-400`,4:`text-amber-600 dark:text-amber-400`,5:`text-red-600 dark:text-red-400`},re=[{key:`$top`,placeholder:`10`,hint:`limit`},{key:`$skip`,placeholder:`0`,hint:`offset`},{key:`$sort`,placeholder:`name`,hint:`sort field`},{key:`$select`,placeholder:`name,email`,hint:`fields`},{key:`$count`,placeholder:`true`,hint:`total count`},{key:`$filter`,placeholder:`status eq 'active'`,hint:`OData filter`}],k=1;function A(){let e=i()?.getClient?.(),{groups:t,loading:n,refresh:r}=te(),[S,C]=(0,x.useState)(``),[w,T]=(0,x.useState)(new Set),[E,A]=(0,x.useState)(null),[ie,j]=(0,x.useState)(``),[ae,M]=(0,x.useState)(``),[N,P]=(0,x.useState)(``),[F,I]=(0,x.useState)([]),[L,R]=(0,x.useState)(!1),[z,B]=(0,x.useState)(null),[V,H]=(0,x.useState)([]),[U,oe]=(0,x.useState)(null),[W,G]=(0,x.useState)(!1),K=(0,x.useMemo)(()=>{if(!S)return t;let e=S.toLowerCase();return t.map(t=>({...t,endpoints:t.endpoints.filter(t=>t.desc.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)||t.method.toLowerCase().includes(e))})).filter(e=>e.endpoints.length>0)},[t,S]),se=(0,x.useCallback)(e=>{T(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ce=(0,x.useCallback)(e=>{A(e),j(e.method),M(e.path),P(e.bodyTemplate?JSON.stringify(e.bodyTemplate,null,2):``),I([]),B(null)},[]),q=ie||E?.method||`GET`,J=ae||E?.path||``,Y=(0,x.useMemo)(()=>{let e=F.filter(e=>e.enabled&&e.key.trim());if(e.length===0)return J;let t=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${J}?${t}`},[J,F]),X=(0,x.useCallback)((e=``,t=``)=>{I(n=>[...n,{id:k++,key:e,value:t,enabled:!0}])},[]),le=(0,x.useCallback)(e=>{I(t=>t.filter(t=>t.id!==e))},[]),Z=(0,x.useCallback)((e,t,n)=>{I(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),ue=(0,x.useCallback)(e=>{I(t=>t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t))},[]),Q=(0,x.useCallback)(async()=>{if(L||!Y)return;let t=`${e?.baseUrl??``}${Y}`;R(!0);let n=performance.now();try{let e={method:q,headers:{"Content-Type":`application/json`}};[`POST`,`PATCH`,`PUT`].includes(q)&&N.trim()&&(e.body=N);let r=await fetch(t,e),i=Math.round(performance.now()-n),a;if((r.headers.get(`content-type`)??``).includes(`json`)){let e=await r.json();a=JSON.stringify(e,null,2)}else a=await r.text();let o={status:r.status,body:a,duration:i};B(o),H(e=>[{id:Date.now(),method:q,url:Y,body:N||void 0,status:r.status,duration:i,response:a,timestamp:new Date},...e].slice(0,50))}catch(e){let t=Math.round(performance.now()-n);B({status:0,body:`Network Error: ${e.message}`,duration:t})}finally{R(!1)}},[e,Y,q,N,L]),de=(0,x.useCallback)(e=>{j(e.method);let[t,n]=e.url.split(`?`);if(M(t),P(e.body||``),n){let e=new URLSearchParams(n),t=[];e.forEach((e,n)=>{t.push({id:k++,key:n,value:e,enabled:!0})}),I(t)}else I([]);B(null),A(null)},[]),fe=(0,x.useCallback)(()=>{z?.body&&(navigator.clipboard.writeText(z.body),G(!0),setTimeout(()=>G(!1),1500))},[z]),$=e=>ne[String(e)[0]]??`text-muted-foreground`;return(0,D.jsxs)(`div`,{className:`flex flex-1 min-h-0 overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`w-72 shrink-0 border-r flex flex-col overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-2`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`h3`,{className:`text-sm font-semibold text-foreground flex-1`,children:`API Endpoints`}),(0,D.jsx)(`button`,{type:`button`,onClick:r,disabled:n,className:`p-1 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground`,title:`Refresh endpoints`,children:(0,D.jsx)(y,{className:`h-3.5 w-3.5 ${n?`animate-spin`:``}`})})]}),(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(p,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,D.jsx)(`input`,{type:`text`,value:S,onChange:e=>C(e.target.value),placeholder:`Search endpoints...`,className:`w-full rounded-md border bg-background pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,D.jsx)(`div`,{className:`flex-1 overflow-auto p-2 space-y-1`,children:n?(0,D.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(b,{className:`h-4 w-4 animate-spin mr-2`}),`Discovering APIs...`]}):K.length===0?(0,D.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(c,{className:`h-6 w-6 opacity-30 mb-2`}),(0,D.jsx)(`span`,{children:S?`No matching endpoints`:`No endpoints found`})]}):K.map(e=>{let t=w.has(e.key)||!!S;return(0,D.jsxs)(ee,{open:t,onOpenChange:()=>se(e.key),children:[(0,D.jsx)(o,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,className:`w-full flex items-center gap-1.5 px-2 py-1.5 rounded-md text-xs font-medium text-muted-foreground hover:bg-muted/50 hover:text-foreground transition-colors`,children:[(0,D.jsx)(v,{className:`h-3 w-3 shrink-0 transition-transform duration-200 ${t?`rotate-90`:``}`}),(0,D.jsx)(`span`,{className:`flex-1 text-left truncate`,children:e.label}),(0,D.jsx)(`span`,{className:`shrink-0 text-[10px] tabular-nums opacity-60`,children:e.endpoints.length})]})}),(0,D.jsx)(d,{children:(0,D.jsx)(`div`,{className:`ml-3 space-y-0.5 mt-0.5`,children:e.endpoints.map((e,t)=>(0,D.jsxs)(`button`,{type:`button`,onClick:()=>ce(e),className:`w-full text-left flex items-center gap-1.5 px-2 py-1 rounded text-xs transition-colors ${E===e?`bg-accent text-accent-foreground`:`hover:bg-muted/50 text-muted-foreground hover:text-foreground`}`,children:[(0,D.jsx)(l,{variant:`outline`,className:`font-mono text-[9px] shrink-0 px-1 py-0 ${O[e.method]||``}`,children:e.method}),(0,D.jsx)(`span`,{className:`truncate`,children:e.desc})]},`${e.method}-${e.path}-${t}`))})})]},e.key)})}),(0,D.jsxs)(`div`,{className:`p-3 border-t space-y-2`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(`h4`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:`Query Parameters`}),(0,D.jsxs)(`button`,{type:`button`,onClick:()=>X(),className:`inline-flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,D.jsx)(a,{className:`h-3 w-3`}),`Add`]})]}),(0,D.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:re.map(e=>(0,D.jsx)(`button`,{type:`button`,onClick:()=>X(e.key,``),className:`text-[10px] px-1.5 py-0.5 rounded border bg-muted/30 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors font-mono`,title:e.hint,children:e.key},e.key))}),F.length>0&&(0,D.jsx)(`div`,{className:`space-y-1`,children:F.map(e=>(0,D.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,D.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:()=>ue(e.id),className:`h-3 w-3 shrink-0 rounded border accent-primary`}),(0,D.jsx)(`input`,{type:`text`,value:e.key,onChange:t=>Z(e.id,`key`,t.target.value),placeholder:`key`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,D.jsx)(`input`,{type:`text`,value:e.value,onChange:t=>Z(e.id,`value`,t.target.value),placeholder:`value`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>le(e.id),className:`shrink-0 p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors`,children:(0,D.jsx)(_,{className:`h-3 w-3`})})]},e.id))})]})]}),(0,D.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`select`,{value:q,onChange:e=>j(e.target.value),className:`rounded-md border bg-background px-2 py-1.5 font-mono text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${O[q]||``}`,children:[`GET`,`POST`,`PATCH`,`PUT`,`DELETE`].map(e=>(0,D.jsx)(`option`,{value:e,children:e},e))}),(0,D.jsx)(`input`,{type:`text`,value:J,onChange:e=>M(e.target.value),className:`flex-1 rounded-md border bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-1 focus:ring-ring`,placeholder:`/api/v1/...`,onKeyDown:e=>{e.key===`Enter`&&Q()}}),(0,D.jsxs)(`button`,{type:`button`,onClick:Q,disabled:L||!Y,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors`,children:[L?(0,D.jsx)(b,{className:`h-3.5 w-3.5 animate-spin`}):(0,D.jsx)(g,{className:`h-3.5 w-3.5`}),`Send`]})]}),F.some(e=>e.enabled&&e.key.trim())&&(0,D.jsxs)(`div`,{className:`text-[10px] font-mono text-muted-foreground truncate pl-1`,children:[`→ `,Y]})]}),(0,D.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 overflow-auto`,children:[[`POST`,`PATCH`,`PUT`].includes(q)&&(0,D.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,D.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Request Body (JSON)`}),(0,D.jsx)(`textarea`,{value:N,onChange:e=>P(e.target.value),rows:5,className:`w-full rounded-md border bg-background px-3 py-2 font-mono text-xs focus:outline-none focus:ring-1 focus:ring-ring resize-y`,placeholder:`{ "key": "value" }`})]}),L&&(0,D.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,D.jsx)(b,{className:`h-4 w-4 animate-spin mr-2`}),`Sending request...`]}),z&&!L&&(0,D.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-muted/30 border-b`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,D.jsx)(`span`,{className:`font-mono font-semibold ${$(z.status)}`,children:z.status||`ERR`}),(0,D.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1`,children:[(0,D.jsx)(f,{className:`h-3 w-3`}),z.duration,`ms`]})]}),(0,D.jsxs)(`button`,{type:`button`,onClick:fe,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[W?(0,D.jsx)(m,{className:`h-3 w-3`}):(0,D.jsx)(s,{className:`h-3 w-3`}),W?`Copied`:`Copy`]})]}),(0,D.jsx)(`pre`,{className:`flex-1 overflow-auto p-3 text-xs font-mono bg-muted/10 whitespace-pre-wrap break-all`,children:z.body})]}),!z&&!L&&(0,D.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:(0,D.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,D.jsx)(c,{className:`h-10 w-10 mx-auto opacity-20`}),(0,D.jsxs)(`p`,{children:[`Select an endpoint or type a URL and click `,(0,D.jsx)(`strong`,{children:`Send`})]}),(0,D.jsx)(`p`,{className:`text-xs opacity-60`,children:`All registered APIs are auto-discovered from the platform`})]})}),V.length>0&&(0,D.jsxs)(`div`,{className:`border-t`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,D.jsxs)(`h4`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:[`History (`,V.length,`)`]}),(0,D.jsxs)(`button`,{type:`button`,onClick:()=>H([]),className:`inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,D.jsx)(u,{className:`h-3 w-3`}),`Clear`]})]}),(0,D.jsx)(`div`,{className:`space-y-0.5 px-2 pb-2 max-h-60 overflow-auto`,children:V.map(e=>(0,D.jsxs)(`div`,{className:`rounded border`,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:()=>oe(U===e.id?null:e.id),className:`w-full flex items-center gap-2 px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors`,children:[U===e.id?(0,D.jsx)(h,{className:`h-3 w-3 shrink-0`}):(0,D.jsx)(v,{className:`h-3 w-3 shrink-0`}),(0,D.jsx)(l,{variant:`outline`,className:`font-mono text-[9px] shrink-0 ${O[e.method]||``}`,children:e.method}),(0,D.jsx)(`span`,{className:`font-mono truncate text-left flex-1`,children:e.url}),(0,D.jsx)(`span`,{className:`ml-auto shrink-0 font-mono ${$(e.status)}`,children:e.status}),(0,D.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[e.duration,`ms`]}),(0,D.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),de(e)},className:`shrink-0 p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors`,title:`Replay request`,children:(0,D.jsx)(g,{className:`h-2.5 w-2.5`})})]}),U===e.id&&(0,D.jsx)(`pre`,{className:`px-3 py-2 text-xs font-mono bg-muted/10 border-t overflow-auto max-h-40 whitespace-pre-wrap break-all`,children:e.response})]},e.id))})]})]})]})]})}export{A as ApiConsolePage};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,b as n,h as r,r as i,s as a}from"./vendor-react-CsWFRkED.js";import{Rc as o,vo as s}from"./ui-components-D2lrjG-t.js";import{t as c}from"./DocShell-Ipy_IDvh.js";import{a as l,c as u,n as d}from"./use-book-data-qUZAxIs0.js";var f=e(n(),1),p=i();function m(){let{appName:e}=r(),{books:n,docs:i,state:m}=d(),h=(0,f.useMemo)(()=>n.filter(t=>u(t)===e),[n,e]),g=(0,f.useMemo)(()=>l(h,i),[h,i]);return m===`loading`?(0,p.jsx)(`div`,{className:`flex h-full items-center justify-center p-10 text-muted-foreground`,children:(0,p.jsx)(s,{className:`h-5 w-5 animate-spin`,"aria-label":`Loading documentation`})}):g.length===1?(0,p.jsx)(a,{to:`/apps/${e}/docs/${g[0].slug}`,replace:!0}):(0,p.jsx)(c,{children:(0,p.jsx)(`div`,{className:`mx-auto max-w-3xl p-4 sm:p-6`,children:g.length===0?(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-16 text-center text-muted-foreground`,children:[(0,p.jsx)(o,{className:`h-10 w-10`}),(0,p.jsx)(`p`,{className:`text-sm`,children:`This app does not ship any documentation yet.`}),(0,p.jsx)(t,{to:`/docs`,className:`text-sm font-medium text-primary hover:underline`,children:`Browse all documentation`})]}):(0,p.jsx)(`ul`,{className:`grid gap-3 sm:grid-cols-2`,children:g.map(n=>(0,p.jsx)(`li`,{children:(0,p.jsxs)(t,{to:`/apps/${e}/docs/${n.slug}`,className:`flex h-full items-start gap-3 rounded-md border border-border p-3 hover:bg-muted/50`,children:[(0,p.jsx)(o,{className:`mt-0.5 h-5 w-5 shrink-0 text-muted-foreground`}),(0,p.jsxs)(`div`,{className:`min-w-0`,children:[(0,p.jsx)(`div`,{className:`text-sm font-semibold`,children:n.label}),n.description?(0,p.jsx)(`div`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:n.description}):n.subtitle?(0,p.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-[11px] text-muted-foreground/70`,children:n.subtitle}):null,(0,p.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground/80`,children:[n.docCount,` `,n.docCount===1?`article`:`articles`]})]})]})},n.name))})})})}export{m as default};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,b as n,h as r,r as i,s as a}from"./vendor-react-CsWFRkED.js";import{Rc as o,vo as s}from"./ui-components-CMHDBJEm.js";import{t as c}from"./DocShell-D4dSPfBz.js";import{a as l,c as u,n as d}from"./use-book-data-CM73PGvc.js";var f=e(n(),1),p=i();function m(){let{appName:e}=r(),{books:n,docs:i,state:m}=d(),h=(0,f.useMemo)(()=>n.filter(t=>u(t)===e),[n,e]),g=(0,f.useMemo)(()=>l(h,i),[h,i]);return m===`loading`?(0,p.jsx)(`div`,{className:`flex h-full items-center justify-center p-10 text-muted-foreground`,children:(0,p.jsx)(s,{className:`h-5 w-5 animate-spin`,"aria-label":`Loading documentation`})}):g.length===1?(0,p.jsx)(a,{to:`/apps/${e}/docs/${g[0].slug}`,replace:!0}):(0,p.jsx)(c,{children:(0,p.jsx)(`div`,{className:`mx-auto max-w-3xl p-4 sm:p-6`,children:g.length===0?(0,p.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-16 text-center text-muted-foreground`,children:[(0,p.jsx)(o,{className:`h-10 w-10`}),(0,p.jsx)(`p`,{className:`text-sm`,children:`This app does not ship any documentation yet.`}),(0,p.jsx)(t,{to:`/docs`,className:`text-sm font-medium text-primary hover:underline`,children:`Browse all documentation`})]}):(0,p.jsx)(`ul`,{className:`grid gap-3 sm:grid-cols-2`,children:g.map(n=>(0,p.jsx)(`li`,{children:(0,p.jsxs)(t,{to:`/apps/${e}/docs/${n.slug}`,className:`flex h-full items-start gap-3 rounded-md border border-border p-3 hover:bg-muted/50`,children:[(0,p.jsx)(o,{className:`mt-0.5 h-5 w-5 shrink-0 text-muted-foreground`}),(0,p.jsxs)(`div`,{className:`min-w-0`,children:[(0,p.jsx)(`div`,{className:`text-sm font-semibold`,children:n.label}),n.description?(0,p.jsx)(`div`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:n.description}):n.subtitle?(0,p.jsx)(`div`,{className:`mt-0.5 truncate font-mono text-[11px] text-muted-foreground/70`,children:n.subtitle}):null,(0,p.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground/80`,children:[n.docCount,` `,n.docCount===1?`article`:`articles`]})]})]})},n.name))})})})}export{m as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,h as n,p as r,r as i}from"./vendor-react-CsWFRkED.js";import{J as a,q as o}from"./framework-BfSv4Kb0.js";import{y as s}from"./i18n-locales-Bz4c8KXc.js";import{Ci as c,Da as l,Do as u,Dr as d,In as f,Ki as p,Or as m,Pa as h,Pr as g,Ri as _,Si as v,Xr as y,aa as b,kr as x,wi as S,ws as C}from"./ui-components-D2lrjG-t.js";import{r as w}from"./vendor-ui-utils-BFw4cGI6.js";import"./src-JX1BkhmR.js";var T=e(t(),1);function E(e,t){if(e!=null){if(typeof e==`string`)return e;if(t){let n=t(e.key,{defaultValue:e.defaultValue,...e.params});if(n&&n!==e.key)return n}return e.defaultValue||e.key}}var D=i();function O(e,t){return(e instanceof Error?e.message:String(e??``))||t}function k(){let{t:e}=s(),t=r(),{appName:i}=n(),k=i?`/apps/${i}`:``,{apps:A,refresh:j}=a(),M=o(),N=(0,T.useCallback)(()=>M?.getClient?.()?.meta??null,[M]),P=e(`appManagement.toast.unknownError`,{defaultValue:`unknown error`}),F=(0,T.useCallback)(t=>E(t?.label,e)||t?.name||``,[e]),[I,L]=(0,T.useState)(``),[R,z]=(0,T.useState)(new Set),[B,V]=(0,T.useState)(null),[H,U]=(0,T.useState)(!1),W=(A||[]).filter(t=>{if(!I)return!0;let n=I.toLowerCase();return(t.name||``).toLowerCase().includes(n)||F(t).toLowerCase().includes(n)||(E(t.description,e)||``).toLowerCase().includes(n)}),G=(0,T.useCallback)(e=>{z(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),K=(0,T.useCallback)(()=>{R.size===W.length?z(new Set):z(new Set(W.map(e=>e.name)))},[R.size,W]),q=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=t.active===!1;await n.saveItem(`app`,t.name,{...t,active:r}),w.success(r?e(`appManagement.toast.appEnabled`,{defaultValue:`{{name}} enabled`,name:F(t)}):e(`appManagement.toast.appDisabled`,{defaultValue:`{{name}} disabled`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.toggleFailed`,{defaultValue:`Failed to toggle app status: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[j,N,e,F,P]),J=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=(A||[]).filter(e=>e?.isDefault===!0&&e.name!==t.name);for(let e of r)await n.saveItem(`app`,e.name,{...e,isDefault:!1});await n.saveItem(`app`,t.name,{...t,isDefault:!0}),w.success(e(`appManagement.toast.setDefaultDone`,{defaultValue:`{{name}} set as default`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.setDefaultFailed`,{defaultValue:`Failed to set default app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,j,N,e,F,P]),Y=(0,T.useCallback)(async t=>{if(B!==t.name){V(t.name);return}let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{await n.deleteItem(`app`,t.name),w.success(e(`appManagement.toast.appDeleted`,{defaultValue:`{{name}} deleted`,name:F(t)})),V(null),await j()}catch(t){w.error(e(`appManagement.toast.deleteFailed`,{defaultValue:`Failed to delete app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[B,j,N,e,F,P]),X=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);let r=0,i=[];try{let a=new Map((A||[]).map(e=>[e?.name,e]));for(let o of R){let s=a.get(o);if(s)try{await n.saveItem(`app`,o,{...s,active:t}),r+=1}catch(t){i.push(e(`appManagement.toast.bulkFailureEntry`,{defaultValue:`{{name}} ({{reason}})`,name:F(s),reason:O(t,P)}))}}if(r>0&&(w.success(t?e(`appManagement.toast.bulkEnabled`,{defaultValue:`{{n}} apps enabled`,n:r}):e(`appManagement.toast.bulkDisabled`,{defaultValue:`{{n}} apps disabled`,n:r})),z(new Set)),i.length>0){let t=e(`appManagement.toast.bulkFailureJoiner`,{defaultValue:`; `});w.error(e(`appManagement.toast.bulkFailed`,{defaultValue:`Failed for {{n}}: {{details}}`,n:i.length,details:i.join(t)}))}await j()}catch(t){w.error(e(`appManagement.toast.bulkOperationFailed`,{defaultValue:`Bulk operation failed: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,R,j,N,e,F,P]);return(0,D.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,D.jsxs)(`div`,{className:`min-w-0`,children:[(0,D.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:e(`appManagement.title`,{defaultValue:`Applications`})}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e(`appManagement.subtitle`,{defaultValue:`Manage all configured applications`})})]}),(0,D.jsxs)(y,{onClick:()=>t(`${k}/create-app`),"data-testid":`create-app-btn`,children:[(0,D.jsx)(l,{className:`h-4 w-4 mr-2`}),e(`appManagement.newApp`,{defaultValue:`New App`})]})]}),(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[(0,D.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,D.jsx)(`label`,{htmlFor:`app-search`,className:`sr-only`,children:e(`appManagement.searchLabel`,{defaultValue:`Search apps`})}),(0,D.jsx)(b,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`}),(0,D.jsx)(f,{id:`app-search`,placeholder:e(`appManagement.searchPlaceholder`,{defaultValue:`Search apps…`}),value:I,onChange:e=>L(e.target.value),className:`pl-8`,"data-testid":`app-search-input`})]}),R.size>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(g,{variant:`secondary`,children:e(`appManagement.selectedCount`,{defaultValue:`{{n}} selected`,n:R.size})}),(0,D.jsx)(y,{variant:`outline`,size:`sm`,onClick:()=>X(!0),disabled:H,children:e(`appManagement.bulkEnable`,{defaultValue:`Enable`})}),(0,D.jsx)(y,{variant:`outline`,size:`sm`,onClick:()=>X(!1),disabled:H,children:e(`appManagement.bulkDisable`,{defaultValue:`Disable`})})]})]}),W.length>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,D.jsx)(d,{id:`select-all-apps`,checked:R.size===W.length&&W.length>0,onCheckedChange:()=>K()}),(0,D.jsx)(`label`,{htmlFor:`select-all-apps`,className:`cursor-pointer`,children:e(`appManagement.selectAll`,{defaultValue:`Select all ({{n}})`,n:W.length})})]}),W.length===0?(0,D.jsxs)(`div`,{className:`text-center py-12 text-muted-foreground`,"data-testid":`no-apps-message`,children:[(0,D.jsx)(u,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,D.jsx)(`p`,{children:e(`appManagement.empty`,{defaultValue:`No apps found.`})})]}):(0,D.jsx)(`div`,{className:`grid gap-3`,children:W.map(n=>{let r=n.active!==!1,i=n.isDefault===!0,a=B===n.name,o=F(n);return(0,D.jsx)(m,{className:r?``:`opacity-60`,"data-testid":`app-card-${n.name}`,children:(0,D.jsxs)(x,{className:`flex items-center gap-3 py-3 px-4`,children:[(0,D.jsx)(d,{id:`select-app-${n.name}`,checked:R.has(n.name),onCheckedChange:()=>G(n.name),"aria-label":e(`appManagement.selectApp`,{defaultValue:`Select {{name}}`,name:o}),className:`shrink-0`}),(0,D.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,D.jsx)(u,{className:`h-4 w-4`})}),(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`span`,{className:`font-medium truncate`,children:o}),i&&(0,D.jsx)(g,{variant:`default`,className:`text-xs`,children:e(`appManagement.defaultBadge`,{defaultValue:`Default`})}),(0,D.jsx)(g,{variant:r?`secondary`:`outline`,className:`text-xs`,children:r?e(`appManagement.active`,{defaultValue:`Active`}):e(`appManagement.inactive`,{defaultValue:`Inactive`})})]}),n.description&&(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:E(n.description,e)})]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.openApp`,{defaultValue:`Open app`}),"aria-label":e(`appManagement.openAppNamed`,{defaultValue:`Open {{name}}`,name:o}),onClick:()=>t(`/apps/${n._packageId??n.name}`),children:(0,D.jsx)(C,{className:`h-4 w-4`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.editApp`,{defaultValue:`Edit app`}),"aria-label":e(`appManagement.editAppNamed`,{defaultValue:`Edit {{name}}`,name:o}),onClick:()=>t(`${k}/edit-app/${n.name}`),children:(0,D.jsx)(h,{className:`h-4 w-4`})}),n._packageId?(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.editWithAi`,{defaultValue:`Edit with AI`}),"aria-label":e(`appManagement.editWithAiNamed`,{defaultValue:`Edit {{name}} with AI`,name:o}),onClick:()=>t(`/ai/build?package=${encodeURIComponent(n._packageId)}&new=1`),children:(0,D.jsx)(p,{className:`h-4 w-4`})}):null,(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:r?e(`appManagement.disableApp`,{defaultValue:`Disable app`}):e(`appManagement.enableApp`,{defaultValue:`Enable app`}),"aria-label":r?e(`appManagement.disableAppNamed`,{defaultValue:`Disable {{name}}`,name:o}):e(`appManagement.enableAppNamed`,{defaultValue:`Enable {{name}}`,name:o}),onClick:()=>q(n),disabled:H,children:r?(0,D.jsx)(c,{className:`h-4 w-4`}):(0,D.jsx)(S,{className:`h-4 w-4`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.setDefault`,{defaultValue:`Set as default`}),"aria-label":e(`appManagement.setDefaultNamed`,{defaultValue:`Set {{name}} as default`,name:o}),onClick:()=>J(n),disabled:H||i,children:(0,D.jsx)(_,{className:`h-4 w-4 ${i?`fill-current text-yellow-500`:``}`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:a?e(`appManagement.confirmDelete`,{defaultValue:`Click again to confirm delete`}):e(`appManagement.deleteApp`,{defaultValue:`Delete app`}),"aria-label":a?e(`appManagement.confirmDeleteNamed`,{defaultValue:`Confirm delete {{name}}`,name:o}):e(`appManagement.deleteAppNamed`,{defaultValue:`Delete {{name}}`,name:o}),onClick:()=>Y(n),disabled:H,className:a?`text-destructive`:``,children:(0,D.jsx)(v,{className:`h-4 w-4`})})]})]})},n.name)})})]})}export{k as AppManagementPage};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,h as n,p as r,r as i}from"./vendor-react-CsWFRkED.js";import{J as a,q as o}from"./framework-DFE_Mws9.js";import{y as s}from"./i18n-locales-BBA090ve.js";import{Ci as c,Da as l,Do as u,Dr as d,In as f,Ki as p,Or as m,Pa as h,Pr as g,Ri as _,Si as v,Xr as y,aa as b,kr as x,wi as S,ws as C}from"./ui-components-CMHDBJEm.js";import{r as w}from"./vendor-ui-utils-BFw4cGI6.js";import"./src-hcMLuWxG.js";var T=e(t(),1);function E(e,t){if(e!=null){if(typeof e==`string`)return e;if(t){let n=t(e.key,{defaultValue:e.defaultValue,...e.params});if(n&&n!==e.key)return n}return e.defaultValue||e.key}}var D=i();function O(e,t){return(e instanceof Error?e.message:String(e??``))||t}function k(){let{t:e}=s(),t=r(),{appName:i}=n(),k=i?`/apps/${i}`:``,{apps:A,refresh:j}=a(),M=o(),N=(0,T.useCallback)(()=>M?.getClient?.()?.meta??null,[M]),P=e(`appManagement.toast.unknownError`,{defaultValue:`unknown error`}),F=(0,T.useCallback)(t=>E(t?.label,e)||t?.name||``,[e]),[I,L]=(0,T.useState)(``),[R,z]=(0,T.useState)(new Set),[B,V]=(0,T.useState)(null),[H,U]=(0,T.useState)(!1),W=(A||[]).filter(t=>{if(!I)return!0;let n=I.toLowerCase();return(t.name||``).toLowerCase().includes(n)||F(t).toLowerCase().includes(n)||(E(t.description,e)||``).toLowerCase().includes(n)}),G=(0,T.useCallback)(e=>{z(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),K=(0,T.useCallback)(()=>{R.size===W.length?z(new Set):z(new Set(W.map(e=>e.name)))},[R.size,W]),q=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=t.active===!1;await n.saveItem(`app`,t.name,{...t,active:r}),w.success(r?e(`appManagement.toast.appEnabled`,{defaultValue:`{{name}} enabled`,name:F(t)}):e(`appManagement.toast.appDisabled`,{defaultValue:`{{name}} disabled`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.toggleFailed`,{defaultValue:`Failed to toggle app status: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[j,N,e,F,P]),J=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=(A||[]).filter(e=>e?.isDefault===!0&&e.name!==t.name);for(let e of r)await n.saveItem(`app`,e.name,{...e,isDefault:!1});await n.saveItem(`app`,t.name,{...t,isDefault:!0}),w.success(e(`appManagement.toast.setDefaultDone`,{defaultValue:`{{name}} set as default`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.setDefaultFailed`,{defaultValue:`Failed to set default app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,j,N,e,F,P]),Y=(0,T.useCallback)(async t=>{if(B!==t.name){V(t.name);return}let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{await n.deleteItem(`app`,t.name),w.success(e(`appManagement.toast.appDeleted`,{defaultValue:`{{name}} deleted`,name:F(t)})),V(null),await j()}catch(t){w.error(e(`appManagement.toast.deleteFailed`,{defaultValue:`Failed to delete app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[B,j,N,e,F,P]),X=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);let r=0,i=[];try{let a=new Map((A||[]).map(e=>[e?.name,e]));for(let o of R){let s=a.get(o);if(s)try{await n.saveItem(`app`,o,{...s,active:t}),r+=1}catch(t){i.push(e(`appManagement.toast.bulkFailureEntry`,{defaultValue:`{{name}} ({{reason}})`,name:F(s),reason:O(t,P)}))}}if(r>0&&(w.success(t?e(`appManagement.toast.bulkEnabled`,{defaultValue:`{{n}} apps enabled`,n:r}):e(`appManagement.toast.bulkDisabled`,{defaultValue:`{{n}} apps disabled`,n:r})),z(new Set)),i.length>0){let t=e(`appManagement.toast.bulkFailureJoiner`,{defaultValue:`; `});w.error(e(`appManagement.toast.bulkFailed`,{defaultValue:`Failed for {{n}}: {{details}}`,n:i.length,details:i.join(t)}))}await j()}catch(t){w.error(e(`appManagement.toast.bulkOperationFailed`,{defaultValue:`Bulk operation failed: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,R,j,N,e,F,P]);return(0,D.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,D.jsxs)(`div`,{className:`min-w-0`,children:[(0,D.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:e(`appManagement.title`,{defaultValue:`Applications`})}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e(`appManagement.subtitle`,{defaultValue:`Manage all configured applications`})})]}),(0,D.jsxs)(y,{onClick:()=>t(`${k}/create-app`),"data-testid":`create-app-btn`,children:[(0,D.jsx)(l,{className:`h-4 w-4 mr-2`}),e(`appManagement.newApp`,{defaultValue:`New App`})]})]}),(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[(0,D.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,D.jsx)(`label`,{htmlFor:`app-search`,className:`sr-only`,children:e(`appManagement.searchLabel`,{defaultValue:`Search apps`})}),(0,D.jsx)(b,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`}),(0,D.jsx)(f,{id:`app-search`,placeholder:e(`appManagement.searchPlaceholder`,{defaultValue:`Search apps…`}),value:I,onChange:e=>L(e.target.value),className:`pl-8`,"data-testid":`app-search-input`})]}),R.size>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(g,{variant:`secondary`,children:e(`appManagement.selectedCount`,{defaultValue:`{{n}} selected`,n:R.size})}),(0,D.jsx)(y,{variant:`outline`,size:`sm`,onClick:()=>X(!0),disabled:H,children:e(`appManagement.bulkEnable`,{defaultValue:`Enable`})}),(0,D.jsx)(y,{variant:`outline`,size:`sm`,onClick:()=>X(!1),disabled:H,children:e(`appManagement.bulkDisable`,{defaultValue:`Disable`})})]})]}),W.length>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,D.jsx)(d,{id:`select-all-apps`,checked:R.size===W.length&&W.length>0,onCheckedChange:()=>K()}),(0,D.jsx)(`label`,{htmlFor:`select-all-apps`,className:`cursor-pointer`,children:e(`appManagement.selectAll`,{defaultValue:`Select all ({{n}})`,n:W.length})})]}),W.length===0?(0,D.jsxs)(`div`,{className:`text-center py-12 text-muted-foreground`,"data-testid":`no-apps-message`,children:[(0,D.jsx)(u,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,D.jsx)(`p`,{children:e(`appManagement.empty`,{defaultValue:`No apps found.`})})]}):(0,D.jsx)(`div`,{className:`grid gap-3`,children:W.map(n=>{let r=n.active!==!1,i=n.isDefault===!0,a=B===n.name,o=F(n);return(0,D.jsx)(m,{className:r?``:`opacity-60`,"data-testid":`app-card-${n.name}`,children:(0,D.jsxs)(x,{className:`flex items-center gap-3 py-3 px-4`,children:[(0,D.jsx)(d,{id:`select-app-${n.name}`,checked:R.has(n.name),onCheckedChange:()=>G(n.name),"aria-label":e(`appManagement.selectApp`,{defaultValue:`Select {{name}}`,name:o}),className:`shrink-0`}),(0,D.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,D.jsx)(u,{className:`h-4 w-4`})}),(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`span`,{className:`font-medium truncate`,children:o}),i&&(0,D.jsx)(g,{variant:`default`,className:`text-xs`,children:e(`appManagement.defaultBadge`,{defaultValue:`Default`})}),(0,D.jsx)(g,{variant:r?`secondary`:`outline`,className:`text-xs`,children:r?e(`appManagement.active`,{defaultValue:`Active`}):e(`appManagement.inactive`,{defaultValue:`Inactive`})})]}),n.description&&(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:E(n.description,e)})]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.openApp`,{defaultValue:`Open app`}),"aria-label":e(`appManagement.openAppNamed`,{defaultValue:`Open {{name}}`,name:o}),onClick:()=>t(`/apps/${n._packageId??n.name}`),children:(0,D.jsx)(C,{className:`h-4 w-4`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.editApp`,{defaultValue:`Edit app`}),"aria-label":e(`appManagement.editAppNamed`,{defaultValue:`Edit {{name}}`,name:o}),onClick:()=>t(`${k}/edit-app/${n.name}`),children:(0,D.jsx)(h,{className:`h-4 w-4`})}),n._packageId?(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.editWithAi`,{defaultValue:`Edit with AI`}),"aria-label":e(`appManagement.editWithAiNamed`,{defaultValue:`Edit {{name}} with AI`,name:o}),onClick:()=>t(`/ai/build?package=${encodeURIComponent(n._packageId)}&new=1`),children:(0,D.jsx)(p,{className:`h-4 w-4`})}):null,(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:r?e(`appManagement.disableApp`,{defaultValue:`Disable app`}):e(`appManagement.enableApp`,{defaultValue:`Enable app`}),"aria-label":r?e(`appManagement.disableAppNamed`,{defaultValue:`Disable {{name}}`,name:o}):e(`appManagement.enableAppNamed`,{defaultValue:`Enable {{name}}`,name:o}),onClick:()=>q(n),disabled:H,children:r?(0,D.jsx)(c,{className:`h-4 w-4`}):(0,D.jsx)(S,{className:`h-4 w-4`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:e(`appManagement.setDefault`,{defaultValue:`Set as default`}),"aria-label":e(`appManagement.setDefaultNamed`,{defaultValue:`Set {{name}} as default`,name:o}),onClick:()=>J(n),disabled:H||i,children:(0,D.jsx)(_,{className:`h-4 w-4 ${i?`fill-current text-yellow-500`:``}`})}),(0,D.jsx)(y,{variant:`ghost`,size:`icon`,title:a?e(`appManagement.confirmDelete`,{defaultValue:`Click again to confirm delete`}):e(`appManagement.deleteApp`,{defaultValue:`Delete app`}),"aria-label":a?e(`appManagement.confirmDeleteNamed`,{defaultValue:`Confirm delete {{name}}`,name:o}):e(`appManagement.deleteAppNamed`,{defaultValue:`Delete {{name}}`,name:o}),onClick:()=>Y(n),disabled:H,className:a?`text-destructive`:``,children:(0,D.jsx)(v,{className:`h-4 w-4`})})]})]})},n.name)})})]})}export{k as AppManagementPage};