@orangelogic/design-system 3.6.0 → 3.8.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-link-format.Bj6HJXSZ.js → asset-link-format.B-tXtkr4.js} +804 -785
- package/library/chunks/{color-swatch-group.Bz2acokX.js → color-swatch-group.D1evXBSR.js} +1 -1
- package/library/chunks/{document-viewer.BZw451dy.js → document-viewer.C_3p-Fr2.js} +1 -1
- package/library/chunks/{index.Bf5ia_yC.js → index.B60ncEsL.js} +3 -3
- package/library/chunks/{transformation.CkwgrwKQ.js → transformation.DNl_AZs1.js} +128 -106
- package/library/chunks/{types.BjHMUzQj.js → types.CRoGmgCO.js} +8892 -8880
- package/library/components/asset-link-format.js +2 -2
- package/library/components/atoms.js +1 -1
- package/library/components/color-swatch-group.js +1 -1
- package/library/components/document-viewer.js +1 -1
- package/library/components/masonry.js +7 -7
- package/library/components/organisms.js +2 -2
- package/library/components/types.js +95 -93
- package/library/package.json +1 -1
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +2 -0
- package/library/packages/molecules/src/masonry/masonry.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +6 -0
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +5 -5
- package/library/packages/services/src/api/asset/asset.d.ts +1 -2
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +42 -7
- package/library/react-web-component.d.ts +2 -2
- package/library/utils.js +83 -81
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@ import "./form.C8LMdQB4.js";
|
|
|
48
48
|
import "./purify.es.BIuh5IAZ.js";
|
|
49
49
|
import { D as Yr, a as la, t as ha, b as Zr } from "./date-picker.BGHn6qg8.js";
|
|
50
50
|
import { D as Ti } from "./content-builder.BX4pHujE.js";
|
|
51
|
-
import "./transformation.
|
|
51
|
+
import "./transformation.DNl_AZs1.js";
|
|
52
52
|
import { s as P, h as $o, b as Ui, c as lo } from "./string.Demn8Xmk.js";
|
|
53
53
|
import { a as ca } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
54
54
|
import { d as da } from "./debounce.Bv1rtE8D.js";
|
|
@@ -25,7 +25,7 @@ import { w as watch } from "./watch.DJF5K-8U.js";
|
|
|
25
25
|
import "./date-picker.BGHn6qg8.js";
|
|
26
26
|
import { f as fetchCortexApi } from "./content-builder.BX4pHujE.js";
|
|
27
27
|
import "./unsafe-html.Dff7-rCx.js";
|
|
28
|
-
import "./transformation.
|
|
28
|
+
import "./transformation.DNl_AZs1.js";
|
|
29
29
|
import { r as reactExports, a as React, j as jsxRuntimeExports, w, R as ReactDOM } from "./jsx-runtime.CTpPVMxj.js";
|
|
30
30
|
import { a as getDefaultExportFromCjs, c as commonjsGlobal } from "./_commonjsHelpers.DQNKXVTB.js";
|
|
31
31
|
import { r as require$$0 } from "./___vite-browser-external_commonjs-proxy.C2tf3HsQ.js";
|
|
@@ -13,7 +13,7 @@ import { b as Ke } from "./_baseIteratee.sC2wLi2m.js";
|
|
|
13
13
|
import { a as c1 } from "./toString.B1zKIiZc.js";
|
|
14
14
|
import { b as d1 } from "./cloneDeep.tKGbEwzn.js";
|
|
15
15
|
import { c as s1 } from "./_baseClone.ipmFlCAx.js";
|
|
16
|
-
import { I as je, C as Ve, a as o1, b as He, S as z, D as h1, c as l1, A as _e, g as g1, i as C1, F as y1, d as x1, t as b1, e as k1, f as p1, h as u1, j as f1, k as A1, l as B1, m as D1, n as F1, o as E1, p as v1, q as $1, r as w1, O as S1 } from "./types.
|
|
16
|
+
import { I as je, C as Ve, a as o1, b as He, S as z, D as h1, c as l1, A as _e, g as g1, i as C1, F as y1, d as x1, t as b1, e as k1, f as p1, h as u1, j as f1, k as A1, l as B1, m as D1, n as F1, o as E1, p as v1, q as $1, r as w1, O as S1 } from "./types.CRoGmgCO.js";
|
|
17
17
|
import { C as ce } from "./button.w0zH5Ivx.js";
|
|
18
18
|
import I1 from "../components/button-group.js";
|
|
19
19
|
import _1 from "../components/card.js";
|
|
@@ -59,11 +59,11 @@ import { n as $ } from "./when.Dr1es41R.js";
|
|
|
59
59
|
import { a as l0 } from "./_baseXor.DixEm6JQ.js";
|
|
60
60
|
import { a as g0, i as qe, b as C0 } from "./isArrayLikeObject.D7afXo-f.js";
|
|
61
61
|
import { i as y0 } from "./isEmpty.DtTJTUcf.js";
|
|
62
|
-
import { a as Ae, F as x0, b as b0, c as Le, d as Oe, i as k0, e as Ge, u as Be } from "./asset-link-format.
|
|
62
|
+
import { a as Ae, F as x0, b as b0, c as Le, d as Oe, i as k0, e as Ge, u as Be } from "./asset-link-format.B-tXtkr4.js";
|
|
63
63
|
import p0 from "../components/color-picker.js";
|
|
64
64
|
import { C as Ie } from "./icon-button.BWJ1Vqn5.js";
|
|
65
65
|
import u0 from "../components/spinner.js";
|
|
66
|
-
import { a as f0, d as A0 } from "./color-swatch-group.
|
|
66
|
+
import { a as f0, d as A0 } from "./color-swatch-group.D1evXBSR.js";
|
|
67
67
|
import { c as ne, C as me, p as B0, a as D0, b as F0, g as ye } from "./color.LzSGBy7o.js";
|
|
68
68
|
import { o as e1 } from "./map.D8heArFD.js";
|
|
69
69
|
import { v as a1 } from "./v4.CKZ6klMF.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { P as
|
|
3
|
-
const
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
},
|
|
14
|
-
function
|
|
1
|
+
import { C as y, T as $, U as A } from "./asset-link-format.ClaYu_v8.js";
|
|
2
|
+
import { P as g } from "./position-picker.DjnhxIKF.js";
|
|
3
|
+
const _ = "/AssetLink/", E = {
|
|
4
|
+
[g.BottomCenter]: y.South,
|
|
5
|
+
[g.BottomLeft]: y.Southwest,
|
|
6
|
+
[g.BottomRight]: y.Southeast,
|
|
7
|
+
[g.CenterCenter]: y.Center,
|
|
8
|
+
[g.CenterLeft]: y.West,
|
|
9
|
+
[g.CenterRight]: y.East,
|
|
10
|
+
[g.TopCenter]: y.North,
|
|
11
|
+
[g.TopLeft]: y.Northwest,
|
|
12
|
+
[g.TopRight]: y.Northeast
|
|
13
|
+
}, p = "/t/", S = [400, 800, 1200, 1600, 2400], F = 0.15;
|
|
14
|
+
function C({
|
|
15
15
|
asset: t,
|
|
16
16
|
baseUrl: n,
|
|
17
17
|
extension: i,
|
|
18
|
-
options:
|
|
19
|
-
parameters:
|
|
18
|
+
options: f,
|
|
19
|
+
parameters: c,
|
|
20
20
|
transformations: r,
|
|
21
21
|
useSession: l = ""
|
|
22
22
|
}) {
|
|
@@ -24,34 +24,34 @@ function O({
|
|
|
24
24
|
return "";
|
|
25
25
|
let s = n;
|
|
26
26
|
const h = r?.findLast(
|
|
27
|
-
(
|
|
27
|
+
(u) => u.key === $.Quality
|
|
28
28
|
);
|
|
29
29
|
if (h && (r = [
|
|
30
30
|
...r?.filter(
|
|
31
|
-
(
|
|
31
|
+
(u) => u.key !== $.Quality
|
|
32
32
|
) || [],
|
|
33
33
|
h
|
|
34
34
|
]), r) {
|
|
35
|
-
const
|
|
35
|
+
const u = [];
|
|
36
36
|
for (let e = 0; e < r.length; e++) {
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
let o =
|
|
40
|
-
for (; r[e + 1]?.key ===
|
|
37
|
+
const d = r[e];
|
|
38
|
+
if (d.key === $.Rotate) {
|
|
39
|
+
let o = d.value.rotation ?? 0;
|
|
40
|
+
for (; r[e + 1]?.key === $.Rotate; )
|
|
41
41
|
e++, o += r[e].value.rotation ?? 0;
|
|
42
|
-
o !== 0 &&
|
|
42
|
+
o !== 0 && u.push({ key: $.Rotate, value: { rotation: o } });
|
|
43
43
|
} else
|
|
44
|
-
|
|
44
|
+
u.push(d);
|
|
45
45
|
}
|
|
46
|
-
r =
|
|
46
|
+
r = u;
|
|
47
47
|
}
|
|
48
|
-
r && r.length > 0 && (s += "/t/"), r?.forEach(({ key:
|
|
49
|
-
if (
|
|
50
|
-
if (e.unit ===
|
|
48
|
+
r && r.length > 0 && (s += "/t/"), r?.forEach(({ key: u, value: e }) => {
|
|
49
|
+
if (u === $.Resize) {
|
|
50
|
+
if (e.unit === A.AspectRatio && e.ratioWidth && e.ratioHeight) {
|
|
51
51
|
s += `re_ar_${e.ratioWidth}:${e.ratioHeight}/`;
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const d = [
|
|
55
55
|
...[
|
|
56
56
|
{
|
|
57
57
|
key: "re_w_",
|
|
@@ -70,18 +70,18 @@ function O({
|
|
|
70
70
|
value: "stretch"
|
|
71
71
|
}
|
|
72
72
|
];
|
|
73
|
-
|
|
74
|
-
s += `${o}${
|
|
73
|
+
d.forEach(({ key: o, value: m }, k) => {
|
|
74
|
+
s += `${o}${m}${k < d.length - 1 ? "," : ""}`;
|
|
75
75
|
}), s += "/";
|
|
76
76
|
}
|
|
77
|
-
if (
|
|
78
|
-
const
|
|
77
|
+
if (u === $.Crop) {
|
|
78
|
+
const d = e.unit === A.AspectRatio && !!e.ratioWidth && !!e.ratioHeight, o = !e.disabledSize && !d, m = o && (e.x !== void 0 || e.y !== void 0), k = [
|
|
79
79
|
...[
|
|
80
80
|
{
|
|
81
81
|
key: "c_",
|
|
82
82
|
value: e.mode
|
|
83
83
|
},
|
|
84
|
-
...
|
|
84
|
+
...d ? [
|
|
85
85
|
{
|
|
86
86
|
key: "ar_",
|
|
87
87
|
value: `${e.ratioWidth}:${e.ratioHeight}`
|
|
@@ -98,42 +98,42 @@ function O({
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
key: "c_x_",
|
|
101
|
-
value: Math.round(e.x ?? 0) === 0 &&
|
|
101
|
+
value: Math.round(e.x ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.x ?? 0)
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
key: "c_y_",
|
|
105
|
-
value: Math.round(e.y ?? 0) === 0 &&
|
|
105
|
+
value: Math.round(e.y ?? 0) === 0 && f?.omitZeroXY ? void 0 : Math.round(e.y ?? 0)
|
|
106
106
|
}
|
|
107
107
|
] : [],
|
|
108
|
-
...!
|
|
108
|
+
...!m && e.focusMode && e.focusMode !== "manual" ? [
|
|
109
109
|
{
|
|
110
110
|
key: e.isFocusModeAuto ? "acm_" : "c_g_",
|
|
111
111
|
value: e.focusMode
|
|
112
112
|
}
|
|
113
113
|
] : [],
|
|
114
|
-
...!
|
|
114
|
+
...!m && e.focusMode === "manual" && e.position ? [
|
|
115
115
|
{
|
|
116
116
|
key: "c_g_",
|
|
117
|
-
value:
|
|
117
|
+
value: E[e.position]
|
|
118
118
|
}
|
|
119
119
|
] : []
|
|
120
120
|
].filter((T) => T.value !== void 0 && T.value !== null).map((T) => ({
|
|
121
121
|
key: T.key,
|
|
122
122
|
value: T.value
|
|
123
123
|
})),
|
|
124
|
-
...
|
|
124
|
+
...d ? [] : [
|
|
125
125
|
{
|
|
126
126
|
key: "c_whu_",
|
|
127
127
|
value: "pixel"
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
];
|
|
131
|
-
k.forEach(({ key: T, value:
|
|
132
|
-
const
|
|
133
|
-
s += `${T}${
|
|
131
|
+
k.forEach(({ key: T, value: R }, N) => {
|
|
132
|
+
const O = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(T);
|
|
133
|
+
s += `${T}${O ? Math.round(Number(R)) : R}${N < k.length - 1 ? "," : ""}`;
|
|
134
134
|
}), s += "/";
|
|
135
135
|
}
|
|
136
|
-
if (
|
|
136
|
+
if (u === $.Rotate && ([
|
|
137
137
|
{
|
|
138
138
|
key: "r_a_",
|
|
139
139
|
value: e.rotation
|
|
@@ -141,10 +141,10 @@ function O({
|
|
|
141
141
|
].filter((o) => o.value !== void 0).map((o) => ({
|
|
142
142
|
key: o.key,
|
|
143
143
|
value: Math.round(Number(o.value))
|
|
144
|
-
})).forEach(({ key: o, value:
|
|
145
|
-
s += `${o}${
|
|
146
|
-
}), s += "/"),
|
|
147
|
-
const
|
|
144
|
+
})).forEach(({ key: o, value: m }) => {
|
|
145
|
+
s += `${o}${m}`;
|
|
146
|
+
}), s += "/"), u === $.Quality) {
|
|
147
|
+
const d = [
|
|
148
148
|
{
|
|
149
149
|
key: "q_level_",
|
|
150
150
|
value: e.quality
|
|
@@ -153,91 +153,103 @@ function O({
|
|
|
153
153
|
key: o.key,
|
|
154
154
|
value: Math.round(Number(o.value))
|
|
155
155
|
}));
|
|
156
|
-
|
|
157
|
-
s += `${o}${
|
|
156
|
+
d.forEach(({ key: o, value: m }, k) => {
|
|
157
|
+
s += `${o}${m}${k < d.length - 1 ? "," : ""}`;
|
|
158
158
|
}), s += "/";
|
|
159
159
|
}
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
160
|
+
if (u === $.Metadata) {
|
|
161
|
+
const d = [
|
|
162
162
|
{
|
|
163
163
|
key: "fl_keep_metadata",
|
|
164
164
|
value: e.keepMetadata
|
|
165
165
|
}
|
|
166
166
|
].filter((o) => o.value !== void 0).map((o) => ({ key: o.key, value: o.value }));
|
|
167
|
-
|
|
168
|
-
s += `${o}${
|
|
167
|
+
d.forEach(({ key: o }, m) => {
|
|
168
|
+
s += `${o}${m < d.length - 1 ? "," : ""}`;
|
|
169
169
|
}), s += "/";
|
|
170
170
|
}
|
|
171
171
|
}), i && (s += `${t?.identifier ?? crypto.randomUUID()}${i}`);
|
|
172
172
|
const a = [];
|
|
173
|
-
return
|
|
173
|
+
return c && c.length > 0 && c.forEach(({ key: u, value: e }) => {
|
|
174
174
|
a.push(
|
|
175
|
-
`${encodeURIComponent(
|
|
175
|
+
`${encodeURIComponent(u.trim())}=${encodeURIComponent(e.trim())}`
|
|
176
176
|
);
|
|
177
177
|
}), n && l && a.push(`UseSession=${encodeURIComponent(l)}`), a.length > 0 && (s += `?${a.join("&")}`), s.endsWith("/") && (s = s.slice(0, -1)), s;
|
|
178
178
|
}
|
|
179
179
|
function z(t, n) {
|
|
180
180
|
if (!t || !n?.length)
|
|
181
181
|
return t;
|
|
182
|
-
const i =
|
|
182
|
+
const i = C({ baseUrl: "", transformations: n }).replace(
|
|
183
183
|
/\/t\//g,
|
|
184
184
|
""
|
|
185
185
|
);
|
|
186
186
|
if (!i)
|
|
187
187
|
return t;
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
188
|
+
const f = t.indexOf(_);
|
|
189
|
+
if (f < 0)
|
|
190
190
|
return `${t}/t/${i}`;
|
|
191
|
-
const
|
|
191
|
+
const c = t.slice(0, f + _.length), r = t.slice(f + _.length), l = r.indexOf("/t/");
|
|
192
192
|
if (l >= 0) {
|
|
193
193
|
const h = r.slice(0, l);
|
|
194
|
-
return `${
|
|
194
|
+
return `${c}${h}/t/${i}`;
|
|
195
195
|
}
|
|
196
196
|
const s = r.indexOf("/");
|
|
197
197
|
if (s >= 0) {
|
|
198
198
|
const h = r.slice(0, s), a = r.slice(s);
|
|
199
|
-
return `${
|
|
199
|
+
return `${c}${h}/t/${i}${a}`;
|
|
200
200
|
}
|
|
201
201
|
return `${t}/t/${i}`;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function W(t) {
|
|
204
204
|
return `re_w_${Math.round(t)}`;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function w(t, n) {
|
|
207
207
|
if (!t || !Number.isFinite(n) || n <= 0)
|
|
208
208
|
return t;
|
|
209
|
-
const i = t.indexOf(
|
|
209
|
+
const i = t.indexOf(_);
|
|
210
210
|
if (i < 0)
|
|
211
211
|
return t;
|
|
212
|
-
const
|
|
212
|
+
const f = W(n), c = t.slice(0, i + _.length), r = t.slice(i + _.length), l = r.indexOf(p);
|
|
213
213
|
if (l >= 0) {
|
|
214
214
|
const h = r.slice(0, l), a = r.slice(
|
|
215
|
-
l +
|
|
215
|
+
l + p.length
|
|
216
216
|
);
|
|
217
|
-
return `${
|
|
217
|
+
return `${c}${h}${p}${f}/${a}`;
|
|
218
218
|
}
|
|
219
219
|
const s = r.indexOf("/");
|
|
220
220
|
if (s >= 0) {
|
|
221
221
|
const h = r.slice(0, s), a = r.slice(s);
|
|
222
|
-
return `${
|
|
222
|
+
return `${c}${h}${p}${f}${a}`;
|
|
223
223
|
}
|
|
224
|
-
return `${
|
|
224
|
+
return `${c}${r}${p}${f}`;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
const n = t.indexOf(
|
|
228
|
-
return n < 0 ? !1 : t.slice(n +
|
|
226
|
+
function L(t) {
|
|
227
|
+
const n = t.indexOf(_);
|
|
228
|
+
return n < 0 ? !1 : t.slice(n + _.length).includes(p);
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
|
|
230
|
+
const v = "TRX", M = "TR1", U = /* @__PURE__ */ new Set([
|
|
231
|
+
"avif",
|
|
232
|
+
"bmp",
|
|
233
|
+
"gif",
|
|
234
|
+
"ico",
|
|
235
|
+
"jpeg",
|
|
236
|
+
"jpg",
|
|
237
|
+
"png",
|
|
238
|
+
"svg",
|
|
239
|
+
"tif",
|
|
240
|
+
"tiff",
|
|
241
|
+
"webp"
|
|
242
|
+
]);
|
|
243
|
+
function I(t) {
|
|
232
244
|
if (!t)
|
|
233
245
|
return "";
|
|
234
246
|
const n = t.trim().toLowerCase();
|
|
235
247
|
return n.startsWith(".") ? n.slice(1) : n;
|
|
236
248
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
249
|
+
function b(t) {
|
|
250
|
+
return I(t) === "gif";
|
|
239
251
|
}
|
|
240
|
-
const
|
|
252
|
+
const G = 1e3 * 1024 * 1024, B = {
|
|
241
253
|
b: 1,
|
|
242
254
|
byte: 1,
|
|
243
255
|
bytes: 1,
|
|
@@ -246,7 +258,7 @@ const U = 10 * 1024 * 1024, B = {
|
|
|
246
258
|
mb: 1024 ** 2,
|
|
247
259
|
tb: 1024 ** 4
|
|
248
260
|
};
|
|
249
|
-
function
|
|
261
|
+
function K(t) {
|
|
250
262
|
if (typeof t == "number")
|
|
251
263
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
252
264
|
if (!t)
|
|
@@ -257,11 +269,11 @@ function G(t) {
|
|
|
257
269
|
const i = Number(n[1].replace(/,/g, ""));
|
|
258
270
|
if (!Number.isFinite(i) || i < 0)
|
|
259
271
|
return;
|
|
260
|
-
const
|
|
261
|
-
if (!
|
|
272
|
+
const f = n[2].toLowerCase();
|
|
273
|
+
if (!f)
|
|
262
274
|
return i;
|
|
263
|
-
const
|
|
264
|
-
return
|
|
275
|
+
const c = B[f];
|
|
276
|
+
return c === void 0 ? void 0 : i * c;
|
|
265
277
|
}
|
|
266
278
|
function D(t, n) {
|
|
267
279
|
if (t)
|
|
@@ -269,44 +281,54 @@ function D(t, n) {
|
|
|
269
281
|
const i = typeof n == "number" ? n : Number(n ?? "");
|
|
270
282
|
return Number.isFinite(i) && i > 0 ? i : void 0;
|
|
271
283
|
}
|
|
272
|
-
function
|
|
273
|
-
if (!
|
|
284
|
+
function Y(t, n) {
|
|
285
|
+
if (!U.has(I(t)))
|
|
274
286
|
return M;
|
|
275
|
-
const i =
|
|
276
|
-
return i !== void 0 && i >
|
|
287
|
+
const i = K(n);
|
|
288
|
+
return i !== void 0 && i > G ? M : v;
|
|
289
|
+
}
|
|
290
|
+
const x = ".auto";
|
|
291
|
+
function j(t, n = {}) {
|
|
292
|
+
const i = t ? t.indexOf(_) : -1;
|
|
293
|
+
if (i < 0 || n.format === v && b(n.extension))
|
|
294
|
+
return t;
|
|
295
|
+
const f = t.slice(i + _.length), c = f.slice(f.lastIndexOf("/") + 1);
|
|
296
|
+
return c === "" || c.endsWith(x) ? t : `${t}${x}`;
|
|
277
297
|
}
|
|
278
|
-
function
|
|
279
|
-
if (!t.includes(
|
|
298
|
+
function H(t, n = {}) {
|
|
299
|
+
if (!t.includes(_) || L(t) || n.format === v && b(n.extension))
|
|
280
300
|
return "";
|
|
281
|
-
const { maxWidth: i, widths:
|
|
282
|
-
if (
|
|
301
|
+
const { maxWidth: i, widths: f = S } = n, c = [...f].filter((a) => Number.isFinite(a) && a > 0).sort((a, u) => a - u);
|
|
302
|
+
if (c.length === 0)
|
|
283
303
|
return "";
|
|
284
|
-
let r =
|
|
304
|
+
let r = c;
|
|
285
305
|
if (i !== void 0 && Number.isFinite(i) && i > 0) {
|
|
286
|
-
const a =
|
|
287
|
-
r = a.length > 0 ? a : [
|
|
306
|
+
const a = c.filter((u) => u <= i);
|
|
307
|
+
r = a.length > 0 ? a : [c[0]];
|
|
288
308
|
}
|
|
289
309
|
const l = i !== void 0 && Number.isFinite(i) && i > 0, h = (l ? r.filter(
|
|
290
|
-
(a) => i > a * (1 +
|
|
310
|
+
(a) => i > a * (1 + F)
|
|
291
311
|
) : r).map(
|
|
292
|
-
(a) => `${
|
|
312
|
+
(a) => `${w(t, a)} ${a}w`
|
|
293
313
|
);
|
|
294
314
|
return l && h.push(`${t} ${i}w`), h.join(", ");
|
|
295
315
|
}
|
|
296
|
-
function
|
|
316
|
+
function Q(t, n = 100) {
|
|
297
317
|
return !Number.isFinite(t) || t <= 0 ? "" : `${Math.ceil(t / n) * n}px`;
|
|
298
318
|
}
|
|
299
319
|
export {
|
|
300
320
|
M as A,
|
|
301
321
|
S,
|
|
302
322
|
D as a,
|
|
303
|
-
|
|
323
|
+
H as b,
|
|
304
324
|
z as c,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
G as
|
|
311
|
-
|
|
325
|
+
j as d,
|
|
326
|
+
C as e,
|
|
327
|
+
Q as f,
|
|
328
|
+
w as g,
|
|
329
|
+
L as h,
|
|
330
|
+
G as i,
|
|
331
|
+
x as j,
|
|
332
|
+
K as p,
|
|
333
|
+
Y as r
|
|
312
334
|
};
|