@protobase/ui 0.112.0 → 0.112.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/account/messages.d.ts +2 -2
  2. package/dist/app/change-confirm/messages.d.ts +2 -2
  3. package/dist/app/charts/messages.d.ts +2 -2
  4. package/dist/app/comments/messages.d.ts +2 -2
  5. package/dist/app/confirm-sign-in-messages.d.ts +2 -2
  6. package/dist/app/create/messages.d.ts +2 -2
  7. package/dist/app/custom-section.d.ts +1 -1
  8. package/dist/app/delete/messages.d.ts +2 -2
  9. package/dist/app/displays/list-cards.d.ts +1 -1
  10. package/dist/app/displays/messages.d.ts +2 -2
  11. package/dist/app/embedded-list/messages.d.ts +2 -2
  12. package/dist/app/export/messages.d.ts +2 -2
  13. package/dist/app/field-messages.d.ts +2 -2
  14. package/dist/app/field-types/custom-step-container/messages.d.ts +2 -2
  15. package/dist/app/field-types/json/messages.d.ts +2 -2
  16. package/dist/app/field-types/runner-install/messages.d.ts +2 -2
  17. package/dist/app/field-types/widget-part.d.ts +1 -1
  18. package/dist/app/field-types/workflow/messages.d.ts +2 -2
  19. package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
  20. package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
  21. package/dist/app/file-viewers/messages.d.ts +2 -2
  22. package/dist/app/focus/messages.d.ts +2 -2
  23. package/dist/app/gallery/gallery-layout.d.ts +2 -2
  24. package/dist/app/gallery/messages.d.ts +2 -2
  25. package/dist/app/hand-order/messages.d.ts +2 -2
  26. package/dist/app/history/messages.d.ts +2 -2
  27. package/dist/app/import/messages.d.ts +2 -2
  28. package/dist/app/list-edit/messages.d.ts +2 -2
  29. package/dist/app/list-messages.d.ts +2 -2
  30. package/dist/app/messages.d.ts +2 -2
  31. package/dist/app/meta-gate-messages.d.ts +2 -2
  32. package/dist/app/new-version/messages.d.ts +2 -2
  33. package/dist/app/pages/custom-boundary.d.ts +1 -1
  34. package/dist/app/pages/custom-chosen.d.ts +1 -1
  35. package/dist/app/pages/messages.d.ts +2 -2
  36. package/dist/app/record-chart/messages.d.ts +2 -2
  37. package/dist/app/record-messages.d.ts +2 -2
  38. package/dist/app/record-mode/shown-layout.d.ts +1 -1
  39. package/dist/app/record-row/messages.d.ts +2 -2
  40. package/dist/app/related-cards/messages.d.ts +2 -2
  41. package/dist/app/runtime/messages.d.ts +2 -2
  42. package/dist/app/saved/messages.d.ts +2 -2
  43. package/dist/app/saved/saved-list.d.ts +1 -1
  44. package/dist/app/saved/use-favorite.d.ts +1 -1
  45. package/dist/app/search/messages.d.ts +2 -2
  46. package/dist/app/searches/messages.d.ts +2 -2
  47. package/dist/app/searches/use-save-search.d.ts +1 -1
  48. package/dist/app-shell/index.d.ts +2 -1
  49. package/dist/app-shell/index.js +2 -1
  50. package/dist/app-shell/logo-tap.d.ts +11 -0
  51. package/dist/app-shell/logo-tap.js +16 -0
  52. package/dist/app-shell/messages.d.ts +2 -2
  53. package/dist/app-shell/sidebar.js +2 -0
  54. package/dist/assistant-dock/messages.d.ts +2 -2
  55. package/dist/auth/messages.d.ts +2 -2
  56. package/dist/calls/messages.d.ts +2 -2
  57. package/dist/chat/messages.d.ts +2 -2
  58. package/dist/data-grid/messages.d.ts +2 -2
  59. package/dist/filter-panel/messages.d.ts +2 -2
  60. package/dist/format/messages.d.ts +2 -2
  61. package/dist/forms/messages.d.ts +2 -2
  62. package/dist/index.d.ts +2 -1
  63. package/dist/index.js +2 -1
  64. package/dist/invitations/messages.d.ts +2 -2
  65. package/dist/live/messages.d.ts +2 -2
  66. package/dist/mailbox/messages.d.ts +2 -2
  67. package/dist/mentions/messages.d.ts +2 -2
  68. package/dist/mocks/customers.d.ts +1 -1
  69. package/dist/mocks/invoices.d.ts +1 -1
  70. package/dist/mocks/orders.d.ts +1 -1
  71. package/dist/notifications/bell/messages.d.ts +2 -2
  72. package/dist/organizations/messages.d.ts +2 -2
  73. package/dist/package.js +1 -1
  74. package/dist/plugins/before-sign-in.d.ts +1 -1
  75. package/dist/primitives/messages.d.ts +2 -2
  76. package/dist/record-view/messages.d.ts +2 -2
  77. package/dist/shell/assets/{app-CYep6fHL.js → app-4qlxuQdl.js} +9 -9
  78. package/dist/shell/assets/{graph-view-BfYs6ayj.js → graph-view-Dky1whXD.js} +2 -2
  79. package/dist/shell/assets/{html-viewer-C0QI0zaR.js → html-viewer-lp3H6iV2.js} +2 -2
  80. package/dist/shell/assets/{in-place-form-y_QOwKOi.js → in-place-form-B-GQA4qE.js} +2 -2
  81. package/dist/shell/assets/{index-CW7p8b2W.js → index-VlTh9QjU.js} +2 -2
  82. package/dist/shell/assets/{maplibre-BGA6uo19.js → maplibre-DjGuR3NM.js} +2 -2
  83. package/dist/shell/assets/{markdown-content-DFkH88LY.js → markdown-content-C_I33tF1.js} +2 -2
  84. package/dist/shell/assets/{record-map-4A4R4ckl.js → record-map-0rx4A_p3.js} +2 -2
  85. package/dist/shell/assets/{records-map-BsE-mBBB.js → records-map-8Od0n3e7.js} +2 -2
  86. package/dist/shell/assets/{run-trace-view-CSoeovIo.js → run-trace-view-5Xia2z2X.js} +2 -2
  87. package/dist/shell/assets/{search-picker-DAcPiMQA.js → search-picker-BeTUduFk.js} +2 -2
  88. package/dist/shell/assets/shared-protobase-ui-vMThpYOB.js +2 -0
  89. package/dist/shell/assets/{step-catalog-BuUwSkK9.js → step-catalog-Aw0TBmFO.js} +2 -2
  90. package/dist/shell/assets/{step-panel-CoOoYMdA.js → step-panel-BbMJ5sl9.js} +2 -2
  91. package/dist/shell/assets/{use-sibling-page-Ccwp2gM-.js → use-sibling-page-CaUyRcwf.js} +3 -3
  92. package/dist/shell/assets/{workflow-canvas-CNpgSr9v.js → workflow-canvas-vb0Tlov2.js} +2 -2
  93. package/dist/shell/assets/{workflow-graph-editor-z38xU0ar.js → workflow-graph-editor-_fE7qonR.js} +2 -2
  94. package/dist/shell/assets/workflow-workbench-C_m8akk8.js +4 -0
  95. package/dist/shell/index.html +3 -3
  96. package/dist/shell/protobase.shell.json +2 -2
  97. package/dist/shell/protobase.sw.js +2 -2
  98. package/dist/shell-source-maps/assets/app-4qlxuQdl.js.map +1 -0
  99. package/dist/shell-source-maps/assets/{graph-view-BfYs6ayj.js.map → graph-view-Dky1whXD.js.map} +1 -1
  100. package/dist/shell-source-maps/assets/{html-viewer-C0QI0zaR.js.map → html-viewer-lp3H6iV2.js.map} +1 -1
  101. package/dist/shell-source-maps/assets/{in-place-form-y_QOwKOi.js.map → in-place-form-B-GQA4qE.js.map} +1 -1
  102. package/dist/shell-source-maps/assets/{index-CW7p8b2W.js.map → index-VlTh9QjU.js.map} +1 -1
  103. package/dist/shell-source-maps/assets/{maplibre-BGA6uo19.js.map → maplibre-DjGuR3NM.js.map} +1 -1
  104. package/dist/shell-source-maps/assets/{markdown-content-DFkH88LY.js.map → markdown-content-C_I33tF1.js.map} +1 -1
  105. package/dist/shell-source-maps/assets/{record-map-4A4R4ckl.js.map → record-map-0rx4A_p3.js.map} +1 -1
  106. package/dist/shell-source-maps/assets/{records-map-BsE-mBBB.js.map → records-map-8Od0n3e7.js.map} +1 -1
  107. package/dist/shell-source-maps/assets/{run-trace-view-CSoeovIo.js.map → run-trace-view-5Xia2z2X.js.map} +1 -1
  108. package/dist/shell-source-maps/assets/{search-picker-DAcPiMQA.js.map → search-picker-BeTUduFk.js.map} +1 -1
  109. package/dist/shell-source-maps/assets/shared-protobase-ui-vMThpYOB.js.map +1 -0
  110. package/dist/shell-source-maps/assets/{step-catalog-BuUwSkK9.js.map → step-catalog-Aw0TBmFO.js.map} +1 -1
  111. package/dist/shell-source-maps/assets/{step-panel-CoOoYMdA.js.map → step-panel-BbMJ5sl9.js.map} +1 -1
  112. package/dist/shell-source-maps/assets/{use-sibling-page-Ccwp2gM-.js.map → use-sibling-page-CaUyRcwf.js.map} +1 -1
  113. package/dist/shell-source-maps/assets/{workflow-canvas-CNpgSr9v.js.map → workflow-canvas-vb0Tlov2.js.map} +1 -1
  114. package/dist/shell-source-maps/assets/{workflow-graph-editor-z38xU0ar.js.map → workflow-graph-editor-_fE7qonR.js.map} +1 -1
  115. package/dist/shell-source-maps/assets/{workflow-workbench-CAk5M4iT.js.map → workflow-workbench-C_m8akk8.js.map} +1 -1
  116. package/dist/status/messages.d.ts +2 -2
  117. package/dist/users/messages.d.ts +2 -2
  118. package/package.json +5 -5
  119. package/dist/shell/assets/shared-protobase-ui-BudhYj2I.js +0 -2
  120. package/dist/shell/assets/workflow-workbench-CAk5M4iT.js +0 -4
  121. package/dist/shell-source-maps/assets/app-CYep6fHL.js.map +0 -1
  122. package/dist/shell-source-maps/assets/shared-protobase-ui-BudhYj2I.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/status/messages.d.ts
3
3
  export declare const text: {
4
- (id: "busy" | "online" | "custom" | "clear" | "away" | "setStatus" | "editStatus" | "availability" | "automatic" | "doNotDisturb" | "doNotDisturbHint" | "statusText" | "statusPlaceholder" | "clearsAfter" | "never" | "thirtyMinutes" | "oneHour" | "fourHours" | "today" | "thisWeek" | "clearsAt" | "pickTime" | "save" | "cancel" | "couldNotSave" | "until", values?: Record<string, MessageValue>): string;
5
- rich(id: "busy" | "online" | "custom" | "clear" | "away" | "setStatus" | "editStatus" | "availability" | "automatic" | "doNotDisturb" | "doNotDisturbHint" | "statusText" | "statusPlaceholder" | "clearsAfter" | "never" | "thirtyMinutes" | "oneHour" | "fourHours" | "today" | "thisWeek" | "clearsAt" | "pickTime" | "save" | "cancel" | "couldNotSave" | "until", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "busy" | "cancel" | "save" | "never" | "custom" | "statusText" | "online" | "couldNotSave" | "today" | "until" | "away" | "setStatus" | "editStatus" | "availability" | "automatic" | "doNotDisturb" | "doNotDisturbHint" | "statusPlaceholder" | "clearsAfter" | "thirtyMinutes" | "oneHour" | "fourHours" | "thisWeek" | "clearsAt" | "pickTime" | "clear", values?: Record<string, MessageValue>): string;
5
+ rich(id: "busy" | "cancel" | "save" | "never" | "custom" | "statusText" | "online" | "couldNotSave" | "today" | "until" | "away" | "setStatus" | "editStatus" | "availability" | "automatic" | "doNotDisturb" | "doNotDisturbHint" | "statusPlaceholder" | "clearsAfter" | "thirtyMinutes" | "oneHour" | "fourHours" | "thisWeek" | "clearsAt" | "pickTime" | "clear", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { MessageValue } from "../locale/messages.js";
2
2
  //#region src/users/messages.d.ts
3
3
  export declare const text: {
4
- (id: "people" | "email" | "name" | "password" | "passwordOptional" | "block" | "inviteSomeone" | "inviteDescription" | "notAcceptedYet" | "sendingAgain" | "nobodyWaiting" | "blocked" | "couldNotReadRoles" | "addAnAccount" | "addDescription" | "addAccount" | "peopleDescription" | "findSomeone" | "emailAddress" | "keepOneRole" | "unblock", values?: Record<string, MessageValue>): string;
5
- rich(id: "people" | "email" | "name" | "password" | "passwordOptional" | "block" | "inviteSomeone" | "inviteDescription" | "notAcceptedYet" | "sendingAgain" | "nobodyWaiting" | "blocked" | "couldNotReadRoles" | "addAnAccount" | "addDescription" | "addAccount" | "peopleDescription" | "findSomeone" | "emailAddress" | "keepOneRole" | "unblock", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
4
+ (id: "email" | "name" | "password" | "people" | "block" | "passwordOptional" | "inviteSomeone" | "inviteDescription" | "notAcceptedYet" | "sendingAgain" | "nobodyWaiting" | "couldNotReadRoles" | "addAnAccount" | "addDescription" | "addAccount" | "peopleDescription" | "findSomeone" | "emailAddress" | "keepOneRole" | "blocked" | "unblock", values?: Record<string, MessageValue>): string;
5
+ rich(id: "email" | "name" | "password" | "people" | "block" | "passwordOptional" | "inviteSomeone" | "inviteDescription" | "notAcceptedYet" | "sendingAgain" | "nobodyWaiting" | "couldNotReadRoles" | "addAnAccount" | "addDescription" | "addAccount" | "peopleDescription" | "findSomeone" | "emailAddress" | "keepOneRole" | "blocked" | "unblock", values: Record<string, MessageValue | import("react").ReactNode>): import("react").ReactNode;
6
6
  };
7
7
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/ui",
3
- "version": "0.112.0",
3
+ "version": "0.112.1",
4
4
  "description": "The Protobase admin app and the React hooks and components for custom UI.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -40,10 +40,10 @@
40
40
  "dependencies": {
41
41
  "@dnd-kit/core": "^6.3.1",
42
42
  "@dnd-kit/sortable": "^10.0.0",
43
- "@protobase/client": "0.112.0",
44
- "@protobase/layout": "0.112.0",
45
- "@protobase/schema": "0.112.0",
46
- "@protobase/workflows": "0.112.0",
43
+ "@protobase/client": "0.112.1",
44
+ "@protobase/layout": "0.112.1",
45
+ "@protobase/schema": "0.112.1",
46
+ "@protobase/workflows": "0.112.1",
47
47
  "@sentry/browser": "^11.7.0",
48
48
  "@tanstack/react-query": "^5.104.1",
49
49
  "@tanstack/react-table": "^9.2.6",
@@ -1,2 +0,0 @@
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{B as r,n as i,t as a}from"./use-app-address-D50fN1nP.js";import{Y as o,rt as s,tt as c}from"./vendor-WWp_xlp2.js";import{S as l,b as u,i as d,r as f,t as p,u as m,w as ee,x as h}from"./api-provider-CcDtTh0D.js";import{$ as g,A as te,An as ne,B as re,Bt as ie,C as ae,Ct as oe,D as _,Dt as se,E as ce,F as le,G as ue,Gt as v,H as y,Ht as b,I as x,J as S,Jt as C,K as w,Kt as T,L as E,M as D,N as O,O as k,Ot as A,P as j,Q as M,Qt as N,R as P,S as F,St as I,T as L,V as R,Vt as z,W as B,Wt as V,X as H,Xt as U,Y as de,Yt as fe,Z as pe,Zt as me,_ as he,_t as ge,a as _e,an as ve,at as ye,b as be,bt as xe,c as Se,ct as Ce,d as we,dt as Te,et as Ee,f as De,ft as Oe,g as ke,gt as Ae,h as je,ht as Me,i as Ne,in as Pe,it as Fe,j as Ie,k as Le,kn as Re,l as ze,lt as Be,m as Ve,mt as He,n as Ue,nt as We,o as Ge,ot as Ke,p as qe,pt as Je,q as Ye,qt as Xe,r as Ze,rn as Qe,rt as $e,s as et,sn as tt,st as nt,t as rt,tt as it,u as at,ut as ot,v as st,vt as ct,w as lt,wt as W,x as ut,xt as dt,y as ft,z as pt,zt as mt}from"./app-CYep6fHL.js";import{I as G,p as ht}from"./display-value-fDiKbfJO.js";import{r as gt}from"./messages-ClKBpZlk.js";import{r as _t,t as vt}from"./use-meta-BqEqOLNe.js";import{t as K}from"./cn-B1sdg8aY.js";import{A as yt,D as bt,O as xt}from"./checkbox-COOOlJPG.js";import{a as St,i as Ct,n as wt,r as Tt,t as Et}from"./use-sibling-page-Ccwp2gM-.js";import{t as Dt}from"./field-badge-3QmjR1r3.js";import{t as Ot}from"./search-picker-DAcPiMQA.js";import{t as kt}from"./in-place-form-y_QOwKOi.js";var q={name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]};q.node;var J=gt(q),Y=(e,t)=>{let{address:n,href:r,open:a}=i(),o=n?.kind===`record`&&n.resource===e&&n.key===t&&n.call===`join`,s=e=>({href:e,onFollow:()=>a(e)});return{joining:o,join:s(r({kind:`record`,resource:e,key:t,call:`join`})),leave:s(r({kind:`record`,resource:e,key:t}))}},X=e(n(),1),At=({resource:e,recordKey:t,...n})=>{let{joining:r,leave:i}=Y(e,t);return r?(0,X.jsx)(_,{leave:i,...n},`${e}/${t}`):null},Z=e(t(),1),Q=(e,t)=>{let n=f(),r=s(),i=m.recordCalls(e,t),a=o({queryKey:i,queryFn:()=>n.calls(e,t)});return(0,Z.useEffect)(()=>{let i=m.recordCalls(e,t),a=n.channel(e,t),o=a.on(ee,e=>e.server&&r.setQueryData(i,e.payload.items)),s=a.onStatus(e=>e.state===`joined`&&void r.invalidateQueries({queryKey:i}));return()=>{o(),s(),a.leave()}},[n,r,e,t]),{...a,ongoing:a.data?.find(e=>e.ended_at===null)}},jt=({resource:e,recordKey:t,className:n})=>{let{ongoing:r,isPending:i}=Q(e,t),{joining:a,join:o}=Y(e,t);if(i)return null;if(!r)return a?null:(0,X.jsxs)(G,{to:o,className:K(h({size:`sm`}),n),children:[(0,X.jsx)(J,{className:`size-3.5`}),k(`startCall`)]});let s=r.members.length;return(0,X.jsxs)(`span`,{role:`status`,className:K(`inline-flex items-center gap-1.5 rounded-md bg-success-soft px-2 py-0.5 text-body text-foreground`,n),children:[(0,X.jsx)(J,{className:`size-3.5 text-success`}),k(`inProgress`),(0,X.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,X.jsx)(`span`,{"aria-label":k(`people`,{count:s}),children:s}),!a&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,X.jsx)(G,{to:o,className:h({variant:`primary`,size:`sm`}),children:k(`join`)})]})]})},Mt={width:640,height:480},$=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=ht(e,Mt);return t?[{image:t,alt:e.alt??``}]:[]}),Nt=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=$(e),o=ue(a.length);return(0,X.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:K(`group/carousel relative overflow-hidden`,i),children:[(0,X.jsx)(w,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,X.jsx)(me,{image:e,alt:t,loading:`lazy`,className:K(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,X.jsx)(Ye,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Pt=({name:e,label:t,options:n,value:r,onChange:i})=>(0,X.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,X.jsxs)(`label`,{className:K(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,X.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,X.jsx)(`span`,{className:K(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,X.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),Ft=(e,t,n)=>{let r=f(),i=s(),a=[...new Set(n)].sort();return o({queryKey:m.pickedLabels(e.name,a.join(`,`)),enabled:a.length>0,placeholderData:c,queryFn:()=>V(i,r,e,a,t)}).data??new Map},It=e=>{let{resources:t,views:n}=r(),i=t[e.resource];if(!i)throw Error(`RecordPicker: the app has no resource named "${e.resource}"`);if(i.primaryKey.length!==1)throw Error(`RecordPicker: "${e.resource}" has a composite key, which a picker cannot name`);let a=n[e.resource],o=e.multiple?e.value:e.value===void 0?[]:[e.value],[s,c]=(0,Z.useState)({}),l=Ft(i,a,o),u=e=>s[e]??l.get(e)??e,d=(e,t)=>c(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,X.jsx)(W,{target:i,view:a,value:t??``,label:t===void 0?void 0:u(t),invalid:e.invalid,onChange:(e,t)=>{d(e,t),n(e)}})}let{value:f,onChange:p}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(W,{target:i,view:a,value:``,chosen:f,several:!0,invalid:e.invalid,onChange:(e,t)=>{d(e,t),p(f.includes(e)?f.filter(t=>t!==e):[...f,e])}}),f.length>0&&(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,X.jsx)(b,{label:u(e),onRemove:()=>p(f.filter(t=>t!==e))},e))})]})};export{I as ActionCard,dt as ActionInputError,p as ApiProvider,rt as App,a as AppLink,M as AppMark,be as AssistantDock,R as AuthLayout,H as AvailabilityMark,u as Button,jt as CallMark,_ as CallView,Nt as Carousel,Te as ChatDivider,ot as ChatMessage,Be as ChatThread,Pt as Choices,j as CodeForm,lt as CompactTable,Fe as Composer,_t as Dialog,it as DiffView,Qe as Field,Dt as FieldBadge,L as FieldList,wt as FileReadError,Ne as FocusActions,_e as FocusNotice,ze as FocusPage,Ge as FocusPanel,et as FocusSlot,he as Form,St as HtmlFrame,kt as InPlaceForm,xt as Input,g as LogoMark,A as Markdown,Ke as MentionBox,ye as MentionedText,y as MenuSelect,oe as OtpInput,F as PartView,At as RecordCall,re as RecordLink,It as RecordPicker,le as ResendCodeButton,tt as ResponsiveDialog,G as RouteLink,Ot as SearchPicker,ve as Section,Pe as Segmented,bt as Select,ce as SidePanel,S as SignInPrompt,l as Spinner,pe as StatusMark,ae as StepList,N as Textarea,de as ToneEdge,x as allowDelayMs,h as buttonClass,Oe as chatDayLabel,v as definePlugin,T as defineUi,We as diffStats,nt as emptyDraft,se as fileNamed,Ue as isConflict,E as isFramed,Ce as mentionedIds,D as mergeUi,$e as parseDiff,Ee as parsePatch,Re as pluginApi,ne as protobaseVersion,Je as sameChatDay,Ct as siblingPage,C as statusRefreshMs,O as uiFromModule,te as useApiToken,i as useAppAddress,P as useArmedAfterFocus,ft as useAssistant,st as useAssistantClient,ut as useBackendData,f as useClient,He as useComponentReads,Me as useComponentSelect,ke as useCreateForm,Ae as useFacets,yt as useFieldControl,Tt as useFileText,at as useFocusPage,z as useFocusRecord,Se as useFocusZoneFilled,pt as useGuardedPress,ge as useHistogram,we as useInbox,xe as useLayoutRecord,ie as useList,B as useListDisplay,De as useMarkNotificationsRead,Xe as useMembers,vt as useMeta,fe as useOwnStatus,Ie as usePlugin,je as usePresence,Ve as usePushNotifications,o as useQuery,s as useQueryClient,mt as useRecord,Y as useRecordCallAddress,Q as useRecordCalls,d as useResourceClient,ct as useSeries,Et as useSiblingPage,Le as useSignedInUser,U as useStatuses,qe as useUnreadNotifications,Ze as useUpdateRecord};
2
- //# debugId=6e761623-d883-4cf2-895f-1d5909a48848
@@ -1,4 +0,0 @@
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{B as r,F as i,V as a,n as o,t as s}from"./use-app-address-D50fN1nP.js";import{rt as c}from"./vendor-WWp_xlp2.js";import{_ as l,b as u,r as d,u as f,x as p}from"./api-provider-CcDtTh0D.js";import{En as m,Ft as h,It as g,Mt as _,Nt as v,Pt as y,Qt as b,Rt as x,Sn as S,Ut as C,Vt as w,_n as T,a as E,en as D,fn as O,g as k,hn as ee,i as te,in as A,jt as ne,kt as re,nn as j,o as M,rn as N,s as P,u as ie,vn as ae,yn as F,zt as oe}from"./app-CYep6fHL.js";import{B as se,U as I,_ as L}from"./display-value-fDiKbfJO.js";import{t as ce}from"./value-badge-BKLV4otJ.js";import{A as le,C as ue,D as de,E as fe,O as pe,T as me,_ as he,a as ge,b as _e,c as ve,d as R,f as ye,g as be,h as xe,i as Se,k as Ce,l as we,m as Te,n as Ee,o as z,p as B,r as V,s as H,t as U,u as De,v as Oe,w as ke,x as Ae,y as je}from"./step-catalog-BuUwSkK9.js";import{r as W}from"./messages-ClKBpZlk.js";import{D as G,E as K,N as q,S as Me,T as J,_ as Ne,b as Pe,n as Y,v as Fe,w as Ie,y as Le}from"./checkbox-COOOlJPG.js";import{h as Re,m as ze,t as Be}from"./workflow-canvas-CNpgSr9v.js";import{t as X}from"./badge-ChHXC28D.js";import{d as Ve,f as He,p as Ue}from"./workflows-Bku4o2su.js";import{T as Z,a as We,w as Ge}from"./workflows-start-kl7rSSay.js";import{t as Ke}from"./search-picker-DAcPiMQA.js";import{t as qe}from"./in-place-form-y_QOwKOi.js";import{a as Je,o as Ye,r as Xe,t as Ze}from"./step-panel-CoOoYMdA.js";var Qe={name:`shuffle`,size:24,node:[[`path`,{d:`m18 14 4 4-4 4`,key:`10pe0f`}],[`path`,{d:`m18 2 4 4-4 4`,key:`pucp1d`}],[`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`,key:`1ailkh`}],[`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`,key:`km57vx`}],[`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`,key:`os18l9`}]]};Qe.node;var $e=W(Qe),Q=e(t(),1),$=e(n(),1),et=({types:e,placement:t,onAdd:n,onClose:r})=>{let i=(0,Q.useMemo)(()=>Ee(e),[e]);return(0,$.jsx)(M,{title:V(`addStepTitle`),onClose:r,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}),(0,$.jsx)(Ke,{autoFocus:!0,groups:i,onPick:e=>n(U(e.id))})]})})},tt=`$states.context.Execution.Input`,nt=e=>(e.description??``).split(` · `)[0],rt=({definition:e,path:t,target:n,run:r,onAssign:i,onBack:a,onTestRun:o})=>{let s=x(r===void 0?void 0:String(r.id),!1),c=(0,Q.useMemo)(()=>s.data??[],[s.data]),l=(0,Q.useMemo)(()=>z(e,t),[e,t]),d=(0,Q.useMemo)(()=>l.filter(t=>!we(e,t)),[l,e]),f=l.filter(t=>we(e,t)),p=e=>c.filter(t=>Ye(t.scope,t.state)===e).at(-1)?.output,h=(0,Q.useMemo)(()=>r?[{title:V(`runInputGroup`),items:ve(r.input??{}).map(({path:e,sample:t})=>({id:`input:${e}`,title:e===``?V(`wholeValue`):e,description:t}))},...d.flatMap(t=>{let n=p(t);if(n==null)return[];let r=J(t).name;return[{title:r,items:ve(n).map(({path:n,sample:i})=>({id:`step:${t}\n${n}`,title:n===``?V(`wholeValue`):n,description:De(e,t).added?`${i} · ${V(`addsVariable`,{step:r})}`:i}))}]})]:[],[r,c,d,e]),g=(t,r)=>{if(t.startsWith(`input:`)){n.set(R(n.value,H(tt,t.slice(6)))),a();return}let[o,s]=t.slice(5).split(`
2
- `),{variable:c,added:l}=De(e,o);l&&i(o,c,r),n.set(R(n.value,H(`$${c}`,s))),a()},_=d.filter(t=>K(e,t)&&p(t)==null);return(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(u,{size:`sm`,variant:`ghost`,className:`self-start`,onClick:a,children:[(0,$.jsx)(m,{className:`size-3.5`,"aria-hidden":!0}),V(`back`)]}),(0,$.jsx)(`h3`,{className:`font-semibold`,children:V(`insertInto`,{field:n.label})}),r?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:V(`valuesFrom`,{when:L(Date.parse(String(r.created_at)))})}),(0,$.jsx)(Ke,{autoFocus:!0,groups:h,onPick:e=>g(e.id,nt(e))}),_.length>0&&(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[_.map(e=>J(e).name).join(`, `),`: `,V(`noSample`)]}),f.length>0&&(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[f.map(e=>J(e).name).join(`, `),`: `,V(`outputShaped`)]})]}):(0,$.jsxs)(`div`,{className:`grid justify-items-start gap-2 text-body`,children:[(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:V(`noRunYet`)}),(0,$.jsx)(u,{onClick:o,children:V(`testRun`)}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:V(`typeByHand`)})]})]})},it=(e,t)=>{let n=w(),r=d(),{go:i}=o(),[a,s]=(0,Q.useState)(),[c,u]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1);return{start:async a=>{p(!0),s(void 0),u(!1);try{if(n.dirty&&!await n.save()){u(!0);return}let{record:o}=await r.create(`workflow_runs`,{workflow_id:e.workflow,rerun_of:e.run,...a}),{record:s}=await r.get(g,e.workflow);t(),i(v(e.workflow,String(o.id),Number(o.version),Number(s.version)))}catch(e){if(!l(e))throw e;s(e)}finally{p(!1)}},failure:a,refused:c,busy:f}},at=e=>e.map(e=>V(`stepActs`,e)).join(`, `),ot=({failure:e,refused:t})=>(0,$.jsxs)($.Fragment,{children:[e!==void 0&&(0,$.jsx)(D,{title:V(`notRerun`),error:e}),t&&(0,$.jsx)(`p`,{role:`alert`,className:`text-danger-text`,children:V(`rerunRefused`)})]}),st=({view:e,page:t,definition:n,types:r,step:i,onStep:a,onClose:o})=>{let s=w(),c=it(e,o),l=t.trace.steps.filter(e=>e.scope===``),d=Math.max(l.findIndex(e=>e.state===i),0),f=B(n,r,i),p=new Set(l.map(e=>e.state)),m=f.filter(e=>p.has(e.name)),h=f.filter(e=>!p.has(e.name)),g=(t.latest??0)+ +!!s.dirty,_=l.slice(0,d).find(e=>ye(t.trace.definition,n,e.state))?.state;return(0,$.jsx)(M,{title:V(`rerunTitle`,{step:i}),onClose:o,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 text-body`,children:[(0,$.jsx)(ot,{failure:c.failure,refused:c.refused}),(0,$.jsx)(`p`,{children:d===0?V(`rerunFromStart`,{version:g}):V(`rerunKeeps`,{count:d,version:g})}),m.length>0&&(0,$.jsx)(`p`,{children:V(`rerunActsAgain`,{steps:at(m)})}),h.length>0&&(0,$.jsx)(`p`,{children:V(`stepsAct`,{steps:at(h)})}),_&&(0,$.jsx)(`p`,{children:V(`rerunChanged`,{changed:_,step:i})}),_&&(0,$.jsx)(u,{variant:`primary`,className:`max-md:min-h-11`,onClick:()=>a(_),children:V(`rerunFromInstead`,{step:_})}),(0,$.jsx)(u,{variant:_?`secondary`:`primary`,className:`max-md:min-h-11`,loading:c.busy,onClick:()=>void c.start({rerun_from:i}),children:_?V(`rerunWithOldResult`,{step:i}):s.dirty?V(`saveAndRerunShort`):V(`rerunStart`)})]})})},ct=({view:e,page:t,onClose:n})=>{let r=it(e,n);return(0,$.jsx)(M,{title:V(`replayTitle`),onClose:n,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 text-body`,children:[(0,$.jsx)(ot,{failure:r.failure,refused:r.refused}),(0,$.jsx)(`p`,{children:V(`replayLine`,{version:t.latest??0})}),(0,$.jsx)(u,{variant:`primary`,className:`max-md:min-h-11`,loading:r.busy,onClick:()=>void r.start({replay:!0}),children:V(`replayStart`)})]})})},lt=()=>{let e=r().views.workflow_runs?.fields.status;return{hints:e,label:t=>I(String(t),e?.valueLabels)}},ut=e=>e==null?void 0:L(Date.parse(String(e))),dt=({trace:e,valueActions:t,onReplay:n,onClose:r})=>{let i=lt(),{run:a,id:o}=e;if(!a||!o)return null;let c=[{label:V(`status`),value:(0,$.jsx)(ce,{value:a.status,hints:i.hints,children:i.label(a.status)})},{label:V(`started`),value:ut(a.created_at)},{label:V(`startedBy`),value:a.started_by==null?void 0:String(a.started_by)},{label:V(`goesOnAt`),value:ut(a.resume_at)},{label:V(`finished`),value:ut(a.finished_at)},{label:V(`duration`),value:a.duration_ms==null?void 0:V(`durationMs`,{ms:Number(a.duration_ms)})}].flatMap(e=>e.value===void 0?[]:[e]);return(0,$.jsx)(M,{title:V(`runDetails`),onClose:r,...n&&{footer:(0,$.jsx)(u,{className:`w-full max-md:min-h-11`,onClick:n,children:V(`replay`)})},children:(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(j,{title:V(`runDetails`),rows:c}),!e.going&&e.steps.length===0&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:V(`runNoTrace`)}),a.error!=null&&(0,$.jsx)(Xe,{title:V(`error`),children:(0,$.jsxs)(`p`,{className:`text-body text-danger-text`,children:[(0,$.jsx)(`span`,{className:`font-mono`,children:String(a.error)}),a.cause!=null&&(0,$.jsxs)(`span`,{children:[`: `,String(a.cause)]})]})}),a.input!=null&&(0,$.jsxs)(Xe,{title:V(`input`),children:[(0,$.jsx)(C,{value:a.input}),t(a.input,`input`)]}),a.output!=null&&(0,$.jsxs)(Xe,{title:V(`output`),children:[(0,$.jsx)(C,{value:a.output}),t(a.output,`output`)]}),(0,$.jsx)(s,{to:{kind:`record`,resource:`workflow_runs`,key:o,standard:!0},className:`text-body font-medium text-primary-text hover:underline`,children:V(`runPage`)})]})})},ft=({value:e,onUse:t})=>{let[n,r]=(0,Q.useState)(!1),i=async()=>{await navigator.clipboard.writeText(JSON.stringify(e,null,2)),r(!0)};return(0,$.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2`,children:[t&&(0,$.jsx)(u,{size:`sm`,onClick:t,children:V(`useAsTestInput`)}),(0,$.jsx)(u,{size:`sm`,onClick:()=>void i(),children:V(`copyJson`)}),(0,$.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:n&&V(`copied`)})]})},pt=e=>e.Type===`Map`?{...e,ItemProcessor:{...e.ItemProcessor,States:Object.keys(e.ItemProcessor.States)}}:e.Type===`Block`?{...e,Processor:{...e.Processor,States:Object.keys(e.Processor.States)}}:e,mt=e=>Object.entries(e.States).flatMap(([e,t])=>[[e,pt(t)],...Z(t)?mt(Z(t)):[]]),ht=(e,t)=>{let n=new Map(mt(e.stateMachine).map(([e,t])=>[e,JSON.stringify(t)])),r=mt(t.stateMachine),i=r.filter(([e])=>!n.has(e)).length;return{changed:r.filter(([e,t])=>n.has(e)&&n.get(e)!==JSON.stringify(t)).length,added:i,removed:n.size-(r.length-i)}},gt=e=>{let t=d(),n=c();return async r=>{await t.update(g,e,{enabled_version:r},`*`),await n.invalidateQueries({queryKey:f.record(g,e)})}},_t=({view:e,page:t,definition:n,types:r,newVersion:i,onClose:a})=>{let o=w(),s=d(),c=gt(e.workflow),[l,f]=(0,Q.useState)(),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(!1),_=e.version===void 0&&o.dirty,v=e.version??(t.latest??0)+(_&&i?1:0),{enabled:y,latest:b}=t,x=oe(`workflow_versions`,[e.workflow,y??0],y!==void 0),S=!_&&b!==void 0&&v<b,C=t.runs.some(e=>Number(e.version)===v),T=x.data?ht(Ie(x.data.record),n):void 0,E=Re(n.trigger),O=async()=>{if(m(!0),g(!1),f(void 0),_&&!await o.save()){m(!1),g(!0);return}let t=e.version??Number((await s.get(`workflows`,e.workflow)).record.version);await c(t).then(a,f),m(!1)},k=_?V(`saveAndPublish`):y===void 0&&E!==`manual`?V(`publishAndTurnOn`):V(`publishVersion`,{version:v});return(0,$.jsx)(M,{title:V(S?`goBackTo`:`publishVersion`,{version:v}),onClose:a,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 text-body`,children:[l!==void 0&&(0,$.jsx)(D,{title:V(`notPublished`),error:l}),h&&(0,$.jsx)(`p`,{role:`alert`,className:`text-danger-text`,children:V(`notPublishedSave`)}),_&&(0,$.jsx)(`p`,{children:V(`savesThenPublishes`,{version:v})}),S&&(0,$.jsx)(`p`,{children:V(`rollback`,{latest:b,version:v})}),!S&&y!==void 0&&(0,$.jsx)(`p`,{children:V(`publishChange`,{live:y,version:v})}),y===void 0&&(E===`manual`?(0,$.jsx)(`p`,{children:V(`publishManual`,{version:v})}):(0,$.jsx)(`p`,{children:V(`startsTrigger`,{trigger:ze(n.trigger,r)})})),T&&(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:V(`publishDiff`,{...T,version:y??0})}),!C&&(0,$.jsx)(`p`,{className:`text-warning-text`,children:V(`untested`,{version:v})}),(0,$.jsx)(u,{variant:`primary`,className:`max-md:min-h-11`,loading:p,onClick:()=>void O(),children:k})]})})},vt=({view:e,onClose:t})=>{let n=gt(e.workflow),[r,i]=(0,Q.useState)(),[a,o]=(0,Q.useState)(!1),s=async()=>{o(!0),await n(null).then(t,i),o(!1)};return(0,$.jsx)(M,{title:V(`turnOffTitle`),onClose:t,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 text-body`,children:[r!==void 0&&(0,$.jsx)(D,{title:V(`notTurnedOff`),error:r}),(0,$.jsx)(`p`,{children:V(`turnOffLine`)}),(0,$.jsx)(u,{variant:`danger`,className:`max-md:min-h-11`,loading:a,onClick:()=>void s(),children:V(`turnOff`)})]})})},yt=({view:e,page:t,failed:n,changed:r,gone:i,onOpenFailed:a})=>{let{latest:o,trace:c}=t,l=c.run,d=e.version!==void 0&&e.version!==o,f=h({workflow:e.workflow,...e.run&&{run:e.run}}),m=(0,$.jsx)(s,{to:f,className:p({size:`sm`}),children:V(`editLatest`)}),g=(0,$.jsx)(s,{to:_(e,o),className:p({size:`sm`}),children:V(`hideRun`)});if(e.run===void 0)return d?(0,$.jsxs)(E,{level:`info`,actions:m,children:[V(`olderVersion`,{version:e.version??0,latest:o??0}),t.enabled!==void 0&&` ${V(`versionIsLive`,{version:t.enabled})}`]}):null;if(!l)return null;let y=L(Date.parse(String(l.created_at))),b=Number(l.version),x=!d&&b!==o&&(0,$.jsx)(s,{to:v(e.workflow,e.run,b,o),className:p({size:`sm`}),children:V(`showRunVersion`,{version:b})}),S=typeof l.block_state==`string`?l.block_state:void 0,C=typeof l.block_of==`string`&&(0,$.jsx)(s,{to:v(e.workflow,l.block_of,b,o),className:p({size:`sm`}),children:V(`openReachingRun`)});return(0,$.jsxs)(E,{level:`info`,actions:(0,$.jsxs)($.Fragment,{children:[n&&a&&(0,$.jsx)(u,{size:`sm`,onClick:a,children:V(`openFailed`)}),C,d&&m,x,g]}),children:[S===void 0?d?V(`runOlder`,{when:y,version:e.version??0,latest:o??0}):r?V(`runChanged`,{when:y,version:b}):b===o?n?V(`runFailedAt`,{when:y,step:n,version:b}):V(`runSame`,{when:y,version:b}):V(`runUsed`,{when:y,version:b,latest:o??0}):V(`blockRun`,{when:y,block:S,version:b}),i>0&&(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,V(`stepsGone`,{count:i})]})]})},bt=e=>e<1e3?V(`durationMs`,{ms:e}):V(`durationSeconds`,{seconds:Math.round(e/100)/10}),xt=e=>e==null?void 0:JSON.stringify(e),St=({view:e,page:t,onTestRun:n,onClose:r})=>{let[i,a]=(0,Q.useState)(`all`),o=lt(),c=t.runs.filter(e=>i===`all`||e.status===`failed`);return(0,$.jsx)(M,{title:V(`runs`),onClose:r,takesFocus:!0,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsx)(A,{value:i,label:V(`runs`),options:[{value:`all`,label:V(`filterAll`)},{value:`failed`,label:V(`filterFailed`)}],onChange:a}),t.runs.length===0&&(0,$.jsxs)(`div`,{className:`grid gap-2 justify-items-start`,children:[(0,$.jsx)(`p`,{className:`text-body text-muted-foreground`,children:V(`noRuns`)}),n&&(0,$.jsx)(u,{onClick:n,children:V(`testRun`)})]}),(0,$.jsx)(`ul`,{className:`grid gap-1`,children:c.map(n=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(s,{to:v(e.workflow,String(n.id),Number(n.version),t.latest),"aria-current":e.run===n.id?`true`:void 0,onClick:r,className:`grid gap-0.5 rounded-md px-2 py-2 hover:bg-muted aria-[current]:bg-muted max-md:min-h-11`,children:[(0,$.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-muted-foreground`,children:[(0,$.jsx)(ce,{value:n.status,hints:o.hints,children:o.label(n.status)}),(0,$.jsx)(`span`,{className:`font-medium text-foreground`,children:L(Date.parse(String(n.created_at)))}),(0,$.jsx)(`span`,{children:V(`versionShort`,{version:Number(n.version)})}),n.duration_ms!=null&&(0,$.jsx)(`span`,{className:`tabular-nums`,children:bt(Number(n.duration_ms))}),(0,$.jsx)(`span`,{children:n.started_by==null?V(`startedByTrigger`):V(`startedByTest`)})]}),xt(n.input)&&(0,$.jsx)(`span`,{className:`truncate font-mono text-xs text-muted-foreground`,children:xt(n.input)})]})},String(n.id)))})]})})},Ct=({title:e,settings:t,run:n,state:r,block:i,tab:a,onTab:o,valueActions:s,footer:c,onClose:l})=>(0,$.jsx)(M,{title:e,onClose:l,footer:c,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[n&&(0,$.jsx)(A,{value:a,label:e,options:[{value:`data`,label:V(`tabData`)},{value:`settings`,label:V(`tabSettings`)}],onChange:o}),n&&a===`data`?r===void 0?(0,$.jsxs)(Xe,{title:V(`input`),children:[(0,$.jsx)(C,{value:n.input??null}),s?.(n.input,`input`)]}):(0,$.jsx)(Ze,{run:n,name:r,...i!==void 0&&{block:i},...s&&{valueActions:s}}):t]})}),wt=(e,t)=>e.slice(0,t).split(`
3
- `).length,Tt=e=>{try{JSON.parse(e);return}catch(t){if(!(t instanceof SyntaxError))throw t;let n=/position (\d+)/.exec(t.message)?.[1],r=/line (\d+)/.exec(t.message)?.[1]??(n===void 0?void 0:wt(e,Number(n)));return r===void 0?V(`notJson`):V(`notJsonLine`,{line:Number(r)})}},Et=e=>JSON.stringify(e??{},null,2),Dt=({view:e,page:t,definition:n,types:r,seed:i,onClose:a})=>{let s=w(),c=d(),{go:l}=o(),u=lt(),f=t.runs.filter(e=>e.input!=null).slice(0,5),[p,m]=(0,Q.useState)(()=>Et(i?i.value:f[0]?.input)),[h,g]=(0,Q.useState)(!1),_=k({resource:`workflow_runs`,feedback:`button`,onCreated:n=>{n&&(a(),l(v(e.workflow,String(n.id),Number(n.version),e.version===void 0?Number(n.version):t.latest)))}}),y=Tt(p),x=e.version===void 0&&s.dirty,S=e.version??t.latest??0,C=async()=>{if(g(!1),x&&!await s.save())return g(!0);let t=e.version??Number((await c.get(`workflows`,e.workflow)).record.version);await _.submit({workflow_id:e.workflow,input:JSON.parse(p),version:t})},T=B(n,r);return(0,$.jsx)(M,{title:V(`testRun`),onClose:a,takesFocus:!0,children:(0,$.jsxs)(qe,{form:_,fields:[],submit:V(x?`saveAndStart`:`startRun`),disabled:y!==void 0,onSubmit:()=>void C(),children:[(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i?i.from:f[0]?V(`inputOfRun`,{when:L(Date.parse(String(f[0].created_at)))}):V(`noRunInput`)}),(0,$.jsx)(N,{label:V(`inputJson`),error:y,children:(0,$.jsx)(b,{rows:8,className:`font-mono text-xs`,value:p,invalid:y!==void 0,onChange:e=>m(e.target.value)})}),f.length>0&&(0,$.jsxs)(`div`,{className:`grid gap-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:V(`startFromEarlier`)}),f.map(e=>(0,$.jsx)(`button`,{type:`button`,className:`truncate rounded-md px-2 py-1 text-left text-xs hover:bg-muted max-md:min-h-11`,onClick:()=>m(Et(e.input)),children:V(`earlierRun`,{when:L(Date.parse(String(e.created_at))),status:u.label(e.status)})},String(e.id)))]}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:x?V(`savesThenRuns`,{version:S+1}):e.version===void 0?V(`runsLatest`,{version:S}):V(`runsVersion`,{version:S})}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:T.length>0?V(`stepsAct`,{steps:T.map(e=>V(`stepActs`,{name:e.name,kind:e.kind})).join(`, `)}):V(`nothingActs`)}),h&&(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-danger-text`,children:V(`notStarted`)})]})})},Ot=(e,{latest:t,enabled:n})=>V(e===t?e===n?`versionLatestLive`:`versionLatestDraft`:e===n?`versionLive`:`versionNumber`,{version:e}),kt=({page:e,draftOnly:t})=>{let n=w(),r=ie()?.size,[i,a]=(0,Q.useState)(),o=(0,Q.useRef)(e.latest);(0,Q.useEffect)(()=>{if(e.latest===o.current)return;let t=o.current===void 0;if(o.current=e.latest,t)return;a(e.latest);let n=setTimeout(()=>a(void 0),At);return()=>clearTimeout(n)},[e.latest]);let s=n.saving?V(`saving`):n.refused?V(`saveRefused`):n.dirty&&t?V(`draftHere`):n.dirty?V(r===`wide`?`unsaved`:`unsavedShort`):i===void 0?void 0:V(`savedAs`,{version:i});return s?(0,$.jsx)(P,{zone:`state`,children:(0,$.jsx)(`span`,{role:`status`,className:`truncate`,children:s})}):null},At=4e3,jt=({view:e,page:t,editable:n,newVersion:r,empty:s,problems:c,missing:l,onAddStep:d,onProblems:f,onRuns:p,onTestRun:m,onPublish:h,onTurnOff:g,runActions:_,orderSwitch:v})=>{let b=w(),{go:x}=o(),S=ie()?.size,C=i(),E=re(a(`workflow_runs`),`create`),{latest:D,enabled:k}=t,A=e.version??D,ne=k!==void 0&&k===A,j=(0,Q.useMemo)(()=>A===void 0||t.versions.some(e=>e.version===A)?t.versions:[...t.versions,{version:A,savedAt:``}],[t.versions,A]),M=s?V(`noStepsToRun`):ne&&!r?V(`alreadyLive`,{version:A??0}):void 0,N=S===`compact`,oe=E?{name:V(`testRun`),icon:F,onRun:m,inBar:!0,...s&&{blocked:V(`noStepsToRun`)}}:void 0,se={name:V(`publish`),icon:O,onRun:h,...M&&{blocked:M}},I=[...oe&&!N?[oe]:[],...N&&b.mayUpdate?[se]:[],..._??[],...k!==void 0&&b.mayUpdate?[{name:V(`turnOff`),icon:T,onRun:g}]:[],...n&&v?[{name:Y(`orderSwitchTitle`,{order:v.to}),icon:$e,onRun:v.onRun,...v.refused!==void 0&&{blocked:Y(`orderSwitchRefused`,{reason:v.refused})}}]:[]];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(P,{zone:`mode`,children:[(0,$.jsx)(X,{tone:k===void 0?`neutral`:`green`,children:k===void 0?V(`off`):V(`live`,{version:k})}),S!==`compact`&&(0,$.jsx)(G,{"aria-label":V(`version`),className:`w-auto`,value:A??``,onChange:t=>x(y(e.workflow,Number(t.target.value),D)),children:j.map(({version:e})=>(0,$.jsx)(`option`,{value:e,children:Ot(e,{latest:D,enabled:k})},e))})]}),(0,$.jsxs)(P,{zone:`controls`,children:[n&&C&&(0,$.jsxs)(u,{onClick:d,"aria-label":V(`addStep`),children:[(0,$.jsx)(ae,{className:`size-3.5`,"aria-hidden":!0}),S!==`narrow`&&V(`addStep`)]}),(0,$.jsxs)(u,{onClick:p,className:`max-md:min-h-11`,children:[(0,$.jsx)(ee,{className:`size-3.5`,"aria-hidden":!0}),V(`runs`)]}),c>0&&(0,$.jsxs)(u,{onClick:f,className:`text-danger-text`,children:[(0,$.jsx)(q,{className:`size-3.5`,"aria-hidden":!0}),V(`problems`,{count:c})]}),l>0&&c===0&&(0,$.jsx)(u,{onClick:f,children:V(`fieldsToFill`,{count:l})})]}),(0,$.jsx)(kt,{page:t,draftOnly:l>0}),(0,$.jsx)(te,{actions:I}),b.mayUpdate&&!N&&(0,$.jsx)(P,{zone:`primary`,children:(0,$.jsx)(u,{variant:b.dirty?`secondary`:`primary`,"aria-disabled":M!==void 0,title:M,onClick:()=>M===void 0&&h(),children:V(`publish`)})}),N&&oe&&!b.dirty&&!s&&(0,$.jsx)(P,{zone:`primary`,children:(0,$.jsx)(u,{variant:`primary`,className:`min-h-11`,onClick:m,children:V(`testRun`)})})]})},Mt=e=>[`Task`,`Pass`,`Wait`,`Map`,`Block`].includes(e.Type),Nt=e=>{let t=new Set;for(let[,n]of Ge(e))for(let e of Ue(n)){if(t.has(e))return e;t.add(e)}},Pt=e=>(e.Type===`Pass`||e.Type===`Succeed`)&&e.Output===void 0,Ft=(e,t,n)=>{let r=new Set(Object.values(e.States).flatMap(e=>e.Next===void 0?[]:[e.Next]));for(let[i,a]of Object.entries(e.States)){if(Pt(a)&&(t?r.has(i):i!==n))return i;let e=Z(a),o=e&&Ft(e,t,t?void 0:Bt(e).StartAt);if(o)return o}},It=e=>{for(let t of Object.keys(e.States)){let n=new Set;for(let r=t;r!==void 0&&e.States[r];r=e.States[r].Next){if(n.has(r))return r;n.add(r)}}for(let t of Object.values(e.States)){let e=Z(t),n=e&&It(e);if(n)return n}},Lt=e=>{let t=new Set;for(let n=e.StartAt;n!==void 0&&e.States[n]&&!t.has(n);n=e.States[n].Next)t.add(n);let n=Object.keys(e.States).find(e=>!t.has(e));if(n!==void 0)return n;for(let t of Object.values(e.States)){let e=Z(t),n=e&&Lt(e);if(n)return n}},Rt=e=>`{% ${e.map(e=>`$states.context.Steps.${le(e)}.Status = 'SUCCEEDED'`).join(` and `)} %}`,zt=e=>{let t=He(e),n=new Map;for(let[r,i]of Object.entries(e.States)){let e=i.Next;e!==void 0&&!t.get(e)?.data.has(r)&&n.set(e,[...n.get(e)??[],r])}let{StartAt:r,...i}=e,a=Object.fromEntries(Object.entries(e.States).map(([e,t])=>{let{Next:r,End:i,...a}=t,o=t.Type===`Succeed`?{...a,Type:`Pass`}:a,s=Z(o),c=s?{...o,...o.Type===`Map`?{ItemProcessor:zt(s)}:{Processor:zt(s)}}:o,l=n.get(e);return[e,l?{...c,Condition:Rt(l)}:c]}));return{...i,States:a}},Bt=e=>{let t=He(e),n=[],r=new Set(Object.keys(e.States));for(;r.size>0;){let e=[...r].filter(e=>[...Ve(t.get(e))].every(e=>n.includes(e))).sort()[0]??[...r].sort()[0];n.push(e),r.delete(e)}let i=Object.fromEntries(n.map((t,r)=>{let i=e.States[t],a=Z(i),o=a?{...i,...i.Type===`Map`?{ItemProcessor:Bt(a)}:{Processor:Bt(a)}}:i;if(!Mt(i))return[t,o];let s=n[r+1];return[t,s===void 0?{...o,End:!0}:{...o,Next:s}]}));return{...e,StartAt:n[0]??``,States:i}},Vt=e=>{let t=Ge(e.stateMachine),n=t.find(([,e])=>e.Type===`Choice`);if(n)return{refused:Y(`switchChoice`,{state:n[0]})};let r=t.find(([,e])=>`Catch`in e&&(e.Catch??[]).some(e=>e.Next!==void 0));if(r)return{refused:Y(`switchCatchNext`,{state:r[0]})};let i=Nt(e.stateMachine);if(i!==void 0)return{refused:Y(`switchAssignedTwice`,{variable:i})};let a=Lt(e.stateMachine);if(a!==void 0)return{refused:Y(`switchUnreached`,{state:a})};let o=It(e.stateMachine);if(o!==void 0)return{refused:Y(`switchLoop`,{state:o})};let s=Ft(e.stateMachine,!0);return s===void 0?{definition:{...e,order:`data`,stateMachine:{...zt(e.stateMachine),QueryLanguage:`JSONata`}}}:{refused:Y(`switchPassThroughData`,{state:s})}},Ht=e=>{let t=Ge(e.stateMachine),n=t.find(([,e])=>e.Condition!==void 0);if(n)return{refused:Y(`switchCondition`,{state:n[0]})};let r=t.find(([,e])=>`Catch`in e&&(e.Catch??[]).some(e=>e.Next===void 0));if(r)return{refused:Y(`switchCatchNoNext`,{state:r[0]})};let i=Bt(e.stateMachine),a=Ft(e.stateMachine,!1,i.StartAt);return a===void 0?{definition:{...e,order:`sequence`,stateMachine:{...i,QueryLanguage:`JSONata`}}}:{refused:Y(`switchPassThroughSequence`,{state:a})}},Ut=e=>We(e)===`data`?Ht(e):Vt(e),Wt=new Map,Gt=(e,t)=>{let n=Ut(e),r=We(e)===`data`?`sequence`:`data`;return`refused`in n?{to:r,refused:n.refused,onRun:()=>{}}:{to:r,onRun:()=>t(n.definition)}},Kt=(e,t)=>{if(t===void 0||t===``)return[];let n=t.split(`/`);return Pe(K(e,t))?n:n.slice(0,-1)},qt=({view:e,value:t,types:n,onChange:r,layout:s,onLayoutChange:c})=>{let l=w(),d=ne(e),f=i(),p=(0,Q.useRef)(void 0),m=JSON.stringify(t??null),h=(0,Q.useMemo)(()=>Fe(JSON.parse(m)),[m]),g=(0,Q.useMemo)(()=>d.pastDefinition===void 0?void 0:Fe(d.pastDefinition),[d.pastDefinition]),_=e.version!==void 0&&e.version!==d.latest,v=_?g:h,y=(0,Q.useMemo)(()=>JSON.stringify(Le(Ie(l.record))),[l.record]),b=l.dirty&&JSON.stringify(Le(h))!==y,x=_?d.pastLayout:s,C=_||!r||l.readOnly?void 0:c,T=_||!r?void 0:e=>{let t=p.current;p.current=void 0,t||we(void 0),r(t?t(e):e)},E=Se(n),O=(0,Q.useMemo)(()=>je(v?he(v,n,E):[]),[v,n,E]),k=(0,Q.useMemo)(()=>v?_e(v):Wt,[v]),{address:ee}=o(),te=ee?.kind===`record`?ee.panel:void 0,A=Ne(h.stateMachine).length===0,[j,N]=(0,Q.useState)(te===`test_run`?{kind:`test`}:te===`replay`?{kind:`replay`}:A&&f&&r?{kind:`add`}:void 0),[P,ie]=(0,Q.useState)(!1),[ae,F]=(0,Q.useState)(),[oe,I]=(0,Q.useState)(`data`),[ce,le]=(0,Q.useState)(!1),[ve,R]=(0,Q.useState)(),[ye,we]=(0,Q.useState)(),Ee=re(a(`workflow_runs`),`create`);(0,Q.useEffect)(()=>{F(void 0),I(`data`),le(!1)},[e.run]),(0,Q.useEffect)(()=>{l.refused&&ie(!0)},[l.refused]);let{trace:z}=d,B=e.run===void 0||!z.run||!z.id?void 0:{...z.run,id:z.id,created_at:String(z.run.created_at)},H=(0,Q.useMemo)(()=>{if(!z.definition||!z.place)return;let e=Je(z.steps,{inProgress:z.going,...z.place});return v?new Map([...e].map(([e,t])=>[e,{...t,changed:JSON.stringify(K(z.definition,e))!==JSON.stringify(K(v,e))}])):e},[z.definition,z.place,z.steps,z.going,v]),U=H&&[...H].filter(([,e])=>e.status===`failed`).map(([e])=>e).sort((e,t)=>t.split(`/`).length-e.split(`/`).length)[0],W=v&&(ae===``||typeof ae==`string`&&K(v,ae))?ae:ae===void 0&&U!==void 0&&v&&K(v,U)?U:void 0;if((0,Q.useEffect)(()=>R(void 0),[W]),d.pastError)return(0,$.jsx)(D,{title:V(`versionFailed`),error:d.pastError});if(d.versionsError)return(0,$.jsx)(D,{title:V(`versionsFailed`),error:d.versionsError});if(d.runsError)return(0,$.jsx)(D,{title:V(`runsFailed`),error:d.runsError});if(!v)return(0,$.jsx)(se,{className:`h-full w-full`});let G=()=>N(void 0),q=Kt(v,W),Pe=e=>{let t=de(v,e);if(e.kind===`start`)return t===void 0?V(`addsFirst`):V(`addsBetween`,{step:Y(`trigger`),next:t});let n=J(e.source).name;return t===void 0?e.kind===`rule`?V(`addsRule`,{step:n}):e.kind==="default"?V(`addsOtherwise`,{step:n}):e.kind===`catch`?V(`addsOnError`,{step:n}):V(`addsAfter`,{step:n}):V(`addsBetween`,{step:n,next:t})},Re=()=>{if(W===``||Ne(v.stateMachine).length===0)return V(`addsFirst`);if(q.length>0&&W===q.join(`/`))return V(`addsInside`,{map:J(W).name});let e=pe(v,q,W);return e===void 0?V(`addsUnconnected`):V(`addsAfter`,{step:e})},ze=(e,t)=>{if(!T)return;let n=fe(v,Y(`newStep`)),r=Y(`newStep`),i=t?ke(v,e,n,r,t):W===``?me(v,e,n,r):ue(v,q,e,n,r,pe(v,q,W));T(i),F(Me(t?Ce(t):q,n)),I(`settings`),G()},X=Ne(v.stateMachine).length===0,Ve=[...O.whole,...[...O.byNode.values()].flat()],He=X?0:Ve.filter(Oe).length,Ue=X?0:Ve.length-He,Z=P?O.byNode:Ae(O.byNode),We=()=>{if(He===0)return!1;ie(!0);let e=[...O.byNode].find(([,e])=>e.some(Oe))?.[0];return e!==void 0&&F(e),I(`settings`),N(void 0),!0},Ge=z.definition?Ne(z.definition.stateMachine).filter(e=>!Ne(v.stateMachine).includes(e)).length:0,Ke=B&&L(Date.parse(B.created_at)),qe=(e,t)=>t===`output`||e===void 0||e===z.definition?.stateMachine.StartAt,Ye=e=>(t,n)=>(0,$.jsx)(ft,{value:t,...Ee&&qe(e,n)&&{onUse:()=>N({kind:`test`,seed:{value:t,from:V(n===`output`?`seedOutput`:`seedInput`,{step:e??Y(`trigger`),when:Ke??``})}})}}),Xe=B!==void 0&&!z.going,Ze=(e,t)=>{if(!Xe)return V(`runNotEnded`);if(e===void 0)return;if(z.place&&z.place.within.length>0)return V(`rerunInBlock`);let n=J(t).scope[0];return n===void 0?K(h,t)?void 0:V(`stepNotInVersion`,{version:d.latest??0}):K(h,n)?.Type===`Block`?V(`rerunInBlockStep`,{block:n}):V(`rerunInMap`,{map:n})},Qe=e=>{let t=J(e).scope,n=z.place?.within.length??0,r=z.definition??v,i=t.findIndex((e,i)=>i>=n&&K(r,t.slice(0,i+1).join(`/`))?.Type===`Block`);return i===-1?void 0:t[i]},$e=(e,t)=>{if(!B||!Ee||e===void 0)return;let n=Ze(e,t);return(0,$.jsx)(u,{variant:`primary`,className:`w-full max-md:min-h-11`,"aria-disabled":n!==void 0,title:n,onClick:()=>n===void 0&&N({kind:`rerun`,step:e}),children:l.dirty?V(`saveAndRerun`):V(`rerunFromStep`)})},tt=()=>{if(W===void 0)return null;let e=W===``?void 0:J(W).name,t=(0,$.jsx)(Te,{definition:v,types:n,selected:W,problems:Z.get(W)??[],warnings:k.get(W)??[],...T&&!l.readOnly&&{onChange:T},onSelect:e=>F(e??null)}),r=B??d.runs.find(e=>e.status===`succeeded`||e.status===`failed`),i=ve?(0,$.jsx)(rt,{definition:v,path:W,target:ve,run:r,onAssign:(e,t,n)=>{we({message:`${V(`addedVariable`,{variable:t,step:J(e).name})} ${V(`inThisRun`,{value:n})}`,undo:v}),p.current=t=>De(t,e).definition},onBack:()=>R(void 0),onTestRun:()=>{R(void 0),N({kind:`test`})}}):(0,$.jsxs)($.Fragment,{children:[ye&&(0,$.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2 text-xs`,children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1`,children:ye.message}),(0,$.jsx)(u,{size:`sm`,onClick:()=>{T?.(ye.undo),we(void 0)},children:V(`undo`)})]}),t]});return(0,$.jsx)(Ct,{title:e??Y(`trigger`),tab:B?oe:`settings`,onTab:I,run:B,state:e,block:Qe(W),valueActions:Ye(e),footer:$e(e,W),onClose:()=>F(null),settings:i})};return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(jt,{view:e,page:d,editable:!!T&&!l.readOnly,newVersion:b,empty:X,problems:Ue,missing:He,onAddStep:()=>N({kind:`add`}),onProblems:()=>{We()||N({kind:`problems`})},onRuns:()=>N({kind:`runs`}),onTestRun:()=>{We()||N({kind:`test`})},onPublish:()=>{We()||N({kind:`publish`})},onTurnOff:()=>N({kind:`off`}),...T&&!l.readOnly&&{orderSwitch:Gt(v,T)},runActions:B&&[...W!==void 0||ce?[{name:V(`runDetails`),icon:S,onRun:()=>{F(null),le(!1)}}]:[]]}),(0,$.jsx)(yt,{view:e,page:d,failed:U&&J(U).name,changed:l.dirty,gone:Ge,...U!==void 0&&U!==W&&{onOpenFailed:()=>F(U)}}),(0,$.jsx)(`div`,{className:`h-full`,children:(0,$.jsx)(Be,{fills:!0,definition:v,problems:B||X?Wt:Z,warnings:B||X?Wt:k,selected:W,onSelect:e=>F(e??null),...T&&!l.readOnly&&{onChange:T,edits:ge,onAddAt:e=>N({kind:`add`,at:e})},...H&&B&&{traces:H},types:n,schemas:E,layout:x,onLayoutChange:C})}),X&&j===void 0&&(0,$.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-[60%] flex justify-center`,children:(0,$.jsx)(`div`,{className:`pointer-events-auto grid justify-items-center gap-2 rounded-lg border bg-background p-6 text-center shadow-sm`,children:f?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h2`,{className:`font-semibold`,children:V(`noSteps`)}),(0,$.jsx)(`p`,{className:`text-body text-muted-foreground`,children:V(`noStepsLine`)}),T&&!l.readOnly&&(0,$.jsx)(u,{variant:`primary`,onClick:()=>N({kind:`add`}),children:V(`addStep`)})]}):(0,$.jsx)(`p`,{className:`text-body text-muted-foreground`,children:V(`noStepsMobile`)})})}),j?.kind===`add`&&(0,$.jsx)(et,{types:n,placement:j.at?Pe(j.at):Re(),onAdd:e=>ze(e,j.at),onClose:G}),j?.kind===`test`&&(0,$.jsx)(Dt,{view:e,page:d,definition:v,types:n,seed:j.seed,onClose:G}),j?.kind===`runs`&&(0,$.jsx)(St,{view:e,page:d,onTestRun:()=>N({kind:`test`}),onClose:G}),j?.kind===`publish`&&(0,$.jsx)(_t,{view:e,page:d,definition:v,types:n,newVersion:b,onClose:G}),j?.kind===`off`&&(0,$.jsx)(vt,{view:e,onClose:G}),j?.kind===`problems`&&(0,$.jsx)(M,{title:V(`problemsTitle`),onClose:G,takesFocus:!0,children:(0,$.jsx)(be,{problems:[...O.whole,...[...O.byNode.values()].flat()]})}),j?.kind===`rerun`&&(0,$.jsx)(st,{view:e,page:d,definition:h,types:n,step:j.step,onStep:e=>N({kind:`rerun`,step:e}),onClose:G}),j?.kind===`replay`&&(0,$.jsx)(ct,{view:e,page:d,onClose:G}),j===void 0&&(0,$.jsx)(xe.Provider,{value:T&&!l.readOnly?R:void 0,children:W===void 0&&B&&!ce?(0,$.jsx)(dt,{trace:z,valueActions:Ye(void 0),onReplay:Xe&&Ee?()=>N({kind:`replay`}):void 0,onClose:()=>le(!0)}):tt()})]})};export{qt as WorkflowWorkbench};
4
- //# debugId=80939338-893f-4bb7-949c-001ea9ed854b