@epam/ai-dial-publish-panel 1.4.0-dev.26 → 1.4.0-dev.34

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,46 +1,48 @@
1
1
  import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { 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 te, Spinner as j, Tag as M, 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 re, jsx as z, jsxs as B } from "react/jsx-runtime";
5
- import { IconFolder as ie, IconFolderPlus as ae, IconPlus as oe, IconTrashX as se } from "@tabler/icons-react";
6
- import { DialFileNodeType as ce, DialFoldersTree as V } 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
- var H = /* @__PURE__ */ function(e) {
8
+ var U = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), U = /* @__PURE__ */ function(e) {
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
- }({}), W = (e) => e.isSubmitting ? {
13
- calloutKind: U.None,
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 ? {
15
+ calloutKind: W.None,
14
16
  isSubmitDisabled: !0,
15
17
  isSubmitLoading: !0
16
18
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
17
- calloutKind: U.SubmitError,
19
+ calloutKind: W.SubmitError,
18
20
  isSubmitDisabled: !1,
19
21
  isSubmitLoading: !1
20
22
  } : e.hasExistingPublicationInFolder ? {
21
- calloutKind: U.ReplaceWarning,
23
+ calloutKind: W.ReplaceWarning,
22
24
  isSubmitDisabled: e.allowReplace === !1,
23
25
  isSubmitLoading: !1
24
26
  } : {
25
- calloutKind: U.Info,
27
+ calloutKind: W.Info,
26
28
  isSubmitDisabled: !1,
27
29
  isSubmitLoading: !1
28
30
  } : {
29
- calloutKind: U.NoAccess,
31
+ calloutKind: W.NoAccess,
30
32
  isSubmitDisabled: !0,
31
33
  isSubmitLoading: !1
32
34
  } : {
33
- calloutKind: U.None,
35
+ calloutKind: W.None,
34
36
  isSubmitDisabled: !0,
35
37
  isSubmitLoading: !1
36
- }, le = 864e5, G = (e, t = Date.now(), n) => {
37
- let r = Math.floor((t - e) / le);
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
- }, ue = (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 H = /* @__PURE__ */ function(e) {
51
53
  }]
52
54
  } : {
53
55
  ...e,
54
- children: e.children ? ue(e.children, t, n) : e.children
55
- }), K = (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 ? K(e.children, t, n) : e.children
64
+ children: e.children ? Y(e.children, t, n) : e.children
63
65
  });
64
- }, q = ({ 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), [te, j] = 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
- te || O(c);
72
- }, [c, te]);
73
- let M = e((e) => {
74
- j(!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 H = /* @__PURE__ */ function(e) {
98
100
  i,
99
101
  n.version,
100
102
  g
101
- ]), P = e(async (e, t) => {
102
- h((n) => ue(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) => K(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), j(!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: M,
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
- }({}), Y = ({ 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
- }, X = (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 ? X(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
- }, de = (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) => de(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, r) => {
206
+ }), xe = /[/\\:;,={}&"]/, Se = (e, t, n, r) => {
205
207
  let i = e.trim();
206
- return i ? i.includes("..") || _e.test(i) ? n.invalid : t.some((e) => e.toLowerCase() === i.toLowerCase()) ? n.duplicate : r?.toLowerCase() === i.toLowerCase() ? n.sameAsParent ?? n.duplicate : null : n.empty;
207
- }, ye = (e, t) => {
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 H = /* @__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,389 @@ var H = /* @__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: te = "This field is required.", targetsRequiredError: j = "Add at least one target.", saveLabel: M = "Save", cancelLabel: P = "Cancel", dialogAriaLabel: F = "Add access rule" } = d, ie = n(), ae = n(), oe = n(), se = n(), ce = 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 || ce.current?.focus();
251
+ p || le.current?.focus();
250
252
  }, [p]);
251
- let [V, U] = a(), [W, le] = a(), [G, ue] = a([]), [K, q] = a(""), [J, Y] = a(!1), [X, de] = 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: X.trim() ? /* @__PURE__ */ z(v, {
256
+ labelNode: Y.trim() ? /* @__PURE__ */ L(b, {
255
257
  text: e,
256
- query: X,
258
+ query: Y,
257
259
  maxLines: 1
258
260
  }) : void 0
259
- })), [e, X]), ge = r(() => [
261
+ })), [e, Y]), _e = r(() => [
260
262
  {
261
- value: H.Equal,
262
- label: b
263
+ value: U.Equal,
264
+ label: y
263
265
  },
264
266
  {
265
- value: H.Contain,
266
- label: x
267
+ value: U.Contain,
268
+ label: ee
267
269
  },
268
270
  {
269
- value: H.Regex,
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 = W === H.Regex, ve = Te(K), ye = V != null && W != null && (_e ? ve : G.length > 0), be = (e) => {
277
- U(Array.isArray(e) ? e[0] : e), Y(!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
- W === H.Regex != (t === H.Regex) && (ue([]), q("")), le(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
- ue(t);
288
- }, De = () => {
289
- !ye || V == null || W == null ? pe(!0) : s({
290
- source: V,
291
- function: W,
292
- targets: _e ? [K.trim()] : G
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 = (K.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__ */ B(re, { children: [
297
- /* @__PURE__ */ z(A, {
298
- id: ae,
298
+ }, Ae = /* @__PURE__ */ R(ce, { children: [
299
+ /* @__PURE__ */ L(k, {
300
+ id: P,
299
301
  labelProps: { label: h },
300
- options: he,
301
- value: V,
302
+ options: ge,
303
+ value: B,
302
304
  onChange: be,
303
- placeholder: _,
304
- searchable: e.length > we,
305
- searchPlaceholder: _,
306
- onSearchQueryChange: de,
305
+ placeholder: g,
306
+ searchable: e.length > Oe,
307
+ searchPlaceholder: g,
308
+ onSearchQueryChange: X,
307
309
  disabled: l,
308
- open: J,
309
- onOpenChange: Y,
310
- fieldClassName: $,
311
- invalid: Q && V == null,
312
- error: Q && V == null ? te : 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__ */ z(A, {
315
- labelProps: { label: y },
316
- id: oe,
317
- options: ge,
318
- value: W,
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 && W == null,
326
- error: Q && W == null ? te : 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__ */ z(ee, {
329
- id: ie,
330
- labelProps: { label: D },
331
- placeholder: O,
330
+ $ ? /* @__PURE__ */ L(x, {
331
+ id: N,
332
+ labelProps: { label: T },
333
+ placeholder: E,
332
334
  value: K,
333
335
  onChange: (e) => q(e ?? ""),
334
- error: Oe ? k : void 0,
336
+ error: we ? D : void 0,
335
337
  disabled: l
336
- }) : /* @__PURE__ */ z(N, {
337
- id: se,
338
- labelProps: { label: w },
339
- placeholder: T,
340
- caption: Q && G.length === 0 ? void 0 : E,
341
- error: Q && G.length === 0 ? j : void 0,
342
- invalid: Q && G.length === 0,
343
- value: G,
344
- onChange: Ee,
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__ */ B("div", {
350
+ /* @__PURE__ */ R("div", {
349
351
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
350
- children: [/* @__PURE__ */ z(g, {
351
- label: P,
352
+ children: [/* @__PURE__ */ L(v, {
353
+ label: ie,
352
354
  onClick: c,
353
355
  disabled: l
354
- }), /* @__PURE__ */ z(C, {
355
- label: M,
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__ */ z(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__ */ z("div", {
370
- ref: ce,
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 === H.Equal ? t.equal : e === H.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: te = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: M = "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: re = "Remove rule for {source}: {targets}", equalFunctionLabel: ie = "Equal", containFunctionLabel: ae = "Contain", regexFunctionLabel: ce = "Regex", loadingLabel: V = "Loading existing rules…", loadErrorLabel: H = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: U = "Rule added.", ruleRemovedAnnouncement: W = "Rule removed.", rulesClearedAnnouncement: le = "All rules cleared.", rulesLoadedAnnouncement: G = "Existing rules loaded for the selected folder.", editorLabels: ue } = v, K = n(), [q, J] = a(!1), [Y, X] = a(""), de = 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 && X(G), fe.current = f;
399
+ Z.current && !f && e.length > 0 && Y(W), Z.current = f;
398
400
  }, [
399
401
  f,
400
402
  e,
401
- G
403
+ W
402
404
  ]);
403
- let Z = () => {
404
- de.current = document.activeElement, J(!0);
405
+ let fe = () => {
406
+ X.current = document.activeElement, de(!0);
405
407
  }, Q = () => {
406
- J(!1), de.current?.focus?.();
408
+ de(!1), X.current?.focus?.();
407
409
  }, pe = (t) => {
408
- r([...e, t]), X(U), Q();
409
- }, $ = (t) => {
410
- r(e.filter((e, n) => n !== t)), X(W);
411
- }, me = () => {
412
- r([]), X(le);
413
- }, he = {
414
- equal: ie,
415
- contain: ae,
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,
416
418
  regex: ce
417
- }, ge = e.length >= m, _e = l || ge, ve = c != null && c !== "";
418
- return /* @__PURE__ */ B("div", {
419
+ }, _e = e.length >= m, $ = l || _e, ve = c != null && c !== "";
420
+ return /* @__PURE__ */ R("div", {
419
421
  role: "group",
420
422
  "aria-labelledby": K,
421
- style: k,
422
- className: L(l && "pointer-events-none opacity-60"),
423
+ style: D,
424
+ className: I(l && "pointer-events-none opacity-60"),
423
425
  children: [
424
- /* @__PURE__ */ z(b, {
426
+ /* @__PURE__ */ L(S, {
425
427
  visuallyHidden: !0,
426
- as: x.Span,
427
- children: Y
428
+ as: te.Span,
429
+ children: J
428
430
  }),
429
- /* @__PURE__ */ B("div", {
431
+ /* @__PURE__ */ R("div", {
430
432
  className: "mb-1 flex items-center justify-between gap-2",
431
- children: [/* @__PURE__ */ z("div", {
433
+ children: [/* @__PURE__ */ L("div", {
432
434
  id: K,
433
- className: L(ee, De.heading),
434
- children: A
435
- }), e.length > 0 && /* @__PURE__ */ z(g, {
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__ */ z("p", {
443
- className: L("mb-2", y, De.hint),
444
- children: ve ? te.replace("{folder}", c) : M
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__ */ z("div", {
448
+ e.length > 0 && !ve && /* @__PURE__ */ L("div", {
447
449
  className: "mb-2",
448
- children: /* @__PURE__ */ z(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__ */ B("div", {
455
- className: L("mb-2 flex items-center gap-2", S, De.loading),
456
- children: [/* @__PURE__ */ z(j, {
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: V
459
- }), /* @__PURE__ */ z("span", { children: V })]
460
+ ariaLabel: z
461
+ }), /* @__PURE__ */ L("span", { children: z })]
460
462
  }),
461
- p && /* @__PURE__ */ z("div", {
463
+ p && /* @__PURE__ */ L("div", {
462
464
  className: "mb-2",
463
- children: /* @__PURE__ */ z(w, {
465
+ children: /* @__PURE__ */ L(w, {
464
466
  type: T.SectionMessage,
465
467
  variant: E.Warning,
466
- message: H
468
+ message: le
467
469
  })
468
470
  }),
469
- e.length > 0 && /* @__PURE__ */ z("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 = re.replace("{source}", e.source).replace("{targets}", n);
473
- return /* @__PURE__ */ B("li", {
474
- className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2", De.ruleRow),
475
- children: [/* @__PURE__ */ B("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__ */ z("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__ */ z(_, {
488
- icon: /* @__PURE__ */ z(se, {
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
- q && /* @__PURE__ */ z(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: ue,
507
- styles: O.editor
508
+ labels: G,
509
+ styles: C.editor
508
510
  }),
509
- /* @__PURE__ */ z("div", {
511
+ /* @__PURE__ */ L("div", {
510
512
  className: "flex flex-wrap items-center gap-2",
511
- children: /* @__PURE__ */ z(g, {
512
- label: F,
513
- iconBefore: /* @__PURE__ */ z(oe, {
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__ */ z("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 = "These resources are still private. This item may not work for others until they are published too.", Ue = "Root folder", We = (e) => `${e} ${e === 1 ? "dependency is" : "dependencies are"} not public yet`, Ge = ({ 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, rootLocation: u = Ue, typeLabels: d = {}, getAnnouncement: f = We } = t, { colors: p } = o, m = {
568
+ ...oe({
569
+ "--pp-dependencies-heading-text": p?.headingText,
570
+ "--pp-dependencies-name-text": p?.nameText,
571
+ "--pp-dependencies-meta-text": p?.metaText
572
+ }),
573
+ ...o.cssVars
574
+ }, h = e.length;
575
+ return /* @__PURE__ */ R(ce, { children: [/* @__PURE__ */ L(S, {
576
+ visuallyHidden: !0,
577
+ as: te.Span,
578
+ children: h > 0 ? f(h) : ""
579
+ }), h > 0 && /* @__PURE__ */ R("section", {
580
+ "aria-labelledby": s,
581
+ className: I("flex flex-col gap-3", Fe.dependencies),
582
+ style: m,
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 = d[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__ */ R("span", {
610
+ className: I("truncate", a, Ie.meta),
611
+ children: [
612
+ t,
613
+ " · ",
614
+ e.location || u
615
+ ]
616
+ })]
617
+ })]
618
+ }, e.id);
619
+ })
620
+ })
621
+ ]
622
+ })] });
623
+ }, Ke = {
529
624
  currentBadge: "_currentBadge_d0adf_1",
530
625
  sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
531
626
  version: "_version_d0adf_13",
532
627
  date: "_date_d0adf_17",
533
628
  emptyState: "_emptyState_d0adf_21",
534
629
  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({
630
+ }, qe = ({ 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 }) => {
631
+ let m = oe({
537
632
  "--phl-badge-border": p?.currentBadgeBorder,
538
633
  "--phl-badge-bg": p?.currentBadgeBackground,
539
634
  "--phl-badge-text": p?.currentBadgeText,
@@ -544,177 +639,177 @@ var H = /* @__PURE__ */ function(e) {
544
639
  "--phl-date-text": p?.dateText,
545
640
  "--phl-empty-text": p?.emptyStateText,
546
641
  "--phl-striped-bg": p?.stripedBackground
547
- }), h = L(f, je.emptyState);
642
+ }), h = I(f, Ke.emptyState);
548
643
  if (n || r || e.length === 0) {
549
644
  let e = s;
550
- return n ? e = c : r && (e = l), /* @__PURE__ */ z(b, {
551
- as: x.P,
645
+ return n ? e = c : r && (e = l), /* @__PURE__ */ L(S, {
646
+ as: te.P,
552
647
  style: m,
553
648
  className: h,
554
649
  children: e
555
650
  });
556
651
  }
557
- return /* @__PURE__ */ z("ul", {
652
+ return /* @__PURE__ */ L("ul", {
558
653
  style: m,
559
- children: e.map((e, n) => /* @__PURE__ */ B("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__ */ B("span", {
654
+ children: e.map((e, n) => /* @__PURE__ */ R("li", {
655
+ className: I("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Ke.stripedRow),
656
+ children: [/* @__PURE__ */ R("span", {
562
657
  className: "flex min-w-0 items-center gap-2",
563
658
  style: m,
564
659
  children: [
565
- /* @__PURE__ */ B("span", {
566
- className: L(u, je.version),
660
+ /* @__PURE__ */ R("span", {
661
+ className: I(u, Ke.version),
567
662
  children: [
568
663
  i,
569
664
  " ",
570
665
  e.version
571
666
  ]
572
667
  }),
573
- e.version === t && /* @__PURE__ */ z(M, {
668
+ e.version === t && /* @__PURE__ */ L(j, {
574
669
  label: a,
575
- className: L("shrink-0 whitespace-nowrap", je.currentBadge)
670
+ className: I("shrink-0 whitespace-nowrap", Ke.currentBadge)
576
671
  }),
577
- e.publishCredentials === !0 && /* @__PURE__ */ z(M, {
672
+ e.publishCredentials === !0 && /* @__PURE__ */ L(j, {
578
673
  label: o,
579
- className: L("shrink-0 whitespace-nowrap", je.sharedCredentialsBadge)
674
+ className: I("shrink-0 whitespace-nowrap", Ke.sharedCredentialsBadge)
580
675
  })
581
676
  ]
582
- }), /* @__PURE__ */ z("span", {
583
- className: L(d, je.date),
584
- children: G(e.publishedAt)
677
+ }), /* @__PURE__ */ L("span", {
678
+ className: I(d, Ke.date),
679
+ children: de(e.publishedAt)
585
680
  })]
586
681
  }, `${e.version}-${n}`))
587
682
  });
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);
683
+ }, Je = ":", Ye = (e) => `${Je}${e}`, Xe = (e) => e?.startsWith(Je) ? e.slice(1) : void 0, Ze = (e) => [Ye(e.rootKey), ...e.path], Qe = (e) => {
684
+ let [t, ...n] = e, r = Xe(t);
590
685
  return r == null ? void 0 : {
591
686
  rootKey: r,
592
687
  path: n
593
688
  };
594
- }, Re = (e, t) => e.map((e) => ({
689
+ }, $e = (e, t) => e.map((e) => ({
595
690
  ...e,
596
691
  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);
692
+ children: e.children ? $e(e.children, t) : void 0
693
+ })), et = (e) => e.map((e) => {
694
+ let t = Ye(e.key);
600
695
  return {
601
696
  path: [t],
602
697
  name: e.label,
603
- children: Re(fe(e.items), t)
698
+ children: $e(me(e.items), t)
604
699
  };
605
- }), Be = (e) => e.map((e) => Pe(e.key)), Ve = (e, t) => {
700
+ }), tt = (e) => e.map((e) => Ye(e.key)), nt = (e, t) => {
606
701
  let n = /* @__PURE__ */ new Set();
607
702
  for (let r of e) {
608
- let e = Pe(r.key);
703
+ let e = Ye(r.key);
609
704
  for (let i of t(r) ?? []) n.add(i ? `${e}/${i}` : e);
610
705
  }
611
706
  return n;
612
- }, He = (e, t) => {
707
+ }, rt = (e, t) => {
613
708
  let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
614
709
  for (let e of t) {
615
- let [t, ...r] = e.split("/"), i = Fe(t);
710
+ let [t, ...r] = e.split("/"), i = Xe(t);
616
711
  i != null && r.length !== 0 && n.get(i)?.add($(r));
617
712
  }
618
713
  return n;
619
- }, Ue = {
714
+ }, it = {
620
715
  divider: "_divider_1gs31_1",
621
716
  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.", sameAsParentFolderNameError: T = "A folder cannot have the same name as its parent folder.", rootLabel: E = "Organization", expandedPaths: D, onExpandedPathsChange: O, loadingPaths: k, styles: A = {} }) => {
623
- let te = {
624
- ...ne({ "--pft-divider": A.colors?.divider }),
625
- ...A.cssVars
626
- }, j = c != null, M = r(() => c ? ze(c) : e, [c, e]), N = i(M);
717
+ }, at = "data-cancel-creating-folder", ot = "", st = [], ct = ({ items: e = st, 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 = {} }) => {
718
+ let re = {
719
+ ...oe({ "--pft-divider": O.colors?.divider }),
720
+ ...O.cssVars
721
+ }, k = c != null, A = r(() => c ? et(c) : e, [c, e]), ie = i(A);
627
722
  t(() => {
628
- N.current = M;
629
- }, [M]);
630
- let P = r(() => c ? Be(c) : [Ge], [c]), F = n;
631
- j && (F = l ? Ie(l) : void 0);
632
- let I = (e) => {
633
- j ? f?.(e ? Le(e) : void 0) : o?.(e);
634
- }, [R, re] = a(() => new Set(F?.map((e, t) => $(F.slice(0, t + 1))) ?? [])), ie = r(() => c ? /* @__PURE__ */ new Set([...R, ...Ve(c, (e) => e.expandedPaths)]) : void 0, [c, R]) ?? D ?? R, se = r(() => c ? Ve(c, (e) => e.loadingPaths) : k, [c, k]), H = (e) => {
723
+ ie.current = A;
724
+ }, [A]);
725
+ let j = r(() => c ? tt(c) : [ot], [c]), M = n;
726
+ k && (M = l ? Ze(l) : void 0);
727
+ let N = (e) => {
728
+ k ? f?.(e ? Qe(e) : void 0) : o?.(e);
729
+ }, [P, F] = a(() => new Set(M?.map((e, t) => $(M.slice(0, t + 1))) ?? [])), ae = r(() => c ? /* @__PURE__ */ new Set([...P, ...nt(c, (e) => e.expandedPaths)]) : void 0, [c, P]) ?? T ?? P, se = r(() => c ? nt(c, (e) => e.loadingPaths) : D, [c, D]), ce = (e) => {
635
730
  let t = new Set(e);
636
- for (let e of P) t.delete(e);
731
+ for (let e of j) t.delete(e);
637
732
  if (c) {
638
- re(t);
639
- let e = He(c, t);
733
+ F(t);
734
+ let e = rt(c, t);
640
735
  for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
641
- } else O ? O(t) : re(t);
642
- }, [U, W] = a(null), [le, G] = a(b), ue = i(null), K = i(!1);
736
+ } else E ? E(t) : F(t);
737
+ }, [z, V] = a(null), [U, W] = a(x), G = i(null), K = i(!1);
643
738
  t(() => {
644
739
  let e = (e) => {
645
- e.target instanceof Element && e.target.closest(`[${We}]`) && (K.current = !0);
740
+ e.target instanceof Element && e.target.closest(`[${at}]`) && (K.current = !0);
646
741
  };
647
742
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
648
743
  }, []);
649
- let q = m.trim(), J = U != null, Y = r(() => X(M, m), [M, m]), de = q.length > 0 && Y.length === 0, Z = !J && q.length > 0, Q = r(() => {
650
- let e = Z ? Y : M;
651
- return j ? e : fe(e);
744
+ 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(() => {
745
+ let e = X ? J : A;
746
+ return k ? e : me(e);
652
747
  }, [
653
- Z,
654
- Y,
655
- M,
656
- j
657
- ]), he = r(() => /* @__PURE__ */ new Set([...P, ...pe(Q)]), [P, Q]), _e = r(() => /* @__PURE__ */ new Set([...P, ...Z ? he : ie]), [
658
- P,
659
- Z,
660
- he,
661
- ie
662
- ]), xe = r(() => ge(Q), [Q]), Se = r(() => Z && xe.length === 0 ? [] : j ? xe : [{
663
- path: Ge,
664
- name: E,
665
- folderId: Ge,
666
- nodeType: ce.FOLDER,
667
- items: xe
748
+ X,
749
+ J,
750
+ A,
751
+ k
752
+ ]), fe = r(() => /* @__PURE__ */ new Set([...j, ..._e(Z)]), [j, Z]), pe = r(() => /* @__PURE__ */ new Set([...j, ...X ? fe : ae]), [
753
+ j,
754
+ X,
755
+ fe,
756
+ ae
757
+ ]), he = r(() => be(Z), [Z]), ge = r(() => X && he.length === 0 ? [] : k ? he : [{
758
+ path: ot,
759
+ name: w,
760
+ folderId: ot,
761
+ nodeType: H.FOLDER,
762
+ items: he
668
763
  }], [
669
- xe,
670
- E,
671
- Z,
672
- j
673
- ]), Ce = U ? $(U) : null, we = {
764
+ he,
765
+ w,
766
+ X,
767
+ k
768
+ ]), ye = z ? $(z) : null, xe = {
674
769
  empty: S,
675
- invalid: C,
676
- duplicate: w,
677
- sameAsParent: T
678
- }, Te = (e) => P.includes($(e)) ? void 0 : e.at(-1), Ee = (e) => {
770
+ invalid: te,
771
+ duplicate: ne,
772
+ sameAsParent: C
773
+ }, Te = (e) => j.includes($(e)) ? void 0 : e.at(-1), Ee = (e) => {
679
774
  if (!c) return !0;
680
- let t = Le(e), n = c.find((e) => e.key === t?.rootKey);
775
+ let t = Qe(e), n = c.find((e) => e.key === t?.rootKey);
681
776
  return n != null && n.canCreateFolders !== !1;
682
777
  }, De = (() => {
683
- if (!c) return F ?? [];
684
- if (F && Ee(F)) return F;
778
+ if (!c) return M ?? [];
779
+ if (M && Ee(M)) return M;
685
780
  let e = c.find((e) => e.canCreateFolders !== !1);
686
- return e ? Ie({
781
+ return e ? Ze({
687
782
  rootKey: e.key,
688
783
  path: []
689
784
  }) : void 0;
690
785
  })(), Oe = (e) => {
691
- let t = de && ve(q, [], we) == null, n = Te(e);
692
- return ye(t ? q : b, [...be(M, e), ...n ? [n] : []]);
786
+ let t = Y && Se(q, [], xe) == null, n = Te(e);
787
+ return Ce(t ? q : x, [...we(A, e), ...n ? [n] : []]);
693
788
  }, [ke, Ae] = a(null);
694
- ke != null && !se?.has($(ke)) && (Ae(null), W(ke), G(Oe(ke)));
789
+ ke != null && !se?.has($(ke)) && (Ae(null), V(ke), W(Oe(ke)));
695
790
  let je = (e) => {
696
- W(null), Ae(e), ue.current = null, K.current = !1;
791
+ V(null), Ae(e), G.current = null, K.current = !1;
697
792
  let t = $(e);
698
- t && H(new Set(ie).add(t));
793
+ t && ce(new Set(ae).add(t));
699
794
  }, Me = () => {
700
795
  De && je(De);
701
796
  }, Ne = (e) => {
702
- let t = me(e.path);
797
+ let t = ve(e.path);
703
798
  if (!Ee(t)) return [];
704
799
  let n = [{
705
800
  key: "add-child",
706
- label: y,
707
- icon: /* @__PURE__ */ z(ae, {
801
+ label: b,
802
+ icon: /* @__PURE__ */ L(le, {
708
803
  size: u.SM,
709
804
  "aria-hidden": !0,
710
805
  stroke: d
711
806
  }),
712
807
  onClick: () => je(t)
713
808
  }];
714
- return P.includes(e.path) || n.push({
809
+ return j.includes(e.path) || n.push({
715
810
  key: "add-sibling",
716
- label: ee,
717
- icon: /* @__PURE__ */ z(oe, {
811
+ label: y,
812
+ icon: /* @__PURE__ */ L(B, {
718
813
  size: u.SM,
719
814
  "aria-hidden": !0,
720
815
  stroke: d
@@ -722,318 +817,327 @@ var H = /* @__PURE__ */ function(e) {
722
817
  onClick: () => je(t.slice(0, -1))
723
818
  }), n;
724
819
  }, Pe = (e) => {
725
- if (!U) return null;
726
- let t = ve(e, be(N.current, U), we, Te(U));
727
- return ue.current = t, t;
820
+ if (!z) return null;
821
+ let t = Se(e, we(ie.current, z), xe, Te(z));
822
+ return G.current = t, t;
728
823
  }, Fe = (e) => {
729
- if (!U || K.current) return;
730
- let t = e.trim(), n = ue.current;
824
+ if (!z || K.current) return;
825
+ let t = e.trim(), n = G.current;
731
826
  if (!(Pe(e) ?? n)) {
732
- let e = c ? Le(U) : void 0;
733
- e ? p?.(e.rootKey, e.path, t) : s?.(U, t), I([...U, t]);
827
+ let e = c ? Qe(z) : void 0;
828
+ e ? p?.(e.rootKey, e.path, t) : s?.(z, t), N([...z, t]);
734
829
  }
735
- W(null);
736
- }, Re = () => W(null);
737
- return /* @__PURE__ */ B("div", {
738
- style: te,
739
- className: L(h && "pointer-events-none opacity-60", A.className),
830
+ V(null);
831
+ }, Ie = () => V(null);
832
+ return /* @__PURE__ */ R("div", {
833
+ style: re,
834
+ className: I(h && "pointer-events-none opacity-60", O.className),
740
835
  children: [
741
- /* @__PURE__ */ z("div", {
742
- className: L("w-full max-w-full min-w-0", Ue.tree),
743
- children: /* @__PURE__ */ z(V, {
744
- items: Se,
836
+ /* @__PURE__ */ L("div", {
837
+ className: I("w-full max-w-full min-w-0", it.tree),
838
+ children: /* @__PURE__ */ L(ue, {
839
+ items: ge,
745
840
  showFiles: !1,
746
- selectedPath: F == null ? void 0 : $(F),
747
- expandedPaths: _e,
748
- onExpandedPathsChange: H,
841
+ selectedPath: M == null ? void 0 : $(M),
842
+ expandedPaths: pe,
843
+ onExpandedPathsChange: ce,
749
844
  loadingPaths: se,
750
845
  onItemClick: (e) => {
751
- let t = F != null && $(F) === e.path;
752
- I(t ? void 0 : me(e.path));
846
+ let t = M != null && $(M) === e.path;
847
+ N(t ? void 0 : ve(e.path));
753
848
  },
754
849
  getContextMenuItems: Ne,
755
- createdFolderPath: Ce,
756
- newFolderDefaultName: le,
850
+ createdFolderPath: ye,
851
+ newFolderDefaultName: U,
757
852
  onCreateFolderSave: Fe,
758
- onCreateFolderCancel: Re,
853
+ onCreateFolderCancel: Ie,
759
854
  onRenameValidate: (e) => Pe(e),
760
- searchQuery: Z ? q : void 0,
761
- emptyStateTitle: Z ? x.replace("{query}", q) : void 0
855
+ searchQuery: X ? q : void 0,
856
+ emptyStateTitle: X ? ee.replace("{query}", q) : void 0
762
857
  })
763
858
  }),
764
- /* @__PURE__ */ z("div", {
765
- className: L("my-2 h-px", Ue.divider),
859
+ /* @__PURE__ */ L("div", {
860
+ className: I("my-2 h-px", it.divider),
766
861
  "aria-hidden": !0
767
862
  }),
768
- /* @__PURE__ */ B("div", {
863
+ /* @__PURE__ */ R("div", {
769
864
  className: "mb-4 flex flex-wrap items-center gap-2",
770
- children: [/* @__PURE__ */ z(g, {
865
+ children: [/* @__PURE__ */ L(v, {
771
866
  onClick: Me,
772
- label: _,
773
- iconBefore: /* @__PURE__ */ z(oe, {
867
+ label: g,
868
+ iconBefore: /* @__PURE__ */ L(B, {
774
869
  size: u.SM,
775
870
  "aria-hidden": !0,
776
871
  stroke: d
777
872
  }),
778
- disabled: h || J || !De
779
- }), J && /* @__PURE__ */ z(g, {
780
- label: v,
781
- onClick: Re,
873
+ disabled: h || de || !De
874
+ }), de && /* @__PURE__ */ L(v, {
875
+ label: _,
876
+ onClick: Ie,
782
877
  disabled: h,
783
- [We]: ""
878
+ [at]: ""
784
879
  })]
785
880
  })
786
881
  ]
787
882
  });
788
- }, Je = { panel: "dial-publish-panel-panel" }, Ye = {
883
+ }, lt = {
789
884
  summaryTitle: "_summaryTitle_zj3gd_1",
790
885
  sectionHeading: "_sectionHeading_zj3gd_5",
791
886
  destination: "_destination_zj3gd_9"
792
- }, 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: te, onAuthorChange: j, publishCredentials: M = !1, onPublishCredentialsChange: N, rules: P, onRulesChange: I, ruleSourceOptions: R, isRulesLoading: re = !1, hasRulesLoadError: ae = !1, labels: oe = {}, summaryTitleClassName: se = "dial-body-semi-text", headingClassName: ce = "dial-body-semi-text", destinationClassName: V = "dial-small-semi-text", calloutFolderNameClassName: H = "dial-small-paragraph-semi-text", styles: le = {} }) => {
793
- let { colors: G, folderTree: ue, accessRules: K } = le, q = {
794
- ...ne({
795
- "--pp-summary-title-text": G?.summaryTitleText,
796
- "--pp-heading-text": G?.headingText,
797
- "--pp-destination-text": G?.destinationText
887
+ }, ut = 200, dt = ({ 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: E, hasSubmitError: D = !1, allowReplace: O = !0, author: k, onAuthorChange: A, publishCredentials: ie = !1, onPublishCredentialsChange: j, rules: M, onRulesChange: N, ruleSourceOptions: P, isRulesLoading: ae = !1, hasRulesLoadError: se = !1, labels: ce = {}, summaryTitleClassName: le = "dial-body-semi-text", headingClassName: B = "dial-body-semi-text", destinationClassName: V = "dial-small-semi-text", calloutFolderNameClassName: H = "dial-small-paragraph-semi-text", styles: ue = {} }) => {
888
+ let { colors: U, folderTree: G, accessRules: q, dependencies: de } = ue, J = {
889
+ ...oe({
890
+ "--pp-summary-title-text": U?.summaryTitleText,
891
+ "--pp-heading-text": U?.headingText,
892
+ "--pp-destination-text": U?.destinationText
798
893
  }),
799
- ...le.cssVars
894
+ ...ue.cssVars
800
895
  }, Y = {
801
- border: G?.summaryBorder,
802
- background: G?.summaryBackground
803
- }, { folderLabel: X = "Publish to folder", destinationAriaLabel: de = "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, createFolderSameAsParentNameError: Se, rootFolderLabel: Ce = "Organization", accessRulesLabels: we, searchPlaceholder: Te, clearSearchAriaLabel: Ee, authorLabel: De = "Author", authorPlaceholder: Oe = "Author name", authorHint: ke = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: je = "Publish with my credentials", credentialsHint: Me = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Ne, Pe] = a(""), Fe = n(), Ie = i(null), Le = i(null), Re = (e) => {
804
- Pe(e ?? "");
805
- }, ze = i(e);
896
+ border: U?.summaryBorder,
897
+ background: U?.summaryBackground
898
+ }, { folderLabel: X = "Publish to folder", destinationAriaLabel: fe = "Destination folder", noFolderSelectedLabel: Q = "No folder selected", changeFolderLabel: pe = "Change", chooseFolderLabel: me = "Choose", replaceWarning: he = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ge = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: _e = "Publishing failed. Please try again.", folderEmptyStateLabel: $, addSiblingFolderLabel: ve, addChildFolderLabel: ye, cancelCreatingFolderLabel: be, createFolderEmptyNameError: xe, createFolderInvalidNameError: Se, createFolderDuplicateNameError: Ce, createFolderSameAsParentNameError: we, rootFolderLabel: Te = "Organization", accessRulesLabels: Ee, dependenciesLabels: De, searchPlaceholder: Oe, clearSearchAriaLabel: ke, authorLabel: Ae = "Author", authorPlaceholder: je = "Author name", authorHint: Me = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Ne = "Publish with my credentials", credentialsHint: Ie = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ce, [Le, Re] = a(""), ze = n(), Be = i(null), Ve = i(null), He = (e) => {
899
+ Re(e ?? "");
900
+ }, Ue = i(e);
806
901
  t(() => {
807
- ze.current !== e && (ze.current = e, e === J.ChangeFolder ? Le.current?.focus({ preventScroll: !0 }) : Ie.current?.focus({ preventScroll: !0 }));
902
+ Ue.current !== e && (Ue.current = e, e === Z.ChangeFolder ? Ve.current?.focus({ preventScroll: !0 }) : Be.current?.focus({ preventScroll: !0 }));
808
903
  }, [e]);
809
- let Be = m != null, Ve = r(() => W({
810
- hasSelectedFolder: Be,
811
- hasExistingPublicationInFolder: C,
812
- hasWriteAccess: E,
813
- isSubmitting: D,
814
- hasSubmitError: O,
815
- allowReplace: A
904
+ let We = h != null, Ke = r(() => K({
905
+ hasSelectedFolder: We,
906
+ hasExistingPublicationInFolder: ne,
907
+ hasWriteAccess: C,
908
+ isSubmitting: E,
909
+ hasSubmitError: D,
910
+ allowReplace: O
816
911
  }), [
817
- Be,
912
+ We,
913
+ ne,
818
914
  C,
819
915
  E,
820
916
  D,
821
- O,
822
- A
823
- ]), He = Be ? m[m.length - 1] ?? Ce : "", Ue = l ? l() : /* @__PURE__ */ z("span", {
824
- className: L("truncate", se, Ye.summaryTitle),
917
+ O
918
+ ]), qe = We ? h[h.length - 1] ?? Te : "", Je = l ? l() : /* @__PURE__ */ L("span", {
919
+ className: I("truncate", le, lt.summaryTitle),
825
920
  children: s?.title
826
921
  });
827
- if (e === J.ChangeFolder) return /* @__PURE__ */ B("div", {
828
- ref: Le,
922
+ if (e === Z.ChangeFolder) return /* @__PURE__ */ R("div", {
923
+ ref: Ve,
829
924
  tabIndex: -1,
830
925
  role: "group",
831
926
  "aria-label": X,
832
- className: L("flex flex-col gap-3 outline-none", Je.panel),
833
- style: q,
834
- children: [/* @__PURE__ */ z("div", {
927
+ className: I("flex flex-col gap-3 outline-none", Fe.panel),
928
+ style: J,
929
+ children: [/* @__PURE__ */ L("div", {
835
930
  role: "search",
836
- children: /* @__PURE__ */ z(k, {
837
- value: Ne,
838
- onChange: Re,
839
- placeholder: Te,
840
- clearLabel: Ee,
841
- "aria-label": Te
931
+ children: /* @__PURE__ */ L(re, {
932
+ value: Le,
933
+ onChange: He,
934
+ placeholder: Oe,
935
+ clearLabel: ke,
936
+ "aria-label": Oe
842
937
  })
843
- }), /* @__PURE__ */ z(qe, {
844
- items: f,
845
- selectedPath: _,
846
- onSelectedPathChange: v,
847
- onCreateFolder: y,
848
- expandedPaths: b,
849
- onExpandedPathsChange: x,
850
- loadingPaths: S,
851
- searchQuery: Ne,
852
- disabled: D,
853
- noResultsLabel: he,
854
- addSiblingFolderLabel: ge,
855
- addChildFolderLabel: _e,
856
- cancelCreatingFolderLabel: ve,
857
- emptyFolderNameError: ye,
858
- invalidFolderNameError: be,
859
- duplicateFolderNameError: xe,
860
- sameAsParentFolderNameError: Se,
861
- rootLabel: Ce,
862
- styles: ue
938
+ }), /* @__PURE__ */ L(ct, {
939
+ items: p,
940
+ selectedPath: g,
941
+ onSelectedPathChange: y,
942
+ onCreateFolder: b,
943
+ expandedPaths: ee,
944
+ onExpandedPathsChange: S,
945
+ loadingPaths: te,
946
+ searchQuery: Le,
947
+ disabled: E,
948
+ noResultsLabel: $,
949
+ addSiblingFolderLabel: ve,
950
+ addChildFolderLabel: ye,
951
+ cancelCreatingFolderLabel: be,
952
+ emptyFolderNameError: xe,
953
+ invalidFolderNameError: Se,
954
+ duplicateFolderNameError: Ce,
955
+ sameAsParentFolderNameError: we,
956
+ rootLabel: Te,
957
+ styles: G
863
958
  })]
864
959
  });
865
- let We = L(V, Ye.destination);
866
- return /* @__PURE__ */ B("div", {
867
- className: L("flex flex-col gap-5", Je.panel),
868
- style: q,
869
- children: [s?.type == null ? /* @__PURE__ */ z(F, {
870
- colors: Y,
871
- children: Ue
872
- }) : /* @__PURE__ */ z(F, {
873
- item: {
874
- type: s.type,
875
- name: s.title,
876
- version: s.version ?? "",
877
- iconUrl: s.iconUrl
878
- },
879
- hasVersionTag: !1,
880
- colors: Y
881
- }), /* @__PURE__ */ B("section", { children: [
882
- /* @__PURE__ */ z("h2", {
883
- className: L("mb-2", ce, Ye.sectionHeading),
884
- children: X
960
+ let Ye = I(V, lt.destination);
961
+ return /* @__PURE__ */ R("div", {
962
+ className: I("flex flex-col gap-5", Fe.panel),
963
+ style: J,
964
+ children: [
965
+ s?.type == null ? /* @__PURE__ */ L(F, {
966
+ colors: Y,
967
+ children: Je
968
+ }) : /* @__PURE__ */ L(F, {
969
+ item: {
970
+ type: s.type,
971
+ name: s.title,
972
+ version: s.version ?? "",
973
+ iconUrl: s.iconUrl
974
+ },
975
+ hasVersionTag: !1,
976
+ colors: Y
885
977
  }),
886
- /* @__PURE__ */ B("div", {
887
- className: "flex min-w-0 items-center gap-2",
888
- children: [/* @__PURE__ */ z("div", {
889
- role: "group",
890
- "aria-label": de,
891
- className: "min-w-0 flex-1",
892
- children: Be ? /* @__PURE__ */ z(h, {
893
- name: [Ce, ...m].join(" / "),
894
- nameClassName: We
895
- }) : /* @__PURE__ */ z("span", {
896
- className: L("block truncate", We),
897
- children: fe
978
+ /* @__PURE__ */ R("section", { children: [
979
+ /* @__PURE__ */ L("h2", {
980
+ className: I("mb-2", B, lt.sectionHeading),
981
+ children: X
982
+ }),
983
+ /* @__PURE__ */ R("div", {
984
+ className: "flex min-w-0 items-center gap-2",
985
+ children: [/* @__PURE__ */ L("div", {
986
+ role: "group",
987
+ "aria-label": fe,
988
+ className: "min-w-0 flex-1",
989
+ children: We ? /* @__PURE__ */ L(_, {
990
+ name: [Te, ...h].join(" / "),
991
+ nameClassName: Ye
992
+ }) : /* @__PURE__ */ L("span", {
993
+ className: I("block truncate", Ye),
994
+ children: Q
995
+ })
996
+ }), /* @__PURE__ */ L(v, {
997
+ ref: Be,
998
+ size: m.Small,
999
+ label: We ? pe : me,
1000
+ iconBefore: /* @__PURE__ */ L(z, {
1001
+ size: u.SM,
1002
+ stroke: d,
1003
+ "aria-hidden": !0
1004
+ }),
1005
+ disabled: E,
1006
+ onClick: o
1007
+ })]
1008
+ }),
1009
+ Ke.calloutKind !== W.None && Ke.calloutKind !== W.Info && /* @__PURE__ */ L("div", {
1010
+ className: "mt-3",
1011
+ children: /* @__PURE__ */ L(w, {
1012
+ type: T.SectionMessage,
1013
+ variant: ft(Ke.calloutKind),
1014
+ message: mt(Ke.calloutKind, {
1015
+ replaceWarning: he,
1016
+ noAccessError: ge,
1017
+ submitError: _e,
1018
+ folderName: qe,
1019
+ version: s?.version,
1020
+ folderNameClassName: H
1021
+ })
898
1022
  })
899
- }), /* @__PURE__ */ z(g, {
900
- ref: Ie,
901
- size: p.Small,
902
- label: Be ? Z : Q,
903
- iconBefore: /* @__PURE__ */ z(ie, {
904
- size: u.SM,
905
- stroke: d,
906
- "aria-hidden": !0
907
- }),
908
- disabled: D,
909
- onClick: o
910
- })]
911
- }),
912
- Ve.calloutKind !== U.None && Ve.calloutKind !== U.Info && /* @__PURE__ */ z("div", {
913
- className: "mt-3",
914
- children: /* @__PURE__ */ z(w, {
915
- type: T.SectionMessage,
916
- variant: Qe(Ve.calloutKind),
917
- message: et(Ve.calloutKind, {
918
- replaceWarning: pe,
919
- noAccessError: $,
920
- submitError: me,
921
- folderName: He,
922
- version: s?.version,
923
- folderNameClassName: H
1023
+ }),
1024
+ /* @__PURE__ */ L("div", {
1025
+ className: "mt-4",
1026
+ children: /* @__PURE__ */ L(x, {
1027
+ id: ze,
1028
+ labelProps: { label: Ae },
1029
+ placeholder: je,
1030
+ caption: Me,
1031
+ value: k,
1032
+ onChange: (e) => A(e ?? ""),
1033
+ maxLength: ut,
1034
+ disabled: E
1035
+ })
1036
+ }),
1037
+ j != null && /* @__PURE__ */ L("div", {
1038
+ className: "mt-4",
1039
+ children: /* @__PURE__ */ L(c, {
1040
+ labelProps: { label: Ne },
1041
+ caption: Ie,
1042
+ isSelected: ie,
1043
+ onChange: j,
1044
+ disabled: E
1045
+ })
1046
+ }),
1047
+ /* @__PURE__ */ L("div", {
1048
+ className: "mt-4",
1049
+ children: /* @__PURE__ */ L(Pe, {
1050
+ rules: M,
1051
+ onRulesChange: N,
1052
+ sourceOptions: P,
1053
+ folderName: We ? qe : void 0,
1054
+ disabled: E,
1055
+ isLoading: ae,
1056
+ hasLoadError: se,
1057
+ labels: Ee,
1058
+ styles: q
924
1059
  })
925
1060
  })
926
- }),
927
- /* @__PURE__ */ z("div", {
928
- className: "mt-4",
929
- children: /* @__PURE__ */ z(ee, {
930
- id: Fe,
931
- labelProps: { label: De },
932
- placeholder: Oe,
933
- caption: ke,
934
- value: te,
935
- onChange: (e) => j(e ?? ""),
936
- maxLength: Xe,
937
- disabled: D
938
- })
939
- }),
940
- N != null && /* @__PURE__ */ z("div", {
941
- className: "mt-4",
942
- children: /* @__PURE__ */ z(c, {
943
- labelProps: { label: je },
944
- caption: Me,
945
- isSelected: M,
946
- onChange: N,
947
- disabled: D
948
- })
949
- }),
950
- /* @__PURE__ */ z("div", {
951
- className: "mt-4",
952
- children: /* @__PURE__ */ z(Ae, {
953
- rules: P,
954
- onRulesChange: I,
955
- sourceOptions: R,
956
- folderName: Be ? He : void 0,
957
- disabled: D,
958
- isLoading: re,
959
- hasLoadError: ae,
960
- labels: we,
961
- styles: K
962
- })
1061
+ ] }),
1062
+ f != null && /* @__PURE__ */ L(Ge, {
1063
+ dependencies: f,
1064
+ labels: De,
1065
+ headingClassName: B,
1066
+ styles: de
963
1067
  })
964
- ] })]
1068
+ ]
965
1069
  });
966
- }, Qe = (e) => e === U.ReplaceWarning ? E.Warning : E.Error, $e = (e, t, n) => {
1070
+ }, ft = (e) => e === W.ReplaceWarning ? E.Warning : E.Error, pt = (e, t, n) => {
967
1071
  let [r, i, ...a] = e.split("{folder}");
968
- return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ B(re, { children: [
1072
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ R(ce, { children: [
969
1073
  r,
970
- /* @__PURE__ */ z("strong", {
1074
+ /* @__PURE__ */ L("strong", {
971
1075
  className: n,
972
1076
  children: t
973
1077
  }),
974
1078
  i
975
1079
  ] });
976
- }, et = (e, t) => e === U.ReplaceWarning ? $e(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === U.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 }) => {
977
- 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;
978
- return /* @__PURE__ */ B("div", {
1080
+ }, mt = (e, t) => e === W.ReplaceWarning ? pt(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === W.NoAccess ? pt(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, ht = { footer: "_footer_dks1v_1" }, gt = ({ 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 }) => {
1081
+ 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;
1082
+ return /* @__PURE__ */ R("div", {
979
1083
  style: p,
980
- 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),
981
- children: [/* @__PURE__ */ z(g, {
1084
+ 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", ht.footer),
1085
+ children: [/* @__PURE__ */ L(v, {
982
1086
  label: m,
983
1087
  className: "mobile:flex-1",
984
1088
  disabled: i,
985
1089
  onClick: a
986
- }), y ? /* @__PURE__ */ z(C, {
987
- label: ee,
1090
+ }), b ? /* @__PURE__ */ L(C, {
1091
+ label: y,
988
1092
  className: "mobile:flex-1",
989
1093
  disabled: l,
990
1094
  onClick: c
991
- }) : /* @__PURE__ */ z(C, {
992
- label: b,
1095
+ }) : /* @__PURE__ */ L(C, {
1096
+ label: x,
993
1097
  className: "mobile:flex-1",
994
1098
  disabled: r,
995
- iconBefore: i ? /* @__PURE__ */ z("span", {
1099
+ iconBefore: i ? /* @__PURE__ */ L("span", {
996
1100
  "aria-hidden": !0,
997
- children: /* @__PURE__ */ z(j, { size: u.SM })
1101
+ children: /* @__PURE__ */ L(ie, { size: u.SM })
998
1102
  }) : void 0,
999
1103
  onClick: o
1000
1104
  })]
1001
1105
  });
1002
- }, rt = {
1106
+ }, _t = {
1003
1107
  backdrop: "_backdrop_16jmd_6",
1004
1108
  panel: "_panel_16jmd_10",
1005
1109
  divider: "_divider_16jmd_15",
1006
1110
  content: "_content_16jmd_19",
1007
1111
  title: "_title_16jmd_24"
1008
- }, 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: j, footerLabels: M, labels: N = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
1009
- let I = ne({
1010
- "--spp-backdrop-bg": F?.backdropBackground,
1011
- "--spp-panel-bg": F?.panelBackground,
1012
- "--spp-panel-border": F?.panelBorder,
1013
- "--spp-divider-border": F?.dividerBorder,
1014
- "--spp-scrollbar-thumb": F?.scrollbarThumb,
1015
- "--spp-title-text": F?.titleText
1016
- }), [R, re] = a(null), { title: ie = "Publish", changeFolderTitle: ae = "Change folder", backAriaLabel: oe = "Back", ariaLabel: se = "Publish", closeAriaLabel: ce = "Close" } = N, V = Y({
1112
+ }, vt = ({ 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 }) => {
1113
+ let P = oe({
1114
+ "--spp-backdrop-bg": N?.backdropBackground,
1115
+ "--spp-panel-bg": N?.panelBackground,
1116
+ "--spp-panel-border": N?.panelBorder,
1117
+ "--spp-divider-border": N?.dividerBorder,
1118
+ "--spp-scrollbar-thumb": N?.scrollbarThumb,
1119
+ "--spp-title-text": N?.titleText
1120
+ }), [F, ae] = a(null), { title: se = "Publish", changeFolderTitle: ce = "Change folder", backAriaLabel: z = "Back", ariaLabel: le = "Publish", closeAriaLabel: B = "Close" } = j, V = fe({
1017
1121
  isOpen: e,
1018
- selectedFolderPath: s,
1019
- onSelectedFolderPathChange: c
1020
- }), H = V.view === J.ChangeFolder, U = r(() => W({
1021
- hasSelectedFolder: s != null,
1022
- hasExistingPublicationInFolder: p,
1023
- hasWriteAccess: m,
1024
- isSubmitting: h,
1025
- hasSubmitError: g,
1026
- allowReplace: _
1122
+ selectedFolderPath: c,
1123
+ onSelectedFolderPathChange: l
1124
+ }), H = V.view === Z.ChangeFolder, ue = r(() => K({
1125
+ hasSelectedFolder: c != null,
1126
+ hasExistingPublicationInFolder: m,
1127
+ hasWriteAccess: h,
1128
+ isSubmitting: g,
1129
+ hasSubmitError: _,
1130
+ allowReplace: v
1027
1131
  }), [
1028
- s,
1029
- p,
1132
+ c,
1030
1133
  m,
1031
1134
  h,
1032
1135
  g,
1033
- _
1136
+ _,
1137
+ v
1034
1138
  ]);
1035
1139
  return t(() => {
1036
- let t = R?.closest("[role=\"dialog\"]");
1140
+ let t = F?.closest("[role=\"dialog\"]");
1037
1141
  if (!e || !t) return;
1038
1142
  let n = () => t.focus({ preventScroll: !0 });
1039
1143
  n();
@@ -1043,225 +1147,226 @@ var H = /* @__PURE__ */ function(e) {
1043
1147
  document.addEventListener("focusin", r);
1044
1148
  let i = requestAnimationFrame(() => {
1045
1149
  document.removeEventListener("focusin", r);
1046
- }), a = T?.current;
1150
+ }), a = w?.current;
1047
1151
  return () => {
1048
1152
  cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
1049
1153
  };
1050
1154
  }, [
1051
1155
  e,
1052
- R,
1053
- T
1054
- ]), /* @__PURE__ */ B(te, {
1156
+ F,
1157
+ w
1158
+ ]), /* @__PURE__ */ R(A, {
1055
1159
  open: e,
1056
- onClose: w,
1057
- header: /* @__PURE__ */ z("span", {
1058
- className: L("block truncate text-center", P, rt.title),
1059
- children: H ? ae : ie
1160
+ onClose: C,
1161
+ header: /* @__PURE__ */ L("span", {
1162
+ className: I("block truncate text-center", M, _t.title),
1163
+ children: H ? ce : se
1060
1164
  }),
1061
- ariaLabel: se,
1165
+ ariaLabel: le,
1062
1166
  onBack: H ? V.backToMain : void 0,
1063
- backAriaLabel: oe,
1064
- backDisabled: h,
1065
- closeAriaLabel: ce,
1066
- closeDisabled: h,
1067
- style: I,
1068
- overlayStyle: I,
1069
- className: L(rt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1070
- overlayClassName: rt.backdrop,
1071
- headerClassName: L("px-[22px]", rt.divider),
1167
+ backAriaLabel: z,
1168
+ backDisabled: g,
1169
+ closeAriaLabel: B,
1170
+ closeDisabled: g,
1171
+ style: P,
1172
+ overlayStyle: P,
1173
+ className: I(_t.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1174
+ overlayClassName: _t.backdrop,
1175
+ headerClassName: I("px-[22px]", _t.divider),
1072
1176
  bodyClassName: "flex flex-col overflow-hidden",
1073
- children: [/* @__PURE__ */ z("div", {
1074
- ref: re,
1075
- className: L("min-h-0 flex-1 overflow-y-auto", rt.content),
1076
- children: /* @__PURE__ */ z("div", {
1177
+ children: [/* @__PURE__ */ L("div", {
1178
+ ref: ae,
1179
+ className: I("min-h-0 flex-1 overflow-y-auto", _t.content),
1180
+ children: /* @__PURE__ */ L("div", {
1077
1181
  className: "p-[22px]",
1078
- children: /* @__PURE__ */ z(Ze, {
1182
+ children: /* @__PURE__ */ L(dt, {
1079
1183
  resource: n,
1080
1184
  renderSummary: i,
1185
+ dependencies: o,
1081
1186
  view: V.view,
1082
1187
  onChangeFolderClick: V.openFolderView,
1083
- folderItems: o,
1084
- selectedFolderPath: s,
1188
+ folderItems: s,
1189
+ selectedFolderPath: c,
1085
1190
  pendingFolderPath: V.pendingFolderPath,
1086
1191
  onPendingFolderPathChange: V.setPendingFolderPath,
1087
- onCreateFolder: l,
1088
- expandedPaths: u,
1089
- onExpandedPathsChange: d,
1090
- loadingPaths: f,
1091
- hasExistingPublicationInFolder: p,
1092
- hasWriteAccess: m,
1093
- isSubmitting: h,
1094
- hasSubmitError: g,
1095
- allowReplace: _,
1096
- author: v,
1097
- onAuthorChange: ee,
1098
- rules: y,
1099
- onRulesChange: b,
1100
- ruleSourceOptions: x,
1101
- isRulesLoading: S,
1102
- hasRulesLoadError: C,
1103
- labels: D,
1104
- styles: O,
1105
- summaryTitleClassName: k,
1106
- headingClassName: A,
1107
- calloutFolderNameClassName: j
1192
+ onCreateFolder: u,
1193
+ expandedPaths: d,
1194
+ onExpandedPathsChange: f,
1195
+ loadingPaths: p,
1196
+ hasExistingPublicationInFolder: m,
1197
+ hasWriteAccess: h,
1198
+ isSubmitting: g,
1199
+ hasSubmitError: _,
1200
+ allowReplace: v,
1201
+ author: y,
1202
+ onAuthorChange: b,
1203
+ rules: x,
1204
+ onRulesChange: ee,
1205
+ ruleSourceOptions: S,
1206
+ isRulesLoading: te,
1207
+ hasRulesLoadError: ne,
1208
+ labels: E,
1209
+ styles: D,
1210
+ summaryTitleClassName: O,
1211
+ headingClassName: re,
1212
+ calloutFolderNameClassName: k
1108
1213
  })
1109
1214
  })
1110
- }), /* @__PURE__ */ z(nt, {
1215
+ }), /* @__PURE__ */ L(gt, {
1111
1216
  version: n?.version,
1112
- hasExistingPublicationInFolder: p,
1113
- allowReplace: _,
1114
- isSubmitDisabled: U.isSubmitDisabled,
1115
- isSubmitLoading: U.isSubmitLoading,
1116
- onCancel: H ? V.backToMain : w,
1117
- onSubmit: E,
1217
+ hasExistingPublicationInFolder: m,
1218
+ allowReplace: v,
1219
+ isSubmitDisabled: ue.isSubmitDisabled,
1220
+ isSubmitLoading: ue.isSubmitLoading,
1221
+ onCancel: H ? V.backToMain : C,
1222
+ onSubmit: T,
1118
1223
  view: V.view,
1119
1224
  onSelectFolder: V.selectFolder,
1120
1225
  isSelectFolderDisabled: V.pendingFolderPath == null,
1121
- labels: M
1226
+ labels: ie
1122
1227
  })]
1123
1228
  });
1124
- }, 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 }) => {
1125
- 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;
1126
- return /* @__PURE__ */ z(P, {
1229
+ }, yt = { option: "_option_skygm_1" }, bt = (e, t) => `Unpublish "${e}" from "${t}"?`, xt = (e) => `Choose which folder to unpublish "${e}" from.`, St = ({ 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 }) => {
1230
+ let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = bt, selectFolderMessage: y = xt } = o ?? {}, b = n.length > 1;
1231
+ return /* @__PURE__ */ L(N, {
1127
1232
  open: e,
1128
1233
  title: f,
1129
1234
  confirmLabel: p,
1130
1235
  cancelLabel: m,
1131
1236
  variant: l.Danger,
1132
1237
  isLoading: a,
1133
- isConfirmDisabled: y && r == null,
1238
+ isConfirmDisabled: b && r == null,
1134
1239
  loadingStatusLabel: _,
1135
- message: /* @__PURE__ */ z("span", {
1240
+ message: /* @__PURE__ */ L("span", {
1136
1241
  className: "wrap-break-word",
1137
- children: y ? ee(t) : v(t, he(n[0] ?? "", h))
1242
+ children: b ? y(t) : v(t, ye(n[0] ?? "", h))
1138
1243
  }),
1139
1244
  onConfirm: u,
1140
1245
  onClose: d,
1141
- children: y && /* @__PURE__ */ z("div", {
1246
+ children: b && /* @__PURE__ */ L("div", {
1142
1247
  className: "mt-3",
1143
- style: ne({ "--ucd-option-text": c?.optionText }),
1144
- children: /* @__PURE__ */ z(O, {
1248
+ style: oe({ "--ucd-option-text": c?.optionText }),
1249
+ children: /* @__PURE__ */ L(O, {
1145
1250
  ariaLabel: g,
1146
1251
  value: r ?? void 0,
1147
1252
  onChange: i,
1148
1253
  disabled: a,
1149
1254
  items: n.map((e) => ({
1150
1255
  value: e,
1151
- label: he(e, h)
1256
+ label: ye(e, h)
1152
1257
  })),
1153
- radioClassName: L(s, at.option)
1258
+ radioClassName: I(s, yt.option)
1154
1259
  })
1155
1260
  })
1156
1261
  });
1157
- }, lt = /* @__PURE__ */ function(e) {
1262
+ }, Ct = /* @__PURE__ */ function(e) {
1158
1263
  return e.Keep = "keep", e.New = "new", e;
1159
- }({}), ut = /* @__PURE__ */ function(e) {
1264
+ }({}), wt = /* @__PURE__ */ function(e) {
1160
1265
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
1161
- }({}), dt = {
1266
+ }({}), Tt = {
1162
1267
  heading: "_heading_vk731_1",
1163
1268
  destination: "_destination_vk731_5"
1164
- }, 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: te = "dial-body-semi-text", destinationClassName: j = "dial-small-semi-text" }) => {
1165
- let { saveToFolderHeading: M = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: I = "Version", keepVersionLabel: R = "Keep version {version}", saveAsNewVersionLabel: re = "Save as new version", newVersionLabel: ae = "Version", newVersionPlaceholder: oe = "Enter new version", searchPlaceholder: se = "Search folders", clearSearchAriaLabel: ce = "Clear search", folderEmptyStateLabel: V, createFolderLabel: H, cancelCreatingFolderLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: le, createFolderEmptyNameError: G, createFolderInvalidNameError: ue, createFolderDuplicateNameError: K, createFolderSameAsParentNameError: q, retryLabel: J = "Retry" } = D, { colors: Y, folderTree: X } = A, de = {
1166
- ...ne({
1167
- "--stf-heading-text": Y?.headingText,
1168
- "--stf-destination-text": Y?.destinationText
1269
+ }, Et = ({ 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" }) => {
1270
+ 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 = {
1271
+ ...oe({
1272
+ "--stf-heading-text": J?.headingText,
1273
+ "--stf-destination-text": J?.destinationText
1169
1274
  }),
1170
- ...A.cssVars
1171
- }, fe = {
1172
- border: Y?.summaryBorder,
1173
- background: Y?.summaryBackground
1174
- }, [Z, Q] = a(""), pe = n(), $ = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), me = i.find((e) => e.key === f?.rootKey), he = f ? f.path[f.path.length - 1] ?? me?.label : void 0, ge = L(te, dt.heading);
1175
- if (e === ut.ChangeFolder) return /* @__PURE__ */ B("div", {
1275
+ ...E.cssVars
1276
+ }, Z = {
1277
+ border: J?.summaryBorder,
1278
+ background: J?.summaryBackground
1279
+ }, [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, Tt.heading);
1280
+ if (e === wt.ChangeFolder) return /* @__PURE__ */ R("div", {
1176
1281
  className: "flex flex-col gap-3",
1177
- style: de,
1282
+ style: X,
1178
1283
  children: [
1179
- /* @__PURE__ */ z("div", {
1284
+ /* @__PURE__ */ L("div", {
1180
1285
  role: "search",
1181
- children: /* @__PURE__ */ z(k, {
1182
- value: Z,
1286
+ children: /* @__PURE__ */ L(re, {
1287
+ value: fe,
1183
1288
  onChange: (e) => Q(e ?? ""),
1184
- placeholder: se,
1185
- clearLabel: ce,
1186
- "aria-label": se
1289
+ placeholder: ce,
1290
+ clearLabel: le,
1291
+ "aria-label": ce
1187
1292
  })
1188
1293
  }),
1189
- /* @__PURE__ */ z(b, {
1190
- politeness: S.Assertive,
1191
- children: T && /* @__PURE__ */ B("div", {
1294
+ /* @__PURE__ */ L(S, {
1295
+ politeness: ne.Assertive,
1296
+ children: C && /* @__PURE__ */ R("div", {
1192
1297
  className: "flex flex-wrap items-center gap-2",
1193
- children: [/* @__PURE__ */ z(m, { text: T }), E && /* @__PURE__ */ z(y, {
1194
- label: J,
1195
- onClick: E
1298
+ children: [/* @__PURE__ */ L(h, { text: C }), w && /* @__PURE__ */ L(ee, {
1299
+ label: de,
1300
+ onClick: w
1196
1301
  })]
1197
1302
  })
1198
1303
  }),
1199
- /* @__PURE__ */ z(qe, {
1304
+ /* @__PURE__ */ L(ct, {
1200
1305
  roots: i,
1201
1306
  destination: f,
1202
- onDestinationChange: _,
1307
+ onDestinationChange: p,
1203
1308
  onCreateDestinationFolder: s,
1204
- searchQuery: Z,
1205
- disabled: C,
1206
- noResultsLabel: V,
1207
- createFolderLabel: H,
1208
- cancelCreatingFolderLabel: U,
1209
- addSiblingFolderLabel: W,
1210
- addChildFolderLabel: le,
1211
- emptyFolderNameError: G,
1212
- invalidFolderNameError: ue,
1309
+ searchQuery: fe,
1310
+ disabled: b,
1311
+ noResultsLabel: B,
1312
+ createFolderLabel: V,
1313
+ cancelCreatingFolderLabel: H,
1314
+ addSiblingFolderLabel: ue,
1315
+ addChildFolderLabel: U,
1316
+ emptyFolderNameError: W,
1317
+ invalidFolderNameError: G,
1213
1318
  duplicateFolderNameError: K,
1214
1319
  sameAsParentFolderNameError: q,
1215
- styles: X
1320
+ styles: Y
1216
1321
  }),
1217
- x && me?.hasAccessRules && /* @__PURE__ */ z("div", {
1322
+ y && he?.hasAccessRules && /* @__PURE__ */ L("div", {
1218
1323
  className: "mt-1",
1219
- children: /* @__PURE__ */ z(Ae, {
1220
- rules: x.rules,
1221
- onRulesChange: x.onRulesChange,
1222
- sourceOptions: x.sourceOptions,
1223
- folderName: he,
1224
- disabled: C,
1225
- isLoading: x.isLoading,
1226
- hasLoadError: x.hasLoadError,
1227
- labels: x.labels,
1228
- styles: x.styles
1324
+ children: /* @__PURE__ */ L(Pe, {
1325
+ rules: y.rules,
1326
+ onRulesChange: y.onRulesChange,
1327
+ sourceOptions: y.sourceOptions,
1328
+ folderName: ge,
1329
+ disabled: b,
1330
+ isLoading: y.isLoading,
1331
+ hasLoadError: y.hasLoadError,
1332
+ labels: y.labels,
1333
+ styles: y.styles
1229
1334
  })
1230
1335
  })
1231
1336
  ]
1232
1337
  });
1233
- let _e = v ? [{
1234
- value: lt.Keep,
1235
- label: R.replace("{version}", v.currentVersion)
1338
+ let $ = g ? [{
1339
+ value: Ct.Keep,
1340
+ label: N.replace("{version}", g.currentVersion)
1236
1341
  }, {
1237
- value: lt.New,
1238
- label: re,
1239
- content: /* @__PURE__ */ z(ee, {
1342
+ value: Ct.New,
1343
+ label: P,
1344
+ content: /* @__PURE__ */ L(x, {
1240
1345
  id: pe,
1241
- value: v.newVersion,
1242
- onChange: (e) => v.onNewVersionChange(e ?? ""),
1243
- onBlur: v.onNewVersionBlur,
1346
+ value: g.newVersion,
1347
+ onChange: (e) => g.onNewVersionChange(e ?? ""),
1348
+ onBlur: g.onNewVersionBlur,
1244
1349
  labelProps: {
1245
1350
  label: ae,
1246
1351
  required: !0
1247
1352
  },
1248
- placeholder: oe,
1249
- error: v.newVersionError,
1250
- invalid: !!v.newVersionError,
1251
- disabled: C
1353
+ placeholder: se,
1354
+ error: g.newVersionError,
1355
+ invalid: !!g.newVersionError,
1356
+ disabled: b
1252
1357
  })
1253
1358
  }] : [];
1254
- return /* @__PURE__ */ B("div", {
1359
+ return /* @__PURE__ */ R("div", {
1255
1360
  className: "flex flex-col gap-5",
1256
- style: de,
1361
+ style: X,
1257
1362
  children: [
1258
- t.type == null ? /* @__PURE__ */ z(F, {
1259
- colors: fe,
1260
- children: /* @__PURE__ */ z("span", {
1261
- className: L("truncate", ge),
1363
+ t.type == null ? /* @__PURE__ */ L(F, {
1364
+ colors: Z,
1365
+ children: /* @__PURE__ */ L("span", {
1366
+ className: I("truncate", _e),
1262
1367
  children: t.title
1263
1368
  })
1264
- }) : /* @__PURE__ */ z(F, {
1369
+ }) : /* @__PURE__ */ L(F, {
1265
1370
  item: {
1266
1371
  type: t.type,
1267
1372
  name: t.title,
@@ -1269,146 +1374,146 @@ var H = /* @__PURE__ */ function(e) {
1269
1374
  iconUrl: t.iconUrl
1270
1375
  },
1271
1376
  hasVersionTag: !1,
1272
- colors: fe
1377
+ colors: Z
1273
1378
  }),
1274
- /* @__PURE__ */ B("section", {
1379
+ /* @__PURE__ */ R("section", {
1275
1380
  className: "flex flex-col gap-2",
1276
- children: [/* @__PURE__ */ z("h2", {
1277
- className: ge,
1278
- children: M
1279
- }), /* @__PURE__ */ B("div", {
1381
+ children: [/* @__PURE__ */ L("h2", {
1382
+ className: _e,
1383
+ children: A
1384
+ }), /* @__PURE__ */ R("div", {
1280
1385
  className: "flex min-w-0 items-center gap-2",
1281
- children: [/* @__PURE__ */ z("div", {
1386
+ children: [/* @__PURE__ */ L("div", {
1282
1387
  role: "group",
1283
- "aria-label": P,
1388
+ "aria-label": j,
1284
1389
  className: "min-w-0 flex-1",
1285
- children: /* @__PURE__ */ z(h, {
1286
- name: $.join(" / "),
1287
- nameClassName: L(j, dt.destination)
1390
+ children: /* @__PURE__ */ L(_, {
1391
+ name: me.join(" / "),
1392
+ nameClassName: I(k, Tt.destination)
1288
1393
  })
1289
- }), /* @__PURE__ */ z(g, {
1394
+ }), /* @__PURE__ */ L(v, {
1290
1395
  ref: l,
1291
- size: p.Small,
1292
- label: N,
1293
- iconBefore: /* @__PURE__ */ z(ie, {
1396
+ size: m.Small,
1397
+ label: ie,
1398
+ iconBefore: /* @__PURE__ */ L(z, {
1294
1399
  size: u.SM,
1295
1400
  stroke: d,
1296
1401
  "aria-hidden": !0
1297
1402
  }),
1298
- disabled: C,
1403
+ disabled: b,
1299
1404
  onClick: c
1300
1405
  })]
1301
1406
  })]
1302
1407
  }),
1303
- v && /* @__PURE__ */ B("section", {
1408
+ g && /* @__PURE__ */ R("section", {
1304
1409
  className: "flex flex-col gap-2",
1305
- children: [/* @__PURE__ */ z("h2", {
1306
- className: ge,
1307
- children: I
1308
- }), /* @__PURE__ */ z(O, {
1309
- ariaLabel: I,
1310
- value: v.versionMode,
1311
- onChange: (e) => v.onVersionModeChange(e),
1312
- items: _e,
1313
- disabled: C
1410
+ children: [/* @__PURE__ */ L("h2", {
1411
+ className: _e,
1412
+ children: M
1413
+ }), /* @__PURE__ */ L(O, {
1414
+ ariaLabel: M,
1415
+ value: g.versionMode,
1416
+ onChange: (e) => g.onVersionModeChange(e),
1417
+ items: $,
1418
+ disabled: b
1314
1419
  })]
1315
1420
  }),
1316
- /* @__PURE__ */ z(b, {
1317
- politeness: S.Assertive,
1318
- children: w && /* @__PURE__ */ z(m, { text: w })
1421
+ /* @__PURE__ */ L(S, {
1422
+ politeness: ne.Assertive,
1423
+ children: te && /* @__PURE__ */ L(h, { text: te })
1319
1424
  })
1320
1425
  ]
1321
1426
  });
1322
- }, pt = {
1427
+ }, Dt = {
1323
1428
  backdrop: "_backdrop_1ie8s_6",
1324
1429
  panel: "_panel_1ie8s_10",
1325
1430
  divider: "_divider_1ie8s_15",
1326
1431
  footer: "_footer_1ie8s_19",
1327
1432
  content: "_content_1ie8s_23",
1328
1433
  title: "_title_1ie8s_28"
1329
- }, 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, ..._ }) => {
1330
- 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({
1434
+ }, Ot = ({ 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 }) => {
1435
+ 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({
1331
1436
  "--sstf-backdrop-bg": l?.backdropBackground,
1332
1437
  "--sstf-panel-bg": l?.panelBackground,
1333
1438
  "--sstf-panel-border": l?.panelBorder,
1334
1439
  "--sstf-divider-border": l?.dividerBorder,
1335
1440
  "--sstf-scrollbar-thumb": l?.scrollbarThumb,
1336
1441
  "--sstf-title-text": l?.titleText
1337
- }), [O, k] = a(ut.Main), [A, M] = a(f), N = i(null), P = i(null);
1442
+ }), [T, E] = a(wt.Main), [O, re] = a(f), k = i(null), j = i(null);
1338
1443
  t(() => {
1339
- e && k(ut.Main);
1444
+ e && E(wt.Main);
1340
1445
  }, [e]);
1341
- let F = i(O);
1446
+ let M = i(T);
1342
1447
  t(() => {
1343
- F.current !== O && (F.current = O, O === ut.ChangeFolder ? N.current?.focus({ preventScroll: !0 }) : P.current?.focus({ preventScroll: !0 }));
1344
- }, [O]);
1345
- let I = i(e);
1448
+ M.current !== T && (M.current = T, T === wt.ChangeFolder ? k.current?.focus({ preventScroll: !0 }) : j.current?.focus({ preventScroll: !0 }));
1449
+ }, [T]);
1450
+ let N = i(e);
1346
1451
  t(() => {
1347
- let t = I.current;
1348
- I.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1452
+ let t = N.current;
1453
+ N.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1349
1454
  }, [e, s]);
1350
- let R = O === ut.ChangeFolder, re = (e) => {
1351
- M(e), h?.(e);
1352
- }, ie = () => {
1353
- re(f), k(ut.ChangeFolder);
1455
+ let P = T === wt.ChangeFolder, F = (e) => {
1456
+ re(e), h?.(e);
1354
1457
  }, ae = () => {
1355
- h?.(f), k(ut.Main);
1356
- }, oe = () => {
1357
- A && p(A), k(ut.Main);
1458
+ F(f), E(wt.ChangeFolder);
1459
+ }, se = () => {
1460
+ h?.(f), E(wt.Main);
1461
+ }, ce = () => {
1462
+ O && p(O), E(wt.Main);
1358
1463
  };
1359
- return /* @__PURE__ */ B(te, {
1464
+ return /* @__PURE__ */ R(A, {
1360
1465
  open: e,
1361
1466
  onClose: n,
1362
- header: /* @__PURE__ */ z("span", {
1363
- ref: N,
1467
+ header: /* @__PURE__ */ L("span", {
1468
+ ref: k,
1364
1469
  tabIndex: -1,
1365
- className: L("block truncate outline-none", d, pt.title),
1366
- children: R ? ee : v
1470
+ className: I("block truncate outline-none", d, Dt.title),
1471
+ children: P ? y : _
1367
1472
  }),
1368
- ariaLabel: v,
1369
- onBack: R ? ae : void 0,
1370
- backAriaLabel: b,
1473
+ ariaLabel: _,
1474
+ onBack: P ? se : void 0,
1475
+ backAriaLabel: x,
1371
1476
  backDisabled: m,
1372
- closeAriaLabel: y,
1477
+ closeAriaLabel: b,
1373
1478
  closeDisabled: m,
1374
- style: E,
1375
- overlayStyle: E,
1376
- className: L(pt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1377
- overlayClassName: pt.backdrop,
1378
- headerClassName: L("px-[22px]", pt.divider),
1479
+ style: w,
1480
+ overlayStyle: w,
1481
+ className: I(Dt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1482
+ overlayClassName: Dt.backdrop,
1483
+ headerClassName: I("px-[22px]", Dt.divider),
1379
1484
  bodyClassName: "flex flex-col overflow-hidden",
1380
- children: [/* @__PURE__ */ z("div", {
1381
- className: L("min-h-0 flex-1 overflow-y-auto p-[22px]", pt.content),
1382
- children: /* @__PURE__ */ z(ft, {
1383
- ..._,
1384
- view: O,
1485
+ children: [/* @__PURE__ */ L("div", {
1486
+ className: I("min-h-0 flex-1 overflow-y-auto p-[22px]", Dt.content),
1487
+ children: /* @__PURE__ */ L(Et, {
1488
+ ...g,
1489
+ view: T,
1385
1490
  destination: f,
1386
1491
  onDestinationChange: p,
1387
1492
  isSubmitting: m,
1388
- onChangeFolderClick: ie,
1389
- changeFolderButtonRef: P,
1390
- pendingDestination: A,
1391
- onPendingDestinationChange: re
1493
+ onChangeFolderClick: ae,
1494
+ changeFolderButtonRef: j,
1495
+ pendingDestination: O,
1496
+ onPendingDestinationChange: F
1392
1497
  })
1393
- }), /* @__PURE__ */ B("div", {
1394
- className: L("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", pt.footer),
1395
- children: [/* @__PURE__ */ z(g, {
1396
- label: x,
1498
+ }), /* @__PURE__ */ R("div", {
1499
+ className: I("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", Dt.footer),
1500
+ children: [/* @__PURE__ */ L(v, {
1501
+ label: ee,
1397
1502
  className: "mobile:flex-1",
1398
1503
  disabled: m,
1399
- onClick: R ? ae : n
1400
- }), R ? /* @__PURE__ */ z(C, {
1401
- label: T,
1504
+ onClick: P ? se : n
1505
+ }), P ? /* @__PURE__ */ L(C, {
1506
+ label: ne,
1402
1507
  className: "mobile:flex-1",
1403
- disabled: A == null,
1404
- onClick: oe
1405
- }) : /* @__PURE__ */ z(D, {
1406
- label: m ? w : S,
1508
+ disabled: O == null,
1509
+ onClick: ce
1510
+ }) : /* @__PURE__ */ L(D, {
1511
+ label: m ? te : S,
1407
1512
  className: "mobile:flex-1",
1408
1513
  disabled: o || m,
1409
- iconBefore: m ? /* @__PURE__ */ z("span", {
1514
+ iconBefore: m ? /* @__PURE__ */ L("span", {
1410
1515
  "aria-hidden": !0,
1411
- children: /* @__PURE__ */ z(j, { size: u.SM })
1516
+ children: /* @__PURE__ */ L(ie, { size: u.SM })
1412
1517
  }) : void 0,
1413
1518
  onClick: r
1414
1519
  })]
@@ -1416,4 +1521,4 @@ var H = /* @__PURE__ */ function(e) {
1416
1521
  });
1417
1522
  };
1418
1523
  //#endregion
1419
- export { Je as PUBLISH_PANEL_CLASS, H as PublicationRuleFunction, Ee as PublishAccessRuleEditor, Ae as PublishAccessRules, U 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, W as derivePublishState, X as filterFolderTree, G as formatPublishedDate, me as fromFolderPathKey, be as getSiblingFolderNames, ye as getUniqueFolderName, Q as mergeFolderPaths, fe as sortFolderTree, ge as toDialFileTree, $ as toFolderPathKey, q as usePublishFlow, Y as usePublishFolderView, ve as validateFolderName };
1524
+ export { Fe as PUBLISH_PANEL_CLASS, U as PublicationRuleFunction, Ae as PublishAccessRuleEditor, Pe as PublishAccessRules, W as PublishCalloutKind, Ge as PublishDependenciesList, G as PublishDependencyType, ct as PublishFoldersTree, gt as PublishFooter, qe as PublishHistoryList, dt as PublishPanel, Z as PublishPanelView, Et as SaveToFolderPanel, wt as SaveToFolderView, Ct as SaveVersionMode, vt as StandalonePublishPanel, Ot as StandaloneSaveToFolderPanel, St 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 };