@epam/ai-dial-scheduled-tasks 1.1.0-dev.129 → 1.1.0-dev.130

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/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { MDMessageViewer as e, PanelEmptyState as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
2
2
  import { SearchBar as i } from "@epam/ai-dial-kit";
3
3
  import { ButtonAppearance as a, ButtonDropdown as o, ButtonVariant as s, Calendar as c, CalendarMode as l, CardShell as u, DIAL_ICON_SIZE as d, Dropdown as f, FolderPath as p, GhostButton as m, GhostIconButton as h, Highlight as g, IconButton as _, Input as v, LazyMarkdownEditor as y, NeutralButton as b, NumberInput as x, PrimaryButton as S, Select as C, Skeleton as w, SkeletonVariant as T, Spinner as E, Textarea as D } from "@epam/ai-dial-ui-kit";
4
- import { IconAlertTriangle as O, IconArrowLeft as k, IconCalendarTime as A, IconCircleCheck as j, IconCircleX as M, IconDotsVertical as N, IconEdit as P, IconPencilMinus as F, IconPlayerPlay as I, IconPlus as L, IconTrash as ee } from "@tabler/icons-react";
5
- import { Suspense as R, lazy as z, useEffect as te, useMemo as B, useRef as ne } from "react";
6
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
4
+ import { IconAlertTriangle as O, IconArrowLeft as ee, IconCalendarTime as k, IconCircleCheck as A, IconCircleX as j, IconDotsVertical as M, IconEdit as N, IconPencilMinus as P, IconPlayerPlay as F, IconPlus as I, IconTrash as te } from "@tabler/icons-react";
5
+ import { Suspense as L, lazy as R, useEffect as ne, useMemo as z, useRef as re } from "react";
6
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
7
+ import { BuilderFormContainer as U } from "@epam/ai-dial-builder-form";
7
8
  //#region src/models/scheduled-task-item.ts
8
9
  var W = /* @__PURE__ */ function(e) {
9
10
  return e.Shared = "shared", e.MyTasks = "myTasks", e;
@@ -17,7 +18,7 @@ var W = /* @__PURE__ */ function(e) {
17
18
  newBadge: "_newBadge_1xv9i_26",
18
19
  locationDivider: "_locationDivider_1xv9i_31"
19
20
  }, K = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className: m }) => {
20
- let h = c?.newBadgeLabel ?? "NEW", v = c?.actionsLabel ?? "More actions", y = c?.editActionLabel ?? "Edit", b = c?.runNowActionLabel ?? "Run now", x = c?.deleteActionLabel ?? "Delete", { colors: S, typography: C } = l ?? {}, w = C?.titleClassName ?? "dial-body-semi-text", T = C?.descriptionClassName ?? "dial-small-text", E = C?.scheduleLabelClassName ?? "dial-tiny-text", D = C?.locationLabelClassName ?? "dial-tiny-text", O = C?.locationLeafClassName ?? "dial-tiny-semi-text", k = C?.newBadgeClassName ?? "dial-tiny-semi-text", A = n({
21
+ let h = c?.newBadgeLabel ?? "NEW", v = c?.actionsLabel ?? "More actions", y = c?.editActionLabel ?? "Edit", b = c?.runNowActionLabel ?? "Run now", x = c?.deleteActionLabel ?? "Delete", { colors: S, typography: C } = l ?? {}, w = C?.titleClassName ?? "dial-body-semi-text", T = C?.descriptionClassName ?? "dial-small-text", E = C?.scheduleLabelClassName ?? "dial-tiny-text", D = C?.locationLabelClassName ?? "dial-tiny-text", O = C?.locationLeafClassName ?? "dial-tiny-semi-text", ee = C?.newBadgeClassName ?? "dial-tiny-semi-text", k = n({
21
22
  "--stc-title-text": S?.titleText,
22
23
  "--stc-desc-text": S?.descriptionText,
23
24
  "--stc-pill-bg": S?.schedulePillBackground,
@@ -28,31 +29,31 @@ var W = /* @__PURE__ */ function(e) {
28
29
  "--stc-new-badge-bg": S?.newBadgeBackground,
29
30
  "--stc-new-badge-text": S?.newBadgeText,
30
31
  "--stc-location-divider-border": S?.locationDividerBorder
31
- }), j = [];
32
- i && j.push({
32
+ }), A = [];
33
+ i && A.push({
33
34
  key: "edit",
34
35
  label: y,
35
- icon: /* @__PURE__ */ H(P, {
36
+ icon: /* @__PURE__ */ V(N, {
36
37
  size: d.SM,
37
38
  "aria-hidden": !0
38
39
  }),
39
40
  onClick: ({ domEvent: t }) => {
40
41
  t.stopPropagation(), i(e.id);
41
42
  }
42
- }), a && j.push({
43
+ }), a && A.push({
43
44
  key: "runNow",
44
45
  label: b,
45
- icon: /* @__PURE__ */ H(I, {
46
+ icon: /* @__PURE__ */ V(F, {
46
47
  size: d.SM,
47
48
  "aria-hidden": !0
48
49
  }),
49
50
  onClick: ({ domEvent: t }) => {
50
51
  t.stopPropagation(), a(e.id);
51
52
  }
52
- }), o && j.push({
53
+ }), o && A.push({
53
54
  key: "delete",
54
55
  label: x,
55
- icon: /* @__PURE__ */ H(ee, {
56
+ icon: /* @__PURE__ */ V(te, {
56
57
  size: d.SM,
57
58
  "aria-hidden": !0
58
59
  }),
@@ -61,39 +62,39 @@ var W = /* @__PURE__ */ function(e) {
61
62
  t.stopPropagation(), o(e.id);
62
63
  }
63
64
  });
64
- let M = s ? {
65
+ let j = s ? {
65
66
  tabIndex: 0,
66
67
  onClick: () => s(e.id),
67
68
  onKeyDown: (t) => {
68
69
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), s(e.id));
69
70
  }
70
71
  } : {};
71
- return /* @__PURE__ */ U(u, {
72
+ return /* @__PURE__ */ H(u, {
72
73
  role: s ? "button" : "group",
73
74
  "aria-label": e.displayName,
74
- style: A,
75
+ style: k,
75
76
  className: r("h-[232px]", s && "cursor-pointer", m),
76
- ...M,
77
+ ...j,
77
78
  children: [
78
- /* @__PURE__ */ U("div", {
79
+ /* @__PURE__ */ H("div", {
79
80
  className: "flex shrink-0 items-start justify-between gap-2",
80
- children: [/* @__PURE__ */ U("div", {
81
+ children: [/* @__PURE__ */ H("div", {
81
82
  className: "flex min-w-0 flex-1 items-center gap-2",
82
- children: [/* @__PURE__ */ H(g, {
83
+ children: [/* @__PURE__ */ V(g, {
83
84
  text: e.displayName,
84
85
  query: t,
85
86
  maxLines: 1,
86
87
  className: r(w, G.title)
87
- }), e.isNew && /* @__PURE__ */ H("span", {
88
- className: r("shrink-0 rounded-full px-2 py-0.5", k, G.newBadge),
88
+ }), e.isNew && /* @__PURE__ */ V("span", {
89
+ className: r("shrink-0 rounded-full px-2 py-0.5", ee, G.newBadge),
89
90
  children: h
90
91
  })]
91
- }), j.length > 0 && /* @__PURE__ */ H(f, {
92
- items: j,
92
+ }), A.length > 0 && /* @__PURE__ */ V(f, {
93
+ items: A,
93
94
  matchReferenceWidth: !1,
94
95
  placement: "bottom-end",
95
- children: /* @__PURE__ */ H(_, {
96
- icon: /* @__PURE__ */ H(N, {
96
+ children: /* @__PURE__ */ V(_, {
97
+ icon: /* @__PURE__ */ V(M, {
97
98
  size: d.SM,
98
99
  "aria-hidden": !0
99
100
  }),
@@ -103,19 +104,19 @@ var W = /* @__PURE__ */ function(e) {
103
104
  })
104
105
  })]
105
106
  }),
106
- e.descriptionPreview && /* @__PURE__ */ H("p", {
107
+ e.descriptionPreview && /* @__PURE__ */ V("p", {
107
108
  className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", T, G.description),
108
109
  children: e.descriptionPreview
109
110
  }),
110
- /* @__PURE__ */ U("div", {
111
+ /* @__PURE__ */ H("div", {
111
112
  className: "mt-auto flex shrink-0 flex-col gap-3",
112
- children: [/* @__PURE__ */ H("div", {
113
+ children: [/* @__PURE__ */ V("div", {
113
114
  className: "flex min-h-[28px] items-center",
114
- children: /* @__PURE__ */ H("span", {
115
+ children: /* @__PURE__ */ V("span", {
115
116
  className: r("inline-block rounded-lg border px-2 py-1", G.schedulePill, E, G.scheduleLabel),
116
117
  children: e.scheduleLabel
117
118
  })
118
- }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ H(p, {
119
+ }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ V(p, {
119
120
  segments: e.locationSegments,
120
121
  labelClassName: r(D, G.locationLabel),
121
122
  leafClassName: r(O, G.locationLeaf),
@@ -124,42 +125,42 @@ var W = /* @__PURE__ */ function(e) {
124
125
  })
125
126
  ]
126
127
  });
127
- }, re = { card: "_card_1a43j_1" }, q = [
128
+ }, q = { card: "_card_1a43j_1" }, ie = [
128
129
  "100%",
129
130
  "100%",
130
131
  "61%"
131
- ], ie = "var(--stcs-skeleton-bg)", ae = ({ styles: e }) => /* @__PURE__ */ U(u, {
132
+ ], ae = "var(--stcs-skeleton-bg)", oe = ({ styles: e }) => /* @__PURE__ */ H(u, {
132
133
  "aria-hidden": !0,
133
134
  style: n({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
134
- className: r("h-[232px]", re.card),
135
+ className: r("h-[232px]", q.card),
135
136
  children: [
136
- /* @__PURE__ */ H(w, {
137
+ /* @__PURE__ */ V(w, {
137
138
  variant: T.Rectangular,
138
139
  width: "60%",
139
140
  height: "20px",
140
- color: ie,
141
+ color: ae,
141
142
  className: "shrink-0"
142
143
  }),
143
- /* @__PURE__ */ H("div", {
144
+ /* @__PURE__ */ V("div", {
144
145
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
145
- children: q.map((e, t) => /* @__PURE__ */ H(w, {
146
+ children: ie.map((e, t) => /* @__PURE__ */ V(w, {
146
147
  variant: T.Rectangular,
147
148
  width: e,
148
149
  height: "16px",
149
- color: ie
150
+ color: ae
150
151
  }, t))
151
152
  }),
152
- /* @__PURE__ */ H(w, {
153
+ /* @__PURE__ */ V(w, {
153
154
  variant: T.Rectangular,
154
155
  width: "110px",
155
156
  height: "28px",
156
- color: ie,
157
+ color: ae,
157
158
  className: "shrink-0 rounded-lg"
158
159
  })
159
160
  ]
160
- }), oe = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, onCardClick: a, labels: o, cardStyles: s, trailingSkeletonCount: c = 0, skeletonStyles: l }) => /* @__PURE__ */ U("div", {
161
+ }), se = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, onCardClick: a, labels: o, cardStyles: s, trailingSkeletonCount: c = 0, skeletonStyles: l }) => /* @__PURE__ */ H("div", {
161
162
  className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
162
- children: [e.map((e) => /* @__PURE__ */ H(K, {
163
+ children: [e.map((e) => /* @__PURE__ */ V(K, {
163
164
  item: e,
164
165
  searchQuery: t,
165
166
  onEdit: n,
@@ -168,23 +169,23 @@ var W = /* @__PURE__ */ function(e) {
168
169
  onCardClick: a,
169
170
  labels: o,
170
171
  styles: s
171
- }, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */ H(ae, { styles: l }, `skeleton-${t}`))]
172
- }), se = { countBadge: "_countBadge_4bnxj_1" }, ce = ({ title: e, count: t, children: i, styles: a }) => {
172
+ }, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */ V(oe, { styles: l }, `skeleton-${t}`))]
173
+ }), ce = { countBadge: "_countBadge_4bnxj_1" }, le = ({ title: e, count: t, children: i, styles: a }) => {
173
174
  let o = a?.typography?.titleClassName ?? "dial-small-semi-text", s = a?.typography?.countBadgeClassName ?? "dial-tiny-text", c = n({
174
175
  "--sts-badge-bg": a?.colors?.countBadgeBackground,
175
176
  "--sts-badge-text": a?.colors?.countBadgeText
176
177
  });
177
- return /* @__PURE__ */ U("section", {
178
+ return /* @__PURE__ */ H("section", {
178
179
  ...e ? { "aria-label": e } : {},
179
180
  style: c,
180
181
  className: "flex flex-col gap-3",
181
- children: [e && /* @__PURE__ */ U("div", {
182
+ children: [e && /* @__PURE__ */ H("div", {
182
183
  className: "flex items-center gap-2 rtl:flex-row-reverse",
183
- children: [/* @__PURE__ */ H("h2", {
184
+ children: [/* @__PURE__ */ V("h2", {
184
185
  className: o,
185
186
  children: e
186
- }), /* @__PURE__ */ H("span", {
187
- className: r("rounded-full px-2 py-0.5", s, se.countBadge),
187
+ }), /* @__PURE__ */ V("span", {
188
+ className: r("rounded-full px-2 py-0.5", s, ce.countBadge),
188
189
  children: t
189
190
  })]
190
191
  }), i]
@@ -193,29 +194,29 @@ var W = /* @__PURE__ */ function(e) {
193
194
  container: "_container_r5sk9_1",
194
195
  subtitle: "_subtitle_r5sk9_5",
195
196
  sortButton: "_sortButton_r5sk9_9"
196
- }, le = [W.Shared, W.MyTasks], ue = (e, t, n, r, i, a) => {
197
+ }, ue = [W.Shared, W.MyTasks], de = (e, t, n, r, i, a) => {
197
198
  if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
198
- }, de = (e) => {
199
+ }, fe = (e) => {
199
200
  if (!e || e === document.body) return null;
200
201
  let { overflow: t, overflowY: n } = getComputedStyle(e);
201
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : de(e.parentElement);
202
- }, fe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: h, isLoading: g = !1, error: _, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount: x = 6, onLoadMore: C, onEdit: w, onRunNow: T, onDelete: D, onCardClick: O, styles: k }) => {
203
- let { colors: j, typography: M, emptyStateIconSize: N = 48 } = k ?? {}, P = M?.titleClassName ?? "dial-h1-text", F = M?.subtitleClassName ?? "dial-body-text", I = n({
204
- "--st-bg": j?.background,
205
- "--st-subtitle-text": j?.subtitleText,
206
- "--st-sort-text": j?.sortButtonText
207
- }), ee = e.sortOptions.find((e) => e.key === f)?.label ?? "", R = B(() => {
202
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : fe(e.parentElement);
203
+ }, pe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: h, isLoading: g = !1, error: _, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount: x = 6, onLoadMore: C, onEdit: w, onRunNow: T, onDelete: D, onCardClick: O, styles: ee }) => {
204
+ let { colors: A, typography: j, emptyStateIconSize: M = 48 } = ee ?? {}, N = j?.titleClassName ?? "dial-h1-text", P = j?.subtitleClassName ?? "dial-body-text", F = n({
205
+ "--st-bg": A?.background,
206
+ "--st-subtitle-text": A?.subtitleText,
207
+ "--st-sort-text": A?.sortButtonText
208
+ }), te = e.sortOptions.find((e) => e.key === f)?.label ?? "", L = z(() => {
208
209
  let t = { [W.Shared]: e.sharedSectionTitle };
209
- return le.map((e) => ({
210
+ return ue.map((e) => ({
210
211
  key: e,
211
212
  title: t[e],
212
213
  items: h.filter((t) => t.sectionKey === e)
213
214
  })).filter((e) => e.items.length > 0);
214
- }, [h, e.sharedSectionTitle]), z = ue(g, b, !!_, h.length, l.trim().length > 0, e), V = ne(null);
215
- te(() => {
216
- let e = V.current;
215
+ }, [h, e.sharedSectionTitle]), R = de(g, b, !!_, h.length, l.trim().length > 0, e), B = re(null);
216
+ ne(() => {
217
+ let e = B.current;
217
218
  if (!e || !C) return;
218
- let t = de(e.parentElement);
219
+ let t = fe(e.parentElement);
219
220
  if (!t) return;
220
221
  let n = () => {
221
222
  if (b || g || !y) return;
@@ -229,36 +230,36 @@ var W = /* @__PURE__ */ function(e) {
229
230
  g,
230
231
  C
231
232
  ]);
232
- let G = () => {
233
- if (g) return /* @__PURE__ */ H(E, {});
234
- if (_) return /* @__PURE__ */ U("div", {
233
+ let U = () => {
234
+ if (g) return /* @__PURE__ */ V(E, {});
235
+ if (_) return /* @__PURE__ */ H("div", {
235
236
  className: "flex flex-col items-center gap-3",
236
- children: [/* @__PURE__ */ H("p", {
237
- className: r(F, J.subtitle),
237
+ children: [/* @__PURE__ */ V("p", {
238
+ className: r(P, J.subtitle),
238
239
  children: e.errorLabel
239
- }), /* @__PURE__ */ H(m, {
240
+ }), /* @__PURE__ */ V(m, {
240
241
  label: e.retryLabel,
241
242
  onClick: v
242
243
  })]
243
244
  });
244
- if (h.length === 0) return l.trim() ? /* @__PURE__ */ H("p", {
245
- className: r(F, J.subtitle),
245
+ if (h.length === 0) return l.trim() ? /* @__PURE__ */ V("p", {
246
+ className: r(P, J.subtitle),
246
247
  children: e.noResultsLabel
247
- }) : /* @__PURE__ */ H(t, {
248
- icon: /* @__PURE__ */ H(A, {
248
+ }) : /* @__PURE__ */ V(t, {
249
+ icon: /* @__PURE__ */ V(k, {
249
250
  "aria-hidden": !0,
250
- size: N,
251
+ size: M,
251
252
  stroke: 1
252
253
  }),
253
254
  label: e.emptyStateLabel
254
255
  });
255
- let n = R.length - 1;
256
- return /* @__PURE__ */ U("div", {
256
+ let n = L.length - 1;
257
+ return /* @__PURE__ */ H("div", {
257
258
  className: "flex w-full flex-col gap-6",
258
- children: [R.map((t, r) => /* @__PURE__ */ H(ce, {
259
+ children: [L.map((t, r) => /* @__PURE__ */ V(le, {
259
260
  title: t.title,
260
261
  count: t.items.length,
261
- children: /* @__PURE__ */ H(oe, {
262
+ children: /* @__PURE__ */ V(se, {
262
263
  items: t.items,
263
264
  searchQuery: l,
264
265
  onEdit: w,
@@ -267,33 +268,33 @@ var W = /* @__PURE__ */ function(e) {
267
268
  onCardClick: O,
268
269
  labels: e.cardLabels,
269
270
  trailingSkeletonCount: b && r === n ? x : 0,
270
- skeletonStyles: { colors: { skeletonColor: j?.skeletonColor } }
271
+ skeletonStyles: { colors: { skeletonColor: A?.skeletonColor } }
271
272
  })
272
- }, t.key)), /* @__PURE__ */ H("div", {
273
- ref: V,
273
+ }, t.key)), /* @__PURE__ */ V("div", {
274
+ ref: B,
274
275
  "aria-hidden": !0,
275
276
  className: "h-px w-full"
276
277
  })]
277
278
  });
278
- }, K = g || !!_ || h.length === 0;
279
- return /* @__PURE__ */ U("div", {
280
- style: I,
279
+ }, G = g || !!_ || h.length === 0;
280
+ return /* @__PURE__ */ H("div", {
281
+ style: F,
281
282
  className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", J.container),
282
283
  children: [
283
- /* @__PURE__ */ U("div", {
284
+ /* @__PURE__ */ H("div", {
284
285
  className: "flex items-start justify-between gap-4",
285
- children: [/* @__PURE__ */ U("div", {
286
+ children: [/* @__PURE__ */ H("div", {
286
287
  className: "min-w-0 gap-2",
287
- children: [/* @__PURE__ */ H("h1", {
288
- className: r("truncate", P),
288
+ children: [/* @__PURE__ */ V("h1", {
289
+ className: r("truncate", N),
289
290
  children: e.title
290
- }), /* @__PURE__ */ H("p", {
291
- className: r("mt-1", F, J.subtitle),
291
+ }), /* @__PURE__ */ V("p", {
292
+ className: r("mt-1", P, J.subtitle),
292
293
  children: e.subtitle
293
294
  })]
294
- }), /* @__PURE__ */ H(S, {
295
+ }), /* @__PURE__ */ V(S, {
295
296
  label: e.createButtonLabel,
296
- iconBefore: /* @__PURE__ */ H(L, {
297
+ iconBefore: /* @__PURE__ */ V(I, {
297
298
  size: d.SM,
298
299
  "aria-hidden": !0
299
300
  }),
@@ -301,11 +302,11 @@ var W = /* @__PURE__ */ function(e) {
301
302
  className: "shrink-0"
302
303
  })]
303
304
  }),
304
- /* @__PURE__ */ U("div", {
305
+ /* @__PURE__ */ H("div", {
305
306
  className: "flex flex-wrap items-center gap-3",
306
- children: [/* @__PURE__ */ H("div", {
307
+ children: [/* @__PURE__ */ V("div", {
307
308
  className: "flex-1",
308
- children: /* @__PURE__ */ H(i, {
309
+ children: /* @__PURE__ */ V(i, {
309
310
  value: l,
310
311
  onChange: u,
311
312
  labels: {
@@ -321,8 +322,8 @@ var W = /* @__PURE__ */ function(e) {
321
322
  clearButtonClassName: "size-11 desktop:size-auto"
322
323
  }
323
324
  })
324
- }), e.sortOptions.length > 0 && /* @__PURE__ */ H(o, {
325
- label: ee,
325
+ }), e.sortOptions.length > 0 && /* @__PURE__ */ V(o, {
326
+ label: te,
326
327
  variant: s.Primary,
327
328
  appearance: a.Ghost,
328
329
  items: e.sortOptions.map((e) => ({
@@ -331,299 +332,275 @@ var W = /* @__PURE__ */ function(e) {
331
332
  }))
332
333
  })]
333
334
  }),
334
- /* @__PURE__ */ H("span", {
335
+ /* @__PURE__ */ V("span", {
335
336
  role: "status",
336
337
  "aria-live": "polite",
337
338
  className: "sr-only",
338
- children: z
339
+ children: R
339
340
  }),
340
- /* @__PURE__ */ H("div", {
341
- className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", K && "items-center justify-center"),
342
- children: G()
341
+ /* @__PURE__ */ V("div", {
342
+ className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", G && "items-center justify-center"),
343
+ children: U()
343
344
  })
344
345
  ]
345
346
  });
346
- }, pe = /* @__PURE__ */ function(e) {
347
+ }, me = /* @__PURE__ */ function(e) {
347
348
  return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
348
- }({}), me = 500, Y = /* @__PURE__ */ function(e) {
349
+ }({}), he = 500, Y = /* @__PURE__ */ function(e) {
349
350
  return e.OneTime = "oneTime", e.Hourly = "hourly", e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
350
- }({}), X = (e) => String(e).padStart(2, "0"), he = (e) => e ? new Date(e) : null, ge = (e) => {
351
+ }({}), X = (e) => String(e).padStart(2, "0"), ge = (e) => e ? new Date(e) : null, _e = (e) => {
351
352
  if (e == null) return "";
352
353
  let t = e instanceof Date ? e : new Date(e);
353
354
  return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${X(t.getMonth() + 1)}-${X(t.getDate())}T${X(t.getHours())}:${X(t.getMinutes())}`;
354
- }, _e = (e) => {
355
+ }, ve = (e) => {
355
356
  if (!e) return null;
356
357
  let [t, n, r] = e.split("-").map(Number);
357
358
  return new Date(t, n - 1, r);
358
- }, ve = (e) => {
359
+ }, ye = (e) => {
359
360
  if (e == null) return "";
360
361
  let t = e instanceof Date ? e : new Date(e);
361
362
  return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${X(t.getMonth() + 1)}-${X(t.getDate())}`;
362
- }, ye = (e) => {
363
+ }, be = (e) => {
363
364
  let t = Number(e);
364
365
  return e && Number.isFinite(t) ? String(t + 1) : null;
365
- }, be = (e) => {
366
+ }, xe = (e) => {
366
367
  let t = typeof e == "string" ? Number(e) : NaN;
367
368
  return Number.isFinite(t) ? String(t - 1) : "";
368
369
  }, Z = {
369
- container: "_container_sq3dp_1",
370
- header: "_header_sq3dp_5",
371
- detailsColumn: "_detailsColumn_sq3dp_9",
372
- sectionSubtitle: "_sectionSubtitle_sq3dp_13",
373
- instructionsError: "_instructionsError_sq3dp_17"
374
- }, xe = (e) => `${e} *`, Se = z(async () => ({ default: (await y()).MarkdownEditor })), Ce = ({ labels: e, values: t, errors: i, modelOptions: a, onFieldChange: o, onBack: s, onCancel: u, onSubmit: f, isSubmitting: p = !1, markdownEditorTheme: m, styles: g }) => {
375
- let { colors: _, typography: y } = g ?? {}, w = y?.titleClassName ?? "dial-h1-text", T = y?.sectionTitleClassName ?? "dial-body-semi-text", O = y?.sectionSubtitleClassName ?? "dial-tiny-text", A = y?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", j = y?.instructionsErrorClassName ?? "dial-small-text", M = n({
376
- "--stcf-bg": _?.background,
377
- "--stcf-header-border": _?.headerBorder,
378
- "--stcf-details-border": _?.detailsColumnBorder,
379
- "--stcf-subtitle-text": _?.sectionSubtitleText,
380
- "--stcf-error-text": _?.instructionsErrorText
381
- }), N = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
382
- return /* @__PURE__ */ U("div", {
383
- style: M,
384
- className: r("flex h-full w-full flex-col overflow-y-auto", Z.container),
385
- children: [/* @__PURE__ */ U("div", {
386
- className: r("flex h-16 items-center justify-between gap-6 border-b px-8", Z.header),
387
- children: [/* @__PURE__ */ U("div", {
388
- className: "flex min-w-0 flex-1 items-center gap-2",
389
- children: [/* @__PURE__ */ H(h, {
390
- icon: /* @__PURE__ */ H(k, {
391
- size: d.LG,
392
- className: "rtl:scale-x-[-1]",
393
- "aria-hidden": !0
394
- }),
395
- "aria-label": e.backButtonLabel,
396
- onClick: s
397
- }), /* @__PURE__ */ H("h1", {
398
- className: r("truncate", w),
399
- children: e.pageTitle
400
- })]
401
- }), /* @__PURE__ */ U("div", {
402
- className: "flex items-center gap-2",
403
- children: [/* @__PURE__ */ H(b, {
404
- label: e.cancelButtonLabel,
405
- onClick: u,
406
- disabled: p
407
- }), /* @__PURE__ */ H(S, {
408
- label: e.createButtonLabel,
409
- onClick: f,
410
- disabled: N
411
- })]
412
- })]
413
- }), /* @__PURE__ */ U("div", {
414
- className: "flex flex-1 flex-col desktop:flex-row",
370
+ detailsColumn: "_detailsColumn_1mg3v_1",
371
+ sectionSubtitle: "_sectionSubtitle_1mg3v_5",
372
+ instructionsError: "_instructionsError_1mg3v_9"
373
+ }, Se = (e) => `${e} *`, Ce = R(async () => ({ default: (await y()).MarkdownEditor })), we = ({ labels: e, values: t, errors: i, modelOptions: a, onFieldChange: o, onBack: s, onCancel: u, onSubmit: d, isSubmitting: f = !1, markdownEditorTheme: p, styles: m }) => {
374
+ let { colors: h, typography: g } = m ?? {}, _ = g?.titleClassName ?? "dial-h1-text", y = g?.sectionTitleClassName ?? "dial-body-semi-text", b = g?.sectionSubtitleClassName ?? "dial-tiny-text", S = g?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", w = g?.instructionsErrorClassName ?? "dial-small-text", T = n({
375
+ "--stcf-details-border": h?.detailsColumnBorder,
376
+ "--stcf-subtitle-text": h?.sectionSubtitleText,
377
+ "--stcf-error-text": h?.instructionsErrorText
378
+ }), O = f || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
379
+ return /* @__PURE__ */ V(U, {
380
+ labels: {
381
+ title: e.pageTitle,
382
+ backButtonLabel: e.backButtonLabel,
383
+ cancelButtonLabel: e.cancelButtonLabel,
384
+ submitButtonLabel: e.createButtonLabel
385
+ },
386
+ onBack: s,
387
+ onCancel: u,
388
+ onSubmit: d,
389
+ isCancelDisabled: f,
390
+ isSubmitDisabled: O,
391
+ styles: {
392
+ colors: { background: h?.background },
393
+ header: {
394
+ colors: { borderColor: h?.headerBorder },
395
+ typography: { fontClassName: _ }
396
+ },
397
+ cssVars: T
398
+ },
399
+ left: /* @__PURE__ */ H("div", {
400
+ role: "group",
401
+ "aria-label": e.detailsSectionTitle,
402
+ className: r("flex flex-1 flex-col gap-5 border-e px-8 py-6", Z.detailsColumn),
415
403
  children: [
416
- /* @__PURE__ */ U("div", {
417
- role: "group",
418
- "aria-label": e.detailsSectionTitle,
419
- className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", Z.detailsColumn),
404
+ /* @__PURE__ */ H("div", {
405
+ className: "flex flex-col gap-1",
406
+ children: [/* @__PURE__ */ V("h2", {
407
+ className: y,
408
+ children: e.detailsSectionTitle
409
+ }), /* @__PURE__ */ V("p", {
410
+ className: r(b, Z.sectionSubtitle),
411
+ children: e.detailsSectionSubtitle
412
+ })]
413
+ }),
414
+ /* @__PURE__ */ V(v, {
415
+ id: "scheduled-task-display-name",
416
+ value: t.displayName,
417
+ onChange: (e) => o("displayName", e ?? ""),
418
+ labelProps: {
419
+ label: e.displayNameLabel,
420
+ required: !0
421
+ },
422
+ invalid: !!i.displayName,
423
+ error: i.displayName
424
+ }),
425
+ /* @__PURE__ */ V(D, {
426
+ id: "scheduled-task-description",
427
+ value: t.description ?? "",
428
+ onChange: (e) => o("description", e),
429
+ labelProps: { label: e.descriptionLabel },
430
+ maxLength: 500,
431
+ invalid: !!i.description,
432
+ error: i.description,
433
+ caption: t.description ? `${t.description.length}/500` : void 0
434
+ }),
435
+ /* @__PURE__ */ V(C, {
436
+ labelProps: {
437
+ label: e.modelOrAgentLabel,
438
+ required: !0
439
+ },
440
+ value: t.modelId,
441
+ placeholder: e.modelPlaceholder,
442
+ onChange: (e) => o("modelId", e),
443
+ error: i.modelId,
444
+ options: a.map((e) => ({
445
+ value: e.id,
446
+ label: e.label
447
+ }))
448
+ }),
449
+ /* @__PURE__ */ H("div", {
450
+ className: "flex flex-col gap-3",
420
451
  children: [
421
- /* @__PURE__ */ U("div", {
422
- className: "flex flex-col gap-1",
423
- children: [/* @__PURE__ */ H("h2", {
424
- className: T,
425
- children: e.detailsSectionTitle
426
- }), /* @__PURE__ */ H("p", {
427
- className: r(O, Z.sectionSubtitle),
428
- children: e.detailsSectionSubtitle
429
- })]
430
- }),
431
- /* @__PURE__ */ H(v, {
432
- id: "scheduled-task-display-name",
433
- value: t.displayName,
434
- onChange: (e) => o("displayName", e ?? ""),
435
- labelProps: {
436
- label: e.displayNameLabel,
437
- required: !0
438
- },
439
- invalid: !!i.displayName,
440
- error: i.displayName
441
- }),
442
- /* @__PURE__ */ H(D, {
443
- id: "scheduled-task-description",
444
- value: t.description ?? "",
445
- onChange: (e) => o("description", e),
446
- labelProps: { label: e.descriptionLabel },
447
- maxLength: 500,
448
- invalid: !!i.description,
449
- error: i.description,
450
- caption: t.description ? `${t.description.length}/500` : void 0
451
- }),
452
- /* @__PURE__ */ H(C, {
453
- labelProps: {
454
- label: e.modelOrAgentLabel,
455
- required: !0
456
- },
457
- value: t.modelId,
458
- placeholder: e.modelPlaceholder,
459
- onChange: (e) => o("modelId", e),
460
- error: i.modelId,
461
- options: a.map((e) => ({
462
- value: e.id,
452
+ /* @__PURE__ */ V(C, {
453
+ labelProps: { label: e.repeatLabel },
454
+ value: t.repeat,
455
+ onChange: (e) => o("repeat", e),
456
+ options: e.repeatOptions.map((e) => ({
457
+ value: e.key,
463
458
  label: e.label
464
459
  }))
465
460
  }),
466
- /* @__PURE__ */ U("div", {
467
- className: "flex flex-col gap-3",
468
- children: [
469
- /* @__PURE__ */ H(C, {
470
- labelProps: { label: e.repeatLabel },
471
- value: t.repeat,
472
- onChange: (e) => o("repeat", e),
473
- options: e.repeatOptions.map((e) => ({
474
- value: e.key,
475
- label: e.label
476
- }))
477
- }),
478
- t.repeat === Y.OneTime && /* @__PURE__ */ U("div", {
479
- className: "flex flex-col gap-1",
480
- children: [/* @__PURE__ */ H(c, {
481
- id: "scheduled-task-run-at",
482
- mode: l.DateTime,
483
- value: he(t.runAt),
484
- onChange: (e) => o("runAt", ge(e)),
485
- label: xe(e.runAtLabel),
486
- invalid: !!i.runAt
487
- }), i.runAt && /* @__PURE__ */ H("p", {
488
- className: r(j, Z.instructionsError),
489
- children: i.runAt
490
- })]
491
- }),
492
- t.repeat !== Y.OneTime && /* @__PURE__ */ U(V, { children: [
493
- t.repeat !== Y.Hourly && /* @__PURE__ */ U("div", {
494
- className: "flex flex-col gap-1",
495
- children: [/* @__PURE__ */ H(c, {
496
- id: "scheduled-task-time",
497
- mode: l.Time,
498
- value: t.time,
499
- onChange: (e) => o("time", typeof e == "string" ? e : ""),
500
- label: xe(e.timeLabel),
501
- invalid: !!i.time
502
- }), i.time && /* @__PURE__ */ H("p", {
503
- className: r(j, Z.instructionsError),
504
- children: i.time
505
- })]
506
- }),
507
- t.repeat === Y.Weekly && /* @__PURE__ */ U("div", {
508
- className: "flex flex-col gap-1",
509
- children: [/* @__PURE__ */ H(c, {
510
- id: "scheduled-task-day-of-week",
511
- mode: l.Weekday,
512
- value: ye(t.dayOfWeek),
513
- onChange: (e) => o("dayOfWeek", be(e)),
514
- label: xe(e.dayOfWeekLabel),
515
- invalid: !!i.dayOfWeek
516
- }), i.dayOfWeek && /* @__PURE__ */ H("p", {
517
- className: r(j, Z.instructionsError),
518
- children: i.dayOfWeek
519
- })]
520
- }),
521
- t.repeat === Y.Monthly && /* @__PURE__ */ H(v, {
522
- id: "scheduled-task-day-of-month",
523
- value: t.dayOfMonth ?? "",
524
- onChange: (e) => o("dayOfMonth", e ?? ""),
525
- labelProps: {
526
- label: e.dayOfMonthLabel,
527
- required: !0
528
- },
529
- invalid: !!i.dayOfMonth,
530
- error: i.dayOfMonth
531
- }),
532
- t.repeat === Y.Hourly && /* @__PURE__ */ H(x, {
533
- id: "scheduled-task-minute",
534
- integer: !0,
535
- min: 0,
536
- max: 59,
537
- value: t.minute ?? "",
538
- onChange: (e) => o("minute", e == null ? "" : String(e)),
539
- labelProps: {
540
- label: e.minuteLabel,
541
- required: !0
542
- },
543
- invalid: !!i.minute,
544
- error: i.minute
545
- }),
546
- /* @__PURE__ */ U("div", {
547
- className: "flex flex-col gap-3 desktop:flex-row",
548
- children: [/* @__PURE__ */ U("div", {
549
- className: "flex flex-1 flex-col gap-1",
550
- children: [/* @__PURE__ */ H(c, {
551
- id: "scheduled-task-start-date",
552
- mode: l.Date,
553
- value: _e(t.startDate),
554
- onChange: (e) => o("startDate", ve(e)),
555
- label: e.startDateLabel,
556
- placeholder: e.startDatePlaceholder,
557
- invalid: !!i.startDate
558
- }), i.startDate && /* @__PURE__ */ H("p", {
559
- className: r(j, Z.instructionsError),
560
- children: i.startDate
561
- })]
562
- }), /* @__PURE__ */ U("div", {
563
- className: "flex flex-1 flex-col gap-1",
564
- children: [/* @__PURE__ */ H(c, {
565
- id: "scheduled-task-end-date",
566
- mode: l.Date,
567
- value: _e(t.endDate),
568
- onChange: (e) => o("endDate", ve(e)),
569
- label: e.endDateLabel,
570
- placeholder: e.endDatePlaceholder,
571
- invalid: !!i.endDate
572
- }), i.endDate && /* @__PURE__ */ H("p", {
573
- className: r(j, Z.instructionsError),
574
- children: i.endDate
575
- })]
576
- })]
577
- })
578
- ] })
579
- ]
580
- })
581
- ]
582
- }),
583
- /* @__PURE__ */ U("div", {
584
- role: "group",
585
- "aria-label": e.configurationSectionTitle,
586
- className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
587
- children: [/* @__PURE__ */ U("div", {
588
- className: "flex flex-col gap-1",
589
- children: [/* @__PURE__ */ H("h2", {
590
- className: T,
591
- children: e.configurationSectionTitle
592
- }), /* @__PURE__ */ H("p", {
593
- className: r(O, Z.sectionSubtitle),
594
- children: e.configurationSectionSubtitle
595
- })]
596
- }), /* @__PURE__ */ U("div", {
597
- role: "group",
598
- "aria-label": e.instructionsLabel,
599
- className: "flex flex-1 flex-col gap-1",
600
- children: [
601
- /* @__PURE__ */ H("span", {
602
- className: A,
603
- children: e.instructionsLabel
461
+ t.repeat === Y.OneTime && /* @__PURE__ */ H("div", {
462
+ className: "flex flex-col gap-1",
463
+ children: [/* @__PURE__ */ V(c, {
464
+ id: "scheduled-task-run-at",
465
+ mode: l.DateTime,
466
+ value: ge(t.runAt),
467
+ onChange: (e) => o("runAt", _e(e)),
468
+ label: Se(e.runAtLabel),
469
+ invalid: !!i.runAt
470
+ }), i.runAt && /* @__PURE__ */ V("p", {
471
+ className: r(w, Z.instructionsError),
472
+ children: i.runAt
473
+ })]
474
+ }),
475
+ t.repeat !== Y.OneTime && /* @__PURE__ */ H(B, { children: [
476
+ t.repeat !== Y.Hourly && /* @__PURE__ */ H("div", {
477
+ className: "flex flex-col gap-1",
478
+ children: [/* @__PURE__ */ V(c, {
479
+ id: "scheduled-task-time",
480
+ mode: l.Time,
481
+ value: t.time,
482
+ onChange: (e) => o("time", typeof e == "string" ? e : ""),
483
+ label: Se(e.timeLabel),
484
+ invalid: !!i.time
485
+ }), i.time && /* @__PURE__ */ V("p", {
486
+ className: r(w, Z.instructionsError),
487
+ children: i.time
488
+ })]
604
489
  }),
605
- /* @__PURE__ */ H(R, {
606
- fallback: /* @__PURE__ */ H(E, {}),
607
- children: /* @__PURE__ */ H(Se, {
608
- value: t.prompt,
609
- onChange: (e) => o("prompt", e),
610
- height: 480,
611
- theme: m
612
- })
490
+ t.repeat === Y.Weekly && /* @__PURE__ */ H("div", {
491
+ className: "flex flex-col gap-1",
492
+ children: [/* @__PURE__ */ V(c, {
493
+ id: "scheduled-task-day-of-week",
494
+ mode: l.Weekday,
495
+ value: be(t.dayOfWeek),
496
+ onChange: (e) => o("dayOfWeek", xe(e)),
497
+ label: Se(e.dayOfWeekLabel),
498
+ invalid: !!i.dayOfWeek
499
+ }), i.dayOfWeek && /* @__PURE__ */ V("p", {
500
+ className: r(w, Z.instructionsError),
501
+ children: i.dayOfWeek
502
+ })]
503
+ }),
504
+ t.repeat === Y.Monthly && /* @__PURE__ */ V(v, {
505
+ id: "scheduled-task-day-of-month",
506
+ value: t.dayOfMonth ?? "",
507
+ onChange: (e) => o("dayOfMonth", e ?? ""),
508
+ labelProps: {
509
+ label: e.dayOfMonthLabel,
510
+ required: !0
511
+ },
512
+ invalid: !!i.dayOfMonth,
513
+ error: i.dayOfMonth
613
514
  }),
614
- i.prompt && /* @__PURE__ */ H("p", {
615
- className: r(j, Z.instructionsError),
616
- children: i.prompt
515
+ t.repeat === Y.Hourly && /* @__PURE__ */ V(x, {
516
+ id: "scheduled-task-minute",
517
+ integer: !0,
518
+ min: 0,
519
+ max: 59,
520
+ value: t.minute ?? "",
521
+ onChange: (e) => o("minute", e == null ? "" : String(e)),
522
+ labelProps: {
523
+ label: e.minuteLabel,
524
+ required: !0
525
+ },
526
+ invalid: !!i.minute,
527
+ error: i.minute
528
+ }),
529
+ /* @__PURE__ */ H("div", {
530
+ className: "flex flex-col gap-3 desktop:flex-row",
531
+ children: [/* @__PURE__ */ H("div", {
532
+ className: "flex flex-1 flex-col gap-1",
533
+ children: [/* @__PURE__ */ V(c, {
534
+ id: "scheduled-task-start-date",
535
+ mode: l.Date,
536
+ value: ve(t.startDate),
537
+ onChange: (e) => o("startDate", ye(e)),
538
+ label: e.startDateLabel,
539
+ placeholder: e.startDatePlaceholder,
540
+ invalid: !!i.startDate
541
+ }), i.startDate && /* @__PURE__ */ V("p", {
542
+ className: r(w, Z.instructionsError),
543
+ children: i.startDate
544
+ })]
545
+ }), /* @__PURE__ */ H("div", {
546
+ className: "flex flex-1 flex-col gap-1",
547
+ children: [/* @__PURE__ */ V(c, {
548
+ id: "scheduled-task-end-date",
549
+ mode: l.Date,
550
+ value: ve(t.endDate),
551
+ onChange: (e) => o("endDate", ye(e)),
552
+ label: e.endDateLabel,
553
+ placeholder: e.endDatePlaceholder,
554
+ invalid: !!i.endDate
555
+ }), i.endDate && /* @__PURE__ */ V("p", {
556
+ className: r(w, Z.instructionsError),
557
+ children: i.endDate
558
+ })]
559
+ })]
617
560
  })
618
- ]
619
- })]
620
- }),
621
- /* @__PURE__ */ H("div", {
622
- "aria-hidden": !0,
623
- className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
561
+ ] })
562
+ ]
624
563
  })
625
564
  ]
626
- })]
565
+ }),
566
+ children: /* @__PURE__ */ H("div", {
567
+ role: "group",
568
+ "aria-label": e.configurationSectionTitle,
569
+ className: "flex flex-1 flex-col gap-5 px-8 py-6",
570
+ children: [/* @__PURE__ */ H("div", {
571
+ className: "flex flex-col gap-1",
572
+ children: [/* @__PURE__ */ V("h2", {
573
+ className: y,
574
+ children: e.configurationSectionTitle
575
+ }), /* @__PURE__ */ V("p", {
576
+ className: r(b, Z.sectionSubtitle),
577
+ children: e.configurationSectionSubtitle
578
+ })]
579
+ }), /* @__PURE__ */ H("div", {
580
+ role: "group",
581
+ "aria-label": e.instructionsLabel,
582
+ className: "flex flex-1 flex-col gap-1",
583
+ children: [
584
+ /* @__PURE__ */ V("span", {
585
+ className: S,
586
+ children: e.instructionsLabel
587
+ }),
588
+ /* @__PURE__ */ V(L, {
589
+ fallback: /* @__PURE__ */ V(E, {}),
590
+ children: /* @__PURE__ */ V(Ce, {
591
+ value: t.prompt,
592
+ onChange: (e) => o("prompt", e),
593
+ height: 480,
594
+ theme: p
595
+ })
596
+ }),
597
+ i.prompt && /* @__PURE__ */ V("p", {
598
+ className: r(w, Z.instructionsError),
599
+ children: i.prompt
600
+ })
601
+ ]
602
+ })]
603
+ })
627
604
  });
628
605
  }, Q = /* @__PURE__ */ function(e) {
629
606
  return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
@@ -636,119 +613,119 @@ var W = /* @__PURE__ */ function(e) {
636
613
  errorIcon: "_errorIcon_1ci42_21",
637
614
  missedIcon: "_missedIcon_1ci42_25",
638
615
  historyCard: "_historyCard_1ci42_29"
639
- }, we = (e) => {
616
+ }, Te = (e) => {
640
617
  if (!e || e === document.body) return null;
641
618
  let { overflow: t, overflowY: n } = getComputedStyle(e);
642
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : we(e.parentElement);
643
- }, Te = ({ status: e }) => {
619
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Te(e.parentElement);
620
+ }, Ee = ({ status: e }) => {
644
621
  switch (e) {
645
- case Q.Success: return /* @__PURE__ */ H(j, {
622
+ case Q.Success: return /* @__PURE__ */ V(A, {
646
623
  size: d.SM,
647
624
  className: $.successIcon,
648
625
  "aria-hidden": !0
649
626
  });
650
- case Q.Error: return /* @__PURE__ */ H(M, {
627
+ case Q.Error: return /* @__PURE__ */ V(j, {
651
628
  size: d.SM,
652
629
  className: $.errorIcon,
653
630
  "aria-hidden": !0
654
631
  });
655
- case Q.InProgress: return /* @__PURE__ */ H("span", {
632
+ case Q.InProgress: return /* @__PURE__ */ V("span", {
656
633
  "aria-hidden": !0,
657
- children: /* @__PURE__ */ H(E, { size: d.SM })
634
+ children: /* @__PURE__ */ V(E, { size: d.SM })
658
635
  });
659
- case Q.Missed: return /* @__PURE__ */ H(O, {
636
+ case Q.Missed: return /* @__PURE__ */ V(O, {
660
637
  size: d.SM,
661
638
  className: $.missedIcon,
662
639
  "aria-hidden": !0
663
640
  });
664
641
  default: return null;
665
642
  }
666
- }, Ee = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel: _, instructionsMarkdown: v, renderInstructions: y, runs: x, runsIsLoading: S = !1, runsIsLoadingMore: C = !1, runsSkeletonCount: D = 6, runsError: O, onRunsRetry: A, runsHasMore: j = !1, onRunsLoadMore: M, onRunClick: N, styles: P }) => {
667
- let { colors: I, typography: L } = P ?? {}, ee = L?.titleClassName ?? "dial-h1-text", R = L?.sectionTitleClassName ?? "dial-body-semi-text", z = L?.fieldLabelClassName ?? "dial-tiny-text", B = L?.fieldValueClassName ?? "dial-body-text", V = L?.runTimestampClassName ?? "dial-small-text", W = n({
668
- "--stdv-bg": I?.background,
669
- "--stdv-header-border": I?.headerBorder,
670
- "--stdv-details-border": I?.detailsColumnBorder,
671
- "--stdv-subtitle-text": I?.subtitleText,
672
- "--stdv-success-icon": I?.successIconColor,
673
- "--stdv-error-icon": I?.errorIconColor,
674
- "--stdv-missed-icon": I?.missedIconColor,
675
- "--stdv-history-bg": I?.historyCardBackground
676
- }), G = ne(null);
677
- te(() => {
678
- let e = G.current;
679
- if (!e || !M) return;
680
- let t = we(e.parentElement);
643
+ }, De = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel: _, instructionsMarkdown: v, renderInstructions: y, runs: x, runsIsLoading: S = !1, runsIsLoadingMore: C = !1, runsSkeletonCount: D = 6, runsError: O, onRunsRetry: k, runsHasMore: A = !1, onRunsLoadMore: j, onRunClick: M, styles: N }) => {
644
+ let { colors: F, typography: I } = N ?? {}, te = I?.titleClassName ?? "dial-h1-text", L = I?.sectionTitleClassName ?? "dial-body-semi-text", R = I?.fieldLabelClassName ?? "dial-tiny-text", z = I?.fieldValueClassName ?? "dial-body-text", B = I?.runTimestampClassName ?? "dial-small-text", U = n({
645
+ "--stdv-bg": F?.background,
646
+ "--stdv-header-border": F?.headerBorder,
647
+ "--stdv-details-border": F?.detailsColumnBorder,
648
+ "--stdv-subtitle-text": F?.subtitleText,
649
+ "--stdv-success-icon": F?.successIconColor,
650
+ "--stdv-error-icon": F?.errorIconColor,
651
+ "--stdv-missed-icon": F?.missedIconColor,
652
+ "--stdv-history-bg": F?.historyCardBackground
653
+ }), W = re(null);
654
+ ne(() => {
655
+ let e = W.current;
656
+ if (!e || !j) return;
657
+ let t = Te(e.parentElement);
681
658
  if (!t) return;
682
659
  let n = () => {
683
- if (C || S || !j) return;
660
+ if (C || S || !A) return;
684
661
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
685
- r.top < n.bottom && r.bottom > n.top && M();
662
+ r.top < n.bottom && r.bottom > n.top && j();
686
663
  };
687
664
  return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
688
665
  }, [
689
- j,
666
+ A,
690
667
  C,
691
668
  S,
692
- M
669
+ j
693
670
  ]);
694
- let K = (t) => y ? y(t) : /* @__PURE__ */ H(e, { content: t }), re = (e) => {
695
- let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!N;
696
- return /* @__PURE__ */ U("li", {
671
+ let G = (t) => y ? y(t) : /* @__PURE__ */ V(e, { content: t }), K = (e) => {
672
+ let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!M;
673
+ return /* @__PURE__ */ H("li", {
697
674
  ...i ? {
698
675
  role: "button",
699
676
  tabIndex: 0,
700
- onClick: () => N?.(e.id),
677
+ onClick: () => M?.(e.id),
701
678
  onKeyDown: (t) => {
702
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), N?.(e.id));
679
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), M?.(e.id));
703
680
  }
704
681
  } : {},
705
682
  "aria-label": n,
706
683
  className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", i && "cursor-pointer"),
707
- children: [/* @__PURE__ */ H("span", {
708
- className: r(V, "truncate"),
684
+ children: [/* @__PURE__ */ V("span", {
685
+ className: r(B, "truncate"),
709
686
  children: e.timestampLabel
710
- }), /* @__PURE__ */ H("span", {
687
+ }), /* @__PURE__ */ V("span", {
711
688
  className: "flex h-8 w-14 shrink-0 items-center justify-end",
712
- children: /* @__PURE__ */ H(Te, { status: e.status })
689
+ children: /* @__PURE__ */ V(Ee, { status: e.status })
713
690
  })]
714
691
  }, e.id);
715
- }, q = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ U("li", {
692
+ }, q = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ H("li", {
716
693
  "aria-hidden": "true",
717
694
  className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
718
- children: [/* @__PURE__ */ H(w, {
695
+ children: [/* @__PURE__ */ V(w, {
719
696
  variant: T.Rectangular,
720
697
  width: "160px",
721
698
  height: "16px"
722
- }), /* @__PURE__ */ H(w, {
699
+ }), /* @__PURE__ */ V(w, {
723
700
  variant: T.Rectangular,
724
701
  width: "16px",
725
702
  height: "16px",
726
703
  className: "shrink-0 rounded-full"
727
704
  })]
728
705
  }, `history-skeleton-${t}`));
729
- return /* @__PURE__ */ U("div", {
730
- style: W,
706
+ return /* @__PURE__ */ H("div", {
707
+ style: U,
731
708
  className: r("flex h-full w-full flex-col overflow-y-auto", $.container),
732
709
  children: [
733
- /* @__PURE__ */ U("div", {
710
+ /* @__PURE__ */ H("div", {
734
711
  className: r("flex h-16 shrink-0 items-center justify-between gap-2 border-b px-8", $.header),
735
- children: [/* @__PURE__ */ U("div", {
712
+ children: [/* @__PURE__ */ H("div", {
736
713
  className: "flex min-w-0 items-center gap-2",
737
- children: [/* @__PURE__ */ H(h, {
738
- icon: /* @__PURE__ */ H(k, {
714
+ children: [/* @__PURE__ */ V(h, {
715
+ icon: /* @__PURE__ */ V(ee, {
739
716
  size: d.LG,
740
717
  className: "rtl:scale-x-[-1]",
741
718
  "aria-hidden": !0
742
719
  }),
743
720
  "aria-label": t.backAriaLabel,
744
721
  onClick: i
745
- }), /* @__PURE__ */ H("h1", {
746
- className: r("truncate", ee),
722
+ }), /* @__PURE__ */ V("h1", {
723
+ className: r("truncate", te),
747
724
  children: o
748
725
  })]
749
- }), a && /* @__PURE__ */ H(b, {
726
+ }), a && /* @__PURE__ */ V(b, {
750
727
  label: t.editButtonLabel,
751
- iconBefore: /* @__PURE__ */ H(F, {
728
+ iconBefore: /* @__PURE__ */ V(P, {
752
729
  size: d.SM,
753
730
  "aria-hidden": !0
754
731
  }),
@@ -756,130 +733,130 @@ var W = /* @__PURE__ */ function(e) {
756
733
  className: "shrink-0"
757
734
  })]
758
735
  }),
759
- s && /* @__PURE__ */ H("div", {
736
+ s && /* @__PURE__ */ V("div", {
760
737
  className: "flex flex-1 items-center justify-center",
761
- children: /* @__PURE__ */ H(E, {})
738
+ children: /* @__PURE__ */ V(E, {})
762
739
  }),
763
- !s && c && /* @__PURE__ */ U("div", {
740
+ !s && c && /* @__PURE__ */ H("div", {
764
741
  className: "flex flex-1 flex-col items-center justify-center gap-3",
765
- children: [/* @__PURE__ */ H("p", {
766
- className: r(B, $.subtitleText),
742
+ children: [/* @__PURE__ */ V("p", {
743
+ className: r(z, $.subtitleText),
767
744
  children: t.errorLabel
768
- }), /* @__PURE__ */ H(m, {
745
+ }), /* @__PURE__ */ V(m, {
769
746
  label: t.retryLabel,
770
747
  onClick: l
771
748
  })]
772
749
  }),
773
- !s && !c && /* @__PURE__ */ U("div", {
750
+ !s && !c && /* @__PURE__ */ H("div", {
774
751
  className: "flex flex-1 flex-col desktop:flex-row",
775
752
  children: [
776
- /* @__PURE__ */ U("div", {
753
+ /* @__PURE__ */ H("div", {
777
754
  role: "group",
778
755
  "aria-label": t.detailsTitle,
779
756
  className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
780
757
  children: [
781
- /* @__PURE__ */ H("h2", {
782
- className: R,
758
+ /* @__PURE__ */ V("h2", {
759
+ className: L,
783
760
  children: t.detailsTitle
784
761
  }),
785
- u && /* @__PURE__ */ U("div", {
762
+ u && /* @__PURE__ */ H("div", {
786
763
  className: "flex flex-col gap-1",
787
- children: [/* @__PURE__ */ H("span", {
788
- className: z,
764
+ children: [/* @__PURE__ */ V("span", {
765
+ className: R,
789
766
  children: t.descriptionLabel
790
- }), /* @__PURE__ */ H("p", {
791
- className: B,
767
+ }), /* @__PURE__ */ V("p", {
768
+ className: z,
792
769
  children: u
793
770
  })]
794
771
  }),
795
- f && /* @__PURE__ */ U("div", {
772
+ f && /* @__PURE__ */ H("div", {
796
773
  className: "flex flex-col gap-1",
797
- children: [/* @__PURE__ */ H("span", {
798
- className: z,
774
+ children: [/* @__PURE__ */ V("span", {
775
+ className: R,
799
776
  children: t.modelLabel
800
- }), /* @__PURE__ */ H("p", {
801
- className: B,
777
+ }), /* @__PURE__ */ V("p", {
778
+ className: z,
802
779
  children: f
803
780
  })]
804
781
  }),
805
- p && /* @__PURE__ */ U("div", {
782
+ p && /* @__PURE__ */ H("div", {
806
783
  className: "flex flex-col gap-1",
807
- children: [/* @__PURE__ */ H("span", {
808
- className: z,
784
+ children: [/* @__PURE__ */ V("span", {
785
+ className: R,
809
786
  children: t.repeatsLabel
810
- }), /* @__PURE__ */ H("p", {
811
- className: B,
787
+ }), /* @__PURE__ */ V("p", {
788
+ className: z,
812
789
  children: p
813
790
  })]
814
791
  }),
815
- g && /* @__PURE__ */ U("div", {
792
+ g && /* @__PURE__ */ H("div", {
816
793
  className: "flex flex-col gap-1",
817
- children: [/* @__PURE__ */ H("span", {
818
- className: z,
794
+ children: [/* @__PURE__ */ V("span", {
795
+ className: R,
819
796
  children: t.activeWindowLabel
820
- }), /* @__PURE__ */ H("p", {
821
- className: B,
797
+ }), /* @__PURE__ */ V("p", {
798
+ className: z,
822
799
  children: g
823
800
  })]
824
801
  })
825
802
  ]
826
803
  }),
827
- /* @__PURE__ */ U("div", {
804
+ /* @__PURE__ */ H("div", {
828
805
  className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
829
- children: [/* @__PURE__ */ H("h2", {
830
- className: R,
806
+ children: [/* @__PURE__ */ V("h2", {
807
+ className: L,
831
808
  children: t.configurationTitle
832
- }), /* @__PURE__ */ U("div", {
809
+ }), /* @__PURE__ */ H("div", {
833
810
  role: "group",
834
811
  "aria-label": t.instructionsLabel,
835
812
  className: "flex flex-col gap-1",
836
- children: [/* @__PURE__ */ H("span", {
837
- className: z,
813
+ children: [/* @__PURE__ */ V("span", {
814
+ className: R,
838
815
  children: t.instructionsLabel
839
- }), v && K(v)]
816
+ }), v && G(v)]
840
817
  })]
841
818
  }),
842
- /* @__PURE__ */ H("div", {
819
+ /* @__PURE__ */ V("div", {
843
820
  className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
844
- children: /* @__PURE__ */ U("div", {
821
+ children: /* @__PURE__ */ H("div", {
845
822
  className: r("flex w-full flex-col gap-4 overflow-y-auto rounded-xl px-6 py-5 shadow-md desktop:max-h-[70vh] desktop:w-[360px]", $.historyCard),
846
823
  children: [
847
- /* @__PURE__ */ H("h2", {
848
- className: R,
824
+ /* @__PURE__ */ V("h2", {
825
+ className: L,
849
826
  children: t.historyTitle
850
827
  }),
851
- _ && /* @__PURE__ */ H("p", {
852
- className: r(V, $.subtitleText),
828
+ _ && /* @__PURE__ */ V("p", {
829
+ className: r(B, $.subtitleText),
853
830
  children: _
854
831
  }),
855
- t.historyLoadingMoreLabel && /* @__PURE__ */ H("span", {
832
+ t.historyLoadingMoreLabel && /* @__PURE__ */ V("span", {
856
833
  role: "status",
857
834
  "aria-live": "polite",
858
835
  className: "sr-only",
859
836
  children: C ? t.historyLoadingMoreLabel : ""
860
837
  }),
861
- S && x.length === 0 ? /* @__PURE__ */ H("ul", {
838
+ S && x.length === 0 ? /* @__PURE__ */ V("ul", {
862
839
  "aria-label": t.historyTitle,
863
840
  children: q(D)
864
- }) : O ? /* @__PURE__ */ U("div", {
841
+ }) : O ? /* @__PURE__ */ H("div", {
865
842
  className: "flex flex-col items-start gap-3",
866
- children: [/* @__PURE__ */ H("p", {
867
- className: r(B, $.subtitleText),
843
+ children: [/* @__PURE__ */ V("p", {
844
+ className: r(z, $.subtitleText),
868
845
  children: t.historyErrorLabel
869
- }), /* @__PURE__ */ H(m, {
846
+ }), /* @__PURE__ */ V(m, {
870
847
  label: t.historyRetryLabel,
871
- onClick: A
848
+ onClick: k
872
849
  })]
873
- }) : x.length === 0 ? /* @__PURE__ */ H("p", {
874
- className: r(B, $.subtitleText),
850
+ }) : x.length === 0 ? /* @__PURE__ */ V("p", {
851
+ className: r(z, $.subtitleText),
875
852
  children: t.historyEmptyLabel
876
- }) : /* @__PURE__ */ U("ul", {
853
+ }) : /* @__PURE__ */ H("ul", {
877
854
  "aria-label": t.historyTitle,
878
855
  children: [
879
- x.map(re),
856
+ x.map(K),
880
857
  C && q(D),
881
- /* @__PURE__ */ H("li", {
882
- ref: G,
858
+ /* @__PURE__ */ V("li", {
859
+ ref: W,
883
860
  "aria-hidden": !0,
884
861
  className: "h-px w-full"
885
862
  })
@@ -894,4 +871,4 @@ var W = /* @__PURE__ */ function(e) {
894
871
  });
895
872
  };
896
873
  //#endregion
897
- export { me as DESCRIPTION_MAX_LENGTH, K as ScheduledTaskCard, oe as ScheduledTaskCardGrid, ae as ScheduledTaskCardSkeleton, Ce as ScheduledTaskCreateForm, Ee as ScheduledTaskDetailView, Y as ScheduledTaskRepeat, Q as ScheduledTaskRunStatus, ce as ScheduledTaskSection, W as ScheduledTaskSectionKey, fe as ScheduledTasks, pe as ScheduledTasksSortKey };
874
+ export { he as DESCRIPTION_MAX_LENGTH, K as ScheduledTaskCard, se as ScheduledTaskCardGrid, oe as ScheduledTaskCardSkeleton, we as ScheduledTaskCreateForm, De as ScheduledTaskDetailView, Y as ScheduledTaskRepeat, Q as ScheduledTaskRunStatus, le as ScheduledTaskSection, W as ScheduledTaskSectionKey, pe as ScheduledTasks, me as ScheduledTasksSortKey };