@epam/ai-dial-publish-panel 1.4.0-dev.84 → 1.4.0-dev.89

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,48 +1,48 @@
1
1
  import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as w, LiveRegionElement as T, LiveRegionPoliteness as E, NeutralButton as D, Notification as O, NotificationType as k, NotificationVariant as A, PrimaryButton as te, RadioGroup as j, Search as M, Select as ne, SideDrawer as N, Skeleton as P, SkeletonVariant as F, Spinner as I, Tag as re, TagInput as ie } from "@epam/ai-dial-ui-kit";
3
- import { ConfirmationDialog as ae, DeploymentIcon as L, ResourceSummary as R, TAG_INPUT_TAG_CLASS_NAME as oe, buildCssVars as se, mergeClasses as z, useIsMobile as ce } from "@epam/ai-dial-chat-shared";
2
+ import { Badge as o, BottomSheet as s, ButtonVariant as c, Checkbox as l, ConfirmationPopupVariant as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialFileNodeType as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, ErrorText as _, FileIcon as v, FolderName as y, GhostButton as b, GhostIconButton as x, Highlight as S, Input as ee, LinkButton as C, LiveRegion as w, LiveRegionElement as te, LiveRegionPoliteness as T, NeutralButton as E, Notification as D, NotificationType as O, NotificationVariant as k, PrimaryButton as A, RadioGroup as ne, Search as j, Select as M, SideDrawer as re, Skeleton as N, SkeletonVariant as P, Spinner as ie, Tag as F, TagInput as ae } from "@epam/ai-dial-ui-kit";
3
+ import { ConfirmationDialog as I, DeploymentIcon as L, ResourceSummary as oe, TAG_INPUT_TAG_CLASS_NAME as R, buildCssVars as se, mergeClasses as z, useIsMobile as ce } from "@epam/ai-dial-chat-shared";
4
4
  import { Fragment as le, jsx as B, jsxs as V } from "react/jsx-runtime";
5
- import { IconFolder as H, IconFolderPlus as ue, IconPlus as U, IconTrashX as de } from "@tabler/icons-react";
6
- import { DialFileNodeType as fe, DialFoldersTree as pe } from "@epam/ai-dial-react-file-manager";
5
+ import { IconFolder as H, IconFolderPlus as U, IconPlus as W, IconTrashX as ue } from "@tabler/icons-react";
6
+ import { DialFileNodeType as de, DialFoldersTree as fe } from "@epam/ai-dial-react-file-manager";
7
7
  //#region src/models/publish.ts
8
- var W = /* @__PURE__ */ function(e) {
8
+ var G = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), G = /* @__PURE__ */ function(e) {
11
- return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
10
  }({}), K = /* @__PURE__ */ function(e) {
11
+ return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
+ }({}), q = /* @__PURE__ */ function(e) {
13
13
  return e.Application = "application", e.Toolset = "toolset", e.Prompt = "prompt", e.Skill = "skill", e.File = "file", e;
14
- }({}), q = (e) => e.isSubmitting ? {
15
- calloutKind: G.None,
14
+ }({}), J = (e) => e.isSubmitting ? {
15
+ calloutKind: K.None,
16
16
  isSubmitDisabled: !0,
17
17
  isSubmitLoading: !0
18
18
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
19
- calloutKind: G.SubmitError,
19
+ calloutKind: K.SubmitError,
20
20
  isSubmitDisabled: !1,
21
21
  isSubmitLoading: !1
22
22
  } : e.hasExistingPublicationInFolder ? {
23
- calloutKind: G.ReplaceWarning,
23
+ calloutKind: K.ReplaceWarning,
24
24
  isSubmitDisabled: e.allowReplace === !1,
25
25
  isSubmitLoading: !1
26
26
  } : {
27
- calloutKind: G.Info,
27
+ calloutKind: K.Info,
28
28
  isSubmitDisabled: !1,
29
29
  isSubmitLoading: !1
30
30
  } : {
31
- calloutKind: G.NoAccess,
31
+ calloutKind: K.NoAccess,
32
32
  isSubmitDisabled: !0,
33
33
  isSubmitLoading: !1
34
34
  } : {
35
- calloutKind: G.None,
35
+ calloutKind: K.None,
36
36
  isSubmitDisabled: !0,
37
37
  isSubmitLoading: !1
38
- }, J = 864e5, Y = (e, t = Date.now(), n) => {
39
- let r = Math.floor((t - e) / J);
38
+ }, pe = 864e5, Y = (e, t = Date.now(), n) => {
39
+ let r = Math.floor((t - e) / pe);
40
40
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
41
41
  month: "short",
42
42
  day: "numeric",
43
43
  year: "numeric"
44
44
  });
45
- }, me = (e, t, n) => t.length === 0 ? [...e, {
45
+ }, X = (e, t, n) => t.length === 0 ? [...e, {
46
46
  path: [n],
47
47
  name: n
48
48
  }] : e.map((e) => e.path.join("/") === t.join("/") ? {
@@ -53,46 +53,46 @@ var W = /* @__PURE__ */ function(e) {
53
53
  }]
54
54
  } : {
55
55
  ...e,
56
- children: e.children ? me(e.children, t, n) : e.children
57
- }), X = (e, t, n) => {
56
+ children: e.children ? X(e.children, t, n) : e.children
57
+ }), Z = (e, t, n) => {
58
58
  let r = [...t, n].join("/");
59
59
  return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
60
60
  ...e,
61
61
  children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
62
62
  } : {
63
63
  ...e,
64
- children: e.children ? X(e.children, t, n) : e.children
64
+ children: e.children ? Z(e.children, t, n) : e.children
65
65
  });
66
- }, he = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
66
+ }, me = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
67
67
  let [m, h] = a(o);
68
68
  t(() => {
69
69
  h(o);
70
70
  }, [o]);
71
- let [g, _] = a(), [v, y] = a(!1), [b, x] = a(!1), [S, ee] = a([]), [C, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [te, j] = a(!1);
71
+ let [g, _] = a(), [v, y] = a(!1), [b, x] = a(!1), [S, ee] = a([]), [C, w] = a(!1), [te, T] = a(!1), [E, D] = a(c), [O, k] = a(!1), [A, ne] = a(!1);
72
72
  t(() => {
73
- te || O(c);
74
- }, [c, te]);
75
- let M = e((e) => {
76
- j(!0), O(e);
73
+ A || D(c);
74
+ }, [c, A]);
75
+ let j = e((e) => {
76
+ ne(!0), D(e);
77
77
  }, []);
78
78
  t(() => {
79
79
  if (g == null) {
80
- ee([]), E(!1);
80
+ ee([]), T(!1);
81
81
  return;
82
82
  }
83
83
  if (!p) return;
84
84
  let e = !1;
85
- return w(!0), E(!1), p(g).then((t) => {
85
+ return w(!0), T(!1), p(g).then((t) => {
86
86
  e || ee(t);
87
87
  }).catch(() => {
88
- e || E(!0);
88
+ e || T(!0);
89
89
  }).finally(() => {
90
90
  e || w(!1);
91
91
  }), () => {
92
92
  e = !0;
93
93
  };
94
94
  }, [g]);
95
- let ne = r(() => {
95
+ let M = r(() => {
96
96
  if (!g) return !1;
97
97
  let e = g.join("/");
98
98
  return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
@@ -100,129 +100,129 @@ var W = /* @__PURE__ */ function(e) {
100
100
  i,
101
101
  n.version,
102
102
  g
103
- ]), N = e(async (e, t) => {
104
- h((n) => me(n, e, t));
103
+ ]), re = e(async (e, t) => {
104
+ h((n) => X(n, e, t));
105
105
  try {
106
106
  await l?.(e, t);
107
107
  } catch {
108
- h((n) => X(n, e, t)), x(!0);
108
+ h((n) => Z(n, e, t)), x(!0);
109
109
  }
110
- }, [l]), P = e(async () => {
110
+ }, [l]), N = e(async () => {
111
111
  if (!g) return !1;
112
112
  y(!0), x(!1);
113
113
  try {
114
- return await u(n, g, S, D.trim(), k), d?.(n, g), !0;
114
+ return await u(n, g, S, E.trim(), O), d?.(n, g), !0;
115
115
  } catch (e) {
116
116
  return x(!0), f?.(n, g, e), !1;
117
117
  } finally {
118
118
  y(!1);
119
119
  }
120
120
  }, [
121
- D,
121
+ E,
122
122
  n,
123
123
  u,
124
124
  f,
125
125
  d,
126
- k,
126
+ O,
127
127
  S,
128
128
  g
129
- ]), F = e(() => {
130
- h(o), _(void 0), x(!1), ee([]), E(!1), O(c), j(!1), A(!1);
129
+ ]), P = e(() => {
130
+ h(o), _(void 0), x(!1), ee([]), T(!1), D(c), ne(!1), k(!1);
131
131
  }, [c, o]);
132
132
  return {
133
133
  folderItems: m,
134
134
  selectedFolderPath: g,
135
135
  setSelectedFolderPath: _,
136
- handleCreateFolder: N,
137
- hasExistingPublicationInFolder: ne,
136
+ handleCreateFolder: re,
137
+ hasExistingPublicationInFolder: M,
138
138
  hasWriteAccess: !g || s(g),
139
139
  isSubmitting: v,
140
140
  hasSubmitError: b,
141
- handleSubmit: P,
142
- reset: F,
141
+ handleSubmit: N,
142
+ reset: P,
143
143
  rules: S,
144
144
  setRules: ee,
145
- author: D,
146
- setAuthor: M,
147
- publishCredentials: k,
148
- setPublishCredentials: A,
145
+ author: E,
146
+ setAuthor: j,
147
+ publishCredentials: O,
148
+ setPublishCredentials: k,
149
149
  isRulesLoading: C,
150
- hasRulesLoadError: T
150
+ hasRulesLoadError: te
151
151
  };
152
- }, Z = /* @__PURE__ */ function(e) {
152
+ }, Q = /* @__PURE__ */ function(e) {
153
153
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
154
- }({}), ge = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
155
- let [i, o] = a(Z.Main), [s, c] = a();
154
+ }({}), he = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
155
+ let [i, o] = a(Q.Main), [s, c] = a();
156
156
  return t(() => {
157
- e && o(Z.Main);
157
+ e && o(Q.Main);
158
158
  }, [e]), {
159
159
  view: i,
160
160
  pendingFolderPath: s,
161
161
  setPendingFolderPath: c,
162
162
  openFolderView: () => {
163
- c(n), o(Z.ChangeFolder);
163
+ c(n), o(Q.ChangeFolder);
164
164
  },
165
- backToMain: () => o(Z.Main),
165
+ backToMain: () => o(Q.Main),
166
166
  selectFolder: () => {
167
- s != null && r(s), o(Z.Main);
167
+ s != null && r(s), o(Q.Main);
168
168
  }
169
169
  };
170
- }, _e = (e, t) => {
170
+ }, ge = (e, t) => {
171
171
  let n = t.trim().toLowerCase();
172
172
  return n ? e.reduce((e, r) => {
173
- let i = r.children ? _e(r.children, t) : void 0;
173
+ let i = r.children ? ge(r.children, t) : void 0;
174
174
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
175
175
  ...r,
176
176
  children: i
177
177
  }), e;
178
178
  }, []) : e;
179
- }, ve = (e, t) => e.localeCompare(t, void 0, {
179
+ }, _e = (e, t) => e.localeCompare(t, void 0, {
180
180
  sensitivity: "base",
181
181
  numeric: !0
182
- }), ye = (e) => [...e].sort((e, t) => ve(e.name, t.name)).map((e) => e.children ? {
182
+ }), ve = (e) => [...e].sort((e, t) => _e(e.name, t.name)).map((e) => e.children ? {
183
183
  ...e,
184
- children: ye(e.children)
185
- } : e), be = (e, t, n) => {
184
+ children: ve(e.children)
185
+ } : e), ye = (e, t, n) => {
186
186
  let [r, ...i] = t;
187
187
  if (r == null) return e;
188
188
  let a = [...n, r], o = e.find((e) => e.name === r);
189
189
  return o ? i.length ? e.map((e) => e === o ? {
190
190
  ...e,
191
- children: be(e.children ?? [], i, a)
191
+ children: ye(e.children ?? [], i, a)
192
192
  } : e) : e : [...e, {
193
193
  path: a,
194
194
  name: r,
195
- children: i.length ? be([], i, a) : void 0
195
+ children: i.length ? ye([], i, a) : void 0
196
196
  }];
197
- }, xe = (e, t) => t.reduce((e, t) => t.length ? be(e, t, []) : e, e), Se = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? Se(e.children) : []]), Q = (e) => e.join("/"), Ce = (e) => e.split("/").filter(Boolean), we = (e, t) => Ce(e).at(-1) ?? t, Te = (e) => e.map((e) => {
198
- let t = Q(e.path);
197
+ }, be = (e, t) => t.reduce((e, t) => t.length ? ye(e, t, []) : e, e), xe = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? xe(e.children) : []]), $ = (e) => e.join("/"), Se = (e) => e.split("/").filter(Boolean), Ce = (e, t) => Se(e).at(-1) ?? t, we = (e) => e.map((e) => {
198
+ let t = $(e.path);
199
199
  return {
200
200
  path: t,
201
201
  name: e.name,
202
202
  folderId: t,
203
203
  nodeType: p.FOLDER,
204
- items: e.children ? Te(e.children) : void 0
204
+ items: e.children ? we(e.children) : void 0
205
205
  };
206
- }), Ee = /[/\\:;,={}&"]/, De = (e, t, n, r) => {
206
+ }), Te = /[/\\:;,={}&"]/, Ee = (e, t, n, r) => {
207
207
  let i = e.trim();
208
- return i ? i.includes("..") || Ee.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
209
- }, Oe = (e, t) => {
208
+ return i ? i.includes("..") || Te.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
209
+ }, De = (e, t) => {
210
210
  let n = new Set(t.map((e) => e.toLowerCase()));
211
211
  if (!n.has(e.toLowerCase())) return e;
212
212
  let r = 2;
213
213
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
214
214
  return `${e} ${r}`;
215
- }, ke = (e, t) => {
215
+ }, Oe = (e, t) => {
216
216
  if (t.length === 0) return e.map((e) => e.name);
217
- let n = Q(t), r = (e) => {
217
+ let n = $(t), r = (e) => {
218
218
  for (let t of e) {
219
- if (Q(t.path) === n) return t;
219
+ if ($(t.path) === n) return t;
220
220
  let e = t.children ? r(t.children) : void 0;
221
221
  if (e) return e;
222
222
  }
223
223
  };
224
224
  return (r(e)?.children ?? []).map((e) => e.name);
225
- }, $ = {
225
+ }, ke = {
226
226
  sheet: "_sheet_1jbwn_3",
227
227
  inline: "_inline_1jbwn_7",
228
228
  selectField: "_selectField_1jbwn_21",
@@ -246,116 +246,116 @@ var W = /* @__PURE__ */ function(e) {
246
246
  "--pare-select-border-focus": f.colors?.selectBorderFocus
247
247
  }),
248
248
  ...f.cssVars
249
- }, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: w = "Add a target", targetsHintLabel: T = "Press Enter or comma to add a target.", patternLabel: E = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: A = "This field is required.", targetsRequiredError: te = "Add at least one target.", saveLabel: j = "Save", cancelLabel: M = "Cancel", dialogAriaLabel: N = "Add access rule" } = d, P = n(), F = n(), I = n(), re = n(), ae = i(null);
249
+ }, { sourceLabel: h = "Source", sourcePlaceholder: g = "Select...", functionLabel: _ = "Function", equalOptionLabel: v = "Equal", containOptionLabel: y = "Contain", regexOptionLabel: x = "Regex", targetsLabel: C = "Targets", targetsPlaceholder: w = "Add a target", targetsHintLabel: te = "Press Enter or comma to add a target.", patternLabel: T = "Pattern", patternPlaceholder: D = "Enter a regular expression", invalidRegexError: O = "Enter a valid regular expression.", requiredFieldError: k = "This field is required.", targetsRequiredError: A = "Add at least one target.", saveLabel: ne = "Save", cancelLabel: j = "Cancel", dialogAriaLabel: re = "Add access rule" } = d, N = n(), P = n(), ie = n(), F = n(), I = i(null);
250
250
  t(() => {
251
- p || ae.current?.focus();
251
+ p || I.current?.focus();
252
252
  }, [p]);
253
- let [L, R] = a(), [H, ue] = a(), [U, de] = a([]), [fe, pe] = a(""), [G, K] = a(!1), [q, J] = a(""), [Y, me] = a(!1), [X, he] = a(!1), Z = z($.selectField, G && $.selectFieldOpen), ge = z($.selectField, Y && $.selectFieldOpen), _e = r(() => e.map((e) => ({
253
+ let [L, oe] = a(), [H, U] = a(), [W, ue] = a([]), [de, fe] = a(""), [K, q] = a(!1), [J, pe] = a(""), [Y, X] = a(!1), [Z, me] = a(!1), Q = z(ke.selectField, K && ke.selectFieldOpen), he = z(ke.selectField, Y && ke.selectFieldOpen), ge = r(() => e.map((e) => ({
254
254
  value: e,
255
255
  label: e,
256
- labelNode: q.trim() ? /* @__PURE__ */ B(S, {
256
+ labelNode: J.trim() ? /* @__PURE__ */ B(S, {
257
257
  text: e,
258
- query: q,
258
+ query: J,
259
259
  maxLines: 1
260
260
  }) : void 0
261
- })), [e, q]), ve = r(() => [
261
+ })), [e, J]), _e = r(() => [
262
262
  {
263
- value: W.Equal,
263
+ value: G.Equal,
264
264
  label: v
265
265
  },
266
266
  {
267
- value: W.Contain,
267
+ value: G.Contain,
268
268
  label: y
269
269
  },
270
270
  {
271
- value: W.Regex,
271
+ value: G.Regex,
272
272
  label: x
273
273
  }
274
274
  ], [
275
275
  v,
276
276
  y,
277
277
  x
278
- ]), ye = H === W.Regex, be = Ne(fe), xe = L != null && H != null && (ye ? be : U.length > 0), Se = (e) => {
279
- R(Array.isArray(e) ? e[0] : e), K(!1);
280
- }, Q = (e) => {
278
+ ]), ve = H === G.Regex, ye = Ne(de), be = L != null && H != null && (ve ? ye : W.length > 0), xe = (e) => {
279
+ oe(Array.isArray(e) ? e[0] : e), q(!1);
280
+ }, $ = (e) => {
281
281
  let t = Array.isArray(e) ? e[0] : e;
282
- H === W.Regex != (t === W.Regex) && (de([]), pe("")), ue(t), me(!1);
283
- }, Ce = (e) => {
282
+ H === G.Regex != (t === G.Regex) && (ue([]), fe("")), U(t), X(!1);
283
+ }, Se = (e) => {
284
284
  let t = [];
285
285
  for (let n of e) {
286
286
  let e = n.trim();
287
287
  if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= u)) break;
288
288
  }
289
- de(t);
290
- }, we = () => {
291
- !xe || L == null || H == null ? he(!0) : o({
289
+ ue(t);
290
+ }, Ce = () => {
291
+ !be || L == null || H == null ? me(!0) : o({
292
292
  source: L,
293
293
  function: H,
294
- targets: ye ? [fe.trim()] : U
294
+ targets: ve ? [de.trim()] : W
295
295
  });
296
- }, Te = (fe.length > 0 || X) && !be, Ee = (e) => {
296
+ }, we = (de.length > 0 || Z) && !ye, Te = (e) => {
297
297
  e.key === "Escape" && (e.stopPropagation(), c());
298
- }, De = /* @__PURE__ */ V(le, { children: [
299
- /* @__PURE__ */ B(ne, {
300
- id: F,
298
+ }, Ee = /* @__PURE__ */ V(le, { children: [
299
+ /* @__PURE__ */ B(M, {
300
+ id: P,
301
301
  labelProps: { label: h },
302
- options: _e,
302
+ options: ge,
303
303
  value: L,
304
- onChange: Se,
304
+ onChange: xe,
305
305
  placeholder: g,
306
306
  searchable: e.length > Me,
307
307
  searchPlaceholder: g,
308
- onSearchQueryChange: J,
308
+ onSearchQueryChange: pe,
309
309
  disabled: l,
310
- open: G,
311
- onOpenChange: K,
312
- fieldClassName: Z,
313
- invalid: X && L == null,
314
- error: X && L == null ? A : void 0
310
+ open: K,
311
+ onOpenChange: q,
312
+ fieldClassName: Q,
313
+ invalid: Z && L == null,
314
+ error: Z && L == null ? k : void 0
315
315
  }),
316
- /* @__PURE__ */ B(ne, {
316
+ /* @__PURE__ */ B(M, {
317
317
  labelProps: { label: _ },
318
- id: I,
319
- options: ve,
318
+ id: ie,
319
+ options: _e,
320
320
  value: H,
321
- onChange: Q,
321
+ onChange: $,
322
322
  placeholder: _,
323
323
  disabled: l,
324
324
  open: Y,
325
- onOpenChange: me,
326
- fieldClassName: ge,
327
- invalid: X && H == null,
328
- error: X && H == null ? A : void 0
325
+ onOpenChange: X,
326
+ fieldClassName: he,
327
+ invalid: Z && H == null,
328
+ error: Z && H == null ? k : void 0
329
329
  }),
330
- ye ? /* @__PURE__ */ B(ee, {
331
- id: P,
332
- labelProps: { label: E },
333
- placeholder: O,
334
- value: fe,
335
- onChange: (e) => pe(e ?? ""),
336
- error: Te ? k : void 0,
330
+ ve ? /* @__PURE__ */ B(ee, {
331
+ id: N,
332
+ labelProps: { label: T },
333
+ placeholder: D,
334
+ value: de,
335
+ onChange: (e) => fe(e ?? ""),
336
+ error: we ? O : void 0,
337
337
  disabled: l
338
- }) : /* @__PURE__ */ B(ie, {
339
- id: re,
338
+ }) : /* @__PURE__ */ B(ae, {
339
+ id: F,
340
340
  labelProps: { label: C },
341
341
  placeholder: w,
342
- caption: X && U.length === 0 ? void 0 : T,
343
- error: X && U.length === 0 ? te : void 0,
344
- invalid: X && U.length === 0,
345
- value: U,
346
- onChange: Ce,
342
+ caption: Z && W.length === 0 ? void 0 : te,
343
+ error: Z && W.length === 0 ? A : void 0,
344
+ invalid: Z && W.length === 0,
345
+ value: W,
346
+ onChange: Se,
347
347
  disabled: l,
348
- tagClassName: oe
348
+ tagClassName: R
349
349
  }),
350
350
  /* @__PURE__ */ V("div", {
351
351
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
352
352
  children: [/* @__PURE__ */ B(b, {
353
- label: M,
353
+ label: j,
354
354
  onClick: c,
355
355
  disabled: l
356
- }), /* @__PURE__ */ B(D, {
357
- label: j,
358
- onClick: we,
356
+ }), /* @__PURE__ */ B(E, {
357
+ label: ne,
358
+ onClick: Ce,
359
359
  disabled: l
360
360
  })]
361
361
  })
@@ -363,20 +363,20 @@ var W = /* @__PURE__ */ function(e) {
363
363
  return p ? /* @__PURE__ */ B(s, {
364
364
  open: !0,
365
365
  onClose: c,
366
- ariaLabel: N,
366
+ ariaLabel: re,
367
367
  style: m,
368
- className: $.sheet,
368
+ className: ke.sheet,
369
369
  bodyClassName: "flex flex-col gap-3 p-4",
370
- children: De
370
+ children: Ee
371
371
  }) : /* @__PURE__ */ B("div", {
372
- ref: ae,
372
+ ref: I,
373
373
  role: "group",
374
- "aria-label": N,
374
+ "aria-label": re,
375
375
  tabIndex: -1,
376
- onKeyDown: Ee,
376
+ onKeyDown: Te,
377
377
  style: m,
378
- className: z("flex flex-none flex-col gap-3 rounded-lg p-3", $.inline),
379
- children: De
378
+ className: z("flex flex-none flex-col gap-3 rounded-lg p-3", ke.inline),
379
+ children: Ee
380
380
  });
381
381
  }, Fe = {
382
382
  ruleRow: "_ruleRow_nx0en_1",
@@ -384,8 +384,8 @@ var W = /* @__PURE__ */ function(e) {
384
384
  hint: "_hint_nx0en_9",
385
385
  loading: "_loading_nx0en_13",
386
386
  ruleText: "_ruleText_nx0en_17"
387
- }, Ie = 20, Le = (e, t) => e === W.Equal ? t.equal : e === W.Contain ? t.contain : t.regex, Re = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: s, disabled: l = !1, isLoading: u = !1, hasLoadError: p = !1, maxRules: m = Ie, maxTargetsPerRule: h, labels: g = {}, headingClassName: _ = "dial-body-semi-text", hintClassName: v = "dial-small-text", loadingClassName: y = "dial-small-text", ruleTextClassName: S = "dial-small-text", ruleSourceClassName: ee = "dial-small-semi-text", styles: C = {} }) => {
388
- let E = {
387
+ }, Ie = 20, Le = (e, t) => e === G.Equal ? t.equal : e === G.Contain ? t.contain : t.regex, Re = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: s, disabled: l = !1, isLoading: u = !1, hasLoadError: p = !1, maxRules: m = Ie, maxTargetsPerRule: h, labels: g = {}, headingClassName: _ = "dial-body-semi-text", hintClassName: v = "dial-small-text", loadingClassName: y = "dial-small-text", ruleTextClassName: S = "dial-small-text", ruleSourceClassName: ee = "dial-small-semi-text", styles: C = {} }) => {
388
+ let T = {
389
389
  ...se({
390
390
  "--par-rule-bg": C.colors?.ruleBackground,
391
391
  "--par-heading-text": C.colors?.headingText,
@@ -394,84 +394,84 @@ var W = /* @__PURE__ */ function(e) {
394
394
  "--par-rule-text": C.colors?.ruleText
395
395
  }),
396
396
  ...C.cssVars
397
- }, { heading: D = "Allow access if all match", folderScopeHint: te = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: j = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: M = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: ne = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: N = "Add rule", clearAllLabel: P = "Clear all", orSeparatorLabel: F = "Or", removeRuleAriaLabelTemplate: re = "Remove rule for {source}: {targets}", equalFunctionLabel: ie = "Equal", containFunctionLabel: ae = "Contain", regexFunctionLabel: L = "Regex", loadingLabel: R = "Loading existing rules…", loadErrorLabel: oe = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: ce = "Rule added.", ruleRemovedAnnouncement: le = "Rule removed.", rulesClearedAnnouncement: H = "All rules cleared.", rulesLoadedAnnouncement: ue = "Existing rules loaded for the selected folder.", editorLabels: fe } = g, pe = n(), [W, G] = a(!1), [K, q] = a(""), J = i(null), Y = i(u);
397
+ }, { heading: E = "Allow access if all match", folderScopeHint: A = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: ne = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: j = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: M = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: re = "Add rule", clearAllLabel: N = "Clear all", orSeparatorLabel: P = "Or", removeRuleAriaLabelTemplate: F = "Remove rule for {source}: {targets}", equalFunctionLabel: ae = "Equal", containFunctionLabel: I = "Contain", regexFunctionLabel: L = "Regex", loadingLabel: oe = "Loading existing rules…", loadErrorLabel: R = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: ce = "Rule added.", ruleRemovedAnnouncement: le = "Rule removed.", rulesClearedAnnouncement: H = "All rules cleared.", rulesLoadedAnnouncement: U = "Existing rules loaded for the selected folder.", editorLabels: de } = g, fe = n(), [G, K] = a(!1), [q, J] = a(""), pe = i(null), Y = i(u);
398
398
  t(() => {
399
- Y.current && !u && e.length > 0 && q(ue), Y.current = u;
399
+ Y.current && !u && e.length > 0 && J(U), Y.current = u;
400
400
  }, [
401
401
  u,
402
402
  e,
403
- ue
403
+ U
404
404
  ]);
405
- let me = () => {
406
- J.current = document.activeElement, G(!0);
407
- }, X = () => {
408
- G(!1), J.current?.focus?.();
409
- }, he = (t) => {
410
- r([...e, t]), q(ce), X();
411
- }, Z = (t) => {
412
- r(e.filter((e, n) => n !== t)), q(le);
413
- }, ge = () => {
414
- r([]), q(H);
415
- }, _e = {
416
- equal: ie,
417
- contain: ae,
405
+ let X = () => {
406
+ pe.current = document.activeElement, K(!0);
407
+ }, Z = () => {
408
+ K(!1), pe.current?.focus?.();
409
+ }, me = (t) => {
410
+ r([...e, t]), J(ce), Z();
411
+ }, Q = (t) => {
412
+ r(e.filter((e, n) => n !== t)), J(le);
413
+ }, he = () => {
414
+ r([]), J(H);
415
+ }, ge = {
416
+ equal: ae,
417
+ contain: I,
418
418
  regex: L
419
- }, ve = e.length >= m, ye = l || ve, be = s != null && s !== "";
419
+ }, _e = e.length >= m, ve = l || _e, ye = s != null && s !== "";
420
420
  return /* @__PURE__ */ V("div", {
421
421
  role: "group",
422
- "aria-labelledby": pe,
423
- style: E,
422
+ "aria-labelledby": fe,
423
+ style: T,
424
424
  className: z(l && "pointer-events-none opacity-60"),
425
425
  children: [
426
426
  /* @__PURE__ */ B(w, {
427
427
  visuallyHidden: !0,
428
- as: T.Span,
429
- children: K
428
+ as: te.Span,
429
+ children: q
430
430
  }),
431
431
  /* @__PURE__ */ V("div", {
432
432
  className: "mb-1 flex items-center justify-between gap-2",
433
433
  children: [/* @__PURE__ */ B("div", {
434
- id: pe,
434
+ id: fe,
435
435
  className: z(_, Fe.heading),
436
- children: D
436
+ children: E
437
437
  }), e.length > 0 && /* @__PURE__ */ B(b, {
438
438
  variant: c.Primary,
439
- label: P,
440
- onClick: ge,
439
+ label: N,
440
+ onClick: he,
441
441
  disabled: l
442
442
  })]
443
443
  }),
444
444
  /* @__PURE__ */ B("p", {
445
445
  className: z("mb-2", v, Fe.hint),
446
- children: be ? te.replace("{folder}", s) : j
446
+ children: ye ? A.replace("{folder}", s) : ne
447
447
  }),
448
- e.length > 0 && !be && /* @__PURE__ */ B("div", {
448
+ e.length > 0 && !ye && /* @__PURE__ */ B("div", {
449
449
  className: "mb-2",
450
- children: /* @__PURE__ */ B(O, {
451
- type: k.SectionMessage,
452
- variant: A.Warning,
453
- message: M
450
+ children: /* @__PURE__ */ B(D, {
451
+ type: O.SectionMessage,
452
+ variant: k.Warning,
453
+ message: j
454
454
  })
455
455
  }),
456
456
  u && /* @__PURE__ */ V("div", {
457
457
  className: z("mb-2 flex items-center gap-2", y, Fe.loading),
458
- children: [/* @__PURE__ */ B(I, {
458
+ children: [/* @__PURE__ */ B(ie, {
459
459
  size: 16,
460
- ariaLabel: R
461
- }), /* @__PURE__ */ B("span", { children: R })]
460
+ ariaLabel: oe
461
+ }), /* @__PURE__ */ B("span", { children: oe })]
462
462
  }),
463
463
  p && /* @__PURE__ */ B("div", {
464
464
  className: "mb-2",
465
- children: /* @__PURE__ */ B(O, {
466
- type: k.SectionMessage,
467
- variant: A.Warning,
468
- message: oe
465
+ children: /* @__PURE__ */ B(D, {
466
+ type: O.SectionMessage,
467
+ variant: k.Warning,
468
+ message: R
469
469
  })
470
470
  }),
471
471
  e.length > 0 && /* @__PURE__ */ B("ul", {
472
472
  className: "mb-3 flex flex-col gap-2",
473
473
  children: e.map((e, t) => {
474
- let n = e.targets.join(` ${F} `), r = re.replace("{source}", e.source).replace("{targets}", n);
474
+ let n = e.targets.join(` ${P} `), r = F.replace("{source}", e.source).replace("{targets}", n);
475
475
  return /* @__PURE__ */ V("li", {
476
476
  className: z("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Fe.ruleRow),
477
477
  children: [/* @__PURE__ */ V("span", {
@@ -482,48 +482,48 @@ var W = /* @__PURE__ */ function(e) {
482
482
  children: e.source
483
483
  }),
484
484
  " ",
485
- Le(e.function, _e),
485
+ Le(e.function, ge),
486
486
  ": ",
487
487
  n
488
488
  ]
489
489
  }), /* @__PURE__ */ B(x, {
490
- icon: /* @__PURE__ */ B(de, {
490
+ icon: /* @__PURE__ */ B(ue, {
491
491
  size: d.SM,
492
492
  "aria-hidden": !0,
493
493
  stroke: f
494
494
  }),
495
495
  "aria-label": r,
496
- onClick: () => Z(t),
496
+ onClick: () => Q(t),
497
497
  disabled: l
498
498
  })]
499
499
  }, t);
500
500
  })
501
501
  }),
502
- W && /* @__PURE__ */ B(Pe, {
502
+ G && /* @__PURE__ */ B(Pe, {
503
503
  sourceOptions: o,
504
- onSave: he,
505
- onCancel: X,
504
+ onSave: me,
505
+ onCancel: Z,
506
506
  disabled: l,
507
507
  maxTargets: h,
508
- labels: fe,
508
+ labels: de,
509
509
  styles: C.editor
510
510
  }),
511
511
  /* @__PURE__ */ B("div", {
512
512
  className: "flex flex-wrap items-center gap-2",
513
513
  children: /* @__PURE__ */ B(b, {
514
- label: N,
515
- iconBefore: /* @__PURE__ */ B(U, {
514
+ label: re,
515
+ iconBefore: /* @__PURE__ */ B(W, {
516
516
  size: d.SM,
517
517
  "aria-hidden": !0,
518
518
  stroke: f
519
519
  }),
520
- onClick: me,
521
- disabled: ye
520
+ onClick: X,
521
+ disabled: ve
522
522
  })
523
523
  }),
524
- ve && /* @__PURE__ */ B("p", {
524
+ _e && /* @__PURE__ */ B("p", {
525
525
  className: z("mt-2", v, Fe.hint),
526
- children: ne.replace("{max}", String(m))
526
+ children: M.replace("{max}", String(m))
527
527
  })
528
528
  ]
529
529
  });
@@ -581,11 +581,11 @@ var W = /* @__PURE__ */ function(e) {
581
581
  }),
582
582
  /* @__PURE__ */ B(w, {
583
583
  visuallyHidden: !0,
584
- politeness: E.Polite,
584
+ politeness: T.Polite,
585
585
  children: v && r && !i ? x.loadingLabel : ""
586
586
  }),
587
587
  /* @__PURE__ */ B(w, {
588
- politeness: E.Assertive,
588
+ politeness: T.Assertive,
589
589
  children: i && /* @__PURE__ */ V("div", {
590
590
  className: "flex flex-wrap items-center gap-2",
591
591
  children: [/* @__PURE__ */ B(_, { text: x.errorLabel }), s && /* @__PURE__ */ B(C, {
@@ -613,8 +613,8 @@ var W = /* @__PURE__ */ function(e) {
613
613
  n && /* @__PURE__ */ B("span", {
614
614
  "aria-hidden": !0,
615
615
  className: "shrink-0",
616
- children: /* @__PURE__ */ B(P, {
617
- variant: F.Text,
616
+ children: /* @__PURE__ */ B(N, {
617
+ variant: P.Text,
618
618
  width: "84px",
619
619
  height: "24px",
620
620
  color: Be.skeletonColor
@@ -649,15 +649,15 @@ var W = /* @__PURE__ */ function(e) {
649
649
  name: "_name_k0m34_5",
650
650
  meta: "_meta_k0m34_9"
651
651
  }, Ke = {
652
- [K.Application]: "Application",
653
- [K.Toolset]: "Toolset",
654
- [K.Prompt]: "Prompt",
655
- [K.Skill]: "Skill",
656
- [K.File]: "File"
652
+ [q.Application]: "Application",
653
+ [q.Toolset]: "Toolset",
654
+ [q.Prompt]: "Prompt",
655
+ [q.Skill]: "Skill",
656
+ [q.File]: "File"
657
657
  }, qe = 32, Je = 24, Ye = (e) => /* @__PURE__ */ B("span", {
658
658
  "aria-hidden": "true",
659
659
  className: "shrink-0",
660
- children: e.type === K.File ? /* @__PURE__ */ B("span", {
660
+ children: e.type === q.File ? /* @__PURE__ */ B("span", {
661
661
  className: "flex items-center justify-center",
662
662
  style: {
663
663
  width: qe,
@@ -686,7 +686,7 @@ var W = /* @__PURE__ */ function(e) {
686
686
  }, m = e.length;
687
687
  return /* @__PURE__ */ V(le, { children: [/* @__PURE__ */ B(w, {
688
688
  visuallyHidden: !0,
689
- as: T.Span,
689
+ as: te.Span,
690
690
  children: m > 0 ? d(m) : ""
691
691
  }), m > 0 && /* @__PURE__ */ V("section", {
692
692
  "aria-labelledby": s,
@@ -698,9 +698,9 @@ var W = /* @__PURE__ */ function(e) {
698
698
  className: z(r, Ge.heading),
699
699
  children: c
700
700
  }),
701
- /* @__PURE__ */ B(O, {
702
- type: k.SectionMessage,
703
- variant: A.Warning,
701
+ /* @__PURE__ */ B(D, {
702
+ type: O.SectionMessage,
703
+ variant: k.Warning,
704
704
  message: l,
705
705
  role: "note"
706
706
  }),
@@ -751,7 +751,7 @@ var W = /* @__PURE__ */ function(e) {
751
751
  if (n || r || e.length === 0) {
752
752
  let e = s;
753
753
  return n ? e = c : r && (e = l), /* @__PURE__ */ B(w, {
754
- as: T.P,
754
+ as: te.P,
755
755
  style: m,
756
756
  className: h,
757
757
  children: e
@@ -773,11 +773,11 @@ var W = /* @__PURE__ */ function(e) {
773
773
  e.version
774
774
  ]
775
775
  }),
776
- e.version === t && /* @__PURE__ */ B(re, {
776
+ e.version === t && /* @__PURE__ */ B(F, {
777
777
  label: a,
778
778
  className: z("shrink-0 whitespace-nowrap", et.currentBadge)
779
779
  }),
780
- e.publishCredentials === !0 && /* @__PURE__ */ B(re, {
780
+ e.publishCredentials === !0 && /* @__PURE__ */ B(F, {
781
781
  label: o,
782
782
  className: z("shrink-0 whitespace-nowrap", et.sharedCredentialsBadge)
783
783
  })
@@ -803,7 +803,7 @@ var W = /* @__PURE__ */ function(e) {
803
803
  return {
804
804
  path: [t],
805
805
  name: e.label,
806
- children: st(ye(e.items), t)
806
+ children: st(ve(e.items), t)
807
807
  };
808
808
  }), lt = (e) => e.map((e) => rt(e.key)), ut = (e, t) => {
809
809
  let n = /* @__PURE__ */ new Set();
@@ -816,152 +816,168 @@ var W = /* @__PURE__ */ function(e) {
816
816
  let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
817
817
  for (let e of t) {
818
818
  let [t, ...r] = e.split("/"), i = it(t);
819
- i != null && r.length !== 0 && n.get(i)?.add(Q(r));
819
+ i != null && r.length !== 0 && n.get(i)?.add($(r));
820
820
  }
821
821
  return n;
822
822
  }, ft = {
823
823
  divider: "_divider_1gs31_1",
824
824
  tree: "_tree_1gs31_17"
825
- }, pt = "data-cancel-creating-folder", mt = "", ht = [], gt = ({ items: e = ht, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, disabled: h = !1, createFolderLabel: g = "Create new folder", cancelCreatingFolderLabel: _ = "Cancel", addSiblingFolderLabel: v = "Add sibling", addChildFolderLabel: y = "Add child", newFolderDefaultName: x = "New folder", noResultsLabel: S = "No folders match \"{query}\".", emptyFolderNameError: ee = "Folder name cannot be empty.", invalidFolderNameError: C = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.", sameAsParentFolderNameError: T = "A folder cannot have the same name as its parent folder.", rootLabel: E = "Organization", expandedPaths: D, onExpandedPathsChange: O, loadingPaths: k, styles: A = {} }) => {
826
- let te = {
825
+ }, pt = "data-cancel-creating-folder", mt = "", ht = [], gt = ({ items: e = ht, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: u, onCreateDestinationFolder: p, searchQuery: m, getDisabledReason: h, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: y = "Add sibling", addChildFolderLabel: x = "Add child", newFolderDefaultName: S = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: C = "Folder name cannot be empty.", invalidFolderNameError: w = "Folder name contains invalid characters.", duplicateFolderNameError: te = "A folder with this name already exists.", sameAsParentFolderNameError: T = "A folder cannot have the same name as its parent folder.", rootLabel: E = "Organization", expandedPaths: D, onExpandedPathsChange: O, loadingPaths: k, styles: A = {} }) => {
826
+ let ne = {
827
827
  ...se({ "--pft-divider": A.colors?.divider }),
828
828
  ...A.cssVars
829
- }, j = c != null, M = r(() => c ? ct(c) : e, [c, e]), ne = i(M);
829
+ }, j = c != null, M = r(() => c ? ct(c) : e, [c, e]), re = i(M);
830
830
  t(() => {
831
- ne.current = M;
831
+ re.current = M;
832
832
  }, [M]);
833
833
  let N = r(() => c ? lt(c) : [mt], [c]), P = n;
834
834
  j && (P = l ? at(l) : void 0);
835
- let F = (e) => {
835
+ let ie = (e) => {
836
836
  j ? u?.(e ? ot(e) : void 0) : o?.(e);
837
- }, [I, re] = a(() => new Set(P?.map((e, t) => Q(P.slice(0, t + 1))) ?? [])), ie = r(() => c ? /* @__PURE__ */ new Set([...I, ...ut(c, (e) => e.expandedPaths)]) : void 0, [c, I]) ?? D ?? I, ae = r(() => c ? ut(c, (e) => e.loadingPaths) : k, [c, k]), L = (e) => {
837
+ }, [F, ae] = a(() => new Set(P?.map((e, t) => $(P.slice(0, t + 1))) ?? [])), I = r(() => c ? /* @__PURE__ */ new Set([...F, ...ut(c, (e) => e.expandedPaths)]) : void 0, [c, F]) ?? D ?? F, L = r(() => c ? ut(c, (e) => e.loadingPaths) : k, [c, k]), oe = (e) => {
838
838
  let t = new Set(e);
839
839
  for (let e of N) t.delete(e);
840
840
  if (c) {
841
- re(t);
841
+ ae(t);
842
842
  let e = dt(c, t);
843
843
  for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
844
- } else O ? O(t) : re(t);
845
- }, [R, oe] = a(null), [ce, le] = a(x), H = i(null), de = i(!1);
844
+ } else O ? O(t) : ae(t);
845
+ }, [R, ce] = a(null), [le, H] = a(S), ue = i(null), G = i(!1);
846
846
  t(() => {
847
847
  let e = (e) => {
848
- e.target instanceof Element && e.target.closest(`[${pt}]`) && (de.current = !0);
848
+ e.target instanceof Element && e.target.closest(`[${pt}]`) && (G.current = !0);
849
849
  };
850
850
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
851
851
  }, []);
852
- let W = m.trim(), G = R != null, K = r(() => _e(M, m), [M, m]), q = W.length > 0 && K.length === 0, J = !G && W.length > 0, Y = r(() => {
853
- let e = J ? K : M;
854
- return j ? e : ye(e);
852
+ let K = m.trim(), q = R != null, J = r(() => ge(M, m), [M, m]), pe = K.length > 0 && J.length === 0, Y = !q && K.length > 0, X = r(() => {
853
+ let e = Y ? J : M;
854
+ return j ? e : ve(e);
855
855
  }, [
856
+ Y,
856
857
  J,
857
- K,
858
858
  M,
859
859
  j
860
- ]), me = r(() => /* @__PURE__ */ new Set([...N, ...Se(Y)]), [N, Y]), X = r(() => /* @__PURE__ */ new Set([...N, ...J ? me : ie]), [
860
+ ]), Z = r(() => /* @__PURE__ */ new Set([...N, ...xe(X)]), [N, X]), me = r(() => /* @__PURE__ */ new Set([...N, ...Y ? Z : I]), [
861
861
  N,
862
- J,
863
- me,
864
- ie
865
- ]), he = r(() => Te(Y), [Y]), Z = r(() => J && he.length === 0 ? [] : j ? he : [{
862
+ Y,
863
+ Z,
864
+ I
865
+ ]), Q = r(() => we(X), [X]), he = r(() => Y && Q.length === 0 ? [] : j ? Q : [{
866
866
  path: mt,
867
867
  name: E,
868
868
  folderId: mt,
869
- nodeType: fe.FOLDER,
870
- items: he
869
+ nodeType: de.FOLDER,
870
+ items: Q
871
871
  }], [
872
- he,
872
+ Q,
873
873
  E,
874
- J,
874
+ Y,
875
875
  j
876
- ]), ge = R ? Q(R) : null, ve = {
877
- empty: ee,
878
- invalid: C,
879
- duplicate: w,
876
+ ]), _e = R ? $(R) : null, ye = {
877
+ empty: C,
878
+ invalid: w,
879
+ duplicate: te,
880
880
  sameAsParent: T
881
- }, be = (e) => N.includes(Q(e)) ? void 0 : e.at(-1), xe = (e) => {
881
+ }, be = (e) => N.includes($(e)) ? void 0 : e.at(-1), Ce = (e) => c ? ot(e) : {
882
+ rootKey: mt,
883
+ path: e
884
+ }, Te = (e) => {
885
+ if (!h) return;
886
+ let t = Ce(Se(e.path));
887
+ return t && h(t) || void 0;
888
+ }, ke = (e) => {
889
+ let t = Ce(e);
890
+ return t != null && !!h?.(t);
891
+ }, Ae = (e) => {
892
+ if (ke(e)) return !1;
882
893
  if (!c) return !0;
883
894
  let t = ot(e), n = c.find((e) => e.key === t?.rootKey);
884
895
  return n != null && n.canCreateFolders !== !1;
885
- }, we = (() => {
886
- if (!c) return P ?? [];
887
- if (P && xe(P)) return P;
896
+ }, je = (() => {
897
+ if (!c) {
898
+ let e = P ?? [];
899
+ return Ae(e) ? e : void 0;
900
+ }
901
+ if (P && Ae(P)) return P;
888
902
  let e = c.find((e) => e.canCreateFolders !== !1);
889
903
  return e ? at({
890
904
  rootKey: e.key,
891
905
  path: []
892
906
  }) : void 0;
893
- })(), Ee = (e) => {
894
- let t = q && De(W, [], ve) == null, n = be(e);
895
- return Oe(t ? W : x, [...ke(M, e), ...n ? [n] : []]);
896
- }, [$, Ae] = a(null);
897
- $ != null && !ae?.has(Q($)) && (Ae(null), oe($), le(Ee($)));
898
- let je = (e) => {
899
- oe(null), Ae(e), H.current = null, de.current = !1;
900
- let t = Q(e);
901
- t && L(new Set(ie).add(t));
902
- }, Me = () => {
903
- we && je(we);
904
- }, Ne = (e) => {
905
- let t = Ce(e.path);
906
- if (!xe(t)) return [];
907
+ })(), Me = (e) => {
908
+ let t = pe && Ee(K, [], ye) == null, n = be(e);
909
+ return De(t ? K : S, [...Oe(M, e), ...n ? [n] : []]);
910
+ }, [Ne, Pe] = a(null);
911
+ Ne != null && !L?.has($(Ne)) && (Pe(null), ce(Ne), H(Me(Ne)));
912
+ let Fe = (e) => {
913
+ ce(null), Pe(e), ue.current = null, G.current = !1;
914
+ let t = $(e);
915
+ t && oe(new Set(I).add(t));
916
+ }, Ie = () => {
917
+ je && Fe(je);
918
+ }, Le = (e) => {
919
+ let t = Se(e.path);
920
+ if (!Ae(t)) return [];
907
921
  let n = [{
908
922
  key: "add-child",
909
- label: y,
910
- icon: /* @__PURE__ */ B(ue, {
923
+ label: x,
924
+ icon: /* @__PURE__ */ B(U, {
911
925
  size: d.SM,
912
926
  "aria-hidden": !0,
913
927
  stroke: f
914
928
  }),
915
- onClick: () => je(t)
929
+ onClick: () => Fe(t)
916
930
  }];
917
931
  return N.includes(e.path) || n.push({
918
932
  key: "add-sibling",
919
- label: v,
920
- icon: /* @__PURE__ */ B(U, {
933
+ label: y,
934
+ icon: /* @__PURE__ */ B(W, {
921
935
  size: d.SM,
922
936
  "aria-hidden": !0,
923
937
  stroke: f
924
938
  }),
925
- onClick: () => je(t.slice(0, -1))
939
+ onClick: () => Fe(t.slice(0, -1))
926
940
  }), n;
927
- }, Pe = (e) => {
941
+ }, Re = (e) => {
928
942
  if (!R) return null;
929
- let t = De(e, ke(ne.current, R), ve, be(R));
930
- return H.current = t, t;
931
- }, Fe = (e) => {
932
- if (!R || de.current) return;
933
- let t = e.trim(), n = H.current;
934
- if (!(Pe(e) ?? n)) {
943
+ let t = Ee(e, Oe(re.current, R), ye, be(R));
944
+ return ue.current = t, t;
945
+ }, ze = (e) => {
946
+ if (!R || G.current) return;
947
+ let t = e.trim(), n = ue.current;
948
+ if (!(Re(e) ?? n)) {
935
949
  let e = c ? ot(R) : void 0;
936
- e ? p?.(e.rootKey, e.path, t) : s?.(R, t), F([...R, t]);
950
+ e ? p?.(e.rootKey, e.path, t) : s?.(R, t), ie([...R, t]);
937
951
  }
938
- oe(null);
939
- }, Ie = () => oe(null);
952
+ ce(null);
953
+ }, Be = () => ce(null);
940
954
  return /* @__PURE__ */ V("div", {
941
- style: te,
942
- className: z(h && "pointer-events-none opacity-60", A.className),
955
+ style: ne,
956
+ className: z(g && "pointer-events-none opacity-60", A.className),
943
957
  children: [
944
958
  /* @__PURE__ */ B("div", {
945
959
  className: z("w-full max-w-full min-w-0", ft.tree),
946
- children: /* @__PURE__ */ B(pe, {
947
- items: Z,
960
+ children: /* @__PURE__ */ B(fe, {
961
+ items: he,
948
962
  showFiles: !1,
949
- selectedPath: P == null ? void 0 : Q(P),
950
- expandedPaths: X,
951
- onExpandedPathsChange: L,
952
- loadingPaths: ae,
963
+ selectedPath: P == null ? void 0 : $(P),
964
+ expandedPaths: me,
965
+ onExpandedPathsChange: oe,
966
+ loadingPaths: L,
953
967
  onItemClick: (e) => {
954
- let t = P != null && Q(P) === e.path;
955
- F(t ? void 0 : Ce(e.path));
968
+ if (g || Te(e)) return;
969
+ let t = P != null && $(P) === e.path;
970
+ ie(t ? void 0 : Se(e.path));
956
971
  },
957
- getContextMenuItems: Ne,
958
- createdFolderPath: ge,
959
- newFolderDefaultName: ce,
960
- onCreateFolderSave: Fe,
961
- onCreateFolderCancel: Ie,
962
- onRenameValidate: (e) => Pe(e),
963
- searchQuery: J ? W : void 0,
964
- emptyStateTitle: J ? S.replace("{query}", W) : void 0
972
+ getDisabledTooltip: h ? Te : void 0,
973
+ getContextMenuItems: Le,
974
+ createdFolderPath: _e,
975
+ newFolderDefaultName: le,
976
+ onCreateFolderSave: ze,
977
+ onCreateFolderCancel: Be,
978
+ onRenameValidate: (e) => Re(e),
979
+ searchQuery: Y ? K : void 0,
980
+ emptyStateTitle: Y ? ee.replace("{query}", K) : void 0
965
981
  })
966
982
  }),
967
983
  /* @__PURE__ */ B("div", {
@@ -971,18 +987,18 @@ var W = /* @__PURE__ */ function(e) {
971
987
  /* @__PURE__ */ V("div", {
972
988
  className: "mb-4 flex flex-wrap items-center gap-2",
973
989
  children: [/* @__PURE__ */ B(b, {
974
- onClick: Me,
975
- label: g,
976
- iconBefore: /* @__PURE__ */ B(U, {
990
+ onClick: Ie,
991
+ label: _,
992
+ iconBefore: /* @__PURE__ */ B(W, {
977
993
  size: d.SM,
978
994
  "aria-hidden": !0,
979
995
  stroke: f
980
996
  }),
981
- disabled: h || G || !we
982
- }), G && /* @__PURE__ */ B(b, {
983
- label: _,
984
- onClick: Ie,
985
- disabled: h,
997
+ disabled: g || q || !je
998
+ }), q && /* @__PURE__ */ B(b, {
999
+ label: v,
1000
+ onClick: Be,
1001
+ disabled: g,
986
1002
  [pt]: ""
987
1003
  })]
988
1004
  })
@@ -992,68 +1008,69 @@ var W = /* @__PURE__ */ function(e) {
992
1008
  summaryTitle: "_summaryTitle_zj3gd_1",
993
1009
  sectionHeading: "_sectionHeading_zj3gd_5",
994
1010
  destination: "_destination_zj3gd_9"
995
- }, vt = 200, yt = ({ view: e = Z.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, expandedPaths: S, onExpandedPathsChange: C, loadingPaths: w, hasExistingPublicationInFolder: T, hasWriteAccess: E, isSubmitting: D, hasSubmitError: te = !1, allowReplace: j = !0, author: ne, onAuthorChange: N, publishCredentials: P = !1, onPublishCredentialsChange: F, rules: I, onRulesChange: re, ruleSourceOptions: ie, isRulesLoading: ae = !1, hasRulesLoadError: L = !1, labels: oe = {}, summaryTitleClassName: ce = "dial-body-semi-text", headingClassName: le = "dial-body-semi-text", destinationClassName: ue = "dial-small-semi-text", calloutFolderNameClassName: U = "dial-small-paragraph-semi-text", styles: de = {} }) => {
996
- let { colors: fe, folderTree: pe, accessRules: W, dependencies: K } = de, J = {
1011
+ }, vt = 200, yt = ({ view: e = Q.Main, onChangeFolderClick: o, resource: s, renderSummary: c, dependencies: u, versionHistory: p, folderItems: m, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: x, getDisabledReason: S, expandedPaths: C, onExpandedPathsChange: w, loadingPaths: te, hasExistingPublicationInFolder: T, hasWriteAccess: E, isSubmitting: A, hasSubmitError: ne = !1, allowReplace: M = !0, author: re, onAuthorChange: N, publishCredentials: P = !1, onPublishCredentialsChange: ie, rules: F, onRulesChange: ae, ruleSourceOptions: I, isRulesLoading: L = !1, hasRulesLoadError: R = !1, labels: ce = {}, summaryTitleClassName: le = "dial-body-semi-text", headingClassName: U = "dial-body-semi-text", destinationClassName: W = "dial-small-semi-text", calloutFolderNameClassName: ue = "dial-small-paragraph-semi-text", styles: de = {} }) => {
1012
+ let { colors: fe, folderTree: G, accessRules: q, dependencies: pe } = de, Y = {
997
1013
  ...se({
998
1014
  "--pp-summary-title-text": fe?.summaryTitleText,
999
1015
  "--pp-heading-text": fe?.headingText,
1000
1016
  "--pp-destination-text": fe?.destinationText
1001
1017
  }),
1002
1018
  ...de.cssVars
1003
- }, Y = {
1019
+ }, X = {
1004
1020
  border: fe?.summaryBorder,
1005
1021
  background: fe?.summaryBackground
1006
- }, { folderLabel: me = "Publish to folder", destinationAriaLabel: X = "Destination folder", noFolderSelectedLabel: he = "No folder selected", changeFolderLabel: ge = "Change", chooseFolderLabel: _e = "Choose", replaceWarning: ve = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ye = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: be = "Publishing failed. Please try again.", adminApprovalTitle: xe = "Admin approval required", adminApprovalMessage: Se = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Q, addSiblingFolderLabel: Ce, addChildFolderLabel: we, cancelCreatingFolderLabel: Te, createFolderEmptyNameError: Ee, createFolderInvalidNameError: De, createFolderDuplicateNameError: Oe, createFolderSameAsParentNameError: ke, rootFolderLabel: $ = "Organization", accessRulesLabels: Ae, dependenciesLabels: je, searchPlaceholder: Me, clearSearchAriaLabel: Ne, authorLabel: Pe = "Author", authorPlaceholder: Fe = "Author name", authorHint: Ie = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Le = "Publish with my credentials", credentialsHint: ze = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Be, Ve] = a(""), He = n(), Ge = i(null), Ke = i(null), qe = (e) => {
1007
- Ve(e ?? "");
1008
- }, Je = i(e);
1022
+ }, { folderLabel: Z = "Publish to folder", destinationAriaLabel: me = "Destination folder", noFolderSelectedLabel: he = "No folder selected", changeFolderLabel: ge = "Change", chooseFolderLabel: _e = "Choose", replaceWarning: ve = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ye = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: be = "Publishing failed. Please try again.", adminApprovalTitle: xe = "Admin approval required", adminApprovalMessage: $ = "We’ll send a request to your organization’s admin. If approved, it will appear in the folder.", folderEmptyStateLabel: Se, addSiblingFolderLabel: Ce, addChildFolderLabel: we, cancelCreatingFolderLabel: Te, createFolderEmptyNameError: Ee, createFolderInvalidNameError: De, createFolderDuplicateNameError: Oe, createFolderSameAsParentNameError: ke, rootFolderLabel: Ae = "Organization", accessRulesLabels: je, dependenciesLabels: Me, searchPlaceholder: Ne, clearSearchAriaLabel: Pe, authorLabel: Fe = "Author", authorPlaceholder: Ie = "Author name", authorHint: Le = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ze = "Publish with my credentials", credentialsHint: Be = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ce, [Ve, He] = a(""), Ge = n(), Ke = i(null), qe = i(null), Je = (e) => {
1023
+ He(e ?? "");
1024
+ }, Ye = i(e);
1009
1025
  t(() => {
1010
- Je.current !== e && (Je.current = e, e === Z.ChangeFolder ? Ke.current?.focus({ preventScroll: !0 }) : Ge.current?.focus({ preventScroll: !0 }));
1026
+ Ye.current !== e && (Ye.current = e, e === Q.ChangeFolder ? qe.current?.focus({ preventScroll: !0 }) : Ke.current?.focus({ preventScroll: !0 }));
1011
1027
  }, [e]);
1012
- let Ye = g != null, Xe = r(() => q({
1013
- hasSelectedFolder: Ye,
1028
+ let Xe = g != null, Ze = r(() => J({
1029
+ hasSelectedFolder: Xe,
1014
1030
  hasExistingPublicationInFolder: T,
1015
1031
  hasWriteAccess: E,
1016
- isSubmitting: D,
1017
- hasSubmitError: te,
1018
- allowReplace: j
1032
+ isSubmitting: A,
1033
+ hasSubmitError: ne,
1034
+ allowReplace: M
1019
1035
  }), [
1020
- Ye,
1036
+ Xe,
1021
1037
  T,
1022
1038
  E,
1023
- D,
1024
- te,
1025
- j
1026
- ]), Ze = Ye ? g[g.length - 1] ?? $ : "", Qe = c ? c() : /* @__PURE__ */ B("span", {
1027
- className: z("truncate", ce, _t.summaryTitle),
1039
+ A,
1040
+ ne,
1041
+ M
1042
+ ]), Qe = Xe ? g[g.length - 1] ?? Ae : "", et = c ? c() : /* @__PURE__ */ B("span", {
1043
+ className: z("truncate", le, _t.summaryTitle),
1028
1044
  children: s?.title
1029
1045
  });
1030
- if (e === Z.ChangeFolder) return /* @__PURE__ */ V("div", {
1031
- ref: Ke,
1046
+ if (e === Q.ChangeFolder) return /* @__PURE__ */ V("div", {
1047
+ ref: qe,
1032
1048
  tabIndex: -1,
1033
1049
  role: "group",
1034
- "aria-label": me,
1050
+ "aria-label": Z,
1035
1051
  className: z("flex flex-col gap-3 outline-none", We.panel),
1036
- style: J,
1052
+ style: Y,
1037
1053
  children: [/* @__PURE__ */ B("div", {
1038
1054
  role: "search",
1039
- children: /* @__PURE__ */ B(M, {
1040
- value: Be,
1041
- onChange: qe,
1042
- placeholder: Me,
1043
- clearLabel: Ne,
1044
- "aria-label": Me
1055
+ children: /* @__PURE__ */ B(j, {
1056
+ value: Ve,
1057
+ onChange: Je,
1058
+ placeholder: Ne,
1059
+ clearLabel: Pe,
1060
+ "aria-label": Ne
1045
1061
  })
1046
1062
  }), /* @__PURE__ */ B(gt, {
1047
1063
  items: m,
1048
1064
  selectedPath: _,
1049
1065
  onSelectedPathChange: v,
1050
1066
  onCreateFolder: x,
1051
- expandedPaths: S,
1052
- onExpandedPathsChange: C,
1053
- loadingPaths: w,
1054
- searchQuery: Be,
1055
- disabled: D,
1056
- noResultsLabel: Q,
1067
+ getDisabledReason: S,
1068
+ expandedPaths: C,
1069
+ onExpandedPathsChange: w,
1070
+ loadingPaths: te,
1071
+ searchQuery: Ve,
1072
+ disabled: A,
1073
+ noResultsLabel: Se,
1057
1074
  addSiblingFolderLabel: Ce,
1058
1075
  addChildFolderLabel: we,
1059
1076
  cancelCreatingFolderLabel: Te,
@@ -1061,19 +1078,19 @@ var W = /* @__PURE__ */ function(e) {
1061
1078
  invalidFolderNameError: De,
1062
1079
  duplicateFolderNameError: Oe,
1063
1080
  sameAsParentFolderNameError: ke,
1064
- rootLabel: $,
1065
- styles: pe
1081
+ rootLabel: Ae,
1082
+ styles: G
1066
1083
  })]
1067
1084
  });
1068
- let et = z(ue, _t.destination);
1085
+ let tt = z(W, _t.destination);
1069
1086
  return /* @__PURE__ */ V("div", {
1070
1087
  className: z("flex flex-col gap-5", We.panel),
1071
- style: J,
1088
+ style: Y,
1072
1089
  children: [
1073
- s?.type == null ? /* @__PURE__ */ B(R, {
1074
- colors: Y,
1075
- children: Qe
1076
- }) : /* @__PURE__ */ B(R, {
1090
+ s?.type == null ? /* @__PURE__ */ B(oe, {
1091
+ colors: X,
1092
+ children: et
1093
+ }) : /* @__PURE__ */ B(oe, {
1077
1094
  item: {
1078
1095
  type: s.type,
1079
1096
  name: s.title,
@@ -1081,114 +1098,114 @@ var W = /* @__PURE__ */ function(e) {
1081
1098
  iconUrl: s.iconUrl
1082
1099
  },
1083
1100
  hasVersionTag: !1,
1084
- colors: Y
1101
+ colors: X
1085
1102
  }),
1086
1103
  /* @__PURE__ */ V("section", { children: [
1087
1104
  /* @__PURE__ */ B("h2", {
1088
- className: z("mb-2", le, _t.sectionHeading),
1089
- children: me
1105
+ className: z("mb-2", U, _t.sectionHeading),
1106
+ children: Z
1090
1107
  }),
1091
1108
  /* @__PURE__ */ V("div", {
1092
1109
  className: "flex min-w-0 items-center gap-2",
1093
1110
  children: [/* @__PURE__ */ B("div", {
1094
1111
  role: "group",
1095
- "aria-label": X,
1112
+ "aria-label": me,
1096
1113
  className: "min-w-0 flex-1",
1097
- children: Ye ? /* @__PURE__ */ B(y, {
1098
- name: [$, ...g].join(" / "),
1099
- nameClassName: et
1114
+ children: Xe ? /* @__PURE__ */ B(y, {
1115
+ name: [Ae, ...g].join(" / "),
1116
+ nameClassName: tt
1100
1117
  }) : /* @__PURE__ */ B("span", {
1101
- className: z("block truncate", et),
1118
+ className: z("block truncate", tt),
1102
1119
  children: he
1103
1120
  })
1104
1121
  }), /* @__PURE__ */ B(b, {
1105
- ref: Ge,
1122
+ ref: Ke,
1106
1123
  size: h.Small,
1107
- label: Ye ? ge : _e,
1124
+ label: Xe ? ge : _e,
1108
1125
  iconBefore: /* @__PURE__ */ B(H, {
1109
1126
  size: d.SM,
1110
1127
  stroke: f,
1111
1128
  "aria-hidden": !0
1112
1129
  }),
1113
- disabled: D,
1130
+ disabled: A,
1114
1131
  onClick: o
1115
1132
  })]
1116
1133
  }),
1117
- Xe.calloutKind === G.Info && /* @__PURE__ */ B("div", {
1134
+ Ze.calloutKind === K.Info && /* @__PURE__ */ B("div", {
1118
1135
  className: "my-4",
1119
- children: /* @__PURE__ */ B(O, {
1120
- type: k.SectionMessage,
1121
- variant: A.Info,
1136
+ children: /* @__PURE__ */ B(D, {
1137
+ type: O.SectionMessage,
1138
+ variant: k.Info,
1122
1139
  title: xe,
1123
- message: Se
1140
+ message: $
1124
1141
  })
1125
1142
  }),
1126
- Xe.calloutKind !== G.None && Xe.calloutKind !== G.Info && /* @__PURE__ */ B("div", {
1143
+ Ze.calloutKind !== K.None && Ze.calloutKind !== K.Info && /* @__PURE__ */ B("div", {
1127
1144
  className: "mt-3",
1128
- children: /* @__PURE__ */ B(O, {
1129
- type: k.SectionMessage,
1130
- variant: bt(Xe.calloutKind),
1131
- message: St(Xe.calloutKind, {
1145
+ children: /* @__PURE__ */ B(D, {
1146
+ type: O.SectionMessage,
1147
+ variant: bt(Ze.calloutKind),
1148
+ message: St(Ze.calloutKind, {
1132
1149
  replaceWarning: ve,
1133
1150
  noAccessError: ye,
1134
1151
  submitError: be,
1135
- folderName: Ze,
1152
+ folderName: Qe,
1136
1153
  version: s?.version,
1137
- folderNameClassName: U
1154
+ folderNameClassName: ue
1138
1155
  })
1139
1156
  })
1140
1157
  }),
1141
1158
  /* @__PURE__ */ B("div", {
1142
1159
  className: "mt-4",
1143
1160
  children: /* @__PURE__ */ B(ee, {
1144
- id: He,
1145
- labelProps: { label: Pe },
1146
- placeholder: Fe,
1147
- caption: Ie,
1148
- value: ne,
1161
+ id: Ge,
1162
+ labelProps: { label: Fe },
1163
+ placeholder: Ie,
1164
+ caption: Le,
1165
+ value: re,
1149
1166
  onChange: (e) => N(e ?? ""),
1150
1167
  maxLength: vt,
1151
- disabled: D
1168
+ disabled: A
1152
1169
  })
1153
1170
  }),
1154
- F != null && /* @__PURE__ */ B("div", {
1171
+ ie != null && /* @__PURE__ */ B("div", {
1155
1172
  className: "mt-4",
1156
1173
  children: /* @__PURE__ */ B(l, {
1157
- labelProps: { label: Le },
1158
- caption: ze,
1174
+ labelProps: { label: ze },
1175
+ caption: Be,
1159
1176
  isSelected: P,
1160
- onChange: F,
1161
- disabled: D
1177
+ onChange: ie,
1178
+ disabled: A
1162
1179
  })
1163
1180
  }),
1164
1181
  /* @__PURE__ */ B("div", {
1165
1182
  className: "mt-4",
1166
1183
  children: /* @__PURE__ */ B(Re, {
1167
- rules: I,
1168
- onRulesChange: re,
1169
- sourceOptions: ie,
1170
- folderName: Ye ? Ze : void 0,
1171
- disabled: D,
1172
- isLoading: ae,
1173
- hasLoadError: L,
1174
- labels: Ae,
1175
- styles: W
1184
+ rules: F,
1185
+ onRulesChange: ae,
1186
+ sourceOptions: I,
1187
+ folderName: Xe ? Qe : void 0,
1188
+ disabled: A,
1189
+ isLoading: L,
1190
+ hasLoadError: R,
1191
+ labels: je,
1192
+ styles: q
1176
1193
  })
1177
1194
  })
1178
1195
  ] }),
1179
1196
  u != null && /* @__PURE__ */ B($e, {
1180
1197
  dependencies: u,
1181
- labels: je,
1182
- headingClassName: le,
1183
- styles: K
1198
+ labels: Me,
1199
+ headingClassName: U,
1200
+ styles: pe
1184
1201
  }),
1185
1202
  p != null && /* @__PURE__ */ B(Ue, {
1186
- headingClassName: le,
1203
+ headingClassName: U,
1187
1204
  ...p
1188
1205
  })
1189
1206
  ]
1190
1207
  });
1191
- }, bt = (e) => e === G.ReplaceWarning ? A.Warning : A.Error, xt = (e, t, n) => {
1208
+ }, bt = (e) => e === K.ReplaceWarning ? k.Warning : k.Error, xt = (e, t, n) => {
1192
1209
  let [r, i, ...a] = e.split("{folder}");
1193
1210
  return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ V(le, { children: [
1194
1211
  r,
@@ -1198,8 +1215,8 @@ var W = /* @__PURE__ */ function(e) {
1198
1215
  }),
1199
1216
  i
1200
1217
  ] });
1201
- }, St = (e, t) => e === G.ReplaceWarning ? xt(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === G.NoAccess ? xt(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Ct = { footer: "_footer_dks1v_1" }, wt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = Z.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: u = {}, colors: f }) => {
1202
- let p = se({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: v = "Select" } = u, y = s === Z.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
1218
+ }, St = (e, t) => e === K.ReplaceWarning ? xt(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === K.NoAccess ? xt(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Ct = { footer: "_footer_dks1v_1" }, wt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = Q.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: u = {}, colors: f }) => {
1219
+ let p = se({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: g = "Update version {version}", publishingInProgressLabel: _ = "Publishing…", selectFolderLabel: v = "Select" } = u, y = s === Q.ChangeFolder, x = i ? _ : n && t && e != null ? g.replace("{version}", e) : h;
1203
1220
  return /* @__PURE__ */ V("div", {
1204
1221
  style: p,
1205
1222
  className: z("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Ct.footer),
@@ -1208,18 +1225,18 @@ var W = /* @__PURE__ */ function(e) {
1208
1225
  className: "mobile:flex-1",
1209
1226
  disabled: i,
1210
1227
  onClick: a
1211
- }), y ? /* @__PURE__ */ B(D, {
1228
+ }), y ? /* @__PURE__ */ B(E, {
1212
1229
  label: v,
1213
1230
  className: "mobile:flex-1",
1214
1231
  disabled: l,
1215
1232
  onClick: c
1216
- }) : /* @__PURE__ */ B(te, {
1233
+ }) : /* @__PURE__ */ B(A, {
1217
1234
  label: x,
1218
1235
  className: "mobile:flex-1",
1219
1236
  disabled: r,
1220
1237
  iconBefore: i ? /* @__PURE__ */ B("span", {
1221
1238
  "aria-hidden": !0,
1222
- children: /* @__PURE__ */ B(I, { size: d.SM })
1239
+ children: /* @__PURE__ */ B(ie, { size: d.SM })
1223
1240
  }) : void 0,
1224
1241
  onClick: o
1225
1242
  })]
@@ -1230,35 +1247,35 @@ var W = /* @__PURE__ */ function(e) {
1230
1247
  divider: "_divider_16jmd_15",
1231
1248
  content: "_content_16jmd_19",
1232
1249
  title: "_title_16jmd_24"
1233
- }, Et = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, expandedPaths: f, onExpandedPathsChange: p, loadingPaths: m, hasExistingPublicationInFolder: h, hasWriteAccess: g, isSubmitting: _, hasSubmitError: v = !1, allowReplace: y = !0, author: b, onAuthorChange: x, rules: S, onRulesChange: ee, ruleSourceOptions: C, isRulesLoading: w = !1, hasRulesLoadError: T = !1, onClose: E, returnFocusRef: D, onSubmit: O, panelLabels: k, panelStyles: A, panelSummaryTitleClassName: te, panelHeadingClassName: j, panelCalloutFolderNameClassName: M, footerLabels: ne, labels: P = {}, titleClassName: F = "dial-body-semi-text", colors: I }) => {
1234
- let re = se({
1235
- "--spp-backdrop-bg": I?.backdropBackground,
1236
- "--spp-panel-bg": I?.panelBackground,
1237
- "--spp-panel-border": I?.panelBorder,
1238
- "--spp-divider-border": I?.dividerBorder,
1239
- "--spp-scrollbar-thumb": I?.scrollbarThumb,
1240
- "--spp-title-text": I?.titleText
1241
- }), [ie, ae] = a(null), { title: L = "Publish", changeFolderTitle: R = "Change folder", backAriaLabel: oe = "Back", ariaLabel: ce = "Publish", closeAriaLabel: le = "Close" } = P, H = ge({
1250
+ }, Et = ({ isOpen: e, resource: n, renderSummary: i, dependencies: o, versionHistory: s, folderItems: c, selectedFolderPath: l, onSelectedFolderPathChange: u, onCreateFolder: d, getDisabledReason: f, expandedPaths: p, onExpandedPathsChange: m, loadingPaths: h, hasExistingPublicationInFolder: g, hasWriteAccess: _, isSubmitting: v, hasSubmitError: y = !1, allowReplace: b = !0, author: x, onAuthorChange: S, rules: ee, onRulesChange: C, ruleSourceOptions: w, isRulesLoading: te = !1, hasRulesLoadError: T = !1, onClose: E, returnFocusRef: D, onSubmit: O, panelLabels: k, panelStyles: A, panelSummaryTitleClassName: ne, panelHeadingClassName: j, panelCalloutFolderNameClassName: M, footerLabels: N, labels: P = {}, titleClassName: ie = "dial-body-semi-text", colors: F }) => {
1251
+ let ae = se({
1252
+ "--spp-backdrop-bg": F?.backdropBackground,
1253
+ "--spp-panel-bg": F?.panelBackground,
1254
+ "--spp-panel-border": F?.panelBorder,
1255
+ "--spp-divider-border": F?.dividerBorder,
1256
+ "--spp-scrollbar-thumb": F?.scrollbarThumb,
1257
+ "--spp-title-text": F?.titleText
1258
+ }), [I, L] = a(null), { title: oe = "Publish", changeFolderTitle: R = "Change folder", backAriaLabel: ce = "Back", ariaLabel: le = "Publish", closeAriaLabel: H = "Close" } = P, U = he({
1242
1259
  isOpen: e,
1243
1260
  selectedFolderPath: l,
1244
1261
  onSelectedFolderPathChange: u
1245
- }), ue = H.view === Z.ChangeFolder, U = r(() => q({
1262
+ }), W = U.view === Q.ChangeFolder, ue = r(() => J({
1246
1263
  hasSelectedFolder: l != null,
1247
- hasExistingPublicationInFolder: h,
1248
- hasWriteAccess: g,
1249
- isSubmitting: _,
1250
- hasSubmitError: v,
1251
- allowReplace: y
1264
+ hasExistingPublicationInFolder: g,
1265
+ hasWriteAccess: _,
1266
+ isSubmitting: v,
1267
+ hasSubmitError: y,
1268
+ allowReplace: b
1252
1269
  }), [
1253
1270
  l,
1254
- h,
1255
1271
  g,
1256
1272
  _,
1257
1273
  v,
1258
- y
1274
+ y,
1275
+ b
1259
1276
  ]);
1260
1277
  return t(() => {
1261
- let t = ie?.closest("[role=\"dialog\"]");
1278
+ let t = I?.closest("[role=\"dialog\"]");
1262
1279
  if (!e || !t) return;
1263
1280
  let n = () => t.focus({ preventScroll: !0 });
1264
1281
  n();
@@ -1274,29 +1291,29 @@ var W = /* @__PURE__ */ function(e) {
1274
1291
  };
1275
1292
  }, [
1276
1293
  e,
1277
- ie,
1294
+ I,
1278
1295
  D
1279
- ]), /* @__PURE__ */ V(N, {
1296
+ ]), /* @__PURE__ */ V(re, {
1280
1297
  open: e,
1281
1298
  onClose: E,
1282
1299
  header: /* @__PURE__ */ B("span", {
1283
- className: z("block truncate text-center", F, Tt.title),
1284
- children: ue ? R : L
1300
+ className: z("block truncate text-center", ie, Tt.title),
1301
+ children: W ? R : oe
1285
1302
  }),
1286
- ariaLabel: ce,
1287
- onBack: ue ? H.backToMain : void 0,
1288
- backAriaLabel: oe,
1289
- backDisabled: _,
1290
- closeAriaLabel: le,
1291
- closeDisabled: _,
1292
- style: re,
1293
- overlayStyle: re,
1303
+ ariaLabel: le,
1304
+ onBack: W ? U.backToMain : void 0,
1305
+ backAriaLabel: ce,
1306
+ backDisabled: v,
1307
+ closeAriaLabel: H,
1308
+ closeDisabled: v,
1309
+ style: ae,
1310
+ overlayStyle: ae,
1294
1311
  className: z(Tt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1295
1312
  overlayClassName: Tt.backdrop,
1296
1313
  headerClassName: z("px-[22px]", Tt.divider),
1297
1314
  bodyClassName: "flex flex-col overflow-hidden",
1298
1315
  children: [/* @__PURE__ */ B("div", {
1299
- ref: ae,
1316
+ ref: L,
1300
1317
  className: z("min-h-0 flex-1 overflow-y-auto", Tt.content),
1301
1318
  children: /* @__PURE__ */ B("div", {
1302
1319
  className: "p-[22px]",
@@ -1305,52 +1322,53 @@ var W = /* @__PURE__ */ function(e) {
1305
1322
  renderSummary: i,
1306
1323
  dependencies: o,
1307
1324
  versionHistory: s,
1308
- view: H.view,
1309
- onChangeFolderClick: H.openFolderView,
1325
+ view: U.view,
1326
+ onChangeFolderClick: U.openFolderView,
1310
1327
  folderItems: c,
1311
1328
  selectedFolderPath: l,
1312
- pendingFolderPath: H.pendingFolderPath,
1313
- onPendingFolderPathChange: H.setPendingFolderPath,
1329
+ pendingFolderPath: U.pendingFolderPath,
1330
+ onPendingFolderPathChange: U.setPendingFolderPath,
1314
1331
  onCreateFolder: d,
1315
- expandedPaths: f,
1316
- onExpandedPathsChange: p,
1317
- loadingPaths: m,
1318
- hasExistingPublicationInFolder: h,
1319
- hasWriteAccess: g,
1320
- isSubmitting: _,
1321
- hasSubmitError: v,
1322
- allowReplace: y,
1323
- author: b,
1324
- onAuthorChange: x,
1325
- rules: S,
1326
- onRulesChange: ee,
1327
- ruleSourceOptions: C,
1328
- isRulesLoading: w,
1332
+ getDisabledReason: f,
1333
+ expandedPaths: p,
1334
+ onExpandedPathsChange: m,
1335
+ loadingPaths: h,
1336
+ hasExistingPublicationInFolder: g,
1337
+ hasWriteAccess: _,
1338
+ isSubmitting: v,
1339
+ hasSubmitError: y,
1340
+ allowReplace: b,
1341
+ author: x,
1342
+ onAuthorChange: S,
1343
+ rules: ee,
1344
+ onRulesChange: C,
1345
+ ruleSourceOptions: w,
1346
+ isRulesLoading: te,
1329
1347
  hasRulesLoadError: T,
1330
1348
  labels: k,
1331
1349
  styles: A,
1332
- summaryTitleClassName: te,
1350
+ summaryTitleClassName: ne,
1333
1351
  headingClassName: j,
1334
1352
  calloutFolderNameClassName: M
1335
1353
  })
1336
1354
  })
1337
1355
  }), /* @__PURE__ */ B(wt, {
1338
1356
  version: n?.version,
1339
- hasExistingPublicationInFolder: h,
1340
- allowReplace: y,
1341
- isSubmitDisabled: U.isSubmitDisabled,
1342
- isSubmitLoading: U.isSubmitLoading,
1343
- onCancel: ue ? H.backToMain : E,
1357
+ hasExistingPublicationInFolder: g,
1358
+ allowReplace: b,
1359
+ isSubmitDisabled: ue.isSubmitDisabled,
1360
+ isSubmitLoading: ue.isSubmitLoading,
1361
+ onCancel: W ? U.backToMain : E,
1344
1362
  onSubmit: O,
1345
- view: H.view,
1346
- onSelectFolder: H.selectFolder,
1347
- isSelectFolderDisabled: H.pendingFolderPath == null,
1348
- labels: ne
1363
+ view: U.view,
1364
+ onSelectFolder: U.selectFolder,
1365
+ isSelectFolderDisabled: U.pendingFolderPath == null,
1366
+ labels: N
1349
1367
  })]
1350
1368
  });
1351
1369
  }, Dt = { option: "_option_skygm_1" }, Ot = (e, t) => `Unpublish "${e}" from "${t}"?`, kt = (e) => `Choose which folder to unpublish "${e}" from.`, At = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: l, onClose: d }) => {
1352
1370
  let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = Ot, selectFolderMessage: y = kt } = o ?? {}, b = n.length > 1;
1353
- return /* @__PURE__ */ B(ae, {
1371
+ return /* @__PURE__ */ B(I, {
1354
1372
  open: e,
1355
1373
  title: f,
1356
1374
  confirmLabel: p,
@@ -1361,21 +1379,21 @@ var W = /* @__PURE__ */ function(e) {
1361
1379
  loadingStatusLabel: _,
1362
1380
  message: /* @__PURE__ */ B("span", {
1363
1381
  className: "wrap-break-word",
1364
- children: b ? y(t) : v(t, we(n[0] ?? "", h))
1382
+ children: b ? y(t) : v(t, Ce(n[0] ?? "", h))
1365
1383
  }),
1366
1384
  onConfirm: l,
1367
1385
  onClose: d,
1368
1386
  children: b && /* @__PURE__ */ B("div", {
1369
1387
  className: "mt-3",
1370
1388
  style: se({ "--ucd-option-text": c?.optionText }),
1371
- children: /* @__PURE__ */ B(j, {
1389
+ children: /* @__PURE__ */ B(ne, {
1372
1390
  ariaLabel: g,
1373
1391
  value: r ?? void 0,
1374
1392
  onChange: i,
1375
1393
  disabled: a,
1376
1394
  items: n.map((e) => ({
1377
1395
  value: e,
1378
- label: we(e, h)
1396
+ label: Ce(e, h)
1379
1397
  })),
1380
1398
  radioClassName: z(s, Dt.option)
1381
1399
  })
@@ -1388,107 +1406,108 @@ var W = /* @__PURE__ */ function(e) {
1388
1406
  }({}), Nt = {
1389
1407
  heading: "_heading_vk731_1",
1390
1408
  destination: "_destination_vk731_5"
1391
- }, Pt = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, onChangeFolderClick: c, changeFolderButtonRef: l, pendingDestination: u, onPendingDestinationChange: p, version: m, accessRules: g, versionHistory: v, isSubmitting: x = !1, submitError: S, foldersError: T, onRetryFolders: D, panelLabels: O = {}, panelStyles: k = {}, headingClassName: A = "dial-body-semi-text", destinationClassName: te = "dial-small-semi-text" }) => {
1392
- let { saveToFolderHeading: ne = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: F = "Version", keepVersionLabel: I = "Keep version {version}", saveAsNewVersionLabel: re = "Save as new version", newVersionLabel: ie = "Version", newVersionPlaceholder: ae = "Enter new version", searchPlaceholder: L = "Search folders", clearSearchAriaLabel: oe = "Clear search", folderEmptyStateLabel: ce, createFolderLabel: le, cancelCreatingFolderLabel: ue, addSiblingFolderLabel: U, addChildFolderLabel: de, createFolderEmptyNameError: fe, createFolderInvalidNameError: pe, createFolderDuplicateNameError: W, createFolderSameAsParentNameError: G, retryLabel: K = "Retry" } = O, { colors: q, folderTree: J } = k, Y = {
1409
+ }, Pt = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, getDisabledReason: c, onChangeFolderClick: l, changeFolderButtonRef: u, pendingDestination: p, onPendingDestinationChange: m, version: g, accessRules: v, versionHistory: x, isSubmitting: S = !1, submitError: te, foldersError: E, onRetryFolders: D, panelLabels: O = {}, panelStyles: k = {}, headingClassName: A = "dial-body-semi-text", destinationClassName: M = "dial-small-semi-text" }) => {
1410
+ let { saveToFolderHeading: re = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: ie = "Version", keepVersionLabel: F = "Keep version {version}", saveAsNewVersionLabel: ae = "Save as new version", newVersionLabel: I = "Version", newVersionPlaceholder: L = "Enter new version", searchPlaceholder: R = "Search folders", clearSearchAriaLabel: ce = "Clear search", folderEmptyStateLabel: le, createFolderLabel: U, cancelCreatingFolderLabel: W, addSiblingFolderLabel: ue, addChildFolderLabel: de, createFolderEmptyNameError: fe, createFolderInvalidNameError: G, createFolderDuplicateNameError: K, createFolderSameAsParentNameError: q, retryLabel: J = "Retry" } = O, { colors: pe, folderTree: Y } = k, X = {
1393
1411
  ...se({
1394
- "--stf-heading-text": q?.headingText,
1395
- "--stf-destination-text": q?.destinationText
1412
+ "--stf-heading-text": pe?.headingText,
1413
+ "--stf-destination-text": pe?.destinationText
1396
1414
  }),
1397
1415
  ...k.cssVars
1398
- }, me = {
1399
- border: q?.summaryBorder,
1400
- background: q?.summaryBackground
1401
- }, [X, he] = a(""), Z = n(), ge = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), _e = i.find((e) => e.key === u?.rootKey), ve = u ? u.path[u.path.length - 1] ?? _e?.label : void 0, ye = z(A, Nt.heading);
1416
+ }, Z = {
1417
+ border: pe?.summaryBorder,
1418
+ background: pe?.summaryBackground
1419
+ }, [me, Q] = a(""), he = n(), ge = n(), _e = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), ve = i.find((e) => e.key === p?.rootKey), ye = p ? p.path[p.path.length - 1] ?? ve?.label : void 0, be = z(A, Nt.heading), xe = c?.(o);
1402
1420
  if (e === Mt.ChangeFolder) return /* @__PURE__ */ V("div", {
1403
1421
  className: "flex flex-col gap-3",
1404
- style: Y,
1422
+ style: X,
1405
1423
  children: [
1406
1424
  /* @__PURE__ */ B("div", {
1407
1425
  role: "search",
1408
- children: /* @__PURE__ */ B(M, {
1409
- value: X,
1410
- onChange: (e) => he(e ?? ""),
1411
- placeholder: L,
1412
- clearLabel: oe,
1413
- "aria-label": L
1426
+ children: /* @__PURE__ */ B(j, {
1427
+ value: me,
1428
+ onChange: (e) => Q(e ?? ""),
1429
+ placeholder: R,
1430
+ clearLabel: ce,
1431
+ "aria-label": R
1414
1432
  })
1415
1433
  }),
1416
1434
  /* @__PURE__ */ B(w, {
1417
- politeness: E.Assertive,
1418
- children: T && /* @__PURE__ */ V("div", {
1435
+ politeness: T.Assertive,
1436
+ children: E && /* @__PURE__ */ V("div", {
1419
1437
  className: "flex flex-wrap items-center gap-2",
1420
- children: [/* @__PURE__ */ B(_, { text: T }), D && /* @__PURE__ */ B(C, {
1421
- label: K,
1438
+ children: [/* @__PURE__ */ B(_, { text: E }), D && /* @__PURE__ */ B(C, {
1439
+ label: J,
1422
1440
  onClick: D
1423
1441
  })]
1424
1442
  })
1425
1443
  }),
1426
1444
  /* @__PURE__ */ B(gt, {
1427
1445
  roots: i,
1428
- destination: u,
1429
- onDestinationChange: p,
1446
+ destination: p,
1447
+ onDestinationChange: m,
1430
1448
  onCreateDestinationFolder: s,
1431
- searchQuery: X,
1432
- disabled: x,
1433
- noResultsLabel: ce,
1434
- createFolderLabel: le,
1435
- cancelCreatingFolderLabel: ue,
1436
- addSiblingFolderLabel: U,
1449
+ getDisabledReason: c,
1450
+ searchQuery: me,
1451
+ disabled: S,
1452
+ noResultsLabel: le,
1453
+ createFolderLabel: U,
1454
+ cancelCreatingFolderLabel: W,
1455
+ addSiblingFolderLabel: ue,
1437
1456
  addChildFolderLabel: de,
1438
1457
  emptyFolderNameError: fe,
1439
- invalidFolderNameError: pe,
1440
- duplicateFolderNameError: W,
1441
- sameAsParentFolderNameError: G,
1442
- styles: J
1458
+ invalidFolderNameError: G,
1459
+ duplicateFolderNameError: K,
1460
+ sameAsParentFolderNameError: q,
1461
+ styles: Y
1443
1462
  }),
1444
- g && _e?.hasAccessRules && /* @__PURE__ */ B("div", {
1463
+ v && ve?.hasAccessRules && !(p && v.isHiddenFor?.(p)) && /* @__PURE__ */ B("div", {
1445
1464
  className: "mt-1",
1446
1465
  children: /* @__PURE__ */ B(Re, {
1447
- rules: g.rules,
1448
- onRulesChange: g.onRulesChange,
1449
- sourceOptions: g.sourceOptions,
1450
- folderName: ve,
1451
- disabled: x,
1452
- isLoading: g.isLoading,
1453
- hasLoadError: g.hasLoadError,
1454
- labels: g.labels,
1455
- styles: g.styles
1466
+ rules: v.rules,
1467
+ onRulesChange: v.onRulesChange,
1468
+ sourceOptions: v.sourceOptions,
1469
+ folderName: ye,
1470
+ disabled: S,
1471
+ isLoading: v.isLoading,
1472
+ hasLoadError: v.hasLoadError,
1473
+ labels: v.labels,
1474
+ styles: v.styles
1456
1475
  })
1457
1476
  })
1458
1477
  ]
1459
1478
  });
1460
- let be = m ? [{
1479
+ let $ = g ? [{
1461
1480
  value: jt.Keep,
1462
- label: I.replace("{version}", m.currentVersion)
1481
+ label: F.replace("{version}", g.currentVersion)
1463
1482
  }, {
1464
1483
  value: jt.New,
1465
- label: re,
1484
+ label: ae,
1466
1485
  content: /* @__PURE__ */ B(ee, {
1467
- id: Z,
1468
- value: m.newVersion,
1469
- onChange: (e) => m.onNewVersionChange(e ?? ""),
1470
- onBlur: m.onNewVersionBlur,
1486
+ id: he,
1487
+ value: g.newVersion,
1488
+ onChange: (e) => g.onNewVersionChange(e ?? ""),
1489
+ onBlur: g.onNewVersionBlur,
1471
1490
  labelProps: {
1472
- label: ie,
1491
+ label: I,
1473
1492
  required: !0
1474
1493
  },
1475
- placeholder: ae,
1476
- error: m.newVersionError,
1477
- invalid: !!m.newVersionError,
1478
- disabled: x
1494
+ placeholder: L,
1495
+ error: g.newVersionError,
1496
+ invalid: !!g.newVersionError,
1497
+ disabled: S
1479
1498
  })
1480
1499
  }] : [];
1481
1500
  return /* @__PURE__ */ V("div", {
1482
1501
  className: "flex flex-col gap-5",
1483
- style: Y,
1502
+ style: X,
1484
1503
  children: [
1485
- t.type == null ? /* @__PURE__ */ B(R, {
1486
- colors: me,
1504
+ t.type == null ? /* @__PURE__ */ B(oe, {
1505
+ colors: Z,
1487
1506
  children: /* @__PURE__ */ B("span", {
1488
- className: z("truncate", ye),
1507
+ className: z("truncate", be),
1489
1508
  children: t.title
1490
1509
  })
1491
- }) : /* @__PURE__ */ B(R, {
1510
+ }) : /* @__PURE__ */ B(oe, {
1492
1511
  item: {
1493
1512
  type: t.type,
1494
1513
  name: t.title,
@@ -1496,25 +1515,26 @@ var W = /* @__PURE__ */ function(e) {
1496
1515
  iconUrl: t.iconUrl
1497
1516
  },
1498
1517
  hasVersionTag: !1,
1499
- colors: me
1518
+ colors: Z
1500
1519
  }),
1501
1520
  /* @__PURE__ */ V("section", {
1502
1521
  className: "flex flex-col gap-2",
1503
1522
  children: [/* @__PURE__ */ B("h2", {
1504
- className: ye,
1505
- children: ne
1523
+ className: be,
1524
+ children: re
1506
1525
  }), /* @__PURE__ */ V("div", {
1507
1526
  className: "flex min-w-0 items-center gap-2",
1508
1527
  children: [/* @__PURE__ */ B("div", {
1509
1528
  role: "group",
1510
1529
  "aria-label": P,
1530
+ "aria-describedby": xe ? ge : void 0,
1511
1531
  className: "min-w-0 flex-1",
1512
1532
  children: /* @__PURE__ */ B(y, {
1513
- name: ge.join(" / "),
1514
- nameClassName: z(te, Nt.destination)
1533
+ name: _e.join(" / "),
1534
+ nameClassName: z(M, Nt.destination)
1515
1535
  })
1516
1536
  }), /* @__PURE__ */ B(b, {
1517
- ref: l,
1537
+ ref: u,
1518
1538
  size: h.Small,
1519
1539
  label: N,
1520
1540
  iconBefore: /* @__PURE__ */ B(H, {
@@ -1522,31 +1542,34 @@ var W = /* @__PURE__ */ function(e) {
1522
1542
  stroke: f,
1523
1543
  "aria-hidden": !0
1524
1544
  }),
1525
- disabled: x,
1526
- onClick: c
1545
+ disabled: S,
1546
+ onClick: l
1527
1547
  })]
1528
1548
  })]
1529
1549
  }),
1530
- m && /* @__PURE__ */ V("section", {
1550
+ g && /* @__PURE__ */ V("section", {
1531
1551
  className: "flex flex-col gap-2",
1532
1552
  children: [/* @__PURE__ */ B("h2", {
1533
- className: ye,
1534
- children: F
1535
- }), /* @__PURE__ */ B(j, {
1536
- ariaLabel: F,
1537
- value: m.versionMode,
1538
- onChange: (e) => m.onVersionModeChange(e),
1539
- items: be,
1540
- disabled: x
1553
+ className: be,
1554
+ children: ie
1555
+ }), /* @__PURE__ */ B(ne, {
1556
+ ariaLabel: ie,
1557
+ value: g.versionMode,
1558
+ onChange: (e) => g.onVersionModeChange(e),
1559
+ items: $,
1560
+ disabled: S
1541
1561
  })]
1542
1562
  }),
1543
- /* @__PURE__ */ B(w, {
1544
- politeness: E.Assertive,
1545
- children: S && /* @__PURE__ */ B(_, { text: S })
1563
+ /* @__PURE__ */ V(w, {
1564
+ politeness: T.Assertive,
1565
+ children: [xe && /* @__PURE__ */ B(_, {
1566
+ id: ge,
1567
+ text: xe
1568
+ }), te && /* @__PURE__ */ B(_, { text: te })]
1546
1569
  }),
1547
- v != null && /* @__PURE__ */ B(Ue, {
1570
+ x != null && /* @__PURE__ */ B(Ue, {
1548
1571
  headingClassName: A,
1549
- ...v
1572
+ ...x
1550
1573
  })
1551
1574
  ]
1552
1575
  });
@@ -1558,52 +1581,52 @@ var W = /* @__PURE__ */ function(e) {
1558
1581
  content: "_content_1ie8s_23",
1559
1582
  title: "_title_1ie8s_28"
1560
1583
  }, It = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: l, titleClassName: u = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ...g }) => {
1561
- let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: w = "Select" } = c, T = se({
1584
+ let { title: _ = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: x = "Back", cancelLabel: S = "Cancel", saveLabel: ee = "Save", savingLabel: C = "Saving…", selectLabel: w = "Select" } = c, te = se({
1562
1585
  "--sstf-backdrop-bg": l?.backdropBackground,
1563
1586
  "--sstf-panel-bg": l?.panelBackground,
1564
1587
  "--sstf-panel-border": l?.panelBorder,
1565
1588
  "--sstf-divider-border": l?.dividerBorder,
1566
1589
  "--sstf-scrollbar-thumb": l?.scrollbarThumb,
1567
1590
  "--sstf-title-text": l?.titleText
1568
- }), [E, O] = a(Mt.Main), [k, A] = a(f), j = i(null), M = i(null);
1591
+ }), [T, D] = a(Mt.Main), [O, k] = a(f), ne = i(null), j = i(null);
1569
1592
  t(() => {
1570
- e && O(Mt.Main);
1593
+ e && D(Mt.Main);
1571
1594
  }, [e]);
1572
- let ne = i(E);
1595
+ let M = i(T);
1573
1596
  t(() => {
1574
- ne.current !== E && (ne.current = E, E === Mt.ChangeFolder ? j.current?.focus({ preventScroll: !0 }) : M.current?.focus({ preventScroll: !0 }));
1575
- }, [E]);
1576
- let P = i(e);
1597
+ M.current !== T && (M.current = T, T === Mt.ChangeFolder ? ne.current?.focus({ preventScroll: !0 }) : j.current?.focus({ preventScroll: !0 }));
1598
+ }, [T]);
1599
+ let N = i(e);
1577
1600
  t(() => {
1578
- let t = P.current;
1579
- P.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1601
+ let t = N.current;
1602
+ N.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1580
1603
  }, [e, s]);
1581
- let F = E === Mt.ChangeFolder, re = (e) => {
1582
- A(e), h?.(e);
1583
- }, ie = () => {
1584
- re(f), O(Mt.ChangeFolder);
1604
+ let P = T === Mt.ChangeFolder, F = (e) => {
1605
+ k(e), h?.(e);
1585
1606
  }, ae = () => {
1586
- h?.(f), O(Mt.Main);
1607
+ F(f), D(Mt.ChangeFolder);
1608
+ }, I = () => {
1609
+ h?.(f), D(Mt.Main);
1587
1610
  }, L = () => {
1588
- k && p(k), O(Mt.Main);
1611
+ O && p(O), D(Mt.Main);
1589
1612
  };
1590
- return /* @__PURE__ */ V(N, {
1613
+ return /* @__PURE__ */ V(re, {
1591
1614
  open: e,
1592
1615
  onClose: n,
1593
1616
  header: /* @__PURE__ */ B("span", {
1594
- ref: j,
1617
+ ref: ne,
1595
1618
  tabIndex: -1,
1596
1619
  className: z("block truncate outline-none", u, Ft.title),
1597
- children: F ? v : _
1620
+ children: P ? v : _
1598
1621
  }),
1599
1622
  ariaLabel: _,
1600
- onBack: F ? ae : void 0,
1623
+ onBack: P ? I : void 0,
1601
1624
  backAriaLabel: x,
1602
1625
  backDisabled: m,
1603
1626
  closeAriaLabel: y,
1604
1627
  closeDisabled: m,
1605
- style: T,
1606
- overlayStyle: T,
1628
+ style: te,
1629
+ overlayStyle: te,
1607
1630
  className: z(Ft.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1608
1631
  overlayClassName: Ft.backdrop,
1609
1632
  headerClassName: z("px-[22px]", Ft.divider),
@@ -1612,14 +1635,14 @@ var W = /* @__PURE__ */ function(e) {
1612
1635
  className: z("min-h-0 flex-1 overflow-y-auto p-[22px]", Ft.content),
1613
1636
  children: /* @__PURE__ */ B(Pt, {
1614
1637
  ...g,
1615
- view: E,
1638
+ view: T,
1616
1639
  destination: f,
1617
1640
  onDestinationChange: p,
1618
1641
  isSubmitting: m,
1619
- onChangeFolderClick: ie,
1620
- changeFolderButtonRef: M,
1621
- pendingDestination: k,
1622
- onPendingDestinationChange: re
1642
+ onChangeFolderClick: ae,
1643
+ changeFolderButtonRef: j,
1644
+ pendingDestination: O,
1645
+ onPendingDestinationChange: F
1623
1646
  })
1624
1647
  }), /* @__PURE__ */ V("div", {
1625
1648
  className: z("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Ft.footer),
@@ -1627,19 +1650,19 @@ var W = /* @__PURE__ */ function(e) {
1627
1650
  label: S,
1628
1651
  className: "mobile:flex-1",
1629
1652
  disabled: m,
1630
- onClick: F ? ae : n
1631
- }), F ? /* @__PURE__ */ B(D, {
1653
+ onClick: P ? I : n
1654
+ }), P ? /* @__PURE__ */ B(E, {
1632
1655
  label: w,
1633
1656
  className: "mobile:flex-1",
1634
- disabled: k == null,
1657
+ disabled: O == null,
1635
1658
  onClick: L
1636
- }) : /* @__PURE__ */ B(te, {
1659
+ }) : /* @__PURE__ */ B(A, {
1637
1660
  label: m ? C : ee,
1638
1661
  className: "mobile:flex-1",
1639
1662
  disabled: o || m,
1640
1663
  iconBefore: m ? /* @__PURE__ */ B("span", {
1641
1664
  "aria-hidden": !0,
1642
- children: /* @__PURE__ */ B(I, { size: d.SM })
1665
+ children: /* @__PURE__ */ B(ie, { size: d.SM })
1643
1666
  }) : void 0,
1644
1667
  onClick: r
1645
1668
  })]
@@ -1647,4 +1670,4 @@ var W = /* @__PURE__ */ function(e) {
1647
1670
  });
1648
1671
  };
1649
1672
  //#endregion
1650
- export { We as PUBLISH_PANEL_CLASS, W as PublicationRuleFunction, Pe as PublishAccessRuleEditor, Re as PublishAccessRules, G as PublishCalloutKind, $e as PublishDependenciesList, K as PublishDependencyType, gt as PublishFoldersTree, wt as PublishFooter, tt as PublishHistoryList, yt as PublishPanel, Z as PublishPanelView, Pt as SaveToFolderPanel, Mt as SaveToFolderView, jt as SaveVersionMode, Et as StandalonePublishPanel, It as StandaloneSaveToFolderPanel, At as UnpublishConfirmationDialog, Ue as VersionHistorySection, ze as VersionHistoryStatus, Se as collectFolderKeys, q as derivePublishState, _e as filterFolderTree, Y as formatPublishedDate, Ce as fromFolderPathKey, ke as getSiblingFolderNames, Oe as getUniqueFolderName, xe as mergeFolderPaths, ye as sortFolderTree, Te as toDialFileTree, Q as toFolderPathKey, he as usePublishFlow, ge as usePublishFolderView, De as validateFolderName };
1673
+ export { We as PUBLISH_PANEL_CLASS, G as PublicationRuleFunction, Pe as PublishAccessRuleEditor, Re as PublishAccessRules, K as PublishCalloutKind, $e as PublishDependenciesList, q as PublishDependencyType, gt as PublishFoldersTree, wt as PublishFooter, tt as PublishHistoryList, yt as PublishPanel, Q as PublishPanelView, Pt as SaveToFolderPanel, Mt as SaveToFolderView, jt as SaveVersionMode, Et as StandalonePublishPanel, It as StandaloneSaveToFolderPanel, At as UnpublishConfirmationDialog, Ue as VersionHistorySection, ze as VersionHistoryStatus, xe as collectFolderKeys, J as derivePublishState, ge as filterFolderTree, Y as formatPublishedDate, Se as fromFolderPathKey, Oe as getSiblingFolderNames, De as getUniqueFolderName, be as mergeFolderPaths, ve as sortFolderTree, we as toDialFileTree, $ as toFolderPathKey, me as usePublishFlow, he as usePublishFolderView, Ee as validateFolderName };