@protobase/ui 0.121.11 → 0.121.13
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.
- package/dist/account/messages.d.ts +2 -2
- package/dist/activity-chart/messages.d.ts +2 -2
- package/dist/app/app.js +3 -2
- package/dist/app/change-confirm/messages.d.ts +2 -2
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/conversation/message-composer.d.ts +5 -1
- package/dist/app/conversation/message-composer.js +10 -3
- package/dist/app/conversation-page/conversation-header.js +1 -1
- package/dist/app/conversation-page/conversation-message.js +1 -1
- package/dist/app/conversation-page/conversation-messages.js +1 -1
- package/dist/app/conversation-page/conversation-page.d.ts +5 -4
- package/dist/app/conversation-page/conversation-page.js +22 -6
- package/dist/app/conversation-page/message-editor.js +1 -1
- package/dist/app/conversation-page/message-ops.d.ts +3 -1
- package/dist/app/conversation-page/message-ops.js +7 -1
- package/dist/app/conversation-page/messages.d.ts +2 -2
- package/dist/app/conversation-page/reply-labels.js +1 -1
- package/dist/app/conversation-page/thread-panel.js +1 -1
- package/dist/app/conversation-page/use-message-writes.js +1 -1
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/custom-section.d.ts +1 -1
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/list-cards.d.ts +1 -1
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
- package/dist/app/field-types/runner-install/messages.d.ts +2 -2
- package/dist/app/field-types/widget-part.d.ts +1 -1
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/file-viewers/messages.d.ts +2 -2
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/history/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/list-edit/messages.d.ts +2 -2
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/new-version/messages.d.ts +2 -2
- package/dist/app/pages/custom-boundary.d.ts +1 -1
- package/dist/app/pages/custom-chosen.d.ts +1 -1
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/related-cards/messages.d.ts +2 -2
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/saved/saved-list.d.ts +1 -1
- package/dist/app/saved/use-favorite.d.ts +1 -1
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/searches/use-save-search.d.ts +1 -1
- package/dist/app/use-nav-recent.d.ts +2 -2
- package/dist/app/use-nav-recent.js +5 -4
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/nav.d.ts +5 -3
- package/dist/app-shell/record-marks.d.ts +1 -1
- package/dist/app-shell/record-marks.js +5 -3
- package/dist/app-shell/sidebar-records.d.ts +1 -1
- package/dist/app-shell/sidebar-records.js +6 -1
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/composer.d.ts +3 -1
- package/dist/chat/composer.js +6 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data/api-provider.d.ts +33 -0
- package/dist/data/meta-data.d.ts +4 -0
- package/dist/data/use-live-updates.d.ts +5 -2
- package/dist/data/use-live-updates.js +25 -3
- package/dist/data/use-meta.js +1 -0
- package/dist/data-grid/column-spec.d.ts +1 -1
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/format/messages.d.ts +2 -2
- package/dist/forms/messages.d.ts +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/inline-child-table/messages.d.ts +2 -2
- package/dist/live/messages.d.ts +2 -2
- package/dist/locale/en.js +7 -2
- package/dist/locale/en.json.d.ts +5 -0
- package/dist/locale/messages.d.ts +10 -0
- package/dist/locale/nl.js +7 -2
- package/dist/locale/texts-gate.d.ts +1 -1
- package/dist/mailbox/messages.d.ts +2 -2
- package/dist/mocks/customers.d.ts +1 -1
- package/dist/mocks/invoices.d.ts +2 -2
- package/dist/mocks/orders.d.ts +1 -1
- package/dist/mocks/stockMoves.d.ts +1 -1
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/package.js +1 -1
- package/dist/plugins/before-sign-in.d.ts +1 -1
- package/dist/plugins/messages.d.ts +2 -2
- package/dist/plugins/plugin-api.exports.js +5 -1
- package/dist/primitives/messages.d.ts +2 -2
- package/dist/relay/count-unread.d.ts +12 -0
- package/dist/relay/count-unread.js +34 -0
- package/dist/relay/relay-context.d.ts +17 -0
- package/dist/relay/relay-context.js +23 -0
- package/dist/relay/relay-provider.d.ts +11 -0
- package/dist/relay/relay-provider.js +58 -0
- package/dist/relay/relay-store.d.ts +31 -0
- package/dist/relay/relay-store.js +77 -0
- package/dist/relay/typing-line.d.ts +11 -0
- package/dist/relay/typing-line.js +30 -0
- package/dist/relay/typing.d.ts +37 -0
- package/dist/relay/typing.js +78 -0
- package/dist/relay/unread.d.ts +30 -0
- package/dist/relay/unread.js +35 -0
- package/dist/relay/use-relay-marks.d.ts +11 -0
- package/dist/relay/use-relay-marks.js +53 -0
- package/dist/relay/use-typing-sender.d.ts +11 -0
- package/dist/relay/use-typing-sender.js +32 -0
- package/dist/relay/use-unread-counts.d.ts +9 -0
- package/dist/relay/use-unread-counts.js +61 -0
- package/dist/relay/use-view-channel.d.ts +7 -0
- package/dist/relay/use-view-channel.js +21 -0
- package/dist/shell/assets/{account-page-Cz2-SP3Z.js → account-page-BiW75oAt.js} +2 -2
- package/dist/shell/assets/app-CONqqVEp.js +36 -0
- package/dist/shell/assets/{assistant-shell-CeW3U4tB.js → assistant-shell-CI8XmGPz.js} +2 -2
- package/dist/shell/assets/board-display-G0A9DG-O.js +2 -0
- package/dist/shell/assets/calendar-display-NkSQgeal.js +2 -0
- package/dist/shell/assets/{call-rings-DwSrOHCr.js → call-rings-0TNlWSxz.js} +2 -2
- package/dist/shell/assets/{calls-D1l4an28.js → calls-C7XJGJtG.js} +2 -2
- package/dist/shell/assets/{circle-alert-BEHXqTnA.js → circle-alert-X92Rz4B3.js} +2 -2
- package/dist/shell/assets/{composed-page-CzszGryH.js → composed-page-DPJGOtXk.js} +2 -2
- package/dist/shell/assets/{composer-section-v7aZuaJs.js → composer-section-JVIi3Liw.js} +2 -2
- package/dist/shell/assets/{connect-route-B68buTBD.js → connect-route-CnEB9WFV.js} +2 -2
- package/dist/shell/assets/{copy-field-CpG80Fod.js → copy-field-CxJRqfAI.js} +2 -2
- package/dist/shell/assets/create-route-3n42ukxG.js +2 -0
- package/dist/shell/assets/{custom-step-container-field-CooxBIkH.js → custom-step-container-field-B6LXbOfi.js} +4 -4
- package/dist/shell/assets/embedded-list-BXN39go2.js +3 -0
- package/dist/shell/assets/en-DnsB2haa.js +2 -0
- package/dist/shell/assets/{export-dialog-CYGeeQBj.js → export-dialog-Bg-iE9he.js} +2 -2
- package/dist/shell/assets/export-worker-DbK8hf_0.js +15 -0
- package/dist/shell/assets/{first-organization-page-B_TzRjNV.js → first-organization-page-BMfMEJ0L.js} +2 -2
- package/dist/shell/assets/{graph-view-DJGoThHW.js → graph-view-D5gACv8d.js} +2 -2
- package/dist/shell/assets/{group-donut-CtKQKKqq.js → group-donut-I2kILFBR.js} +2 -2
- package/dist/shell/assets/{guest-call-page-C2N1bb85.js → guest-call-page-D3M4dR3J.js} +3 -3
- package/dist/shell/assets/{html-viewer-DHWsvJdf.js → html-viewer-CmiIwn7y.js} +2 -2
- package/dist/shell/assets/{import-dialog-BAmU6oMk.js → import-dialog-BWXSXLy9.js} +2 -2
- package/dist/shell/assets/{import-table-dialog-C1TyvD2-.js → import-table-dialog-dRLvoLxK.js} +2 -2
- package/dist/shell/assets/{index-fJt7aRZ4.js → index-DwDhzXCo.js} +1 -1
- package/dist/shell/assets/invitations-page-BC0t9nV3.js +2 -0
- package/dist/shell/assets/{layout-grid-CPhU6Mm7.js → layout-grid-0SB37tX1.js} +2 -2
- package/dist/shell/assets/{legend-item-DYmqDhq7.js → legend-item-Bv1rltCv.js} +2 -2
- package/dist/shell/assets/list-page-CIpQ2O7R.js +4 -0
- package/dist/shell/assets/{maplibre-DXJkokbV.js → maplibre-BhE7KAqB.js} +2 -2
- package/dist/shell/assets/{markdown-content-9-JeVEDq.js → markdown-content-DJ7-n0Z_.js} +2 -2
- package/dist/shell/assets/members-page-BJpCn7qt.js +2 -0
- package/dist/shell/assets/{message-content-XnNocBEs.js → message-content-CRdJWnUH.js} +2 -2
- package/dist/shell/assets/messages-BNSLYy1a.js +2 -0
- package/dist/shell/assets/nl-Ce2dHlet.js +2 -0
- package/dist/shell/assets/organization-page-tBj092Fw.js +2 -0
- package/dist/shell/assets/organizations-page-CnONo4i-.js +2 -0
- package/dist/shell/assets/parse-worker-MvbeuzYJ.js +35 -0
- package/dist/shell/assets/{pending-invitation-row-C2tovkDY.js → pending-invitation-row-J_r95Xwv.js} +2 -2
- package/dist/shell/assets/{period-chart-DuLmYnEh.js → period-chart-CSjsnzTY.js} +2 -2
- package/dist/shell/assets/{person-row-B4SoiUz7.js → person-row-Ci9ECaJa.js} +2 -2
- package/dist/shell/assets/public-form-page-CBy2Ulcs.js +2 -0
- package/dist/shell/assets/record-lines-CSkPEq1f.js +2 -0
- package/dist/shell/assets/{record-map-CUyHGUuT.js → record-map-DRtzHwa0.js} +2 -2
- package/dist/shell/assets/{record-opens-DtAuS5Iw.js → record-opens-CeOBI39T.js} +2 -2
- package/dist/shell/assets/record-page-BD_zvjHr.js +3 -0
- package/dist/shell/assets/{record-preview-CF37imVo.js → record-preview-D0rLqYFH.js} +2 -2
- package/dist/shell/assets/{records-map-CLUkYUGA.js → records-map-BC_K0RDI.js} +2 -2
- package/dist/shell/assets/render-node-eUTdIPBj.js +3 -0
- package/dist/shell/assets/reorder-button-BVceX7gP.js +2 -0
- package/dist/shell/assets/{run-trace-view-B02ogfCg.js → run-trace-view-hxNAb9rR.js} +2 -2
- package/dist/shell/assets/{runner-install-field-B7d2ZTdV.js → runner-install-field-DnvAOzy5.js} +2 -2
- package/dist/shell/assets/{runtime-update-LXdNfKZi.js → runtime-update-qxsAz5M1.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-BYIa30Wi.js +1 -0
- package/dist/shell/assets/sheet-source-BucFVhPg.js +3 -0
- package/dist/shell/assets/sign-in-policy-page-BEqYTjla.js +2 -0
- package/dist/shell/assets/start-block-queries-CacU6Yef.js +2 -0
- package/dist/shell/assets/step-catalog-BzL3DkPx.js +2 -0
- package/dist/shell/assets/{step-panel-C6qUOSA3.js → step-panel-CgBuE7Cg.js} +2 -2
- package/dist/shell/assets/timeline-display-_KfByRT4.js +2 -0
- package/dist/shell/assets/{trash-BiidFj0N.js → trash-SlzmvtD1.js} +2 -2
- package/dist/shell/assets/{update-set-B0qCO072.js → update-set-BWwQIjw7.js} +2 -2
- package/dist/shell/assets/use-calendar-move-gwhvc-31.js +2 -0
- package/dist/shell/assets/{use-display-rows-BpKLVhjZ.js → use-display-rows-D_VvQK1o.js} +2 -2
- package/dist/shell/assets/use-my-invitations-hkJuWwn6.js +2 -0
- package/dist/shell/assets/{use-paged-search-BUf2evnc.js → use-paged-search-PObuLo2W.js} +2 -2
- package/dist/shell/assets/{use-run-trace-D3CBWHfm.js → use-run-trace-Dfgd79SI.js} +2 -2
- package/dist/shell/assets/{use-workflow-page-DjHS4PFJ.js → use-workflow-page-FEUfCpTS.js} +2 -2
- package/dist/shell/assets/{use-workflow-types-D0XJQUAl.js → use-workflow-types-DdclcEcs.js} +2 -2
- package/dist/shell/assets/{workflow-canvas-D1yNhbc_.js → workflow-canvas-BFZlQrwq.js} +4 -4
- package/dist/shell/assets/{workflow-field-BJb4Ns2G.js → workflow-field-CNW_YsyC.js} +3 -3
- package/dist/shell/assets/{workflow-graph-editor-DzpB5Wg4.js → workflow-graph-editor-BWDihza8.js} +2 -2
- package/dist/shell/assets/{workflow-run-field-BrkKGYZ3.js → workflow-run-field-Cn7yP92K.js} +3 -3
- package/dist/shell/assets/workflow-status-field-QuxS3MI_.js +2 -0
- package/dist/shell/assets/workflow-workbench-Crm4s5S7.js +4 -0
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/{account-page-Cz2-SP3Z.js.map → account-page-BiW75oAt.js.map} +1 -1
- package/dist/shell-source-maps/assets/app-CONqqVEp.js.map +1 -0
- package/dist/shell-source-maps/assets/{assistant-shell-CeW3U4tB.js.map → assistant-shell-CI8XmGPz.js.map} +1 -1
- package/dist/shell-source-maps/assets/{board-display-tgOCC0v0.js.map → board-display-G0A9DG-O.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calendar-display-DRWz8QYh.js.map → calendar-display-NkSQgeal.js.map} +1 -1
- package/dist/shell-source-maps/assets/{call-rings-DwSrOHCr.js.map → call-rings-0TNlWSxz.js.map} +1 -1
- package/dist/shell-source-maps/assets/{calls-D1l4an28.js.map → calls-C7XJGJtG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{circle-alert-BEHXqTnA.js.map → circle-alert-X92Rz4B3.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composed-page-CzszGryH.js.map → composed-page-DPJGOtXk.js.map} +1 -1
- package/dist/shell-source-maps/assets/{composer-section-v7aZuaJs.js.map → composer-section-JVIi3Liw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{connect-route-B68buTBD.js.map → connect-route-CnEB9WFV.js.map} +1 -1
- package/dist/shell-source-maps/assets/{copy-field-CpG80Fod.js.map → copy-field-CxJRqfAI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{create-route-BMWFJF8g.js.map → create-route-3n42ukxG.js.map} +1 -1
- package/dist/shell-source-maps/assets/{custom-step-container-field-CooxBIkH.js.map → custom-step-container-field-B6LXbOfi.js.map} +1 -1
- package/dist/shell-source-maps/assets/{embedded-list-nfw7Gvsq.js.map → embedded-list-BXN39go2.js.map} +1 -1
- package/dist/shell-source-maps/assets/en-DnsB2haa.js.map +1 -0
- package/dist/shell-source-maps/assets/{export-dialog-CYGeeQBj.js.map → export-dialog-Bg-iE9he.js.map} +1 -1
- package/dist/shell-source-maps/assets/export-worker-DbK8hf_0.js.map +1 -0
- package/dist/shell-source-maps/assets/{first-organization-page-B_TzRjNV.js.map → first-organization-page-BMfMEJ0L.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-DJGoThHW.js.map → graph-view-D5gACv8d.js.map} +1 -1
- package/dist/shell-source-maps/assets/{group-donut-CtKQKKqq.js.map → group-donut-I2kILFBR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{guest-call-page-C2N1bb85.js.map → guest-call-page-D3M4dR3J.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-DHWsvJdf.js.map → html-viewer-CmiIwn7y.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-dialog-BAmU6oMk.js.map → import-dialog-BWXSXLy9.js.map} +1 -1
- package/dist/shell-source-maps/assets/{import-table-dialog-C1TyvD2-.js.map → import-table-dialog-dRLvoLxK.js.map} +1 -1
- package/dist/shell-source-maps/assets/{invitations-page-D_Z4B5Uu.js.map → invitations-page-BC0t9nV3.js.map} +1 -1
- package/dist/shell-source-maps/assets/{layout-grid-CPhU6Mm7.js.map → layout-grid-0SB37tX1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{legend-item-DYmqDhq7.js.map → legend-item-Bv1rltCv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{list-page-Cl4AAwTy.js.map → list-page-CIpQ2O7R.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-DXJkokbV.js.map → maplibre-BhE7KAqB.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-9-JeVEDq.js.map → markdown-content-DJ7-n0Z_.js.map} +1 -1
- package/dist/shell-source-maps/assets/{members-page-BIYD2hUu.js.map → members-page-BJpCn7qt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{message-content-XnNocBEs.js.map → message-content-CRdJWnUH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{messages-DhhNH_o2.js.map → messages-BNSLYy1a.js.map} +1 -1
- package/dist/shell-source-maps/assets/nl-Ce2dHlet.js.map +1 -0
- package/dist/shell-source-maps/assets/{organization-page-C7rfPxxc.js.map → organization-page-tBj092Fw.js.map} +1 -1
- package/dist/shell-source-maps/assets/{organizations-page-B5wqljdT.js.map → organizations-page-CnONo4i-.js.map} +1 -1
- package/dist/shell-source-maps/assets/parse-worker-MvbeuzYJ.js.map +1 -0
- package/dist/shell-source-maps/assets/{pending-invitation-row-C2tovkDY.js.map → pending-invitation-row-J_r95Xwv.js.map} +1 -1
- package/dist/shell-source-maps/assets/{period-chart-DuLmYnEh.js.map → period-chart-CSjsnzTY.js.map} +1 -1
- package/dist/shell-source-maps/assets/{person-row-B4SoiUz7.js.map → person-row-Ci9ECaJa.js.map} +1 -1
- package/dist/shell-source-maps/assets/{public-form-page-BRHFIOvT.js.map → public-form-page-CBy2Ulcs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-lines-Bt1Un_65.js.map → record-lines-CSkPEq1f.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-CUyHGUuT.js.map → record-map-DRtzHwa0.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-opens-DtAuS5Iw.js.map → record-opens-CeOBI39T.js.map} +1 -1
- package/dist/shell-source-maps/assets/record-page-BD_zvjHr.js.map +1 -0
- package/dist/shell-source-maps/assets/{record-preview-CF37imVo.js.map → record-preview-D0rLqYFH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-CLUkYUGA.js.map → records-map-BC_K0RDI.js.map} +1 -1
- package/dist/shell-source-maps/assets/render-node-eUTdIPBj.js.map +1 -0
- package/dist/shell-source-maps/assets/{reorder-button-BozBSEHe.js.map → reorder-button-BVceX7gP.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-B02ogfCg.js.map → run-trace-view-hxNAb9rR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runner-install-field-B7d2ZTdV.js.map → runner-install-field-DnvAOzy5.js.map} +1 -1
- package/dist/shell-source-maps/assets/{runtime-update-LXdNfKZi.js.map → runtime-update-qxsAz5M1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sheet-source-G8rOez-U.js.map → sheet-source-BucFVhPg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{sign-in-policy-page-DOTM6MOA.js.map → sign-in-policy-page-BEqYTjla.js.map} +1 -1
- package/dist/shell-source-maps/assets/{start-block-queries-Dfg8kMRu.js.map → start-block-queries-CacU6Yef.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-catalog-CoBzB5jS.js.map → step-catalog-BzL3DkPx.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-C6qUOSA3.js.map → step-panel-CgBuE7Cg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{timeline-display-5BAMjA9V.js.map → timeline-display-_KfByRT4.js.map} +1 -1
- package/dist/shell-source-maps/assets/{trash-BiidFj0N.js.map → trash-SlzmvtD1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{update-set-B0qCO072.js.map → update-set-BWwQIjw7.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-calendar-move-BGAc9T_n.js.map → use-calendar-move-gwhvc-31.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-display-rows-BpKLVhjZ.js.map → use-display-rows-D_VvQK1o.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-my-invitations-BQKKClDc.js.map → use-my-invitations-hkJuWwn6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-paged-search-BUf2evnc.js.map → use-paged-search-PObuLo2W.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-run-trace-D3CBWHfm.js.map → use-run-trace-Dfgd79SI.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-page-DjHS4PFJ.js.map → use-workflow-page-FEUfCpTS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-workflow-types-D0XJQUAl.js.map → use-workflow-types-DdclcEcs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-D1yNhbc_.js.map → workflow-canvas-BFZlQrwq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-field-BJb4Ns2G.js.map → workflow-field-CNW_YsyC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-DzpB5Wg4.js.map → workflow-graph-editor-BWDihza8.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-run-field-BrkKGYZ3.js.map → workflow-run-field-Cn7yP92K.js.map} +1 -1
- package/dist/shell-source-maps/assets/workflow-status-field-QuxS3MI_.js.map +1 -0
- package/dist/shell-source-maps/assets/{workflow-workbench-C-DxYJbt.js.map → workflow-workbench-Crm4s5S7.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/users/messages.d.ts +2 -2
- package/package.json +5 -5
- package/dist/shell/assets/app-B3ocPAqs.js +0 -34
- package/dist/shell/assets/board-display-tgOCC0v0.js +0 -2
- package/dist/shell/assets/calendar-display-DRWz8QYh.js +0 -2
- package/dist/shell/assets/create-route-BMWFJF8g.js +0 -2
- package/dist/shell/assets/embedded-list-nfw7Gvsq.js +0 -3
- package/dist/shell/assets/en-0TxR0Vfb.js +0 -2
- package/dist/shell/assets/export-worker-AFqbgGzG.js +0 -15
- package/dist/shell/assets/invitations-page-D_Z4B5Uu.js +0 -2
- package/dist/shell/assets/list-page-Cl4AAwTy.js +0 -4
- package/dist/shell/assets/members-page-BIYD2hUu.js +0 -2
- package/dist/shell/assets/messages-DhhNH_o2.js +0 -2
- package/dist/shell/assets/nl-mDiTKi5y.js +0 -2
- package/dist/shell/assets/organization-page-C7rfPxxc.js +0 -2
- package/dist/shell/assets/organizations-page-B5wqljdT.js +0 -2
- package/dist/shell/assets/parse-worker-C5wWzRYH.js +0 -35
- package/dist/shell/assets/public-form-page-BRHFIOvT.js +0 -2
- package/dist/shell/assets/record-lines-Bt1Un_65.js +0 -2
- package/dist/shell/assets/record-page-DfvcIO5T.js +0 -3
- package/dist/shell/assets/render-node-CK68QvoX.js +0 -3
- package/dist/shell/assets/reorder-button-BozBSEHe.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-B7gMFgle.js +0 -1
- package/dist/shell/assets/sheet-source-G8rOez-U.js +0 -3
- package/dist/shell/assets/sign-in-policy-page-DOTM6MOA.js +0 -2
- package/dist/shell/assets/start-block-queries-Dfg8kMRu.js +0 -2
- package/dist/shell/assets/step-catalog-CoBzB5jS.js +0 -2
- package/dist/shell/assets/timeline-display-5BAMjA9V.js +0 -2
- package/dist/shell/assets/use-calendar-move-BGAc9T_n.js +0 -2
- package/dist/shell/assets/use-my-invitations-BQKKClDc.js +0 -2
- package/dist/shell/assets/workflow-status-field-dbB3IT68.js +0 -2
- package/dist/shell/assets/workflow-workbench-C-DxYJbt.js +0 -4
- package/dist/shell-source-maps/assets/app-B3ocPAqs.js.map +0 -1
- package/dist/shell-source-maps/assets/en-0TxR0Vfb.js.map +0 -1
- package/dist/shell-source-maps/assets/export-worker-AFqbgGzG.js.map +0 -1
- package/dist/shell-source-maps/assets/nl-mDiTKi5y.js.map +0 -1
- package/dist/shell-source-maps/assets/parse-worker-C5wWzRYH.js.map +0 -1
- package/dist/shell-source-maps/assets/record-page-DfvcIO5T.js.map +0 -1
- package/dist/shell-source-maps/assets/render-node-CK68QvoX.js.map +0 -1
- package/dist/shell-source-maps/assets/workflow-status-field-dbB3IT68.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Ec as r,Gn as i,Kr as a,Tc as o,gl as s,la as c,ps as l,sl as u,vs as d,yl as f}from"./app-CONqqVEp.js";import{l as p,m,n as h,u as g}from"./workflow-canvas-BFZlQrwq.js";import{m as _}from"./workflows-Bey4jszG.js";import{E as v,T as y,n as b}from"./use-run-trace-Dfgd79SI.js";var x=e(t(),1),S=e=>e===``?[]:e.split(`/`).map(t=>{let n=/^(.*)\.\d+\[(\d+)\]$/.exec(t);if(!n)throw Error(`"${e}" is not a step's scope`);return{map:decodeURIComponent(n[1]),index:Number(n[2])}}),C=(e,t)=>[...S(e).map(e=>e.map),t].join(`/`),w={succeeded:0,caught:1,retrying:2,failed:3,current:4},T=(e,{inProgress:t,startAt:n,within:r=[]})=>{let i=(e,t)=>[...r,C(e,t)].join(`/`),a=new Map,o=new Map,s=new Map;for(let t of e){let e=i(t.scope,t.state);a.set(e,(a.get(e)??0)+1),o.set(`${t.scope}\n${t.state}`,t),s.set(t.scope,t)}let c=new Map,l=(e,t)=>{let n=c.get(e);(n===void 0||w[t]>w[n])&&c.set(e,t)};for(let e of o.values())l(i(e.scope,e.state),e.status);if(t){!s.has(``)&&n&&l([...r,n].join(`/`),`current`);for(let e of s.values())e.status!==`retrying`&&e.next!==null&&l(i(e.scope,e.next),`current`)}return new Map([...c].map(([e,t])=>[e,{status:t,steps:a.get(e)??0}]))},E=s(`app/field-types/workflow-run`),D=e(n(),1),O=({title:e,children:t})=>(0,D.jsxs)(`div`,{className:`grid gap-1`,children:[(0,D.jsx)(`h5`,{className:`text-xs font-medium text-muted-foreground`,children:e}),t]}),k=e=>new Intl.DateTimeFormat(f(),{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(Date.parse(e)),A=({logs:e})=>(0,D.jsx)(`ol`,{className:`grid gap-0.5 rounded-md bg-muted/60 px-3 py-2 font-mono text-xs`,children:e.map((e,t)=>(0,D.jsxs)(`li`,{className:`whitespace-pre-wrap break-words`,children:[(0,D.jsx)(`time`,{dateTime:e.at,className:`text-muted-foreground`,children:k(e.at)}),` `,e.message]},t))}),j=({step:e,runId:t,valueActions:n})=>{let o=d(),s=typeof e.type==`string`&&_(e.type)!==void 0&&o.resources.workflow_custom_step_jobs!==void 0&&o.permissions.workflow_custom_step_jobs?.read!==!1,f=e.logs?.some(e=>e.message===`Not sent: replay`)??!1,m=S(e.scope),g=e.output!==void 0&&e.output!==null&&(0,D.jsxs)(O,{title:E(`output`),children:[(0,D.jsx)(i,{value:e.output}),n?.(e.output,`output`)]});return(0,D.jsxs)(`article`,{"aria-label":E(`stepTry`,{attempt:e.attempt}),className:`grid gap-3 rounded-lg border bg-background p-3`,children:[(0,D.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-body`,children:[(0,D.jsx)(`span`,{className:`font-medium text-foreground`,children:E(`stepTry`,{attempt:e.attempt})}),m.map((e,t)=>(0,D.jsx)(`span`,{className:`text-muted-foreground`,children:E(`itemOf`,{index:e.index+1,map:e.map})},t)),(0,D.jsx)(l,{tone:h[e.status],children:p(e.status)}),f&&(0,D.jsx)(l,{tone:`violet`,children:E(`notSent`)}),e.reused===!0&&(0,D.jsx)(l,{tone:`blue`,children:E(`reused`)}),e.joined===!0&&(0,D.jsx)(l,{tone:`blue`,children:E(`joined`)}),(0,D.jsx)(`time`,{dateTime:e.started_at,className:`text-muted-foreground`,children:c(Date.parse(e.started_at))}),(0,D.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:E(`duration`,{ms:Number(e.duration_ms??0)})})]}),e.error!=null&&(0,D.jsx)(O,{title:E(`error`),children:(0,D.jsxs)(`p`,{className:`text-body text-danger-text`,children:[(0,D.jsx)(`span`,{className:`font-mono`,children:String(e.error)}),e.cause!=null&&(0,D.jsxs)(`span`,{children:[`: `,String(e.cause)]})]})}),typeof e.run==`string`&&(0,D.jsxs)(`div`,{className:`grid gap-1`,children:[e.reused===!0&&(0,D.jsx)(`p`,{className:`text-body text-muted-foreground`,children:E(`reusedResult`)}),e.joined===!0&&(0,D.jsx)(`p`,{className:`text-body text-muted-foreground`,children:E(`joinedResult`)}),(0,D.jsx)(a,{to:{kind:`record`,resource:`workflow_runs`,key:e.run},className:u(r({size:`sm`}),`justify-self-start`),children:e.reused===!0?E(`openEarlierBlockRun`):E(`openBlockRun`)})]}),s&&(0,D.jsx)(a,{to:{kind:`list`,resource:`workflow_custom_step_jobs`,filter:`run_id = "${t}"`},className:u(r({size:`sm`}),`justify-self-start`),children:E(`openJobs`)}),e.status!==`failed`&&g,e.input!==void 0&&e.input!==null&&(0,D.jsxs)(O,{title:E(`input`),children:[(0,D.jsx)(i,{value:e.input}),n?.(e.input,`input`)]}),e.status===`failed`&&g,e.assigned!=null&&(0,D.jsx)(O,{title:E(`variables`),children:(0,D.jsx)(i,{value:e.assigned})}),e.logs&&e.logs.length>0&&(0,D.jsx)(O,{title:E(`logs`),children:(0,D.jsx)(A,{logs:e.logs})})]})},M=({kind:e,name:t})=>(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e}),(0,D.jsx)(`h4`,{className:`truncate font-semibold text-foreground`,children:t})]}),N=({run:e,name:t,block:n,valueActions:i})=>{let s=b(e.id,!1),[c,l]=(0,x.useState)(20);if(s.isPending)return null;let u=(s.data??[]).filter(e=>e.state===t),d=n===void 0?void 0:(s.data??[]).filter(e=>e.state===n&&typeof e.run==`string`).at(-1)?.run;return u.length===0&&typeof d==`string`?(0,D.jsxs)(`div`,{className:`grid gap-2 text-body text-muted-foreground`,children:[(0,D.jsx)(`p`,{children:E(`ranInBlockRun`,{block:n})}),(0,D.jsx)(a,{to:{kind:`record`,resource:`workflow_runs`,key:d},className:r({size:`sm`})+` justify-self-start`,children:E(`openBlockRun`)})]}):u.length===0?(0,D.jsx)(`p`,{className:`text-body text-muted-foreground`,children:E(`notRun`)}):(0,D.jsxs)(`div`,{className:`grid gap-3`,children:[u.slice(0,c).map(t=>(0,D.jsx)(j,{step:t,runId:e.id,...i&&{valueActions:i}},String(t.id))),u.length>c&&(0,D.jsx)(o,{size:`sm`,className:`justify-self-start`,onClick:()=>l(c+20),children:E(`showMore`)})]})},P=({definition:e,run:t,selected:n,types:r})=>{let a=n===``?void 0:v(e,n);return(0,D.jsx)(`section`,{"aria-label":E(`chosenStep`),className:`grid gap-3 rounded-lg border bg-surface p-4`,children:a?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(M,{kind:g(a,r),name:y(n).name}),(0,D.jsx)(N,{run:t,name:y(n).name})]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(M,{kind:E(`trigger`),name:m(e.trigger,r)}),(0,D.jsx)(O,{title:E(`runInput`),children:(0,D.jsx)(i,{value:t.input??null})})]})})};export{T as a,E as i,P as n,C as o,O as r,N as t};
|
|
2
|
+
//# debugId=a006e13b-0a0c-457b-ae70-dd03703d8e0a
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Ba as r,Cr as i,Ol as a,Ra as o,Sa as s,Sc as c,Ti as l,_a as u,ca as d,fa as f,ma as p,pa as m,sl as h,ua as g,ya as _,yi as v,ys as ee}from"./app-CONqqVEp.js";import{_ as y,a as b,i as te,n as ne,o as re,t as ie,v as x}from"./lib-dnd-kit-core-xi-7xL_N.js";import{a as ae,g as S,h as C,i as w,l as oe,m as T,n as se,o as E,r as ce,t as le,u as D,v as O}from"./use-calendar-move-gwhvc-31.js";var k=e(t(),1),A=864e5,j=e=>Date.parse(`${e}T00:00:00Z`),M=(e,t=0)=>{let n=new Date(j(e));return new Date(Date.UTC(n.getUTCFullYear(),Math.floor(n.getUTCMonth()/3)*3+3*t,1)).toISOString().slice(0,10)},N=({scale:e,day:t})=>({scale:e,day:e===`week`?C(t):e===`month`?S(t):M(t)}),P=(e,t,n=s())=>N(e??{scale:`month`,day:_(t,n)}),F=(e,t)=>{let{scale:n,day:r}=N(e);return{scale:n,day:n===`week`?D(r,7*t):n===`month`?S(r,t):M(r,t)}},I=e=>{let t=N(e).day,n=(j(F(e,1).day)-j(t))/A;return Array.from({length:n},(e,n)=>D(t,n))},ue=e=>({from:N(e).day,to:F(e,1).day}),de=(e,t,n,r=s())=>{let i=_(n,r),a=I(e);return N({scale:t,day:i>=a[0]&&i<=a.at(-1)?i:a[0]})},L=e=>{let t=I(e);return e.scale===`week`?g(j(t[0]),j(t.at(-1))):e.scale===`month`?f(j(t[0])):p(j(t[0]),j(S(t.at(-1))))},R=e=>{let t=I(e);if(e.scale===`week`)return t.map((e,t)=>({index:t,span:1,label:`${u(j(e))} ${Number(e.slice(8))}`}));if(e.scale===`month`)return t.map((e,t)=>({index:t,span:1,label:String(Number(e.slice(8))),...t%7!=0&&{minor:!0}}));let n=t.flatMap((e,t)=>e.endsWith(`-01`)?[t]:[]);return n.map((e,r)=>({index:e,span:(n[r+1]??t.length)-e,label:m(j(t[e]))}))},z=(e,t,n,r,i=s())=>{let a=O(e,t,n,i),o=r[0],c=r.at(-1);if(!(!a||o===void 0||c===void 0||a.last<o||a.first>c))return{first:a.first<o?0:r.indexOf(a.first),last:a.last>c?r.length-1:r.indexOf(a.last),before:a.first<o,after:a.last>c,start:a.first}},B=`none`,V=(e,t,n,r)=>{let i=r.group,o=i===void 0?void 0:t.fields[i];if(i===void 0||!o)return[{key:``,rows:e}];let s=n?.fields[i],c=new Map;for(let t of e){let e=t.record[i],n=e==null||e===``,r=n?B:`value:${String(e)}`,u=n?v(`noValue`,{label:s?.label??a(i)}):t.labels[i]??l(o,e,s),d=c.get(r)??{value:n?void 0:e,lane:{key:r,label:u,rows:[]}};d.lane.rows.push(t),c.set(r,d)}let u=o.enumValues??[],d=(e,t)=>e.value===void 0||t.value===void 0?Number(e.value===void 0)-Number(t.value===void 0):o.type===`enum`?u.indexOf(String(e.value))-u.indexOf(String(t.value)):o.type===`relation`?e.lane.label.localeCompare(t.lane.label):typeof e.value==`number`&&typeof t.value==`number`?e.value-t.value:String(e.value).localeCompare(String(t.value),void 0,{numeric:!0});return[...c.values()].toSorted(d).map(({lane:e})=>e)},H=e(n(),1),U=`grid grid-cols-1 sm:grid-cols-[12rem_minmax(0,1fr)]`,W=(e,t)=>`${e/t*100}%`,fe=({ticks:e,days:t,today:n,label:r,trackRef:i})=>(0,H.jsxs)(`div`,{className:h(U,`border-b border-border bg-surface`),children:[(0,H.jsx)(`span`,{className:`hidden truncate px-2 py-1 text-xs font-medium text-muted-foreground sm:block`,children:r}),(0,H.jsx)(`div`,{ref:i,"aria-hidden":!0,className:`relative h-6`,children:e.map(e=>(0,H.jsx)(`span`,{className:h(`absolute inset-y-0 items-center truncate px-1 text-xs tabular-nums text-muted-foreground`,e.index>0?`border-l border-border`:`border-border sm:border-l`,e.minor?`hidden sm:flex`:`flex`,e.span===1&&t[e.index]===n&&`font-medium text-primary`),style:{left:W(e.index,t.length),width:W(e.span,t.length)},children:e.label},e.index))})]}),pe=({ticks:e,days:t,today:n})=>{let r=t.indexOf(n);return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:h(U,`pointer-events-none absolute inset-0`),children:[(0,H.jsx)(`span`,{className:`hidden sm:block`}),(0,H.jsxs)(`div`,{className:`relative`,children:[r>=0&&(0,H.jsx)(`span`,{className:`absolute inset-y-0 bg-primary/10`,style:{left:W(r,t.length),width:W(1,t.length)}}),e.map(e=>(0,H.jsx)(`span`,{className:h(`absolute inset-y-0 w-px bg-border`,(e.minor||e.index===0)&&`hidden sm:block`),style:{left:W(e.index,t.length)}},e.index))]})]})},me=({model:e,view:t,display:n,row:r,days:i,movable:a,dragged:o})=>{let s=z(r.record,n,e,i);return(0,H.jsxs)(`div`,{className:h(U,`relative border-b border-border last:border-b-0`),children:[(0,H.jsx)(`span`,{"aria-hidden":!0,className:`truncate px-2 pt-1 text-body sm:py-1.5`,children:E(e,t,n,r)}),(0,H.jsx)(`div`,{className:`relative h-7`,children:s&&(0,H.jsx)(`div`,{className:`absolute top-1/2 -translate-y-1/2`,style:{left:W(s.first,i.length),width:W(s.last-s.first+1,i.length)},children:(0,H.jsx)(w,{model:e,view:t,display:n,row:r,day:s.start,movable:a,dragged:o,className:h(s.before&&`rounded-l-none border-l-0`,s.after&&`rounded-r-none border-r-0`)})})})]})},he=()=>[{scale:`week`,label:v(`week`)},{scale:`month`,label:v(`month`)},{scale:`quarter`,label:v(`quarter`)}],G=({model:e,view:t,display:n,fields:l,filter:u,at:f,linkTo:p,now:m=Date.now()})=>{let[h,g]=(0,k.useState)(),S=P(p?f:h,m),C=I(S),w=R(S),A=ce({model:e,display:n,range:ue(S),fields:l,filter:u}),{moves:j,move:M}=se(e,n),N=V(T(le(A.rows,j),n),e,t,n),z=ee(e.name),B=o(z,`update`)&&[n.start,n.end].every(t=>t===void 0||!e.fields[t]?.readOnly),[U,W]=(0,k.useState)(),G=(0,k.useRef)(!1),K=(0,k.useRef)(0),q=(0,k.useRef)(null),J=()=>(q.current?.getBoundingClientRect().width??0)/C.length,Y=e=>{let t=J();return t>0?Math.round(e/t):0},ge=({transform:e})=>({...e,x:Y(e.x)*J(),y:0}),_e=x(y(b,{activationConstraint:{distance:4}}),y(re,{activationConstraint:{delay:250,tolerance:5}}),y(te,{keyboardCodes:{start:[`Space`],cancel:[`Escape`],end:[`Space`,`Enter`]},coordinateGetter:(e,{currentCoordinates:t})=>{let n=e.code===`ArrowLeft`?-1:+(e.code===`ArrowRight`);if(n!==0)return e.preventDefault(),{x:t.x+n*J(),y:t.y}}})),X=_(m,s()),Z=r=>E(e,t,n,r.row),Q=e=>d(Date.parse(`${D(e.day,K.current)}T00:00:00Z`)),ve={onDragStart:({active:e})=>v(`pickedUp`,{title:Z(e.data.current)}),onDragMove:({active:e})=>v(`startsOn`,{title:Z(e.data.current),day:Q(e.data.current)}),onDragOver:()=>void 0,onDragEnd:({active:e})=>K.current===0?v(`putBack`,{title:Z(e.data.current)}):v(`wasMovedTo`,{title:Z(e.data.current),to:Q(e.data.current)}),onDragCancel:({active:e})=>v(`cancelled`,{title:Z(e.data.current)})},$=()=>{W(void 0),setTimeout(()=>G.current=!1)},ye=({active:e})=>{G.current=!0,K.current=0,W(e.data.current)},be=({delta:e})=>K.current=Y(e.x),xe=({active:t,delta:r})=>{$(),K.current=Y(r.x);let{row:i}=t.data.current,a=O(i.record,n,e);a&&K.current!==0&&M(i,a.first,D(a.first,K.current))},Se=n.group===void 0?t?.names?.plural??a(e.name):t?.fields[n.group]?.label??a(n.group),Ce=!A.loading&&!A.error&&A.rows.length===0;return(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,H.jsx)(oe,{heading:L(S),unit:S.scale,previous:F(S,-1),today:P({scale:S.scale,day:X},m),next:F(S,1),scales:he().map(({scale:e,label:t})=>({view:de(S,e,m),label:t,current:S.scale===e})),scalesLabel:v(`timelineScale`),linkTo:p,onView:g}),A.error&&(0,H.jsx)(i,{title:v(`couldNotLoadRows`),error:A.error}),A.capped&&(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v(`capped`,{limit:500,unit:S.scale})}),(0,H.jsxs)(ie,{sensors:_e,modifiers:[ge],onDragStart:ye,onDragMove:be,onDragEnd:xe,onDragCancel:$,accessibility:{announcements:ve,screenReaderInstructions:{draggable:v(`timelineInstructions`)}},children:[(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-lg border border-border`,children:[(0,H.jsx)(fe,{ticks:w,days:C,today:X,label:Se,trackRef:q}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(pe,{ticks:w,days:C,today:X}),A.loading&&(0,H.jsxs)(`div`,{className:`relative flex flex-col gap-2 p-2`,children:[(0,H.jsx)(c,{className:`h-4`}),(0,H.jsx)(c,{className:`h-4`})]}),Ce&&(0,H.jsx)(`p`,{className:`relative px-2 py-3 text-xs text-muted-foreground`,children:v(`nothingIn`,{unit:S.scale})}),!A.loading&&N.map(i=>(0,H.jsxs)(`section`,{"aria-label":i.label,className:`relative border-b border-border last:border-b-0`,children:[i.label!==void 0&&(0,H.jsxs)(`h3`,{className:`flex items-center gap-1.5 border-b border-border bg-surface px-2 py-1 text-xs font-medium`,children:[i.label,(0,H.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:i.rows.length})]}),i.rows.map(i=>(0,H.jsx)(me,{model:e,view:t,display:n,row:i,days:C,movable:B&&r(i.record,`update`),dragged:()=>G.current},i.key))]},i.key))]})]}),(0,H.jsx)(ne,{children:U&&(0,H.jsx)(ae,{model:e,view:t,display:n,row:U.row,day:U.day})})]})]})};export{G as TimelineDisplay};
|
|
2
|
+
//# debugId=3f29f072-453e-4e6f-919a-8edaf179ca22
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{ol as e}from"./app-CONqqVEp.js";var t={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};t.node;var n=e(t);export{n as t};
|
|
2
|
+
//# debugId=129739af-b43d-42cd-8b72-5bb547582666
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{_u as e,gu as t,hu as n,ou as r,vu as i,yu as a}from"./app-CONqqVEp.js";import{A as o}from"./vendor-t7Q7QbPu.js";var s=e=>()=>{throw Error(`Not implemented: ${e}() needs the database (the resource's search fields, trigram matching), so it cannot be evaluated against a record`)},c=(e,t,r)=>({...a,search:{...a.search,evaluate:r?e=>n(r,t,e):s(`search`)},similar:{...a.similar,evaluate:s(`similar`)},regex:{...a.regex,evaluate:(e,t)=>e.some(e=>typeof e==`string`&&new RegExp(t).test(e))},now:{...a.now,evaluate:e}}),l=(t,n,r={})=>o(e(t,{expand:!0}),n,{functions:c(r.now??(()=>new Date),n,r.search)}),u=(e,t,n,r={})=>({name:e,kind:t,label:n.label,required:t!==`boolean`&&!n.optional,...n.help!==void 0&&{help:n.help},...n.when!==void 0&&{when:n.when},...n.default!==void 0&&{default:n.default},...r}),d={text:(e,t)=>u(e,`text`,t,{...t.multiline&&{multiline:!0},...t.max!==void 0&&{max:t.max}}),integer:(e,t)=>u(e,`integer`,t),decimal:(e,t)=>u(e,`decimal`,t),boolean:(e,t)=>u(e,`boolean`,t),secret:(e,t)=>u(e,`secret`,t),date:(e,t)=>u(e,`date`,t),choice:(e,t)=>u(e,`choice`,t,`options`in t?{options:t.options.map(({value:e,label:t})=>({value:e,label:t}))}:{resource:t.resource}),checklist:(e,t)=>u(e,`checklist`,t,{...`items`in t&&{items:[...t.items]},...`from`in t&&{from:t.from}}),custom:(e,t)=>u(e,`custom`,t,{component:t.component,...t.props!==void 0&&{props:t.props}})},f={text:`text`,integer:`integer`,decimal:`decimal`,boolean:`boolean`,date:`date`,choice:`text`,secret:`text`,checklist:`json`,custom:`json`},p=e=>({name:e.name,column:e.name,type:e.options?`enum`:f[e.kind],nullable:!0,readOnly:!1,filterable:e.kind!==`custom`&&e.kind!==`checklist`&&e.kind!==`secret`,sortable:!1,aliases:[],...e.options&&{enumValues:e.options.map(e=>e.value)}}),m=e=>({name:`inputs`,table:{name:`inputs`},fields:Object.fromEntries(e.map(e=>[e.name,p(e)])),primaryKey:[]}),h=(e,n)=>{let r=e[n].when;if(r===void 0)return;let a=i(r);if(!a.ok)return a.errors.map(e=>e.message).join(`; `);if(!a.ast)return`it is empty`;let o=t(m(e.slice(0,n)),a.ast);return o.ok?o.filter:o.errors.map(e=>e.message).join(`; `)},g=e=>e.kind===`checklist`?e.items===void 0==(e.from===void 0)?[`input "${e.name}": a checklist takes either "items" or "from"`]:e.items&&e.items.length===0?[`input "${e.name}": a checklist needs at least one item`]:[]:[],_=e=>e.flatMap((t,n)=>{let r=[];e.findIndex(e=>e.name===t.name)!==n&&r.push(`input "${t.name}" is declared twice`),t.kind===`secret`&&t.default!==void 0&&r.push(`input "${t.name}": a secret takes no default`),t.kind!==`secret`&&t.options&&t.default!==void 0&&!t.options.some(e=>e.value===t.default)&&r.push(`input "${t.name}": default "${String(t.default)}" is not one of its options`);let i=h(e,n);return typeof i==`string`&&r.push(`input "${t.name}": "when" is not a valid condition over the inputs before it: ${i}`),[...r,...g(t)]}),v=(e,t)=>{let n=new Set,r={};return e.forEach((i,a)=>{let o=h(e,a);if(typeof o==`string`)throw Error(`Input "${i.name}": ${o}`);let s=o===void 0||l(o,r)===!0;s&&n.add(i.name),r[i.name]=s?t[i.name]??null:null}),n},y=(e,t=[])=>Object.entries(e).flatMap(([e,n])=>{let i=typeof n==`string`?r(n):void 0;if(i===void 0)return[];let a=t.find(e=>e.name===i);return a?a.kind===`secret`?[`set "${e}" names secret input "${i}", which an update never writes; take it in an action's handler`]:[]:[`set "${e}" names input "${i}", which it does not ask for`]}),b=(e,t)=>Object.fromEntries(Object.entries(e).flatMap(([e,n])=>{let i=typeof n==`string`?r(n):void 0;return i===void 0?[[e,n]]:Object.hasOwn(t,i)?[[e,t[i]]]:[]}));export{v as a,d as i,b as n,_ as r,y as t};
|
|
2
|
+
//# debugId=56c10223-c3bb-4bb6-8b49-7be590d03657
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{$c as r,Ca as i,Ec as a,El as o,Fa as s,Ja as c,Kr as l,Lo as u,Qc as d,Sa as f,Ti as p,Ts as m,ba as h,ca as g,ga as _,mu as v,pu as y,sl as b,vi as x,vs as S,wn as C,xa as w,ya as T,yi as E}from"./app-CONqqVEp.js";import{i as ee}from"./vendor-t7Q7QbPu.js";import{r as te,t as ne}from"./record-preview-D0rLqYFH.js";import{h as D}from"./lib-dnd-kit-core-xi-7xL_N.js";import{t as O}from"./use-display-rows-D_VvQK1o.js";var k=e(t(),1),A=e(n(),1),j=864e5,M=e=>new Date(e).toISOString().slice(0,10),N=e=>Date.parse(`${e}T00:00:00Z`),P=(e,t)=>M(N(e)+t*j),F=e=>P(e,-((new Date(N(e)).getUTCDay()+6)%7)),I=(e,t=0)=>{let n=new Date(N(e));return M(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+t,1))},L=({scale:e,day:t})=>({scale:e,day:e===`month`?I(t):F(t)}),R=(e,t,n=f())=>L(e??{scale:`month`,day:T(t,n)}),z=(e,t,n=f())=>L({scale:e,day:T(t,n)}),B=(e,t)=>e.scale===`month`?{scale:`month`,day:I(e.day,t)}:{scale:`week`,day:P(F(e.day),7*t)},V=e=>{let t=F(e.scale===`month`?I(e.day):e.day),n=(N(e.scale===`month`?P(F(P(I(e.day,1),-1)),6):P(t,6))-N(t))/j+1;return Array.from({length:n},(e,n)=>P(t,n))},H=e=>{let t=V(e);return{from:t[0],to:P(t.at(-1),1)}},U=(e,t)=>t.fields[e.start]?.type===`timestamp`,W=(e,t,n,r=f())=>{let i=U(e,t),a=e=>new Date(w(e,r)).toISOString().replace(`.000Z`,`Z`),o=e=>i?{kind:`timestamp`,value:a(e),span:{start:0,end:0}}:{kind:`string`,value:e,span:{start:0,end:0}},s=y.and(y.gte(e.start,o(n.from)),y.lt(e.start,o(n.to)));if(e.end===void 0)return v(s);let c=i?y.gt(e.end,o(n.from)):y.gte(e.end,o(n.from));return v(y.or(s,y.and(y.lt(e.start,o(n.from)),c)))},G=(e,t)=>e===``?t:`(${e}) AND (${t})`,K=e=>{if(typeof e!=`string`)return;let t=Date.parse(/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:e);return Number.isNaN(t)?void 0:t},q=(e,t,n,r=f())=>{let i=K(e[t.start]);if(i===void 0)return;let a=U(t,n),o=e=>a?T(e,r):M(e),s=o(i),c=t.end===void 0?void 0:K(e[t.end]),l=c===void 0?s:o(a?c-1:c);return{first:s,last:l<s?s:l}},J=(e,t,n,r,i=f())=>{let a=q(e,t,n,i);return a?r.filter(e=>e>=a.first&&e<=a.last):[]},Y=(e,t)=>e.toSorted((e,n)=>(K(e.record[t.start])??0)-(K(n.record[t.start])??0)),X=(e,t,n,r,i=f())=>{let a=new Map(r.map(e=>[e,[]]));for(let o of Y(e,t))for(let e of J(o.record,t,n,r,i))a.get(e).push(o);return a},re=(e,t,n,r,a,o=f())=>{let s=(N(a)-N(r))/j,c=U(t,n),l=e=>{let t=K(e);if(t!==void 0)return c?new Date(h(t+i(t,o)+s*j,o)).toISOString():P(M(t),s)},u=l(e[t.start]),d=t.end===void 0?void 0:l(e[t.end]);return{...u!==void 0&&{[t.start]:u},...d!==void 0&&{[t.end]:d}}},ie=({heading:e,unit:t,previous:n,today:i,next:o,scales:s,scalesLabel:c,linkTo:f,onView:p})=>{let m=(e,t,n,r,i)=>f?(0,A.jsx)(l,{to:f(e),className:t,"aria-label":n,"aria-current":i?`page`:void 0,children:r}):(0,A.jsx)(`button`,{type:`button`,className:t,"aria-label":n,"aria-pressed":i,onClick:()=>p?.(e),children:r}),h=a({variant:`secondary`,size:`sm`});return(0,A.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,A.jsx)(`h2`,{className:`text-sm font-medium`,children:e}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-1`,children:[m(n,h,E(`previousPeriod`,{unit:t}),(0,A.jsx)(r,{className:`size-3.5`})),m(i,h,E(`today`),E(`today`)),m(o,h,E(`nextPeriod`,{unit:t}),(0,A.jsx)(d,{className:`size-3.5`}))]}),(0,A.jsx)(`span`,{role:`group`,"aria-label":c,className:u.group(),children:s.map(e=>(0,A.jsx)(k.Fragment,{children:m(e.view,u.option(e.current),e.label,e.label,e.current)},e.label))})]})]})},ae=`day:`,Z=e=>`${ae}${e}`,oe=(e,t)=>`${e}@${t}`,se=(e,{context:{active:t,collisionRect:n,droppableRects:r,over:i}})=>{let a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[e.code],o=i?String(i.id).slice(4):t?.data.current?.day;if(a===void 0||!n||o===void 0)return;e.preventDefault();let s=r.get(Z(P(o,a)));if(s)return{x:s.left+(s.width-n.width)/2,y:s.top+4}},Q=(e,t,n,r)=>{let i=n.title??o(e,t),a=e.fields[i],s=r.labels[i]??(a?p(a,r.record[i],t?.fields[i]):``);return s===``?r.key:s},ce=(e,t,n,r)=>{let i=n.record[t.start];if(e.fields[t.start]?.type!==`timestamp`||typeof i!=`string`)return;let a=Date.parse(i);return T(a,f())===r?_(a):void 0},$=({model:e,view:t,display:n,row:r,day:i,className:a})=>{let o=ne(e),s=ce(e,n,r,i);return(0,A.jsxs)(l,{to:{kind:`record`,resource:e.name,key:r.key},onClick:()=>o(r.record),className:b(`flex min-w-0 items-baseline gap-1 rounded-md border border-border bg-background px-1.5 py-0.5 text-xs hover:border-border-strong hover:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,a),children:[s&&(0,A.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:s}),(0,A.jsx)(`span`,{className:`min-w-0 truncate`,children:Q(e,t,n,r)})]})},le=({movable:e,dragged:t,...n})=>{let{setNodeRef:r,setActivatorNodeRef:i,listeners:a,isDragging:o}=D({id:oe(n.row.key,n.day),data:{row:n.row,day:n.day},disabled:!e});return(0,A.jsx)(`div`,{ref:e=>{r(e),i(e?.querySelector(`a`)??e)},...a,onDragStart:e=>e.preventDefault(),onClickCapture:e=>{t()&&(e.preventDefault(),e.stopPropagation())},className:b(`min-w-0`,e&&`cursor-grab touch-manipulation`,o&&`opacity-40`),children:(0,A.jsx)($,{...n})})},ue=({model:e,display:t,range:n,fields:r,filter:i})=>{let{resources:a,views:o}=S(),s=te({resources:a,views:o,model:e,columns:r,filter:G(i,W(t,e,n)),orderBy:`${t.start} asc`}),c=O(e,s.page,s.key,!0),l=c.more&&!c.loading&&c.rows.length<500;(0,k.useEffect)(()=>{l&&c.loadMore()},[l,c.rows.length]);let u=c.rows.length>500||c.rows.length===500&&c.more;return{rows:c.rows.slice(0,500),capped:u,loading:c.loading,error:c.error}},de=(e,t)=>{let n=new Map(t.map(e=>[e.key,e.patch]));return e.map(e=>n.has(e.key)?{...e,record:{...e.record,...n.get(e.key)}}:e)},fe=(e,t)=>{let n=m(),r=c(),i=C(),[a,o]=(0,k.useState)([]),l=e=>o(t=>t.filter(t=>t.key!==e)),u=ee({mutationFn:({row:t,patch:r})=>{let i=typeof t.record.etag==`string`?t.record.etag:`*`;return n.update(e.name,s(e,t.record),r,i)},onMutate:({row:e,patch:t})=>o(n=>[...n.filter(t=>t.key!==e.key),{key:e.key,patch:t}]),onError:(e,{row:t,to:n})=>{l(t.key),r.show({state:`error`,title:E(`couldNotMoveTo`,{to:g(Date.parse(`${n}T00:00:00Z`))}),description:x(e)})},onSettled:async(t,n,{row:r})=>{await i(e.name),l(r.key)}});return{moves:a,move:(n,r,i)=>u.mutate({row:n,patch:re(n.record,t,e,r,i),to:i})}};export{H as _,$ as a,z as b,Z as c,X as d,R as f,I as g,F as h,le as i,ie as l,Y as m,fe as n,Q as o,V as p,ue as r,se as s,de as t,P as u,q as v,B as y};
|
|
2
|
+
//# debugId=20c21bdc-fb7d-457c-a731-71667b6d038d
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{ti as e}from"./app-CONqqVEp.js";import{r as t}from"./vendor-t7Q7QbPu.js";var n=(n,r,i,a)=>{let o=t({queryKey:[...i,`display`],enabled:a,initialPageParam:0,queryFn:({pageParam:e})=>r(e),getNextPageParam:(e,t)=>e.rows.length===40&&t.length*40<(t[0]?.total??0)?t.length:void 0}),s=o.data?.pages??[];return{resource:n.name,rows:s.flatMap(t=>t.rows.map(t=>e(n,t))),total:s[0]?.total??0,loading:o.isPending,error:o.error,more:o.hasNextPage,loadMore:()=>void o.fetchNextPage()}};export{n as t};
|
|
2
|
+
//# debugId=ff56f40a-d686-4b56-af19-ad30bb0b6283
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{As as r,Fs as i,Ha as a,Os as o,Tc as s,Uo as c,co as l,hl as u,ho as d,ks as f,yl as p}from"./app-CONqqVEp.js";import{o as m}from"./vendor-t7Q7QbPu.js";var h=e(n(),1),g=({invitation:e,t,busy:n,joining:r,onJoin:a})=>{let o=i().organizations?.roles??[],c=e.organizationName??t(`anOrganization`),l=e.appRoles.map(e=>d(o,e)).join(`, `),u=t(`expires`,{date:new Date(e.expiresAt).toLocaleDateString(p(),{dateStyle:`long`})});return(0,h.jsxs)(`li`,{className:`flex flex-col gap-2 px-3 py-2.5 sm:flex-row sm:items-center sm:gap-3`,children:[(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`span`,{className:`block break-words font-medium`,children:c}),(0,h.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:l?`${l} · ${u}`:u})]}),(0,h.jsx)(s,{variant:`primary`,disabled:n,loading:r,busyLabel:t(`joining`,{name:c}),onClick:a,className:`min-h-10 w-full sm:min-h-0 sm:w-auto`,children:t(`join`,{name:c})})]})},_=e(t(),1),v=({onCreated:e,autoFocus:t=!1})=>{let{session:n}=i(),r=a(),[o,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(!1),{busy:p,error:m,run:g}=l(),v=(0,_.useId)(),y=(0,_.useRef)(null),b=()=>{if(!p){if(o.trim()===``){f(!0),y.current?.focus();return}g(async()=>{await n.organizations.create({name:o.trim()}),e()})}},x=d?r(`nameNeeded`):m;return(0,h.jsxs)(`form`,{className:`flex flex-col gap-4`,noValidate:!0,onSubmit:e=>{e.preventDefault(),b()},children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,h.jsxs)(`label`,{className:`flex flex-col gap-1.5 font-medium`,children:[r(`organizationName`),(0,h.jsx)(c,{ref:y,name:`organization`,autoComplete:`organization`,autoFocus:t,maxLength:200,value:o,invalid:d,"aria-describedby":d?v:void 0,onChange:e=>{u(e.target.value),f(!1)},className:`min-h-6`})]}),x&&(0,h.jsx)(`p`,{id:v,role:`alert`,className:`text-body font-medium text-danger-text`,children:x})]}),(0,h.jsx)(s,{variant:`primary`,type:`submit`,loading:p,busyLabel:r(`creating`),className:`min-h-10`,children:r(`createButton`)})]})},y=e=>{let{session:t}=i(),{busy:n,error:r,run:a}=l(),[o,s]=(0,_.useState)();return{busy:n,error:r,joining:n?o:void 0,join:n=>{s(n),a(async()=>{await t.organizations.acceptMine(n),e()})}}},b=()=>{let{session:e}=i(),t=(0,_.useContext)(o),n=m({queryKey:u.myInvitations,queryFn:()=>e.organizations.myInvitations(),retry:!1});return n.data&&f(n,t)?{state:`ready`,invitations:n.data}:r(n)?{state:`failed`,retry:()=>void n.refetch()}:{state:`loading`}};export{g as i,y as n,v as r,b as t};
|
|
2
|
+
//# debugId=21909b96-c27e-4265-a11a-c644c4eb9dca
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Nc as r,Tc as i,Uo as a,ds as o,gl as s,us as c}from"./app-CONqqVEp.js";var l=s(`lists`),u=e(n(),1),d=({title:e,description:t,searchLabel:n,placeholder:s,query:d,onQuery:f,list:p,error:m,renderRow:h})=>(0,u.jsxs)(c,{title:e,description:t,children:[(0,u.jsx)(o,{message:m}),(0,u.jsx)(a,{"aria-label":n,placeholder:s,value:d,onChange:e=>f(e.target.value),leading:(0,u.jsx)(r,{className:`size-3.5`}),wrapperClassName:`mb-2`}),(0,u.jsxs)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:[p.found.length,` of `,p.total]}),p.found.length>0&&(0,u.jsx)(`ul`,{className:`divide-y rounded-md border`,children:p.found.map(h)}),p.found.length<p.total&&(0,u.jsx)(i,{className:`mt-3`,loading:p.loading,onClick:()=>void p.more(),children:l(`showMore`)})]}),f=e(t(),1),p=(e,t)=>{let[n,r]=(0,f.useState)([]),[i,a]=(0,f.useState)(0),[o,s]=(0,f.useState)(!1),c=(0,f.useRef)(t);return c.current=t,(0,f.useEffect)(()=>{let n=setTimeout(()=>{s(!0),e(t,0).then(e=>{c.current===t&&(r(e.items),a(e.total),s(!1))},()=>{c.current===t&&(r([]),a(0),s(!1))})},200);return()=>clearTimeout(n)},[e,t]),{found:n,total:i,more:async()=>{let i=t;s(!0);let o=await e(i,n.length).catch(()=>void 0);c.current===i&&(o&&(r(e=>[...e,...o.items]),a(o.total)),s(!1))},loading:o}};export{d as n,p as t};
|
|
2
|
+
//# debugId=0f39bb8b-a365-4313-b8eb-202410f648d8
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t}from"./react-CuiNlnus.js";import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t}from"./react-CuiNlnus.js";import{$a as n,Qa as r,Ts as i,hl as a,js as o}from"./app-CONqqVEp.js";import{h as s,o as c}from"./vendor-t7Q7QbPu.js";import{C as l,E as u,M as d,O as f,P as p,S as m,T as h,h as g,t as ee,w as _,y as v}from"./workflows-Bey4jszG.js";var y=()=>({trigger:{manual:{}},stateMachine:{QueryLanguage:`JSONata`,StartAt:``,States:{}}}),b=e=>{if(typeof e!=`object`||!e||Array.isArray(e))return y();let t=e,n=t.stateMachine,r=typeof n?.States==`object`&&n.States!==null&&!Array.isArray(n.States)?n.States:{},i=t.order===`data`?{}:{StartAt:n?.StartAt??``};return{...t,trigger:t.trigger??{manual:{}},stateMachine:{...n,QueryLanguage:`JSONata`,...i,States:r}}},x=e=>b({trigger:e.trigger,order:e.execution_order??`sequence`,stateMachine:e.state_machine,...e.connections?{connections:e.connections}:{},...e.trace?{trace:e.trace}:{}}),S=e=>{let{StartAt:t,...n}=e.stateMachine;return{state_machine:g(e)===`data`?n:e.stateMachine,trigger:e.trigger,execution_order:g(e),connections:e.connections??null,trace:e.trace??null}},C=e=>e.split(`/`),w=(e,t)=>[...e,t].join(`/`),T=e=>{let t=C(e);return{scope:t.slice(0,-1),name:t.at(-1)}},E=(e,t)=>{let n=e.stateMachine;for(let e of t)n=d(n?.States[e]);return n},D=(e,t)=>{let{scope:n,name:r}=T(t);return E(e,n)?.States[r]},O=e=>Object.entries(e.States).flatMap(([e,t])=>{let n=d(t);return[e,...n?.States?O(n):[]]}),k=(e,t,n=[])=>{if(Object.hasOwn(e.States,t))return[...n,t];for(let[r,i]of Object.entries(e.States)){let e=d(i),a=e?.States&&k(e,t,[...n,r]);if(a)return a}},te=e=>e?.Type===`Map`||e?.Type===`Block`,A=e=>typeof e==`object`&&!!e&&!Array.isArray(e),j=e=>{if(!e)return[];let t=[e.anyOf,e.oneOf].find(Array.isArray),n=A(e.properties)?Object.entries(e.properties).filter(e=>A(e[1])):[];if(!t)return n;let r=new Map(n.map(([e,t])=>[e,[t]]));for(let[e,i]of t.filter(A).flatMap(e=>j(e)))n.some(([t])=>t===e)||r.set(e,[...r.get(e)??[],i]);return[...r].map(([e,t])=>[e,t.length===1?t[0]:{anyOf:t}])},M=e=>j(e),N=e=>e===void 0||e===``?`empty`:v(e)?`wired`:p(e)===void 0?A(e)&&Object.values(e).some(e=>p(e)!==void 0)?`made`:`literal`:`expression`,P=e=>`Arguments`in e&&A(e.Arguments)?e.Arguments:{},F=(e,t,n,r)=>{let i=Array.isArray(t.enum)&&t.enum.every(e=>typeof e==`string`)?t.enum:void 0;return{key:e,type:f(t),required:r,value:n,state:N(n),...i&&{options:i}}},ne=(e,t)=>{let n=m(e,t);if(!n)return[];let r=Array.isArray(n.required)?n.required:[],i=P(e);return M(n).map(([e,t])=>F(e,t,i[e],r.includes(e)))},I=e=>{let t=typeof e?.title==`string`?[]:M(e);return t.length===0?[{path:[],type:f(e)}]:t.map(([e,t])=>({path:[e],type:f(t)}))},re=(e,t)=>e.Type===`Task`?I(l(e,t)):e.Type===`Map`?[{path:[],type:f({type:`array`})}]:e.Type===`Block`?[{path:[],type:f(void 0)}]:[],ie=(e,t)=>I(h(e,t)),L=`#status`,R=`#condition`,z={path:[L],type:f(_)},B=e=>({key:R,type:{kinds:[`boolean`]},required:!1,value:e.Condition,state:N(e.Condition)}),V=(e,t,n,r)=>r[0]===`#status`?u(_,r.slice(1)):u(t?l(t,n):h(e,n),r),H=`$trigger`,U=e=>typeof e==`object`&&!!e&&!Array.isArray(e),W=e=>U(e)&&Number.isFinite(e.x)&&Number.isFinite(e.y),G=e=>U(e)?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>W(t)?[[e,{x:t.x,y:t.y}]]:[])):{},K=e=>{let t=e;if(typeof e==`string`)try{t=JSON.parse(e)}catch{t=void 0}let n=U(t)?t:{};return{pins:G(n.pins),simple:G(n.simple)}},q=e=>e.replaceAll(`%`,`%25`).replaceAll(`.`,`%2E`).replace(/^#/,`%23`).replace(/^\$/,`%24`),J=e=>e===``?H:q(T(e).name),ae=e=>e.map(e=>e===`#status`?L:q(e)),oe=(e,t)=>t?.kind===`break`?[J(t.source),...t.path.length===0?[`#break`]:ae(t.path)].join(`.`):t?.kind===`make`?[J(t.target),`#make`,q(t.key)].join(`.`):t?.kind===`select`?[J(t.target),`#select`,q(t.key)].join(`.`):t?.kind===`condition`?[J(t.target),`#when`,...t.at.map(String)].join(`.`):J(e),se=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>e!==t)),ce=32,Y={right:24,bottom:24},X=(e,t)=>e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height,le=(e,t,n)=>{if(![...t.keys()].some(t=>e.has(t)))return e;let r=new Map([...e].map(([e,n])=>[e,{...n,...t.get(e)}])),i=new Map;for(let e of r.keys())i.set(n(e),[...i.get(n(e))??[],e]);let a=e=>e===void 0?0:a(n(e))+1,o=new Set;for(let e of[...i.keys()].sort((e,t)=>a(t)-a(e))){let n=i.get(e);if(n.some(e=>t.has(e)||o.has(e))){let e=n.filter(e=>t.has(e)).map(e=>r.get(e)),i=n.filter(e=>!t.has(e)).map(e=>r.get(e)).sort((e,t)=>e.y-t.y||e.x-t.x);for(let t of i){let n=e.find(e=>X(t,e));for(;n;)t.y=n.y+n.height+ce,n=e.find(e=>X(t,e));e.push(t)}}let a=e===void 0?void 0:r.get(e);if(!a)continue;let s=Math.max(a.width,...n.map(e=>r.get(e)).map(e=>e.x+e.width+Y.right)),c=Math.max(a.height,...n.map(e=>r.get(e)).map(e=>e.y+e.height+Y.bottom));(s!==a.width||c!==a.height)&&(Object.assign(a,{width:s,height:c}),o.add(e))}return r},Z=e(t(),1),Q=1e3,ue=e=>({...e,id:`${e.scope}#${e.seq}`,resume_at:e.resumeAt??null,started_at:e.startedAt,finished_at:e.finishedAt,duration_ms:Date.parse(e.finishedAt)-Date.parse(e.startedAt)}),de=(e,{from:t,steps:n,revision:r})=>({rows:[...e.slice(0,t),...n.map(ue)],revision:r}),$=(e,t)=>{let n=i(),r=s(),o=a.workflowRunTrace(e??``),l=c({queryKey:o,queryFn:async()=>{let t=r.getQueryData(o);return de(t?.rows??[],await n.workflowRunTrace(e,t&&{after:t.rows.length,revision:t.revision}))},select:e=>e.rows,enabled:e!==void 0,refetchInterval:t?Q:!1}),u=(0,Z.useRef)(t),{refetch:d}=l;return(0,Z.useEffect)(()=>{let n=u.current&&!t;u.current=t,n&&e!==void 0&&d()},[t,e,d]),l},fe=new Set([`queued`,`running`,`waiting`]),pe=e=>{let t=s();(0,Z.useEffect)(()=>{if(!e)return;let r=n(t,()=>!1),i=setInterval(()=>r.changed([`workflow_runs`]),Q);return()=>{clearInterval(i),r.stop()}},[e,t])},me=e=>{let t=s(),r=(0,Z.useContext)(o),i=(0,Z.useRef)(e);(0,Z.useEffect)(()=>{let a=i.current&&!e;i.current=e,a&&n(t,()=>r?.paused()??!1).changed([`workflows`])},[e,t,r])},he=(e,t)=>{if(!e)return;let n=typeof t==`string`?k(e.stateMachine,t):void 0,r=n&&D(e,n.join(`/`));return n&&r?.Type===`Block`?{within:n,startAt:r.Processor.StartAt}:{within:[],startAt:e.stateMachine.StartAt}},ge=e=>{let t=r(`workflow_runs`,e??``,e!==void 0),n=t.data?.record,i=n?.workflow_id!=null&&n.version!=null,a=r(`workflow_versions`,[String(n?.workflow_id??``),Number(n?.version??0)],i),o=fe.has(String(n?.status)),s=typeof n?.test_step==`string`?ee(n.test_step):a.data?x(a.data.record):void 0,c=$(e,o);return pe(o),me(o),{id:e,run:n,stored:t.data,definition:s,place:he(s,n?.block_state),steps:c.data??[],going:o,error:t.error??a.error??c.error}};export{k as C,D as E,w as S,T,O as _,se as a,te as b,B as c,F as d,ne as f,ie as g,re as h,le as i,M as l,z as m,$ as n,K as o,L as p,oe as r,R as s,ge as t,V as u,b as v,x as w,E as x,S as y};
|
|
2
|
+
//# debugId=df81defd-4883-405b-b069-9fc8ba2ae9aa
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{Q as e,Qa as t,Ur as n,qr as r}from"./app-CONqqVEp.js";import{o as i,t as a,w as o}from"./use-run-trace-Dfgd79SI.js";var s=`workflows`,c=({workflow:e,version:t,run:n})=>({kind:`record`,resource:s,key:e,...t!==void 0&&{version:t},...n&&{run:n}}),l=(e,t,n)=>c({workflow:e,...t!==n&&{version:t}}),u=(e,t,n,r)=>c({workflow:e,...n!==r&&{version:n},run:t}),d=({workflow:e,version:t},n)=>t===void 0?c({workflow:e}):l(e,t,n),f=e=>e==null?void 0:Number(e),p=()=>{let{address:t}=r(),n=e();if(n&&t?.kind===`record`)return{workflow:n.key,...t.version!==void 0&&{version:t.version},...t.run&&{run:t.run}}},m=e=>{let r=t(s,e.workflow),c=f(r.data?.record.version),l=f(r.data?.record.enabled_version),u=`workflow_id = ${JSON.stringify(e.workflow)}`,d=n(`workflow_versions`,{filter:u,orderBy:`version desc`,pageSize:100,fields:[`version`,`saved_at`]}),p=n(`workflow_runs`,{filter:`${u} AND isNull(block_of)`,orderBy:`created_at desc`,pageSize:20,fields:[`id`,`status`,`version`,`created_at`,`duration_ms`,`input`,`started_by`,`rerun_of`,`replay`,`error`]}),m=a(e.run),h=e.version,g=t(`workflow_versions`,[e.workflow,h??0],h!==void 0);return{latest:c,enabled:l,versions:d.items.map(e=>({version:Number(e.version),savedAt:String(e.saved_at)})),runs:p.items,trace:m,shown:h,pastDefinition:g.data&&o(g.data.record),pastLayout:g.data&&i(g.data.record.layout),versionsError:d.error,runsError:p.error,pastError:g.error}};export{l as a,u as i,p as n,c as o,d as r,s,m as t};
|
|
2
|
+
//# debugId=051147c2-a534-4ed7-838a-99f2ae73064d
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{Ts as e,gl as t,hl as n}from"./app-CONqqVEp.js";import{o as r}from"./vendor-t7Q7QbPu.js";var i=t(`app/field-types/workflow`),a=()=>{let t=e();return r({queryKey:n.workflowTypes,queryFn:()=>t.workflowTypes()})};export{i as n,a as t};
|
|
2
|
+
//# debugId=dd725704-72c3-4276-9fac-77217354f932
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
2
|
-
StartAt`,kind:`start`,source:``,target:t.StartAt,field:`StartAt`}]:[];return{nodes:[{kind:`trigger`,id:``,trigger:e.trigger},...n.nodes],edges:[...r,...n.edges]}},U={width:224,height:64},gt=(e,t)=>`${e}\u0000${t}`,_t={"elk.algorithm":`layered`,"elk.direction":`RIGHT`,"elk.hierarchyHandling":`INCLUDE_CHILDREN`,"elk.layered.spacing.nodeNodeBetweenLayers":`72`,"elk.spacing.nodeNode":`32`,"elk.edgeLabels.inline":`false`},vt={"elk.layered.layering.strategy":`LONGEST_PATH`},yt={"elk.padding":`[top=48,left=24,bottom=24,right=24]`},bt=e=>e.kind===`state`&&j(e.state),xt=(e,t={})=>{let n=e=>{let n=t.sizes?.get(e)??U,r=t.ports?.get(e);return r?.length?{id:e,...n,layoutOptions:{"elk.portConstraints":`FIXED_POS`},ports:r.map(t=>({id:gt(e,t.handle),x:t.side===`in`?0:n.width,y:t.y,width:0,height:0,layoutOptions:{"elk.port.side":t.side===`in`?`WEST`:`EAST`}}))}:{id:e,...n}},r=(e,n)=>n!==void 0&&t.ports?.get(e)?.some(e=>e.handle===n)?gt(e,n):e,i=e=>(t.pure??[]).filter(t=>t.parent===e).map(e=>n(e.id)),a=t=>{if(!bt(t))return n(t.id);let r=e.nodes.filter(e=>e.kind===`state`&&e.parent===t.id);return{id:t.id,layoutOptions:yt,children:[...r.map(a),...i(t.id)],edges:s(t.id)}},o=n=>{let r=t.pure?.find(e=>e.id===n);if(r)return r.parent;let i=e.nodes.find(e=>e.id===n);return i?.kind===`state`?i.parent:void 0},s=n=>[...e.edges.filter(e=>o(e.target)===n).map(e=>({id:e.id,sources:[e.source],targets:[e.target]})),...(t.wires??[]).filter(e=>o(e.target)===n&&o(e.source)===n).map(e=>({id:e.id,sources:[r(e.source,e.sourceHandle)],targets:[r(e.target,e.targetHandle)]}))],c=e.nodes.filter(e=>e.kind===`trigger`||e.parent===void 0);return{id:`root`,layoutOptions:t.dataOrder?{..._t,...vt}:_t,children:[...c.map(a),...i(void 0)],edges:s(void 0)}},St=e=>{let t=new Map,n=e=>{for(let r of e.children??[])t.set(r.id,{x:r.x??0,y:r.y??0,width:r.width??U.width,height:r.height??U.height}),n(r)};return n(e),t},Ct=async(e,t)=>St(await e.layout(t)),wt=24,Tt=8,Et=(e,t)=>{let n=t?[...e]:e.filter(e=>e.required||e.state!==`empty`);return{shown:n,folded:e.length-n.length}},Dt=(e,t,n,r=52)=>r+Math.max(e,typeof t==`number`?t:t.length)*26+(n?wt:0)+Tt,Ot={string:()=>F(`typeString`),integer:()=>F(`typeInteger`),number:()=>F(`typeNumber`),boolean:()=>F(`typeBoolean`),object:()=>F(`typeObject`),array:()=>F(`typeArray`),null:()=>F(`typeNull`),any:()=>F(`typeAny`)},W=e=>e.title===void 0?e.kinds===`any`?Ot.any():e.kinds.map(e=>Ot[e]()).reduce((e,t)=>F(`typeOr`,{first:e,second:t})):e.title,G=e=>e.kinds===`any`?`any`:e.kinds[0],kt={status:()=>F(`outputStatus`),headers:()=>F(`outputHeaders`),body:()=>F(`outputBody`),record:()=>F(`outputRecord`),resource:()=>F(`outputResource`),key:()=>F(`outputKey`),records:()=>F(`outputRecords`),message_id:()=>F(`outputMessageId`)},At=(e,t=!1,n=!1)=>{if(e.length===0)return F(t?`pinRunInput`:`pinResult`);if(e.length===1&&e[0]===`#status`)return F(`stepStatusType`);let r=e.at(-1);return n||!Object.hasOwn(kt,r)?r:kt[r]()},jt=e=>e===`#condition`?F(`onlyWhen`):Le(e),Mt={"=":()=>F(`conditionEquals`),"!=":()=>F(`conditionNotEquals`),">":()=>F(`conditionGreater`),"<":()=>F(`conditionLess`),matches:()=>F(`conditionMatches`),and:()=>F(`conditionAnd`),or:()=>F(`conditionOr`),not:()=>F(`conditionNot`),expression:()=>F(`conditionExpression`)},Nt=e=>Mt[e](),Pt=({part:e})=>Nt(e.kind===`compare`||e.kind===`logic`?e.op:e.kind),Ft={SUCCEEDED:()=>F(`statusSucceeded`),FAILED:()=>F(`statusFailed`),TIMED_OUT:()=>F(`statusTimedOut`),ABORTED:()=>F(`statusAborted`),SKIPPED:()=>F(`statusSkipped`)},It=e=>Object.hasOwn(Ft,e)?Ft[e]():e,Lt=34,Rt=280,zt=8,Bt=(e,t)=>e.kind===`condition`?{shown:e.inputs,folded:0}:e.kind===`make`?Et(e.inputs,t||e.inputs.length<=zt):{shown:[],folded:0},Vt=(e,t,n)=>{let r=new Set(t.filter(t=>t.source===e.id).map(e=>e.sourceHandle)),i=e.outputs.filter(e=>r.has(V(e.path))),a=i.length>0&&i.length<e.outputs.length;return n||!a?{shown:e.outputs,folded:0,foldable:a}:{shown:i,folded:e.outputs.length-i.length,foldable:a}},Ht=e=>106+e*26+8,Ut=(e,t,n)=>{let r=new Map;for(let i of e.nodes){if(i.kind===`state`&&j(i.state))continue;let{shown:e,folded:a}=Et(t.inputs.get(i.id)??[],n.has(i.id));r.set(i.id,{width:296,height:Dt(e.length,t.outputs.get(i.id)??[],a>0||n.has(i.id))})}for(let e of t.pure){if(e.kind===`condition`&&e.part.kind===`expression`){r.set(e.id,{width:216,height:Ht(e.inputs.length)});continue}if(e.kind===`select`){r.set(e.id,{width:Rt,height:Dt(e.part.cases.length+3,1,!1,Lt)});continue}if(e.kind===`break`){let i=Vt(e,t.edges,n.has(e.id));r.set(e.id,{width:216,height:Dt(0,i.shown.length,i.foldable,Lt)});continue}let{shown:i,folded:a}=Bt(e,n.has(e.id));r.set(e.id,{width:216,height:Dt(i.length,1,e.kind===`make`&&(a>0||n.has(e.id)),Lt)})}return r},Wt=(e,t)=>e+t*26+13,Gt=13,Kt=38,qt=(e,t,n)=>{let r=new Map;for(let i of e.nodes){if(i.kind===`state`&&j(i.state))continue;let{shown:e}=Et(t.inputs.get(i.id)??[],n.has(i.id));r.set(i.id,[...e.map((e,t)=>({handle:B(e.key),side:`in`,y:Wt(52,t)})),...(t.outputs.get(i.id)??[]).map((e,t)=>({handle:V(e.path),side:`out`,y:Wt(52,t)}))])}for(let e of t.pure){let i=(e,t=Kt)=>e.map((e,n)=>({handle:B(e.key),side:`in`,y:Wt(t,n)}));if(e.kind===`break`){let{shown:i}=Vt(e,t.edges,n.has(e.id));r.set(e.id,[{handle:$e,side:`in`,y:Gt},...i.map((e,t)=>({handle:V(e.path),side:`out`,y:Wt(Kt,t)}))])}else if(e.kind===`make`)r.set(e.id,[{handle:et,side:`out`,y:Gt},...i(Bt(e,n.has(e.id)).shown)]);else if(e.kind===`select`)r.set(e.id,[{handle:nt,side:`out`,y:Gt},...i(e.inputs)]);else{let t=e.part.kind===`expression`?Kt+64+4:Kt;r.set(e.id,[{handle:tt,side:`out`,y:Gt},...i(e.inputs,t)])}}return r},Jt=(e,t)=>{let n=e.nodes.find(e=>e.id===(t.kind===`break`?t.source:t.target));return n?.kind===`state`?n.parent:void 0},Yt=`trigger`,K=e=>e===``?Yt:`state:${e}`,q=e=>e!==Yt&&!e.startsWith(`state:`),J=e=>e===Yt?``:e.startsWith(`state:`)?e.slice(6):e,Xt=(e,t,n)=>{let{shown:r,folded:i}=Et(e.inputs.get(t)??[],n);return{inputs:r,outputs:e.outputs.get(t)??[],folded:i,open:n}},Zt=(e,t,n,r,i,a,o,s,c=!1)=>e.nodes.map(e=>{let l=t?.get(e.id)??{x:0,y:0,...U},u=e.kind===`state`?e.parent:void 0,d=e.kind===`trigger`?Ve(e.trigger,a):Fe(e.state,a),f=e.kind===`state`&&Ge(e.state,a),p=e.kind===`state`?F(`stateNode`,{name:e.name,type:d}):F(`triggerNode`,{trigger:d}),m=o?.get(e.id)??[],h=[...f?[F(`cacheForcedAgainst`)]:[],...m.map(e=>e.message)];return{id:K(e.id),type:e.kind,ariaLabel:[p,...h].join(`, `),position:{x:l.x,y:l.y},width:l.width,height:l.height,measured:{width:l.width,height:l.height},data:{node:e,kind:d,problems:n.get(e.id)??[],...i?.has(e.id)&&{trace:i.get(e.id)},...f&&{cacheWarning:f},...m.length>0&&{warnings:m},...s&&{pins:Xt(s.data,e.id,s.open.has(e.id))},...c&&{dataOrder:c}},draggable:!1,deletable:e.kind===`state`,selected:e.id===r,...u!==void 0&&{parentId:K(u),extent:`parent`}}}),Qt=40,$t=e=>e.length>Qt?`${e.slice(0,39)}…`:e,en=e=>{if(e.kind==="default")return F(`otherwise`);if(e.kind===`catch`)return F(`onError`,{errors:e.label??``});if(e.kind===`rule`)return e.label?$t(e.label):F(`conditionToWrite`)},tn=e=>({id:e.id,source:K(e.source),sourceHandle:`out`,target:K(e.target),targetHandle:`in`,deletable:!1,data:{kind:e.kind,field:e.field,source:e.source},...e.kind===`status`&&{className:`pb-workflow-status`}}),nn=(e,t=!1)=>e.edges.map(e=>{if(t)return tn(e);let n=en(e);return{id:e.id,source:K(e.source),sourceHandle:e.kind,target:K(e.target),targetHandle:`in`,deletable:e.kind!==`start`,data:{kind:e.kind,field:e.field,source:e.source},...n!==void 0&&{label:n},...e.kind===`catch`&&{className:`pb-workflow-catch`}}}),rn=(e,t,n,r)=>t.pure.map(i=>{let a=n?.get(i.id)??{x:0,y:0,...U},o=Jt(e,i),{shown:s,folded:c}=Bt(i,r.has(i.id)),l=i.kind===`break`?Vt(i,t.edges,r.has(i.id)):void 0,u=e.nodes.find(e=>e.id===(i.kind===`break`?i.source:i.target));return{id:i.id,type:`pure`,position:{x:a.x,y:a.y},width:a.width,height:a.height,measured:{width:a.width,height:a.height},data:{node:u,kind:i.kind,problems:[],pureData:{pure:i,shownInputs:s,shownOutputs:l?.shown??[],folded:l?.folded??c,open:r.has(i.id),foldable:l?l.foldable:c>0||r.has(i.id)}},draggable:!1,deletable:!0,...o!==void 0&&{parentId:K(o),extent:`parent`}}}),an=(e,t)=>{let n=e=>{let n=t.pure.find(t=>t.id===e);return n?n.kind===`break`?n.source:n.target:e},r=new Set(t.edges.map(e=>`${n(e.source)}\n${n(e.target)}`));return nn({...e,edges:e.edges.filter(e=>e.source!==``&&!r.has(`${e.source}\n${e.target}`))},!0)},on=e=>{let t=new Set(e.pure.map(e=>e.id)),n=e=>t.has(e)?e:K(e);return e.edges.map(e=>({id:e.id,source:n(e.source),sourceHandle:e.sourceHandle,target:n(e.target),targetHandle:e.targetHandle,deletable:!e.expression,data:{kind:`data`,wire:e},className:`pb-wire pb-wire-${G(e.type)}${e.expression?` pb-wire-expression`:``}`}))},sn=(0,R.createContext)(void 0),cn={succeeded:`green`,caught:`amber`,retrying:`amber`,failed:`red`,current:`blue`},ln=(0,R.createContext)(void 0),Y=()=>(0,R.useContext)(ln),un=e=>{if(e.options)return`choice`;if(e.type.kinds===`any`)return;let[t,...n]=e.type.kinds.filter(e=>e!==`null`);if(t===`string`&&n.every(e=>e===`integer`||e===`number`))return`string`;if(!(n.length>0))return t===`integer`||t===`number`?`number`:t===`boolean`?`boolean`:void 0},dn=e=>e.trim()===``?void 0:Number.isNaN(Number(e))?e:Number(e),fn=({name:e,className:t,value:n,onChange:r})=>{let[i,o]=(0,R.useState)();return(0,H.jsx)(a,{"aria-label":e,wrapperClassName:`${t} h-6 w-[55%] px-1.5`,className:`text-xs`,inputMode:`decimal`,value:i??(n===void 0?``:String(n)),onChange:e=>{o(e.target.value),r(dn(e.target.value))},onBlur:()=>o(void 0)})},pn=({pin:e,label:t,onChange:n})=>{if(e.state===`wired`||e.state===`made`||e.key===`#condition`&&e.state!==`expression`)return null;if(e.state===`expression`)return(0,H.jsx)(`span`,{className:`ml-auto shrink-0 rounded bg-muted px-1 font-mono text-xs text-muted-foreground`,title:F(`pinExpression`,{expression:String(e.value)}),children:`ƒ`});let r=un(e);if(e.state===`literal`&&typeof e.value==`object`)return(0,H.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,title:F(`pinObjectValue`),children:`{…}`});if(!r)return e.state===`literal`?(0,H.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-xs text-muted-foreground`,children:String(e.value)}):null;let i=F(`inputValue`,{label:t});if(!n)return(0,H.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-xs text-muted-foreground`,children:e.value===void 0?``:String(e.value)});let s=`nodrag nopan nowheel ml-auto min-w-0`;return r===`boolean`?(0,H.jsx)(o,{className:s,checked:e.value===!0,label:i,onChange:e=>n(e)}):r===`choice`?(0,H.jsxs)(d,{"aria-label":i,className:`${s} h-6 max-w-[55%] px-1 py-0 text-xs`,value:typeof e.value==`string`?e.value:``,onChange:e=>n(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(`option`,{value:``}),e.options.map(t=>(0,H.jsx)(`option`,{value:t,children:e.statuses?It(t):t},t))]}):r===`number`?(0,H.jsx)(fn,{name:i,className:s,value:e.value,onChange:n}):(0,H.jsx)(a,{"aria-label":i,wrapperClassName:`${s} h-6 w-[55%] px-1.5`,className:`text-xs`,value:e.value===void 0?``:String(e.value),onChange:e=>n(e.target.value===``?void 0:e.target.value)})},mn=e=>`pb-pin pb-pin-${G(e.type)}`,hn=({pin:e,step:t,keys:n,connectable:r,name:i,onValue:a,bare:o=!1})=>{let s=Y(),c=i??jt(e.key);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center gap-1.5 pr-2 pl-3`,children:[(0,H.jsx)(L,{id:B(e.key),type:`target`,position:I.Left,isConnectable:r,className:mn(e)}),(0,H.jsxs)(`span`,{className:`min-w-0 shrink truncate text-xs text-body`,title:F(`pinTypeTitle`,{label:c,type:W(e.type)}),children:[c,e.required&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`text-danger-text`,children:`*`})]}),!o&&(0,H.jsx)(pn,{pin:e,label:c,...s&&r&&{onChange:a??(e=>s.setArgument(t,n,e))}})]})},gn=({pin:e,connectable:t,trigger:n=!1,field:r=!1})=>{let i=At(e.path,n,r);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center justify-end pr-3 pl-2`,children:[(0,H.jsx)(`span`,{className:`min-w-0 truncate text-xs text-body`,title:F(`pinTypeTitle`,{label:i,type:W(e.type)}),children:i}),(0,H.jsx)(L,{id:V(e.path),type:`source`,position:I.Right,isConnectable:t,className:mn(e)})]})},_n=({inputs:e,outputs:t,connectable:n})=>{let r=(e,t)=>({top:`${(e+1)*100/(t+1)}%`});return(0,H.jsxs)(H.Fragment,{children:[e.map((t,i)=>(0,H.jsx)(L,{id:B(t.key),type:`target`,position:I.Left,isConnectable:n,className:mn(t),style:r(i,e.length),title:F(`pinTypeTitle`,{label:jt(t.key),type:W(t.type)})},t.key)),t.map((e,i)=>(0,H.jsx)(L,{id:V(e.path),type:`source`,position:I.Right,isConnectable:n,className:mn(e),style:r(i,t.length),title:F(`pinTypeTitle`,{label:At(e.path),type:W(e.type)})},e.path.join(`/`)))]})},vn=({node:e,folded:t,open:n,fields:r=!1})=>{let i=Y();return t===0&&!n?null:(0,H.jsx)(`button`,{type:`button`,className:`nodrag h-6 w-full px-3 text-left text-xs text-muted-foreground hover:text-foreground`,onClick:()=>i?.toggleOpen(e),disabled:!i,children:r?n?F(`foldLessFields`):F(`foldMoreFields`,{count:t}):n?F(`foldLess`):F(`foldMore`,{count:t})})},yn=({node:e,inputs:t,outputs:n,folded:r,open:i,editable:a,trigger:o=!1})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-[3fr_2fr]`,children:[(0,H.jsx)(`div`,{className:`min-w-0`,children:t.map(t=>(0,H.jsx)(hn,{pin:t,step:e,keys:[t.key],connectable:a},t.key))}),(0,H.jsx)(`div`,{className:`min-w-0`,children:n.map(e=>(0,H.jsx)(gn,{pin:e,connectable:a,trigger:o},JSON.stringify(e.path)))})]}),(0,H.jsx)(vn,{node:e,folded:r,open:i})]}),bn=(0,R.createContext)(void 0),xn=`nodrag absolute -top-4 -right-4 z-10`,Sn=({node:e,name:t})=>{let n=(0,R.useContext)(bn);return n?(0,H.jsx)(f,{size:`icon`,className:xn,"aria-label":F(`unpin`,{name:t}),title:F(`unpinHelp`),onClick:t=>{t.stopPropagation(),n(e)},children:(0,H.jsx)(ke,{className:`size-3.5`,"aria-hidden":!0})}):(0,H.jsxs)(`span`,{className:u(xn,`inline-flex size-7 items-center justify-center rounded-md border border-border-strong bg-background text-muted-foreground shadow-sm`),title:F(`movedByHand`),children:[(0,H.jsx)(ke,{className:`size-3.5`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`sr-only`,children:F(`movedByHand`)})]})},X=[18,38],Cn=e=>{if(e.Type===`Choice`)return[{kind:`rule`,top:X[0],label:F(`when`)},{kind:`default`,top:X[1],label:F(`otherwise`)}];let t=[`Task`,`Pass`,`Wait`,`Map`,`Block`].includes(e.Type)?[{kind:`next`,top:X[0]}]:[],n=e.Type===`Task`||e.Type===`Map`||e.Type===`Block`?[{kind:`catch`,top:X[t.length],label:F(`onErrorHandle`)}]:[];return[...t,...n]},wn=(e,t,n)=>{let r=(0,R.useContext)(sn);if(!r||!t)return{};let i=t=>{t.stopPropagation(),r(e)},a=n?F(`addStepAtNamedHandle`,{handle:n}):F(`addStepAtHandle`);return{role:`button`,tabIndex:0,"aria-label":a,title:a,onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i(e))}}},Tn=({source:e,path:t,editable:n})=>(0,H.jsx)(L,{id:e.kind,type:`source`,position:I.Right,isConnectable:n,style:{top:e.top},className:u(`pb-workflow-exec`,`pb-workflow-handle-${e.kind}`),...wn({kind:e.kind,source:t},n,e.label),children:e.label&&(0,H.jsx)(`span`,{className:`pb-workflow-handle-label`,children:e.label})}),En=({state:e,path:t,editable:n})=>Cn(e).map(e=>(0,H.jsx)(Tn,{source:e,path:t,editable:n},e.kind)),Dn=({count:e})=>e>0&&(0,H.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-xs font-medium text-danger-text`,title:F(`problemCount`,{count:e}),children:[(0,H.jsx)(p,{className:`size-3.5`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:F(`problemCount`,{count:e})}),(0,H.jsx)(`span`,{"aria-hidden":`true`,children:e})]}),On=({label:e})=>(0,H.jsxs)(`span`,{className:`inline-flex shrink-0 items-center text-warning-text`,title:e,children:[(0,H.jsx)(p,{className:`size-3.5`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:e})]}),kn=({trace:e})=>(0,H.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end gap-0.5`,children:[e.changed?(0,H.jsx)(`span`,{title:F(`changedSinceRun`),className:`rounded-full border border-dashed px-1.5 text-xs text-muted-foreground`,children:F(`changedShort`)}):(0,H.jsx)(l,{tone:cn[e.status],children:Ue(e.status)}),e.steps>1&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:F(`traceSteps`,{count:e.steps})})]}),An=(e,t,n)=>u(`rounded-lg border bg-background text-body shadow-sm`,t>0||n?.status===`failed`?`border-danger`:`border-border-strong`,e&&`ring-2 ring-primary/40`),jn=({name:e,kind:t,problems:n,first:r,trace:i,warnings:a=[]})=>(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 truncate text-xs text-muted-foreground`,children:[t,r&&(0,H.jsxs)(`span`,{className:`text-primary-text`,children:[` · `,F(`startsHere`)]})]}),a.length>0&&(0,H.jsx)(On,{label:a.join(`
|
|
3
|
-
`)}),(0,H.jsx)(Dn,{count:n}),i&&(0,H.jsx)(kn,{trace:i})]}),(0,H.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:e})]}),Mn=()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(L,{id:`in`,type:`target`,position:I.Left,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}}),(0,H.jsx)(L,{id:`out`,type:`source`,position:I.Right,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}})]}),Nn=({condition:e})=>e!==void 0&&(0,H.jsx)(`span`,{className:`absolute top-1 right-6 max-w-[45%] truncate rounded bg-muted px-1 text-[0.625rem] text-muted-foreground`,title:e,children:F(`onlyWhenBadge`)}),Pn=({id:e,data:t,selected:n,isConnectable:r})=>{let{node:i,kind:a,problems:o,trace:s,cacheWarning:c,warnings:l=[],pins:d,dataOrder:f,moved:p}=t;return i.kind===`state`?(0,H.jsxs)(`div`,{className:u(An(n,o.length,s),`h-full`,j(i.state)&&`bg-muted/40`),children:[p&&(0,H.jsx)(Sn,{node:e,name:i.name}),(0,H.jsxs)(`div`,{className:`relative h-[52px] py-2 pr-6 pl-4`,children:[f?(0,H.jsx)(Mn,{}):(0,H.jsx)(L,{id:`in`,type:`target`,position:I.Left,isConnectable:r,className:`pb-workflow-exec`,style:{top:X[0]}}),f&&(0,H.jsx)(Nn,{condition:i.state.Condition}),(0,H.jsx)(jn,{name:i.name,kind:a,problems:o.length,first:i.first&&i.parent!==void 0,trace:s,warnings:[...c?[F(`cacheForcedAgainst`)]:[],...l.map(e=>e.message)]}),!f&&(0,H.jsx)(En,{state:i.state,path:i.id,editable:r}),d&&j(i.state)&&(0,H.jsx)(_n,{inputs:d.inputs,outputs:d.outputs,connectable:r})]}),d&&!j(i.state)&&(0,H.jsx)(yn,{node:i.id,inputs:d.inputs,outputs:d.outputs,folded:d.folded,open:d.open,editable:r})]}):null},Fn=({id:e,data:t,selected:n,isConnectable:r})=>{let{node:i,kind:a,problems:o,pins:s,dataOrder:c,moved:l}=t,d=wn({kind:`start`,source:i.id},r&&!c);return i.kind===`trigger`?(0,H.jsxs)(`div`,{className:u(An(n,o.length),`h-full border-dashed`),children:[l&&(0,H.jsx)(Sn,{node:e,name:F(`trigger`)}),(0,H.jsxs)(`div`,{className:`relative h-[52px] py-2 pr-6 pl-4`,children:[(0,H.jsx)(jn,{name:a,kind:F(`trigger`),problems:o.length}),c?(0,H.jsx)(L,{id:`out`,type:`source`,position:I.Right,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}}):(0,H.jsx)(L,{id:`start`,type:`source`,position:I.Right,isConnectable:r,className:`pb-workflow-exec`,style:{top:X[0]},...d})]}),s&&(0,H.jsx)(yn,{node:i.id,inputs:[],outputs:s.outputs,folded:0,open:!1,editable:r,trigger:!0})]}):null},In=`protobase:workflow-graph-view`,Ln=e=>c(()=>e().getItem(`protobase:workflow-graph-view`),null)===`simple`?`simple`:`pins`,Rn=(e,t)=>c(()=>t===`pins`?e().removeItem(In):e().setItem(In,t),void 0),zn=()=>localStorage,Bn=()=>{let[e,t]=(0,R.useState)(()=>Ln(zn));return[e,e=>{t(e),Rn(zn,e)}]},Vn=(e,t)=>e.part.kind===`not`?F(`conditionNotSide`):e.part.kind===`matches`?F(t===`0`?`conditionMatchesText`:`conditionMatchesPattern`):e.part.kind===`logic`?String.fromCharCode(65+Number(t)%26):F(t===`0`?`conditionSideA`:`conditionSideB`),Hn=({node:e,source:t})=>{let n=Y(),[r,i]=(0,R.useState)(),a=t.trim();return(0,H.jsx)(`textarea`,{"aria-label":F(`conditionExpressionText`),className:`nodrag nopan nowheel block w-full resize-none rounded border border-border bg-background px-1.5 py-1 font-mono text-xs text-foreground`,style:{height:64},spellCheck:!1,readOnly:!n,value:r??a,onChange:e=>i(e.target.value),onBlur:()=>{i(void 0);let t=r?.trim();t!==void 0&&t!==a&&n?.setCondition(e.target,t===``?void 0:`{% ${t} %}`)}})},Un=e=>e.replace(/^\$states\.context\.Steps\./,``).replace(/^\$states\.context\.Execution\.Input/,`input`),Wn=({node:e,editable:t})=>{let n=Y(),[r,i]=(0,R.useState)(),o=F(`conditionMatchesPattern`),s=String(e.inputs[1]?.value??``);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center gap-1.5 pr-2 pl-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 shrink truncate text-xs text-body`,children:o}),(0,H.jsx)(a,{"aria-label":F(`inputValue`,{label:o}),wrapperClassName:`nodrag nopan nowheel ml-auto h-6 w-[60%] min-w-0 px-1.5`,className:`font-mono text-xs`,value:r??s,disabled:!n||!t,onChange:t=>{i(t.target.value),t.target.value!==``&&n?.setConditionSide(e.target,[...e.at,1],t.target.value)},onBlur:()=>i(void 0)})]})},Gn=({node:e,editable:t})=>{let n=Y(),r=(0,H.jsx)(L,{id:tt,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-boolean`,style:{top:13}});return e.part.kind===`expression`?(0,H.jsxs)(`div`,{className:`relative grid gap-1 px-2 pt-1`,children:[r,(0,H.jsx)(Hn,{node:e,source:e.part.source}),(0,H.jsx)(`div`,{className:`-mx-2`,children:e.inputs.map(e=>(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center pr-2 pl-3`,children:[(0,H.jsx)(L,{id:B(e.key),type:`target`,position:I.Left,isConnectable:!1,className:`pb-pin pb-pin-${G(e.type)}`}),(0,H.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-body`,title:F(`pinTypeTitle`,{label:e.key,type:W(e.type)}),children:Un(e.key)})]},e.key))})]}):(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[r,e.inputs.map(r=>e.part.kind===`matches`&&r.key===`1`?(0,H.jsx)(Wn,{node:e,editable:t},r.key):(0,H.jsx)(hn,{pin:r,step:e.target,keys:[],name:Vn(e,r.key),bare:e.part.kind===`logic`&&Number(r.key)===e.part.sides.length,connectable:t,onValue:t=>n?.setConditionSide(e.target,[...e.at,Number(r.key)],t??``)},r.key))]})},Kn=(e,t)=>typeof t==`number`&&e.trim()!==``&&Number.isFinite(Number(e))?Number(e):typeof t==`boolean`&&(e===`true`||e===`false`)?e===`true`:e,qn=`nodrag nopan nowheel h-6 min-w-0 px-1.5`,Jn=({label:e,value:t,onChange:n,disabled:r})=>(0,H.jsx)(a,{"aria-label":e,wrapperClassName:`${qn} flex-1`,className:`text-xs`,value:String(t),disabled:r,onChange:e=>n(Kn(e.target.value,t))}),Yn=({node:e,editable:t})=>{let n=Y(),r=!n||!t,a=t=>n?.setArgument(e.target,[e.key],D(t)),{part:o}=e,s=(e,t)=>a({...o,cases:o.cases.map((n,r)=>r===e?{...n,...t}:n)});return(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:nt,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-${G(e.type)}`,style:{top:13}}),e.inputs.map(n=>(0,H.jsx)(hn,{pin:n,step:e.target,keys:[],name:F(`selectInput`),connectable:t,onValue:e=>a({...o,operand:{value:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:``}})},n.key)),o.cases.map((e,t)=>(0,H.jsxs)(`div`,{className:`flex h-[26px] items-center gap-1 pr-2 pl-3`,children:[(0,H.jsx)(Jn,{label:F(`selectWhen`,{case:t+1}),value:e.when,disabled:r,onChange:e=>s(t,{when:e})}),(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs text-muted-foreground`,children:`→`}),(0,H.jsx)(Jn,{label:F(`selectThen`,{case:t+1}),value:e.then,disabled:r,onChange:e=>s(t,{then:e})}),(0,H.jsx)(`button`,{type:`button`,className:`nodrag shrink-0 text-muted-foreground hover:text-foreground disabled:opacity-40`,"aria-label":F(`selectRemoveCase`,{case:t+1}),disabled:r||o.cases.length===1,onClick:()=>a({...o,cases:o.cases.filter((e,n)=>n!==t)}),children:(0,H.jsx)(i,{className:`size-3`,"aria-hidden":!0})})]},t)),(0,H.jsxs)(`div`,{className:`flex h-[26px] items-center gap-1 pr-2 pl-3`,children:[(0,H.jsx)(`span`,{className:`shrink-0 text-xs text-body`,children:F(`selectOtherwise`)}),(0,H.jsx)(Jn,{label:F(`selectOtherwise`),value:o.otherwise,disabled:r,onChange:e=>a({...o,otherwise:e})})]}),(0,H.jsx)(`button`,{type:`button`,className:`nodrag h-6 w-full px-3 text-left text-xs text-muted-foreground hover:text-foreground`,disabled:r,onClick:()=>a({...o,cases:[...o.cases,{when:``,then:``}]}),children:F(`selectAddCase`)})]})},Xn=e=>e.kind===`condition`?Pt(e):e.kind===`select`?F(`selectTitle`):e.kind===`break`?F(`breakTitle`,{type:W(e.type)}):F(`makeTitle`,{type:W(e.type)}),Zn=({pure:e})=>(0,H.jsx)(`div`,{className:`truncate border-b px-3 py-1.5 text-xs font-medium text-foreground`,children:Xn(e)}),Qn=({id:e,data:t,selected:n,isConnectable:r})=>{let{pureData:i,moved:a}=t;if(!i)return null;let{pure:o,shownInputs:s,shownOutputs:c,folded:l,open:d,foldable:f}=i;return(0,H.jsxs)(`div`,{className:u(`h-full rounded-lg border border-dashed border-border-strong bg-background text-body shadow-sm`,n&&`ring-2 ring-primary/40`),children:[a&&(0,H.jsx)(Sn,{node:e,name:Xn(o)}),(0,H.jsx)(Zn,{pure:o}),o.kind===`condition`?(0,H.jsx)(Gn,{node:o,editable:r}):o.kind===`select`?(0,H.jsx)(Yn,{node:o,editable:r}):o.kind===`break`?(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:$e,type:`target`,position:I.Left,isConnectable:!1,className:`pb-pin pb-pin-${G(o.type)}`,style:{top:13}}),c.map(e=>(0,H.jsx)(gn,{pin:e,connectable:r,field:!0},JSON.stringify(e.path))),f&&(0,H.jsx)(vn,{node:o.id,folded:l,open:d,fields:!0})]}):(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:et,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-${G(o.type)}`,style:{top:13}}),s.map(e=>(0,H.jsx)(hn,{pin:e,step:o.target,keys:[o.key,e.key],connectable:r},e.key)),(0,H.jsx)(vn,{node:o.id,folded:l,open:d})]})]})},$n=({offer:e,onClose:t})=>(0,H.jsxs)(`div`,{role:`dialog`,"aria-label":F(`pureOfferTitle`),className:`absolute z-10 grid gap-1 rounded-md border bg-background p-1 shadow-md`,style:{left:e.x,top:e.y},children:[e.choices.map((e,n)=>(0,H.jsx)(f,{size:`sm`,variant:`ghost`,className:`justify-start`,autoFocus:n===0,onClick:()=>{e.add(),t()},children:e.label},e.label)),(0,H.jsx)(f,{size:`sm`,variant:`ghost`,onClick:t,children:F(`pureOfferClose`)})]}),er=e=>typeof e==`object`&&!!e&&!Array.isArray(e),tr=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Z={kinds:[`boolean`]},nr=e=>e.sides.flatMap(e=>b(e)?nr(e):`read`in e?[e.read]:[]),rr=e=>!b(e)&&`read`in e&&`step`in e.read.base&&tr(e.read.path,[`Status`]),ir=(e,t)=>{if(t&&t.kinds!==`any`){let e=t.kinds.filter(e=>e!==`null`);if(e.length===1&&[`string`,`integer`,`number`,`boolean`].includes(e[0]))return{kinds:e}}return{kinds:[typeof e==`number`?`number`:typeof e==`boolean`?`boolean`:`string`]}},ar=e=>{let t=new Map;for(let[n,r]of re(e.stateMachine)){let i=`Assign`in r&&er(r.Assign)?r.Assign:{};for(let[r,a]of Object.entries(i)){let i=a===`{% $states.result %}`?ae(e.stateMachine,n)?.join(`/`):void 0;t.set(r,t.has(r)||i===void 0?null:i)}}return t},or=(e,t,n=[])=>{let r=new Map(re(e.stateMachine).map(([t,n])=>[ae(e.stateMachine,t).join(`/`),n])),i=ne(e)===`data`,a=new Map([[``,ce(e,t)],...[...r].map(([e,n])=>[e,[...le(n,t),...i?[fe]:[]]])]),o=new Map([...r].filter(([,e])=>i||e.Type===`Task`).map(([e,n])=>[e,[...i?[M(n)]:[],...se(n,t)]])),s=e=>[...r.keys()].find(t=>t.split(`/`).at(-1)===e),c=new Map,l=new Map,u=[],d=[],f=new Map,p=ar(e),m=(e,t,n,r=!1)=>{let i=`data:${e.node}|${e.handle}->${t}|${n}`;r&&f.has(i)||f.set(i,{id:i,source:e.node,sourceHandle:e.handle,target:t,targetHandle:n,type:e.type,...r&&{expression:!0}})},g=(e,t)=>{let n=e.find(e=>tr(e.path,t));return n||(n={path:t,type:_(void 0)},e.push(n)),n},y=(e,t)=>{let n=a.get(e),r=n.find(e=>tr(e.path,t)),i=n.some(e=>e.path.length>0&&e.path[0]!==`#status`);if(r||t.length===0||i&&t.length===1){let i=r??g(n,t);return{node:e,handle:V(i.path),type:i.type}}let o=S(e,t.slice(0,-1)),s=g(o.outputs,t.slice(-1));return{node:o.id,handle:V(s.path),type:s.type}},S=(n,i)=>{let a=Ye(n,i),o=c.get(a);if(o)return o;let s=ge(e,r.get(n),t,i),l={kind:`break`,id:a,source:n,path:i,type:_(s),outputs:de(s).map(([e,t])=>({path:[e],type:_(t)}))};return c.set(a,l),m(y(n,i),a,$e),l},C=(e,t,n)=>{let r=T(e);if(r)return m(r,t,n);for(let r of O(e)){let e=D(r);e&&m(e,t,n,!0)}},T=e=>{let t=ie(e);return t&&D(t)},D=e=>{if(`step`in e.base){let t=s(e.base.step);return t===void 0||!a.has(t)?void 0:y(t,[P,...e.path])}let t=`input`in e.base?``:p.get(e.base.variable);return t==null||!a.has(t)?void 0:y(t,e.path)},A=e=>{if(b(e)||!(`read`in e))return;if(!rr(e))return D(e.read);let t=s(e.read.base.step);return t===void 0||!a.has(t)?void 0:y(t,[P])},oe=(e,t,n,r)=>{let i=Ze(e,n),a=t.sides,o=a.map(A),s=a.map((e,n)=>{let r=String(n);if(b(e))return{key:r,type:Z,required:!1,value:void 0,state:`made`};if(`read`in e)return{key:r,type:o[n]?.type??_(void 0),required:!1,value:k(e.read),state:`wired`};if(`pattern`in e)return{key:r,type:{kinds:[`string`]},required:!1,value:e.pattern,state:`literal`};if(t.kind===`matches`)return{key:r,type:{kinds:[`string`]},required:!1,value:e.value,state:`literal`};if(t.kind!==`compare`)return{key:r,type:Z,required:!1,value:e.value,state:`literal`};let i=a[1-n];return rr(i)?{key:r,type:{kinds:[`string`]},required:!1,value:e.value,state:`literal`,options:x,statuses:!0}:{key:r,type:ir(e.value,o[1-n]?.type),required:!1,value:e.value,state:`literal`}});t.kind===`logic`&&s.push({key:String(a.length),type:Z,required:!1,value:void 0,state:`empty`}),u.push({kind:`condition`,id:i,target:e,at:n,part:t,inputs:s}),m({node:i,handle:tt,type:Z},r.node,r.handle),a.forEach((t,r)=>{b(t)?oe(e,t,[...n,r],{node:i,handle:B(String(r))}):o[r]&&m(o[r],i,B(String(r)))})},j=(e,t)=>{let n=E(t),r={node:e,handle:B(he)};if(n&&nr(n).every(e=>A({read:e})))return oe(e,n,[],r);let i=Ze(e,[]),a=O(t).flatMap(e=>{let t=A({read:e});return t?[{read:e,source:t}]:[]});u.push({kind:`condition`,id:i,target:e,at:[],part:{kind:`expression`,source:v(t)},inputs:a.map(({read:e,source:t})=>({key:te(e),type:t.type,required:!1,value:k(e),state:`wired`}))}),m({node:i,handle:tt,type:Z},r.node,r.handle);for(let{read:e,source:t}of a)m(t,i,B(te(e)),!0)},ue=(e,t)=>{let n=w(t.value),r=n&&A(n.operand);if(!n||`read`in n.operand&&!r)return!1;let i=Qe(e,t.key),a=`read`in n.operand?{key:rt,type:r.type,required:!1,value:k(n.operand.read),state:`wired`}:{key:rt,type:{kinds:[`string`]},required:!1,value:n.operand.value,state:`literal`};return d.push({kind:`select`,id:i,target:e,key:t.key,part:n,type:t.type,inputs:[a]}),m({node:i,handle:nt,type:t.type},e,B(t.key)),r&&m(r,i,B(rt)),!0},pe=(e,n)=>{let i=Xe(e,n),a=l.get(i);if(a)return a;let s=o.get(e)?.find(e=>e.key===n),c=r.get(e),u=h(ee(c,t),[n]),d=er(s?.value)?s.value:{},f=new Set(Array.isArray(u?.required)?u.required:[]),p=de(u).map(([e,t])=>N(e,t,d[e],f.has(e))),g=Object.keys(d).filter(e=>!p.some(t=>t.key===e)).map(e=>N(e,h(u,[e])??{},d[e],!1)),v={kind:`make`,id:i,target:e,key:n,type:s?.type??_(u),inputs:[...p,...g]};l.set(i,v),m({node:i,handle:et,type:v.type},e,B(n));for(let e of v.inputs)C(e.value,i,B(e.key));return v};for(let[e,t]of o)for(let[n,r]of t.entries()){if(r.key===`#condition`&&r.state===`expression`){t[n]={...r,state:`made`},j(e,r.value);continue}if(r.state===`expression`&&ue(e,r)){t[n]={...r,state:`made`};continue}r.state===`made`&&pe(e,r.key),(r.state===`wired`||r.state===`expression`)&&C(r.value,e,B(r.key))}for(let e of n)e.kind===`break`&&a.has(e.source)&&S(e.source,e.path),e.kind===`make`&&o.get(e.target)?.some(t=>t.key===e.key&&t.state!==`wired`&&t.state!==`expression`)&&pe(e.target,e.key);return{inputs:o,outputs:a,pure:[...c.values(),...l.values(),...u,...d],edges:[...f.values()]}},sr=e=>e.reason===`notBefore`?F(`refuseNotBefore`,{step:e.step}):e.reason===`otherScope`?F(`refuseOtherScope`,{step:e.step}):e.reason===`shapesOutput`?F(`refuseShaped`,{step:e.step}):e.reason===`type`?F(`refuseType`,{source:W(e.source),target:W(e.target)}):F(`refuseNotPins`),Q=e=>it(e)!==void 0||at(e)!==void 0,$=(e,t)=>({node:J(e),handle:t??``}),cr=e=>e!==`any`&&e.includes(`object`),lr=(e,t)=>e.map(e=>({label:Nt(e),add:()=>t(e)})),ur=(e,t)=>{let n=e=>e.kind===`break`?Ye(e.source,e.path):Xe(e.target,e.key),r=e=>e.kind===`break`&&t.some(t=>t.kind===`break`&&t.source===e.source&&t.path.every((t,n)=>e.path[n]===t));return e.filter(e=>!r(e)&&!t.some(t=>t.id===n(e)))},dr=(e,t,n,r,i)=>{let a=r?.edits,[o,s]=(0,R.useState)([]),[c,l]=(0,R.useState)(new Set),[u,d]=(0,R.useState)(),f=(0,R.useRef)({definition:e,editing:r});(0,R.useEffect)(()=>{f.current={definition:e,editing:r}});let p=(0,R.useMemo)(()=>n&&or(e,n,o),[e,n,o]),m=ne(e)===`data`,h=(0,R.useMemo)(()=>{if(p)return{sizes:Ut(t,p,c),pure:p.pure.map(e=>({id:e.id,parent:Jt(t,e)})),wires:p.edges.map(e=>({id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),ports:qt(t,p,c),dataOrder:m}},[t,p,c,m]),g=r&&{setArgument:(t,n,i)=>r.onChange(r.edits.setArgument(e,t,n,i)),setConditionSide:(t,n,i)=>r.onChange(r.edits.setConditionSide(e,t,n,{value:i})),setCondition:(t,n)=>r.onChange(r.edits.setArgument(e,t,[`#condition`],n)),toggleOpen:e=>l(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):new Set([...t,e]))},_=(t,n)=>{if(!p||!a||!Q(t.handle)||!Q(n.handle))return;let[r,i]=at(t.handle)?[t,n]:[n,t],o=a.wireRefusal(e,p,$(r.node,r.handle),$(i.node,i.handle));return o&&sr(o)},v=t=>!!(p&&a)&&a.wireRefusal(e,p,$(t.source,t.sourceHandle),$(t.target,t.targetHandle))===void 0,ee=t=>{r&&p&&r.onChange(r.edits.connectData(e,p,$(t.source,t.sourceHandle),$(t.target,t.targetHandle)))},y=(e,t,n)=>{if(!p||!a)return e;let r=e,i=n.flatMap(e=>{let t=e.data?.wire,n=t&&p.pure.find(e=>e.kind===`break`&&e.id===t.target||e.kind===`make`&&e.id===t.source);return n?[{id:n.id}]:[]}),o=[...t.filter(e=>q(e.id)),...i.filter(e=>!t.some(t=>t.id===e.id))],c=n.flatMap(e=>{let t=e.data?.wire;return t&&!o.some(e=>e.id===t.source||e.id===t.target)?[{wire:t}]:[]}),l=o.flatMap(e=>p.pure.filter(t=>t.id===e.id).map(e=>({pure:e}))),u=[...c,...l];for(let e of lt(p,u,e=>`wire`in e?ot(p,e.wire):st(e.pure)))r=`wire`in e?a.disconnectData(r,p,e.wire):a.removePure(r,p,e.pure);return o.length>0&&s(e=>ur(e,o.flatMap(e=>p.pure.filter(t=>t.id===e.id)))),r},te=(e,t)=>{let{definition:n,editing:r}=f.current;r?.onChange(r.edits.addSelect(n,e,t))},b=(e,t,n)=>{let{definition:r,editing:i}=f.current;i?.onChange(i.edits.addCondition(r,e,t,n))};return{data:p,open:c,layout:h,actions:g,check:_,isValid:v,connect:ee,remove:y,connectEnd:(e,t)=>{if(!p||!r||t.isValid||t.toHandle||!t.fromHandle?.id||!t.fromNode)return;let n=J(t.fromNode.id),a=t.fromHandle.id,o=`changedTouches`in e?e.changedTouches[0]:e,c=i.current?.getBoundingClientRect(),l={x:o.clientX-(c?.left??0),y:o.clientY-(c?.top??0)},u=at(a);if(u){let e=p.pure.find(e=>e.id===n),t=(e?.kind===`break`?e.outputs:p.outputs.get(n)??[]).find(e=>JSON.stringify(e.path)===JSON.stringify(u))?.type;if(!t||!cr(t.kinds))return;let r=e?.kind===`break`?{source:e.source,path:[...e.path,...u]}:{source:n,path:u};d({...l,choices:[{label:F(`breakTitle`,{type:W(t)}),add:()=>s(e=>[...e,{kind:`break`,...r}])}]});return}let f=it(a),m=p.pure.find(e=>e.id===n);if(m?.kind===`condition`){let e=m.inputs.find(e=>e.key===f);if(!e||e.state!==`literal`&&e.state!==`empty`||m.part.kind!==`logic`&&m.part.kind!==`not`)return;d({...l,choices:lr(r.edits.conditionChoices(!1),e=>b(m.target,[...m.at,Number(f)],e))});return}let h=f===void 0?void 0:p.inputs.get(n)?.find(e=>e.key===f);if(h?.key===`#condition`&&h.state===`empty`){d({...l,choices:lr(r.edits.conditionChoices(!0),e=>b(n,[],e))});return}if(h&&h.key!==`#condition`&&!cr(h.type.kinds)&&(h.state===`empty`||h.state===`literal`)){d({...l,choices:[{label:F(`selectOffer`),add:()=>te(n,h.key)}]});return}h&&cr(h.type.kinds)&&h.state!==`wired`&&h.state!==`expression`&&d({...l,choices:[{label:F(`makeTitle`,{type:W(h.type)}),add:()=>s(e=>[...e,{kind:`make`,target:n,key:h.key}])}]})},offer:u,closeOffer:()=>d(void 0)}},fr=(0,R.createContext)(void 0),pr=({fromX:e,fromY:t,toX:n,toY:r,fromPosition:i,toPosition:a,connectionStatus:o,fromNode:s,fromHandle:c,toNode:l,toHandle:u})=>{let d=(0,R.useContext)(fr),[f]=_e({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a}),p=o===`invalid`&&l&&u?.id&&c.id?d?.({node:s.id,handle:c.id},{node:l.id,handle:u.id}):void 0;return(0,H.jsxs)(`g`,{className:p?`pb-wire-refused`:void 0,children:[(0,H.jsx)(`path`,{d:f,fill:`none`,className:`react-flow__connection-path`}),p&&(0,H.jsx)(`foreignObject`,{x:n+12,y:r-30,width:260,height:28,className:`overflow-visible`,children:(0,H.jsx)(`div`,{className:`inline-block rounded border border-danger bg-danger-soft px-1.5 py-0.5 text-xs whitespace-nowrap text-danger-text shadow`,children:p})})]})},mr=(e,t)=>{let n=De(),[r,i]=(0,R.useState)(),a=(0,R.useMemo)(()=>JSON.stringify(xt(e,t)),[e,t]);return(0,R.useEffect)(()=>{if(!n)return;let e=!0;return Ct(n,JSON.parse(a)).then(t=>{e&&i(t)}),()=>{e=!1}},[n,a]),r},hr={state:Pn,trigger:Fn,pure:Qn},gr=e=>e?.kind===`state`?e.scope.join(`/`):``,_r=({laidOut:e,tidied:t})=>{let n=ye();return(0,R.useEffect)(()=>{e&&n.fitView({maxZoom:1,padding:.1})},[e,t]),null},vr=()=>{let e=ye(),t=xe(e=>e.width),n=(0,R.useRef)(t);return(0,R.useEffect)(()=>{let r=n.current;if(n.current=t,r===0||t===0||t===r)return;let{x:i,y:a,zoom:o}=e.getViewport();e.setViewport({x:i+(t-r)/2,y:a,zoom:o})},[t,e]),null},yr=({laidOut:e,ids:t})=>{let n=Ee();return(0,R.useEffect)(()=>{e&&n(t)},[e]),null},br=new Map,xr=({definition:e,problems:t,warnings:n,selected:i,onSelect:a,onChange:o,edits:s,onAddAt:c,traces:l,types:u,schemas:d,fills:p=!1,layout:h,onLayoutChange:g})=>{let _=o&&s&&{onChange:o,edits:s},v=(0,R.useMemo)(()=>ht(e),[e]),ee=(0,R.useRef)(null),[y,te]=Bn(),b=dr(e,v,y===`pins`?d:void 0,_,ee),x=mr(v,b.layout),S=(0,R.useMemo)(()=>new Map(v.nodes.map(e=>[e.id,e])),[v]),re=JSON.stringify(h??{}),C=(0,R.useMemo)(()=>pe(re),[re]),w=C[y],T=e=>g?.({...C,[y]:e}),E=(0,R.useMemo)(()=>new Map([...v.nodes.map(e=>[e.id,me(e.id)]),...(b.data?.pure??[]).map(e=>[e.id,me(e.id,e)])]),[v,b.data]),D=(0,R.useMemo)(()=>new Map([...E].flatMap(([e,t])=>Object.hasOwn(w,t)?[[e,w[t]]]:[])),[E,w]),O=(0,R.useMemo)(()=>{if(!x)return;let e=new Map((b.data?.pure??[]).map(e=>[e.id,e]));return ue(x,D,t=>{let n=S.get(t);return e.has(t)?Jt(v,e.get(t)):n?.kind===`state`?n.parent:void 0})},[x,D,S,v,b.data]),k=!!g,[ie,ae]=(0,R.useState)(br),[A,j]=(0,R.useState)(0),M=ne(e)===`data`,[N,se]=(0,R.useState)(()=>new Set(i===void 0?[]:[K(i)]));(0,R.useEffect)(()=>{se(e=>i===void 0?e.size===1&&!q([...e][0])?new Set:e:e.has(K(i))?e:new Set([K(i)]))},[i]);let ce=(0,R.useMemo)(()=>[...Zt(v,O,t,i,l,u,n,b.data&&{data:b.data,open:b.open},M),...b.data?rn(v,b.data,O,b.open):[]].map(e=>{let t=ie.get(e.id),n=D.has(J(e.id));return{...e,selected:N.has(e.id),draggable:k,...t&&{position:t},...n&&{data:{...e.data,moved:!0},...e.ariaLabel&&{ariaLabel:`${e.ariaLabel}, ${F(`movedByHand`)}`}}}}),[v,O,t,i,l,u,n,b.data,b.open,M,N,ie,D,k]),[le,de]=(0,R.useState)(),fe=(0,R.useMemo)(()=>[...M&&b.data?an(v,b.data):nn(v,M),...b.data?on(b.data):[]].map(e=>({...e,selected:e.id===le})),[v,b.data,le,M]),P=!!_,he=e=>{if(Q(e.sourceHandle)||Q(e.targetHandle))return Q(e.sourceHandle)&&Q(e.targetHandle)&&b.isValid(e);if(e.targetHandle!==`in`)return!1;let t=S.get(J(e.target)),n=S.get(J(e.source));return t?.kind===`state`&&gr(n)===gr(t)},ge=e=>{ae(br);let t=[...e].flatMap(([e,t])=>{let n=J(e),r=E.get(n),i=O?.get(n),a={x:Math.round(t.x),y:Math.round(t.y)};return r===void 0||!D.has(n)&&i&&Math.round(i.x)===a.x&&Math.round(i.y)===a.y?[]:[[r,a]]});t.length>0&&T({...w,...Object.fromEntries(t)})},_e=g&&(e=>{let t=E.get(J(e));t!==void 0&&T(oe(w,t))}),I=()=>{T({}),j(e=>e+1)},ve=e=>{let t=new Map;for(let n of e){if(n.type!==`position`||!n.position||!k)continue;let e=n.position;n.dragging?ae(t=>new Map(t).set(n.id,e)):t.set(n.id,e)}t.size>0&&ge(t);let n=e.filter(e=>e.type===`select`);if(n.length===0)return;let r=new Set(N);for(let e of n)e.selected?r.add(e.id):r.delete(e.id);se(r);let[o]=r.size===1?[...r]:[],s=o===void 0||q(o)?void 0:J(o);if(s!==void 0&&(ye||xe.current))return i===void 0?void 0:a(void 0);s!==i&&a(s)},ye=we(`Shift`),xe=(0,R.useRef)(!1);return(0,H.jsx)(sn.Provider,{value:_?c:void 0,children:(0,H.jsx)(bn.Provider,{value:_e,children:(0,H.jsx)(ln.Provider,{value:b.actions,children:(0,H.jsx)(fr.Provider,{value:b.check,children:(0,H.jsxs)(`div`,{ref:ee,className:`relative h-full w-full`,children:[(0,H.jsxs)(Ce,{className:`pb-workflow`,nodes:ce,edges:fe,nodeTypes:hr,nodesDraggable:k,nodeDragThreshold:4,selectNodesOnDrag:!1,nodesConnectable:P,connectOnClick:!1,connectionDragThreshold:4,edgesFocusable:P,elementsSelectable:!0,deleteKeyCode:P?[`Backspace`,`Delete`]:null,onNodesChange:ve,onEdgesChange:e=>{for(let t of e)t.type===`select`&&(t.selected?de(t.id):de(e=>e===t.id?void 0:e))},isValidConnection:he,onConnect:t=>{if(_&&t.sourceHandle){if(Q(t.sourceHandle))return b.connect(t);_.onChange(_.edits.connect(e,t.sourceHandle,J(t.source),J(t.target)))}},onConnectEnd:b.connectEnd,connectionLineComponent:pr,onDelete:({nodes:t,edges:n})=>{if(!_)return;let r=t.filter(e=>!q(e.id)).map(e=>J(e.id)).filter(e=>e!==``),i=b.remove(e,t,n);for(let e of n){let t=e.data;t.kind!==`data`&&!r.includes(t.source)&&!r.includes(J(e.target))&&(i=_.edits.disconnect(i,t))}for(let e of r)r.some(t=>e.startsWith(`${t}/`))||(i=_.edits.removeState(i,e));_.onChange(i)},multiSelectionKeyCode:`Shift`,onSelectionStart:()=>void(xe.current=!0),onSelectionEnd:()=>void(xe.current=!1),onNodeClick:(e,t)=>!e.shiftKey&&!q(t.id)&&a(J(t.id)),onPaneClick:()=>a(void 0),zoomOnScroll:!0,panOnScroll:!1,panOnDrag:[0,1,2],selectionOnDrag:!1,selectionKeyCode:`Shift`,preventScrolling:!0,onPaneContextMenu:e=>e.preventDefault(),minZoom:.2,maxZoom:1.5,"aria-label":F(`canvas`),children:[(0,H.jsx)(Te,{gap:16}),d&&(0,H.jsx)(be,{position:`top-left`,children:(0,H.jsx)(r,{label:F(`graphView`),value:y,onChange:te,options:[{value:`pins`,label:F(`viewPins`)},{value:`simple`,label:F(`viewSimple`)}]})}),k&&Object.keys(w).length>0&&(0,H.jsx)(be,{position:`top-right`,children:(0,H.jsxs)(f,{title:F(`tidyUpHelp`),onClick:I,children:[(0,H.jsx)(m,{className:`size-3.5`,"aria-hidden":!0}),F(`tidyUp`)]})}),(0,H.jsx)(Se,{showInteractive:!1}),(0,H.jsx)(_r,{laidOut:x,tidied:A}),p&&(0,H.jsx)(vr,{}),(0,H.jsx)(yr,{laidOut:O,ids:ce.map(e=>e.id)})]}),b.offer&&(0,H.jsx)($n,{offer:b.offer,onClose:b.closeOffer})]})})})})})},Sr=e=>(0,H.jsx)(ve,{children:(0,H.jsx)(xr,{...e})});export{it as a,Le as c,Pe as d,je as f,ze as g,Be as h,ot as i,Ue as l,Ve as m,cn as n,at as o,Me as p,lt as r,Ke as s,Sr as t,Fe as u};
|
|
4
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Io as r,On as i,Tc as a,Uo as o,_o as s,bu as c,kc as l,ol as u,ps as d,sl as f}from"./app-CONqqVEp.js";import{t as p}from"./circle-alert-X92Rz4B3.js";import{t as m}from"./layout-grid-0SB37tX1.js";import{E as h,M as g,O as _,P as v,S as ee,_ as y,b as te,c as b,d as x,g as S,h as ne,j as re,k as C,l as w,m as T,o as E,u as D,v as O,x as k,y as ie}from"./workflows-Bey4jszG.js";import{C as ae,S as A,a as oe,b as j,c as M,d as N,f as se,g as ce,h as le,i as ue,l as de,m as fe,o as pe,p as P,r as me,s as he,u as ge}from"./use-run-trace-Dfgd79SI.js";import{n as F}from"./use-workflow-types-DdclcEcs.js";import{E as _e,a as I}from"./lib-xyflow-system-hojcPWkY.js";import{a as ve,c as ye,i as be,l as xe,n as Se,o as Ce,r as L,s as we,t as Te,u as Ee}from"./lib-xyflow-react-CuNAzocq.js";import{t as De}from"./use-elk-u1Ql5AOs.js";var Oe={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};Oe.node;var ke=u(Oe),R=e(t(),1),Ae={"app:http":()=>F(`stepHttp`),"app:records.create":()=>F(`stepRecordsCreate`),"app:records.update":()=>F(`stepRecordsUpdate`),"app:records.get":()=>F(`stepRecordsGet`),"app:records.list":()=>F(`stepRecordsList`),"app:mail.send":()=>F(`stepMailSend`),"app:mail.template":()=>F(`stepMailTemplate`),"app:piece":()=>F(`stepPiece`)},je=(e,t)=>Ae[e]?.()??t??e,Me=(e,t)=>{let n=je(e,t),r=T(e);return r?F(`stepTypeVersion`,{type:n,version:r.version}):n},Ne={Pass:()=>F(`typePass`),Choice:()=>F(`typeChoice`),Wait:()=>F(`typeWait`),Map:()=>F(`typeMap`),Block:()=>F(`typeBlock`),Succeed:()=>F(`typeSucceed`),Fail:()=>F(`typeFail`)},Pe=e=>Ne[e]?.()??e,Fe=(e,t)=>{if(e.Type!==`Task`)return Pe(e.Type);let{type:n,waits:r}=C(String(e.Resource)),i=je(n,t?.step_types.find(e=>e.id===n)?.label);return r?F(`stepTypeWaits`,{type:i}):i},Ie={url:()=>F(`inputUrl`),method:()=>F(`inputMethod`),headers:()=>F(`inputHeaders`),query:()=>F(`inputQuery`),body:()=>F(`inputBody`),response:()=>F(`inputResponse`),resource:()=>F(`inputResource`),data:()=>F(`inputData`),key:()=>F(`inputKey`),filter:()=>F(`inputFilter`),order_by:()=>F(`inputOrderBy`),limit:()=>F(`inputLimit`),to:()=>F(`inputTo`),subject:()=>F(`inputSubject`),text:()=>F(`inputText`),html:()=>F(`inputHtml`),attachments:()=>F(`inputAttachments`),piece:()=>F(`inputPiece`),action:()=>F(`inputAction`),connection:()=>F(`inputConnection`),props:()=>F(`inputProps`),when:()=>F(`inputWhen`),body_schema:()=>F(`inputBodySchema`)},Le=(e,t)=>Ie[e]?.()??t??e,Re={manual:()=>F(`triggerManual`),"app:record":()=>F(`triggerRecord`)},ze=(e,t)=>Re[e]?.()??t??e,Be=e=>Object.keys(e??{})[0],Ve=(e,t)=>{let n=Be(e);return n===void 0?F(`triggerUnknown`):ze(n,t?.triggers.find(e=>e.id===n)?.label)},He={succeeded:()=>F(`traceSucceeded`),caught:()=>F(`traceCaught`),retrying:()=>F(`traceRetrying`),failed:()=>F(`traceFailed`),current:()=>F(`traceCurrent`)},Ue=e=>He[e](),We=(e,t)=>t?.step_types.find(t=>t.id===C(e.Resource).type)?.cache,Ge=(e,t)=>e.Type===`Task`&&e.Cache===!0&&We(e,t)?.choice===`discouraged`,Ke=(e,t)=>{let n=We(e,t);if(n?.choice!==`hidden`)return n?.choice===`switch`?{on:e.Cache??n.default===!0,forces:!1,offValue:!1,disclaimer:void 0}:{on:e.Cache===!0,forces:!0,offValue:void 0,disclaimer:n?.choice===`discouraged`?n.disclaimer:void 0}},z=e=>encodeURIComponent(e),qe=e=>e.map(e=>`/${z(e)}`).join(``),Je=e=>e===``?[]:e.split(`/`).slice(1).map(decodeURIComponent),Ye=(e,t)=>`break:${z(e)}|${qe(t)}`,Xe=(e,t)=>`make:${z(e)}|${z(t)}`,Ze=(e,t)=>`when:${z(e)}|${t.join(`/`)}`,Qe=(e,t)=>`select:${z(e)}|${z(t)}`,B=e=>`in:${z(e)}`,V=e=>`out:${qe(e)}`,$e=`break-in`,et=`make-out`,tt=`condition-out`,nt=`select-out`,rt=`value`,it=e=>e?.startsWith(`in:`)?decodeURIComponent(e.slice(3)):void 0,at=e=>e?.startsWith(`out:`)?Je(e.slice(4)):void 0,H=e(n(),1),ot=(e,t)=>{let n=e.pure.find(e=>e.id===t.target),r=it(t.targetHandle);return n?.kind===`condition`&&r!==void 0?{step:n.target,at:[...n.at,Number(r)]}:void 0},st=e=>e.kind===`condition`?{step:e.target,at:e.at}:void 0,ct=(e,t)=>{for(let n=0;n<Math.min(e.length,t.length);n++)if(e[n]!==t[n])return e[n]-t[n];return e.length-t.length},lt=(e,t,n)=>{let r=new Map,i=[];for(let e of t){let t=n(e);if(!t){i.push(e);continue}let a=`step:${t.step}`;r.has(a)||(r.set(a,[]),i.push(a)),r.get(a).push({removal:e,at:t.at})}return i.flatMap(e=>typeof e==`string`&&r.has(e)?r.get(e).toSorted((e,t)=>ct(t.at,e.at)).map(({removal:e})=>e):[e])},ut=e=>e.Type===`Choice`&&Array.isArray(e.Choices)?e.Choices:[],dt=e=>`Catch`in e&&Array.isArray(e.Catch)?e.Catch:[],ft=(e,t,n,r)=>{let i=A(t,n),a=(n,r,a,o)=>Object.hasOwn(e.States,a)?[{id:`${i}\n${r}`,kind:n,source:i,target:A(t,a),field:r,...o!==void 0&&{label:o}}]:[];return[...`Next`in r&&typeof r.Next==`string`?a(`next`,`Next`,r.Next):[],...ut(r).flatMap((e,t)=>a(`rule`,`Choices[${t}].Next`,e.Next,e.Condition)),...r.Type===`Choice`&&typeof r.Default==`string`?a(`default`,`Default`,r.Default):[],...dt(r).flatMap((e,t)=>e.Next===void 0?[]:a(`catch`,`Catch[${t}].Next`,e.Next,Array.isArray(e.ErrorEquals)?e.ErrorEquals.join(`, `):void 0))]},pt=(e,t)=>{let n=t.length>0?t.join(`/`):void 0,r=Object.entries(e.States).map(([r,i])=>{let a={kind:`state`,id:A(t,r),name:r,state:i,scope:t,...n!==void 0&&{parent:n},first:e.StartAt===r},o=g(i),s=o?.States?pt(o,[...t,r]):{nodes:[],edges:[]};return{nodes:[a,...s.nodes],edges:[...ft(e,t,r,i),...s.edges]}});return{nodes:r.flatMap(e=>e.nodes),edges:r.flatMap(e=>e.edges)}},mt=(e,t,n)=>[...y(e)].flatMap(([r,i])=>{let a=A(t,r),o=[...S(i)].map(e=>{let n=i.data.has(e)?`reads`:`status`;return{id:`${A(t,e)}\n${n}\n${a}`,kind:n,source:A(t,e),target:a,field:n}}),s=g(e.States[r]),c=s?.States?mt(s,[...t,r],!1):[];return[...n&&o.length===0?[{id:`\nStart\n${a}`,kind:`start`,source:``,target:a,field:`StartAt`}]:[],...o,...c]}),ht=e=>{let t=e.stateMachine,n=pt(t,[]);if(ne(e)===`data`)return{nodes:[{kind:`trigger`,id:``,trigger:e.trigger},...n.nodes.map(e=>e.kind===`state`?{...e,first:!1}:e)],edges:mt(t,[],!0)};let r=t.StartAt!==void 0&&Object.hasOwn(t.States,t.StartAt)?[{id:`
|
|
2
|
+
StartAt`,kind:`start`,source:``,target:t.StartAt,field:`StartAt`}]:[];return{nodes:[{kind:`trigger`,id:``,trigger:e.trigger},...n.nodes],edges:[...r,...n.edges]}},U={width:224,height:64},gt=(e,t)=>`${e}\u0000${t}`,_t={"elk.algorithm":`layered`,"elk.direction":`RIGHT`,"elk.hierarchyHandling":`INCLUDE_CHILDREN`,"elk.layered.spacing.nodeNodeBetweenLayers":`72`,"elk.spacing.nodeNode":`32`,"elk.edgeLabels.inline":`false`},vt={"elk.layered.layering.strategy":`LONGEST_PATH`},yt={"elk.padding":`[top=48,left=24,bottom=24,right=24]`},bt=e=>e.kind===`state`&&j(e.state),xt=(e,t={})=>{let n=e=>{let n=t.sizes?.get(e)??U,r=t.ports?.get(e);return r?.length?{id:e,...n,layoutOptions:{"elk.portConstraints":`FIXED_POS`},ports:r.map(t=>({id:gt(e,t.handle),x:t.side===`in`?0:n.width,y:t.y,width:0,height:0,layoutOptions:{"elk.port.side":t.side===`in`?`WEST`:`EAST`}}))}:{id:e,...n}},r=(e,n)=>n!==void 0&&t.ports?.get(e)?.some(e=>e.handle===n)?gt(e,n):e,i=e=>(t.pure??[]).filter(t=>t.parent===e).map(e=>n(e.id)),a=t=>{if(!bt(t))return n(t.id);let r=e.nodes.filter(e=>e.kind===`state`&&e.parent===t.id);return{id:t.id,layoutOptions:yt,children:[...r.map(a),...i(t.id)],edges:s(t.id)}},o=n=>{let r=t.pure?.find(e=>e.id===n);if(r)return r.parent;let i=e.nodes.find(e=>e.id===n);return i?.kind===`state`?i.parent:void 0},s=n=>[...e.edges.filter(e=>o(e.target)===n).map(e=>({id:e.id,sources:[e.source],targets:[e.target]})),...(t.wires??[]).filter(e=>o(e.target)===n&&o(e.source)===n).map(e=>({id:e.id,sources:[r(e.source,e.sourceHandle)],targets:[r(e.target,e.targetHandle)]}))],c=e.nodes.filter(e=>e.kind===`trigger`||e.parent===void 0);return{id:`root`,layoutOptions:t.dataOrder?{..._t,...vt}:_t,children:[...c.map(a),...i(void 0)],edges:s(void 0)}},St=e=>{let t=new Map,n=e=>{for(let r of e.children??[])t.set(r.id,{x:r.x??0,y:r.y??0,width:r.width??U.width,height:r.height??U.height}),n(r)};return n(e),t},Ct=async(e,t)=>St(await e.layout(t)),wt=24,Tt=8,Et=(e,t)=>{let n=t?[...e]:e.filter(e=>e.required||e.state!==`empty`);return{shown:n,folded:e.length-n.length}},Dt=(e,t,n,r=52)=>r+Math.max(e,typeof t==`number`?t:t.length)*26+(n?wt:0)+Tt,Ot={string:()=>F(`typeString`),integer:()=>F(`typeInteger`),number:()=>F(`typeNumber`),boolean:()=>F(`typeBoolean`),object:()=>F(`typeObject`),array:()=>F(`typeArray`),null:()=>F(`typeNull`),any:()=>F(`typeAny`)},W=e=>e.title===void 0?e.kinds===`any`?Ot.any():e.kinds.map(e=>Ot[e]()).reduce((e,t)=>F(`typeOr`,{first:e,second:t})):e.title,G=e=>e.kinds===`any`?`any`:e.kinds[0],kt={status:()=>F(`outputStatus`),headers:()=>F(`outputHeaders`),body:()=>F(`outputBody`),record:()=>F(`outputRecord`),resource:()=>F(`outputResource`),key:()=>F(`outputKey`),records:()=>F(`outputRecords`),message_id:()=>F(`outputMessageId`)},At=(e,t=!1,n=!1)=>{if(e.length===0)return F(t?`pinRunInput`:`pinResult`);if(e.length===1&&e[0]===`#status`)return F(`stepStatusType`);let r=e.at(-1);return n||!Object.hasOwn(kt,r)?r:kt[r]()},jt=e=>e===`#condition`?F(`onlyWhen`):Le(e),Mt={"=":()=>F(`conditionEquals`),"!=":()=>F(`conditionNotEquals`),">":()=>F(`conditionGreater`),"<":()=>F(`conditionLess`),matches:()=>F(`conditionMatches`),and:()=>F(`conditionAnd`),or:()=>F(`conditionOr`),not:()=>F(`conditionNot`),expression:()=>F(`conditionExpression`)},Nt=e=>Mt[e](),Pt=({part:e})=>Nt(e.kind===`compare`||e.kind===`logic`?e.op:e.kind),Ft={SUCCEEDED:()=>F(`statusSucceeded`),FAILED:()=>F(`statusFailed`),TIMED_OUT:()=>F(`statusTimedOut`),ABORTED:()=>F(`statusAborted`),SKIPPED:()=>F(`statusSkipped`)},It=e=>Object.hasOwn(Ft,e)?Ft[e]():e,Lt=34,Rt=280,zt=8,Bt=(e,t)=>e.kind===`condition`?{shown:e.inputs,folded:0}:e.kind===`make`?Et(e.inputs,t||e.inputs.length<=zt):{shown:[],folded:0},Vt=(e,t,n)=>{let r=new Set(t.filter(t=>t.source===e.id).map(e=>e.sourceHandle)),i=e.outputs.filter(e=>r.has(V(e.path))),a=i.length>0&&i.length<e.outputs.length;return n||!a?{shown:e.outputs,folded:0,foldable:a}:{shown:i,folded:e.outputs.length-i.length,foldable:a}},Ht=e=>106+e*26+8,Ut=(e,t,n)=>{let r=new Map;for(let i of e.nodes){if(i.kind===`state`&&j(i.state))continue;let{shown:e,folded:a}=Et(t.inputs.get(i.id)??[],n.has(i.id));r.set(i.id,{width:296,height:Dt(e.length,t.outputs.get(i.id)??[],a>0||n.has(i.id))})}for(let e of t.pure){if(e.kind===`condition`&&e.part.kind===`expression`){r.set(e.id,{width:216,height:Ht(e.inputs.length)});continue}if(e.kind===`select`){r.set(e.id,{width:Rt,height:Dt(e.part.cases.length+3,1,!1,Lt)});continue}if(e.kind===`break`){let i=Vt(e,t.edges,n.has(e.id));r.set(e.id,{width:216,height:Dt(0,i.shown.length,i.foldable,Lt)});continue}let{shown:i,folded:a}=Bt(e,n.has(e.id));r.set(e.id,{width:216,height:Dt(i.length,1,e.kind===`make`&&(a>0||n.has(e.id)),Lt)})}return r},Wt=(e,t)=>e+t*26+13,Gt=13,Kt=38,qt=(e,t,n)=>{let r=new Map;for(let i of e.nodes){if(i.kind===`state`&&j(i.state))continue;let{shown:e}=Et(t.inputs.get(i.id)??[],n.has(i.id));r.set(i.id,[...e.map((e,t)=>({handle:B(e.key),side:`in`,y:Wt(52,t)})),...(t.outputs.get(i.id)??[]).map((e,t)=>({handle:V(e.path),side:`out`,y:Wt(52,t)}))])}for(let e of t.pure){let i=(e,t=Kt)=>e.map((e,n)=>({handle:B(e.key),side:`in`,y:Wt(t,n)}));if(e.kind===`break`){let{shown:i}=Vt(e,t.edges,n.has(e.id));r.set(e.id,[{handle:$e,side:`in`,y:Gt},...i.map((e,t)=>({handle:V(e.path),side:`out`,y:Wt(Kt,t)}))])}else if(e.kind===`make`)r.set(e.id,[{handle:et,side:`out`,y:Gt},...i(Bt(e,n.has(e.id)).shown)]);else if(e.kind===`select`)r.set(e.id,[{handle:nt,side:`out`,y:Gt},...i(e.inputs)]);else{let t=e.part.kind===`expression`?Kt+64+4:Kt;r.set(e.id,[{handle:tt,side:`out`,y:Gt},...i(e.inputs,t)])}}return r},Jt=(e,t)=>{let n=e.nodes.find(e=>e.id===(t.kind===`break`?t.source:t.target));return n?.kind===`state`?n.parent:void 0},Yt=`trigger`,K=e=>e===``?Yt:`state:${e}`,q=e=>e!==Yt&&!e.startsWith(`state:`),J=e=>e===Yt?``:e.startsWith(`state:`)?e.slice(6):e,Xt=(e,t,n)=>{let{shown:r,folded:i}=Et(e.inputs.get(t)??[],n);return{inputs:r,outputs:e.outputs.get(t)??[],folded:i,open:n}},Zt=(e,t,n,r,i,a,o,s,c=!1)=>e.nodes.map(e=>{let l=t?.get(e.id)??{x:0,y:0,...U},u=e.kind===`state`?e.parent:void 0,d=e.kind===`trigger`?Ve(e.trigger,a):Fe(e.state,a),f=e.kind===`state`&&Ge(e.state,a),p=e.kind===`state`?F(`stateNode`,{name:e.name,type:d}):F(`triggerNode`,{trigger:d}),m=o?.get(e.id)??[],h=[...f?[F(`cacheForcedAgainst`)]:[],...m.map(e=>e.message)];return{id:K(e.id),type:e.kind,ariaLabel:[p,...h].join(`, `),position:{x:l.x,y:l.y},width:l.width,height:l.height,measured:{width:l.width,height:l.height},data:{node:e,kind:d,problems:n.get(e.id)??[],...i?.has(e.id)&&{trace:i.get(e.id)},...f&&{cacheWarning:f},...m.length>0&&{warnings:m},...s&&{pins:Xt(s.data,e.id,s.open.has(e.id))},...c&&{dataOrder:c}},draggable:!1,deletable:e.kind===`state`,selected:e.id===r,...u!==void 0&&{parentId:K(u),extent:`parent`}}}),Qt=40,$t=e=>e.length>Qt?`${e.slice(0,39)}…`:e,en=e=>{if(e.kind==="default")return F(`otherwise`);if(e.kind===`catch`)return F(`onError`,{errors:e.label??``});if(e.kind===`rule`)return e.label?$t(e.label):F(`conditionToWrite`)},tn=e=>({id:e.id,source:K(e.source),sourceHandle:`out`,target:K(e.target),targetHandle:`in`,deletable:!1,data:{kind:e.kind,field:e.field,source:e.source},...e.kind===`status`&&{className:`pb-workflow-status`}}),nn=(e,t=!1)=>e.edges.map(e=>{if(t)return tn(e);let n=en(e);return{id:e.id,source:K(e.source),sourceHandle:e.kind,target:K(e.target),targetHandle:`in`,deletable:e.kind!==`start`,data:{kind:e.kind,field:e.field,source:e.source},...n!==void 0&&{label:n},...e.kind===`catch`&&{className:`pb-workflow-catch`}}}),rn=(e,t,n,r)=>t.pure.map(i=>{let a=n?.get(i.id)??{x:0,y:0,...U},o=Jt(e,i),{shown:s,folded:c}=Bt(i,r.has(i.id)),l=i.kind===`break`?Vt(i,t.edges,r.has(i.id)):void 0,u=e.nodes.find(e=>e.id===(i.kind===`break`?i.source:i.target));return{id:i.id,type:`pure`,position:{x:a.x,y:a.y},width:a.width,height:a.height,measured:{width:a.width,height:a.height},data:{node:u,kind:i.kind,problems:[],pureData:{pure:i,shownInputs:s,shownOutputs:l?.shown??[],folded:l?.folded??c,open:r.has(i.id),foldable:l?l.foldable:c>0||r.has(i.id)}},draggable:!1,deletable:!0,...o!==void 0&&{parentId:K(o),extent:`parent`}}}),an=(e,t)=>{let n=e=>{let n=t.pure.find(t=>t.id===e);return n?n.kind===`break`?n.source:n.target:e},r=new Set(t.edges.map(e=>`${n(e.source)}\n${n(e.target)}`));return nn({...e,edges:e.edges.filter(e=>e.source!==``&&!r.has(`${e.source}\n${e.target}`))},!0)},on=e=>{let t=new Set(e.pure.map(e=>e.id)),n=e=>t.has(e)?e:K(e);return e.edges.map(e=>({id:e.id,source:n(e.source),sourceHandle:e.sourceHandle,target:n(e.target),targetHandle:e.targetHandle,deletable:!e.expression,data:{kind:`data`,wire:e},className:`pb-wire pb-wire-${G(e.type)}${e.expression?` pb-wire-expression`:``}`}))},sn=(0,R.createContext)(void 0),cn={succeeded:`green`,caught:`amber`,retrying:`amber`,failed:`red`,current:`blue`},ln=(0,R.createContext)(void 0),Y=()=>(0,R.useContext)(ln),un=e=>{if(e.options)return`choice`;if(e.type.kinds===`any`)return;let[t,...n]=e.type.kinds.filter(e=>e!==`null`);if(t===`string`&&n.every(e=>e===`integer`||e===`number`))return`string`;if(!(n.length>0))return t===`integer`||t===`number`?`number`:t===`boolean`?`boolean`:void 0},dn=e=>e.trim()===``?void 0:Number.isNaN(Number(e))?e:Number(e),fn=({name:e,className:t,value:n,onChange:r})=>{let[i,a]=(0,R.useState)();return(0,H.jsx)(o,{"aria-label":e,wrapperClassName:`${t} h-6 w-[55%] px-1.5`,className:`text-xs`,inputMode:`decimal`,value:i??(n===void 0?``:String(n)),onChange:e=>{a(e.target.value),r(dn(e.target.value))},onBlur:()=>a(void 0)})},pn=({pin:e,label:t,onChange:n})=>{if(e.state===`wired`||e.state===`made`||e.key===`#condition`&&e.state!==`expression`)return null;if(e.state===`expression`)return(0,H.jsx)(`span`,{className:`ml-auto shrink-0 rounded bg-muted px-1 font-mono text-xs text-muted-foreground`,title:F(`pinExpression`,{expression:String(e.value)}),children:`ƒ`});let r=un(e);if(e.state===`literal`&&typeof e.value==`object`)return(0,H.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,title:F(`pinObjectValue`),children:`{…}`});if(!r)return e.state===`literal`?(0,H.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-xs text-muted-foreground`,children:String(e.value)}):null;let a=F(`inputValue`,{label:t});if(!n)return(0,H.jsx)(`span`,{className:`ml-auto min-w-0 truncate text-xs text-muted-foreground`,children:e.value===void 0?``:String(e.value)});let c=`nodrag nopan nowheel ml-auto min-w-0`;return r===`boolean`?(0,H.jsx)(s,{className:c,checked:e.value===!0,label:a,onChange:e=>n(e)}):r===`choice`?(0,H.jsxs)(i,{"aria-label":a,className:`${c} h-6 max-w-[55%] px-1 py-0 text-xs`,value:typeof e.value==`string`?e.value:``,onChange:e=>n(e.target.value===``?void 0:e.target.value),children:[(0,H.jsx)(`option`,{value:``}),e.options.map(t=>(0,H.jsx)(`option`,{value:t,children:e.statuses?It(t):t},t))]}):r===`number`?(0,H.jsx)(fn,{name:a,className:c,value:e.value,onChange:n}):(0,H.jsx)(o,{"aria-label":a,wrapperClassName:`${c} h-6 w-[55%] px-1.5`,className:`text-xs`,value:e.value===void 0?``:String(e.value),onChange:e=>n(e.target.value===``?void 0:e.target.value)})},mn=e=>`pb-pin pb-pin-${G(e.type)}`,hn=({pin:e,step:t,keys:n,connectable:r,name:i,onValue:a,bare:o=!1})=>{let s=Y(),c=i??jt(e.key);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center gap-1.5 pr-2 pl-3`,children:[(0,H.jsx)(L,{id:B(e.key),type:`target`,position:I.Left,isConnectable:r,className:mn(e)}),(0,H.jsxs)(`span`,{className:`min-w-0 shrink truncate text-xs text-body`,title:F(`pinTypeTitle`,{label:c,type:W(e.type)}),children:[c,e.required&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`text-danger-text`,children:`*`})]}),!o&&(0,H.jsx)(pn,{pin:e,label:c,...s&&r&&{onChange:a??(e=>s.setArgument(t,n,e))}})]})},gn=({pin:e,connectable:t,trigger:n=!1,field:r=!1})=>{let i=At(e.path,n,r);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center justify-end pr-3 pl-2`,children:[(0,H.jsx)(`span`,{className:`min-w-0 truncate text-xs text-body`,title:F(`pinTypeTitle`,{label:i,type:W(e.type)}),children:i}),(0,H.jsx)(L,{id:V(e.path),type:`source`,position:I.Right,isConnectable:t,className:mn(e)})]})},_n=({inputs:e,outputs:t,connectable:n})=>{let r=(e,t)=>({top:`${(e+1)*100/(t+1)}%`});return(0,H.jsxs)(H.Fragment,{children:[e.map((t,i)=>(0,H.jsx)(L,{id:B(t.key),type:`target`,position:I.Left,isConnectable:n,className:mn(t),style:r(i,e.length),title:F(`pinTypeTitle`,{label:jt(t.key),type:W(t.type)})},t.key)),t.map((e,i)=>(0,H.jsx)(L,{id:V(e.path),type:`source`,position:I.Right,isConnectable:n,className:mn(e),style:r(i,t.length),title:F(`pinTypeTitle`,{label:At(e.path),type:W(e.type)})},e.path.join(`/`)))]})},vn=({node:e,folded:t,open:n,fields:r=!1})=>{let i=Y();return t===0&&!n?null:(0,H.jsx)(`button`,{type:`button`,className:`nodrag h-6 w-full px-3 text-left text-xs text-muted-foreground hover:text-foreground`,onClick:()=>i?.toggleOpen(e),disabled:!i,children:r?n?F(`foldLessFields`):F(`foldMoreFields`,{count:t}):n?F(`foldLess`):F(`foldMore`,{count:t})})},yn=({node:e,inputs:t,outputs:n,folded:r,open:i,editable:a,trigger:o=!1})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-[3fr_2fr]`,children:[(0,H.jsx)(`div`,{className:`min-w-0`,children:t.map(t=>(0,H.jsx)(hn,{pin:t,step:e,keys:[t.key],connectable:a},t.key))}),(0,H.jsx)(`div`,{className:`min-w-0`,children:n.map(e=>(0,H.jsx)(gn,{pin:e,connectable:a,trigger:o},JSON.stringify(e.path)))})]}),(0,H.jsx)(vn,{node:e,folded:r,open:i})]}),bn=(0,R.createContext)(void 0),xn=`nodrag absolute -top-4 -right-4 z-10`,Sn=({node:e,name:t})=>{let n=(0,R.useContext)(bn);return n?(0,H.jsx)(a,{size:`icon`,className:xn,"aria-label":F(`unpin`,{name:t}),title:F(`unpinHelp`),onClick:t=>{t.stopPropagation(),n(e)},children:(0,H.jsx)(ke,{className:`size-3.5`,"aria-hidden":!0})}):(0,H.jsxs)(`span`,{className:f(xn,`inline-flex size-7 items-center justify-center rounded-md border border-border-strong bg-background text-muted-foreground shadow-sm`),title:F(`movedByHand`),children:[(0,H.jsx)(ke,{className:`size-3.5`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`sr-only`,children:F(`movedByHand`)})]})},X=[18,38],Cn=e=>{if(e.Type===`Choice`)return[{kind:`rule`,top:X[0],label:F(`when`)},{kind:`default`,top:X[1],label:F(`otherwise`)}];let t=[`Task`,`Pass`,`Wait`,`Map`,`Block`].includes(e.Type)?[{kind:`next`,top:X[0]}]:[],n=e.Type===`Task`||e.Type===`Map`||e.Type===`Block`?[{kind:`catch`,top:X[t.length],label:F(`onErrorHandle`)}]:[];return[...t,...n]},wn=(e,t,n)=>{let r=(0,R.useContext)(sn);if(!r||!t)return{};let i=t=>{t.stopPropagation(),r(e)},a=n?F(`addStepAtNamedHandle`,{handle:n}):F(`addStepAtHandle`);return{role:`button`,tabIndex:0,"aria-label":a,title:a,onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i(e))}}},Tn=({source:e,path:t,editable:n})=>(0,H.jsx)(L,{id:e.kind,type:`source`,position:I.Right,isConnectable:n,style:{top:e.top},className:f(`pb-workflow-exec`,`pb-workflow-handle-${e.kind}`),...wn({kind:e.kind,source:t},n,e.label),children:e.label&&(0,H.jsx)(`span`,{className:`pb-workflow-handle-label`,children:e.label})}),En=({state:e,path:t,editable:n})=>Cn(e).map(e=>(0,H.jsx)(Tn,{source:e,path:t,editable:n},e.kind)),Dn=({count:e})=>e>0&&(0,H.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 text-xs font-medium text-danger-text`,title:F(`problemCount`,{count:e}),children:[(0,H.jsx)(p,{className:`size-3.5`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:F(`problemCount`,{count:e})}),(0,H.jsx)(`span`,{"aria-hidden":`true`,children:e})]}),On=({label:e})=>(0,H.jsxs)(`span`,{className:`inline-flex shrink-0 items-center text-warning-text`,title:e,children:[(0,H.jsx)(p,{className:`size-3.5`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:e})]}),kn=({trace:e})=>(0,H.jsxs)(`span`,{className:`flex shrink-0 flex-col items-end gap-0.5`,children:[e.changed?(0,H.jsx)(`span`,{title:F(`changedSinceRun`),className:`rounded-full border border-dashed px-1.5 text-xs text-muted-foreground`,children:F(`changedShort`)}):(0,H.jsx)(d,{tone:cn[e.status],children:Ue(e.status)}),e.steps>1&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:F(`traceSteps`,{count:e.steps})})]}),An=(e,t,n)=>f(`rounded-lg border bg-background text-body shadow-sm`,t>0||n?.status===`failed`?`border-danger`:`border-border-strong`,e&&`ring-2 ring-primary/40`),jn=({name:e,kind:t,problems:n,first:r,trace:i,warnings:a=[]})=>(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-2`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 truncate text-xs text-muted-foreground`,children:[t,r&&(0,H.jsxs)(`span`,{className:`text-primary-text`,children:[` · `,F(`startsHere`)]})]}),a.length>0&&(0,H.jsx)(On,{label:a.join(`
|
|
3
|
+
`)}),(0,H.jsx)(Dn,{count:n}),i&&(0,H.jsx)(kn,{trace:i})]}),(0,H.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:e})]}),Mn=()=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(L,{id:`in`,type:`target`,position:I.Left,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}}),(0,H.jsx)(L,{id:`out`,type:`source`,position:I.Right,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}})]}),Nn=({condition:e})=>e!==void 0&&(0,H.jsx)(`span`,{className:`absolute top-1 right-6 max-w-[45%] truncate rounded bg-muted px-1 text-[0.625rem] text-muted-foreground`,title:e,children:F(`onlyWhenBadge`)}),Pn=({id:e,data:t,selected:n,isConnectable:r})=>{let{node:i,kind:a,problems:o,trace:s,cacheWarning:c,warnings:l=[],pins:u,dataOrder:d,moved:p}=t;return i.kind===`state`?(0,H.jsxs)(`div`,{className:f(An(n,o.length,s),`h-full`,j(i.state)&&`bg-muted/40`),children:[p&&(0,H.jsx)(Sn,{node:e,name:i.name}),(0,H.jsxs)(`div`,{className:`relative h-[52px] py-2 pr-6 pl-4`,children:[d?(0,H.jsx)(Mn,{}):(0,H.jsx)(L,{id:`in`,type:`target`,position:I.Left,isConnectable:r,className:`pb-workflow-exec`,style:{top:X[0]}}),d&&(0,H.jsx)(Nn,{condition:i.state.Condition}),(0,H.jsx)(jn,{name:i.name,kind:a,problems:o.length,first:i.first&&i.parent!==void 0,trace:s,warnings:[...c?[F(`cacheForcedAgainst`)]:[],...l.map(e=>e.message)]}),!d&&(0,H.jsx)(En,{state:i.state,path:i.id,editable:r}),u&&j(i.state)&&(0,H.jsx)(_n,{inputs:u.inputs,outputs:u.outputs,connectable:r})]}),u&&!j(i.state)&&(0,H.jsx)(yn,{node:i.id,inputs:u.inputs,outputs:u.outputs,folded:u.folded,open:u.open,editable:r})]}):null},Fn=({id:e,data:t,selected:n,isConnectable:r})=>{let{node:i,kind:a,problems:o,pins:s,dataOrder:c,moved:l}=t,u=wn({kind:`start`,source:i.id},r&&!c);return i.kind===`trigger`?(0,H.jsxs)(`div`,{className:f(An(n,o.length),`h-full border-dashed`),children:[l&&(0,H.jsx)(Sn,{node:e,name:F(`trigger`)}),(0,H.jsxs)(`div`,{className:`relative h-[52px] py-2 pr-6 pl-4`,children:[(0,H.jsx)(jn,{name:a,kind:F(`trigger`),problems:o.length}),c?(0,H.jsx)(L,{id:`out`,type:`source`,position:I.Right,isConnectable:!1,className:`pb-workflow-side`,style:{top:X[0]}}):(0,H.jsx)(L,{id:`start`,type:`source`,position:I.Right,isConnectable:r,className:`pb-workflow-exec`,style:{top:X[0]},...u})]}),s&&(0,H.jsx)(yn,{node:i.id,inputs:[],outputs:s.outputs,folded:0,open:!1,editable:r,trigger:!0})]}):null},In=`protobase:workflow-graph-view`,Ln=e=>c(()=>e().getItem(`protobase:workflow-graph-view`),null)===`simple`?`simple`:`pins`,Rn=(e,t)=>c(()=>t===`pins`?e().removeItem(In):e().setItem(In,t),void 0),zn=()=>localStorage,Bn=()=>{let[e,t]=(0,R.useState)(()=>Ln(zn));return[e,e=>{t(e),Rn(zn,e)}]},Vn=(e,t)=>e.part.kind===`not`?F(`conditionNotSide`):e.part.kind===`matches`?F(t===`0`?`conditionMatchesText`:`conditionMatchesPattern`):e.part.kind===`logic`?String.fromCharCode(65+Number(t)%26):F(t===`0`?`conditionSideA`:`conditionSideB`),Hn=({node:e,source:t})=>{let n=Y(),[r,i]=(0,R.useState)(),a=t.trim();return(0,H.jsx)(`textarea`,{"aria-label":F(`conditionExpressionText`),className:`nodrag nopan nowheel block w-full resize-none rounded border border-border bg-background px-1.5 py-1 font-mono text-xs text-foreground`,style:{height:64},spellCheck:!1,readOnly:!n,value:r??a,onChange:e=>i(e.target.value),onBlur:()=>{i(void 0);let t=r?.trim();t!==void 0&&t!==a&&n?.setCondition(e.target,t===``?void 0:`{% ${t} %}`)}})},Un=e=>e.replace(/^\$states\.context\.Steps\./,``).replace(/^\$states\.context\.Execution\.Input/,`input`),Wn=({node:e,editable:t})=>{let n=Y(),[r,i]=(0,R.useState)(),a=F(`conditionMatchesPattern`),s=String(e.inputs[1]?.value??``);return(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center gap-1.5 pr-2 pl-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 shrink truncate text-xs text-body`,children:a}),(0,H.jsx)(o,{"aria-label":F(`inputValue`,{label:a}),wrapperClassName:`nodrag nopan nowheel ml-auto h-6 w-[60%] min-w-0 px-1.5`,className:`font-mono text-xs`,value:r??s,disabled:!n||!t,onChange:t=>{i(t.target.value),t.target.value!==``&&n?.setConditionSide(e.target,[...e.at,1],t.target.value)},onBlur:()=>i(void 0)})]})},Gn=({node:e,editable:t})=>{let n=Y(),r=(0,H.jsx)(L,{id:tt,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-boolean`,style:{top:13}});return e.part.kind===`expression`?(0,H.jsxs)(`div`,{className:`relative grid gap-1 px-2 pt-1`,children:[r,(0,H.jsx)(Hn,{node:e,source:e.part.source}),(0,H.jsx)(`div`,{className:`-mx-2`,children:e.inputs.map(e=>(0,H.jsxs)(`div`,{className:`relative flex h-[26px] items-center pr-2 pl-3`,children:[(0,H.jsx)(L,{id:B(e.key),type:`target`,position:I.Left,isConnectable:!1,className:`pb-pin pb-pin-${G(e.type)}`}),(0,H.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-body`,title:F(`pinTypeTitle`,{label:e.key,type:W(e.type)}),children:Un(e.key)})]},e.key))})]}):(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[r,e.inputs.map(r=>e.part.kind===`matches`&&r.key===`1`?(0,H.jsx)(Wn,{node:e,editable:t},r.key):(0,H.jsx)(hn,{pin:r,step:e.target,keys:[],name:Vn(e,r.key),bare:e.part.kind===`logic`&&Number(r.key)===e.part.sides.length,connectable:t,onValue:t=>n?.setConditionSide(e.target,[...e.at,Number(r.key)],t??``)},r.key))]})},Kn=(e,t)=>typeof t==`number`&&e.trim()!==``&&Number.isFinite(Number(e))?Number(e):typeof t==`boolean`&&(e===`true`||e===`false`)?e===`true`:e,qn=`nodrag nopan nowheel h-6 min-w-0 px-1.5`,Jn=({label:e,value:t,onChange:n,disabled:r})=>(0,H.jsx)(o,{"aria-label":e,wrapperClassName:`${qn} flex-1`,className:`text-xs`,value:String(t),disabled:r,onChange:e=>n(Kn(e.target.value,t))}),Yn=({node:e,editable:t})=>{let n=Y(),r=!n||!t,i=t=>n?.setArgument(e.target,[e.key],D(t)),{part:a}=e,o=(e,t)=>i({...a,cases:a.cases.map((n,r)=>r===e?{...n,...t}:n)});return(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:nt,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-${G(e.type)}`,style:{top:13}}),e.inputs.map(n=>(0,H.jsx)(hn,{pin:n,step:e.target,keys:[],name:F(`selectInput`),connectable:t,onValue:e=>i({...a,operand:{value:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:``}})},n.key)),a.cases.map((e,t)=>(0,H.jsxs)(`div`,{className:`flex h-[26px] items-center gap-1 pr-2 pl-3`,children:[(0,H.jsx)(Jn,{label:F(`selectWhen`,{case:t+1}),value:e.when,disabled:r,onChange:e=>o(t,{when:e})}),(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`text-xs text-muted-foreground`,children:`→`}),(0,H.jsx)(Jn,{label:F(`selectThen`,{case:t+1}),value:e.then,disabled:r,onChange:e=>o(t,{then:e})}),(0,H.jsx)(`button`,{type:`button`,className:`nodrag shrink-0 text-muted-foreground hover:text-foreground disabled:opacity-40`,"aria-label":F(`selectRemoveCase`,{case:t+1}),disabled:r||a.cases.length===1,onClick:()=>i({...a,cases:a.cases.filter((e,n)=>n!==t)}),children:(0,H.jsx)(l,{className:`size-3`,"aria-hidden":!0})})]},t)),(0,H.jsxs)(`div`,{className:`flex h-[26px] items-center gap-1 pr-2 pl-3`,children:[(0,H.jsx)(`span`,{className:`shrink-0 text-xs text-body`,children:F(`selectOtherwise`)}),(0,H.jsx)(Jn,{label:F(`selectOtherwise`),value:a.otherwise,disabled:r,onChange:e=>i({...a,otherwise:e})})]}),(0,H.jsx)(`button`,{type:`button`,className:`nodrag h-6 w-full px-3 text-left text-xs text-muted-foreground hover:text-foreground`,disabled:r,onClick:()=>i({...a,cases:[...a.cases,{when:``,then:``}]}),children:F(`selectAddCase`)})]})},Xn=e=>e.kind===`condition`?Pt(e):e.kind===`select`?F(`selectTitle`):e.kind===`break`?F(`breakTitle`,{type:W(e.type)}):F(`makeTitle`,{type:W(e.type)}),Zn=({pure:e})=>(0,H.jsx)(`div`,{className:`truncate border-b px-3 py-1.5 text-xs font-medium text-foreground`,children:Xn(e)}),Qn=({id:e,data:t,selected:n,isConnectable:r})=>{let{pureData:i,moved:a}=t;if(!i)return null;let{pure:o,shownInputs:s,shownOutputs:c,folded:l,open:u,foldable:d}=i;return(0,H.jsxs)(`div`,{className:f(`h-full rounded-lg border border-dashed border-border-strong bg-background text-body shadow-sm`,n&&`ring-2 ring-primary/40`),children:[a&&(0,H.jsx)(Sn,{node:e,name:Xn(o)}),(0,H.jsx)(Zn,{pure:o}),o.kind===`condition`?(0,H.jsx)(Gn,{node:o,editable:r}):o.kind===`select`?(0,H.jsx)(Yn,{node:o,editable:r}):o.kind===`break`?(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:$e,type:`target`,position:I.Left,isConnectable:!1,className:`pb-pin pb-pin-${G(o.type)}`,style:{top:13}}),c.map(e=>(0,H.jsx)(gn,{pin:e,connectable:r,field:!0},JSON.stringify(e.path))),d&&(0,H.jsx)(vn,{node:o.id,folded:l,open:u,fields:!0})]}):(0,H.jsxs)(`div`,{className:`relative pt-1`,children:[(0,H.jsx)(L,{id:et,type:`source`,position:I.Right,isConnectable:!1,className:`pb-pin pb-pin-${G(o.type)}`,style:{top:13}}),s.map(e=>(0,H.jsx)(hn,{pin:e,step:o.target,keys:[o.key,e.key],connectable:r},e.key)),(0,H.jsx)(vn,{node:o.id,folded:l,open:u})]})]})},$n=({offer:e,onClose:t})=>(0,H.jsxs)(`div`,{role:`dialog`,"aria-label":F(`pureOfferTitle`),className:`absolute z-10 grid gap-1 rounded-md border bg-background p-1 shadow-md`,style:{left:e.x,top:e.y},children:[e.choices.map((e,n)=>(0,H.jsx)(a,{size:`sm`,variant:`ghost`,className:`justify-start`,autoFocus:n===0,onClick:()=>{e.add(),t()},children:e.label},e.label)),(0,H.jsx)(a,{size:`sm`,variant:`ghost`,onClick:t,children:F(`pureOfferClose`)})]}),er=e=>typeof e==`object`&&!!e&&!Array.isArray(e),tr=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Z={kinds:[`boolean`]},nr=e=>e.sides.flatMap(e=>b(e)?nr(e):`read`in e?[e.read]:[]),rr=e=>!b(e)&&`read`in e&&`step`in e.read.base&&tr(e.read.path,[`Status`]),ir=(e,t)=>{if(t&&t.kinds!==`any`){let e=t.kinds.filter(e=>e!==`null`);if(e.length===1&&[`string`,`integer`,`number`,`boolean`].includes(e[0]))return{kinds:e}}return{kinds:[typeof e==`number`?`number`:typeof e==`boolean`?`boolean`:`string`]}},ar=e=>{let t=new Map;for(let[n,r]of re(e.stateMachine)){let i=`Assign`in r&&er(r.Assign)?r.Assign:{};for(let[r,a]of Object.entries(i)){let i=a===`{% $states.result %}`?ae(e.stateMachine,n)?.join(`/`):void 0;t.set(r,t.has(r)||i===void 0?null:i)}}return t},or=(e,t,n=[])=>{let r=new Map(re(e.stateMachine).map(([t,n])=>[ae(e.stateMachine,t).join(`/`),n])),i=ne(e)===`data`,a=new Map([[``,ce(e,t)],...[...r].map(([e,n])=>[e,[...le(n,t),...i?[fe]:[]]])]),o=new Map([...r].filter(([,e])=>i||e.Type===`Task`).map(([e,n])=>[e,[...i?[M(n)]:[],...se(n,t)]])),s=e=>[...r.keys()].find(t=>t.split(`/`).at(-1)===e),c=new Map,l=new Map,u=[],d=[],f=new Map,p=ar(e),m=(e,t,n,r=!1)=>{let i=`data:${e.node}|${e.handle}->${t}|${n}`;r&&f.has(i)||f.set(i,{id:i,source:e.node,sourceHandle:e.handle,target:t,targetHandle:n,type:e.type,...r&&{expression:!0}})},g=(e,t)=>{let n=e.find(e=>tr(e.path,t));return n||(n={path:t,type:_(void 0)},e.push(n)),n},y=(e,t)=>{let n=a.get(e),r=n.find(e=>tr(e.path,t)),i=n.some(e=>e.path.length>0&&e.path[0]!==`#status`);if(r||t.length===0||i&&t.length===1){let i=r??g(n,t);return{node:e,handle:V(i.path),type:i.type}}let o=S(e,t.slice(0,-1)),s=g(o.outputs,t.slice(-1));return{node:o.id,handle:V(s.path),type:s.type}},S=(n,i)=>{let a=Ye(n,i),o=c.get(a);if(o)return o;let s=ge(e,r.get(n),t,i),l={kind:`break`,id:a,source:n,path:i,type:_(s),outputs:de(s).map(([e,t])=>({path:[e],type:_(t)}))};return c.set(a,l),m(y(n,i),a,$e),l},C=(e,t,n)=>{let r=T(e);if(r)return m(r,t,n);for(let r of O(e)){let e=D(r);e&&m(e,t,n,!0)}},T=e=>{let t=ie(e);return t&&D(t)},D=e=>{if(`step`in e.base){let t=s(e.base.step);return t===void 0||!a.has(t)?void 0:y(t,[P,...e.path])}let t=`input`in e.base?``:p.get(e.base.variable);return t==null||!a.has(t)?void 0:y(t,e.path)},A=e=>{if(b(e)||!(`read`in e))return;if(!rr(e))return D(e.read);let t=s(e.read.base.step);return t===void 0||!a.has(t)?void 0:y(t,[P])},oe=(e,t,n,r)=>{let i=Ze(e,n),a=t.sides,o=a.map(A),s=a.map((e,n)=>{let r=String(n);if(b(e))return{key:r,type:Z,required:!1,value:void 0,state:`made`};if(`read`in e)return{key:r,type:o[n]?.type??_(void 0),required:!1,value:k(e.read),state:`wired`};if(`pattern`in e)return{key:r,type:{kinds:[`string`]},required:!1,value:e.pattern,state:`literal`};if(t.kind===`matches`)return{key:r,type:{kinds:[`string`]},required:!1,value:e.value,state:`literal`};if(t.kind!==`compare`)return{key:r,type:Z,required:!1,value:e.value,state:`literal`};let i=a[1-n];return rr(i)?{key:r,type:{kinds:[`string`]},required:!1,value:e.value,state:`literal`,options:x,statuses:!0}:{key:r,type:ir(e.value,o[1-n]?.type),required:!1,value:e.value,state:`literal`}});t.kind===`logic`&&s.push({key:String(a.length),type:Z,required:!1,value:void 0,state:`empty`}),u.push({kind:`condition`,id:i,target:e,at:n,part:t,inputs:s}),m({node:i,handle:tt,type:Z},r.node,r.handle),a.forEach((t,r)=>{b(t)?oe(e,t,[...n,r],{node:i,handle:B(String(r))}):o[r]&&m(o[r],i,B(String(r)))})},j=(e,t)=>{let n=E(t),r={node:e,handle:B(he)};if(n&&nr(n).every(e=>A({read:e})))return oe(e,n,[],r);let i=Ze(e,[]),a=O(t).flatMap(e=>{let t=A({read:e});return t?[{read:e,source:t}]:[]});u.push({kind:`condition`,id:i,target:e,at:[],part:{kind:`expression`,source:v(t)},inputs:a.map(({read:e,source:t})=>({key:te(e),type:t.type,required:!1,value:k(e),state:`wired`}))}),m({node:i,handle:tt,type:Z},r.node,r.handle);for(let{read:e,source:t}of a)m(t,i,B(te(e)),!0)},ue=(e,t)=>{let n=w(t.value),r=n&&A(n.operand);if(!n||`read`in n.operand&&!r)return!1;let i=Qe(e,t.key),a=`read`in n.operand?{key:rt,type:r.type,required:!1,value:k(n.operand.read),state:`wired`}:{key:rt,type:{kinds:[`string`]},required:!1,value:n.operand.value,state:`literal`};return d.push({kind:`select`,id:i,target:e,key:t.key,part:n,type:t.type,inputs:[a]}),m({node:i,handle:nt,type:t.type},e,B(t.key)),r&&m(r,i,B(rt)),!0},pe=(e,n)=>{let i=Xe(e,n),a=l.get(i);if(a)return a;let s=o.get(e)?.find(e=>e.key===n),c=r.get(e),u=h(ee(c,t),[n]),d=er(s?.value)?s.value:{},f=new Set(Array.isArray(u?.required)?u.required:[]),p=de(u).map(([e,t])=>N(e,t,d[e],f.has(e))),g=Object.keys(d).filter(e=>!p.some(t=>t.key===e)).map(e=>N(e,h(u,[e])??{},d[e],!1)),v={kind:`make`,id:i,target:e,key:n,type:s?.type??_(u),inputs:[...p,...g]};l.set(i,v),m({node:i,handle:et,type:v.type},e,B(n));for(let e of v.inputs)C(e.value,i,B(e.key));return v};for(let[e,t]of o)for(let[n,r]of t.entries()){if(r.key===`#condition`&&r.state===`expression`){t[n]={...r,state:`made`},j(e,r.value);continue}if(r.state===`expression`&&ue(e,r)){t[n]={...r,state:`made`};continue}r.state===`made`&&pe(e,r.key),(r.state===`wired`||r.state===`expression`)&&C(r.value,e,B(r.key))}for(let e of n)e.kind===`break`&&a.has(e.source)&&S(e.source,e.path),e.kind===`make`&&o.get(e.target)?.some(t=>t.key===e.key&&t.state!==`wired`&&t.state!==`expression`)&&pe(e.target,e.key);return{inputs:o,outputs:a,pure:[...c.values(),...l.values(),...u,...d],edges:[...f.values()]}},sr=e=>e.reason===`notBefore`?F(`refuseNotBefore`,{step:e.step}):e.reason===`otherScope`?F(`refuseOtherScope`,{step:e.step}):e.reason===`shapesOutput`?F(`refuseShaped`,{step:e.step}):e.reason===`type`?F(`refuseType`,{source:W(e.source),target:W(e.target)}):F(`refuseNotPins`),Q=e=>it(e)!==void 0||at(e)!==void 0,$=(e,t)=>({node:J(e),handle:t??``}),cr=e=>e!==`any`&&e.includes(`object`),lr=(e,t)=>e.map(e=>({label:Nt(e),add:()=>t(e)})),ur=(e,t)=>{let n=e=>e.kind===`break`?Ye(e.source,e.path):Xe(e.target,e.key),r=e=>e.kind===`break`&&t.some(t=>t.kind===`break`&&t.source===e.source&&t.path.every((t,n)=>e.path[n]===t));return e.filter(e=>!r(e)&&!t.some(t=>t.id===n(e)))},dr=(e,t,n,r,i)=>{let a=r?.edits,[o,s]=(0,R.useState)([]),[c,l]=(0,R.useState)(new Set),[u,d]=(0,R.useState)(),f=(0,R.useRef)({definition:e,editing:r});(0,R.useEffect)(()=>{f.current={definition:e,editing:r}});let p=(0,R.useMemo)(()=>n&&or(e,n,o),[e,n,o]),m=ne(e)===`data`,h=(0,R.useMemo)(()=>{if(p)return{sizes:Ut(t,p,c),pure:p.pure.map(e=>({id:e.id,parent:Jt(t,e)})),wires:p.edges.map(e=>({id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),ports:qt(t,p,c),dataOrder:m}},[t,p,c,m]),g=r&&{setArgument:(t,n,i)=>r.onChange(r.edits.setArgument(e,t,n,i)),setConditionSide:(t,n,i)=>r.onChange(r.edits.setConditionSide(e,t,n,{value:i})),setCondition:(t,n)=>r.onChange(r.edits.setArgument(e,t,[`#condition`],n)),toggleOpen:e=>l(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):new Set([...t,e]))},_=(t,n)=>{if(!p||!a||!Q(t.handle)||!Q(n.handle))return;let[r,i]=at(t.handle)?[t,n]:[n,t],o=a.wireRefusal(e,p,$(r.node,r.handle),$(i.node,i.handle));return o&&sr(o)},v=t=>!!(p&&a)&&a.wireRefusal(e,p,$(t.source,t.sourceHandle),$(t.target,t.targetHandle))===void 0,ee=t=>{r&&p&&r.onChange(r.edits.connectData(e,p,$(t.source,t.sourceHandle),$(t.target,t.targetHandle)))},y=(e,t,n)=>{if(!p||!a)return e;let r=e,i=n.flatMap(e=>{let t=e.data?.wire,n=t&&p.pure.find(e=>e.kind===`break`&&e.id===t.target||e.kind===`make`&&e.id===t.source);return n?[{id:n.id}]:[]}),o=[...t.filter(e=>q(e.id)),...i.filter(e=>!t.some(t=>t.id===e.id))],c=n.flatMap(e=>{let t=e.data?.wire;return t&&!o.some(e=>e.id===t.source||e.id===t.target)?[{wire:t}]:[]}),l=o.flatMap(e=>p.pure.filter(t=>t.id===e.id).map(e=>({pure:e}))),u=[...c,...l];for(let e of lt(p,u,e=>`wire`in e?ot(p,e.wire):st(e.pure)))r=`wire`in e?a.disconnectData(r,p,e.wire):a.removePure(r,p,e.pure);return o.length>0&&s(e=>ur(e,o.flatMap(e=>p.pure.filter(t=>t.id===e.id)))),r},te=(e,t)=>{let{definition:n,editing:r}=f.current;r?.onChange(r.edits.addSelect(n,e,t))},b=(e,t,n)=>{let{definition:r,editing:i}=f.current;i?.onChange(i.edits.addCondition(r,e,t,n))};return{data:p,open:c,layout:h,actions:g,check:_,isValid:v,connect:ee,remove:y,connectEnd:(e,t)=>{if(!p||!r||t.isValid||t.toHandle||!t.fromHandle?.id||!t.fromNode)return;let n=J(t.fromNode.id),a=t.fromHandle.id,o=`changedTouches`in e?e.changedTouches[0]:e,c=i.current?.getBoundingClientRect(),l={x:o.clientX-(c?.left??0),y:o.clientY-(c?.top??0)},u=at(a);if(u){let e=p.pure.find(e=>e.id===n),t=(e?.kind===`break`?e.outputs:p.outputs.get(n)??[]).find(e=>JSON.stringify(e.path)===JSON.stringify(u))?.type;if(!t||!cr(t.kinds))return;let r=e?.kind===`break`?{source:e.source,path:[...e.path,...u]}:{source:n,path:u};d({...l,choices:[{label:F(`breakTitle`,{type:W(t)}),add:()=>s(e=>[...e,{kind:`break`,...r}])}]});return}let f=it(a),m=p.pure.find(e=>e.id===n);if(m?.kind===`condition`){let e=m.inputs.find(e=>e.key===f);if(!e||e.state!==`literal`&&e.state!==`empty`||m.part.kind!==`logic`&&m.part.kind!==`not`)return;d({...l,choices:lr(r.edits.conditionChoices(!1),e=>b(m.target,[...m.at,Number(f)],e))});return}let h=f===void 0?void 0:p.inputs.get(n)?.find(e=>e.key===f);if(h?.key===`#condition`&&h.state===`empty`){d({...l,choices:lr(r.edits.conditionChoices(!0),e=>b(n,[],e))});return}if(h&&h.key!==`#condition`&&!cr(h.type.kinds)&&(h.state===`empty`||h.state===`literal`)){d({...l,choices:[{label:F(`selectOffer`),add:()=>te(n,h.key)}]});return}h&&cr(h.type.kinds)&&h.state!==`wired`&&h.state!==`expression`&&d({...l,choices:[{label:F(`makeTitle`,{type:W(h.type)}),add:()=>s(e=>[...e,{kind:`make`,target:n,key:h.key}])}]})},offer:u,closeOffer:()=>d(void 0)}},fr=(0,R.createContext)(void 0),pr=({fromX:e,fromY:t,toX:n,toY:r,fromPosition:i,toPosition:a,connectionStatus:o,fromNode:s,fromHandle:c,toNode:l,toHandle:u})=>{let d=(0,R.useContext)(fr),[f]=_e({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a}),p=o===`invalid`&&l&&u?.id&&c.id?d?.({node:s.id,handle:c.id},{node:l.id,handle:u.id}):void 0;return(0,H.jsxs)(`g`,{className:p?`pb-wire-refused`:void 0,children:[(0,H.jsx)(`path`,{d:f,fill:`none`,className:`react-flow__connection-path`}),p&&(0,H.jsx)(`foreignObject`,{x:n+12,y:r-30,width:260,height:28,className:`overflow-visible`,children:(0,H.jsx)(`div`,{className:`inline-block rounded border border-danger bg-danger-soft px-1.5 py-0.5 text-xs whitespace-nowrap text-danger-text shadow`,children:p})})]})},mr=(e,t)=>{let n=De(),[r,i]=(0,R.useState)(),a=(0,R.useMemo)(()=>JSON.stringify(xt(e,t)),[e,t]);return(0,R.useEffect)(()=>{if(!n)return;let e=!0;return Ct(n,JSON.parse(a)).then(t=>{e&&i(t)}),()=>{e=!1}},[n,a]),r},hr={state:Pn,trigger:Fn,pure:Qn},gr=e=>e?.kind===`state`?e.scope.join(`/`):``,_r=({laidOut:e,tidied:t})=>{let n=ye();return(0,R.useEffect)(()=>{e&&n.fitView({maxZoom:1,padding:.1})},[e,t]),null},vr=()=>{let e=ye(),t=xe(e=>e.width),n=(0,R.useRef)(t);return(0,R.useEffect)(()=>{let r=n.current;if(n.current=t,r===0||t===0||t===r)return;let{x:i,y:a,zoom:o}=e.getViewport();e.setViewport({x:i+(t-r)/2,y:a,zoom:o})},[t,e]),null},yr=({laidOut:e,ids:t})=>{let n=Ee();return(0,R.useEffect)(()=>{e&&n(t)},[e]),null},br=new Map,xr=({definition:e,problems:t,warnings:n,selected:i,onSelect:o,onChange:s,edits:c,onAddAt:l,traces:u,types:d,schemas:f,fills:p=!1,layout:h,onLayoutChange:g})=>{let _=s&&c&&{onChange:s,edits:c},v=(0,R.useMemo)(()=>ht(e),[e]),ee=(0,R.useRef)(null),[y,te]=Bn(),b=dr(e,v,y===`pins`?f:void 0,_,ee),x=mr(v,b.layout),S=(0,R.useMemo)(()=>new Map(v.nodes.map(e=>[e.id,e])),[v]),re=JSON.stringify(h??{}),C=(0,R.useMemo)(()=>pe(re),[re]),w=C[y],T=e=>g?.({...C,[y]:e}),E=(0,R.useMemo)(()=>new Map([...v.nodes.map(e=>[e.id,me(e.id)]),...(b.data?.pure??[]).map(e=>[e.id,me(e.id,e)])]),[v,b.data]),D=(0,R.useMemo)(()=>new Map([...E].flatMap(([e,t])=>Object.hasOwn(w,t)?[[e,w[t]]]:[])),[E,w]),O=(0,R.useMemo)(()=>{if(!x)return;let e=new Map((b.data?.pure??[]).map(e=>[e.id,e]));return ue(x,D,t=>{let n=S.get(t);return e.has(t)?Jt(v,e.get(t)):n?.kind===`state`?n.parent:void 0})},[x,D,S,v,b.data]),k=!!g,[ie,ae]=(0,R.useState)(br),[A,j]=(0,R.useState)(0),M=ne(e)===`data`,[N,se]=(0,R.useState)(()=>new Set(i===void 0?[]:[K(i)]));(0,R.useEffect)(()=>{se(e=>i===void 0?e.size===1&&!q([...e][0])?new Set:e:e.has(K(i))?e:new Set([K(i)]))},[i]);let ce=(0,R.useMemo)(()=>[...Zt(v,O,t,i,u,d,n,b.data&&{data:b.data,open:b.open},M),...b.data?rn(v,b.data,O,b.open):[]].map(e=>{let t=ie.get(e.id),n=D.has(J(e.id));return{...e,selected:N.has(e.id),draggable:k,...t&&{position:t},...n&&{data:{...e.data,moved:!0},...e.ariaLabel&&{ariaLabel:`${e.ariaLabel}, ${F(`movedByHand`)}`}}}}),[v,O,t,i,u,d,n,b.data,b.open,M,N,ie,D,k]),[le,de]=(0,R.useState)(),fe=(0,R.useMemo)(()=>[...M&&b.data?an(v,b.data):nn(v,M),...b.data?on(b.data):[]].map(e=>({...e,selected:e.id===le})),[v,b.data,le,M]),P=!!_,he=e=>{if(Q(e.sourceHandle)||Q(e.targetHandle))return Q(e.sourceHandle)&&Q(e.targetHandle)&&b.isValid(e);if(e.targetHandle!==`in`)return!1;let t=S.get(J(e.target)),n=S.get(J(e.source));return t?.kind===`state`&&gr(n)===gr(t)},ge=e=>{ae(br);let t=[...e].flatMap(([e,t])=>{let n=J(e),r=E.get(n),i=O?.get(n),a={x:Math.round(t.x),y:Math.round(t.y)};return r===void 0||!D.has(n)&&i&&Math.round(i.x)===a.x&&Math.round(i.y)===a.y?[]:[[r,a]]});t.length>0&&T({...w,...Object.fromEntries(t)})},_e=g&&(e=>{let t=E.get(J(e));t!==void 0&&T(oe(w,t))}),I=()=>{T({}),j(e=>e+1)},ve=e=>{let t=new Map;for(let n of e){if(n.type!==`position`||!n.position||!k)continue;let e=n.position;n.dragging?ae(t=>new Map(t).set(n.id,e)):t.set(n.id,e)}t.size>0&&ge(t);let n=e.filter(e=>e.type===`select`);if(n.length===0)return;let r=new Set(N);for(let e of n)e.selected?r.add(e.id):r.delete(e.id);se(r);let[a]=r.size===1?[...r]:[],s=a===void 0||q(a)?void 0:J(a);if(s!==void 0&&(ye||xe.current))return i===void 0?void 0:o(void 0);s!==i&&o(s)},ye=we(`Shift`),xe=(0,R.useRef)(!1);return(0,H.jsx)(sn.Provider,{value:_?l:void 0,children:(0,H.jsx)(bn.Provider,{value:_e,children:(0,H.jsx)(ln.Provider,{value:b.actions,children:(0,H.jsx)(fr.Provider,{value:b.check,children:(0,H.jsxs)(`div`,{ref:ee,className:`relative h-full w-full`,children:[(0,H.jsxs)(Ce,{className:`pb-workflow`,nodes:ce,edges:fe,nodeTypes:hr,nodesDraggable:k,nodeDragThreshold:4,selectNodesOnDrag:!1,nodesConnectable:P,connectOnClick:!1,connectionDragThreshold:4,edgesFocusable:P,elementsSelectable:!0,deleteKeyCode:P?[`Backspace`,`Delete`]:null,onNodesChange:ve,onEdgesChange:e=>{for(let t of e)t.type===`select`&&(t.selected?de(t.id):de(e=>e===t.id?void 0:e))},isValidConnection:he,onConnect:t=>{if(_&&t.sourceHandle){if(Q(t.sourceHandle))return b.connect(t);_.onChange(_.edits.connect(e,t.sourceHandle,J(t.source),J(t.target)))}},onConnectEnd:b.connectEnd,connectionLineComponent:pr,onDelete:({nodes:t,edges:n})=>{if(!_)return;let r=t.filter(e=>!q(e.id)).map(e=>J(e.id)).filter(e=>e!==``),i=b.remove(e,t,n);for(let e of n){let t=e.data;t.kind!==`data`&&!r.includes(t.source)&&!r.includes(J(e.target))&&(i=_.edits.disconnect(i,t))}for(let e of r)r.some(t=>e.startsWith(`${t}/`))||(i=_.edits.removeState(i,e));_.onChange(i)},multiSelectionKeyCode:`Shift`,onSelectionStart:()=>void(xe.current=!0),onSelectionEnd:()=>void(xe.current=!1),onNodeClick:(e,t)=>!e.shiftKey&&!q(t.id)&&o(J(t.id)),onPaneClick:()=>o(void 0),zoomOnScroll:!0,panOnScroll:!1,panOnDrag:[0,1,2],selectionOnDrag:!1,selectionKeyCode:`Shift`,preventScrolling:!0,onPaneContextMenu:e=>e.preventDefault(),minZoom:.2,maxZoom:1.5,"aria-label":F(`canvas`),children:[(0,H.jsx)(Te,{gap:16}),f&&(0,H.jsx)(be,{position:`top-left`,children:(0,H.jsx)(r,{label:F(`graphView`),value:y,onChange:te,options:[{value:`pins`,label:F(`viewPins`)},{value:`simple`,label:F(`viewSimple`)}]})}),k&&Object.keys(w).length>0&&(0,H.jsx)(be,{position:`top-right`,children:(0,H.jsxs)(a,{title:F(`tidyUpHelp`),onClick:I,children:[(0,H.jsx)(m,{className:`size-3.5`,"aria-hidden":!0}),F(`tidyUp`)]})}),(0,H.jsx)(Se,{showInteractive:!1}),(0,H.jsx)(_r,{laidOut:x,tidied:A}),p&&(0,H.jsx)(vr,{}),(0,H.jsx)(yr,{laidOut:O,ids:ce.map(e=>e.id)})]}),b.offer&&(0,H.jsx)($n,{offer:b.offer,onClose:b.closeOffer})]})})})})})},Sr=e=>(0,H.jsx)(ve,{children:(0,H.jsx)(xr,{...e})});export{it as a,Le as c,Pe as d,je as f,ze as g,Be as h,ot as i,Ue as l,Ve as m,cn as n,at as o,Me as p,lt as r,Ke as s,Sr as t,Fe as u};
|
|
4
|
+
//# debugId=4566542b-c2a2-415f-a78f-d89d82247931
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workflow-graph-editor-
|
|
2
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
3
|
-
//# debugId=
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workflow-graph-editor-BWDihza8.js","assets/rolldown-runtime-DFwUHQ4A.js","assets/react-CuiNlnus.js","assets/app-CONqqVEp.js","assets/vendor-t7Q7QbPu.js","assets/app-lQJl2mz_.css","assets/step-catalog-BzL3DkPx.js","assets/circle-alert-X92Rz4B3.js","assets/workflow-canvas-BFZlQrwq.js","assets/layout-grid-0SB37tX1.js","assets/workflows-Bey4jszG.js","assets/lib-ajv-BPyvefs9.js","assets/lib-fast-deep-equal-BGljVuDb.js","assets/lib-json-schema-traverse-DxXzBYGi.js","assets/lib-fast-uri-DriPOqOU.js","assets/lib-jsonata-Cu4QFOo8.js","assets/use-run-trace-Dfgd79SI.js","assets/use-workflow-types-DdclcEcs.js","assets/lib-xyflow-system-hojcPWkY.js","assets/lib-d3-interpolate-C7dFwq8w.js","assets/lib-d3-color-B6XHLQii.js","assets/lib-d3-selection-C1a5EtaJ.js","assets/lib-d3-drag-CUJR_Vab.js","assets/lib-d3-dispatch-Bjkn7q4t.js","assets/lib-d3-zoom-DuEhbOrX.js","assets/lib-d3-transition-CUMO2iZu.js","assets/lib-d3-timer-CduGpaSm.js","assets/lib-d3-ease-ouQSXgQM.js","assets/lib-xyflow-react-CuNAzocq.js","assets/lib-classcat-otpLnDWv.js","assets/lib-zustand-r6mNROKr.js","assets/lib-use-sync-external-store-D4s7MiFL.js","assets/lib-xyflow-react-DLioOiRN.css","assets/use-elk-u1Ql5AOs.js","assets/lib-elkjs-ylMkguT9.js","assets/workflow-canvas-C5ExDFGN.css","assets/trash-SlzmvtD1.js","assets/graph-frame-PVfWqgbJ.js","assets/workflow-workbench-Crm4s5S7.js","assets/record-sidebar-HqyBXBwn.js","assets/step-panel-CgBuE7Cg.js","assets/use-workflow-page-FEUfCpTS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Cr as r,Q as i,Sc as a,Sl as o,Wo as s,k as c}from"./app-CONqqVEp.js";import{C as l}from"./vendor-t7Q7QbPu.js";import{_ as u,o as d,v as f,w as p,y as m}from"./use-run-trace-Dfgd79SI.js";import{n as h,t as g}from"./use-workflow-types-DdclcEcs.js";import{n as _}from"./use-workflow-page-FEUfCpTS.js";var v=e(t(),1),y=e(n(),1),b=(0,v.lazy)(()=>l(()=>import(`./workflow-graph-editor-BWDihza8.js`).then(e=>({default:e.WorkflowGraphEditor})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]))),x=(0,v.lazy)(()=>l(()=>import(`./workflow-workbench-Crm4s5S7.js`).then(e=>({default:e.WorkflowWorkbench})),__vite__mapDeps([38,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,39,40,41]))),S=()=>(0,y.jsx)(a,{className:`h-full min-h-[22rem] w-full`}),C=[`trigger`,`execution_order`,`connections`,`trace`],w=(e,t)=>{let n=i(),r=e=>{if(!n?.model.fields[e])return null;let t=n.value(e);if(t===``||t===void 0)return null;if(typeof t!=`string`||e!==`trigger`&&e!==`connections`)return t;try{return JSON.parse(t)}catch{return t}},a=n?p({...Object.fromEntries(C.map(e=>[e,r(e)])),state_machine:e}):f({stateMachine:e}),o=t&&(e=>{let i=m(e);if(t(i.state_machine),n)for(let e of C){let t=n.model.fields[e];t&&JSON.stringify(i[e])!==JSON.stringify(r(e))&&n.change(e,c(t,i[e]))}}),s=n?.model.fields.layout;return{definition:a,change:o,layout:s?d(n.value(`layout`)):void 0,changeLayout:t&&s&&(e=>n.change(`layout`,c(s,e)))}},T=({value:e,onChange:t})=>{let n=g(),i=_(),{definition:a,change:o,layout:c,changeLayout:l}=w(e,t),u={...c&&{layout:c},...l&&{onLayoutChange:l}};return n.error?(0,y.jsx)(r,{title:h(`typesFailed`),error:n.error}):n.data?(0,y.jsx)(s.Provider,{value:void 0,children:(0,y.jsx)(v.Suspense,{fallback:(0,y.jsx)(S,{}),children:i?(0,y.jsx)(x,{view:i,value:a,types:n.data,...o&&{onChange:o},...u}):(0,y.jsx)(b,{value:a,types:n.data,...o&&{onChange:o},...u})})}):(0,y.jsx)(S,{})},E=({value:e})=>(0,y.jsx)(T,{value:e}),D=({value:e,onChange:t})=>(0,y.jsx)(T,{value:e,onChange:t}),O=({value:e})=>(0,y.jsx)(`span`,{className:`tabular-nums`,children:h(`stateCount`,{count:u(f({stateMachine:e}).stateMachine).length})}),k={of:[...o.workflow],display:E,editor:D,cell:O,wide:!0};export{k as workflowField};
|
|
3
|
+
//# debugId=8d5bf62c-c822-4335-9c17-c58c3acef600
|
package/dist/shell/assets/{workflow-graph-editor-DzpB5Wg4.js → workflow-graph-editor-BWDihza8.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
2
|
-
//# debugId=
|
|
1
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Lc as r,Tc as i,X as a}from"./app-CONqqVEp.js";import{E as o,S as s,_ as c,a as l,b as u,g as d,i as f,k as p,m,n as h,t as g,w as _,y as v}from"./step-catalog-BzL3DkPx.js";import{t as y}from"./workflow-canvas-BFZlQrwq.js";import{E as b,S as x,b as S,v as C}from"./use-run-trace-Dfgd79SI.js";import{n as w}from"./use-workflow-types-DdclcEcs.js";import{n as T,t as E}from"./graph-frame-PVfWqgbJ.js";var D=e(t(),1),O=e(n(),1),k=(e,t)=>{if(t===void 0||t===``)return[];let n=t.split(`/`);return S(b(e,t))?n:n.slice(0,-1)},A=({value:e,types:t,onChange:n,notice:S,layout:A,onLayoutChange:j})=>{let M=JSON.stringify(e??null),N=(0,D.useMemo)(()=>C(JSON.parse(M)),[M]),P=f(t),F=(0,D.useMemo)(()=>v(c(N,t,P)),[N,t,P]),I=(0,D.useMemo)(()=>u(N),[N]),[L,R]=(0,D.useState)(),[z,B]=(0,D.useState)(),V=(0,D.useMemo)(()=>h(t),[t]),H=L===``||L!==void 0&&b(N,L)?L:void 0,U=k(N,H),W=(e,t)=>{if(!n)return;let r=o(N,w(`newStep`));n(t?_(N,e,r,w(`newStep`),t):s(N,U,e,r,w(`newStep`))),R(x(t?p(t):U,r)),B(void 0)};return(0,O.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n&&(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,O.jsxs)(i,{onClick:()=>B(z?void 0:{}),"aria-expanded":!!z,children:[(0,O.jsx)(r,{className:`size-3.5`,"aria-hidden":!0}),U.length>0?w(`addStepInside`,{map:U.join(`/`)}):w(`addStep`)]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:w(`connectHelp`)})]}),(0,O.jsx)(d,{problems:F.whole}),(0,O.jsx)(E,{canvas:(0,O.jsx)(y,{definition:N,problems:F.byNode,warnings:I,selected:H,onSelect:R,onChange:n,edits:l,onAddAt:e=>B({at:e}),types:t,schemas:P,layout:A,onLayoutChange:j}),panel:(0,O.jsxs)(O.Fragment,{children:[S,z?(0,O.jsx)(a,{autoFocus:!0,groups:V,onPick:e=>W(g(e.id),z.at)}):H===void 0?(0,O.jsx)(T,{children:w(`pickNode`)}):(0,O.jsx)(m,{definition:N,types:t,selected:H,problems:F.byNode.get(H)??[],warnings:I.get(H)??[],onChange:n,onSelect:R})]})})]})};export{A as WorkflowGraphEditor};
|
|
2
|
+
//# debugId=560e2873-6bc5-465d-9da1-f8451d00264c
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-trace-view-
|
|
2
|
-
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{
|
|
3
|
-
//# debugId=
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-trace-view-hxNAb9rR.js","assets/rolldown-runtime-DFwUHQ4A.js","assets/react-CuiNlnus.js","assets/app-CONqqVEp.js","assets/vendor-t7Q7QbPu.js","assets/app-lQJl2mz_.css","assets/workflow-canvas-BFZlQrwq.js","assets/circle-alert-X92Rz4B3.js","assets/layout-grid-0SB37tX1.js","assets/workflows-Bey4jszG.js","assets/lib-ajv-BPyvefs9.js","assets/lib-fast-deep-equal-BGljVuDb.js","assets/lib-json-schema-traverse-DxXzBYGi.js","assets/lib-fast-uri-DriPOqOU.js","assets/lib-jsonata-Cu4QFOo8.js","assets/use-run-trace-Dfgd79SI.js","assets/use-workflow-types-DdclcEcs.js","assets/lib-xyflow-system-hojcPWkY.js","assets/lib-d3-interpolate-C7dFwq8w.js","assets/lib-d3-color-B6XHLQii.js","assets/lib-d3-selection-C1a5EtaJ.js","assets/lib-d3-drag-CUJR_Vab.js","assets/lib-d3-dispatch-Bjkn7q4t.js","assets/lib-d3-zoom-DuEhbOrX.js","assets/lib-d3-transition-CUMO2iZu.js","assets/lib-d3-timer-CduGpaSm.js","assets/lib-d3-ease-ouQSXgQM.js","assets/lib-xyflow-react-CuNAzocq.js","assets/lib-classcat-otpLnDWv.js","assets/lib-zustand-r6mNROKr.js","assets/lib-use-sync-external-store-D4s7MiFL.js","assets/lib-xyflow-react-DLioOiRN.css","assets/use-elk-u1Ql5AOs.js","assets/lib-elkjs-ylMkguT9.js","assets/workflow-canvas-C5ExDFGN.css","assets/step-panel-CgBuE7Cg.js","assets/graph-frame-PVfWqgbJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){try{var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:protobase-app":!0})}catch{}})();import{o as e}from"./rolldown-runtime-DFwUHQ4A.js";import{i as t,t as n}from"./react-CuiNlnus.js";import{Sc as r,Sl as i}from"./app-CONqqVEp.js";import{C as a}from"./vendor-t7Q7QbPu.js";var o=e(t(),1),s=e(n(),1),c=(0,o.lazy)(()=>a(()=>import(`./run-trace-view-hxNAb9rR.js`).then(e=>({default:e.RunTrace})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]))),l=({value:e})=>e===null?null:(0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)(r,{className:`h-[28rem] w-full max-sm:h-[22rem]`}),children:(0,s.jsx)(c,{runId:e})}),u=({value:e})=>(0,s.jsx)(`span`,{className:`font-mono text-xs`,children:e}),d={of:[...i.workflow_run],display:l,cell:u,wide:!0};export{d as workflowRunField};
|
|
3
|
+
//# debugId=a7ef23fd-d8af-4931-9c66-a8415cbde72f
|