@orangelogic/design-system 2.76.0 → 2.77.0-pr86082.20

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.
Files changed (156) hide show
  1. package/library/chunks/array.DCtvHiLS.js +81 -0
  2. package/library/chunks/asset.DV8h0gqx.js +460 -0
  3. package/library/chunks/{button.csCRiZzY.js → button.BKg5x2tE.js} +2 -2
  4. package/library/chunks/{color-swatch-group.BgI-HWS2.js → color-swatch-group.J1CDOfbi.js} +5 -5
  5. package/library/chunks/{color-swatch.BuUP5yG4.js → color-swatch.BGOIeMpR.js} +1 -1
  6. package/library/chunks/{confirm-popover.Kx6YyQwp.js → confirm-popover.BXP7NVBg.js} +3 -3
  7. package/library/chunks/{cropper.D1lO3pl-.js → cropper.DAIYrIik.js} +5124 -5100
  8. package/library/chunks/{dialog.BdXQkCKY.js → dialog.C3Y3HyEQ.js} +2 -2
  9. package/library/chunks/{dom.BQVKDNd8.js → dom.DSQ4JYHD.js} +1 -1
  10. package/library/chunks/{dot-pagination.CIVxMAAS.js → dot-pagination.Cno-EY5L.js} +1 -1
  11. package/library/chunks/{endpoints.B7lcoc1N.js → endpoints.BqwSL495.js} +136 -134
  12. package/library/chunks/{file-on-demand.BJZ5E8XT.js → file-on-demand.Ds_YAELZ.js} +9 -9
  13. package/library/chunks/{folder-select.BqLmIlj6.js → folder-select.Bxyxs--a.js} +4 -4
  14. package/library/chunks/{form.DgwYWi0O.js → form.B_CGJolT.js} +1 -1
  15. package/library/chunks/{header.m7v3M94Z.js → header.BbsvdnUa.js} +1 -1
  16. package/library/chunks/{i18n.BUW7B9hr.js → i18n.B2u7b-84.js} +9 -4
  17. package/library/chunks/{icon-button.C3eqeQl9.js → icon-button.CFWe-OYq.js} +1 -1
  18. package/library/chunks/{iframe.CNEyWhcM.js → iframe.CEkeLsZd.js} +1 -1
  19. package/library/chunks/{image.DHBgKeJp.js → image.BwBDVxK3.js} +287 -244
  20. package/library/chunks/{list-editor.DpBm_m_b.js → list-editor.CQM8assK.js} +18 -17
  21. package/library/chunks/{option.Csqefux_.js → option.DGxH8OhL.js} +1 -1
  22. package/library/chunks/{pagination.BXCr_5om.js → pagination.DZp5z4KB.js} +4 -4
  23. package/library/chunks/{responsive.DL-wBD4P.js → responsive.BndCeSg0.js} +1 -1
  24. package/library/chunks/{string.B_rEG27K.js → string.DSuo0idh.js} +75 -68
  25. package/library/chunks/{tab-group.G24wrely.js → tab-group.CV73JfKh.js} +4 -4
  26. package/library/chunks/{table.D3Pc7KGF.js → table.C_gG1jGN.js} +535 -489
  27. package/library/chunks/toast.B2cJgW5u.js +71 -0
  28. package/library/chunks/transformation.seiA9imd.js +140 -0
  29. package/library/chunks/{tree.OXvhEOjS.js → tree.GUBpWDYK.js} +1 -1
  30. package/library/components/alert.js +2 -2
  31. package/library/components/asset-link-format.js +828 -916
  32. package/library/components/atoms.js +12 -12
  33. package/library/components/border-input-group.js +1 -1
  34. package/library/components/breadcrumb.js +1 -1
  35. package/library/components/button.js +3 -3
  36. package/library/components/checkbox.js +1 -1
  37. package/library/components/color-picker.js +3 -3
  38. package/library/components/color-swatch-group.js +6 -6
  39. package/library/components/color-swatch.js +2 -2
  40. package/library/components/confirm-popover.js +4 -4
  41. package/library/components/copy-button.js +1 -1
  42. package/library/components/corner-position-input-group.js +2 -2
  43. package/library/components/cropper.js +1 -1
  44. package/library/components/details.js +2 -1
  45. package/library/components/dialog.js +3 -3
  46. package/library/components/dot-pagination.js +2 -2
  47. package/library/components/drawer.js +2 -2
  48. package/library/components/dropdown.js +1 -1
  49. package/library/components/dynamic-select.js +4 -4
  50. package/library/components/e-chart.js +1 -1
  51. package/library/components/element-clamp.js +2 -2
  52. package/library/components/file-on-demand.js +10 -10
  53. package/library/components/folder-select.js +4 -4
  54. package/library/components/format-bytes.js +1 -1
  55. package/library/components/format-date.js +1 -1
  56. package/library/components/format-number.js +1 -1
  57. package/library/components/format-time.js +1 -1
  58. package/library/components/header.js +2 -2
  59. package/library/components/icon-button.js +2 -2
  60. package/library/components/iframe.js +2 -2
  61. package/library/components/image-comparer.js +1 -1
  62. package/library/components/image.js +2 -2
  63. package/library/components/input.js +4 -7
  64. package/library/components/line-clamp.js +1 -1
  65. package/library/components/list-editor.js +6 -6
  66. package/library/components/masonry.js +2 -2
  67. package/library/components/menu-item.js +1 -1
  68. package/library/components/menu.js +1 -1
  69. package/library/components/molecules.js +5 -5
  70. package/library/components/option.js +2 -2
  71. package/library/components/organisms.js +2 -2
  72. package/library/components/pagination.js +5 -5
  73. package/library/components/popup.js +1 -1
  74. package/library/components/position-picker.js +1 -1
  75. package/library/components/progress-bar.js +1 -1
  76. package/library/components/progress-ring.js +1 -1
  77. package/library/components/radio-group.js +1 -1
  78. package/library/components/range.js +2 -2
  79. package/library/components/rating.js +1 -1
  80. package/library/components/relative-time.js +1 -1
  81. package/library/components/select.js +3 -3
  82. package/library/components/share-option-list.js +2 -2
  83. package/library/components/sidebar.js +1 -1
  84. package/library/components/size-input-group.js +2 -2
  85. package/library/components/spinner.js +1 -1
  86. package/library/components/split-panel.js +1 -1
  87. package/library/components/switch.js +1 -1
  88. package/library/components/tab-group.js +5 -5
  89. package/library/components/tab.js +2 -2
  90. package/library/components/table.js +5 -5
  91. package/library/components/tag.js +2 -2
  92. package/library/components/textarea.js +1 -1
  93. package/library/components/timecode.js +1 -1
  94. package/library/components/tooltip.js +1 -1
  95. package/library/components/tree-item.js +2 -2
  96. package/library/components/tree.js +2 -2
  97. package/library/components/typeface.js +2 -2
  98. package/library/components/types.js +31009 -29950
  99. package/library/components/video.js +531 -522
  100. package/library/package.json +1 -1
  101. package/library/packages/atoms/src/components/image/image.d.ts +15 -1
  102. package/library/packages/atoms/src/components/input/input.d.ts +1 -2
  103. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Edit/Edit.d.ts +1 -0
  104. package/library/packages/atoms/src/components/video/video.d.ts +2 -0
  105. package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
  106. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
  107. package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
  108. package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
  109. package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
  110. package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
  111. package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
  112. package/library/packages/events/src/events.d.ts +8 -1
  113. package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
  114. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
  115. package/library/packages/molecules/src/timeline/timeline.d.ts +13 -0
  116. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +4 -0
  117. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
  118. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +95 -0
  119. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
  120. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +48 -26
  121. package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
  122. package/library/packages/organisms/src/carousel/carousel.d.ts +3 -1
  123. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +6 -0
  124. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +4 -0
  125. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +4 -0
  126. package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
  127. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +3 -0
  128. package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
  129. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +30 -0
  130. package/library/packages/organisms/src/content-builder/styleController.d.ts +12 -1
  131. package/library/packages/organisms/src/index.d.ts +2 -0
  132. package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
  133. package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
  134. package/library/packages/services/src/api/asset/asset.d.ts +3 -2
  135. package/library/packages/services/src/api/asset/asset.types.d.ts +83 -0
  136. package/library/packages/services/src/api/asset/asset.utils.d.ts +9 -0
  137. package/library/packages/services/src/api/endpoints.d.ts +1 -1
  138. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  139. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +17 -5
  140. package/library/packages/types/src/asset-click-action.d.ts +3 -1
  141. package/library/packages/types/src/bento-grid.d.ts +37 -0
  142. package/library/packages/types/src/content-builder.d.ts +12 -1
  143. package/library/packages/types/src/gallery.d.ts +0 -6
  144. package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
  145. package/library/packages/utils/src/custom-element/i18n.d.ts +5 -0
  146. package/library/packages/utils/src/index.d.ts +1 -0
  147. package/library/packages/utils/src/string/string.d.ts +1 -0
  148. package/library/packages/utils/src/transformation/index.d.ts +1 -0
  149. package/library/react-web-component.d.ts +164 -6
  150. package/library/utils.js +479 -178
  151. package/package.json +1 -1
  152. package/library/chunks/asset.DWZ2Lzb6.js +0 -287
  153. package/library/chunks/content-builder.B4Tqoc6M.js +0 -127
  154. package/library/chunks/index.VbMreXxL.js +0 -373
  155. package/library/chunks/toast.BXNbwZV8.js +0 -25
  156. /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
@@ -0,0 +1,81 @@
1
+ function g(n, r) {
2
+ return n.filter((e, t) => t !== r);
3
+ }
4
+ function w(n, r) {
5
+ return n.filter((e, t) => !r.includes(t));
6
+ }
7
+ function v(n, r, e) {
8
+ return [...n.slice(0, r), e, ...n.slice(r)];
9
+ }
10
+ function h(n, r, e) {
11
+ return [...n.slice(0, r), ...e, ...n.slice(r)];
12
+ }
13
+ function F(n, r, e) {
14
+ return n.findIndex((t) => t[r] === e);
15
+ }
16
+ function M(n, r, e) {
17
+ const t = [...n], s = g(t, r);
18
+ let o = e;
19
+ return o >= n.length - 1 && (o = o + 1), v(s, o, n[r]);
20
+ }
21
+ function T(n, r, e) {
22
+ const t = [...n], s = w(t, r), o = e !== 0 ? r.reduce(
23
+ (u, f) => e > f ? u - 1 : u,
24
+ e
25
+ ) : e;
26
+ return h(
27
+ s,
28
+ o,
29
+ r.map((u) => n[u])
30
+ );
31
+ }
32
+ function b(n, r) {
33
+ return n.reduce(
34
+ (e, t) => {
35
+ const s = t[r];
36
+ return e[s] ??= [], e[s].push(t), e;
37
+ },
38
+ {}
39
+ );
40
+ }
41
+ function y(n, r, e) {
42
+ if (!n.length)
43
+ return [r];
44
+ const t = e.findIndex(
45
+ (i) => i.id === r
46
+ ), s = n[n.length - 1], o = e.findIndex(
47
+ (i) => i.id === s
48
+ );
49
+ if (t < 0 || o < 0)
50
+ return [r];
51
+ const c = e.reduce(
52
+ (i, l, x) => (i[l.id] = x, i),
53
+ {}
54
+ ), u = t > o, f = u ? o : t, A = u ? t : o, d = e.slice(f, A + 1).filter((i) => !(!i || n.includes(i.id))).map((i) => i.id), p = u ? d : [...d].reverse(), a = n.includes(r) ? n.slice(0, n.indexOf(r) + 1) : [...n, ...p];
55
+ return a.sort((i, l) => c[i] - c[l]), a;
56
+ }
57
+ function E(n, r, e, t, s, o) {
58
+ const c = e + 1;
59
+ if (n.length < 2)
60
+ throw new Error("Values array must contain at least 2 elements");
61
+ if (e < 0 || c >= n.length)
62
+ throw new Error("Invalid index or not enough values to adjust");
63
+ if (t < 0)
64
+ throw new Error("Minimum value must be non-negative");
65
+ let u = s + r;
66
+ u < t && (r = t - s, u = t);
67
+ let f = o - r;
68
+ f < t && (r = o - t, u = s + r, f = t), n[e] = parseFloat(u.toFixed(2)), n[c] = parseFloat(f.toFixed(2));
69
+ }
70
+ export {
71
+ T as a,
72
+ g as b,
73
+ v as c,
74
+ M as d,
75
+ E as e,
76
+ F as f,
77
+ b as g,
78
+ h as i,
79
+ y as m,
80
+ w as r
81
+ };
@@ -0,0 +1,460 @@
1
+ import { h as i, A as I, a as U, S as M, b as w } from "./endpoints.BqwSL495.js";
2
+ import "./browser.BHOCIF_A.js";
3
+ import "./lit-element.jLBm65_O.js";
4
+ import "./form.B_CGJolT.js";
5
+ import "./i18n.B2u7b-84.js";
6
+ import { a as v } from "./string.DSuo0idh.js";
7
+ import { f as k, t as L } from "./toast.B2cJgW5u.js";
8
+ function oe(t) {
9
+ return typeof t == "object" && t !== null && "URI" in t;
10
+ }
11
+ const B = {
12
+ artist: "Artist",
13
+ color: "Color",
14
+ createDate: "CreateDate",
15
+ docSubType: "DocSubType",
16
+ docType: "DocType",
17
+ editDate: "EditDate",
18
+ fileExtension: "Fileextension",
19
+ keyword: "Keyword",
20
+ mediaDate: "MediaDate",
21
+ mediaNumber: "MediaNumber",
22
+ nativeKeyword: "NativeKeyword",
23
+ orientation: "Orientation",
24
+ parentFolderIdentifier: "ParentFolderIdentifier",
25
+ path: "Path",
26
+ photographer: "Photographer",
27
+ purpose: "Purpose",
28
+ recordId: "RecordID",
29
+ systemIdentifier: "SystemIdentifier",
30
+ text: "Text",
31
+ title: "Title"
32
+ }, W = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
33
+ function $(t) {
34
+ return /[\s&+/*]/.test(t) ? `"${t}"` : t;
35
+ }
36
+ function S(t, e) {
37
+ const r = (Array.isArray(e) ? e : [e]).map((o) => `${t}:${$(o)}`);
38
+ return r.length > 1 ? `(${r.join(" OR ")})` : r[0] ?? "";
39
+ }
40
+ function H(t, e) {
41
+ return (Array.isArray(e) ? e : [e]).map((r) => `${t}${r.operator}${r.value}`).join(" AND ");
42
+ }
43
+ function q(t) {
44
+ const e = [];
45
+ for (const s of Object.keys(t)) {
46
+ const r = s, o = t[r];
47
+ if (o == null)
48
+ continue;
49
+ if (r === "custom") {
50
+ for (const [n, l] of Object.entries(
51
+ o
52
+ ))
53
+ e.push(S(n, l));
54
+ continue;
55
+ }
56
+ const a = B[r];
57
+ if (a) {
58
+ if (W.has(r)) {
59
+ e.push(
60
+ H(a, o)
61
+ );
62
+ continue;
63
+ }
64
+ if (r === "color") {
65
+ e.push(`${a}:${o}`);
66
+ continue;
67
+ }
68
+ e.push(S(a, o));
69
+ }
70
+ }
71
+ return e.join(" AND ");
72
+ }
73
+ function T(t) {
74
+ if ("and" in t)
75
+ return t.and.map(T).filter(Boolean).join(" AND ");
76
+ if ("or" in t) {
77
+ const e = t.or.map(T).filter(Boolean);
78
+ return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
79
+ }
80
+ if ("not" in t) {
81
+ const e = T(t.not);
82
+ return e ? `NOT ${e}` : "";
83
+ }
84
+ return q(t);
85
+ }
86
+ const C = "CoreField.LargeSizePreview", N = "CoreField.DocType", K = "Document.Title", V = "Document.CaptionLong", O = "Document.FileExtension", R = "CoreField.FileSize", g = "CoreField.Identifier", b = "CoreField.Keywords", P = "CoreField.MaxHeight", G = "CoreField.MaxWidth", x = "Document.RecordID", j = "CoreField.DocSubType", z = "CoreField.TitleWithFallback", E = "CoreField.OriginalFileName", y = "CoreField.UpdatedFileName", m = "CoreField.OriginalPreview";
87
+ function X(t) {
88
+ return !t || Object.keys(t).length === 0 ? {} : Object.entries(t).reduce(
89
+ (e, [s, r]) => !r || r.length === 0 ? e : s === "Types" ? {
90
+ ...e,
91
+ SubtypeCriteria: r
92
+ } : {
93
+ ...e,
94
+ FacetFilters: {
95
+ ...e.FacetFilters,
96
+ [s]: r
97
+ }
98
+ },
99
+ {}
100
+ );
101
+ }
102
+ async function se({
103
+ fields: t,
104
+ getPermanentAssetsPaths: e,
105
+ limit: s,
106
+ query: r,
107
+ siteUrl: o,
108
+ start: a,
109
+ token: n,
110
+ useSession: l
111
+ }) {
112
+ try {
113
+ return (await i.request({
114
+ baseURL: o,
115
+ method: "GET",
116
+ params: {
117
+ Fields: t,
118
+ Format: "json",
119
+ GetPermanentAssetsPaths: e || void 0,
120
+ Limit: s,
121
+ Query: T(r),
122
+ Start: a,
123
+ Token: n || void 0,
124
+ UseSession: l || void 0
125
+ },
126
+ paramsSerializer: { indexes: null },
127
+ responseType: "json",
128
+ transformResponse: [
129
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
130
+ (u) => ({
131
+ items: u.APIResponse?.Items ?? [],
132
+ sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
133
+ totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
134
+ })
135
+ ],
136
+ url: M["4.0"]
137
+ })).data;
138
+ } catch {
139
+ return { items: [], sort: "", totalCount: 0 };
140
+ }
141
+ }
142
+ async function ne({
143
+ assetId: t,
144
+ extension: e,
145
+ format: s,
146
+ siteUrl: r,
147
+ token: o,
148
+ transformations: a,
149
+ useSession: n
150
+ }) {
151
+ try {
152
+ return (await i.request({
153
+ baseURL: r,
154
+ method: "GET",
155
+ params: {
156
+ SourceAssetFormat: s,
157
+ SourceAssetRecordID: t,
158
+ TargetExtension: v(e),
159
+ Token: o || void 0,
160
+ Transformations: a,
161
+ UseSession: n || void 0
162
+ },
163
+ /**
164
+ * https://link.orangelogic.com/Tasks/41S1XH
165
+ */
166
+ timeout: 3e5,
167
+ // 5 minutes
168
+ url: I.GET_TRANSFORM_ASSET_LINK
169
+ })).data;
170
+ } catch {
171
+ return null;
172
+ }
173
+ }
174
+ async function ae({
175
+ extraFields: t,
176
+ recordIds: e,
177
+ token: s
178
+ }) {
179
+ if (!Array.isArray(e) || e.length === 0)
180
+ return { facets: [], items: [], totalCount: 0 };
181
+ const r = t?.filter((o) => o && typeof o == "string") ?? [];
182
+ try {
183
+ return (await i.request({
184
+ method: "GET",
185
+ params: {
186
+ ExtraFilters: `RecordID:${e.join(" OR ")}`,
187
+ Fields: [
188
+ ...r,
189
+ m,
190
+ y,
191
+ E,
192
+ K,
193
+ V
194
+ ],
195
+ SeeThru: !0,
196
+ Token: s || void 0
197
+ },
198
+ paramsSerializer: {
199
+ indexes: null
200
+ },
201
+ responseType: "json",
202
+ transformResponse: [
203
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
204
+ (a) => {
205
+ const n = a.contentItems?.map((l) => {
206
+ let f = l.fields[y] ?? "";
207
+ return f === "" && (f = l.fields[E] ?? ""), {
208
+ name: f,
209
+ originalUrl: l.fields[m] ?? "",
210
+ recordId: l.recordID,
211
+ ...r.reduce(
212
+ (u, c) => (u[c] = l.fields[c] ?? "", u),
213
+ {}
214
+ )
215
+ };
216
+ }) ?? [];
217
+ return n.sort((l, f) => {
218
+ const u = e.indexOf(l.recordId), c = e.indexOf(f.recordId);
219
+ return u - c;
220
+ }), {
221
+ facets: a.facets,
222
+ items: n,
223
+ totalCount: a.totalCount
224
+ };
225
+ }
226
+ ],
227
+ url: I.GET_CONTENT_V1
228
+ })).data;
229
+ } catch {
230
+ return {
231
+ facets: [],
232
+ items: [],
233
+ totalCount: 0
234
+ };
235
+ }
236
+ }
237
+ async function ie({
238
+ extraFields: t,
239
+ folderId: e,
240
+ limit: s,
241
+ limitedDocTypes: r,
242
+ searchTerm: o,
243
+ seeThrough: a,
244
+ selectedFacets: n,
245
+ sortOrder: l,
246
+ start: f
247
+ }) {
248
+ const u = (t?.filter((c) => c && typeof c == "string") ?? []).map((c) => c.replace("%20", " "));
249
+ try {
250
+ return (await i.request({
251
+ method: "GET",
252
+ params: {
253
+ Fields: [
254
+ ...u,
255
+ z,
256
+ C,
257
+ m,
258
+ b,
259
+ G,
260
+ P,
261
+ R,
262
+ N,
263
+ j,
264
+ g,
265
+ O,
266
+ x,
267
+ E,
268
+ y
269
+ ],
270
+ Limit: s,
271
+ LimitedToDocTypes: r.length > 0 ? r : void 0,
272
+ ObjectRecordID: e,
273
+ OrderBy: l || void 0,
274
+ SearchTerm: o || void 0,
275
+ SeeThru: a,
276
+ Start: f,
277
+ ...X(n)
278
+ },
279
+ paramsSerializer: {
280
+ indexes: null
281
+ },
282
+ responseType: "json",
283
+ transformResponse: [
284
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
285
+ (D) => ({
286
+ facets: D.facets,
287
+ items: D.contentItems?.map((d) => {
288
+ let p = d.fields[O] ?? "", A = d.fields[y] ?? "", h = d.fields[C] ?? "";
289
+ return p && !p.startsWith(".") && (p = "." + p), A === "" && (A = d.fields[E] ?? ""), p.toLowerCase() === ".gif" && (h = d.fields[m] ?? ""), {
290
+ docSubType: d.fields[j] ?? "",
291
+ docType: d.fields[N] ?? "",
292
+ extension: p,
293
+ height: d.fields[P] ?? "0",
294
+ id: d.recordID,
295
+ identifier: d.fields[g] ?? "",
296
+ imageUrl: h,
297
+ name: A ?? "",
298
+ originalUrl: d.fields[m] ?? "",
299
+ recordId: d.fields[x] ?? "",
300
+ size: d.fields[R] ?? "0 MB",
301
+ tags: d.fields[b] ?? "",
302
+ width: d.fields[G] ?? "0",
303
+ ...u.reduce(
304
+ (F, _) => (F[_] = d.fields[_] ?? "", F),
305
+ {}
306
+ )
307
+ };
308
+ }) ?? [],
309
+ totalCount: D.totalCount
310
+ })
311
+ ],
312
+ url: I.GET_CONTENT_V2
313
+ })).data;
314
+ } catch {
315
+ return {
316
+ facets: [],
317
+ items: [],
318
+ totalCount: 0
319
+ };
320
+ }
321
+ }
322
+ async function de({
323
+ autoCropMode: t,
324
+ cropHeight: e,
325
+ cropWidth: s,
326
+ imageUrl: r,
327
+ useSession: o
328
+ }) {
329
+ try {
330
+ return (await i.request({
331
+ method: "GET",
332
+ params: {
333
+ AutoCropMode: t,
334
+ CropHeight: e,
335
+ CropWidth: s,
336
+ ImageUrl: r && new URL(r, window.location.origin).href,
337
+ UseSession: o || void 0
338
+ },
339
+ responseType: "json",
340
+ timeout: 3e5,
341
+ // 5 minutes
342
+ transformResponse: [
343
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
344
+ (n) => ({
345
+ height: n.cropHeight,
346
+ width: n.cropWidth,
347
+ x: n.cropX,
348
+ y: n.cropY
349
+ })
350
+ ],
351
+ url: I.GET_CROP_ZONE_SUGGESTION
352
+ })).data;
353
+ } catch {
354
+ return null;
355
+ }
356
+ }
357
+ async function le({
358
+ assetRecordId: t,
359
+ siteUrl: e,
360
+ token: s,
361
+ useSession: r
362
+ }) {
363
+ try {
364
+ return (await i.request({
365
+ baseURL: e,
366
+ method: "GET",
367
+ params: {
368
+ RecordId: t,
369
+ Token: s,
370
+ UseSession: r || void 0
371
+ },
372
+ responseType: "json",
373
+ transformResponse: [
374
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
375
+ (a) => !a || typeof a != "object" ? [] : a.proxies?.map((n) => ({
376
+ cdnName: n.cdnName,
377
+ extension: n.extension,
378
+ formatHeight: n.formatHeight,
379
+ formatWidth: n.formatWidth,
380
+ height: n.height,
381
+ permanentLink: n.permanentLink,
382
+ proxyLabel: n.proxyLabel,
383
+ proxyName: n.proxyName,
384
+ width: n.width
385
+ })) ?? []
386
+ ],
387
+ url: w
388
+ })).data;
389
+ } catch {
390
+ return [];
391
+ }
392
+ }
393
+ async function ue({
394
+ siteUrl: t
395
+ } = {}) {
396
+ try {
397
+ return (await i.request({
398
+ baseURL: t,
399
+ method: "GET",
400
+ responseType: "json",
401
+ transformResponse: [
402
+ ...Array.isArray(i.defaults.transformResponse) ? i.defaults.transformResponse : [],
403
+ (s) => !s || typeof s != "object" ? {
404
+ formatsByDocType: {
405
+ Audio: {},
406
+ Image: {},
407
+ Multimedia: {},
408
+ Video: {}
409
+ }
410
+ } : {
411
+ formatsByDocType: s.formatsByDocType ?? {}
412
+ }
413
+ ],
414
+ url: U
415
+ })).data;
416
+ } catch {
417
+ return { formatsByDocType: {} };
418
+ }
419
+ }
420
+ async function ce(t, e) {
421
+ const s = new FormData();
422
+ s.append("InputStream", t);
423
+ const r = await k(
424
+ I.UPLOAD_AND_GET_RESPONSE,
425
+ {
426
+ body: s,
427
+ method: "POST"
428
+ },
429
+ {
430
+ ClientFileName: t.name,
431
+ FolderRecordID: e?.imageUploadFolderID || ""
432
+ }
433
+ ), o = r ? await r.json() : null;
434
+ return o ? o.downloadLink === "" ? (L(e?.errorUploadMessage || "", {
435
+ notificationType: "error"
436
+ }), "") : o.downloadLink : (L(e?.errorUploadMessage || "", {
437
+ notificationType: "error"
438
+ }), "");
439
+ }
440
+ export {
441
+ C as D,
442
+ x as F,
443
+ m as O,
444
+ ae as a,
445
+ ne as b,
446
+ de as c,
447
+ ue as d,
448
+ se as e,
449
+ le as f,
450
+ N as g,
451
+ O as h,
452
+ oe as i,
453
+ R as j,
454
+ g as k,
455
+ P as l,
456
+ G as m,
457
+ j as n,
458
+ ie as o,
459
+ ce as u
460
+ };
@@ -1,8 +1,8 @@
1
1
  import { n as i, C as v } from "./lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as g } from "./component.styles.DMSLciL5.js";
3
3
  import { c as C } from "./custom-element.L4WJXn1j.js";
4
- import { F as x, v as w } from "./form.DgwYWi0O.js";
5
- import { L as $ } from "./i18n.BUW7B9hr.js";
4
+ import { F as x, v as w } from "./form.B_CGJolT.js";
5
+ import { L as $ } from "./i18n.B2u7b-84.js";
6
6
  import { H as S, g as O } from "./slot.j5oheLJC.js";
7
7
  import { w as m } from "./watch.BCJD77bD.js";
8
8
  import { r as u } from "./state.CSDxrqLd.js";
@@ -1,15 +1,15 @@
1
1
  import z from "../components/space.js";
2
- import { C as $ } from "./table.D3Pc7KGF.js";
2
+ import { C as $ } from "./table.C_gG1jGN.js";
3
3
  import { C as k } from "./typography.oDzoLbZS.js";
4
4
  import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
5
- import { C, a as m } from "./color-swatch.BuUP5yG4.js";
5
+ import { C, a as m } from "./color-swatch.BGOIeMpR.js";
6
6
  import { c as A } from "./component.styles.DMSLciL5.js";
7
- import { D as p } from "./content-builder.B4Tqoc6M.js";
7
+ import { D as p } from "./toast.B2cJgW5u.js";
8
8
  import { c as S } from "./custom-element.L4WJXn1j.js";
9
9
  import { d as T } from "./debounce.DaHuiSGU.js";
10
- import { L as E } from "./i18n.BUW7B9hr.js";
10
+ import { L as E } from "./i18n.B2u7b-84.js";
11
11
  import { w as x } from "./watch.BCJD77bD.js";
12
- import { g as D, a as R } from "./responsive.DL-wBD4P.js";
12
+ import { g as D, a as R } from "./responsive.BndCeSg0.js";
13
13
  import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
14
14
  import { r as d } from "./state.CSDxrqLd.js";
15
15
  import { e as P } from "./query.BBf1UFkC.js";
@@ -8,7 +8,7 @@ import { c as F } from "./component.styles.DMSLciL5.js";
8
8
  import { c as n, C as h, H as $, l as z } from "./color.vLD2sNTs.js";
9
9
  import { c as O } from "./custom-element.L4WJXn1j.js";
10
10
  import { d as W } from "./debounce.DaHuiSGU.js";
11
- import { L as A } from "./i18n.BUW7B9hr.js";
11
+ import { L as A } from "./i18n.B2u7b-84.js";
12
12
  import { w as i } from "./watch.BCJD77bD.js";
13
13
  import { i as G, x as u } from "./lit-element.jLBm65_O.js";
14
14
  import { r as c } from "./state.CSDxrqLd.js";
@@ -1,11 +1,11 @@
1
- import { C as _ } from "./button.csCRiZzY.js";
2
- import { C as u, D as h } from "./dialog.BdXQkCKY.js";
1
+ import { C as _ } from "./button.BKg5x2tE.js";
2
+ import { C as u, D as h } from "./dialog.C3Y3HyEQ.js";
3
3
  import g from "../components/dropdown.js";
4
4
  import { C as x } from "./typography.oDzoLbZS.js";
5
5
  import { n as e, C as b } from "./lib-cortex-element.CVMmyPMC.js";
6
6
  import { c as y } from "./component.styles.DMSLciL5.js";
7
7
  import { c as w } from "./custom-element.L4WJXn1j.js";
8
- import { L as $ } from "./i18n.BUW7B9hr.js";
8
+ import { L as $ } from "./i18n.B2u7b-84.js";
9
9
  import { i as z, x as d } from "./lit-element.jLBm65_O.js";
10
10
  import { e as m } from "./query.BBf1UFkC.js";
11
11
  import { e as a } from "./class-map.BiVq-cVR.js";