@orangelogic/design-system 2.114.0 → 2.116.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 (43) hide show
  1. package/library/chunks/{asset.Drl4D1c7.js → asset.D_xAgoOX.js} +16 -14
  2. package/library/chunks/{color-swatch-group.5Mqr0rNP.js → color-swatch-group.BvLicLI4.js} +1 -1
  3. package/library/chunks/{document-viewer.Cui5mV3v.js → document-viewer.CKCX8ueu.js} +2285 -2269
  4. package/library/chunks/{list-editor.BBgFSBlF.js → list-editor.on8VVRn-.js} +161 -161
  5. package/library/chunks/{table.DLrle5SR.js → table.GCs54Y2t.js} +764 -666
  6. package/library/chunks/{time.BiQnh9wt.js → time.BSmpFe2G.js} +2 -2
  7. package/library/chunks/waveform.1U9U_0rd.js +60 -0
  8. package/library/components/asset-link-format.js +1 -1
  9. package/library/components/atoms.js +2 -2
  10. package/library/components/audio.js +132 -183
  11. package/library/components/color-swatch-group.js +2 -2
  12. package/library/components/document-viewer.js +1 -1
  13. package/library/components/format-time.js +1 -1
  14. package/library/components/list-editor.js +2 -2
  15. package/library/components/molecules.js +1 -1
  16. package/library/components/organisms.js +1 -1
  17. package/library/components/table.js +6 -6
  18. package/library/components/types.js +23098 -22860
  19. package/library/package.json +1 -1
  20. package/library/packages/atoms/src/components/audio/audio.d.ts +36 -28
  21. package/library/packages/atoms/src/components/table/table-data-loader.d.ts +1 -0
  22. package/library/packages/atoms/src/components/table/table.d.ts +1 -0
  23. package/library/packages/events/src/cx-facet-change.d.ts +16 -0
  24. package/library/packages/events/src/cx-faceted-filter-change.d.ts +6 -1
  25. package/library/packages/events/src/events.d.ts +1 -0
  26. package/library/packages/hybrid/book-reader/src/react/components/Controller/PageControl.d.ts +2 -1
  27. package/library/packages/hybrid/book-reader/src/react/hooks/useBreakpoint.d.ts +5 -1
  28. package/library/packages/molecules/src/faceted-filter/components/facet-date-picker/facet-date-picker.d.ts +43 -0
  29. package/library/packages/molecules/src/faceted-filter/components/facet-date-picker/facet-date-picker.styles.d.ts +2 -0
  30. package/library/packages/molecules/src/faceted-filter/components/facet-date-range/facet-date-range.d.ts +51 -0
  31. package/library/packages/molecules/src/faceted-filter/components/facet-date-range/facet-date-range.styles.d.ts +2 -0
  32. package/library/packages/molecules/src/faceted-filter/facet-adapters.d.ts +12 -0
  33. package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +14 -3
  34. package/library/packages/molecules/src/index.d.ts +3 -0
  35. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -1
  36. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -2
  37. package/library/packages/types/src/faceted-filter.d.ts +71 -2
  38. package/library/packages/utils/src/image/index.d.ts +1 -0
  39. package/library/packages/utils/src/image/waveform.d.ts +29 -0
  40. package/library/react-web-component.d.ts +317 -194
  41. package/library/utils.js +174 -171
  42. package/package.json +1 -1
  43. package/library/chunks/wavesurfer.esm.Cwi1pz64.js +0 -1276
package/library/utils.js CHANGED
@@ -1,8 +1,8 @@
1
- import { a as k } from "./chunks/url.Cj9cIQXJ.js";
1
+ import { a as V } from "./chunks/url.Cj9cIQXJ.js";
2
2
  import { R as Dt, U as Tt, c as wt, b as Mt, i as xt, t as yt } from "./chunks/url.Cj9cIQXJ.js";
3
- import { e as St, f as Et, g as At, c as It, i as Lt, a as Ft, d as Rt, m as vt, b as bt, r as Vt, t as kt } from "./chunks/toast.D3AW3RWv.js";
4
- import { d as Yt, h as _t, a as Ht, f as Nt, g as Pt, e as Xt, b as Ut, c as Bt, i as Wt, p as Gt, s as $t } from "./chunks/debounce.CIEhztrj.js";
5
- import { d as qt, C as Qt, e as Zt, H as jt, R as Jt, c as Kt, h as te, f as ee, g as re, l as se, a as ae, p as oe, b as ne } from "./chunks/color.LzSGBy7o.js";
3
+ import { e as St, f as Et, g as At, c as It, i as Lt, a as Ft, d as Rt, m as vt, b as bt, r as kt, t as Vt } from "./chunks/toast.D3AW3RWv.js";
4
+ import { d as Yt, h as _t, a as Pt, f as Ht, g as Nt, e as Xt, b as Ut, c as Bt, i as Wt, p as Gt, s as $t } from "./chunks/debounce.CIEhztrj.js";
5
+ import { d as qt, C as Qt, e as Zt, H as jt, R as Jt, c as Kt, h as te, f as ee, g as re, l as ae, a as se, p as oe, b as ne } from "./chunks/color.LzSGBy7o.js";
6
6
  import { a as le, b as ce, g as ue } from "./chunks/modal.U1QltQKe.js";
7
7
  import { a as fe, p as he, c as ge, b as de, s as pe, w as De } from "./chunks/event.BeKOsirN.js";
8
8
  import { t as we } from "./chunks/converters.DkDtLstb.js";
@@ -11,33 +11,34 @@ import { d as Ce } from "./chunks/default-value.COZopaet.js";
11
11
  import { d as Ee } from "./chunks/drag.DXEXVXPv.js";
12
12
  import { f as O } from "./chunks/form.B-5nQJva.js";
13
13
  import { F as Ie, c as Le, g as Fe, v as Re, a as ve } from "./chunks/form.B-5nQJva.js";
14
- import { L as Ve, r as ke } from "./chunks/i18n.CH-wak_P.js";
14
+ import { L as ke, r as Ve } from "./chunks/i18n.CH-wak_P.js";
15
15
  import { c as Ye } from "./chunks/math.DqTA6ya4.js";
16
- import { g as He, l as Ne, s as Pe, u as Xe } from "./chunks/scroll.xtO5yojm.js";
16
+ import { g as Pe, l as He, s as Ne, u as Xe } from "./chunks/scroll.xtO5yojm.js";
17
17
  import { j as C } from "./chunks/dom.0RpWet6y.js";
18
18
  import { c as Be, d as We, k as Ge, a as $e, g as ze, h as qe, b as Qe, f as Ze, i as je, e as Je, l as Ke, s as tr } from "./chunks/dom.0RpWet6y.js";
19
- import { H as rr, a as sr, g as ar } from "./chunks/slot.j5oheLJC.js";
19
+ import { H as rr, a as ar, g as sr } from "./chunks/slot.j5oheLJC.js";
20
20
  import { g as nr, a as ir } from "./chunks/tabbable.CcMz3mIL.js";
21
21
  import { i as cr } from "./chunks/user-agent.D9aPuOyL.js";
22
22
  import { w as mr } from "./chunks/watch.CThbualB.js";
23
23
  import { C as hr, a as gr, d as dr, f as pr, e as Dr, g as Tr, c as wr, i as Mr, b as xr, n as yr, p as Cr, t as Sr } from "./chunks/calendar-grid.CXYoS6VA.js";
24
24
  import { e as c, b as u, D as m } from "./chunks/date-picker.D0SJADN6.js";
25
25
  import { f as Ar } from "./chunks/content-builder.OsUmm8Wu.js";
26
- import { c as Lr, f as Fr, e as Rr, b as vr, g as br, d as Vr, i as kr, r as Or, a as Yr } from "./chunks/image.9qwbjGNb.js";
27
- import { a as Hr, b as Nr, c as Pr, e as Xr, d as Ur, f as Br, g as Wr, r as Gr, s as $r } from "./chunks/number.B4PQLJIg.js";
28
- import { s as qr } from "./chunks/parse.Cu5nBDTb.js";
29
- import { g as Zr, a as jr } from "./chunks/responsive.C8NCkfCG.js";
30
- import { c as Kr, b as ts, e as es, f as rs, l as ss, g as as, j as os, p as ns, v as is, r as ls, a as cs, d as us, s as ms, k as fs, o as hs, m as gs, n as ds, q as ps, t as Ds, u as Ts } from "./chunks/string.DUgD4c9f.js";
31
- import { g as Ms, a as xs } from "./chunks/template.ClovJacp.js";
32
- import { c as Cs, a as Ss, f as Es, g as As } from "./chunks/time.BiQnh9wt.js";
33
- import { b as Ls } from "./chunks/transformation.BlQCWMfI.js";
26
+ import { c as Lr, f as Fr, e as Rr, b as vr, g as br, d as kr, i as Vr, r as Or, a as Yr } from "./chunks/image.9qwbjGNb.js";
27
+ import { b as Pr, e as Hr } from "./chunks/waveform.1U9U_0rd.js";
28
+ import { a as Xr, b as Ur, c as Br, e as Wr, d as Gr, f as $r, g as zr, r as qr, s as Qr } from "./chunks/number.B4PQLJIg.js";
29
+ import { s as jr } from "./chunks/parse.Cu5nBDTb.js";
30
+ import { g as Kr, a as ta } from "./chunks/responsive.C8NCkfCG.js";
31
+ import { c as ra, b as aa, e as sa, f as oa, l as na, g as ia, j as la, p as ca, v as ua, r as ma, a as fa, d as ha, s as ga, k as da, o as pa, m as Da, n as Ta, q as wa, t as Ma, u as xa } from "./chunks/string.DUgD4c9f.js";
32
+ import { g as Ca, a as Sa } from "./chunks/template.ClovJacp.js";
33
+ import { c as Aa, f as Ia, a as La, g as Fa } from "./chunks/time.BSmpFe2G.js";
34
+ import { b as va } from "./chunks/transformation.BlQCWMfI.js";
34
35
  function o(t) {
35
- const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
36
- return `${e}-${r}-${a}`;
36
+ const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
37
+ return `${e}-${r}-${s}`;
37
38
  }
38
39
  function S(t) {
39
- const e = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), a = String(t.getSeconds()).padStart(2, "0");
40
- return `${e}:${r}:${a}`;
40
+ const e = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), s = String(t.getSeconds()).padStart(2, "0");
41
+ return `${e}:${r}:${s}`;
41
42
  }
42
43
  function h(t, e) {
43
44
  return new Date(t.getFullYear(), t.getMonth(), t.getDate() + e);
@@ -77,30 +78,30 @@ class $ {
77
78
  * @returns fromDate, toDate (YYYY-MM-DD) and fromTime, toTime (HH:mm:ss).
78
79
  */
79
80
  static getRange(e, r) {
80
- const a = o(r);
81
+ const s = o(r);
81
82
  switch (e) {
82
83
  case c.last30Minutes: {
83
- const s = new Date(r.getTime() - 18e5);
84
+ const a = new Date(r.getTime() - 18e5);
84
85
  return {
85
- fromDate: o(s),
86
- fromTime: S(s),
87
- toDate: a,
86
+ fromDate: o(a),
87
+ fromTime: S(a),
88
+ toDate: s,
88
89
  toTime: S(r)
89
90
  };
90
91
  }
91
92
  case c.today:
92
93
  return {
93
- fromDate: a,
94
+ fromDate: s,
94
95
  fromTime: m,
95
- toDate: a,
96
+ toDate: s,
96
97
  toTime: u
97
98
  };
98
99
  case c.lastDay: {
99
- const s = o(h(r, -1));
100
+ const a = o(h(r, -1));
100
101
  return {
101
- fromDate: s,
102
+ fromDate: a,
102
103
  fromTime: m,
103
- toDate: s,
104
+ toDate: a,
104
105
  toTime: u
105
106
  };
106
107
  }
@@ -108,45 +109,45 @@ class $ {
108
109
  return {
109
110
  fromDate: o(h(r, -1)),
110
111
  fromTime: m,
111
- toDate: a,
112
+ toDate: s,
112
113
  toTime: u
113
114
  };
114
115
  case c.last3Days:
115
116
  return {
116
117
  fromDate: o(h(r, -2)),
117
118
  fromTime: m,
118
- toDate: a,
119
+ toDate: s,
119
120
  toTime: u
120
121
  };
121
122
  case c.last30Days:
122
123
  return {
123
124
  fromDate: o(h(r, -29)),
124
125
  fromTime: m,
125
- toDate: a,
126
+ toDate: s,
126
127
  toTime: u
127
128
  };
128
129
  case c.next30Days:
129
130
  return {
130
- fromDate: a,
131
+ fromDate: s,
131
132
  fromTime: m,
132
133
  toDate: o(h(r, 30)),
133
134
  toTime: u
134
135
  };
135
136
  case c.thisWeek: {
136
- const s = E(r);
137
+ const a = E(r);
137
138
  return {
138
- fromDate: o(s),
139
+ fromDate: o(a),
139
140
  fromTime: m,
140
- toDate: o(h(s, 6)),
141
+ toDate: o(h(a, 6)),
141
142
  toTime: u
142
143
  };
143
144
  }
144
145
  case c.lastWeek: {
145
- const s = h(E(r), -7);
146
+ const a = h(E(r), -7);
146
147
  return {
147
- fromDate: o(s),
148
+ fromDate: o(a),
148
149
  fromTime: m,
149
- toDate: o(h(s, 6)),
150
+ toDate: o(h(a, 6)),
150
151
  toTime: u
151
152
  };
152
153
  }
@@ -158,11 +159,11 @@ class $ {
158
159
  toTime: u
159
160
  };
160
161
  case c.lastMonth: {
161
- const s = new Date(r.getFullYear(), r.getMonth() - 1, 1);
162
+ const a = new Date(r.getFullYear(), r.getMonth() - 1, 1);
162
163
  return {
163
- fromDate: o(A(s)),
164
+ fromDate: o(A(a)),
164
165
  fromTime: m,
165
- toDate: o(I(s)),
166
+ toDate: o(I(a)),
166
167
  toTime: u
167
168
  };
168
169
  }
@@ -174,15 +175,15 @@ class $ {
174
175
  toTime: u
175
176
  };
176
177
  case c.lastQuarter: {
177
- const s = new Date(
178
+ const a = new Date(
178
179
  r.getFullYear(),
179
180
  r.getMonth() - 3,
180
181
  1
181
182
  );
182
183
  return {
183
- fromDate: o(L(s)),
184
+ fromDate: o(L(a)),
184
185
  fromTime: m,
185
- toDate: o(F(s)),
186
+ toDate: o(F(a)),
186
187
  toTime: u
187
188
  };
188
189
  }
@@ -194,11 +195,11 @@ class $ {
194
195
  toTime: u
195
196
  };
196
197
  case c.lastHalfYear: {
197
- const s = new Date(r.getFullYear(), r.getMonth() - 6, 1);
198
+ const a = new Date(r.getFullYear(), r.getMonth() - 6, 1);
198
199
  return {
199
- fromDate: o(R(s)),
200
+ fromDate: o(R(a)),
200
201
  fromTime: m,
201
- toDate: o(v(s)),
202
+ toDate: o(v(a)),
202
203
  toTime: u
203
204
  };
204
205
  }
@@ -210,11 +211,11 @@ class $ {
210
211
  toTime: u
211
212
  };
212
213
  case c.lastYear: {
213
- const s = r.getFullYear() - 1;
214
+ const a = r.getFullYear() - 1;
214
215
  return {
215
- fromDate: `${s}-01-01`,
216
+ fromDate: `${a}-01-01`,
216
217
  fromTime: m,
217
- toDate: `${s}-12-31`,
218
+ toDate: `${a}-12-31`,
218
219
  toTime: u
219
220
  };
220
221
  }
@@ -248,7 +249,7 @@ function q(t) {
248
249
  }
249
250
  function Q(t, e = void 0) {
250
251
  !this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
251
- k(t, "https://", !0),
252
+ V(t, "https://", !0),
252
253
  e ?? "_blank"
253
254
  );
254
255
  }
@@ -301,8 +302,8 @@ class K {
301
302
  onMouseMove(e) {
302
303
  if (!this.isDragging)
303
304
  return;
304
- const r = e.clientX - this.lastClientX, a = e.clientY - this.lastClientY;
305
- !this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= r, this.element.scrollTop -= a, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
305
+ const r = e.clientX - this.lastClientX, s = e.clientY - this.lastClientY;
306
+ !this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= r, this.element.scrollTop -= s, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
306
307
  }
307
308
  onMouseUp() {
308
309
  this.isDragging = !1;
@@ -315,62 +316,62 @@ const tt = (t) => t.ctrlKey || t.metaKey;
315
316
  function b(t, e) {
316
317
  if (!t?.document)
317
318
  return !1;
318
- const r = "mmmmmmmmmmwwwwwww", a = "32px", n = t.document.createElement("canvas").getContext("2d"), i = (f) => n ? (n.font = `${a} ${f}, monospace`, n.measureText(r).width) : 0, l = i("monospace");
319
+ const r = "mmmmmmmmmmwwwwwww", s = "32px", n = t.document.createElement("canvas").getContext("2d"), i = (f) => n ? (n.font = `${s} ${f}, monospace`, n.measureText(r).width) : 0, l = i("monospace");
319
320
  return i(e) !== l;
320
321
  }
321
322
  function et(t, e) {
322
323
  if (!t?.document.fonts)
323
324
  return !1;
324
325
  let r = !1;
325
- return t.document.fonts.forEach((a) => {
326
- a.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (r = !0);
326
+ return t.document.fonts.forEach((s) => {
327
+ s.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (r = !0);
327
328
  }), r ? !0 : b(t, e);
328
329
  }
329
330
  function Y(t) {
330
- const e = /\bitalic\b/i, r = /\b(semi[-\s]?condensed|condensed)\b/i, a = (s) => {
331
- const n = s.fontFamily.toLowerCase(), i = s.fontStyle.toLowerCase(), l = e.test(i), p = r.test(n);
331
+ const e = /\bitalic\b/i, r = /\b(semi[-\s]?condensed|condensed)\b/i, s = (a) => {
332
+ const n = a.fontFamily.toLowerCase(), i = a.fontStyle.toLowerCase(), l = e.test(i), p = r.test(n);
332
333
  let f = 0;
333
334
  return l && (f = 1), p && (f = l ? 3 : 2), {
334
- family: s.fontFamily,
335
+ family: a.fontFamily,
335
336
  styleRank: f,
336
- weight: Number(s.fontWeight)
337
+ weight: Number(a.fontWeight)
337
338
  };
338
339
  };
339
- return [...t].sort((s, n) => {
340
- const i = a(s), l = a(n);
340
+ return [...t].sort((a, n) => {
341
+ const i = s(a), l = s(n);
341
342
  return i.weight !== l.weight ? i.weight - l.weight : i.styleRank !== l.styleRank ? i.styleRank - l.styleRank : i.family.localeCompare(l.family);
342
343
  });
343
344
  }
344
- function rt(t, e, r = [300, 400, 500, 700, 900], a = ["normal", "italic"]) {
345
- const s = [];
345
+ function rt(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
346
+ const a = [];
346
347
  if (b(t, e))
347
348
  for (const n of r)
348
- for (const i of a)
349
- s.push({
349
+ for (const i of s)
350
+ a.push({
350
351
  fontFamily: e,
351
352
  fontStyle: i,
352
353
  fontWeight: n.toString(),
353
354
  src: ""
354
355
  });
355
- return Y(s);
356
+ return Y(a);
356
357
  }
357
- function st(t) {
358
+ function at(t) {
358
359
  const e = new FormData(t), r = {};
359
- return e.forEach((a, s) => {
360
- if (Reflect.has(r, s)) {
361
- const n = r[s];
362
- Array.isArray(n) ? n.push(a) : r[s] = [r[s], a];
360
+ return e.forEach((s, a) => {
361
+ if (Reflect.has(r, a)) {
362
+ const n = r[a];
363
+ Array.isArray(n) ? n.push(s) : r[a] = [r[a], s];
363
364
  } else
364
- r[s] = a;
365
+ r[a] = s;
365
366
  }), r;
366
367
  }
367
368
  function _(t) {
368
- const r = [...t.getRootNode().querySelectorAll("*")], a = [...t.elements], s = O.get(t), n = s ? Array.from(s) : [];
369
- return [...a, ...n].sort(
369
+ const r = [...t.getRootNode().querySelectorAll("*")], s = [...t.elements], a = O.get(t), n = a ? Array.from(a) : [];
370
+ return [...s, ...n].sort(
370
371
  (i, l) => r.indexOf(i) < r.indexOf(l) ? -1 : r.indexOf(i) > r.indexOf(l) ? 1 : 0
371
372
  );
372
373
  }
373
- function at(t) {
374
+ function st(t) {
374
375
  return _(t).some(
375
376
  (r) => r.hasAttribute("data-user-valid") || r.hasAttribute("data-user-invalid")
376
377
  );
@@ -412,17 +413,17 @@ class ot {
412
413
  return [...this.history];
413
414
  }
414
415
  }
415
- var H = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(H || {});
416
+ var P = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(P || {});
416
417
  function nt(t, e) {
417
- const r = {}, a = new Set(e);
418
- return Object.keys(t).forEach((s) => {
419
- a.has(s) || (r[s] = t[s]);
418
+ const r = {}, s = new Set(e);
419
+ return Object.keys(t).forEach((a) => {
420
+ s.has(a) || (r[a] = t[a]);
420
421
  }), r;
421
422
  }
422
423
  function it(t, e) {
423
424
  const r = {};
424
- return e.forEach((a) => {
425
- a in t && (r[a] = t[a]);
425
+ return e.forEach((s) => {
426
+ s in t && (r[s] = t[s]);
426
427
  }), r;
427
428
  }
428
429
  function lt(t) {
@@ -445,7 +446,7 @@ function ct(t, e = !0) {
445
446
  } catch {
446
447
  return [];
447
448
  }
448
- return Array.isArray(r) ? e ? r.filter((a) => typeof a == "string") : r : [];
449
+ return Array.isArray(r) ? e ? r.filter((s) => typeof s == "string") : r : [];
449
450
  }
450
451
  function ut(t, e) {
451
452
  return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
@@ -453,40 +454,40 @@ function ut(t, e) {
453
454
  function mt(t, e) {
454
455
  typeof Storage < "u" && localStorage.setItem(t, e.toString());
455
456
  }
456
- const N = 10;
457
+ const H = 10;
457
458
  function ft(t, e) {
458
- let r = 0, a = t.length;
459
- for (; r < a; ) {
460
- const s = Math.floor((r + a) / 2);
461
- t[s].time < e.time ? r = s + 1 : a = s;
459
+ let r = 0, s = t.length;
460
+ for (; r < s; ) {
461
+ const a = Math.floor((r + s) / 2);
462
+ t[a].time < e.time ? r = a + 1 : s = a;
462
463
  }
463
464
  t.splice(r, 0, e);
464
465
  }
465
- function P(t, e, r) {
466
+ function N(t, e, r) {
466
467
  return t.find(
467
- (a) => a.col === e && a.row === r
468
+ (s) => s.col === e && s.row === r
468
469
  ) ?? null;
469
470
  }
470
471
  function X(t, e, r) {
471
- return new Promise((a) => {
472
+ return new Promise((s) => {
472
473
  if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
473
- a();
474
+ s();
474
475
  return;
475
476
  }
476
477
  if (e === 0) {
477
- const s = () => {
478
- t.removeEventListener("seeked", s);
478
+ const a = () => {
479
+ t.removeEventListener("seeked", a);
479
480
  const n = () => {
480
- t.removeEventListener("seeked", n), a();
481
+ t.removeEventListener("seeked", n), s();
481
482
  };
482
483
  t.addEventListener("seeked", n), t.currentTime = 0;
483
484
  };
484
- t.addEventListener("seeked", s), t.currentTime = r;
485
+ t.addEventListener("seeked", a), t.currentTime = r;
485
486
  } else {
486
- const s = () => {
487
- t.removeEventListener("seeked", s), a();
487
+ const a = () => {
488
+ t.removeEventListener("seeked", a), s();
488
489
  };
489
- t.addEventListener("seeked", s), t.currentTime = e;
490
+ t.addEventListener("seeked", a), t.currentTime = e;
490
491
  }
491
492
  });
492
493
  }
@@ -494,23 +495,23 @@ async function* ht({
494
495
  cache: t,
495
496
  canvas: e,
496
497
  duration: r,
497
- maxInterval: a,
498
- src: s,
498
+ maxInterval: s,
499
+ src: a,
499
500
  video: n
500
501
  }) {
501
502
  if (!e)
502
503
  throw new Error("Canvas is required");
503
504
  if (!n)
504
505
  throw new Error("Video is required");
505
- const { columns: i, frameHeight: l, frameWidth: p, rows: f, spriteCtx: V } = e;
506
+ const { columns: i, frameHeight: l, frameWidth: p, rows: f, spriteCtx: k } = e;
506
507
  try {
507
508
  for (let g = 0; g < f; g++)
508
509
  for (let d = 0; d < i; d++) {
509
- const T = g * i + d, D = T * a;
510
+ const T = g * i + d, D = T * s;
510
511
  if (D >= r)
511
512
  continue;
512
- const w = d * p, M = g * l, x = P(t[s] ?? [], d, g), y = d === i - 1 && g === f - 1 || D + a >= r;
513
- x ? yield { ...x, isLastFrame: y } : (await X(n, D, a), V.drawImage(
513
+ const w = d * p, M = g * l, x = N(t[a] ?? [], d, g), y = d === i - 1 && g === f - 1 || D + s >= r;
514
+ x ? yield { ...x, isLastFrame: y } : (await X(n, D, s), k.drawImage(
514
515
  n,
515
516
  w,
516
517
  M,
@@ -525,7 +526,7 @@ async function* ht({
525
526
  isLastFrame: y,
526
527
  row: g,
527
528
  rows: f,
528
- time: Number(D.toFixed(N)),
529
+ time: Number(D.toFixed(H)),
529
530
  x: w,
530
531
  y: M
531
532
  }), await new Promise(requestAnimationFrame);
@@ -537,10 +538,10 @@ function gt({
537
538
  duration: t,
538
539
  frameWidth: e,
539
540
  playbackSpeed: r,
540
- scale: a
541
+ scale: s
541
542
  }) {
542
- let s = e * r / a;
543
- return s > t && (s = t / 2), s;
543
+ let a = e * r / s;
544
+ return a > t && (a = t / 2), a;
544
545
  }
545
546
  export {
546
547
  qt as CMYK_VALIDATION_REGEX,
@@ -554,9 +555,9 @@ export {
554
555
  jt as HEX_VALIDATION_REGEX,
555
556
  rr as HasSlotController,
556
557
  ot as HistoryManager,
557
- H as KeyboardKey,
558
- Ve as LocalizeController,
559
- N as PRECISION,
558
+ P as KeyboardKey,
559
+ ke as LocalizeController,
560
+ H as PRECISION,
560
561
  Dt as RELATIVE_URL_REGEX,
561
562
  Jt as RGB_VALIDATION_REGEX,
562
563
  Tt as URL_DOMAIN_VALIDATION_REGEX,
@@ -566,16 +567,17 @@ export {
566
567
  gr as addMonths,
567
568
  St as adjustRelativeValues,
568
569
  fe as animateTo,
569
- k as appendProtocol,
570
- Ls as buildTransformationString,
570
+ V as appendProtocol,
571
+ va as buildTransformationString,
572
+ Pr as buildWaveformPath,
571
573
  Lr as calculateAspectRatioFit,
572
574
  Ye as clamp,
573
575
  Fr as cleanImageFileName,
574
- Cs as clearZeroDurationParts,
576
+ Aa as clearZeroDurationParts,
575
577
  Kt as convertColor,
576
- Hr as convertDataUnits,
577
- Nr as convertDurationToMilliseconds,
578
- Pr as convertPixelsToAspectRatio,
578
+ Xr as convertDataUnits,
579
+ Ur as convertDurationToMilliseconds,
580
+ Br as convertPixelsToAspectRatio,
579
581
  Rr as convertSrcToBlob,
580
582
  vr as cropImage,
581
583
  Be as cssValueToPx,
@@ -586,57 +588,58 @@ export {
586
588
  dr as displayToIso,
587
589
  j as downloadAsset,
588
590
  Ee as drag,
589
- Kr as emptyToSpace,
591
+ ra as emptyToSpace,
590
592
  te as extractColor,
591
- ts as extractExtension,
593
+ aa as extractExtension,
592
594
  ht as extractFrames,
593
- es as extractRootData,
594
- Xr as extractValueAndUnit,
595
+ sa as extractRootData,
596
+ Wr as extractValueAndUnit,
597
+ Hr as extractWaveformPeaks,
595
598
  Ar as fetchCortexApi,
596
599
  _t as findAncestorWithBuggyStyle,
597
- Ht as findContainingBlock,
598
- Nt as findCuttingAncestor,
599
- P as findFrameByColAndRow,
600
+ Pt as findContainingBlock,
601
+ Ht as findCuttingAncestor,
602
+ N as findFrameByColAndRow,
600
603
  Et as findIndexByProp,
601
604
  O as formCollections,
602
- Ur as formatAspectRatioString,
603
- Ss as formatDurationPartsManually,
605
+ Gr as formatAspectRatioString,
606
+ Ia as formatDurationPartsManually,
604
607
  pr as formatMonthYearLabel,
605
- Br as formatNumberWithGrouping,
606
- rs as formatSecondsToTime,
607
- ss as formatTimeToSeconds,
608
- Es as formatWithIntlDurationFormat,
609
- Wr as gcd,
608
+ $r as formatNumberWithGrouping,
609
+ oa as formatSecondsToTime,
610
+ na as formatTimeToSeconds,
611
+ La as formatWithIntlDurationFormat,
612
+ zr as gcd,
610
613
  We as getActiveElement,
611
614
  ce as getActiveModals,
612
615
  Fe as getAssociatedForm,
613
- Zr as getBreakpointsFromCSS,
616
+ Kr as getBreakpointsFromCSS,
614
617
  rt as getBrowserFontVariants,
615
618
  ee as getColorType,
616
619
  br as getContainedImageSize,
617
620
  Ge as getCortexPopupLayer,
618
621
  C as getCurrentZIndex,
619
622
  ue as getDeepestActiveElement,
620
- jr as getDeviceType,
621
- As as getDurationPartsByUnitsFormat,
623
+ ta as getDeviceType,
624
+ Fa as getDurationPartsByUnitsFormat,
622
625
  $e as getElementFromHTMLString,
623
626
  ze as getElementFromTemplate,
624
627
  Dr as getFirstDayOfWeek,
625
628
  _ as getFormControls,
626
- Ms as getHighlightedTitle,
627
- xs as getHighlightedTitleHtml,
628
- sr as getInnerHTML,
629
+ Ca as getHighlightedTitle,
630
+ Sa as getHighlightedTitleHtml,
631
+ ar as getInnerHTML,
629
632
  gt as getInterval,
630
633
  re as getLightDarkCssString,
631
- Vr as getNaturalWidthHeight,
634
+ kr as getNaturalWidthHeight,
632
635
  qe as getNeededPaddingForBoxShadow,
633
- Pt as getNextAncestor,
634
- He as getOffset,
636
+ Nt as getNextAncestor,
637
+ Pe as getOffset,
635
638
  Qe as getRelativeClickPercentage,
636
- as as getRootIDString,
639
+ ia as getRootIDString,
637
640
  nr as getTabbableBoundary,
638
641
  ir as getTabbableElements,
639
- ar as getTextContent,
642
+ sr as getTextContent,
640
643
  Tr as getTodayIsoDate,
641
644
  At as groupBy,
642
645
  It as insertAtIndex,
@@ -648,20 +651,20 @@ export {
648
651
  je as isElementInHorizontalView,
649
652
  Ut as isFirefox,
650
653
  et as isFontFamilyAvailable,
651
- at as isFormInteracted,
652
- os as isGalleryItemCardType,
654
+ st as isFormInteracted,
655
+ la as isGalleryItemCardType,
653
656
  Bt as isIOS,
654
657
  Je as isInElement,
655
658
  tt as isModKey,
656
659
  Wt as isSafari,
657
- kr as isSaveSrcValid,
660
+ Vr as isSaveSrcValid,
658
661
  wr as isValidIsoDate,
659
662
  xt as isValidUrl,
660
663
  Mr as isoToDate,
661
664
  xr as isoToDisplay,
662
665
  Ke as loadScript,
663
- Ne as lockBodyScrolling,
664
- se as luminanceTextColor,
666
+ He as lockBodyScrolling,
667
+ ae as luminanceTextColor,
665
668
  Ft as moveMultipleToIndex,
666
669
  Rt as moveToIndex,
667
670
  vt as multiSelectTo,
@@ -670,9 +673,9 @@ export {
670
673
  z as openAssetOverview,
671
674
  q as openFolderOverview,
672
675
  Q as openLink,
673
- ns as padPath,
674
- is as parseBooleanString,
675
- ae as parseBorder,
676
+ ca as padPath,
677
+ ua as parseBooleanString,
678
+ se as parseBorder,
676
679
  he as parseDuration,
677
680
  Cr as parseIsoDate,
678
681
  lt as parseJsonString,
@@ -683,39 +686,39 @@ export {
683
686
  Gt as popoverSupported,
684
687
  ge as prefersReducedMotion,
685
688
  ut as readLocalStorageValue,
686
- ls as reducePathToDirectChild,
687
- ke as registerTranslation,
689
+ ma as reducePathToDirectChild,
690
+ Ve as registerTranslation,
688
691
  bt as removeAtIndex,
689
- Vt as removeMultipleAtIndex,
692
+ kt as removeMultipleAtIndex,
690
693
  Or as resizeImage,
691
- Gr as rotateBox,
694
+ qr as rotateBox,
692
695
  Yr as rotateImage,
693
- cs as safeExtension,
694
- us as safeString,
695
- ms as sanitizeHTML,
696
- $r as sanitizeRotation,
697
- Pe as scrollIntoView,
698
- st as serialize,
696
+ fa as safeExtension,
697
+ ha as safeString,
698
+ ga as sanitizeHTML,
699
+ Qr as sanitizeRotation,
700
+ Ne as scrollIntoView,
701
+ at as serialize,
699
702
  Z as shareAsset,
700
703
  de as shimKeyframesHeightAuto,
701
704
  tr as sortByTopPosition,
702
705
  Y as sortTypefaceVariants,
703
- qr as splitBoxValues,
704
- fs as splitCamelCaseFormatted,
706
+ jr as splitBoxValues,
707
+ da as splitCamelCaseFormatted,
705
708
  pe as stopAnimations,
706
709
  $t as supportHLS,
707
710
  b as testFontAvailability,
708
711
  we as timecodeConverter,
709
- hs as toCamelCase,
712
+ pa as toCamelCase,
710
713
  Sr as toIsoDate,
711
- gs as toKebabCase,
712
- ds as toPascalCase,
714
+ Da as toKebabCase,
715
+ Ta as toPascalCase,
713
716
  yt as toRelativeUrl,
714
- ps as toTitleCase,
715
- kt as toast,
716
- Ds as truncateTextMiddle,
717
+ wa as toTitleCase,
718
+ Vt as toast,
719
+ Ma as truncateTextMiddle,
717
720
  Xe as unlockBodyScrolling,
718
- Ts as upperFirst,
721
+ xa as upperFirst,
719
722
  Re as validValidityState,
720
723
  ve as valueMissingValidityState,
721
724
  De as waitForEvent,