@epam/ai-dial-publish-panel 1.4.0-dev.6 → 1.4.0-dev.66

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