@orangelogic/design-system 2.95.0 → 2.97.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.
- package/library/chunks/asset.B3vySOI-.js +431 -0
- package/library/chunks/{asset.types.6DCzTOQm.js → asset.types.KXRZEtBr.js} +127 -126
- package/library/chunks/{button.BZjbVq8t.js → button.CAa1kvwe.js} +2 -2
- package/library/chunks/{color-swatch-group.Q8ybVS0A.js → color-swatch-group.ChcPlkPU.js} +5 -5
- package/library/chunks/{color-swatch.CbL_TpRZ.js → color-swatch.DJ1kUnBQ.js} +1 -1
- package/library/chunks/{confirm-popover.bBo9aPlX.js → confirm-popover.D4x0nO5g.js} +3 -3
- package/library/chunks/content-builder.CcgZciZN.js +58 -0
- package/library/chunks/{cropper.uKGcvnPk.js → cropper.Bib8Abm3.js} +4937 -4932
- package/library/chunks/{dialog.DRW8iwh-.js → dialog.BLaxLMSc.js} +2 -2
- package/library/chunks/{dom.DURaLV1d.js → dom.0RpWet6y.js} +1 -1
- package/library/chunks/{dot-pagination.CvUr6R4S.js → dot-pagination.-nDdQxJN.js} +1 -1
- package/library/chunks/{file-on-demand.KQlA1JFF.js → file-on-demand.AzwoUvwB.js} +10 -10
- package/library/chunks/{folder-select.DxBOSyvo.js → folder-select.XpkOFzAW.js} +5 -5
- package/library/chunks/{form.nRqYei4e.js → form.Ch1cwYzO.js} +1 -1
- package/library/chunks/{header.ClxEkQPZ.js → header.BZxyeLPK.js} +1 -1
- package/library/chunks/{i18n.W6czbRms.js → i18n.BABe9hN4.js} +6 -0
- package/library/chunks/{icon-button.MqA-pNw8.js → icon-button.C2s3pHG4.js} +1 -1
- package/library/chunks/{iframe.PcSPtm_O.js → iframe.DPccxsnE.js} +1 -1
- package/library/chunks/{image.Dtdklw5q.js → image.9qwbjGNb.js} +1 -1
- package/library/chunks/{image.C-Covc0H.js → image.Cc4V85ID.js} +354 -311
- package/library/chunks/{list-editor.BnHKqD0O.js → list-editor.pVYc_70c.js} +183 -153
- package/library/chunks/{number.CCF6IxpN.js → number.B4PQLJIg.js} +32 -32
- package/library/chunks/{option.Cx54zrJq.js → option.DGXQzdtb.js} +1 -1
- package/library/chunks/{pagination.CG5odPWi.js → pagination.DZqKSA86.js} +4 -4
- package/library/chunks/{responsive.D9TUCX5p.js → responsive.Oz9HWjyQ.js} +1 -1
- package/library/chunks/{string.DfV21HEI.js → string.DUgD4c9f.js} +41 -34
- package/library/chunks/{tab-group.BLZ-qEpp.js → tab-group.BhCf9Smq.js} +4 -4
- package/library/chunks/{table.CYxWpvAC.js → table.V5PGGTfO.js} +13 -11
- package/library/chunks/{time.BNrE47-8.js → time.BiQnh9wt.js} +1 -1
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Cqz3hPaQ.js +144 -0
- package/library/chunks/{tree.CKi63r95.js → tree.DZa7k-4E.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +767 -862
- package/library/components/atoms.js +12 -12
- package/library/components/border-input-group.js +1 -1
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +3 -3
- package/library/components/checkbox.js +1 -1
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +6 -6
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +2 -2
- package/library/components/cropper.js +1 -1
- package/library/components/details.js +4 -4
- package/library/components/dialog.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +1 -1
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +11 -11
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +2 -2
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +4 -7
- package/library/components/line-clamp.js +1 -1
- package/library/components/list-editor.js +6 -6
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +1 -1
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +5 -5
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/pagination.js +5 -5
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-group.js +1 -1
- package/library/components/range.js +2 -2
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +3 -3
- package/library/components/share-option-list.js +2 -2
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +2 -2
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/table.js +5 -5
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +1 -1
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +31066 -29848
- package/library/components/video.js +554 -545
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/image/image.d.ts +15 -1
- package/library/packages/atoms/src/components/input/input.d.ts +1 -2
- package/library/packages/atoms/src/components/video/video.d.ts +3 -1
- package/library/packages/events/src/cx-asset-format-picker-delete.d.ts +6 -0
- package/library/packages/events/src/cx-asset-format-picker-select.d.ts +8 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
- package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
- package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
- package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
- package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
- package/library/packages/events/src/cx-timeline-data-resolved.d.ts +10 -0
- package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +12 -1
- package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -0
- package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +56 -0
- package/library/packages/molecules/src/asset-format-picker/asset-format-picker.styles.d.ts +2 -0
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +7 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +5 -1
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/timeline/timeline.d.ts +18 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +12 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +102 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
- package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
- package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
- package/library/packages/organisms/src/carousel/carousel.d.ts +3 -1
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +2 -2
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
- package/library/packages/organisms/src/content-builder/styleController.d.ts +26 -1
- package/library/packages/organisms/src/index.d.ts +2 -0
- package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
- package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
- package/library/packages/services/src/api/asset/asset.d.ts +2 -2
- package/library/packages/services/src/api/asset/asset.types.d.ts +4 -0
- package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +19 -5
- package/library/packages/types/src/asset-click-action.d.ts +3 -1
- package/library/packages/types/src/asset-format-picker.d.ts +11 -0
- package/library/packages/types/src/bento-grid.d.ts +37 -0
- package/library/packages/types/src/content-builder.d.ts +37 -1
- package/library/packages/types/src/gallery.d.ts +0 -6
- package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +6 -0
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/packages/utils/src/string/string.d.ts +1 -0
- package/library/packages/utils/src/transformation/index.d.ts +1 -0
- package/library/react-web-component.d.ts +236 -8
- package/library/utils.js +517 -192
- package/package.json +1 -1
- package/library/chunks/asset.Duzr3O3z.js +0 -370
- package/library/chunks/index.BgXEXk4m.js +0 -398
- package/library/chunks/toast.Bc4wpYJ1.js +0 -150
- /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
package/library/utils.js
CHANGED
|
@@ -1,194 +1,519 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { e as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { d as
|
|
11
|
-
import { d as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { c as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { g as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { g as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
1
|
+
import { a as D } from "./chunks/url.Cj9cIQXJ.js";
|
|
2
|
+
import { R as st, U as rt, c as ot, b as at, i as nt, t as it } from "./chunks/url.Cj9cIQXJ.js";
|
|
3
|
+
import { e as ct, f as ut, g as ft, c as ht, i as mt, a as dt, d as gt, m as pt, b as wt, r as xt, t as Ct } from "./chunks/toast.D3AW3RWv.js";
|
|
4
|
+
import { e as Dt, a as At, f as Tt, g as yt, d as St, b as Mt, c as Lt, i as It, p as vt, s as Rt } from "./chunks/browser.BHOCIF_A.js";
|
|
5
|
+
import { d as bt, C as kt, e as Ft, H as Ot, R as Nt, c as Xt, h as Pt, f as _t, g as Bt, l as Ht, p as Ut, a as Gt, b as Yt } from "./chunks/color.vLD2sNTs.js";
|
|
6
|
+
import { a as zt, b as qt, g as Zt } from "./chunks/modal.U1QltQKe.js";
|
|
7
|
+
import { a as Jt, p as $t, c as Qt, b as Kt, s as te } from "./chunks/animate.El-MpOws.js";
|
|
8
|
+
import { t as se } from "./chunks/converters.DkDtLstb.js";
|
|
9
|
+
import { c as oe } from "./chunks/custom-element.L4WJXn1j.js";
|
|
10
|
+
import { d as ne } from "./chunks/debounce.DaHuiSGU.js";
|
|
11
|
+
import { d as le } from "./chunks/default-value.COZopaet.js";
|
|
12
|
+
import { d as ue } from "./chunks/drag.DXEXVXPv.js";
|
|
13
|
+
import { w as he } from "./chunks/event.mFzZi4sr.js";
|
|
14
|
+
import { f as A } from "./chunks/form.Ch1cwYzO.js";
|
|
15
|
+
import { F as de, c as ge, v as pe, a as we } from "./chunks/form.Ch1cwYzO.js";
|
|
16
|
+
import { L as Ce, r as Ee } from "./chunks/i18n.BABe9hN4.js";
|
|
17
|
+
import { c as Ae } from "./chunks/math.DqTA6ya4.js";
|
|
18
|
+
import { g as ye, l as Se, s as Me, u as Le } from "./chunks/scroll.xtO5yojm.js";
|
|
19
|
+
import { j as x } from "./chunks/dom.0RpWet6y.js";
|
|
20
|
+
import { c as ve, d as Re, k as Ve, a as be, g as ke, h as Fe, b as Oe, f as Ne, i as Xe, e as Pe, l as _e, s as Be } from "./chunks/dom.0RpWet6y.js";
|
|
21
|
+
import { H as Ue, a as Ge, g as Ye } from "./chunks/slot.j5oheLJC.js";
|
|
22
|
+
import { g as ze, a as qe } from "./chunks/tabbable.CcMz3mIL.js";
|
|
23
|
+
import { i as je } from "./chunks/user-agent.D9aPuOyL.js";
|
|
24
|
+
import { w as $e } from "./chunks/watch.BCJD77bD.js";
|
|
25
|
+
import { f as Ke } from "./chunks/content-builder.CcgZciZN.js";
|
|
26
|
+
import { c as es, f as ss, e as rs, b as os, g as as, d as ns, i as is, r as ls, a as cs } from "./chunks/image.9qwbjGNb.js";
|
|
27
|
+
import { a as fs, b as hs, c as ms, e as ds, d as gs, f as ps, g as ws, r as xs, s as Cs } from "./chunks/number.B4PQLJIg.js";
|
|
28
|
+
import { s as Ds } from "./chunks/parse.Cu5nBDTb.js";
|
|
29
|
+
import { g as Ts, a as ys } from "./chunks/responsive.Oz9HWjyQ.js";
|
|
30
|
+
import { c as Ms, b as Ls, e as Is, f as vs, l as Rs, g as Vs, j as bs, p as ks, v as Fs, r as Os, a as Ns, d as Xs, s as Ps, k as _s, o as Bs, m as Hs, n as Us, q as Gs, t as Ys, u as Ws } from "./chunks/string.DUgD4c9f.js";
|
|
31
|
+
import { g as qs, a as Zs } from "./chunks/template.ClovJacp.js";
|
|
32
|
+
import { c as Js, a as $s, f as Qs, g as Ks } from "./chunks/time.BiQnh9wt.js";
|
|
33
|
+
import { b as er } from "./chunks/transformation.Cqz3hPaQ.js";
|
|
34
|
+
function b(t) {
|
|
35
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
36
|
+
return;
|
|
37
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
38
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
39
|
+
{
|
|
40
|
+
detail: { assetId: t, mode: "Details" },
|
|
41
|
+
type: "cx-cms5-view-asset"
|
|
42
|
+
},
|
|
43
|
+
e
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function k(t) {
|
|
47
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
48
|
+
return;
|
|
49
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
50
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
51
|
+
{
|
|
52
|
+
detail: { assetId: t, mode: "Container" },
|
|
53
|
+
type: "cx-cms5-view-asset"
|
|
54
|
+
},
|
|
55
|
+
e
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function F(t, e = void 0) {
|
|
59
|
+
!this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
|
|
60
|
+
D(t, "https://", !0),
|
|
61
|
+
e ?? "_blank"
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function O(t) {
|
|
65
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
66
|
+
return;
|
|
67
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
68
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
69
|
+
{
|
|
70
|
+
detail: { assetIds: [t] },
|
|
71
|
+
type: "cx-cms5-share-assets"
|
|
72
|
+
},
|
|
73
|
+
e
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function N(t, e) {
|
|
77
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t || !e)
|
|
78
|
+
return;
|
|
79
|
+
const s = this.ownerDocument.defaultView?.location.origin;
|
|
80
|
+
s && this.ownerDocument?.defaultView?.postMessage(
|
|
81
|
+
{ detail: { assetIds: t, formats: e }, type: "cx-cms5-download-assets" },
|
|
82
|
+
s
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
class X {
|
|
86
|
+
constructor(e) {
|
|
87
|
+
this.currentZIndex = x(), (this.host = e).addController(this);
|
|
88
|
+
}
|
|
89
|
+
hostConnected() {
|
|
90
|
+
}
|
|
91
|
+
hostDisconnected() {
|
|
92
|
+
}
|
|
93
|
+
async activatePopup() {
|
|
94
|
+
this.currentZIndex = x();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class P {
|
|
98
|
+
constructor(e, s = {}) {
|
|
99
|
+
this.element = e, this.noChildDrag = s.noChildDrag ?? !1, this.dragThreshold = s.dragThreshold ?? 5, this.isDragging = !1, this.hasDragged = !1, this.startX = 0, this.startY = 0, this.lastClientX = 0, this.lastClientY = 0, this.onMouseDown = this.onMouseDown.bind(this), this.onMouseMove = this.onMouseMove.bind(this), this.onMouseUp = this.onMouseUp.bind(this), this.onClick = this.onClick.bind(this), this.attach();
|
|
100
|
+
}
|
|
101
|
+
attach() {
|
|
102
|
+
this.element.addEventListener("mousedown", this.onMouseDown), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("mousemove", this.onMouseMove), this.element.addEventListener("click", this.onClick, !0);
|
|
103
|
+
}
|
|
104
|
+
detach() {
|
|
105
|
+
this.element.removeEventListener("mousedown", this.onMouseDown), window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), this.element.removeEventListener("click", this.onClick, !0);
|
|
106
|
+
}
|
|
107
|
+
onMouseDown(e) {
|
|
108
|
+
this.noChildDrag && e.target !== this.element || (this.isDragging = !0, this.hasDragged = !1, this.startX = e.clientX, this.startY = e.clientY, this.lastClientX = e.clientX, this.lastClientY = e.clientY, e.preventDefault());
|
|
109
|
+
}
|
|
110
|
+
onMouseMove(e) {
|
|
111
|
+
if (!this.isDragging)
|
|
112
|
+
return;
|
|
113
|
+
const s = e.clientX - this.lastClientX, r = e.clientY - this.lastClientY;
|
|
114
|
+
!this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= s, this.element.scrollTop -= r, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
|
|
115
|
+
}
|
|
116
|
+
onMouseUp() {
|
|
117
|
+
this.isDragging = !1;
|
|
118
|
+
}
|
|
119
|
+
onClick(e) {
|
|
120
|
+
this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const _ = (t) => t.ctrlKey || t.metaKey;
|
|
124
|
+
function C(t, e) {
|
|
125
|
+
if (!t?.document)
|
|
126
|
+
return !1;
|
|
127
|
+
const s = "mmmmmmmmmmwwwwwww", r = "32px", a = t.document.createElement("canvas").getContext("2d"), n = (l) => a ? (a.font = `${r} ${l}, monospace`, a.measureText(s).width) : 0, i = n("monospace");
|
|
128
|
+
return n(e) !== i;
|
|
129
|
+
}
|
|
130
|
+
function B(t, e) {
|
|
131
|
+
if (!t?.document.fonts)
|
|
132
|
+
return !1;
|
|
133
|
+
let s = !1;
|
|
134
|
+
return t.document.fonts.forEach((r) => {
|
|
135
|
+
r.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (s = !0);
|
|
136
|
+
}), s ? !0 : C(t, e);
|
|
137
|
+
}
|
|
138
|
+
function T(t) {
|
|
139
|
+
const e = /\bitalic\b/i, s = /\b(semi[-\s]?condensed|condensed)\b/i, r = (o) => {
|
|
140
|
+
const a = o.fontFamily.toLowerCase(), n = o.fontStyle.toLowerCase(), i = e.test(n), f = s.test(a);
|
|
141
|
+
let l = 0;
|
|
142
|
+
return i && (l = 1), f && (l = i ? 3 : 2), {
|
|
143
|
+
family: o.fontFamily,
|
|
144
|
+
styleRank: l,
|
|
145
|
+
weight: Number(o.fontWeight)
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
return [...t].sort((o, a) => {
|
|
149
|
+
const n = r(o), i = r(a);
|
|
150
|
+
return n.weight !== i.weight ? n.weight - i.weight : n.styleRank !== i.styleRank ? n.styleRank - i.styleRank : n.family.localeCompare(i.family);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
function H(t, e, s = [300, 400, 500, 700, 900], r = ["normal", "italic"]) {
|
|
154
|
+
const o = [];
|
|
155
|
+
if (C(t, e))
|
|
156
|
+
for (const a of s)
|
|
157
|
+
for (const n of r)
|
|
158
|
+
o.push({
|
|
159
|
+
fontFamily: e,
|
|
160
|
+
fontStyle: n,
|
|
161
|
+
fontWeight: a.toString(),
|
|
162
|
+
src: ""
|
|
163
|
+
});
|
|
164
|
+
return T(o);
|
|
165
|
+
}
|
|
166
|
+
function U(t) {
|
|
167
|
+
const e = new FormData(t), s = {};
|
|
168
|
+
return e.forEach((r, o) => {
|
|
169
|
+
if (Reflect.has(s, o)) {
|
|
170
|
+
const a = s[o];
|
|
171
|
+
Array.isArray(a) ? a.push(r) : s[o] = [s[o], r];
|
|
172
|
+
} else
|
|
173
|
+
s[o] = r;
|
|
174
|
+
}), s;
|
|
175
|
+
}
|
|
176
|
+
function y(t) {
|
|
177
|
+
const s = [...t.getRootNode().querySelectorAll("*")], r = [...t.elements], o = A.get(t), a = o ? Array.from(o) : [];
|
|
178
|
+
return [...r, ...a].sort(
|
|
179
|
+
(n, i) => s.indexOf(n) < s.indexOf(i) ? -1 : s.indexOf(n) > s.indexOf(i) ? 1 : 0
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
function G(t) {
|
|
183
|
+
return y(t).some(
|
|
184
|
+
(s) => s.hasAttribute("data-user-valid") || s.hasAttribute("data-user-invalid")
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
class Y {
|
|
188
|
+
constructor(e = null) {
|
|
189
|
+
this.history = e !== null ? [e] : [], this.redoStack = [];
|
|
190
|
+
}
|
|
191
|
+
add(e) {
|
|
192
|
+
this.history.push(e), this.redoStack = [];
|
|
193
|
+
}
|
|
194
|
+
undo() {
|
|
195
|
+
if (this.history.length > 1) {
|
|
196
|
+
const e = this.history.pop();
|
|
197
|
+
return this.redoStack.push(e), this.getCurrent();
|
|
198
|
+
}
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
redo() {
|
|
202
|
+
if (this.redoStack.length > 0) {
|
|
203
|
+
const e = this.redoStack.pop();
|
|
204
|
+
return this.history.push(e), e;
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
getCurrent() {
|
|
209
|
+
return this.history[this.history.length - 1] || null;
|
|
210
|
+
}
|
|
211
|
+
clear() {
|
|
212
|
+
this.history = [], this.redoStack = [];
|
|
213
|
+
}
|
|
214
|
+
canUndo() {
|
|
215
|
+
return this.history.length > 1;
|
|
216
|
+
}
|
|
217
|
+
canRedo() {
|
|
218
|
+
return this.redoStack.length > 0;
|
|
219
|
+
}
|
|
220
|
+
getHistory() {
|
|
221
|
+
return [...this.history];
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
var S = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(S || {});
|
|
225
|
+
function W(t, e) {
|
|
226
|
+
const s = {}, r = new Set(e);
|
|
227
|
+
return Object.keys(t).forEach((o) => {
|
|
228
|
+
r.has(o) || (s[o] = t[o]);
|
|
229
|
+
}), s;
|
|
230
|
+
}
|
|
231
|
+
function z(t, e) {
|
|
232
|
+
const s = {};
|
|
233
|
+
return e.forEach((r) => {
|
|
234
|
+
r in t && (s[r] = t[r]);
|
|
235
|
+
}), s;
|
|
236
|
+
}
|
|
237
|
+
function q(t) {
|
|
238
|
+
if (!t)
|
|
239
|
+
return {};
|
|
240
|
+
let e;
|
|
241
|
+
try {
|
|
242
|
+
e = JSON.parse(t);
|
|
243
|
+
} catch {
|
|
244
|
+
return {};
|
|
245
|
+
}
|
|
246
|
+
return typeof e != "object" ? {} : e;
|
|
247
|
+
}
|
|
248
|
+
function Z(t, e = !0) {
|
|
249
|
+
if (!t)
|
|
250
|
+
return [];
|
|
251
|
+
let s;
|
|
252
|
+
try {
|
|
253
|
+
s = JSON.parse(t);
|
|
254
|
+
} catch {
|
|
255
|
+
return [];
|
|
256
|
+
}
|
|
257
|
+
return Array.isArray(s) ? e ? s.filter((r) => typeof r == "string") : s : [];
|
|
258
|
+
}
|
|
259
|
+
function j(t, e) {
|
|
260
|
+
return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
|
|
261
|
+
}
|
|
262
|
+
function J(t, e) {
|
|
263
|
+
typeof Storage < "u" && localStorage.setItem(t, e.toString());
|
|
264
|
+
}
|
|
265
|
+
const M = 10;
|
|
266
|
+
function $(t, e) {
|
|
267
|
+
let s = 0, r = t.length;
|
|
268
|
+
for (; s < r; ) {
|
|
269
|
+
const o = Math.floor((s + r) / 2);
|
|
270
|
+
t[o].time < e.time ? s = o + 1 : r = o;
|
|
271
|
+
}
|
|
272
|
+
t.splice(s, 0, e);
|
|
273
|
+
}
|
|
274
|
+
function L(t, e, s) {
|
|
275
|
+
return t.find(
|
|
276
|
+
(r) => r.col === e && r.row === s
|
|
277
|
+
) ?? null;
|
|
278
|
+
}
|
|
279
|
+
function I(t, e, s) {
|
|
280
|
+
return new Promise((r) => {
|
|
281
|
+
if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
|
|
282
|
+
r();
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (e === 0) {
|
|
286
|
+
const o = () => {
|
|
287
|
+
t.removeEventListener("seeked", o);
|
|
288
|
+
const a = () => {
|
|
289
|
+
t.removeEventListener("seeked", a), r();
|
|
290
|
+
};
|
|
291
|
+
t.addEventListener("seeked", a), t.currentTime = 0;
|
|
292
|
+
};
|
|
293
|
+
t.addEventListener("seeked", o), t.currentTime = s;
|
|
294
|
+
} else {
|
|
295
|
+
const o = () => {
|
|
296
|
+
t.removeEventListener("seeked", o), r();
|
|
297
|
+
};
|
|
298
|
+
t.addEventListener("seeked", o), t.currentTime = e;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
async function* Q({
|
|
303
|
+
cache: t,
|
|
304
|
+
canvas: e,
|
|
305
|
+
duration: s,
|
|
306
|
+
maxInterval: r,
|
|
307
|
+
src: o,
|
|
308
|
+
video: a
|
|
309
|
+
}) {
|
|
310
|
+
if (!e)
|
|
311
|
+
throw new Error("Canvas is required");
|
|
312
|
+
if (!a)
|
|
313
|
+
throw new Error("Video is required");
|
|
314
|
+
const { columns: n, frameHeight: i, frameWidth: f, rows: l, spriteCtx: E } = e;
|
|
315
|
+
try {
|
|
316
|
+
for (let c = 0; c < l; c++)
|
|
317
|
+
for (let u = 0; u < n; u++) {
|
|
318
|
+
const m = c * n + u, h = m * r;
|
|
319
|
+
if (h >= s)
|
|
320
|
+
continue;
|
|
321
|
+
const d = u * f, g = c * i, p = L(t[o] ?? [], u, c), w = u === n - 1 && c === l - 1 || h + r >= s;
|
|
322
|
+
p ? yield { ...p, isLastFrame: w } : (await I(a, h, r), E.drawImage(
|
|
323
|
+
a,
|
|
324
|
+
d,
|
|
325
|
+
g,
|
|
326
|
+
f,
|
|
327
|
+
i
|
|
328
|
+
), yield {
|
|
329
|
+
col: u,
|
|
330
|
+
columns: n,
|
|
331
|
+
frameHeight: i,
|
|
332
|
+
frameWidth: f,
|
|
333
|
+
index: m,
|
|
334
|
+
isLastFrame: w,
|
|
335
|
+
row: c,
|
|
336
|
+
rows: l,
|
|
337
|
+
time: Number(h.toFixed(M)),
|
|
338
|
+
x: d,
|
|
339
|
+
y: g
|
|
340
|
+
}), await new Promise(requestAnimationFrame);
|
|
341
|
+
}
|
|
342
|
+
} catch {
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function K({
|
|
346
|
+
duration: t,
|
|
347
|
+
frameWidth: e,
|
|
348
|
+
playbackSpeed: s,
|
|
349
|
+
scale: r
|
|
350
|
+
}) {
|
|
351
|
+
let o = e * s / r;
|
|
352
|
+
return o > t && (o = t / 2), o;
|
|
353
|
+
}
|
|
30
354
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
355
|
+
bt as CMYK_VALIDATION_REGEX,
|
|
356
|
+
kt as ColorType,
|
|
357
|
+
X as CortexPopupController,
|
|
358
|
+
P as DragScroll,
|
|
359
|
+
de as FormControlController,
|
|
360
|
+
Ft as HEX_ALPHA_VALIDATION_REGEX,
|
|
361
|
+
Ot as HEX_VALIDATION_REGEX,
|
|
362
|
+
Ue as HasSlotController,
|
|
363
|
+
Y as HistoryManager,
|
|
364
|
+
S as KeyboardKey,
|
|
365
|
+
Ce as LocalizeController,
|
|
366
|
+
M as PRECISION,
|
|
367
|
+
st as RELATIVE_URL_REGEX,
|
|
368
|
+
Nt as RGB_VALIDATION_REGEX,
|
|
369
|
+
rt as URL_DOMAIN_VALIDATION_REGEX,
|
|
370
|
+
ot as URL_PROTOCOL_VALIDATION_REGEX,
|
|
371
|
+
at as URL_VALIDATION_REGEX,
|
|
372
|
+
zt as activeElements,
|
|
373
|
+
ct as adjustRelativeValues,
|
|
374
|
+
Jt as animateTo,
|
|
375
|
+
D as appendProtocol,
|
|
376
|
+
er as buildTransformationString,
|
|
377
|
+
es as calculateAspectRatioFit,
|
|
378
|
+
Ae as clamp,
|
|
379
|
+
ss as cleanImageFileName,
|
|
380
|
+
Js as clearZeroDurationParts,
|
|
381
|
+
Xt as convertColor,
|
|
382
|
+
fs as convertDataUnits,
|
|
383
|
+
hs as convertDurationToMilliseconds,
|
|
384
|
+
ms as convertPixelsToAspectRatio,
|
|
385
|
+
rs as convertSrcToBlob,
|
|
386
|
+
os as cropImage,
|
|
387
|
+
ve as cssValueToPx,
|
|
388
|
+
oe as customElement,
|
|
389
|
+
ge as customErrorValidityState,
|
|
390
|
+
ne as debounce,
|
|
391
|
+
le as defaultValue,
|
|
392
|
+
N as downloadAsset,
|
|
393
|
+
ue as drag,
|
|
394
|
+
Ms as emptyToSpace,
|
|
395
|
+
Pt as extractColor,
|
|
396
|
+
Ls as extractExtension,
|
|
397
|
+
Q as extractFrames,
|
|
398
|
+
Is as extractRootData,
|
|
399
|
+
ds as extractValueAndUnit,
|
|
400
|
+
Ke as fetchCortexApi,
|
|
401
|
+
Dt as findAncestorWithBuggyStyle,
|
|
402
|
+
At as findContainingBlock,
|
|
403
|
+
Tt as findCuttingAncestor,
|
|
404
|
+
L as findFrameByColAndRow,
|
|
405
|
+
ut as findIndexByProp,
|
|
406
|
+
A as formCollections,
|
|
407
|
+
gs as formatAspectRatioString,
|
|
408
|
+
$s as formatDurationPartsManually,
|
|
409
|
+
ps as formatNumberWithGrouping,
|
|
410
|
+
vs as formatSecondsToTime,
|
|
411
|
+
Rs as formatTimeToSeconds,
|
|
412
|
+
Qs as formatWithIntlDurationFormat,
|
|
413
|
+
ws as gcd,
|
|
414
|
+
Re as getActiveElement,
|
|
415
|
+
qt as getActiveModals,
|
|
416
|
+
Ts as getBreakpointsFromCSS,
|
|
417
|
+
H as getBrowserFontVariants,
|
|
418
|
+
_t as getColorType,
|
|
419
|
+
as as getContainedImageSize,
|
|
420
|
+
Ve as getCortexPopupLayer,
|
|
421
|
+
x as getCurrentZIndex,
|
|
422
|
+
Zt as getDeepestActiveElement,
|
|
423
|
+
ys as getDeviceType,
|
|
424
|
+
Ks as getDurationPartsByUnitsFormat,
|
|
425
|
+
be as getElementFromHTMLString,
|
|
426
|
+
ke as getElementFromTemplate,
|
|
427
|
+
y as getFormControls,
|
|
428
|
+
qs as getHighlightedTitle,
|
|
429
|
+
Zs as getHighlightedTitleHtml,
|
|
430
|
+
Ge as getInnerHTML,
|
|
431
|
+
K as getInterval,
|
|
432
|
+
Bt as getLightDarkCssString,
|
|
433
|
+
ns as getNaturalWidthHeight,
|
|
434
|
+
Fe as getNeededPaddingForBoxShadow,
|
|
435
|
+
yt as getNextAncestor,
|
|
436
|
+
ye as getOffset,
|
|
437
|
+
Oe as getRelativeClickPercentage,
|
|
438
|
+
Vs as getRootIDString,
|
|
439
|
+
ze as getTabbableBoundary,
|
|
440
|
+
qe as getTabbableElements,
|
|
441
|
+
Ye as getTextContent,
|
|
442
|
+
ft as groupBy,
|
|
443
|
+
ht as insertAtIndex,
|
|
444
|
+
$ as insertFrameToCache,
|
|
445
|
+
mt as insertMultipleAtIndex,
|
|
446
|
+
St as isChrome,
|
|
447
|
+
je as isCortexAdobePlugin,
|
|
448
|
+
Ne as isDomElement,
|
|
449
|
+
Xe as isElementInHorizontalView,
|
|
450
|
+
Mt as isFirefox,
|
|
451
|
+
B as isFontFamilyAvailable,
|
|
452
|
+
G as isFormInteracted,
|
|
453
|
+
bs as isGalleryItemCardType,
|
|
454
|
+
Lt as isIOS,
|
|
455
|
+
Pe as isInElement,
|
|
456
|
+
_ as isModKey,
|
|
457
|
+
It as isSafari,
|
|
458
|
+
is as isSaveSrcValid,
|
|
459
|
+
nt as isValidUrl,
|
|
460
|
+
_e as loadScript,
|
|
461
|
+
Se as lockBodyScrolling,
|
|
462
|
+
Ht as luminanceTextColor,
|
|
463
|
+
dt as moveMultipleToIndex,
|
|
464
|
+
gt as moveToIndex,
|
|
465
|
+
pt as multiSelectTo,
|
|
466
|
+
W as omit,
|
|
467
|
+
b as openAssetOverview,
|
|
468
|
+
k as openFolderOverview,
|
|
469
|
+
F as openLink,
|
|
470
|
+
ks as padPath,
|
|
471
|
+
Fs as parseBooleanString,
|
|
472
|
+
Ut as parseBorder,
|
|
473
|
+
$t as parseDuration,
|
|
474
|
+
q as parseJsonString,
|
|
475
|
+
Gt as parseLightDark,
|
|
476
|
+
Z as parseListString,
|
|
477
|
+
Yt as parseShadow,
|
|
478
|
+
z as pick,
|
|
479
|
+
vt as popoverSupported,
|
|
480
|
+
Qt as prefersReducedMotion,
|
|
481
|
+
j as readLocalStorageValue,
|
|
482
|
+
Os as reducePathToDirectChild,
|
|
483
|
+
Ee as registerTranslation,
|
|
484
|
+
wt as removeAtIndex,
|
|
485
|
+
xt as removeMultipleAtIndex,
|
|
486
|
+
ls as resizeImage,
|
|
487
|
+
xs as rotateBox,
|
|
488
|
+
cs as rotateImage,
|
|
489
|
+
Ns as safeExtension,
|
|
490
|
+
Xs as safeString,
|
|
491
|
+
Ps as sanitizeHTML,
|
|
492
|
+
Cs as sanitizeRotation,
|
|
493
|
+
Me as scrollIntoView,
|
|
494
|
+
U as serialize,
|
|
495
|
+
O as shareAsset,
|
|
496
|
+
Kt as shimKeyframesHeightAuto,
|
|
497
|
+
Be as sortByTopPosition,
|
|
498
|
+
T as sortTypefaceVariants,
|
|
499
|
+
Ds as splitBoxValues,
|
|
500
|
+
_s as splitCamelCaseFormatted,
|
|
501
|
+
te as stopAnimations,
|
|
502
|
+
Rt as supportHLS,
|
|
503
|
+
C as testFontAvailability,
|
|
504
|
+
se as timecodeConverter,
|
|
505
|
+
Bs as toCamelCase,
|
|
506
|
+
Hs as toKebabCase,
|
|
507
|
+
Us as toPascalCase,
|
|
508
|
+
it as toRelativeUrl,
|
|
509
|
+
Gs as toTitleCase,
|
|
510
|
+
Ct as toast,
|
|
511
|
+
Ys as truncateTextMiddle,
|
|
512
|
+
Le as unlockBodyScrolling,
|
|
513
|
+
Ws as upperFirst,
|
|
514
|
+
pe as validValidityState,
|
|
515
|
+
we as valueMissingValidityState,
|
|
516
|
+
he as waitForEvent,
|
|
517
|
+
$e as watch,
|
|
518
|
+
J as writeLocalStorageValue
|
|
194
519
|
};
|