@orangelogic/design-system 2.137.0 → 2.139.0

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 (106) hide show
  1. package/library/chunks/{asset-link-format.C7qLkR5q.js → asset-link-format.oOC8fxvV.js} +220 -219
  2. package/library/chunks/{button.C1SliH9f.js → button.J4LDuhyW.js} +1 -1
  3. package/library/chunks/{color-swatch-group.-16VIoq6.js → color-swatch-group.CYI2N8gp.js} +14 -6
  4. package/library/chunks/{color-swatch.C26o9Mgz.js → color-swatch.DimFgBSf.js} +1 -1
  5. package/library/chunks/{confirm-popover.UaaAL0w7.js → confirm-popover.DV5q0KyE.js} +3 -3
  6. package/library/chunks/{dialog.Bb0_EAwb.js → dialog.C79Kd2S4.js} +2 -2
  7. package/library/chunks/{document-viewer.Bfg059Ip.js → document-viewer.Ga2Ppgit.js} +3911 -3812
  8. package/library/chunks/{dot-pagination.BzRjwmKy.js → dot-pagination.CoG0XmAq.js} +1 -1
  9. package/library/chunks/{endpoints.tU0_RZ_7.js → endpoints.BlywT4Gl.js} +1 -1
  10. package/library/chunks/{file-on-demand.j_V2IDwl.js → file-on-demand.C3ib6J00.js} +9 -9
  11. package/library/chunks/focus-when-visible.jWSw9ks0.js +21 -0
  12. package/library/chunks/{folder-select.B2trdP78.js → folder-select.BQXuKb-8.js} +5 -5
  13. package/library/chunks/{header.CAG_RmQg.js → header.zCbb-t6m.js} +1 -1
  14. package/library/chunks/{i18n.Dqb15q5k.js → i18n.DeUAP8n2.js} +5 -3
  15. package/library/chunks/{icon-button.BqFraOfp.js → icon-button.LhIEmHNF.js} +1 -1
  16. package/library/chunks/{iframe.Cg0YBl8p.js → iframe.c0IPEUiJ.js} +1 -1
  17. package/library/chunks/{image.VNvhPhZ1.js → image.u2nQNoZ8.js} +1 -1
  18. package/library/chunks/{input.C_db7iND.js → input.DID1aXiO.js} +1 -1
  19. package/library/chunks/{option.D5NdA-Cm.js → option.n6PDuSs1.js} +1 -1
  20. package/library/chunks/{pagination.C_4fPcD4.js → pagination.BNU2UmTy.js} +5 -5
  21. package/library/chunks/{tab-group.CRTjU6He.js → tab-group.5O3lqvyG.js} +3 -3
  22. package/library/chunks/{tree.BYcnDDKg.js → tree.CbwFiRJI.js} +1 -1
  23. package/library/components/alert.js +2 -2
  24. package/library/components/asset-link-format.js +3 -3
  25. package/library/components/atoms.js +13 -13
  26. package/library/components/audio.js +19 -19
  27. package/library/components/border-input-group.js +2 -2
  28. package/library/components/breadcrumb.js +1 -1
  29. package/library/components/button.js +2 -2
  30. package/library/components/color-picker.js +4 -4
  31. package/library/components/color-swatch-group.js +3 -3
  32. package/library/components/color-swatch.js +2 -2
  33. package/library/components/confirm-popover.js +4 -4
  34. package/library/components/copy-button.js +1 -1
  35. package/library/components/corner-position-input-group.js +3 -3
  36. package/library/components/date-calendar.js +1 -1
  37. package/library/components/details.js +1 -1
  38. package/library/components/dialog.js +3 -3
  39. package/library/components/document-viewer.js +3 -3
  40. package/library/components/dot-pagination.js +2 -2
  41. package/library/components/drawer.js +2 -2
  42. package/library/components/dropdown.js +33 -32
  43. package/library/components/dynamic-select.js +4 -4
  44. package/library/components/e-chart.js +1 -1
  45. package/library/components/element-clamp.js +2 -2
  46. package/library/components/file-on-demand.js +10 -10
  47. package/library/components/folder-select.js +5 -5
  48. package/library/components/format-bytes.js +1 -1
  49. package/library/components/format-date.js +1 -1
  50. package/library/components/format-number.js +1 -1
  51. package/library/components/format-time.js +1 -1
  52. package/library/components/header.js +2 -2
  53. package/library/components/icon-button.js +2 -2
  54. package/library/components/iframe.js +2 -2
  55. package/library/components/image-comparer.js +1 -1
  56. package/library/components/image.js +2 -2
  57. package/library/components/input.js +2 -2
  58. package/library/components/line-clamp.js +1 -1
  59. package/library/components/masonry.js +2 -2
  60. package/library/components/menu-item.js +207 -150
  61. package/library/components/menu.js +1 -1
  62. package/library/components/molecules.js +3 -3
  63. package/library/components/option.js +2 -2
  64. package/library/components/organisms.js +3 -3
  65. package/library/components/padding-input-group.js +1 -1
  66. package/library/components/pagination.js +6 -6
  67. package/library/components/popup.js +1 -1
  68. package/library/components/position-picker.js +1 -1
  69. package/library/components/progress-bar.js +1 -1
  70. package/library/components/progress-ring.js +1 -1
  71. package/library/components/range.js +1 -1
  72. package/library/components/rating.js +1 -1
  73. package/library/components/relative-time.js +1 -1
  74. package/library/components/select.js +2 -2
  75. package/library/components/shadow-input-group.js +1 -1
  76. package/library/components/share-option-list.js +1 -1
  77. package/library/components/sidebar.js +1 -1
  78. package/library/components/size-input-group.js +3 -3
  79. package/library/components/spinner.js +1 -1
  80. package/library/components/split-panel.js +1 -1
  81. package/library/components/tab-group.js +4 -4
  82. package/library/components/tab.js +2 -2
  83. package/library/components/tag.js +2 -2
  84. package/library/components/tooltip.js +1 -1
  85. package/library/components/tree-item.js +2 -2
  86. package/library/components/tree.js +2 -2
  87. package/library/components/typeface.js +2 -2
  88. package/library/components/types.js +18478 -18429
  89. package/library/components/video.js +2 -2
  90. package/library/package.json +1 -1
  91. package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -1
  92. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
  93. package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +28 -0
  94. package/library/packages/hybrid/book-reader/src/react/constant.d.ts +1 -0
  95. package/library/packages/hybrid/book-reader/src/react/hooks/useDrawer.d.ts +1 -1
  96. package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +11 -0
  97. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +7 -0
  98. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +8 -0
  99. package/library/packages/services/src/api/asset/asset.d.ts +2 -1
  100. package/library/packages/services/src/api/endpoints.d.ts +1 -0
  101. package/library/packages/utils/src/custom-element/focus-when-visible.d.ts +14 -0
  102. package/library/packages/utils/src/custom-element/i18n.d.ts +2 -0
  103. package/library/packages/utils/src/index.d.ts +1 -0
  104. package/library/react-web-component.d.ts +4 -0
  105. package/library/utils.js +133 -131
  106. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import "../components/cropper.js";
2
- import { C as G } from "./button.C1SliH9f.js";
2
+ import { C as G } from "./button.J4LDuhyW.js";
3
3
  import D from "../components/space.js";
4
4
  import { C as T } from "./typography.DJC_UXgs.js";
5
5
  import { n as h, C as N } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as P, a as Et, C as Tt, S as Nt, b as Lt, c as Ot } from "./endpoints.tU0_RZ_7.js";
7
- import { M as bt, U as o, T as c } from "./asset-link-format.QzzboHHE.js";
6
+ import { h as P, a as Et, C as It, S as Nt, b as Lt, c as Ot } from "./endpoints.BlywT4Gl.js";
7
+ import { M as At, U as o, T as c } from "./asset-link-format.QzzboHHE.js";
8
8
  import "./browser.BHOCIF_A.js";
9
9
  import { i as L, x, E as Ut } from "./lit-element.jLBm65_O.js";
10
10
  import "./form.K1XOtu3S.js";
11
- import { L as O } from "./i18n.Dqb15q5k.js";
11
+ import { L as O } from "./i18n.DeUAP8n2.js";
12
12
  import { a as qt } from "./string.CjJ09HK3.js";
13
13
  import "./date-picker.DTUICGb9.js";
14
14
  import "./content-builder.BGzxZUgi.js";
@@ -17,22 +17,22 @@ import { b as Bt } from "./_baseUniq.HFKneygy.js";
17
17
  import { c as U } from "./component.styles.CRO4Odto.js";
18
18
  import { c as q } from "./custom-element.L4WJXn1j.js";
19
19
  import { w as C } from "./watch.CThbualB.js";
20
- import { s as zt, c as At } from "./number.B4PQLJIg.js";
20
+ import { s as bt, c as zt } from "./number.B4PQLJIg.js";
21
21
  import { b as et } from "./transformation.c-RS37zA.js";
22
22
  import { r as v } from "./state.CSDxrqLd.js";
23
23
  import { n as _ } from "./when.Dr1es41R.js";
24
24
  import Z from "../components/details.js";
25
25
  import jt from "../components/divider.js";
26
26
  import { C as Y } from "./icon.DnBh6-56.js";
27
- import { C as ut } from "./icon-button.BqFraOfp.js";
28
- import { C as mt } from "./input.C_db7iND.js";
29
- import { C as rt } from "./option.D5NdA-Cm.js";
27
+ import { C as ut } from "./icon-button.LhIEmHNF.js";
28
+ import { C as mt } from "./input.DID1aXiO.js";
29
+ import { C as rt } from "./option.n6PDuSs1.js";
30
30
  import nt from "../components/select.js";
31
31
  import { c as Vt } from "./image.BzmclWBR.js";
32
32
  import { e as J } from "./query.BBf1UFkC.js";
33
33
  import { c as tt } from "./repeat.CFjcER6_.js";
34
34
  import { o as I } from "./style-map.llVFPd__.js";
35
- import It from "../components/tooltip.js";
35
+ import Ht from "../components/tooltip.js";
36
36
  import Gt from "../components/button-group.js";
37
37
  import { C as Qt } from "./checkbox.Cjcht4xR.js";
38
38
  function Kt(t) {
@@ -81,36 +81,36 @@ function te(t) {
81
81
  if (a == null)
82
82
  continue;
83
83
  if (s === "custom") {
84
- for (const [r, l] of Object.entries(
84
+ for (const [n, l] of Object.entries(
85
85
  a
86
86
  ))
87
- e.push(wt(r, l));
87
+ e.push(wt(n, l));
88
88
  continue;
89
89
  }
90
- const n = Zt[s];
91
- if (n) {
90
+ const r = Zt[s];
91
+ if (r) {
92
92
  if (Yt.has(s)) {
93
93
  e.push(
94
- Jt(n, a)
94
+ Jt(r, a)
95
95
  );
96
96
  continue;
97
97
  }
98
98
  if (s === "color") {
99
- e.push(`${n}:${a}`);
99
+ e.push(`${r}:${a}`);
100
100
  continue;
101
101
  }
102
102
  if (s === "parentFolderIdentifier") {
103
- const r = Array.isArray(a) ? a : [a];
104
- if (r.length === 0)
103
+ const n = Array.isArray(a) ? a : [a];
104
+ if (n.length === 0)
105
105
  continue;
106
106
  const l = [
107
- ...r.map((u) => `ParentFolderIdentifier:${pt(String(u))}`),
108
- ...r.map((u) => `ParentAlbumIdentifier:${pt(String(u))}`)
107
+ ...n.map((u) => `ParentFolderIdentifier:${pt(String(u))}`),
108
+ ...n.map((u) => `ParentAlbumIdentifier:${pt(String(u))}`)
109
109
  ];
110
110
  e.push(`(${l.join(" OR ")})`);
111
111
  continue;
112
112
  }
113
- e.push(wt(n, a));
113
+ e.push(wt(r, a));
114
114
  }
115
115
  }
116
116
  return e.join(" AND ");
@@ -128,22 +128,22 @@ function it(t) {
128
128
  }
129
129
  return te(t);
130
130
  }
131
- const dt = "CoreField.LargeSizePreview", vt = "CoreField.DocType", ee = "Document.Title", ie = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", $t = "CoreField.Identifier", Rt = "CoreField.Keywords", _t = "CoreField.MaxHeight", Pt = "CoreField.MaxWidth", st = "Document.RecordID", Mt = "CoreField.DocSubType", Ht = "CoreField.TitleWithFallback", at = "CoreField.OriginalFileName", ot = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", ct = {
131
+ const dt = "CoreField.LargeSizePreview", vt = "CoreField.DocType", ee = "Document.Title", ie = "Document.CaptionLong", kt = "Document.FileExtension", Ct = "CoreField.FileSize", $t = "CoreField.Identifier", Rt = "CoreField.Keywords", _t = "CoreField.MaxHeight", Pt = "CoreField.MaxWidth", st = "Document.RecordID", Mt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", at = "CoreField.OriginalFileName", ot = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", ct = {
132
132
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
133
133
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
134
134
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
135
- }, Wt = {
135
+ }, Dt = {
136
136
  [dt]: ct.DEFAULT_VIEW_SIZE,
137
- [Ht]: ct.FIELD_TITLE_WITH_FALLBACK,
137
+ [Wt]: ct.FIELD_TITLE_WITH_FALLBACK,
138
138
  [X]: ct.ORIGINAL_VIEW_SIZE
139
139
  }, se = Object.fromEntries(
140
- Object.entries(Wt).map(([t, e]) => [
140
+ Object.entries(Dt).map(([t, e]) => [
141
141
  e,
142
142
  t
143
143
  ])
144
144
  );
145
145
  function ae(t) {
146
- return Wt[t] ?? t;
146
+ return Dt[t] ?? t;
147
147
  }
148
148
  function Ft(t) {
149
149
  const e = {};
@@ -153,20 +153,20 @@ function Ft(t) {
153
153
  }
154
154
  return e;
155
155
  }
156
- async function Dt({
156
+ async function Tt({
157
157
  countPerPage: t,
158
158
  fields: e,
159
159
  getPermanentAssetsPaths: i,
160
160
  isSiteBuilder: s,
161
161
  pageNumber: a,
162
- query: n,
163
- securityByPassToken: r,
162
+ query: r,
163
+ securityByPassToken: n,
164
164
  siteUrl: l,
165
165
  sort: u,
166
166
  token: S,
167
167
  useSession: f
168
168
  }) {
169
- const A = e?.map(ae);
169
+ const z = e?.map(ae);
170
170
  try {
171
171
  return (await P.request({
172
172
  baseURL: l,
@@ -174,12 +174,12 @@ async function Dt({
174
174
  method: "GET",
175
175
  params: {
176
176
  CountPerPage: t,
177
- Fields: Kt(A),
177
+ Fields: Kt(z),
178
178
  Format: "json",
179
179
  GetPermanentAssetsPaths: i || void 0,
180
180
  PageNumber: a,
181
- Query: it(n),
182
- SecurityByPassToken: r || void 0,
181
+ Query: it(r),
182
+ SecurityByPassToken: n || void 0,
183
183
  Sort: u || void 0,
184
184
  UseSession: f || void 0
185
185
  },
@@ -197,7 +197,7 @@ async function Dt({
197
197
  totalCount: m.APIResponse?.GlobalInfo?.TotalCount ?? 0
198
198
  })
199
199
  ],
200
- url: s ? Tt.SEARCH_ASSETS : Nt["4.0"]
200
+ url: s ? It.SEARCH_ASSETS : Nt["4.0"]
201
201
  })).data;
202
202
  } catch {
203
203
  return { items: [], sort: "", totalCount: 0 };
@@ -209,8 +209,8 @@ async function oe({
209
209
  format: i,
210
210
  siteUrl: s,
211
211
  token: a,
212
- transformations: n,
213
- useSession: r
212
+ transformations: r,
213
+ useSession: n
214
214
  }) {
215
215
  try {
216
216
  return (await P.request({
@@ -221,8 +221,8 @@ async function oe({
221
221
  SourceAssetRecordID: t,
222
222
  TargetExtension: qt(e),
223
223
  Token: a || void 0,
224
- Transformations: n,
225
- UseSession: r || void 0
224
+ Transformations: r,
225
+ UseSession: n || void 0
226
226
  },
227
227
  /**
228
228
  * https://link.orangelogic.com/Tasks/41S1XH
@@ -248,12 +248,12 @@ async function gi({
248
248
  isSiteBuilder: i,
249
249
  recordIds: s,
250
250
  securityByPassToken: a,
251
- token: n
251
+ token: r
252
252
  }) {
253
253
  if (!Array.isArray(s) || s.length === 0)
254
254
  return { facets: [], items: [], totalCount: 0 };
255
- const r = t?.filter((m) => m && typeof m == "string") ?? [], l = [
256
- ...r,
255
+ const n = t?.filter((m) => m && typeof m == "string") ?? [], l = [
256
+ ...n,
257
257
  X,
258
258
  ot,
259
259
  at,
@@ -262,7 +262,7 @@ async function gi({
262
262
  st
263
263
  ], u = ne(s, re), S = await Promise.all(
264
264
  u.map(
265
- (m) => Dt({
265
+ (m) => Tt({
266
266
  countPerPage: m.length,
267
267
  fields: l,
268
268
  getPermanentAssetsPaths: e,
@@ -270,17 +270,17 @@ async function gi({
270
270
  pageNumber: 1,
271
271
  query: { recordId: m },
272
272
  securityByPassToken: a,
273
- token: n
273
+ token: r
274
274
  })
275
275
  )
276
- ), f = new Map(s.map((m, R) => [m, R])), A = S.flatMap((m) => m.items).map((m) => {
276
+ ), f = new Map(s.map((m, R) => [m, R])), z = S.flatMap((m) => m.items).map((m) => {
277
277
  let R = w(m, ot);
278
278
  return R === "" && (R = w(m, at)), {
279
279
  name: R,
280
280
  originalUrl: w(m, X),
281
281
  recordId: w(m, st),
282
- ...r.reduce(
283
- (Q, b) => (Q[b] = w(m, b), Q),
282
+ ...n.reduce(
283
+ (Q, A) => (Q[A] = w(m, A), Q),
284
284
  {}
285
285
  )
286
286
  };
@@ -290,7 +290,7 @@ async function gi({
290
290
  (m, R) => m + R.totalCount,
291
291
  0
292
292
  );
293
- return { facets: [], items: A, totalCount: $ };
293
+ return { facets: [], items: z, totalCount: $ };
294
294
  }
295
295
  function w(t, e) {
296
296
  const i = t[e];
@@ -302,25 +302,25 @@ async function xi({
302
302
  extraFields: i,
303
303
  getPermanentAssetsPaths: s,
304
304
  isSiteBuilder: a,
305
- limitedDocTypes: n,
306
- pageNumber: r,
305
+ limitedDocTypes: r,
306
+ pageNumber: n,
307
307
  parentFolderIdentifier: l,
308
308
  searchTerm: u,
309
309
  securityByPassToken: S,
310
310
  sortOrder: f,
311
- token: A
311
+ token: z
312
312
  }) {
313
313
  if (!e && !l)
314
314
  return { facets: [], items: [], totalCount: 0 };
315
- const $ = (i?.filter((b) => b && typeof b == "string") ?? []).map((b) => b.replace("%20", " ")), m = {
315
+ const $ = (i?.filter((A) => A && typeof A == "string") ?? []).map((A) => A.replace("%20", " ")), m = {
316
316
  directParentFolderIdentifier: e,
317
317
  parentFolderIdentifier: l,
318
- ...n.length > 0 ? { docType: [bt.Image, bt.Audio] } : {}
319
- }, R = await Dt({
318
+ ...r.length > 0 ? { docType: [At.Image, At.Audio] } : {}
319
+ }, R = await Tt({
320
320
  countPerPage: t,
321
321
  fields: [
322
322
  ...$,
323
- Ht,
323
+ Wt,
324
324
  dt,
325
325
  X,
326
326
  Rt,
@@ -337,31 +337,31 @@ async function xi({
337
337
  ],
338
338
  getPermanentAssetsPaths: s,
339
339
  isSiteBuilder: a,
340
- pageNumber: r,
340
+ pageNumber: n,
341
341
  query: m,
342
342
  securityByPassToken: S,
343
343
  sort: void 0,
344
- token: A
345
- }), Q = R.items.map((b) => {
346
- let K = w(b, kt), lt = w(b, ot), gt = w(b, dt);
347
- K && !K.startsWith(".") && (K = "." + K), lt === "" && (lt = w(b, at)), K.toLowerCase() === ".gif" && (gt = w(b, X));
348
- const xt = w(b, st);
344
+ token: z
345
+ }), Q = R.items.map((A) => {
346
+ let K = w(A, kt), lt = w(A, ot), gt = w(A, dt);
347
+ K && !K.startsWith(".") && (K = "." + K), lt === "" && (lt = w(A, at)), K.toLowerCase() === ".gif" && (gt = w(A, X));
348
+ const xt = w(A, st);
349
349
  return {
350
- docSubType: w(b, Mt),
351
- docType: w(b, vt) || "",
350
+ docSubType: w(A, Mt),
351
+ docType: w(A, vt) || "",
352
352
  extension: K,
353
- height: w(b, _t) || "0",
353
+ height: w(A, _t) || "0",
354
354
  id: xt,
355
- identifier: w(b, $t),
355
+ identifier: w(A, $t),
356
356
  imageUrl: gt,
357
357
  name: lt,
358
- originalUrl: w(b, X),
358
+ originalUrl: w(A, X),
359
359
  recordId: xt,
360
- size: w(b, Ct) || "0 MB",
361
- tags: w(b, Rt),
362
- width: w(b, Pt) || "0",
360
+ size: w(A, Ct) || "0 MB",
361
+ tags: w(A, Rt),
362
+ width: w(A, Pt) || "0",
363
363
  ...$.reduce(
364
- (yt, St) => (yt[St] = w(b, St), yt),
364
+ (yt, St) => (yt[St] = w(A, St), yt),
365
365
  {}
366
366
  )
367
367
  };
@@ -394,11 +394,11 @@ async function he({
394
394
  // 5 minutes
395
395
  transformResponse: [
396
396
  ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
397
- (r) => ({
398
- height: r.cropHeight,
399
- width: r.cropWidth,
400
- x: r.cropX,
401
- y: r.cropY
397
+ (n) => ({
398
+ height: n.cropHeight,
399
+ width: n.cropWidth,
400
+ x: n.cropX,
401
+ y: n.cropY
402
402
  })
403
403
  ],
404
404
  url: Et.GET_CROP_ZONE_SUGGESTION
@@ -409,35 +409,36 @@ async function he({
409
409
  }
410
410
  async function yi({
411
411
  assetRecordId: t,
412
- siteUrl: e,
413
- token: i,
414
- useSession: s
412
+ isSiteBuilder: e,
413
+ siteUrl: i,
414
+ token: s,
415
+ useSession: a
415
416
  }) {
416
417
  try {
417
418
  return (await P.request({
418
- baseURL: e,
419
+ baseURL: i,
419
420
  method: "GET",
420
421
  params: {
421
422
  RecordId: t,
422
- Token: i,
423
- UseSession: s || void 0
423
+ Token: s,
424
+ UseSession: a || void 0
424
425
  },
425
426
  responseType: "json",
426
427
  transformResponse: [
427
428
  ...Array.isArray(P.defaults.transformResponse) ? P.defaults.transformResponse : [],
428
- (n) => !n || typeof n != "object" ? [] : n.proxies?.map((r) => ({
429
- cdnName: r.cdnName,
430
- extension: r.extension,
431
- formatHeight: r.formatHeight,
432
- formatWidth: r.formatWidth,
433
- height: r.height,
434
- permanentLink: r.permanentLink,
435
- proxyLabel: r.proxyLabel,
436
- proxyName: r.proxyName,
437
- width: r.width
429
+ (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
430
+ cdnName: l.cdnName,
431
+ extension: l.extension,
432
+ formatHeight: l.formatHeight,
433
+ formatWidth: l.formatWidth,
434
+ height: l.height,
435
+ permanentLink: l.permanentLink,
436
+ proxyLabel: l.proxyLabel,
437
+ proxyName: l.proxyName,
438
+ width: l.width
438
439
  })) ?? []
439
440
  ],
440
- url: Ot
441
+ url: e ? It.GET_AVAILABLE_PROXIES : Ot
441
442
  })).data;
442
443
  } catch {
443
444
  return [];
@@ -472,8 +473,8 @@ async function Si({
472
473
  }
473
474
  const le = L`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, ce = L`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
474
475
  var pe = Object.defineProperty, de = Object.getOwnPropertyDescriptor, y = (t, e, i, s) => {
475
- for (var a = s > 1 ? void 0 : s ? de(e, i) : e, n = t.length - 1, r; n >= 0; n--)
476
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
476
+ for (var a = s > 1 ? void 0 : s ? de(e, i) : e, r = t.length - 1, n; r >= 0; r--)
477
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
477
478
  return s && a && pe(e, i, a), a;
478
479
  };
479
480
  let g = class extends N {
@@ -590,19 +591,19 @@ let g = class extends N {
590
591
  else if (!i) {
591
592
  const [s, a] = e.split(":").map(Number);
592
593
  if (this.unit === o.Pixel) {
593
- let n = s, r = a;
594
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: r, width: n } = Vt(
594
+ let r = s, n = a;
595
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = Vt(
595
596
  this.maxWidth,
596
597
  this.maxHeight,
597
598
  s,
598
599
  a
599
600
  )), this.emit("cx-asset-link-format-crop-change", {
600
601
  detail: {
601
- height: r,
602
+ height: n,
602
603
  keepAspectRatio: !0,
603
604
  silent: !0,
604
605
  unit: o.Pixel,
605
- width: n
606
+ width: r
606
607
  }
607
608
  });
608
609
  } else
@@ -833,8 +834,8 @@ g = y([
833
834
  ], g);
834
835
  const ue = L`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
835
836
  var me = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, ft = (t, e, i, s) => {
836
- for (var a = s > 1 ? void 0 : s ? fe(e, i) : e, n = t.length - 1, r; n >= 0; n--)
837
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
837
+ for (var a = s > 1 ? void 0 : s ? fe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
838
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
838
839
  return s && a && me(e, i, a), a;
839
840
  };
840
841
  let V = class extends N {
@@ -873,8 +874,8 @@ V = ft([
873
874
  ], V);
874
875
  const ge = L`cx-details::part(base){border-bottom-width:0}`;
875
876
  var xe = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, H = (t, e, i, s) => {
876
- for (var a = s > 1 ? void 0 : s ? ye(e, i) : e, n = t.length - 1, r; n >= 0; n--)
877
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
877
+ for (var a = s > 1 ? void 0 : s ? ye(e, i) : e, r = t.length - 1, n; r >= 0; r--)
878
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
878
879
  return s && a && xe(e, i, a), a;
879
880
  };
880
881
  let M = class extends N {
@@ -970,10 +971,10 @@ M = H([
970
971
  q("cx-asset-link-format-proxy")
971
972
  ], M);
972
973
  const Se = L`cx-details::part(base){border-bottom-width:0}`;
973
- var be = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, B = (t, e, i, s) => {
974
- for (var a = s > 1 ? void 0 : s ? ze(e, i) : e, n = t.length - 1, r; n >= 0; n--)
975
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
976
- return s && a && be(e, i, a), a;
974
+ var Ae = Object.defineProperty, be = Object.getOwnPropertyDescriptor, B = (t, e, i, s) => {
975
+ for (var a = s > 1 ? void 0 : s ? be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
976
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
977
+ return s && a && Ae(e, i, a), a;
977
978
  };
978
979
  let F = class extends N {
979
980
  constructor() {
@@ -1035,7 +1036,7 @@ F.dependencies = {
1035
1036
  "cx-icon": Y,
1036
1037
  "cx-input": mt,
1037
1038
  "cx-space": D,
1038
- "cx-tooltip": It,
1039
+ "cx-tooltip": Ht,
1039
1040
  "cx-typography": T
1040
1041
  };
1041
1042
  B([
@@ -1062,13 +1063,13 @@ B([
1062
1063
  F = B([
1063
1064
  q("cx-asset-link-format-quality")
1064
1065
  ], F);
1065
- const Ae = L`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1066
+ const ze = L`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1066
1067
  var we = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, k = (t, e, i, s) => {
1067
- for (var a = s > 1 ? void 0 : s ? ve(e, i) : e, n = t.length - 1, r; n >= 0; n--)
1068
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
1068
+ for (var a = s > 1 ? void 0 : s ? ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1069
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1069
1070
  return s && a && we(e, i, a), a;
1070
1071
  };
1071
- let z = class extends N {
1072
+ let b = class extends N {
1072
1073
  constructor() {
1073
1074
  super(...arguments), this.localize = new O(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1074
1075
  [o.Pixel]: { height: 0, width: 0 },
@@ -1219,8 +1220,8 @@ let z = class extends N {
1219
1220
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
1220
1221
  }
1221
1222
  };
1222
- z.styles = [U, Ae];
1223
- z.dependencies = {
1223
+ b.styles = [U, ze];
1224
+ b.dependencies = {
1224
1225
  "cx-button": G,
1225
1226
  "cx-details": Z,
1226
1227
  "cx-icon": Y,
@@ -1233,68 +1234,68 @@ z.dependencies = {
1233
1234
  };
1234
1235
  k([
1235
1236
  J(".details")
1236
- ], z.prototype, "base", 2);
1237
+ ], b.prototype, "base", 2);
1237
1238
  k([
1238
1239
  h({ reflect: !0, type: Boolean })
1239
- ], z.prototype, "open", 2);
1240
+ ], b.prototype, "open", 2);
1240
1241
  k([
1241
1242
  h({ reflect: !0, type: Number })
1242
- ], z.prototype, "width", 2);
1243
+ ], b.prototype, "width", 2);
1243
1244
  k([
1244
1245
  h({ reflect: !0, type: Number })
1245
- ], z.prototype, "height", 2);
1246
+ ], b.prototype, "height", 2);
1246
1247
  k([
1247
1248
  h({ attribute: "max-width", reflect: !0, type: Number })
1248
- ], z.prototype, "maxWidth", 2);
1249
+ ], b.prototype, "maxWidth", 2);
1249
1250
  k([
1250
1251
  h({ attribute: "max-height", reflect: !0, type: Number })
1251
- ], z.prototype, "maxHeight", 2);
1252
+ ], b.prototype, "maxHeight", 2);
1252
1253
  k([
1253
1254
  h({ attribute: "ratio-width", reflect: !0, type: Number })
1254
- ], z.prototype, "ratioWidth", 2);
1255
+ ], b.prototype, "ratioWidth", 2);
1255
1256
  k([
1256
1257
  h({ attribute: "ratio-height", reflect: !0, type: Number })
1257
- ], z.prototype, "ratioHeight", 2);
1258
+ ], b.prototype, "ratioHeight", 2);
1258
1259
  k([
1259
1260
  h({ reflect: !0, type: String })
1260
- ], z.prototype, "unit", 2);
1261
+ ], b.prototype, "unit", 2);
1261
1262
  k([
1262
1263
  h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1263
- ], z.prototype, "lastAppliedSetting", 2);
1264
+ ], b.prototype, "lastAppliedSetting", 2);
1264
1265
  k([
1265
1266
  h({ reflect: !0, type: Boolean })
1266
- ], z.prototype, "loading", 2);
1267
+ ], b.prototype, "loading", 2);
1267
1268
  k([
1268
1269
  h({ attribute: "can-apply", reflect: !0, type: Boolean })
1269
- ], z.prototype, "canApply", 2);
1270
+ ], b.prototype, "canApply", 2);
1270
1271
  k([
1271
1272
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1272
- ], z.prototype, "keepAspectRatio", 2);
1273
+ ], b.prototype, "keepAspectRatio", 2);
1273
1274
  k([
1274
1275
  v()
1275
- ], z.prototype, "invalidWidth", 2);
1276
+ ], b.prototype, "invalidWidth", 2);
1276
1277
  k([
1277
1278
  v()
1278
- ], z.prototype, "invalidHeight", 2);
1279
+ ], b.prototype, "invalidHeight", 2);
1279
1280
  k([
1280
1281
  v()
1281
- ], z.prototype, "aspectRatio", 2);
1282
+ ], b.prototype, "aspectRatio", 2);
1282
1283
  k([
1283
1284
  C("cropMode", { waitUntilFirstUpdate: !0 }),
1284
1285
  C("maxWidth", { waitUntilFirstUpdate: !0 }),
1285
1286
  C("maxHeight", { waitUntilFirstUpdate: !0 }),
1286
1287
  C("keepAspectRatio")
1287
- ], z.prototype, "handleCropModeChange", 1);
1288
+ ], b.prototype, "handleCropModeChange", 1);
1288
1289
  k([
1289
1290
  C("open")
1290
- ], z.prototype, "handleOpenChange", 1);
1291
- z = k([
1291
+ ], b.prototype, "handleOpenChange", 1);
1292
+ b = k([
1292
1293
  q("cx-asset-link-format-resize")
1293
- ], z);
1294
+ ], b);
1294
1295
  const ke = L`cx-details::part(base){border-bottom-width:0}`;
1295
1296
  var Ce = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, j = (t, e, i, s) => {
1296
- for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, n = t.length - 1, r; n >= 0; n--)
1297
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
1297
+ for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1298
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1298
1299
  return s && a && Ce(e, i, a), a;
1299
1300
  };
1300
1301
  let E = class extends N {
@@ -1311,14 +1312,14 @@ let E = class extends N {
1311
1312
  }
1312
1313
  }
1313
1314
  handleRotationChange(t) {
1314
- const e = t.target.value, i = zt(Number(e));
1315
+ const e = t.target.value, i = bt(Number(e));
1315
1316
  (Number(e) > 360 || Number(e) < -360) && (t.target.value = i.toString()), this.emit("cx-asset-link-format-rotation-change", {
1316
1317
  detail: i
1317
1318
  });
1318
1319
  }
1319
1320
  handleButtonClick(t) {
1320
1321
  this.emit("cx-asset-link-format-rotation-change", {
1321
- detail: zt(t)
1322
+ detail: bt(t)
1322
1323
  });
1323
1324
  }
1324
1325
  handleClockwiseClick() {
@@ -1380,8 +1381,8 @@ E = j([
1380
1381
  ], E);
1381
1382
  const Re = L`cx-details::part(base){border-bottom-width:0}`;
1382
1383
  var _e = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, ht = (t, e, i, s) => {
1383
- for (var a = s > 1 ? void 0 : s ? Pe(e, i) : e, n = t.length - 1, r; n >= 0; n--)
1384
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
1384
+ for (var a = s > 1 ? void 0 : s ? Pe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1385
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1385
1386
  return s && a && _e(e, i, a), a;
1386
1387
  };
1387
1388
  let W = class extends N {
@@ -1420,7 +1421,7 @@ W.dependencies = {
1420
1421
  "cx-details": Z,
1421
1422
  "cx-icon": Y,
1422
1423
  "cx-space": D,
1423
- "cx-tooltip": It,
1424
+ "cx-tooltip": Ht,
1424
1425
  "cx-typography": T
1425
1426
  };
1426
1427
  ht([
@@ -1436,8 +1437,8 @@ W = ht([
1436
1437
  q("cx-asset-link-format-metadata")
1437
1438
  ], W);
1438
1439
  var Me = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, d = (t, e, i, s) => {
1439
- for (var a = s > 1 ? void 0 : s ? Fe(e, i) : e, n = t.length - 1, r; n >= 0; n--)
1440
- (r = t[n]) && (a = (s ? r(e, i, a) : r(a)) || a);
1440
+ for (var a = s > 1 ? void 0 : s ? Fe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1441
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1441
1442
  return s && a && Me(e, i, a), a;
1442
1443
  };
1443
1444
  let p = class extends N {
@@ -1573,7 +1574,7 @@ let p = class extends N {
1573
1574
  * It returns an object with the last crop size in both pixel and aspect ratio units.
1574
1575
  */
1575
1576
  get lastCropSize() {
1576
- const t = At(
1577
+ const t = zt(
1577
1578
  this.lastImageSize.width,
1578
1579
  this.lastImageSize.height
1579
1580
  );
@@ -1604,7 +1605,7 @@ let p = class extends N {
1604
1605
  * It returns an object with the last resize size in both pixel and aspect ratio units.
1605
1606
  */
1606
1607
  get lastResizeSize() {
1607
- const t = At(
1608
+ const t = zt(
1608
1609
  this.lastImageSize.width,
1609
1610
  this.lastImageSize.height
1610
1611
  );
@@ -1724,16 +1725,16 @@ let p = class extends N {
1724
1725
  useSession: this.useSession
1725
1726
  }).replace(/\/t\//g, "")
1726
1727
  });
1727
- const n = this.transformations.findLast(
1728
+ const r = this.transformations.findLast(
1728
1729
  (f) => f.key === c.Crop && f.value.width && f.value.height
1729
1730
  );
1730
- if (n) {
1731
- const { focusMode: f, height: A, unit: $, width: m, x: R = 0, y: Q = 0 } = n.value;
1731
+ if (r) {
1732
+ const { focusMode: f, height: z, unit: $, width: m, x: R = 0, y: Q = 0 } = r.value;
1732
1733
  this.cropSize = {
1733
1734
  ...this.cropSize,
1734
1735
  cropMode: "free",
1735
1736
  focusMode: f ?? "manual",
1736
- height: A,
1737
+ height: z,
1737
1738
  percentageHeight: 100,
1738
1739
  percentageWidth: 100,
1739
1740
  unit: $ ?? o.Pixel,
@@ -1754,15 +1755,15 @@ let p = class extends N {
1754
1755
  x: 0,
1755
1756
  y: 0
1756
1757
  };
1757
- const r = this.transformations.findLast(
1758
+ const n = this.transformations.findLast(
1758
1759
  (f) => f.key === c.Resize && (f.value.width || f.value.height)
1759
1760
  );
1760
- if (r) {
1761
- const { height: f = 0, unit: A, width: $ = 0 } = r.value;
1761
+ if (n) {
1762
+ const { height: f = 0, unit: z, width: $ = 0 } = n.value;
1762
1763
  this.resizeSize = {
1763
1764
  ...this.resizeSize,
1764
1765
  height: f,
1765
- unit: A ?? o.Pixel,
1766
+ unit: z ?? o.Pixel,
1766
1767
  width: $
1767
1768
  };
1768
1769
  } else
@@ -1796,7 +1797,7 @@ let p = class extends N {
1796
1797
  if (!this.selectedFormat)
1797
1798
  return;
1798
1799
  const t = this.proxies?.find(
1799
- (n) => n.id === this.selectedProxy
1800
+ (r) => r.id === this.selectedProxy
1800
1801
  );
1801
1802
  this.loading = !0;
1802
1803
  const e = await this.apiGetTransformAssetLink({
@@ -1834,9 +1835,9 @@ let p = class extends N {
1834
1835
  y: 0
1835
1836
  }, this.lastAction === c.Rotate && (this.rotation = 0), this.lastAction = void 0;
1836
1837
  const i = this.transformations.some(
1837
- (n) => n.key === c.Metadata
1838
+ (r) => r.key === c.Metadata
1838
1839
  ), s = this.transformations.findLast(
1839
- (n) => n.key === c.Quality
1840
+ (r) => r.key === c.Quality
1840
1841
  );
1841
1842
  this.selectedFormat = {
1842
1843
  ...this.selectedFormat,
@@ -1929,25 +1930,25 @@ let p = class extends N {
1929
1930
  const i = this.proxies?.find((s) => s.id === t);
1930
1931
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
1931
1932
  if (s.key === c.Crop) {
1932
- const a = s.value, n = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, u = a.y / i.formatHeight * e.formatHeight;
1933
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, u = a.y / i.formatHeight * e.formatHeight;
1933
1934
  return {
1934
1935
  ...s,
1935
1936
  value: {
1936
1937
  ...s.value,
1937
- height: r,
1938
- width: n,
1938
+ height: n,
1939
+ width: r,
1939
1940
  x: l,
1940
1941
  y: u
1941
1942
  }
1942
1943
  };
1943
1944
  }
1944
1945
  if (s.key === c.Resize) {
1945
- const a = s.value, n = a.width / i.formatWidth * e.formatWidth, r = a.height / i.formatHeight * e.formatHeight;
1946
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
1946
1947
  return {
1947
1948
  ...s,
1948
1949
  value: {
1949
- height: r,
1950
- width: n
1950
+ height: n,
1951
+ width: r
1951
1952
  }
1952
1953
  };
1953
1954
  }
@@ -2012,8 +2013,8 @@ let p = class extends N {
2012
2013
  height: i,
2013
2014
  keepAspectRatio: s,
2014
2015
  percentageHeight: a,
2015
- percentageWidth: n,
2016
- ratioHeight: r,
2016
+ percentageWidth: r,
2017
+ ratioHeight: n,
2017
2018
  ratioWidth: l,
2018
2019
  unit: u,
2019
2020
  useCropMode: S,
@@ -2022,22 +2023,22 @@ let p = class extends N {
2022
2023
  if (!this.selectedFormat?.url || e === "manual")
2023
2024
  return;
2024
2025
  this.loading = !0, this.lastAction = c.Crop;
2025
- const A = await this.apiGetCropFocusMode({
2026
+ const z = await this.apiGetCropFocusMode({
2026
2027
  autoCropMode: e,
2027
2028
  cropHeight: i,
2028
2029
  cropWidth: f,
2029
2030
  imageUrl: this.selectedFormat.url
2030
2031
  });
2031
- if (A) {
2032
- let $ = a, m = n;
2033
- i || ($ = A.height * 100 / this.selectedFormat.height), f || (m = A.width * 100 / this.selectedFormat.width), this.cropSize = {
2032
+ if (z) {
2033
+ let $ = a, m = r;
2034
+ i || ($ = z.height * 100 / this.selectedFormat.height), f || (m = z.width * 100 / this.selectedFormat.width), this.cropSize = {
2034
2035
  ...this.cropSize,
2035
- height: A.height,
2036
+ height: z.height,
2036
2037
  percentageHeight: $ ?? this.cropSize.percentageHeight,
2037
2038
  percentageWidth: m ?? this.cropSize.percentageWidth,
2038
- width: A.width,
2039
- x: A.x * 100 / this.selectedFormat.width,
2040
- y: A.y * 100 / this.selectedFormat.height,
2039
+ width: z.width,
2040
+ x: z.x * 100 / this.selectedFormat.width,
2041
+ y: z.y * 100 / this.selectedFormat.height,
2041
2042
  ...S ? {
2042
2043
  cropMode: e,
2043
2044
  focusMode: "manual",
@@ -2047,7 +2048,7 @@ let p = class extends N {
2047
2048
  focusMode: e
2048
2049
  },
2049
2050
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2050
- ratioHeight: r ?? this.cropSize.ratioHeight,
2051
+ ratioHeight: n ?? this.cropSize.ratioHeight,
2051
2052
  ratioWidth: l ?? this.cropSize.ratioWidth,
2052
2053
  unit: u ?? this.cropSize.unit
2053
2054
  };
@@ -2059,13 +2060,13 @@ let p = class extends N {
2059
2060
  height: i,
2060
2061
  width: s,
2061
2062
  x: a,
2062
- y: n
2063
+ y: r
2063
2064
  } = e;
2064
2065
  if (s === 0 || i === 0)
2065
2066
  return;
2066
- const r = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2067
+ const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2067
2068
  let u = this.cropSize.height, S = this.cropSize.width;
2068
- r && (S = Math.round(s * this.selectedFormat.width / 100)), l && (u = Math.round(
2069
+ n && (S = Math.round(s * this.selectedFormat.width / 100)), l && (u = Math.round(
2069
2070
  i * this.selectedFormat.height / 100
2070
2071
  ));
2071
2072
  const f = this.cropSize.focusMode;
@@ -2084,7 +2085,7 @@ let p = class extends N {
2084
2085
  percentageWidth: s,
2085
2086
  width: S,
2086
2087
  x: a,
2087
- y: n
2088
+ y: r
2088
2089
  };
2089
2090
  }
2090
2091
  onCropDragStart() {
@@ -2120,19 +2121,19 @@ let p = class extends N {
2120
2121
  const s = this.focusModes.find(
2121
2122
  (u) => u.value === this.cropSize.focusMode
2122
2123
  )?.auto;
2123
- let a = this.cropSize.keepAspectRatio, n = this.cropSize.focusMode, r = this.cropSize.x, l = this.cropSize.y;
2124
- e === "free" ? (a = !1, n = "manual") : this.cropSize.unit === o.Pixel && !s && (r = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2124
+ let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2125
+ e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2125
2126
  cropMode: e,
2126
- focusMode: n,
2127
+ focusMode: r,
2127
2128
  height: this.cropSize.height,
2128
2129
  keepAspectRatio: a,
2129
2130
  width: this.cropSize.width
2130
2131
  }) : this.cropSize = {
2131
2132
  ...this.cropSize,
2132
2133
  cropMode: e,
2133
- focusMode: n,
2134
+ focusMode: r,
2134
2135
  keepAspectRatio: a,
2135
- x: r,
2136
+ x: n,
2136
2137
  y: l
2137
2138
  }, this.asset || (e && e !== "free" ? this.upsertTransformation({
2138
2139
  key: c.Crop,
@@ -2154,16 +2155,16 @@ let p = class extends N {
2154
2155
  ...this.cropSize,
2155
2156
  focusMode: e
2156
2157
  }, !this.asset) {
2157
- const { height: s, unit: a, width: n, x: r, y: l } = this.cropSize;
2158
- (s || n) && this.upsertTransformation({
2158
+ const { height: s, unit: a, width: r, x: n, y: l } = this.cropSize;
2159
+ (s || r) && this.upsertTransformation({
2159
2160
  key: c.Crop,
2160
2161
  value: {
2161
2162
  focusMode: e,
2162
2163
  height: s,
2163
2164
  isFocusModeAuto: i ?? !1,
2164
2165
  unit: a,
2165
- width: n,
2166
- x: r,
2166
+ width: r,
2167
+ x: n,
2167
2168
  y: l
2168
2169
  }
2169
2170
  });
@@ -2178,19 +2179,19 @@ let p = class extends N {
2178
2179
  ), a = Math.min(
2179
2180
  Math.max(Math.round(s / i), 0),
2180
2181
  this.resizeSize.height
2181
- ), n = a * 100 / this.selectedFormat.height, r = s * 100 / this.selectedFormat.width;
2182
+ ), r = a * 100 / this.selectedFormat.height, n = s * 100 / this.selectedFormat.width;
2182
2183
  let l = this.cropSize.x, u = this.cropSize.y;
2183
- l + r > 100 && (l = 100 - r), u + n > 100 && (u = 100 - n);
2184
+ l + n > 100 && (l = 100 - n), u + r > 100 && (u = 100 - r);
2184
2185
  let S = this.cropSize.cropMode;
2185
2186
  this.cropModes.find(
2186
- (A) => A.value === S
2187
- )?.auto && (S = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = n, this.cropSize.percentageWidth = r, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2187
+ (z) => z.value === S
2188
+ )?.auto && (S = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2188
2189
  ...this.cropSize,
2189
2190
  cropMode: S,
2190
2191
  height: a,
2191
2192
  keepAspectRatio: t.detail.keepAspectRatio,
2192
- percentageHeight: n,
2193
- percentageWidth: r,
2193
+ percentageHeight: r,
2194
+ percentageWidth: n,
2194
2195
  ratioHeight: t.detail.height,
2195
2196
  ratioWidth: t.detail.width,
2196
2197
  unit: o.AspectRatio,
@@ -2200,15 +2201,15 @@ let p = class extends N {
2200
2201
  };
2201
2202
  } else {
2202
2203
  const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
2203
- let a = this.cropSize.x, n = this.cropSize.y;
2204
- a + s > 100 && (a = 100 - s), n + i > 100 && (n = 100 - i);
2205
- let r = this.cropSize.cropMode;
2204
+ let a = this.cropSize.x, r = this.cropSize.y;
2205
+ a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2206
+ let n = this.cropSize.cropMode;
2206
2207
  const l = this.cropModes.find(
2207
- (u) => u.value === r
2208
+ (u) => u.value === n
2208
2209
  )?.auto;
2209
- (t.detail.breakAspectRatio || l) && (r = "free"), t.detail.silent ? (this.cropSize.cropMode = r, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = n) : this.cropSize = {
2210
+ (t.detail.breakAspectRatio || l) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
2210
2211
  ...this.cropSize,
2211
- cropMode: r,
2212
+ cropMode: n,
2212
2213
  height: t.detail.height,
2213
2214
  keepAspectRatio: t.detail.keepAspectRatio,
2214
2215
  percentageHeight: i,
@@ -2216,25 +2217,25 @@ let p = class extends N {
2216
2217
  unit: o.Pixel,
2217
2218
  width: t.detail.width,
2218
2219
  x: a,
2219
- y: n
2220
+ y: r
2220
2221
  };
2221
2222
  }
2222
2223
  if (e !== this.cropSize.unit && (this.cropSize = {
2223
2224
  ...this.cropSize,
2224
2225
  cropMode: "free"
2225
2226
  }, this.onCropChanged()), !this.asset && !t.detail.silent) {
2226
- const { focusMode: i, height: s, unit: a, width: n, x: r, y: l } = this.cropSize, u = this.focusModes.find(
2227
+ const { focusMode: i, height: s, unit: a, width: r, x: n, y: l } = this.cropSize, u = this.focusModes.find(
2227
2228
  (S) => S.value === i
2228
2229
  )?.auto ?? !1;
2229
- (s || n) && this.upsertTransformation({
2230
+ (s || r) && this.upsertTransformation({
2230
2231
  key: c.Crop,
2231
2232
  value: {
2232
2233
  focusMode: i,
2233
2234
  height: s,
2234
2235
  isFocusModeAuto: u,
2235
2236
  unit: a,
2236
- width: n,
2237
- x: r,
2237
+ width: r,
2238
+ x: n,
2238
2239
  y: l
2239
2240
  }
2240
2241
  });
@@ -2253,8 +2254,8 @@ let p = class extends N {
2253
2254
  const { height: e, mode: i, unit: s, width: a } = t.detail;
2254
2255
  if (this.preResetTransformations = void 0, this.lastAction = c.Crop, !this.cropperElement || !this.selectedFormat)
2255
2256
  return;
2256
- const n = this.cropSize.focusMode, r = this.focusModes.find(
2257
- (l) => l.value === n
2257
+ const r = this.cropSize.focusMode, n = this.focusModes.find(
2258
+ (l) => l.value === r
2258
2259
  )?.auto ?? !1;
2259
2260
  if (e && a && s) {
2260
2261
  let l = a, u = e;
@@ -2264,9 +2265,9 @@ let p = class extends N {
2264
2265
  {
2265
2266
  key: c.Crop,
2266
2267
  value: {
2267
- focusMode: n,
2268
+ focusMode: r,
2268
2269
  height: u,
2269
- isFocusModeAuto: r,
2270
+ isFocusModeAuto: n,
2270
2271
  mode: i,
2271
2272
  width: l
2272
2273
  }
@@ -2279,9 +2280,9 @@ let p = class extends N {
2279
2280
  {
2280
2281
  key: c.Crop,
2281
2282
  value: {
2282
- focusMode: n,
2283
+ focusMode: r,
2283
2284
  height: u,
2284
- isFocusModeAuto: r,
2285
+ isFocusModeAuto: n,
2285
2286
  unit: s,
2286
2287
  width: l,
2287
2288
  x: S,
@@ -2295,8 +2296,8 @@ let p = class extends N {
2295
2296
  {
2296
2297
  key: c.Crop,
2297
2298
  value: {
2298
- focusMode: n,
2299
- isFocusModeAuto: r,
2299
+ focusMode: r,
2300
+ isFocusModeAuto: n,
2300
2301
  mode: i
2301
2302
  }
2302
2303
  }
@@ -2342,16 +2343,16 @@ let p = class extends N {
2342
2343
  return;
2343
2344
  const { height: e, unit: i, width: s } = t.detail;
2344
2345
  this.preResetTransformations = void 0, this.lastAction = c.Resize;
2345
- const a = this.selectedFormat.width || this.defaultSize.width, n = this.selectedFormat.height || this.defaultSize.height;
2346
- let r = s, l = e;
2347
- this.resizeSize.unit !== i ? (r = a, l = n) : i === o.AspectRatio && (r = Math.round(s / e * n), l = n), this.transformations = [
2346
+ const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
2347
+ let n = s, l = e;
2348
+ this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
2348
2349
  ...this.transformations,
2349
2350
  {
2350
2351
  key: c.Resize,
2351
2352
  value: {
2352
2353
  height: l,
2353
2354
  unit: i,
2354
- width: r
2355
+ width: n
2355
2356
  }
2356
2357
  }
2357
2358
  ];
@@ -2483,7 +2484,7 @@ p.dependencies = {
2483
2484
  "cx-asset-link-format-metadata": W,
2484
2485
  "cx-asset-link-format-proxy": M,
2485
2486
  "cx-asset-link-format-quality": F,
2486
- "cx-asset-link-format-resize": z,
2487
+ "cx-asset-link-format-resize": b,
2487
2488
  "cx-asset-link-format-rotation": E,
2488
2489
  "cx-button": G,
2489
2490
  "cx-space": D,
@@ -2614,14 +2615,14 @@ export {
2614
2615
  gi as d,
2615
2616
  kt as e,
2616
2617
  ee as f,
2617
- Ht as g,
2618
+ Wt as g,
2618
2619
  Si as h,
2619
2620
  yi as i,
2620
- Ct as j,
2621
- $t as k,
2622
- Mt as l,
2623
- Dt as m,
2624
- st as n,
2621
+ Tt as j,
2622
+ st as k,
2623
+ Ct as l,
2624
+ $t as m,
2625
+ Mt as n,
2625
2626
  Xt as o,
2626
2627
  Kt as u
2627
2628
  };