@epam/ai-dial-publish-panel 1.3.0-dev.147 → 1.3.0-dev.152

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,46 @@
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 { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, GhostButton as d, GhostIconButton as f, Highlight as p, Input as m, NeutralButton as h, Notification as g, NotificationType as _, NotificationVariant as v, Search as y, Select as ee, SideDrawer as b, Spinner as x, Tag as S, TagInput as te } from "@epam/ai-dial-ui-kit";
2
+ import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, NeutralButton as g, Notification as _, NotificationType as ee, NotificationVariant as v, Search as te, Select as y, SideDrawer as b, Spinner as x, Tag as S, TagInput as ne } from "@epam/ai-dial-ui-kit";
3
3
  import { ResourceSummary as C, TAG_INPUT_TAG_CLASS_NAME as w, buildCssVars as T, mergeClasses as E } from "@epam/ai-dial-chat-shared";
4
4
  import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
5
- import { IconFolderPlus as A, IconPlus as j, IconTrashX as ne } from "@tabler/icons-react";
6
- import { DialFileNodeType as re, DialFoldersTree as ie } from "@epam/ai-dial-react-file-manager";
5
+ import { IconFolderPlus as re, IconPlus as ie, IconTrashX as ae } from "@tabler/icons-react";
6
+ import { DialFileNodeType as oe, DialFoldersTree as se } from "@epam/ai-dial-react-file-manager";
7
7
  //#region src/models/publish.ts
8
- var M = /* @__PURE__ */ function(e) {
8
+ var A = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), N = /* @__PURE__ */ function(e) {
10
+ }({}), j = /* @__PURE__ */ function(e) {
11
11
  return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
- }({}), ae = (e) => e.isSubmitting ? {
13
- calloutKind: N.None,
12
+ }({}), M = (e) => e.isSubmitting ? {
13
+ calloutKind: j.None,
14
14
  isSubmitDisabled: !0,
15
15
  isSubmitLoading: !0
16
16
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
17
- calloutKind: N.SubmitError,
17
+ calloutKind: j.SubmitError,
18
18
  isSubmitDisabled: !1,
19
19
  isSubmitLoading: !1
20
20
  } : e.hasExistingPublicationInFolder ? {
21
- calloutKind: N.ReplaceWarning,
21
+ calloutKind: j.ReplaceWarning,
22
22
  isSubmitDisabled: e.allowReplace === !1,
23
23
  isSubmitLoading: !1
24
24
  } : {
25
- calloutKind: N.Info,
25
+ calloutKind: j.Info,
26
26
  isSubmitDisabled: !1,
27
27
  isSubmitLoading: !1
28
28
  } : {
29
- calloutKind: N.NoAccess,
29
+ calloutKind: j.NoAccess,
30
30
  isSubmitDisabled: !0,
31
31
  isSubmitLoading: !1
32
32
  } : {
33
- calloutKind: N.None,
33
+ calloutKind: j.None,
34
34
  isSubmitDisabled: !0,
35
35
  isSubmitLoading: !1
36
- }, P = 864e5, F = (e, t = Date.now(), n) => {
37
- let r = Math.floor((t - e) / P);
36
+ }, N = 864e5, P = (e, t = Date.now(), n) => {
37
+ let r = Math.floor((t - e) / N);
38
38
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
39
39
  month: "short",
40
40
  day: "numeric",
41
41
  year: "numeric"
42
42
  });
43
- }, I = (e, t, n) => t.length === 0 ? [...e, {
43
+ }, ce = (e, t, n) => t.length === 0 ? [...e, {
44
44
  path: [n],
45
45
  name: n
46
46
  }] : e.map((e) => e.path.join("/") === t.join("/") ? {
@@ -51,46 +51,46 @@ var M = /* @__PURE__ */ function(e) {
51
51
  }]
52
52
  } : {
53
53
  ...e,
54
- children: e.children ? I(e.children, t, n) : e.children
55
- }), L = (e, t, n) => {
54
+ children: e.children ? ce(e.children, t, n) : e.children
55
+ }), F = (e, t, n) => {
56
56
  let r = [...t, n].join("/");
57
57
  return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
58
58
  ...e,
59
59
  children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
60
60
  } : {
61
61
  ...e,
62
- children: e.children ? L(e.children, t, n) : e.children
62
+ children: e.children ? F(e.children, t, n) : e.children
63
63
  });
64
- }, R = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
64
+ }, I = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
65
65
  let [m, h] = a(o);
66
66
  t(() => {
67
67
  h(o);
68
68
  }, [o]);
69
- let [g, _] = a(), [v, y] = a(!1), [ee, b] = a(!1), [x, S] = a([]), [te, C] = a(!1), [w, T] = a(!1), [E, D] = a(c), [O, k] = a(!1), [A, j] = a(!1);
69
+ let [g, _] = a(), [ee, v] = a(!1), [te, y] = a(!1), [b, x] = a([]), [S, ne] = a(!1), [C, w] = a(!1), [T, E] = a(c), [D, O] = a(!1), [k, re] = a(!1);
70
70
  t(() => {
71
- A || D(c);
72
- }, [c, A]);
73
- let ne = e((e) => {
74
- j(!0), D(e);
71
+ k || E(c);
72
+ }, [c, k]);
73
+ let ie = e((e) => {
74
+ re(!0), E(e);
75
75
  }, []);
76
76
  t(() => {
77
77
  if (g == null) {
78
- S([]), T(!1);
78
+ x([]), w(!1);
79
79
  return;
80
80
  }
81
81
  if (!p) return;
82
82
  let e = !1;
83
- return C(!0), T(!1), p(g).then((t) => {
84
- e || S(t);
83
+ return ne(!0), w(!1), p(g).then((t) => {
84
+ e || x(t);
85
85
  }).catch(() => {
86
- e || T(!0);
86
+ e || w(!0);
87
87
  }).finally(() => {
88
- e || C(!1);
88
+ e || ne(!1);
89
89
  }), () => {
90
90
  e = !0;
91
91
  };
92
92
  }, [g]);
93
- let re = r(() => {
93
+ let ae = r(() => {
94
94
  if (!g) return !1;
95
95
  let e = g.join("/");
96
96
  return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
@@ -98,70 +98,70 @@ var M = /* @__PURE__ */ function(e) {
98
98
  i,
99
99
  n.version,
100
100
  g
101
- ]), ie = e(async (e, t) => {
102
- h((n) => I(n, e, t));
101
+ ]), oe = e(async (e, t) => {
102
+ h((n) => ce(n, e, t));
103
103
  try {
104
104
  await l?.(e, t);
105
105
  } catch {
106
- h((n) => L(n, e, t)), b(!0);
106
+ h((n) => F(n, e, t)), y(!0);
107
107
  }
108
- }, [l]), M = e(async () => {
108
+ }, [l]), se = e(async () => {
109
109
  if (!g) return !1;
110
- y(!0), b(!1);
110
+ v(!0), y(!1);
111
111
  try {
112
- return await u(n, g, x, E.trim(), O), d?.(n, g), !0;
112
+ return await u(n, g, b, T.trim(), D), d?.(n, g), !0;
113
113
  } catch (e) {
114
- return b(!0), f?.(n, g, e), !1;
114
+ return y(!0), f?.(n, g, e), !1;
115
115
  } finally {
116
- y(!1);
116
+ v(!1);
117
117
  }
118
118
  }, [
119
- E,
119
+ T,
120
120
  n,
121
121
  u,
122
122
  f,
123
123
  d,
124
- O,
125
- x,
124
+ D,
125
+ b,
126
126
  g
127
- ]), N = e(() => {
128
- h(o), _(void 0), b(!1), S([]), T(!1), D(c), j(!1), k(!1);
127
+ ]), A = e(() => {
128
+ h(o), _(void 0), y(!1), x([]), w(!1), E(c), re(!1), O(!1);
129
129
  }, [c, o]);
130
130
  return {
131
131
  folderItems: m,
132
132
  selectedFolderPath: g,
133
133
  setSelectedFolderPath: _,
134
- handleCreateFolder: ie,
135
- hasExistingPublicationInFolder: re,
134
+ handleCreateFolder: oe,
135
+ hasExistingPublicationInFolder: ae,
136
136
  hasWriteAccess: !g || s(g),
137
- isSubmitting: v,
138
- hasSubmitError: ee,
139
- handleSubmit: M,
140
- reset: N,
141
- rules: x,
142
- setRules: S,
143
- author: E,
144
- setAuthor: ne,
145
- publishCredentials: O,
146
- setPublishCredentials: k,
147
- isRulesLoading: te,
148
- hasRulesLoadError: w
137
+ isSubmitting: ee,
138
+ hasSubmitError: te,
139
+ handleSubmit: se,
140
+ reset: A,
141
+ rules: b,
142
+ setRules: x,
143
+ author: T,
144
+ setAuthor: ie,
145
+ publishCredentials: D,
146
+ setPublishCredentials: O,
147
+ isRulesLoading: S,
148
+ hasRulesLoadError: C
149
149
  };
150
- }, oe = (e, t) => {
150
+ }, L = (e, t) => {
151
151
  let n = t.trim().toLowerCase();
152
152
  return n ? e.reduce((e, r) => {
153
- let i = r.children ? oe(r.children, t) : void 0;
153
+ let i = r.children ? L(r.children, t) : void 0;
154
154
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
155
155
  ...r,
156
156
  children: i
157
157
  }), e;
158
158
  }, []) : e;
159
- }, z = (e, t) => e.localeCompare(t, void 0, {
159
+ }, R = (e, t) => e.localeCompare(t, void 0, {
160
160
  sensitivity: "base",
161
161
  numeric: !0
162
- }), se = (e) => [...e].sort((e, t) => z(e.name, t.name)).map((e) => e.children ? {
162
+ }), z = (e) => [...e].sort((e, t) => R(e.name, t.name)).map((e) => e.children ? {
163
163
  ...e,
164
- children: se(e.children)
164
+ children: z(e.children)
165
165
  } : e), B = (e, t, n) => {
166
166
  let [r, ...i] = t;
167
167
  if (r == null) return e;
@@ -174,25 +174,25 @@ var M = /* @__PURE__ */ function(e) {
174
174
  name: r,
175
175
  children: i.length ? B([], i, a) : void 0
176
176
  }];
177
- }, ce = (e, t) => t.reduce((e, t) => t.length ? B(e, t, []) : e, e), V = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? V(e.children) : []]), H = (e) => e.join("/"), U = (e) => e.split("/").filter(Boolean), W = (e) => e.map((e) => {
177
+ }, le = (e, t) => t.reduce((e, t) => t.length ? B(e, t, []) : e, e), V = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? V(e.children) : []]), H = (e) => e.join("/"), U = (e) => e.split("/").filter(Boolean), ue = (e) => e.map((e) => {
178
178
  let t = H(e.path);
179
179
  return {
180
180
  path: t,
181
181
  name: e.name,
182
182
  folderId: t,
183
183
  nodeType: u.FOLDER,
184
- items: e.children ? W(e.children) : void 0
184
+ items: e.children ? ue(e.children) : void 0
185
185
  };
186
- }), G = /[/\\:;,={}&"]/, K = (e, t, n) => {
186
+ }), W = /[/\\:;,={}&"]/, de = (e, t, n) => {
187
187
  let r = e.trim();
188
- return r ? r.includes("..") || G.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
- }, le = (e, t) => {
188
+ return r ? r.includes("..") || W.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
+ }, fe = (e, t) => {
190
190
  let n = new Set(t.map((e) => e.toLowerCase()));
191
191
  if (!n.has(e.toLowerCase())) return e;
192
192
  let r = 2;
193
193
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
194
194
  return `${e} ${r}`;
195
- }, ue = (e, t) => {
195
+ }, G = (e, t) => {
196
196
  if (t.length === 0) return e.map((e) => e.name);
197
197
  let n = H(t), r = (e) => {
198
198
  for (let t of e) {
@@ -202,130 +202,129 @@ var M = /* @__PURE__ */ function(e) {
202
202
  }
203
203
  };
204
204
  return (r(e)?.children ?? []).map((e) => e.name);
205
- }, q = {
205
+ }, K = {
206
206
  dialog: "_dialog_jqcm2_5",
207
207
  error: "_error_jqcm2_14",
208
208
  selectField: "_selectField_jqcm2_28",
209
209
  selectFieldOpen: "_selectFieldOpen_jqcm2_40"
210
- }, J = 20, Y = 200, de = 8, fe = (e) => {
210
+ }, q = 20, J = 200, pe = 8, me = (e) => {
211
211
  let t = e.trim();
212
- if (t.length === 0 || t.length > Y) return !1;
212
+ if (t.length === 0 || t.length > J) return !1;
213
213
  try {
214
214
  return new RegExp(t) instanceof RegExp;
215
215
  } catch {
216
216
  return !1;
217
217
  }
218
- }, pe = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = J, labels: u = {}, errorClassName: f = "dial-small-text", styles: g = {} }) => {
219
- let _ = {
218
+ }, he = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = q, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: _ = {} }) => {
219
+ let ee = {
220
220
  ...T({
221
- "--pare-mobile-bg": g.colors?.mobileBackground,
222
- "--pare-bg": g.colors?.background,
223
- "--pare-error-text": g.colors?.errorText,
224
- "--pare-select-border": g.colors?.selectBorder,
225
- "--pare-select-border-hover": g.colors?.selectBorderHover,
226
- "--pare-select-border-open": g.colors?.selectBorderOpen,
227
- "--pare-select-border-focus": g.colors?.selectBorderFocus
221
+ "--pare-mobile-bg": _.colors?.mobileBackground,
222
+ "--pare-bg": _.colors?.background,
223
+ "--pare-error-text": _.colors?.errorText,
224
+ "--pare-select-border": _.colors?.selectBorder,
225
+ "--pare-select-border-hover": _.colors?.selectBorderHover,
226
+ "--pare-select-border-open": _.colors?.selectBorderOpen,
227
+ "--pare-select-border-focus": _.colors?.selectBorderFocus
228
228
  }),
229
- ...g.cssVars
230
- }, { sourceLabel: v = "Source", sourcePlaceholder: y = "Select...", functionLabel: b = "Function", equalOptionLabel: x = "Equal", containOptionLabel: S = "Contain", regexOptionLabel: C = "Regex", targetsLabel: D = "Targets", targetsPlaceholder: A = "Add a target", targetsHintLabel: j = "Press Enter or comma to add a target.", patternLabel: ne = "Pattern", patternPlaceholder: re = "Enter a regular expression", invalidRegexError: ie = "Enter a valid regular expression.", requiredFieldError: N = "This field is required.", targetsRequiredError: ae = "Add at least one target.", saveLabel: P = "Save", cancelLabel: F = "Cancel", dialogAriaLabel: I = "Add access rule" } = u, L = n(), R = n(), oe = n(), z = n(), se = i(null);
229
+ ..._.cssVars
230
+ }, { sourceLabel: v = "Source", sourcePlaceholder: te = "Select...", functionLabel: b = "Function", equalOptionLabel: x = "Equal", containOptionLabel: S = "Contain", regexOptionLabel: C = "Regex", targetsLabel: D = "Targets", targetsPlaceholder: re = "Add a target", targetsHintLabel: ie = "Press Enter or comma to add a target.", patternLabel: ae = "Pattern", patternPlaceholder: oe = "Enter a regular expression", invalidRegexError: se = "Enter a valid regular expression.", requiredFieldError: j = "This field is required.", targetsRequiredError: M = "Add at least one target.", saveLabel: N = "Save", cancelLabel: P = "Cancel", dialogAriaLabel: ce = "Add access rule" } = u, F = n(), I = n(), L = n(), R = n(), z = i(null);
231
231
  t(() => {
232
- se.current?.focus();
232
+ z.current?.focus();
233
233
  }, []);
234
- let [B, ce] = a(), [V, H] = a(), [U, W] = a([]), [G, K] = a(""), [le, ue] = a(!1), [Y, pe] = a(""), [X, me] = a(!1), [Z, he] = a(!1), Q = E(q.selectField, le && q.selectFieldOpen), ge = E(q.selectField, X && q.selectFieldOpen), _e = r(() => e.map((e) => ({
234
+ let [B, le] = a(), [V, H] = a(), [U, ue] = a([]), [W, de] = a(""), [fe, G] = a(!1), [J, he] = a(""), [Y, ge] = a(!1), [X, _e] = a(!1), Z = E(K.selectField, fe && K.selectFieldOpen), ve = E(K.selectField, Y && K.selectFieldOpen), ye = r(() => e.map((e) => ({
235
235
  value: e,
236
236
  label: e,
237
- labelNode: Y.trim() ? /* @__PURE__ */ O(p, {
237
+ labelNode: J.trim() ? /* @__PURE__ */ O(m, {
238
238
  text: e,
239
- query: Y,
239
+ query: J,
240
240
  maxLines: 1
241
241
  }) : void 0
242
- })), [e, Y]), ve = r(() => [
242
+ })), [e, J]), be = r(() => [
243
243
  {
244
- value: M.Equal,
244
+ value: A.Equal,
245
245
  label: x
246
246
  },
247
247
  {
248
- value: M.Contain,
248
+ value: A.Contain,
249
249
  label: S
250
250
  },
251
251
  {
252
- value: M.Regex,
252
+ value: A.Regex,
253
253
  label: C
254
254
  }
255
255
  ], [
256
256
  x,
257
257
  S,
258
258
  C
259
- ]), ye = V === M.Regex, $ = fe(G), be = B != null && V != null && (ye ? $ : U.length > 0);
259
+ ]), Q = V === A.Regex, $ = me(W), xe = B != null && V != null && (Q ? $ : U.length > 0);
260
260
  return /* @__PURE__ */ k("div", {
261
- ref: se,
261
+ ref: z,
262
262
  role: "dialog",
263
263
  "aria-modal": "true",
264
- "aria-label": I,
264
+ "aria-label": ce,
265
265
  tabIndex: -1,
266
266
  onKeyDown: (e) => {
267
267
  e.key === "Escape" && (e.stopPropagation(), s());
268
268
  },
269
- style: _,
270
- className: E("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", q.dialog),
269
+ style: ee,
270
+ className: E("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", K.dialog),
271
271
  children: [
272
- /* @__PURE__ */ O(ee, {
273
- id: R,
272
+ /* @__PURE__ */ O(y, {
273
+ id: I,
274
274
  labelProps: { label: v },
275
- options: _e,
275
+ options: ye,
276
276
  value: B,
277
277
  onChange: (e) => {
278
- ce(Array.isArray(e) ? e[0] : e), ue(!1);
278
+ le(Array.isArray(e) ? e[0] : e), G(!1);
279
279
  },
280
- placeholder: y,
281
- searchable: e.length > de,
282
- searchPlaceholder: y,
283
- onSearchQueryChange: pe,
280
+ placeholder: te,
281
+ searchable: e.length > pe,
282
+ searchPlaceholder: te,
283
+ onSearchQueryChange: he,
284
284
  disabled: c,
285
- open: le,
286
- onOpenChange: ue,
287
- fieldClassName: Q,
288
- invalid: Z && B == null,
289
- error: Z && B == null ? N : void 0
285
+ open: fe,
286
+ onOpenChange: G,
287
+ fieldClassName: Z,
288
+ invalid: X && B == null,
289
+ error: X && B == null ? j : void 0
290
290
  }),
291
- /* @__PURE__ */ O(ee, {
291
+ /* @__PURE__ */ O(y, {
292
292
  labelProps: { label: b },
293
- id: oe,
294
- options: ve,
293
+ id: L,
294
+ options: be,
295
295
  value: V,
296
296
  onChange: (e) => {
297
297
  let t = Array.isArray(e) ? e[0] : e;
298
- V === M.Regex != (t === M.Regex) && (W([]), K("")), H(t), me(!1);
298
+ V === A.Regex != (t === A.Regex) && (ue([]), de("")), H(t), ge(!1);
299
299
  },
300
300
  placeholder: b,
301
301
  disabled: c,
302
- open: X,
303
- onOpenChange: me,
304
- fieldClassName: ge,
305
- invalid: Z && V == null,
306
- error: Z && V == null ? N : void 0
302
+ open: Y,
303
+ onOpenChange: ge,
304
+ fieldClassName: ve,
305
+ invalid: X && V == null,
306
+ error: X && V == null ? j : void 0
307
307
  }),
308
- ye ? /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O(m, {
309
- id: `${L}-input`,
310
- labelProps: { label: ne },
311
- placeholder: re,
312
- value: G,
313
- onChange: (e) => K(e ?? ""),
314
- invalid: (G.length > 0 || Z) && !$,
315
- "aria-describedby": (G.length > 0 || Z) && !$ ? L : void 0,
308
+ Q ? /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O(h, {
309
+ id: `${F}-input`,
310
+ labelProps: { label: ae },
311
+ placeholder: oe,
312
+ value: W,
313
+ onChange: (e) => de(e ?? ""),
314
+ invalid: (W.length > 0 || X) && !$,
315
+ "aria-describedby": (W.length > 0 || X) && !$ ? F : void 0,
316
316
  disabled: c
317
- }), (G.length > 0 || Z) && !$ && /* @__PURE__ */ O("span", {
318
- id: L,
319
- role: "alert",
320
- className: E("mt-1 block", f, q.error),
321
- children: ie
322
- })] }) : /* @__PURE__ */ O(te, {
323
- id: z,
317
+ }), (W.length > 0 || X) && !$ && /* @__PURE__ */ O(d, {
318
+ id: F,
319
+ className: E("mt-1 block", p, K.error),
320
+ text: se
321
+ })] }) : /* @__PURE__ */ O(ne, {
322
+ id: R,
324
323
  labelProps: { label: D },
325
- placeholder: A,
326
- caption: Z && U.length === 0 ? void 0 : j,
327
- error: Z && U.length === 0 ? ae : void 0,
328
- invalid: Z && U.length === 0,
324
+ placeholder: re,
325
+ caption: X && U.length === 0 ? void 0 : ie,
326
+ error: X && U.length === 0 ? M : void 0,
327
+ invalid: X && U.length === 0,
329
328
  value: U,
330
329
  onChange: (e) => {
331
330
  let t = [];
@@ -333,24 +332,24 @@ var M = /* @__PURE__ */ function(e) {
333
332
  let e = n.trim();
334
333
  if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= l)) break;
335
334
  }
336
- W(t);
335
+ ue(t);
337
336
  },
338
337
  disabled: c,
339
338
  tagClassName: w
340
339
  }),
341
340
  /* @__PURE__ */ k("div", {
342
341
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
343
- children: [/* @__PURE__ */ O(d, {
344
- label: F,
342
+ children: [/* @__PURE__ */ O(f, {
343
+ label: P,
345
344
  onClick: s,
346
345
  disabled: c
347
- }), /* @__PURE__ */ O(h, {
348
- label: P,
346
+ }), /* @__PURE__ */ O(g, {
347
+ label: N,
349
348
  onClick: () => {
350
- !be || B == null || V == null ? he(!0) : o({
349
+ !xe || B == null || V == null ? _e(!0) : o({
351
350
  source: B,
352
351
  function: V,
353
- targets: ye ? [G.trim()] : U
352
+ targets: Q ? [W.trim()] : U
354
353
  });
355
354
  },
356
355
  disabled: c
@@ -358,164 +357,164 @@ var M = /* @__PURE__ */ function(e) {
358
357
  })
359
358
  ]
360
359
  });
361
- }, X = {
360
+ }, Y = {
362
361
  ruleRow: "_ruleRow_nx0en_1",
363
362
  heading: "_heading_nx0en_5",
364
363
  hint: "_hint_nx0en_9",
365
364
  loading: "_loading_nx0en_13",
366
365
  ruleText: "_ruleText_nx0en_17"
367
- }, me = 20, Z = (e, t) => e === M.Equal ? t.equal : e === M.Contain ? t.contain : t.regex, he = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: p = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: y = me, maxTargetsPerRule: ee, labels: b = {}, headingClassName: S = "dial-body-semi-text", hintClassName: te = "dial-small-text", loadingClassName: C = "dial-small-text", ruleTextClassName: w = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: A = {} }) => {
366
+ }, ge = 20, X = (e, t) => e === A.Equal ? t.equal : e === A.Contain ? t.contain : t.regex, _e = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: g = ge, maxTargetsPerRule: te, labels: y = {}, headingClassName: b = "dial-body-semi-text", hintClassName: S = "dial-small-text", loadingClassName: ne = "dial-small-text", ruleTextClassName: C = "dial-small-text", ruleSourceClassName: w = "dial-small-semi-text", styles: D = {} }) => {
368
367
  let re = {
369
368
  ...T({
370
- "--par-rule-bg": A.colors?.ruleBackground,
371
- "--par-heading-text": A.colors?.headingText,
372
- "--par-hint-text": A.colors?.hintText,
373
- "--par-loading-text": A.colors?.loadingText,
374
- "--par-rule-text": A.colors?.ruleText
369
+ "--par-rule-bg": D.colors?.ruleBackground,
370
+ "--par-heading-text": D.colors?.headingText,
371
+ "--par-hint-text": D.colors?.hintText,
372
+ "--par-loading-text": D.colors?.loadingText,
373
+ "--par-rule-text": D.colors?.ruleText
375
374
  }),
376
- ...A.cssVars
377
- }, { heading: ie = "Allow access if all match", folderScopeHint: M = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: N = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: ae = "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: L = "Or", removeRuleAriaLabelTemplate: R = "Remove rule for {source}: {targets}", equalFunctionLabel: oe = "Equal", containFunctionLabel: z = "Contain", regexFunctionLabel: se = "Regex", loadingLabel: B = "Loading existing rules…", loadErrorLabel: ce = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: V = "Rule added.", ruleRemovedAnnouncement: H = "Rule removed.", rulesClearedAnnouncement: U = "All rules cleared.", rulesLoadedAnnouncement: W = "Existing rules loaded for the selected folder.", editorLabels: G } = b, K = n(), [le, ue] = a(!1), [q, J] = a(""), Y = i(null), de = i(m);
375
+ ...D.cssVars
376
+ }, { heading: oe = "Allow access if all match", folderScopeHint: se = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: A = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: j = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: M = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: N = "Add rule", clearAllLabel: P = "Clear all", orSeparatorLabel: ce = "Or", removeRuleAriaLabelTemplate: F = "Remove rule for {source}: {targets}", equalFunctionLabel: I = "Equal", containFunctionLabel: L = "Contain", regexFunctionLabel: R = "Regex", loadingLabel: z = "Loading existing rules…", loadErrorLabel: B = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: le = "Rule added.", ruleRemovedAnnouncement: V = "Rule removed.", rulesClearedAnnouncement: H = "All rules cleared.", rulesLoadedAnnouncement: U = "Existing rules loaded for the selected folder.", editorLabels: ue } = y, W = n(), [de, fe] = a(!1), [G, K] = a(""), q = i(null), J = i(m);
378
377
  t(() => {
379
- de.current && !m && e.length > 0 && J(W), de.current = m;
378
+ J.current && !m && e.length > 0 && K(U), J.current = m;
380
379
  }, [
381
380
  m,
382
381
  e,
383
- W
382
+ U
384
383
  ]);
385
- let fe = () => {
386
- Y.current = document.activeElement, ue(!0);
387
- }, he = () => {
388
- ue(!1), Y.current?.focus?.();
389
- }, Q = (t) => {
390
- r([...e, t]), J(V), he();
391
- }, ge = (t) => {
392
- r(e.filter((e, n) => n !== t)), J(H);
393
- }, _e = () => {
394
- r([]), J(U);
395
- }, ve = {
396
- equal: oe,
397
- contain: z,
398
- regex: se
399
- }, ye = e.length >= y, $ = p || ye, be = u != null && u !== "";
384
+ let pe = () => {
385
+ q.current = document.activeElement, fe(!0);
386
+ }, me = () => {
387
+ fe(!1), q.current?.focus?.();
388
+ }, _e = (t) => {
389
+ r([...e, t]), K(le), me();
390
+ }, Z = (t) => {
391
+ r(e.filter((e, n) => n !== t)), K(V);
392
+ }, ve = () => {
393
+ r([]), K(H);
394
+ }, ye = {
395
+ equal: I,
396
+ contain: L,
397
+ regex: R
398
+ }, be = e.length >= g, Q = d || be, $ = u != null && u !== "";
400
399
  return /* @__PURE__ */ k("div", {
401
400
  role: "group",
402
- "aria-labelledby": K,
401
+ "aria-labelledby": W,
403
402
  style: re,
404
- className: E(p && "pointer-events-none opacity-60"),
403
+ className: E(d && "pointer-events-none opacity-60"),
405
404
  children: [
406
405
  /* @__PURE__ */ O("span", {
407
406
  role: "status",
408
407
  "aria-live": "polite",
409
408
  className: "sr-only",
410
- children: q
409
+ children: G
411
410
  }),
412
411
  /* @__PURE__ */ k("div", {
413
412
  className: "mb-1 flex items-center justify-between gap-2",
414
413
  children: [/* @__PURE__ */ O("div", {
415
- id: K,
416
- className: E(S, X.heading),
417
- children: ie
418
- }), e.length > 0 && /* @__PURE__ */ O(d, {
414
+ id: W,
415
+ className: E(b, Y.heading),
416
+ children: oe
417
+ }), e.length > 0 && /* @__PURE__ */ O(f, {
419
418
  variant: o.Primary,
420
- label: I,
421
- onClick: _e,
422
- disabled: p
419
+ label: P,
420
+ onClick: ve,
421
+ disabled: d
423
422
  })]
424
423
  }),
425
424
  /* @__PURE__ */ O("p", {
426
- className: E("mb-2", te, X.hint),
427
- children: be ? M.replace("{folder}", u) : N
425
+ className: E("mb-2", S, Y.hint),
426
+ children: $ ? se.replace("{folder}", u) : A
428
427
  }),
429
- e.length > 0 && !be && /* @__PURE__ */ O("div", {
428
+ e.length > 0 && !$ && /* @__PURE__ */ O("div", {
430
429
  className: "mb-2",
431
- children: /* @__PURE__ */ O(g, {
432
- type: _.SectionMessage,
430
+ children: /* @__PURE__ */ O(_, {
431
+ type: ee.SectionMessage,
433
432
  variant: v.Warning,
434
- message: ae
433
+ message: j
435
434
  })
436
435
  }),
437
436
  m && /* @__PURE__ */ k("div", {
438
- className: E("mb-2 flex items-center gap-2", C, X.loading),
437
+ className: E("mb-2 flex items-center gap-2", ne, Y.loading),
439
438
  children: [/* @__PURE__ */ O(x, {
440
439
  size: 16,
441
- ariaLabel: B
442
- }), /* @__PURE__ */ O("span", { children: B })]
440
+ ariaLabel: z
441
+ }), /* @__PURE__ */ O("span", { children: z })]
443
442
  }),
444
443
  h && /* @__PURE__ */ O("div", {
445
444
  className: "mb-2",
446
- children: /* @__PURE__ */ O(g, {
447
- type: _.SectionMessage,
445
+ children: /* @__PURE__ */ O(_, {
446
+ type: ee.SectionMessage,
448
447
  variant: v.Warning,
449
- message: ce
448
+ message: B
450
449
  })
451
450
  }),
452
451
  e.length > 0 && /* @__PURE__ */ O("ul", {
453
452
  className: "mb-3 flex flex-col gap-2",
454
453
  children: e.map((e, t) => {
455
- let n = e.targets.join(` ${L} `), r = R.replace("{source}", e.source).replace("{targets}", n);
454
+ let n = e.targets.join(` ${ce} `), r = F.replace("{source}", e.source).replace("{targets}", n);
456
455
  return /* @__PURE__ */ k("li", {
457
- className: E("flex items-center justify-between gap-2 rounded-lg px-3 py-2", X.ruleRow),
456
+ className: E("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Y.ruleRow),
458
457
  children: [/* @__PURE__ */ k("span", {
459
- className: E("truncate", w, X.ruleText),
458
+ className: E("truncate", C, Y.ruleText),
460
459
  children: [
461
460
  /* @__PURE__ */ O("span", {
462
- className: D,
461
+ className: w,
463
462
  children: e.source
464
463
  }),
465
464
  " ",
466
- Z(e.function, ve),
465
+ X(e.function, ye),
467
466
  ": ",
468
467
  n
469
468
  ]
470
- }), /* @__PURE__ */ O(f, {
471
- icon: /* @__PURE__ */ O(ne, {
469
+ }), /* @__PURE__ */ O(p, {
470
+ icon: /* @__PURE__ */ O(ae, {
472
471
  size: c.SM,
473
472
  "aria-hidden": !0,
474
473
  stroke: l
475
474
  }),
476
475
  "aria-label": r,
477
- onClick: () => ge(t),
478
- disabled: p
476
+ onClick: () => Z(t),
477
+ disabled: d
479
478
  })]
480
479
  }, t);
481
480
  })
482
481
  }),
483
- le && /* @__PURE__ */ O(pe, {
482
+ de && /* @__PURE__ */ O(he, {
484
483
  sourceOptions: s,
485
- onSave: Q,
486
- onCancel: he,
487
- disabled: p,
488
- maxTargets: ee,
489
- labels: G,
490
- styles: A.editor
484
+ onSave: _e,
485
+ onCancel: me,
486
+ disabled: d,
487
+ maxTargets: te,
488
+ labels: ue,
489
+ styles: D.editor
491
490
  }),
492
491
  /* @__PURE__ */ O("div", {
493
492
  className: "flex flex-wrap items-center gap-2",
494
- children: /* @__PURE__ */ O(d, {
495
- label: F,
496
- iconBefore: /* @__PURE__ */ O(j, {
493
+ children: /* @__PURE__ */ O(f, {
494
+ label: N,
495
+ iconBefore: /* @__PURE__ */ O(ie, {
497
496
  size: c.SM,
498
497
  "aria-hidden": !0,
499
498
  stroke: l
500
499
  }),
501
- onClick: fe,
502
- disabled: $
500
+ onClick: pe,
501
+ disabled: Q
503
502
  })
504
503
  }),
505
- ye && /* @__PURE__ */ O("p", {
506
- className: E("mt-2", te, X.hint),
507
- children: P.replace("{max}", String(y))
504
+ be && /* @__PURE__ */ O("p", {
505
+ className: E("mt-2", S, Y.hint),
506
+ children: M.replace("{max}", String(g))
508
507
  })
509
508
  ]
510
509
  });
511
- }, Q = {
510
+ }, Z = {
512
511
  currentBadge: "_currentBadge_d0adf_1",
513
512
  sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
514
513
  version: "_version_d0adf_13",
515
514
  date: "_date_d0adf_17",
516
515
  emptyState: "_emptyState_d0adf_21",
517
516
  stripedRow: "_stripedRow_d0adf_25"
518
- }, ge = ({ 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 }) => {
517
+ }, ve = ({ 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 }) => {
519
518
  let m = T({
520
519
  "--phl-badge-border": p?.currentBadgeBorder,
521
520
  "--phl-badge-bg": p?.currentBadgeBackground,
@@ -527,7 +526,7 @@ var M = /* @__PURE__ */ function(e) {
527
526
  "--phl-date-text": p?.dateText,
528
527
  "--phl-empty-text": p?.emptyStateText,
529
528
  "--phl-striped-bg": p?.stripedBackground
530
- }), h = E(f, Q.emptyState);
529
+ }), h = E(f, Z.emptyState);
531
530
  return n ? /* @__PURE__ */ O("p", {
532
531
  style: m,
533
532
  className: h,
@@ -544,13 +543,13 @@ var M = /* @__PURE__ */ function(e) {
544
543
  }) : /* @__PURE__ */ O("ul", {
545
544
  style: m,
546
545
  children: e.map((e, n) => /* @__PURE__ */ k("li", {
547
- className: E("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
546
+ className: E("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Z.stripedRow),
548
547
  children: [/* @__PURE__ */ k("span", {
549
548
  className: "flex min-w-0 items-center gap-2",
550
549
  style: m,
551
550
  children: [
552
551
  /* @__PURE__ */ k("span", {
553
- className: E(u, Q.version),
552
+ className: E(u, Z.version),
554
553
  children: [
555
554
  i,
556
555
  " ",
@@ -559,182 +558,182 @@ var M = /* @__PURE__ */ function(e) {
559
558
  }),
560
559
  e.version === t && /* @__PURE__ */ O(S, {
561
560
  label: a,
562
- className: E("shrink-0 whitespace-nowrap", Q.currentBadge)
561
+ className: E("shrink-0 whitespace-nowrap", Z.currentBadge)
563
562
  }),
564
563
  e.publishCredentials === !0 && /* @__PURE__ */ O(S, {
565
564
  label: o,
566
- className: E("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
565
+ className: E("shrink-0 whitespace-nowrap", Z.sharedCredentialsBadge)
567
566
  })
568
567
  ]
569
568
  }), /* @__PURE__ */ O("span", {
570
- className: E(d, Q.date),
571
- children: F(e.publishedAt)
569
+ className: E(d, Z.date),
570
+ children: P(e.publishedAt)
572
571
  })]
573
572
  }, `${e.version}-${n}`))
574
573
  });
575
- }, _e = {
574
+ }, ye = {
576
575
  divider: "_divider_1gs31_1",
577
576
  tree: "_tree_1gs31_17"
578
- }, ve = "data-cancel-creating-folder", ye = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: f = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError: y = "Folder name cannot be empty.", invalidFolderNameError: ee = "Folder name contains invalid characters.", duplicateFolderNameError: b = "A folder with this name already exists.", rootLabel: x = "Organization", expandedPaths: S, onExpandedPathsChange: te, loadingPaths: C, styles: w = {} }) => {
579
- let D = {
580
- ...T({ "--pft-divider": w.colors?.divider }),
581
- ...w.cssVars
582
- }, [ne, M] = a(() => new Set(n?.map((e, t) => H(n.slice(0, t + 1))) ?? [])), N = S ?? ne, ae = (e) => {
577
+ }, be = "data-cancel-creating-folder", Q = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: ee = "No folders match \"{query}\".", emptyFolderNameError: v = "Folder name cannot be empty.", invalidFolderNameError: te = "Folder name contains invalid characters.", duplicateFolderNameError: y = "A folder with this name already exists.", rootLabel: b = "Organization", expandedPaths: x, onExpandedPathsChange: S, loadingPaths: ne, styles: C = {} }) => {
578
+ let w = {
579
+ ...T({ "--pft-divider": C.colors?.divider }),
580
+ ...C.cssVars
581
+ }, [D, ae] = a(() => new Set(n?.map((e, t) => H(n.slice(0, t + 1))) ?? [])), A = x ?? D, j = (e) => {
583
582
  let t = new Set(e);
584
- t.delete(""), te ? te(t) : M(t);
585
- }, [P, F] = a(null), [I, L] = a(_), R = i(null), z = i(!1);
583
+ t.delete(""), S ? S(t) : ae(t);
584
+ }, [M, N] = a(null), [P, ce] = a(_), F = i(null), I = i(!1);
586
585
  t(() => {
587
586
  let e = (e) => {
588
- e.target instanceof Element && e.target.closest(`[${ve}]`) && (z.current = !0);
587
+ e.target instanceof Element && e.target.closest(`[${be}]`) && (I.current = !0);
589
588
  };
590
589
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
591
590
  }, []);
592
- let B = u.trim(), ce = P != null, G = r(() => oe(e, u), [e, u]), q = B.length > 0 && G.length === 0, J = !ce && B.length > 0, Y = r(() => se(J ? G : e), [
593
- J,
594
- G,
591
+ let R = u.trim(), B = M != null, le = r(() => L(e, u), [e, u]), W = R.length > 0 && le.length === 0, K = !B && R.length > 0, q = r(() => z(K ? le : e), [
592
+ K,
593
+ le,
595
594
  e
596
- ]), de = r(() => /* @__PURE__ */ new Set(["", ...V(Y)]), [Y]), fe = r(() => /* @__PURE__ */ new Set(["", ...J ? de : N]), [
595
+ ]), J = r(() => /* @__PURE__ */ new Set(["", ...V(q)]), [q]), pe = r(() => /* @__PURE__ */ new Set(["", ...K ? J : A]), [
596
+ K,
597
597
  J,
598
- de,
599
- N
600
- ]), pe = r(() => W(Y), [Y]), X = r(() => J && pe.length === 0 ? [] : [{
598
+ A
599
+ ]), me = r(() => ue(q), [q]), he = r(() => K && me.length === 0 ? [] : [{
601
600
  path: "",
602
- name: x,
601
+ name: b,
603
602
  folderId: "",
604
- nodeType: re.FOLDER,
605
- items: pe
603
+ nodeType: oe.FOLDER,
604
+ items: me
606
605
  }], [
607
- pe,
608
- x,
609
- J
610
- ]), me = P ? H(P) : null, Z = {
611
- empty: y,
612
- invalid: ee,
613
- duplicate: b
614
- }, he = (t) => le(q && K(B, [], Z) == null ? B : _, ue(e, t)), Q = (e) => {
615
- F(e), L(he(e)), R.current = null, z.current = !1;
606
+ me,
607
+ b,
608
+ K
609
+ ]), Y = M ? H(M) : null, ge = {
610
+ empty: v,
611
+ invalid: te,
612
+ duplicate: y
613
+ }, X = (t) => fe(W && de(R, [], ge) == null ? R : _, G(e, t)), _e = (e) => {
614
+ N(e), ce(X(e)), F.current = null, I.current = !1;
616
615
  let t = H(e);
617
- t && ae(new Set(N).add(t));
618
- }, ge = () => Q(n ?? []), ye = (e) => {
616
+ t && j(new Set(A).add(t));
617
+ }, Z = () => _e(n ?? []), ve = (e) => {
619
618
  let t = U(e.path), n = [{
620
619
  key: "add-child",
621
620
  label: g,
622
- icon: /* @__PURE__ */ O(A, {
621
+ icon: /* @__PURE__ */ O(re, {
623
622
  size: c.SM,
624
623
  "aria-hidden": !0,
625
624
  stroke: l
626
625
  }),
627
- onClick: () => Q(t)
626
+ onClick: () => _e(t)
628
627
  }];
629
628
  return e.path !== "" && n.push({
630
629
  key: "add-sibling",
631
630
  label: h,
632
- icon: /* @__PURE__ */ O(j, {
631
+ icon: /* @__PURE__ */ O(ie, {
633
632
  size: c.SM,
634
633
  "aria-hidden": !0,
635
634
  stroke: l
636
635
  }),
637
- onClick: () => Q(t.slice(0, -1))
636
+ onClick: () => _e(t.slice(0, -1))
638
637
  }), n;
639
- }, $ = (t) => {
640
- if (!P) return null;
641
- let n = K(t, ue(e, P), Z);
642
- return R.current = n, n;
643
- }, be = (e) => {
644
- if (!P || z.current) return;
645
- let t = e.trim(), n = R.current;
646
- ($(e) ?? n) || (s(P, t), o([...P, t])), F(null);
647
- }, xe = () => F(null);
638
+ }, Q = (t) => {
639
+ if (!M) return null;
640
+ let n = de(t, G(e, M), ge);
641
+ return F.current = n, n;
642
+ }, $ = (e) => {
643
+ if (!M || I.current) return;
644
+ let t = e.trim(), n = F.current;
645
+ (Q(e) ?? n) || (s(M, t), o([...M, t])), N(null);
646
+ }, xe = () => N(null);
648
647
  return /* @__PURE__ */ k("div", {
649
- style: D,
650
- className: E(f && "pointer-events-none opacity-60", w.className),
648
+ style: w,
649
+ className: E(d && "pointer-events-none opacity-60", C.className),
651
650
  children: [
652
651
  /* @__PURE__ */ O("div", {
653
- className: E("w-full max-w-full min-w-0", _e.tree),
654
- children: /* @__PURE__ */ O(ie, {
655
- items: X,
652
+ className: E("w-full max-w-full min-w-0", ye.tree),
653
+ children: /* @__PURE__ */ O(se, {
654
+ items: he,
656
655
  showFiles: !1,
657
656
  selectedPath: n == null ? void 0 : H(n),
658
- expandedPaths: fe,
659
- onExpandedPathsChange: ae,
660
- loadingPaths: C,
657
+ expandedPaths: pe,
658
+ onExpandedPathsChange: j,
659
+ loadingPaths: ne,
661
660
  onItemClick: (e) => {
662
661
  o(n != null && H(n) === e.path ? void 0 : U(e.path));
663
662
  },
664
- getContextMenuItems: ye,
665
- createdFolderPath: me,
666
- newFolderDefaultName: I,
667
- onCreateFolderSave: be,
663
+ getContextMenuItems: ve,
664
+ createdFolderPath: Y,
665
+ newFolderDefaultName: P,
666
+ onCreateFolderSave: $,
668
667
  onCreateFolderCancel: xe,
669
- onRenameValidate: (e) => $(e),
670
- emptyStateTitle: J ? v.replace("{query}", B) : void 0
668
+ onRenameValidate: (e) => Q(e),
669
+ emptyStateTitle: K ? ee.replace("{query}", R) : void 0
671
670
  })
672
671
  }),
673
672
  /* @__PURE__ */ O("div", {
674
- className: E("my-2 h-px", _e.divider),
673
+ className: E("my-2 h-px", ye.divider),
675
674
  "aria-hidden": !0
676
675
  }),
677
676
  /* @__PURE__ */ k("div", {
678
677
  className: "mb-4 flex flex-wrap items-center gap-2",
679
- children: [/* @__PURE__ */ O(d, {
680
- onClick: ge,
678
+ children: [/* @__PURE__ */ O(f, {
679
+ onClick: Z,
681
680
  label: p,
682
- iconBefore: /* @__PURE__ */ O(j, {
681
+ iconBefore: /* @__PURE__ */ O(ie, {
683
682
  size: c.SM,
684
683
  "aria-hidden": !0,
685
684
  stroke: l
686
685
  }),
687
- disabled: f || ce
688
- }), ce && /* @__PURE__ */ O(d, {
686
+ disabled: d || B
687
+ }), B && /* @__PURE__ */ O(f, {
689
688
  label: m,
690
689
  onClick: xe,
691
- disabled: f,
692
- [ve]: ""
690
+ disabled: d,
691
+ [be]: ""
693
692
  })]
694
693
  })
695
694
  ]
696
695
  });
697
- }, $ = { panel: "dial-publish-panel-panel" }, be = {
696
+ }, $ = { panel: "dial-publish-panel-panel" }, xe = {
698
697
  summaryTitle: "_summaryTitle_tf20a_1",
699
698
  sectionHeading: "_sectionHeading_tf20a_5"
700
- }, xe = 200, Se = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: h, isSubmitting: v, hasSubmitError: ee = !1, allowReplace: b = !0, author: x, onAuthorChange: S, publishCredentials: te = !1, onPublishCredentialsChange: w, rules: D, onRulesChange: A, ruleSourceOptions: j, isRulesLoading: ne = !1, hasRulesLoadError: re = !1, labels: ie = {}, summaryTitleClassName: M = "dial-body-semi-text", headingClassName: P = "dial-body-semi-text", styles: F = {} }) => {
701
- let { colors: I, folderTree: L, accessRules: R } = F, oe = {
699
+ }, Se = 200, Ce = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: v = !1, allowReplace: y = !0, author: b, onAuthorChange: x, publishCredentials: S = !1, onPublishCredentialsChange: ne, rules: w, onRulesChange: D, ruleSourceOptions: re, isRulesLoading: ie = !1, hasRulesLoadError: ae = !1, labels: oe = {}, summaryTitleClassName: se = "dial-body-semi-text", headingClassName: A = "dial-body-semi-text", styles: N = {} }) => {
700
+ let { colors: P, folderTree: ce, accessRules: F } = N, I = {
702
701
  ...T({
703
- "--pp-summary-title-text": I?.summaryTitleText,
704
- "--pp-heading-text": I?.headingText
702
+ "--pp-summary-title-text": P?.summaryTitleText,
703
+ "--pp-heading-text": P?.headingText
705
704
  }),
706
- ...F.cssVars
707
- }, z = {
708
- border: I?.summaryBorder,
709
- background: I?.summaryBackground,
710
- versionTagBorder: I?.summaryVersionTagBorder,
711
- versionTagBackground: I?.summaryVersionTagBackground,
712
- versionTagText: I?.summaryVersionTagText
713
- }, { folderLabel: se = "Publish to folder", replaceWarning: B = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ce = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: V = "Publishing failed. Please try again.", folderEmptyStateLabel: H, addSiblingFolderLabel: U, addChildFolderLabel: W, cancelCreatingFolderLabel: G, createFolderEmptyNameError: K, createFolderInvalidNameError: le, createFolderDuplicateNameError: ue, rootFolderLabel: q = "Organization", summaryVersionLabel: J, accessRulesLabels: Y, searchPlaceholder: de, clearSearchAriaLabel: fe, authorLabel: pe = "Author", authorPlaceholder: X = "Author name", authorHint: me = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Z = "Publish with my credentials", credentialsHint: Q = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ie, [ge, _e] = a(""), ve = n(), Se = (e) => {
714
- _e(e ?? "");
715
- }, we = o != null, Ee = r(() => ae({
716
- hasSelectedFolder: we,
705
+ ...N.cssVars
706
+ }, L = {
707
+ border: P?.summaryBorder,
708
+ background: P?.summaryBackground,
709
+ versionTagBorder: P?.summaryVersionTagBorder,
710
+ versionTagBackground: P?.summaryVersionTagBackground,
711
+ versionTagText: P?.summaryVersionTagText
712
+ }, { folderLabel: R = "Publish to folder", replaceWarning: z = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: B = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: le = "Publishing failed. Please try again.", folderEmptyStateLabel: V, addSiblingFolderLabel: H, addChildFolderLabel: U, cancelCreatingFolderLabel: ue, createFolderEmptyNameError: W, createFolderInvalidNameError: de, createFolderDuplicateNameError: fe, rootFolderLabel: G = "Organization", summaryVersionLabel: K, accessRulesLabels: q, searchPlaceholder: J, clearSearchAriaLabel: pe, authorLabel: me = "Author", authorPlaceholder: he = "Author name", authorHint: Y = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ge = "Publish with my credentials", credentialsHint: X = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Z, ve] = a(""), ye = n(), be = (e) => {
713
+ ve(e ?? "");
714
+ }, Ce = o != null, Te = r(() => M({
715
+ hasSelectedFolder: Ce,
717
716
  hasExistingPublicationInFolder: p,
718
- hasWriteAccess: h,
719
- isSubmitting: v,
720
- hasSubmitError: ee,
721
- allowReplace: b
717
+ hasWriteAccess: m,
718
+ isSubmitting: g,
719
+ hasSubmitError: v,
720
+ allowReplace: y
722
721
  }), [
723
- we,
722
+ Ce,
724
723
  p,
725
- h,
724
+ m,
725
+ g,
726
726
  v,
727
- ee,
728
- b
729
- ]), De = we ? o[o.length - 1] ?? q : "", Oe = t ? t() : /* @__PURE__ */ O("span", {
730
- className: E("truncate", M, be.summaryTitle),
727
+ y
728
+ ]), De = Ce ? o[o.length - 1] ?? G : "", Oe = t ? t() : /* @__PURE__ */ O("span", {
729
+ className: E("truncate", se, xe.summaryTitle),
731
730
  children: e?.title
732
731
  });
733
732
  return /* @__PURE__ */ k("div", {
734
733
  className: E("flex flex-col gap-5", $.panel),
735
- style: oe,
734
+ style: I,
736
735
  children: [e?.type == null ? /* @__PURE__ */ O(C, {
737
- colors: z,
736
+ colors: L,
738
737
  children: Oe
739
738
  }) : /* @__PURE__ */ O(C, {
740
739
  item: {
@@ -743,25 +742,25 @@ var M = /* @__PURE__ */ function(e) {
743
742
  version: e.version ?? "",
744
743
  iconUrl: e.iconUrl
745
744
  },
746
- versionLabel: J,
747
- colors: z
745
+ versionLabel: K,
746
+ colors: L
748
747
  }), /* @__PURE__ */ k("div", { children: [
749
748
  /* @__PURE__ */ O("div", {
750
- className: E("mb-2", P, be.sectionHeading),
751
- children: se
749
+ className: E("mb-2", A, xe.sectionHeading),
750
+ children: R
752
751
  }),
753
752
  /* @__PURE__ */ O("div", {
754
753
  role: "search",
755
754
  className: "mb-3",
756
- children: /* @__PURE__ */ O(y, {
757
- value: ge,
758
- onChange: Se,
759
- placeholder: de,
760
- clearLabel: fe,
761
- "aria-label": de
755
+ children: /* @__PURE__ */ O(te, {
756
+ value: Z,
757
+ onChange: be,
758
+ placeholder: J,
759
+ clearLabel: pe,
760
+ "aria-label": J
762
761
  })
763
762
  }),
764
- /* @__PURE__ */ O(ye, {
763
+ /* @__PURE__ */ O(Q, {
765
764
  items: i,
766
765
  selectedPath: o,
767
766
  onSelectedPathChange: c,
@@ -769,27 +768,27 @@ var M = /* @__PURE__ */ function(e) {
769
768
  expandedPaths: u,
770
769
  onExpandedPathsChange: d,
771
770
  loadingPaths: f,
772
- searchQuery: ge,
773
- disabled: v,
774
- noResultsLabel: H,
775
- addSiblingFolderLabel: U,
776
- addChildFolderLabel: W,
777
- cancelCreatingFolderLabel: G,
778
- emptyFolderNameError: K,
779
- invalidFolderNameError: le,
780
- duplicateFolderNameError: ue,
781
- rootLabel: q,
782
- styles: L
771
+ searchQuery: Z,
772
+ disabled: g,
773
+ noResultsLabel: V,
774
+ addSiblingFolderLabel: H,
775
+ addChildFolderLabel: U,
776
+ cancelCreatingFolderLabel: ue,
777
+ emptyFolderNameError: W,
778
+ invalidFolderNameError: de,
779
+ duplicateFolderNameError: fe,
780
+ rootLabel: G,
781
+ styles: ce
783
782
  }),
784
- Ee.calloutKind !== N.None && Ee.calloutKind !== N.Info && /* @__PURE__ */ O("div", {
783
+ Te.calloutKind !== j.None && Te.calloutKind !== j.Info && /* @__PURE__ */ O("div", {
785
784
  className: "mt-3",
786
- children: /* @__PURE__ */ O(g, {
787
- type: _.SectionMessage,
788
- variant: Ce(Ee.calloutKind),
789
- message: Te(Ee.calloutKind, {
790
- replaceWarning: B,
791
- noAccessError: ce,
792
- submitError: V,
785
+ children: /* @__PURE__ */ O(_, {
786
+ type: ee.SectionMessage,
787
+ variant: we(Te.calloutKind),
788
+ message: Ee(Te.calloutKind, {
789
+ replaceWarning: z,
790
+ noAccessError: B,
791
+ submitError: le,
793
792
  folderName: De,
794
793
  version: e?.version
795
794
  })
@@ -797,44 +796,44 @@ var M = /* @__PURE__ */ function(e) {
797
796
  }),
798
797
  /* @__PURE__ */ O("div", {
799
798
  className: "mt-4",
800
- children: /* @__PURE__ */ O(m, {
801
- id: ve,
802
- labelProps: { label: pe },
803
- placeholder: X,
804
- caption: me,
805
- value: x,
806
- onChange: (e) => S(e ?? ""),
807
- maxLength: xe,
808
- disabled: v
799
+ children: /* @__PURE__ */ O(h, {
800
+ id: ye,
801
+ labelProps: { label: me },
802
+ placeholder: he,
803
+ caption: Y,
804
+ value: b,
805
+ onChange: (e) => x(e ?? ""),
806
+ maxLength: Se,
807
+ disabled: g
809
808
  })
810
809
  }),
811
- w != null && /* @__PURE__ */ O("div", {
810
+ ne != null && /* @__PURE__ */ O("div", {
812
811
  className: "mt-4",
813
812
  children: /* @__PURE__ */ O(s, {
814
- labelProps: { label: Z },
815
- caption: Q,
816
- isSelected: te,
817
- onChange: w,
818
- disabled: v
813
+ labelProps: { label: ge },
814
+ caption: X,
815
+ isSelected: S,
816
+ onChange: ne,
817
+ disabled: g
819
818
  })
820
819
  }),
821
820
  /* @__PURE__ */ O("div", {
822
821
  className: "mt-4",
823
- children: /* @__PURE__ */ O(he, {
824
- rules: D,
825
- onRulesChange: A,
826
- sourceOptions: j,
827
- folderName: we ? De : void 0,
828
- disabled: v,
829
- isLoading: ne,
830
- hasLoadError: re,
831
- labels: Y,
832
- styles: R
822
+ children: /* @__PURE__ */ O(_e, {
823
+ rules: w,
824
+ onRulesChange: D,
825
+ sourceOptions: re,
826
+ folderName: Ce ? De : void 0,
827
+ disabled: g,
828
+ isLoading: ie,
829
+ hasLoadError: ae,
830
+ labels: q,
831
+ styles: F
833
832
  })
834
833
  })
835
834
  ] })]
836
835
  });
837
- }, Ce = (e) => e === N.ReplaceWarning ? v.Warning : v.Error, we = (e, t) => {
836
+ }, we = (e) => e === j.ReplaceWarning ? v.Warning : v.Error, Te = (e, t) => {
838
837
  let [n, r, ...i] = e.split("{folder}");
839
838
  return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ k(D, { children: [
840
839
  n,
@@ -844,17 +843,17 @@ var M = /* @__PURE__ */ function(e) {
844
843
  }),
845
844
  r
846
845
  ] });
847
- }, Te = (e, t) => e === N.ReplaceWarning ? we(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === N.NoAccess ? we(t.noAccessError, t.folderName) : t.submitError, Ee = { footer: "_footer_dks1v_1" }, De = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
848
- let u = T({ "--pf-border": l?.border }), { cancelLabel: f = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: g = "Publishing…" } = s, _ = i ? g : n && t && e != null ? m.replace("{version}", e) : p;
846
+ }, Ee = (e, t) => e === j.ReplaceWarning ? Te(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === j.NoAccess ? Te(t.noAccessError, t.folderName) : t.submitError, De = { footer: "_footer_dks1v_1" }, Oe = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
847
+ let u = T({ "--pf-border": l?.border }), { cancelLabel: d = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: h = "Publishing…" } = s, _ = i ? h : n && t && e != null ? m.replace("{version}", e) : p;
849
848
  return /* @__PURE__ */ k("div", {
850
849
  style: u,
851
- className: E("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Ee.footer),
852
- children: [/* @__PURE__ */ O(d, {
853
- label: f,
850
+ className: E("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", De.footer),
851
+ children: [/* @__PURE__ */ O(f, {
852
+ label: d,
854
853
  className: "mobile:flex-1",
855
854
  disabled: i,
856
855
  onClick: a
857
- }), /* @__PURE__ */ O(h, {
856
+ }), /* @__PURE__ */ O(g, {
858
857
  label: _,
859
858
  className: "mobile:flex-1",
860
859
  disabled: r,
@@ -862,21 +861,21 @@ var M = /* @__PURE__ */ function(e) {
862
861
  onClick: o
863
862
  })]
864
863
  });
865
- }, Oe = {
864
+ }, ke = {
866
865
  backdrop: "_backdrop_16jmd_6",
867
866
  panel: "_panel_16jmd_10",
868
867
  divider: "_divider_16jmd_15",
869
868
  content: "_content_16jmd_19",
870
869
  title: "_title_16jmd_24"
871
- }, ke = ({ 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: y, rules: ee, onRulesChange: x, ruleSourceOptions: S, isRulesLoading: te = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: D, onSubmit: A, panelLabels: j, panelStyles: ne, footerLabels: re, labels: ie = {}, titleClassName: M = "dial-body-semi-text", colors: N }) => {
872
- let P = T({
873
- "--spp-backdrop-bg": N?.backdropBackground,
874
- "--spp-panel-bg": N?.panelBackground,
875
- "--spp-panel-border": N?.panelBorder,
876
- "--spp-divider-border": N?.dividerBorder,
877
- "--spp-scrollbar-thumb": N?.scrollbarThumb,
878
- "--spp-title-text": N?.titleText
879
- }), [F, I] = a(null), { title: L = "Publish", ariaLabel: R = "Publish", closeAriaLabel: oe = "Close" } = ie, z = r(() => ae({
870
+ }, Ae = ({ 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: ee, onAuthorChange: v, rules: te, onRulesChange: y, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: ne = !1, onClose: C, returnFocusRef: w, onSubmit: D, panelLabels: re, panelStyles: ie, footerLabels: ae, labels: oe = {}, titleClassName: se = "dial-body-semi-text", colors: A }) => {
871
+ let j = T({
872
+ "--spp-backdrop-bg": A?.backdropBackground,
873
+ "--spp-panel-bg": A?.panelBackground,
874
+ "--spp-panel-border": A?.panelBorder,
875
+ "--spp-divider-border": A?.dividerBorder,
876
+ "--spp-scrollbar-thumb": A?.scrollbarThumb,
877
+ "--spp-title-text": A?.titleText
878
+ }), [N, P] = a(null), { title: ce = "Publish", ariaLabel: F = "Publish", closeAriaLabel: I = "Close" } = oe, L = r(() => M({
880
879
  hasSelectedFolder: s != null,
881
880
  hasExistingPublicationInFolder: p,
882
881
  hasWriteAccess: m,
@@ -892,7 +891,7 @@ var M = /* @__PURE__ */ function(e) {
892
891
  _
893
892
  ]);
894
893
  return t(() => {
895
- let t = F?.closest("[role=\"dialog\"]");
894
+ let t = N?.closest("[role=\"dialog\"]");
896
895
  if (!e || !t) return;
897
896
  let n = () => t.focus({ preventScroll: !0 });
898
897
  n();
@@ -902,36 +901,36 @@ var M = /* @__PURE__ */ function(e) {
902
901
  document.addEventListener("focusin", r);
903
902
  let i = requestAnimationFrame(() => {
904
903
  document.removeEventListener("focusin", r);
905
- }), a = D?.current;
904
+ }), a = w?.current;
906
905
  return () => {
907
906
  cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
908
907
  };
909
908
  }, [
910
909
  e,
911
- F,
912
- D
910
+ N,
911
+ w
913
912
  ]), /* @__PURE__ */ k(b, {
914
913
  open: e,
915
- onClose: w,
914
+ onClose: C,
916
915
  header: /* @__PURE__ */ O("span", {
917
- className: E("block truncate text-center", M, Oe.title),
918
- children: L
916
+ className: E("block truncate text-center", se, ke.title),
917
+ children: ce
919
918
  }),
920
- ariaLabel: R,
921
- closeAriaLabel: oe,
919
+ ariaLabel: F,
920
+ closeAriaLabel: I,
922
921
  closeDisabled: h,
923
- style: P,
924
- overlayStyle: P,
925
- className: Oe.panel,
926
- overlayClassName: Oe.backdrop,
927
- headerClassName: E("px-[22px]", Oe.divider),
922
+ style: j,
923
+ overlayStyle: j,
924
+ className: ke.panel,
925
+ overlayClassName: ke.backdrop,
926
+ headerClassName: E("px-[22px]", ke.divider),
928
927
  bodyClassName: "flex flex-col overflow-hidden",
929
928
  children: [/* @__PURE__ */ O("div", {
930
- ref: I,
931
- className: E("min-h-0 flex-1 overflow-y-auto", Oe.content),
929
+ ref: P,
930
+ className: E("min-h-0 flex-1 overflow-y-auto", ke.content),
932
931
  children: /* @__PURE__ */ O("div", {
933
932
  className: "p-[22px]",
934
- children: /* @__PURE__ */ O(Se, {
933
+ children: /* @__PURE__ */ O(Ce, {
935
934
  resource: n,
936
935
  renderSummary: i,
937
936
  folderItems: o,
@@ -946,28 +945,28 @@ var M = /* @__PURE__ */ function(e) {
946
945
  isSubmitting: h,
947
946
  hasSubmitError: g,
948
947
  allowReplace: _,
949
- author: v,
950
- onAuthorChange: y,
951
- rules: ee,
952
- onRulesChange: x,
953
- ruleSourceOptions: S,
954
- isRulesLoading: te,
955
- hasRulesLoadError: C,
956
- labels: j,
957
- styles: ne
948
+ author: ee,
949
+ onAuthorChange: v,
950
+ rules: te,
951
+ onRulesChange: y,
952
+ ruleSourceOptions: x,
953
+ isRulesLoading: S,
954
+ hasRulesLoadError: ne,
955
+ labels: re,
956
+ styles: ie
958
957
  })
959
958
  })
960
- }), /* @__PURE__ */ O(De, {
959
+ }), /* @__PURE__ */ O(Oe, {
961
960
  version: n?.version,
962
961
  hasExistingPublicationInFolder: p,
963
962
  allowReplace: _,
964
- isSubmitDisabled: z.isSubmitDisabled,
965
- isSubmitLoading: z.isSubmitLoading,
966
- onCancel: w,
967
- onSubmit: A,
968
- labels: re
963
+ isSubmitDisabled: L.isSubmitDisabled,
964
+ isSubmitLoading: L.isSubmitLoading,
965
+ onCancel: C,
966
+ onSubmit: D,
967
+ labels: ae
969
968
  })]
970
969
  });
971
970
  };
972
971
  //#endregion
973
- export { $ as PUBLISH_PANEL_CLASS, M as PublicationRuleFunction, pe as PublishAccessRuleEditor, he as PublishAccessRules, N as PublishCalloutKind, ye as PublishFoldersTree, De as PublishFooter, ge as PublishHistoryList, Se as PublishPanel, ke as StandalonePublishPanel, V as collectFolderKeys, ae as derivePublishState, oe as filterFolderTree, F as formatPublishedDate, U as fromFolderPathKey, ue as getSiblingFolderNames, le as getUniqueFolderName, ce as mergeFolderPaths, se as sortFolderTree, W as toDialFileTree, H as toFolderPathKey, R as usePublishFlow, K as validateFolderName };
972
+ export { $ as PUBLISH_PANEL_CLASS, A as PublicationRuleFunction, he as PublishAccessRuleEditor, _e as PublishAccessRules, j as PublishCalloutKind, Q as PublishFoldersTree, Oe as PublishFooter, ve as PublishHistoryList, Ce as PublishPanel, Ae as StandalonePublishPanel, V as collectFolderKeys, M as derivePublishState, L as filterFolderTree, P as formatPublishedDate, U as fromFolderPathKey, G as getSiblingFolderNames, fe as getUniqueFolderName, le as mergeFolderPaths, z as sortFolderTree, ue as toDialFileTree, H as toFolderPathKey, I as usePublishFlow, de as validateFolderName };