@orangelogic/design-system 3.79.0 → 3.81.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 (177) hide show
  1. package/library/chunks/{alert.D8Gwfkvy.js → alert.B2tfKtSz.js} +2 -2
  2. package/library/chunks/{array-line-clamp.B1e77kEp.js → array-line-clamp.eDLjR1nZ.js} +2 -2
  3. package/library/chunks/{asset-link-format.PQt5Mb9Q.js → asset-link-format.BCaHv6rQ.js} +394 -388
  4. package/library/chunks/{audio.DOJNYr0C.js → audio.Dr0Hus7H.js} +8 -5
  5. package/library/chunks/{bicolor-picker.B8Og3cEe.js → bicolor-picker.BIxYmH8T.js} +1 -1
  6. package/library/chunks/{block-width.BgXEUBL9.js → block-width.DDBxasyy.js} +484 -460
  7. package/library/chunks/{border-input-group.D3fEj_NT.js → border-input-group.DYJ0TvAS.js} +3 -3
  8. package/library/chunks/{breadcrumb.C_NpOjQB.js → breadcrumb.WKQKC3f1.js} +1 -1
  9. package/library/chunks/{button.DeRJNqpr.js → button.D58Q0tW6.js} +2 -2
  10. package/library/chunks/{color-picker.YQfGbc4_.js → color-picker.DQzgEk7r.js} +10 -10
  11. package/library/chunks/{color-swatch-group.BQxH1WM1.js → color-swatch-group.D6W7Zrig.js} +60 -60
  12. package/library/chunks/{color-swatch.-69F8jvl.js → color-swatch.DlzNqa0X.js} +3 -3
  13. package/library/chunks/{config-manager.BO-EItzn.js → config-manager.CXUj_qfl.js} +36 -36
  14. package/library/chunks/{configs-controller.DS_tmFst.js → configs-controller.C34CcFSA.js} +65 -65
  15. package/library/chunks/{confirm-popover.D3kp6Bg-.js → confirm-popover.BF6FfiVI.js} +4 -4
  16. package/library/chunks/{copy-button.B4Q_8B50.js → copy-button.BzYFM1nx.js} +2 -2
  17. package/library/chunks/{corner-position-input-group.lsTSrT61.js → corner-position-input-group.Aos2Z9cJ.js} +4 -4
  18. package/library/chunks/{date-calendar.Dc3XKO0t.js → date-calendar.DzLGaro8.js} +1 -1
  19. package/library/chunks/{details.BacO3ROq.js → details.B_IIkM1I.js} +1 -1
  20. package/library/chunks/{dialog.CfbeRoZl.js → dialog.Cagz5vxR.js} +3 -3
  21. package/library/chunks/{document-viewer.CJ8zqnoz.js → document-viewer.BKdDZ9MG.js} +28 -19
  22. package/library/chunks/{dot-pagination.CH4nRyA8.js → dot-pagination.ka2dgd3K.js} +2 -2
  23. package/library/chunks/{drawer.DdZl0Tae.js → drawer.CqpMBED_.js} +2 -2
  24. package/library/chunks/{dropdown.CHSfZeHp.js → dropdown.DhjYWqJb.js} +4 -4
  25. package/library/chunks/{dynamic-select.BLoP9tvq.js → dynamic-select.L12vKCOX.js} +5 -5
  26. package/library/chunks/{e-chart.fGTLKIDX.js → e-chart.CAAz1JC5.js} +2 -2
  27. package/library/chunks/{element-clamp.BXz2Lc5M.js → element-clamp.M1T8iWvk.js} +2 -2
  28. package/library/chunks/{file-on-demand.bgCbasKa.js → file-on-demand.BAwB-Znv.js} +17 -17
  29. package/library/chunks/{folder-select.Cc9PkoVE.js → folder-select.BajqQkzA.js} +7 -7
  30. package/library/chunks/{format-time.DZCXUWmw.js → format-time.CxaGqngb.js} +1 -1
  31. package/library/chunks/{header.Dz7W1DJC.js → header.CfCULafs.js} +2 -2
  32. package/library/chunks/{i18n.BJ2p4em8.js → i18n.deOPJlBG.js} +1 -0
  33. package/library/chunks/{icon-button.Dd-oDRfX.js → icon-button.DSSgDKO8.js} +2 -2
  34. package/library/chunks/{iframe.DsOaw03m.js → iframe.BVnWzC6u.js} +1 -1
  35. package/library/chunks/{image-comparer.FB0ZzA0d.js → image-comparer.6hxOR7VL.js} +1 -1
  36. package/library/chunks/{image.WBQUoc3j.js → image.wVxvwZxr.js} +76 -81
  37. package/library/chunks/{input.w9KQVNnx.js → input.AS0kZ6ks.js} +1 -1
  38. package/library/chunks/{line-clamp.DAhcB8_D.js → line-clamp.biFX066w.js} +2 -2
  39. package/library/chunks/{markdown.C1P0ctPs.js → markdown.BwIil8g5.js} +2 -2
  40. package/library/chunks/{masonry.BnIxslnb.js → masonry.D4DxZZ03.js} +3 -3
  41. package/library/chunks/{menu-item.CX4NV4BU.js → menu-item.Bi9zjGsW.js} +3 -3
  42. package/library/chunks/{menu.Al_SBJNI.js → menu.DqKFF1tH.js} +2 -2
  43. package/library/chunks/{option.DckbOkYC.js → option.CKvalzr2.js} +1 -1
  44. package/library/chunks/{padding-input-group.BTjH4scb.js → padding-input-group.BURYDFGi.js} +1 -1
  45. package/library/chunks/{pagination.B17Ykd-G.js → pagination.DEGvwJXh.js} +7 -7
  46. package/library/chunks/{popup.Bk9xpj1E.js → popup.DQcD7riQ.js} +1 -1
  47. package/library/chunks/{position-picker.DwDC9gDl.js → position-picker.Cjk5OdB5.js} +1 -1
  48. package/library/chunks/{progress-bar.BJfkoZ6G.js → progress-bar.BSTyftIm.js} +1 -1
  49. package/library/chunks/{progress-ring.BSfnNF9M.js → progress-ring.cC63wJQr.js} +1 -1
  50. package/library/chunks/{radio-card.B7uO9Xs1.js → radio-card.Crn-znqj.js} +1 -1
  51. package/library/chunks/{range.20iIQxEz.js → range.BEXR2sEB.js} +2 -2
  52. package/library/chunks/{rating.BgUId4FT.js → rating.DZrii8F_.js} +1 -1
  53. package/library/chunks/{relative-time.BSSaZxeD.js → relative-time.DZ5rhLwg.js} +1 -1
  54. package/library/chunks/{select.BivTPBtv.js → select.CmdHRMy_.js} +6 -6
  55. package/library/chunks/{shadow-input-group.7NODSHPt.js → shadow-input-group.BKu3bgVT.js} +2 -2
  56. package/library/chunks/{share-option-list.C28_ddOP.js → share-option-list.IgLnP5Ib.js} +2 -2
  57. package/library/chunks/{sidebar.B1MjUxBY.js → sidebar.CGFDNY9i.js} +1 -1
  58. package/library/chunks/{size-input-group.CFgOvLnO.js → size-input-group.DzSQz6mI.js} +5 -5
  59. package/library/chunks/{spinner.o3Rjsff7.js → spinner.DagKrwY5.js} +1 -1
  60. package/library/chunks/{split-panel.CVyqM2Dr.js → split-panel.Gfbbe8BX.js} +1 -1
  61. package/library/chunks/{src.CtGMXA2r.js → src.DoJoeNZB.js} +48 -48
  62. package/library/chunks/src.cBRbsOdC.js +720 -0
  63. package/library/chunks/{step.C-T63mG1.js → step.Dw2VfEhD.js} +3 -3
  64. package/library/chunks/{stepper-wizard.BCmR5WiA.js → stepper-wizard.Bozu8x6U.js} +2 -2
  65. package/library/chunks/{stepper.DR3oqUpm.js → stepper.cJSgSSMJ.js} +1 -1
  66. package/library/chunks/{tab-group.BafStohF.js → tab-group.D5yMsNTe.js} +7 -7
  67. package/library/chunks/{tab.uRk_KNV2.js → tab.BXcVzB6d.js} +3 -3
  68. package/library/chunks/{tag.B6BfN7x-.js → tag.kF4Izxei.js} +3 -3
  69. package/library/chunks/{tooltip.fZNjia6Z.js → tooltip.O-5jGui7.js} +2 -2
  70. package/library/chunks/{tree.B9-viK2b.js → tree.BP9r-4UR.js} +3 -3
  71. package/library/chunks/{typeface.BHErcYfd.js → typeface.B75hLESf.js} +3 -3
  72. package/library/chunks/{url.CZO_DV8Y.js → url.BCc06dE7.js} +15 -6
  73. package/library/chunks/{video.D9JTlBJ9.js → video.C9tEIck_.js} +2 -2
  74. package/library/components/alert.js +1 -1
  75. package/library/components/array-line-clamp.js +1 -1
  76. package/library/components/asset-link-format.js +1 -1
  77. package/library/components/atoms.js +53 -53
  78. package/library/components/audio.js +1 -1
  79. package/library/components/bicolor-picker.js +1 -1
  80. package/library/components/border-input-group.js +1 -1
  81. package/library/components/breadcrumb.js +1 -1
  82. package/library/components/button.js +1 -1
  83. package/library/components/color-picker.js +1 -1
  84. package/library/components/color-swatch-group.js +1 -1
  85. package/library/components/color-swatch.js +1 -1
  86. package/library/components/confirm-popover.js +1 -1
  87. package/library/components/copy-button.js +1 -1
  88. package/library/components/corner-position-input-group.js +1 -1
  89. package/library/components/date-calendar.js +1 -1
  90. package/library/components/details.js +1 -1
  91. package/library/components/dialog.js +1 -1
  92. package/library/components/document-viewer.js +1 -1
  93. package/library/components/dot-pagination.js +1 -1
  94. package/library/components/drawer.js +1 -1
  95. package/library/components/dropdown.js +1 -1
  96. package/library/components/dynamic-select.js +1 -1
  97. package/library/components/e-chart.js +1 -1
  98. package/library/components/element-clamp.js +1 -1
  99. package/library/components/file-on-demand.js +1 -1
  100. package/library/components/folder-select.js +1 -1
  101. package/library/components/format-bytes.js +1 -1
  102. package/library/components/format-date.js +1 -1
  103. package/library/components/format-number.js +1 -1
  104. package/library/components/format-time.js +1 -1
  105. package/library/components/header.js +1 -1
  106. package/library/components/icon-button.js +1 -1
  107. package/library/components/iframe.js +1 -1
  108. package/library/components/image-comparer.js +1 -1
  109. package/library/components/image.js +1 -1
  110. package/library/components/input.js +1 -1
  111. package/library/components/line-clamp.js +1 -1
  112. package/library/components/markdown.js +1 -1
  113. package/library/components/masonry.js +1 -1
  114. package/library/components/menu-item.js +1 -1
  115. package/library/components/menu.js +1 -1
  116. package/library/components/molecules.js +16 -16
  117. package/library/components/option.js +1 -1
  118. package/library/components/organisms.js +3 -3
  119. package/library/components/padding-input-group.js +1 -1
  120. package/library/components/pagination.js +1 -1
  121. package/library/components/popup.js +1 -1
  122. package/library/components/position-picker.js +1 -1
  123. package/library/components/progress-bar.js +1 -1
  124. package/library/components/progress-ring.js +1 -1
  125. package/library/components/radio-card.js +1 -1
  126. package/library/components/range.js +1 -1
  127. package/library/components/rating.js +1 -1
  128. package/library/components/relative-time.js +1 -1
  129. package/library/components/select.js +1 -1
  130. package/library/components/shadow-input-group.js +1 -1
  131. package/library/components/share-option-list.js +1 -1
  132. package/library/components/sidebar.js +1 -1
  133. package/library/components/size-input-group.js +1 -1
  134. package/library/components/spinner.js +1 -1
  135. package/library/components/split-panel.js +1 -1
  136. package/library/components/step.js +1 -1
  137. package/library/components/stepper-wizard.js +1 -1
  138. package/library/components/stepper.js +1 -1
  139. package/library/components/tab-group.js +1 -1
  140. package/library/components/tab.js +1 -1
  141. package/library/components/tag.js +1 -1
  142. package/library/components/tooltip.js +1 -1
  143. package/library/components/tree-item.js +1 -1
  144. package/library/components/tree.js +1 -1
  145. package/library/components/typeface.js +1 -1
  146. package/library/components/types.js +10308 -10206
  147. package/library/components/video.js +1 -1
  148. package/library/package.json +1 -1
  149. package/library/packages/atoms/src/components/audio/audio.d.ts +2 -0
  150. package/library/packages/atoms/src/components/document-viewer/document-viewer.d.ts +6 -0
  151. package/library/packages/atoms/src/components/image/image.d.ts +0 -3
  152. package/library/packages/events/src/events.d.ts +0 -4
  153. package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +14 -0
  154. package/library/packages/organisms/src/content-builder/blocks/button/button.d.ts +8 -0
  155. package/library/packages/organisms/src/content-builder/blocks/column/column.d.ts +5 -0
  156. package/library/packages/organisms/src/content-builder/blocks/column-group/column-group.d.ts +5 -0
  157. package/library/packages/organisms/src/content-builder/blocks/document-viewer/document-viewer.d.ts +8 -0
  158. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +7 -6
  159. package/library/packages/organisms/src/content-builder/blocks/timeline/timeline.d.ts +0 -2
  160. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +9 -0
  161. package/library/packages/organisms/src/content-builder/components/template-manager/template-manager.d.ts +11 -0
  162. package/library/packages/organisms/src/content-builder/content-builder.d.ts +17 -1
  163. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +13 -4
  164. package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +1 -1
  165. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  166. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +28 -0
  167. package/library/packages/utils/src/asset-url-mode/asset-url-mode.d.ts +22 -0
  168. package/library/packages/utils/src/asset-url-mode/index.d.ts +1 -0
  169. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  170. package/library/packages/utils/src/url/url.d.ts +7 -0
  171. package/library/react-web-component.d.ts +21 -1
  172. package/library/utils.js +29 -707
  173. package/package.json +1 -1
  174. package/library/packages/events/src/cx-image-src-resolved.d.ts +0 -9
  175. package/library/packages/events/src/cx-timeline-data-resolved.d.ts +0 -9
  176. package/library/packages/events/src/cx-video-src-resolved.d.ts +0 -8
  177. package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +0 -8
@@ -0,0 +1,720 @@
1
+ import "./i18n.deOPJlBG.js";
2
+ import "./string.DAuTpyw8.js";
3
+ import { a as e } from "./dom.BsVeSE01.js";
4
+ import { r as t } from "./form.JYXtmwQ2.js";
5
+ import "./browser.Ct4pHP9I.js";
6
+ import { n } from "./position-picker.dY_vgF_H.js";
7
+ import "./default-value.opqQgoRT.js";
8
+ import "./date.BL4L64Hx.js";
9
+ import { c as r, d as i, o as a } from "./url.BCc06dE7.js";
10
+ import "./responsive.L9Csz2w2.js";
11
+ import "./template.Cyvih0XQ.js";
12
+ import { i as o, r as s, t as c } from "./asset-link-format.DhdgEsA0.js";
13
+ //#region ../../packages/utils/src/date/iso-week-number.ts
14
+ function l(e) {
15
+ let t = /* @__PURE__ */ new Date(`${e}T00:00:00Z`);
16
+ if (Number.isNaN(t.getTime())) return 0;
17
+ let n = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())), r = n.getUTCDay() || 7;
18
+ n.setUTCDate(n.getUTCDate() + 4 - r);
19
+ let i = new Date(Date.UTC(n.getUTCFullYear(), 0, 1)), a = (n.getTime() - i.getTime()) / 864e5;
20
+ return Math.ceil((a + 1) / 7);
21
+ }
22
+ //#endregion
23
+ //#region ../../packages/utils/src/actions/asset-click.ts
24
+ function u(e) {
25
+ if (!this.ownerDocument.defaultView?.Matrix3 || !e) return;
26
+ let t = this.ownerDocument.defaultView?.location.origin;
27
+ t && this.ownerDocument?.defaultView?.postMessage({
28
+ detail: {
29
+ assetId: e,
30
+ mode: "Details"
31
+ },
32
+ type: "cx-cms5-view-asset"
33
+ }, t);
34
+ }
35
+ function d(e) {
36
+ if (!this.ownerDocument.defaultView?.Matrix3 || !e) return;
37
+ let t = this.ownerDocument.defaultView?.location.origin;
38
+ t && this.ownerDocument?.defaultView?.postMessage({
39
+ detail: {
40
+ assetId: e,
41
+ mode: "Container"
42
+ },
43
+ type: "cx-cms5-view-asset"
44
+ }, t);
45
+ }
46
+ function f(e, t = void 0) {
47
+ this.ownerDocument.defaultView?.Matrix3 && e && this.ownerDocument.defaultView?.open(a(e, "https://", !0), t ?? "_blank");
48
+ }
49
+ function p(e) {
50
+ if (!this.ownerDocument.defaultView?.Matrix3 || !e) return;
51
+ let t = this.ownerDocument.defaultView?.location.origin;
52
+ t && this.ownerDocument?.defaultView?.postMessage({
53
+ detail: { assetIds: [e] },
54
+ type: "cx-cms5-share-assets"
55
+ }, t);
56
+ }
57
+ function m(e, t) {
58
+ if (!this.ownerDocument.defaultView?.Matrix3 || !e) return;
59
+ let n = t || {}, r = this.ownerDocument.defaultView?.location.origin;
60
+ r && this.ownerDocument?.defaultView?.postMessage({
61
+ detail: {
62
+ assetIds: e,
63
+ formats: n
64
+ },
65
+ type: "cx-cms5-download-assets"
66
+ }, r);
67
+ }
68
+ //#endregion
69
+ //#region ../../packages/utils/src/array/array.ts
70
+ function h(e, t) {
71
+ return e.filter((e, n) => n !== t);
72
+ }
73
+ function g(e, t) {
74
+ return e.filter((e, n) => !t.includes(n));
75
+ }
76
+ function _(e, t, n) {
77
+ return [
78
+ ...e.slice(0, t),
79
+ n,
80
+ ...e.slice(t)
81
+ ];
82
+ }
83
+ function v(e, t, n) {
84
+ return [
85
+ ...e.slice(0, t),
86
+ ...n,
87
+ ...e.slice(t)
88
+ ];
89
+ }
90
+ function ee(e, t, n) {
91
+ return e.findIndex((e) => e[t] === n);
92
+ }
93
+ function te(e, t, n) {
94
+ let r = h([...e], t), i = n;
95
+ return i >= e.length - 1 && (i += 1), _(r, i, e[t]);
96
+ }
97
+ function ne(e, t, n) {
98
+ return v(g([...e], t), n === 0 ? n : t.reduce((e, t) => n > t ? e - 1 : e, n), t.map((t) => e[t]));
99
+ }
100
+ function re(e, t) {
101
+ return e.reduce((e, n) => {
102
+ let r = n[t];
103
+ return e[r] ??= [], e[r].push(n), e;
104
+ }, {});
105
+ }
106
+ function ie(e, t, n) {
107
+ if (!e.length) return [t];
108
+ let r = n.findIndex((e) => e.id === t), i = e[e.length - 1], a = n.findIndex((e) => e.id === i);
109
+ if (r < 0 || a < 0) return [t];
110
+ let o = n.reduce((e, t, n) => (e[t.id] = n, e), {}), s = r > a, c = s ? a : r, l = s ? r : a, u = n.slice(c, l + 1).filter((t) => !(!t || e.includes(t.id))).map((e) => e.id), d = s ? u : [...u].reverse(), f = e.includes(t) ? e.slice(0, e.indexOf(t) + 1) : [...e, ...d];
111
+ return f.sort((e, t) => o[e] - o[t]), f;
112
+ }
113
+ function ae(e, t, n, r, i, a) {
114
+ let o = n + 1;
115
+ if (e.length < 2) throw Error("Values array must contain at least 2 elements");
116
+ if (n < 0 || o >= e.length) throw Error("Invalid index or not enough values to adjust");
117
+ if (r < 0) throw Error("Minimum value must be non-negative");
118
+ let s = i + t;
119
+ s < r && (t = r - i, s = r);
120
+ let c = a - t;
121
+ c < r && (t = a - r, s = i + t, c = r), e[n] = parseFloat(s.toFixed(2)), e[o] = parseFloat(c.toFixed(2));
122
+ }
123
+ //#endregion
124
+ //#region ../../packages/utils/src/custom-element/popup.ts
125
+ var oe = class {
126
+ hostConnected() {}
127
+ hostDisconnected() {}
128
+ constructor(t) {
129
+ this.currentZIndex = e(), (this.host = t).addController(this);
130
+ }
131
+ async activatePopup() {
132
+ this.currentZIndex = e();
133
+ }
134
+ }, y = class {
135
+ constructor(e, t = {}) {
136
+ this.element = e, this.noChildDrag = t.noChildDrag ?? !1, this.dragThreshold = t.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();
137
+ }
138
+ attach() {
139
+ this.element.addEventListener("mousedown", this.onMouseDown), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("mousemove", this.onMouseMove), this.element.addEventListener("click", this.onClick, !0);
140
+ }
141
+ detach() {
142
+ this.element.removeEventListener("mousedown", this.onMouseDown), window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), this.element.removeEventListener("click", this.onClick, !0);
143
+ }
144
+ onMouseDown(e) {
145
+ 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());
146
+ }
147
+ onMouseMove(e) {
148
+ if (!this.isDragging) return;
149
+ let t = e.clientX - this.lastClientX, n = e.clientY - this.lastClientY;
150
+ !this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= t, this.element.scrollTop -= n, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
151
+ }
152
+ onMouseUp() {
153
+ this.isDragging = !1;
154
+ }
155
+ onClick(e) {
156
+ this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
157
+ }
158
+ }, se = (e) => e.ctrlKey || e.metaKey, ce = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
159
+ function le(e, t, n, r = ce) {
160
+ let i = new URL(r + "/" + e);
161
+ return Array.isArray(n) ? n.forEach((e) => {
162
+ e[1] && i.searchParams.append(e[0], e[1]);
163
+ }) : n && Object.keys(n).forEach((e) => {
164
+ n[e] && i.searchParams.append(e, n[e]);
165
+ }), fetch(i, t);
166
+ }
167
+ //#endregion
168
+ //#region ../../packages/utils/src/font/font.ts
169
+ function b(e) {
170
+ return e.replaceAll(" ", "_");
171
+ }
172
+ function ue(e) {
173
+ return e.value ?? b(e.typeface);
174
+ }
175
+ function de(e) {
176
+ return b([
177
+ e.value || e.name,
178
+ e.fontStyle,
179
+ e.fontWeight
180
+ ].filter((e) => e != null && e !== "").join("_"));
181
+ }
182
+ function x(e) {
183
+ return e.length >= 2 && (e.startsWith("'") && e.endsWith("'") || e.startsWith("\"") && e.endsWith("\""));
184
+ }
185
+ function S(e) {
186
+ return x(e) || !e.includes(" ") ? e : `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
187
+ }
188
+ function C(e) {
189
+ return x(e) ? e.slice(1, -1).replace(/\\(.)/g, "$1") : e;
190
+ }
191
+ function w(e, t) {
192
+ if (!e?.document) return !1;
193
+ let n = e.document.createElement("canvas").getContext("2d"), r = (e) => n ? (n.font = `32px ${S(e)}, monospace`, n.measureText("mmmmmmmmmmwwwwwww").width) : 0, i = r("monospace");
194
+ return r(t) !== i;
195
+ }
196
+ function fe(e, t) {
197
+ if (!e?.document?.fonts) return !1;
198
+ let n = !1;
199
+ return e.document.fonts.forEach((e) => {
200
+ e.family.replace(/['"]/g, "").toLowerCase() === t.toLowerCase() && (n = !0);
201
+ }), n ? !0 : w(e, t);
202
+ }
203
+ function T(e) {
204
+ let t = /\bitalic\b/i, n = /\b(semi[-\s]?condensed|condensed)\b/i, r = (e) => {
205
+ let r = e.fontFamily.toLowerCase(), i = e.fontStyle.toLowerCase(), a = t.test(i), o = n.test(r), s = 0;
206
+ return a && (s = 1), o && (s = a ? 3 : 2), {
207
+ family: e.fontFamily,
208
+ styleRank: s,
209
+ weight: Number(e.fontWeight)
210
+ };
211
+ };
212
+ return [...e].sort((e, t) => {
213
+ let n = r(e), i = r(t);
214
+ return n.weight === i.weight ? n.styleRank === i.styleRank ? n.family.localeCompare(i.family) : n.styleRank - i.styleRank : n.weight - i.weight;
215
+ });
216
+ }
217
+ function pe(e, t, n = [
218
+ 300,
219
+ 400,
220
+ 500,
221
+ 700,
222
+ 900
223
+ ], r = ["normal", "italic"]) {
224
+ let i = [];
225
+ if (w(e, t)) for (let e of n) for (let n of r) i.push({
226
+ fontFamily: t,
227
+ fontStyle: n,
228
+ fontWeight: e.toString(),
229
+ src: ""
230
+ });
231
+ return T(i);
232
+ }
233
+ function me(e, t) {
234
+ let n = C(t);
235
+ return e.find((e) => e.families.length > 0 && (e.typeface === n || e.value === n || e.families.some((e) => e.value === n)));
236
+ }
237
+ function he(e, t) {
238
+ let n = me(e, t);
239
+ return n ? T(n.families.map((e) => ({
240
+ fontFamily: e.value ?? n.typeface,
241
+ fontStyle: e.fontStyle || "normal",
242
+ fontWeight: String(e.fontWeight ?? 400),
243
+ src: ""
244
+ }))) : [];
245
+ }
246
+ //#endregion
247
+ //#region ../../packages/utils/src/form/form.ts
248
+ function ge(e) {
249
+ let t = new FormData(e), n = {};
250
+ return t.forEach((e, t) => {
251
+ if (Reflect.has(n, t)) {
252
+ let r = n[t];
253
+ Array.isArray(r) ? r.push(e) : n[t] = [n[t], e];
254
+ } else n[t] = e;
255
+ }), n;
256
+ }
257
+ function E(e) {
258
+ let n = [...e.getRootNode().querySelectorAll("*")], r = [...e.elements], i = t.get(e), a = i ? Array.from(i) : [];
259
+ return [...r, ...a].sort((e, t) => n.indexOf(e) < n.indexOf(t) ? -1 : +(n.indexOf(e) > n.indexOf(t)));
260
+ }
261
+ function _e(e) {
262
+ return E(e).some((e) => e.hasAttribute("data-user-valid") || e.hasAttribute("data-user-invalid"));
263
+ }
264
+ //#endregion
265
+ //#region ../../packages/utils/src/history-manager/history-manager.ts
266
+ var D = class {
267
+ constructor(e = null) {
268
+ this.history = e === null ? [] : [e], this.redoStack = [];
269
+ }
270
+ add(e) {
271
+ this.history.push(e), this.redoStack = [];
272
+ }
273
+ undo() {
274
+ if (this.history.length > 1) {
275
+ let e = this.history.pop();
276
+ return this.redoStack.push(e), this.getCurrent();
277
+ }
278
+ return null;
279
+ }
280
+ redo() {
281
+ if (this.redoStack.length > 0) {
282
+ let e = this.redoStack.pop();
283
+ return this.history.push(e), e;
284
+ }
285
+ return null;
286
+ }
287
+ getCurrent() {
288
+ return this.history[this.history.length - 1] || null;
289
+ }
290
+ clear() {
291
+ this.history = [], this.redoStack = [];
292
+ }
293
+ canUndo() {
294
+ return this.history.length > 1;
295
+ }
296
+ canRedo() {
297
+ return this.redoStack.length > 0;
298
+ }
299
+ getHistory() {
300
+ return [...this.history];
301
+ }
302
+ }, O = /* @__PURE__ */ function(e) {
303
+ return e.ArrowDown = "ArrowDown", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e.ArrowUp = "ArrowUp", e.Enter = "Enter", e.Escape = "Escape", e.Tab = "Tab", e;
304
+ }({});
305
+ //#endregion
306
+ //#region ../../packages/utils/src/object/object.ts
307
+ function k(e, t) {
308
+ let n = {}, r = new Set(t);
309
+ return Object.keys(e).forEach((t) => {
310
+ r.has(t) || (n[t] = e[t]);
311
+ }), n;
312
+ }
313
+ function A(e, t) {
314
+ let n = {};
315
+ return t.forEach((t) => {
316
+ t in e && (n[t] = e[t]);
317
+ }), n;
318
+ }
319
+ function j(e) {
320
+ if (!e) return {};
321
+ let t;
322
+ try {
323
+ t = JSON.parse(e);
324
+ } catch {
325
+ return {};
326
+ }
327
+ return typeof t == "object" ? t : {};
328
+ }
329
+ function M(e, t = !0) {
330
+ if (!e) return [];
331
+ let n;
332
+ try {
333
+ n = JSON.parse(e);
334
+ } catch {
335
+ return [];
336
+ }
337
+ return Array.isArray(n) ? t ? n.filter((e) => typeof e == "string") : n : [];
338
+ }
339
+ //#endregion
340
+ //#region ../../packages/utils/src/storage/storage.ts
341
+ function N(e, t) {
342
+ return typeof Storage < "u" && localStorage.getItem(e) !== null ? localStorage.getItem(e) : t;
343
+ }
344
+ function P(e, t) {
345
+ typeof Storage < "u" && localStorage.setItem(e, t.toString());
346
+ }
347
+ //#endregion
348
+ //#region ../../packages/utils/src/toast/toast.ts
349
+ var F = (e, t) => {
350
+ try {
351
+ window.Matrix3?.ShowNotification && window.Matrix3.ShowNotification(e, t ? { notificationType: t.notificationType } : void 0);
352
+ } catch {
353
+ return;
354
+ }
355
+ }, I = "__cxUseExpiringAssetUrls", L = "path_TR1", R = "path_TRX";
356
+ function z(e) {
357
+ return e ?? globalThis;
358
+ }
359
+ function ve(e) {
360
+ return !!e && i(e) === null && !r(e);
361
+ }
362
+ function ye(e, t) {
363
+ return !e || r(e) ? !1 : t ? i(e) !== null : ve(e);
364
+ }
365
+ function be(e, t) {
366
+ z(t)[I] = e === !0;
367
+ }
368
+ function B(e) {
369
+ return z(e)[I] === !0;
370
+ }
371
+ function xe(e) {
372
+ return !B(e);
373
+ }
374
+ function Se(e, t, n) {
375
+ if (n?.trim().toLowerCase().replace(/^\./, "") === "gif" && t && e.path_TRX) return R;
376
+ if (e.path_TR1) return L;
377
+ if (t && e.path_TRX) return R;
378
+ }
379
+ //#endregion
380
+ //#region ../../packages/utils/src/transformation/transformation.ts
381
+ var V = "/AssetLink/";
382
+ function H(e) {
383
+ return B() || i(e) !== null;
384
+ }
385
+ var Ce = {
386
+ [n.BottomCenter]: c.South,
387
+ [n.BottomLeft]: c.Southwest,
388
+ [n.BottomRight]: c.Southeast,
389
+ [n.CenterCenter]: c.Center,
390
+ [n.CenterLeft]: c.West,
391
+ [n.CenterRight]: c.East,
392
+ [n.TopCenter]: c.North,
393
+ [n.TopLeft]: c.Northwest,
394
+ [n.TopRight]: c.Northeast
395
+ }, U = "/t/", W = [
396
+ 400,
397
+ 800,
398
+ 1200,
399
+ 1600,
400
+ 2400
401
+ ];
402
+ function G({ asset: e, baseUrl: t, extension: n, options: r, parameters: i, transformations: a, useSession: c = "" }) {
403
+ if (t == null) return "";
404
+ let l = t, u = a?.findLast((e) => e.key === s.Quality);
405
+ if (u && (a = [...a?.filter((e) => e.key !== s.Quality) || [], u]), a) {
406
+ let e = [];
407
+ for (let t = 0; t < a.length; t++) {
408
+ let n = a[t];
409
+ if (n.key === s.Rotate) {
410
+ let r = n.value.rotation ?? 0;
411
+ for (; a[t + 1]?.key === s.Rotate;) t++, r += a[t].value.rotation ?? 0;
412
+ r !== 0 && e.push({
413
+ key: s.Rotate,
414
+ value: { rotation: r }
415
+ });
416
+ } else e.push(n);
417
+ }
418
+ a = e;
419
+ }
420
+ a && a.length > 0 && (l += "/t/"), a?.forEach(({ key: e, value: t }) => {
421
+ if (e === s.Resize) {
422
+ if (t.unit === o.AspectRatio && t.ratioWidth && t.ratioHeight) {
423
+ l += `re_ar_${t.ratioWidth}:${t.ratioHeight}/`;
424
+ return;
425
+ }
426
+ let e = [...[{
427
+ key: "re_w_",
428
+ value: Math.round(t.width ?? 0)
429
+ }, {
430
+ key: "re_h_",
431
+ value: Math.round(t.height ?? 0)
432
+ }].filter((e) => e.value !== void 0).map((e) => ({
433
+ key: e.key,
434
+ value: Math.round(Number(e.value))
435
+ })), {
436
+ key: "re_rm_",
437
+ value: "stretch"
438
+ }];
439
+ e.forEach(({ key: t, value: n }, r) => {
440
+ l += `${t}${n}${r < e.length - 1 ? "," : ""}`;
441
+ }), l += "/";
442
+ }
443
+ if (e === s.Crop) {
444
+ let e = t.unit === o.AspectRatio && !!t.ratioWidth && !!t.ratioHeight, n = !t.disabledSize && !e, i = n && (t.x !== void 0 || t.y !== void 0), a = [...[
445
+ {
446
+ key: "c_",
447
+ value: t.mode
448
+ },
449
+ ...e ? [{
450
+ key: "ar_",
451
+ value: `${t.ratioWidth}:${t.ratioHeight}`
452
+ }] : [],
453
+ ...n ? [
454
+ {
455
+ key: "c_w_",
456
+ value: Math.round(t.width ?? 0)
457
+ },
458
+ {
459
+ key: "c_h_",
460
+ value: Math.round(t.height ?? 0)
461
+ },
462
+ {
463
+ key: "c_x_",
464
+ value: Math.round(t.x ?? 0) === 0 && r?.omitZeroXY ? void 0 : Math.round(t.x ?? 0)
465
+ },
466
+ {
467
+ key: "c_y_",
468
+ value: Math.round(t.y ?? 0) === 0 && r?.omitZeroXY ? void 0 : Math.round(t.y ?? 0)
469
+ }
470
+ ] : [],
471
+ ...!i && t.focusMode && t.focusMode !== "manual" ? [{
472
+ key: t.isFocusModeAuto ? "acm_" : "c_g_",
473
+ value: t.focusMode
474
+ }] : [],
475
+ ...!i && t.focusMode === "manual" && t.position ? [{
476
+ key: "c_g_",
477
+ value: Ce[t.position]
478
+ }] : []
479
+ ].filter((e) => e.value !== void 0 && e.value !== null).map((e) => ({
480
+ key: e.key,
481
+ value: e.value
482
+ })), ...e ? [] : [{
483
+ key: "c_whu_",
484
+ value: "pixel"
485
+ }]];
486
+ a.forEach(({ key: e, value: t }, n) => {
487
+ let r = [
488
+ "c_w_",
489
+ "c_h_",
490
+ "c_x_",
491
+ "c_y_"
492
+ ].includes(e);
493
+ l += `${e}${r ? Math.round(Number(t)) : t}${n < a.length - 1 ? "," : ""}`;
494
+ }), l += "/";
495
+ }
496
+ if (e === s.Rotate && ([{
497
+ key: "r_a_",
498
+ value: t.rotation
499
+ }].filter((e) => e.value !== void 0).map((e) => ({
500
+ key: e.key,
501
+ value: Math.round(Number(e.value))
502
+ })).forEach(({ key: e, value: t }) => {
503
+ l += `${e}${t}`;
504
+ }), l += "/"), e === s.Quality) {
505
+ let e = [{
506
+ key: "q_level_",
507
+ value: t.quality
508
+ }].filter((e) => e.value !== void 0).map((e) => ({
509
+ key: e.key,
510
+ value: Math.round(Number(e.value))
511
+ }));
512
+ e.forEach(({ key: t, value: n }, r) => {
513
+ l += `${t}${n}${r < e.length - 1 ? "," : ""}`;
514
+ }), l += "/";
515
+ }
516
+ if (e === s.Metadata) {
517
+ let e = [{
518
+ key: "fl_keep_metadata",
519
+ value: t.keepMetadata
520
+ }].filter((e) => e.value !== void 0).map((e) => ({
521
+ key: e.key,
522
+ value: e.value
523
+ }));
524
+ e.forEach(({ key: t }, n) => {
525
+ l += `${t}${n < e.length - 1 ? "," : ""}`;
526
+ }), l += "/";
527
+ }
528
+ }), n && (l += `${e?.identifier ?? crypto.randomUUID()}${n}`);
529
+ let d = [];
530
+ return i && i.length > 0 && i.forEach(({ key: e, value: t }) => {
531
+ d.push(`${encodeURIComponent(e.trim())}=${encodeURIComponent(t.trim())}`);
532
+ }), t && c && d.push(`UseSession=${encodeURIComponent(c)}`), d.length > 0 && (l += `?${d.join("&")}`), l.endsWith("/") && (l = l.slice(0, -1)), l;
533
+ }
534
+ var K = ".auto";
535
+ function we(e) {
536
+ if (Array.isArray(e)) return e;
537
+ if (typeof e != "string" || !e) return [];
538
+ try {
539
+ let t = JSON.parse(e);
540
+ return Array.isArray(t) ? t : [];
541
+ } catch {
542
+ return [];
543
+ }
544
+ }
545
+ function Te(e, t, n = {}) {
546
+ let r = n.format === J && X(n.extension), i = !!n.autoFormat && !r;
547
+ if (!e || H(e) || !t?.length && !i) return e;
548
+ let a = t?.length ? G({
549
+ baseUrl: "",
550
+ transformations: t
551
+ }).replace(/\/t\//g, "") : "";
552
+ if (!a && !i) return e;
553
+ let o = e.indexOf(V);
554
+ if (o < 0) return a ? `${e}${U}${a}` : e;
555
+ let s = e.slice(0, o + 11), c = e.slice(o + 11);
556
+ if (!c) return e;
557
+ let l = c.indexOf(U), u = l >= 0, d = c.indexOf("/"), f = u ? l : d, p = f >= 0 ? c.slice(0, f) : c, m = u ? c.slice(l + 3) : d >= 0 ? c.slice(d + 1) : "", h = m.slice(m.lastIndexOf("/") + 1), g = h ? `${h.replace(/\.[^.]+$/, "")}${K}` : `${p.replace(/\.[^.]+$/, "")}${K}`, _ = [a, i ? g : u ? "" : h].filter(Boolean);
558
+ return _.length === 0 ? e : `${s}${p}${U}${_.join("/")}`;
559
+ }
560
+ function Ee(e) {
561
+ return `re_w_${Math.round(e)}`;
562
+ }
563
+ function q(e, t) {
564
+ if (!e || H(e) || !Number.isFinite(t) || t <= 0) return e;
565
+ let n = e.indexOf(V);
566
+ if (n < 0) return e;
567
+ let r = Ee(t), i = e.slice(0, n + 11), a = e.slice(n + 11), o = a.indexOf(U);
568
+ if (o >= 0) return `${i}${a.slice(0, o)}${U}${r}/${a.slice(o + 3)}`;
569
+ let s = a.indexOf("/");
570
+ return s >= 0 ? `${i}${a.slice(0, s)}${U}${r}${a.slice(s)}` : `${i}${a}${U}${r}`;
571
+ }
572
+ function De(e) {
573
+ let t = e.indexOf(V);
574
+ return t < 0 ? !1 : e.slice(t + 11).includes(U);
575
+ }
576
+ function Oe(e) {
577
+ let t = e.indexOf(V);
578
+ if (t < 0) return !1;
579
+ let n = e.slice(t + 11), r = n.indexOf(U);
580
+ return r < 0 ? !1 : n.slice(r + 3).includes("/");
581
+ }
582
+ var J = "TRX", ke = "TR1", Ae = /* @__PURE__ */ new Set([
583
+ "avif",
584
+ "bmp",
585
+ "gif",
586
+ "ico",
587
+ "jpeg",
588
+ "jpg",
589
+ "png",
590
+ "svg",
591
+ "webp"
592
+ ]);
593
+ function Y(e) {
594
+ if (!e) return "";
595
+ let t = e.trim().toLowerCase();
596
+ return t.startsWith(".") ? t.slice(1) : t;
597
+ }
598
+ function X(e) {
599
+ return Y(e) === "gif";
600
+ }
601
+ function je(e) {
602
+ return Y(e) === "svg";
603
+ }
604
+ var Me = 1048576e3, Ne = {
605
+ b: 1,
606
+ byte: 1,
607
+ bytes: 1,
608
+ gb: 1024 ** 3,
609
+ kb: 1024,
610
+ mb: 1024 ** 2,
611
+ tb: 1024 ** 4
612
+ };
613
+ function Z(e) {
614
+ if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : void 0;
615
+ if (!e) return;
616
+ let t = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(e);
617
+ if (!t) return;
618
+ let n = Number(t[1].replace(/,/g, ""));
619
+ if (!Number.isFinite(n) || n < 0) return;
620
+ let r = t[2].toLowerCase();
621
+ if (!r) return n;
622
+ let i = Ne[r];
623
+ return i === void 0 ? void 0 : n * i;
624
+ }
625
+ function Pe(e, t) {
626
+ if (e) return;
627
+ let n = typeof t == "number" ? t : Number(t ?? "");
628
+ return Number.isFinite(n) && n > 0 ? n : void 0;
629
+ }
630
+ function Fe(e, t) {
631
+ if (!Ae.has(Y(e))) return "TR1";
632
+ let n = Z(t);
633
+ return n !== void 0 && n > 1048576e3 ? "TR1" : J;
634
+ }
635
+ function Q(e, t = {}) {
636
+ if (H(e) || !e.includes(V) || Oe(e) || t.format === J && (X(t.extension) || je(t.extension))) return "";
637
+ let { maxWidth: n, widths: r = W } = t, i = [...r].filter((e) => Number.isFinite(e) && e > 0).sort((e, t) => e - t);
638
+ if (i.length === 0) return "";
639
+ let a = i;
640
+ if (n !== void 0 && Number.isFinite(n) && n > 0) {
641
+ let e = i.filter((e) => e <= n);
642
+ a = e.length > 0 ? e : [i[0]];
643
+ }
644
+ let o = n !== void 0 && Number.isFinite(n) && n > 0, s = (o ? a.filter((e) => n > e * 1.15) : a).map((t) => `${q(e, t)} ${t}w`);
645
+ return o && s.push(`${e} ${n}w`), s.join(", ");
646
+ }
647
+ function Ie(e, t = 100) {
648
+ return !Number.isFinite(e) || e <= 0 ? "" : `${Math.ceil(e / t) * t}px`;
649
+ }
650
+ //#endregion
651
+ //#region ../../packages/utils/src/video/video.ts
652
+ var Le = 10;
653
+ function Re(e, t) {
654
+ let n = 0, r = e.length;
655
+ for (; n < r;) {
656
+ let i = Math.floor((n + r) / 2);
657
+ e[i].time < t.time ? n = i + 1 : r = i;
658
+ }
659
+ e.splice(n, 0, t);
660
+ }
661
+ function $(e, t, n) {
662
+ return e.find((e) => e.col === t && e.row === n) ?? null;
663
+ }
664
+ function ze(e, t, n) {
665
+ return new Promise((r) => {
666
+ if (t > 0 && Math.abs(e.currentTime - t) < .001) {
667
+ r();
668
+ return;
669
+ }
670
+ if (t === 0) {
671
+ let t = () => {
672
+ e.removeEventListener("seeked", t);
673
+ let n = () => {
674
+ e.removeEventListener("seeked", n), r();
675
+ };
676
+ e.addEventListener("seeked", n), e.currentTime = 0;
677
+ };
678
+ e.addEventListener("seeked", t), e.currentTime = n;
679
+ } else {
680
+ let n = () => {
681
+ e.removeEventListener("seeked", n), r();
682
+ };
683
+ e.addEventListener("seeked", n), e.currentTime = t;
684
+ }
685
+ });
686
+ }
687
+ async function* Be({ cache: e, canvas: t, duration: n, maxInterval: r, src: i, video: a }) {
688
+ if (!t) throw Error("Canvas is required");
689
+ if (!a) throw Error("Video is required");
690
+ let { columns: o, frameHeight: s, frameWidth: c, rows: l, spriteCtx: u } = t;
691
+ try {
692
+ for (let t = 0; t < l; t++) for (let d = 0; d < o; d++) {
693
+ let f = t * o + d, p = f * r;
694
+ if (p >= n) continue;
695
+ let m = d * c, h = t * s, g = $(e[i] ?? [], d, t), _ = d === o - 1 && t === l - 1 || p + r >= n;
696
+ g ? yield {
697
+ ...g,
698
+ isLastFrame: _
699
+ } : (await ze(a, p, r), u.drawImage(a, m, h, c, s), yield {
700
+ col: d,
701
+ columns: o,
702
+ frameHeight: s,
703
+ frameWidth: c,
704
+ index: f,
705
+ isLastFrame: _,
706
+ row: t,
707
+ rows: l,
708
+ time: Number(p.toFixed(10)),
709
+ x: m,
710
+ y: h
711
+ }), await new Promise(requestAnimationFrame);
712
+ }
713
+ } catch {}
714
+ }
715
+ function Ve({ duration: e, frameWidth: t, playbackSpeed: n, scale: r }) {
716
+ let i = t * n / r;
717
+ return i > e && (i = e / 2), i;
718
+ }
719
+ //#endregion
720
+ export { ee as $, k as A, de as B, B as C, F as D, be as E, D as F, T as G, ue as H, E as I, le as J, w as K, _e as L, M, A as N, N as O, O as P, ae as Q, ge as R, ye as S, xe as T, fe as U, he as V, S as W, y as X, se as Y, oe as Z, we as _, Re as a, ie as at, R as b, Me as c, m as ct, q as d, f as dt, re as et, Q as f, p as ft, Z as g, De as h, Ve as i, te as it, j, P as k, W as l, u as lt, G as m, Be as n, v as nt, ke as o, h as ot, Ie as p, l as pt, C as q, $ as r, ne as rt, K as s, g as st, Le as t, _ as tt, Te as u, d as ut, Fe as v, Se as w, L as x, Pe as y, pe as z };