@bynder/compact-view 5.2.3 → 5.2.4
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/AccessToken2.js +1 -1
- package/ActiveFilters.js +49 -50
- package/AddMedia.js +19 -18
- package/Advanced.js +13 -13
- package/App.js +60 -59
- package/Arrow.js +1 -1
- package/AssetFilter.js +38 -38
- package/AssetItem.js +10 -17
- package/AssetList.js +5 -5
- package/AssetTypeItem.js +21 -21
- package/AssetsView.js +13 -13
- package/Axios2.js +82 -76
- package/AxiosError.js +36 -35
- package/ButtonAction.js +1 -1
- package/CanceledError.js +15 -8
- package/Card.js +1 -1
- package/Chip.js +1 -1
- package/CollectionCard.js +22 -22
- package/CollectionItem.js +9 -9
- package/CollectionList.js +5 -5
- package/CollectionView.js +11 -11
- package/ColorPicker.js +1 -1
- package/ColorPickerSolid.js +3 -3
- package/ColorPickerWithOpacity.js +3 -3
- package/Component.js +158 -0
- package/Component2.js +4 -0
- package/ConfigContext.js +7 -8
- package/Container.js +1 -1
- package/ContextAction.js +1 -1
- package/ControlGroup.js +6 -6
- package/Dat.js +33 -32
- package/DatDropdownItem.js +1 -1
- package/DesignSystemProvider.js +7 -7
- package/DirectionSelect.js +11 -10
- package/DomainInput.js +19 -11
- package/Draggable.js +337 -0
- package/Draggable2.js +4 -0
- package/DraggableCore.js +312 -0
- package/DraggableCore2.js +4 -0
- package/Dropdown.js +37 -37
- package/Dropdown2.js +1 -1
- package/DropdownListItem.js +1 -1
- package/FieldSelect.js +19 -17
- package/FileSelector.js +38 -37
- package/FontPicker.js +1 -1
- package/Form.js +1 -1
- package/Header.js +5 -4
- package/HttpStatusCode.js +7 -1
- package/InfiniteScroll.js +1 -1
- package/InlineBanner.js +1 -1
- package/Input.js +1 -1
- package/InterceptorManager.js +2 -1
- package/Item.js +8 -8
- package/Item4.js +2 -2
- package/LeftArrow.js +1 -1
- package/ListItem2.js +1 -1
- package/ModalBase.js +15 -15
- package/NoResults.js +1 -1
- package/Option_new.js +36 -29
- package/ReactPropTypesSecret.js +10 -0
- package/RightArrow.js +1 -1
- package/SearchInput.js +1 -1
- package/SearchInput2.js +1 -1
- package/SelectionFooter.js +41 -31
- package/Shield.js +2 -2
- package/Smartfilters_new.js +107 -98
- package/StatefulAssetList.js +50 -50
- package/StoreInitializer.js +32 -16
- package/SwitchNLS.js +1 -1
- package/TagItem.js +15 -15
- package/Tags.js +1 -1
- package/Toolbar.js +23 -20
- package/Tooltip2.js +1 -1
- package/ViewSwitch.js +17 -15
- package/_commonjsHelpers.js +28 -3
- package/adapters.js +54 -42
- package/api/filterAssets.d.ts +1 -1
- package/api/getAssets.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/rest/index.d.ts +1 -1
- package/api/rest/types.d.ts +1 -1
- package/api2.js +1 -1
- package/asset.type.js +1 -1
- package/autocomplete.js +1 -1
- package/axios.js +1 -1
- package/bodyScrollLock.esm.js +68 -0
- package/buildURL.js +13 -15
- package/checkGlobals.js +1 -1
- package/cjs.js +7 -0
- package/cjs2.js +15 -0
- package/cjs3.js +4 -0
- package/clsx.m.js +6 -0
- package/clsx.m2.js +15 -0
- package/combineMetaproperties.js +3 -1
- package/composeSignals.js +1 -1
- package/cookieStore.js +1 -1
- package/cookies.js +13 -11
- package/currentScopes.js +1 -1
- package/data.js +1 -1
- package/devUtils.js +1 -1
- package/dispatchRequest.js +5 -5
- package/domFns.js +151 -0
- package/domFns2.js +4 -0
- package/factoryWithThrowingShims.js +52 -0
- package/fetch2.js +156 -128
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filterAssets.js +1 -1
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +1 -1
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- package/getSimilarityAssets.js +1 -1
- package/goober.modern.js +75 -0
- package/handlers.js +1 -1
- package/iconBase.js +56 -0
- package/iconContext.js +12 -0
- package/iconsManifest.js +222 -0
- package/index-esm.js +1 -4
- package/index.browser.js +1 -1
- package/index.m.js +9 -0
- package/index.m2.js +17 -0
- package/index10.js +18 -2
- package/index11.js +181 -15
- package/index112.js +1 -1
- package/index12.js +313 -36
- package/index13.js +5 -2430
- package/index14.js +3 -557
- package/index15.js +15 -55
- package/index16.js +3 -2
- package/index17.js +3 -87
- package/index18.js +36 -60
- package/index19.js +3 -7
- package/index20.js +2429 -12
- package/index21.js +557 -10
- package/index22.js +1 -1
- package/index23.js +119 -6
- package/index24.js +39 -7
- package/index25.js +2 -5
- package/index26.js +86 -9
- package/index27.js +55 -8
- package/index28.js +6 -636
- package/index29.js +8692 -74
- package/index3.js +1684 -5
- package/index30.js +2 -5
- package/index31.js +4 -20
- package/index310.js +2 -0
- package/index32.js +11 -2
- package/index33.js +5083 -4
- package/index34.js +2 -18
- package/index35.js +59 -5
- package/index36.js +2 -2
- package/index37.js +13 -11
- package/index38.js +46 -10
- package/index39.js +6 -12
- package/index4.js +5 -1684
- package/index40.js +8 -11
- package/index41.js +26 -18
- package/index42.js +2 -64
- package/index43.js +63 -5
- package/index44.js +9 -55
- package/index45.js +7 -67
- package/index46.js +8 -31
- package/index47.js +5 -11
- package/index48.js +10 -121
- package/index49.js +9 -86
- package/index5.js +215 -23
- package/index50.js +636 -7
- package/index51.js +74 -11
- package/index52.js +4 -13
- package/index53.js +19 -13
- package/index54.js +4 -6
- package/index55.js +18 -7
- package/index56.js +5 -14
- package/index57.js +10 -28
- package/index58.js +10 -15
- package/index59.js +15 -0
- package/index6.js +250 -299
- package/index60.js +13 -0
- package/index61.js +21 -0
- package/index62.js +8 -0
- package/index63.js +57 -0
- package/index64.js +4 -0
- package/index65.js +69 -0
- package/index66.js +33 -0
- package/index67.js +13 -0
- package/index68.js +123 -0
- package/index69.js +88 -0
- package/index7.js +22 -5047
- package/index70.js +10 -0
- package/index71.js +13 -0
- package/index72.js +13 -225
- package/index73.js +16 -0
- package/index74.js +9 -0
- package/index75.js +228 -0
- package/index76.js +9 -0
- package/index77.js +17 -0
- package/index78.js +31 -0
- package/index79.js +18 -0
- package/index8.js +5044 -47
- package/index9.js +50 -15
- package/isAbsoluteURL.js +1 -1
- package/isURLSameOrigin.js +1 -1
- package/localization.js +15 -15
- package/log.js +14 -0
- package/log2.js +4 -0
- package/matchRequestUrl.js +1 -1
- package/mergeConfig.js +37 -32
- package/notify.js +2 -2
- package/package.json +1 -1
- package/positionFns.js +101 -0
- package/positionFns2.js +4 -0
- package/react-laag.esm.js +957 -0
- package/react.js +8 -8
- package/react2.js +9 -9
- package/resolveConfig.js +23 -23
- package/select/add-media/AddMedia.d.ts +3 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/shims.js +29 -0
- package/shims2.js +4 -0
- package/store/StoreInitializer.d.ts +5 -1
- package/store/useAssetFilterStore.d.ts +55 -0
- package/store/useSelectionStore.d.ts +47 -0
- package/styled-components.browser.esm.js +2 -2
- package/throttle.js +1 -1
- package/toURLEncodedForm.js +11 -10
- package/tokenExpirationHelper.js +1 -1
- package/transformData.js +1 -1
- package/transitional.js +4 -3
- package/useAssetFilterStore.js +152 -0
- package/useDatStore.js +1 -1
- package/useEffectEvent.js +7 -7
- package/useFonts.js +2 -2
- package/useOrderingStore.js +1 -1
- package/useRouterStore.js +1 -1
- package/useSearchStore.js +1 -1
- package/useSelectionStore.js +131 -0
- package/useSimilaritySearchStore.js +1 -1
- package/useTranslate.js +1 -1
- package/utils/combineMetaproperties.d.ts +2 -0
- package/utils6.js +160 -118
- package/utils7.js +7 -68
- package/utils8.js +68 -7
- package/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/SelectionContext.js +0 -143
- package/select/SelectionContext.d.ts +0 -30
- /package/{Middleware.js → Middleware2.js} +0 -0
- /package/{middleware2.js → middleware.js} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { useState as v, useEffect as S } from "react";
|
|
2
|
+
import { devtools as g } from "./middleware.js";
|
|
3
|
+
import { useConfig as I, useSelectionMode as y } from "./ConfigContext.js";
|
|
4
|
+
import { useAuth as M } from "./LoginContext.js";
|
|
5
|
+
import { getAssetsByMediaId as P } from "./filterAssets.js";
|
|
6
|
+
import { isErr as h } from "./result.type.js";
|
|
7
|
+
import { convertAssetIdToBase64 as C } from "./base64Converter.js";
|
|
8
|
+
import { create as T } from "./react.js";
|
|
9
|
+
function a(t, o) {
|
|
10
|
+
return t.some((e) => e.value.id === o.id);
|
|
11
|
+
}
|
|
12
|
+
const f = T()(
|
|
13
|
+
g(
|
|
14
|
+
(t, o) => ({
|
|
15
|
+
selection: [],
|
|
16
|
+
preselectedAssetIds: [],
|
|
17
|
+
allAssetsStore: [],
|
|
18
|
+
setPreselectedAssetIds: (e) => t({ preselectedAssetIds: e }),
|
|
19
|
+
clear: () => t({ selection: [] }),
|
|
20
|
+
setAllAssets: (e) => {
|
|
21
|
+
e.tag === "Loaded" && e.value && t({ allAssetsStore: e.value });
|
|
22
|
+
},
|
|
23
|
+
selectAll: () => {
|
|
24
|
+
const { selection: e, allAssetsStore: s } = o(), c = s.filter(
|
|
25
|
+
(l) => !e.some((n) => n.value.id === l.id)
|
|
26
|
+
);
|
|
27
|
+
t({
|
|
28
|
+
selection: [
|
|
29
|
+
...e,
|
|
30
|
+
...c.map((l) => ({
|
|
31
|
+
type: "asset",
|
|
32
|
+
value: l
|
|
33
|
+
}))
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
selectAssets: (e) => {
|
|
38
|
+
const s = o().selection, c = e.filter(
|
|
39
|
+
(l) => !a(s, l)
|
|
40
|
+
);
|
|
41
|
+
t({
|
|
42
|
+
selection: [
|
|
43
|
+
...s,
|
|
44
|
+
...c.map((l) => ({
|
|
45
|
+
type: "asset",
|
|
46
|
+
value: l
|
|
47
|
+
}))
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
toggleAssets: (e) => {
|
|
52
|
+
const s = o().selection, c = e.filter(
|
|
53
|
+
(i) => !a(s, i)
|
|
54
|
+
), l = e.filter(
|
|
55
|
+
(i) => a(s, i)
|
|
56
|
+
), n = s.filter(
|
|
57
|
+
(i) => !l.some(
|
|
58
|
+
(d) => d.id === i.value.id
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
t({
|
|
62
|
+
selection: [
|
|
63
|
+
...n,
|
|
64
|
+
...c.map((i) => ({
|
|
65
|
+
type: "asset",
|
|
66
|
+
value: i
|
|
67
|
+
}))
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
toggleCollection: (e) => {
|
|
72
|
+
const s = o().selection;
|
|
73
|
+
a(s, e) ? t({
|
|
74
|
+
selection: s.filter(
|
|
75
|
+
(c) => c.value.id !== e.id
|
|
76
|
+
)
|
|
77
|
+
}) : t({
|
|
78
|
+
selection: [
|
|
79
|
+
...s,
|
|
80
|
+
{
|
|
81
|
+
type: "collection",
|
|
82
|
+
value: e
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
setSelection: (e) => t({ selection: e })
|
|
88
|
+
}),
|
|
89
|
+
{ name: "SelectionStore", enabled: !1 }
|
|
90
|
+
)
|
|
91
|
+
), q = () => {
|
|
92
|
+
const t = y(), { toggleAssets: o, selection: e, setSelection: s } = f(), c = (n) => {
|
|
93
|
+
e.some((i) => i.value.id === n.id) ? s([]) : s([{ type: "asset", value: n }]);
|
|
94
|
+
};
|
|
95
|
+
return {
|
|
96
|
+
assetToggleHandler: (n) => {
|
|
97
|
+
t !== "MultiSelect" ? c(n[0]) : o(n);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
function L(t) {
|
|
102
|
+
const [o, e] = v([]), { selectionMode: s, language: c, noCache: l } = I(), n = M();
|
|
103
|
+
let i = !1;
|
|
104
|
+
const d = t?.filter((r) => !!r).map(C), m = async (r) => {
|
|
105
|
+
if (r.length) {
|
|
106
|
+
const u = await P({ ids: r, auth: n, language: c, noCache: l });
|
|
107
|
+
i || h(u) || (u.value?.sort(
|
|
108
|
+
(p, A) => (t?.indexOf(p.id) ?? 0) - (t?.indexOf(A.id) ?? 0)
|
|
109
|
+
), e(u.value ?? []));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return S(() => {
|
|
113
|
+
if (d) {
|
|
114
|
+
let r = d ?? [];
|
|
115
|
+
s !== "MultiSelect" && (r = r[0] ? [r[0]] : []), m(r);
|
|
116
|
+
}
|
|
117
|
+
return () => {
|
|
118
|
+
i = !0;
|
|
119
|
+
};
|
|
120
|
+
}, [d]), o;
|
|
121
|
+
}
|
|
122
|
+
function j() {
|
|
123
|
+
const { selection: t } = f();
|
|
124
|
+
return t.filter((o) => o.type === "collection").map((o) => o.value.id);
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
L as usePreselectedAssets,
|
|
128
|
+
j as useSelectedCollectionIds,
|
|
129
|
+
q as useSelectionModeHandler,
|
|
130
|
+
f as useSelectionStore
|
|
131
|
+
};
|
package/useTranslate.js
CHANGED
|
@@ -5,5 +5,7 @@ interface ReturnType {
|
|
|
5
5
|
value: string;
|
|
6
6
|
zIndex: number;
|
|
7
7
|
}
|
|
8
|
+
export declare const sortMetaproperties: (first: ReturnType, second: ReturnType) => number;
|
|
9
|
+
export declare const normalizeDate: (date: string) => string;
|
|
8
10
|
export declare const combineMetaproperties: (metaproperties?: MetapropertyType[], textMetaproperties?: TextMetapropertiesType[]) => ReturnType[];
|
|
9
11
|
export {};
|
package/utils6.js
CHANGED
|
@@ -1,41 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
const { toString:
|
|
3
|
-
const r =
|
|
1
|
+
import R from "./bind.js";
|
|
2
|
+
const { toString: T } = Object.prototype, { getPrototypeOf: h } = Object, { iterator: g, toStringTag: x } = Symbol, b = /* @__PURE__ */ ((e) => (t) => {
|
|
3
|
+
const r = T.call(t);
|
|
4
4
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
5
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
6
|
-
function
|
|
7
|
-
return e !== null && !
|
|
5
|
+
})(/* @__PURE__ */ Object.create(null)), f = (e) => (e = e.toLowerCase(), (t) => b(t) === e), O = (e) => (t) => typeof t === e, { isArray: p } = Array, a = O("undefined");
|
|
6
|
+
function d(e) {
|
|
7
|
+
return e !== null && !a(e) && e.constructor !== null && !a(e.constructor) && c(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
8
8
|
}
|
|
9
|
-
const S =
|
|
9
|
+
const S = f("ArrayBuffer");
|
|
10
10
|
function M(e) {
|
|
11
11
|
let t;
|
|
12
12
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && S(e.buffer), t;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
14
|
+
const _ = O("string"), c = O("function"), B = O("number"), y = (e) => e !== null && typeof e == "object", N = (e) => e === !0 || e === !1, w = (e) => {
|
|
15
|
+
if (b(e) !== "object")
|
|
16
16
|
return !1;
|
|
17
17
|
const t = h(e);
|
|
18
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(x in e) && !(
|
|
19
|
-
},
|
|
18
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(x in e) && !(g in e);
|
|
19
|
+
}, U = (e) => {
|
|
20
|
+
if (!y(e) || d(e))
|
|
21
|
+
return !1;
|
|
22
|
+
try {
|
|
23
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
24
|
+
} catch {
|
|
25
|
+
return !1;
|
|
26
|
+
}
|
|
27
|
+
}, I = f("Date"), k = f("File"), V = f("Blob"), q = f("FileList"), H = (e) => y(e) && c(e.pipe), z = (e) => {
|
|
20
28
|
let t;
|
|
21
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
22
|
-
t === "object" &&
|
|
23
|
-
},
|
|
24
|
-
|
|
29
|
+
return e && (typeof FormData == "function" && e instanceof FormData || c(e.append) && ((t = b(e)) === "formdata" || // detect form-data instance
|
|
30
|
+
t === "object" && c(e.toString) && e.toString() === "[object FormData]"));
|
|
31
|
+
}, J = f("URLSearchParams"), [K, $, W, G] = [
|
|
32
|
+
"ReadableStream",
|
|
33
|
+
"Request",
|
|
34
|
+
"Response",
|
|
35
|
+
"Headers"
|
|
36
|
+
].map(f), Q = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
|
+
function m(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
25
38
|
if (e === null || typeof e > "u")
|
|
26
39
|
return;
|
|
27
40
|
let n, s;
|
|
28
|
-
if (typeof e != "object" && (e = [e]),
|
|
41
|
+
if (typeof e != "object" && (e = [e]), p(e))
|
|
29
42
|
for (n = 0, s = e.length; n < s; n++)
|
|
30
43
|
t.call(null, e[n], n, e);
|
|
31
44
|
else {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
if (d(e))
|
|
46
|
+
return;
|
|
47
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
48
|
+
let l;
|
|
49
|
+
for (n = 0; n < i; n++)
|
|
50
|
+
l = o[n], t.call(null, e[l], l, e);
|
|
36
51
|
}
|
|
37
52
|
}
|
|
38
53
|
function E(e, t) {
|
|
54
|
+
if (d(e))
|
|
55
|
+
return null;
|
|
39
56
|
t = t.toLowerCase();
|
|
40
57
|
const r = Object.keys(e);
|
|
41
58
|
let n = r.length, s;
|
|
@@ -44,47 +61,71 @@ function E(e, t) {
|
|
|
44
61
|
return s;
|
|
45
62
|
return null;
|
|
46
63
|
}
|
|
47
|
-
const u = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, L = (e) => !
|
|
48
|
-
function
|
|
49
|
-
const { caseless: e } = L(this) && this || {},
|
|
50
|
-
|
|
51
|
-
|
|
64
|
+
const u = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, L = (e) => !a(e) && e !== u;
|
|
65
|
+
function F() {
|
|
66
|
+
const { caseless: e, skipUndefined: t } = L(this) && this || {}, r = {}, n = (s, o) => {
|
|
67
|
+
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
68
|
+
return;
|
|
69
|
+
const i = e && E(r, o) || o;
|
|
70
|
+
w(r[i]) && w(s) ? r[i] = F(r[i], s) : w(s) ? r[i] = F({}, s) : p(s) ? r[i] = s.slice() : (!t || !a(s)) && (r[i] = s);
|
|
52
71
|
};
|
|
53
|
-
for (let
|
|
54
|
-
arguments[
|
|
55
|
-
return
|
|
72
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
73
|
+
arguments[s] && m(arguments[s], n);
|
|
74
|
+
return r;
|
|
56
75
|
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
const X = (e, t, r, { allOwnKeys: n } = {}) => (m(
|
|
77
|
+
t,
|
|
78
|
+
(s, o) => {
|
|
79
|
+
r && c(s) ? Object.defineProperty(e, o, {
|
|
80
|
+
value: R(s, r),
|
|
81
|
+
writable: !0,
|
|
82
|
+
enumerable: !0,
|
|
83
|
+
configurable: !0
|
|
84
|
+
}) : Object.defineProperty(e, o, {
|
|
85
|
+
value: s,
|
|
86
|
+
writable: !0,
|
|
87
|
+
enumerable: !0,
|
|
88
|
+
configurable: !0
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
{ allOwnKeys: n }
|
|
92
|
+
), e), Y = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Z = (e, t, r, n) => {
|
|
93
|
+
e.prototype = Object.create(
|
|
94
|
+
t.prototype,
|
|
95
|
+
n
|
|
96
|
+
), Object.defineProperty(e.prototype, "constructor", {
|
|
97
|
+
value: e,
|
|
98
|
+
writable: !0,
|
|
99
|
+
enumerable: !1,
|
|
100
|
+
configurable: !0
|
|
101
|
+
}), Object.defineProperty(e, "super", {
|
|
61
102
|
value: t.prototype
|
|
62
103
|
}), r && Object.assign(e.prototype, r);
|
|
63
|
-
},
|
|
64
|
-
let s, o,
|
|
65
|
-
const
|
|
104
|
+
}, j = (e, t, r, n) => {
|
|
105
|
+
let s, o, i;
|
|
106
|
+
const l = {};
|
|
66
107
|
if (t = t || {}, e == null) return t;
|
|
67
108
|
do {
|
|
68
109
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
69
|
-
|
|
110
|
+
i = s[o], (!n || n(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
70
111
|
e = r !== !1 && h(e);
|
|
71
112
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
72
113
|
return t;
|
|
73
|
-
},
|
|
114
|
+
}, v = (e, t, r) => {
|
|
74
115
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
75
116
|
const n = e.indexOf(t, r);
|
|
76
117
|
return n !== -1 && n === r;
|
|
77
|
-
},
|
|
118
|
+
}, ee = (e) => {
|
|
78
119
|
if (!e) return null;
|
|
79
|
-
if (
|
|
120
|
+
if (p(e)) return e;
|
|
80
121
|
let t = e.length;
|
|
81
122
|
if (!B(t)) return null;
|
|
82
123
|
const r = new Array(t);
|
|
83
124
|
for (; t-- > 0; )
|
|
84
125
|
r[t] = e[t];
|
|
85
126
|
return r;
|
|
86
|
-
},
|
|
87
|
-
const n = (e && e[
|
|
127
|
+
}, te = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && h(Uint8Array)), re = (e, t) => {
|
|
128
|
+
const n = (e && e[g]).call(e);
|
|
88
129
|
let s;
|
|
89
130
|
for (; (s = n.next()) && !s.done; ) {
|
|
90
131
|
const o = s.value;
|
|
@@ -96,23 +137,20 @@ const Q = (e, t, r, { allOwnKeys: n } = {}) => (d(t, (s, o) => {
|
|
|
96
137
|
for (; (r = e.exec(t)) !== null; )
|
|
97
138
|
n.push(r);
|
|
98
139
|
return n;
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return n.toUpperCase() + s;
|
|
103
|
-
}
|
|
104
|
-
), b = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), oe = l("RegExp"), P = (e, t) => {
|
|
140
|
+
}, se = f("HTMLFormElement"), oe = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
141
|
+
return n.toUpperCase() + s;
|
|
142
|
+
}), P = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), ie = f("RegExp"), C = (e, t) => {
|
|
105
143
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
106
|
-
|
|
107
|
-
let
|
|
108
|
-
(
|
|
144
|
+
m(r, (s, o) => {
|
|
145
|
+
let i;
|
|
146
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
109
147
|
}), Object.defineProperties(e, n);
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
if (
|
|
148
|
+
}, ce = (e) => {
|
|
149
|
+
C(e, (t, r) => {
|
|
150
|
+
if (c(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
113
151
|
return !1;
|
|
114
152
|
const n = e[r];
|
|
115
|
-
if (
|
|
153
|
+
if (c(n)) {
|
|
116
154
|
if (t.enumerable = !1, "writable" in t) {
|
|
117
155
|
t.writable = !1;
|
|
118
156
|
return;
|
|
@@ -122,101 +160,105 @@ const Q = (e, t, r, { allOwnKeys: n } = {}) => (d(t, (s, o) => {
|
|
|
122
160
|
});
|
|
123
161
|
}
|
|
124
162
|
});
|
|
125
|
-
},
|
|
163
|
+
}, fe = (e, t) => {
|
|
126
164
|
const r = {}, n = (s) => {
|
|
127
165
|
s.forEach((o) => {
|
|
128
166
|
r[o] = !0;
|
|
129
167
|
});
|
|
130
168
|
};
|
|
131
|
-
return
|
|
169
|
+
return p(e) ? n(e) : n(String(e).split(t)), r;
|
|
132
170
|
}, le = () => {
|
|
133
|
-
},
|
|
134
|
-
function
|
|
135
|
-
return !!(e &&
|
|
171
|
+
}, ue = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
172
|
+
function ae(e) {
|
|
173
|
+
return !!(e && c(e.append) && e[x] === "FormData" && e[g]);
|
|
136
174
|
}
|
|
137
|
-
const
|
|
175
|
+
const pe = (e) => {
|
|
138
176
|
const t = new Array(10), r = (n, s) => {
|
|
139
|
-
if (
|
|
177
|
+
if (y(n)) {
|
|
140
178
|
if (t.indexOf(n) >= 0)
|
|
141
179
|
return;
|
|
180
|
+
if (d(n))
|
|
181
|
+
return n;
|
|
142
182
|
if (!("toJSON" in n)) {
|
|
143
183
|
t[s] = n;
|
|
144
|
-
const o =
|
|
145
|
-
return
|
|
146
|
-
const A = r(
|
|
147
|
-
!
|
|
184
|
+
const o = p(n) ? [] : {};
|
|
185
|
+
return m(n, (i, l) => {
|
|
186
|
+
const A = r(i, s + 1);
|
|
187
|
+
!a(A) && (o[l] = A);
|
|
148
188
|
}), t[s] = void 0, o;
|
|
149
189
|
}
|
|
150
190
|
}
|
|
151
191
|
return n;
|
|
152
192
|
};
|
|
153
193
|
return r(e, 0);
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
|
|
194
|
+
}, de = f("AsyncFunction"), ye = (e) => e && (y(e) || c(e)) && c(e.then) && c(e.catch), D = ((e, t) => e ? setImmediate : t ? ((r, n) => (u.addEventListener(
|
|
195
|
+
"message",
|
|
196
|
+
({ source: s, data: o }) => {
|
|
197
|
+
s === u && o === r && n.length && n.shift()();
|
|
198
|
+
},
|
|
199
|
+
!1
|
|
200
|
+
), (s) => {
|
|
157
201
|
n.push(s), u.postMessage(r, "*");
|
|
158
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
159
|
-
|
|
160
|
-
i(u.postMessage)
|
|
161
|
-
), me = typeof queueMicrotask < "u" ? queueMicrotask.bind(u) : typeof process < "u" && process.nextTick || C, ye = (e) => e != null && i(e[y]), Fe = {
|
|
162
|
-
isArray: a,
|
|
202
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", c(u.postMessage)), me = typeof queueMicrotask < "u" ? queueMicrotask.bind(u) : typeof process < "u" && process.nextTick || D, we = (e) => e != null && c(e[g]), be = {
|
|
203
|
+
isArray: p,
|
|
163
204
|
isArrayBuffer: S,
|
|
164
|
-
isBuffer:
|
|
165
|
-
isFormData:
|
|
205
|
+
isBuffer: d,
|
|
206
|
+
isFormData: z,
|
|
166
207
|
isArrayBufferView: M,
|
|
167
|
-
isString:
|
|
208
|
+
isString: _,
|
|
168
209
|
isNumber: B,
|
|
169
|
-
isBoolean:
|
|
170
|
-
isObject:
|
|
171
|
-
isPlainObject:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
210
|
+
isBoolean: N,
|
|
211
|
+
isObject: y,
|
|
212
|
+
isPlainObject: w,
|
|
213
|
+
isEmptyObject: U,
|
|
214
|
+
isReadableStream: K,
|
|
215
|
+
isRequest: $,
|
|
216
|
+
isResponse: W,
|
|
217
|
+
isHeaders: G,
|
|
218
|
+
isUndefined: a,
|
|
177
219
|
isDate: I,
|
|
178
|
-
isFile:
|
|
220
|
+
isFile: k,
|
|
179
221
|
isBlob: V,
|
|
180
|
-
isRegExp:
|
|
181
|
-
isFunction:
|
|
182
|
-
isStream:
|
|
183
|
-
isURLSearchParams:
|
|
184
|
-
isTypedArray:
|
|
185
|
-
isFileList:
|
|
186
|
-
forEach:
|
|
187
|
-
merge:
|
|
188
|
-
extend:
|
|
189
|
-
trim:
|
|
190
|
-
stripBOM:
|
|
191
|
-
inherits:
|
|
192
|
-
toFlatObject:
|
|
193
|
-
kindOf:
|
|
194
|
-
kindOfTest:
|
|
195
|
-
endsWith:
|
|
196
|
-
toArray:
|
|
197
|
-
forEachEntry:
|
|
222
|
+
isRegExp: ie,
|
|
223
|
+
isFunction: c,
|
|
224
|
+
isStream: H,
|
|
225
|
+
isURLSearchParams: J,
|
|
226
|
+
isTypedArray: te,
|
|
227
|
+
isFileList: q,
|
|
228
|
+
forEach: m,
|
|
229
|
+
merge: F,
|
|
230
|
+
extend: X,
|
|
231
|
+
trim: Q,
|
|
232
|
+
stripBOM: Y,
|
|
233
|
+
inherits: Z,
|
|
234
|
+
toFlatObject: j,
|
|
235
|
+
kindOf: b,
|
|
236
|
+
kindOfTest: f,
|
|
237
|
+
endsWith: v,
|
|
238
|
+
toArray: ee,
|
|
239
|
+
forEachEntry: re,
|
|
198
240
|
matchAll: ne,
|
|
199
|
-
isHTMLForm:
|
|
200
|
-
hasOwnProperty:
|
|
201
|
-
hasOwnProp:
|
|
241
|
+
isHTMLForm: se,
|
|
242
|
+
hasOwnProperty: P,
|
|
243
|
+
hasOwnProp: P,
|
|
202
244
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
203
|
-
reduceDescriptors:
|
|
204
|
-
freezeMethods:
|
|
205
|
-
toObjectSet:
|
|
206
|
-
toCamelCase:
|
|
245
|
+
reduceDescriptors: C,
|
|
246
|
+
freezeMethods: ce,
|
|
247
|
+
toObjectSet: fe,
|
|
248
|
+
toCamelCase: oe,
|
|
207
249
|
noop: le,
|
|
208
|
-
toFiniteNumber:
|
|
250
|
+
toFiniteNumber: ue,
|
|
209
251
|
findKey: E,
|
|
210
252
|
global: u,
|
|
211
253
|
isContextDefined: L,
|
|
212
|
-
isSpecCompliantForm:
|
|
213
|
-
toJSONObject:
|
|
214
|
-
isAsyncFn:
|
|
215
|
-
isThenable:
|
|
216
|
-
setImmediate:
|
|
254
|
+
isSpecCompliantForm: ae,
|
|
255
|
+
toJSONObject: pe,
|
|
256
|
+
isAsyncFn: de,
|
|
257
|
+
isThenable: ye,
|
|
258
|
+
setImmediate: D,
|
|
217
259
|
asap: me,
|
|
218
|
-
isIterable:
|
|
260
|
+
isIterable: we
|
|
219
261
|
};
|
|
220
262
|
export {
|
|
221
|
-
|
|
263
|
+
be as default
|
|
222
264
|
};
|
package/utils7.js
CHANGED
|
@@ -1,70 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function F(i, t) {
|
|
4
|
-
return e(i, (n) => {
|
|
5
|
-
const o = n.findIndex((f) => f.id === t?.id);
|
|
6
|
-
o !== -1 && n.splice(o, 1), n.unshift(t);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
function c(i, t = !1) {
|
|
10
|
-
return t ? i.map((n) => ({
|
|
11
|
-
...n,
|
|
12
|
-
subfamilies: n.subfamilies.filter((o) => !o.is_italic)
|
|
13
|
-
})) : i;
|
|
14
|
-
}
|
|
15
|
-
function r(i, t) {
|
|
16
|
-
return i.subfamilies.find(
|
|
17
|
-
(o) => o.weight === t
|
|
18
|
-
) || i.subfamilies[0];
|
|
19
|
-
}
|
|
20
|
-
async function u(i, t = "400") {
|
|
21
|
-
const n = await s(), o = i || n.family.id;
|
|
22
|
-
if (!o)
|
|
23
|
-
throw new Error(`Fonts: Family not found for (default) id: ${o}`);
|
|
24
|
-
const f = await a.getFontFamilyById(o);
|
|
25
|
-
if (!f)
|
|
26
|
-
throw new Error(`Fonts: Family not found for id: ${o}`);
|
|
27
|
-
const l = r(f, t);
|
|
28
|
-
if (!l)
|
|
29
|
-
throw new Error(`Fonts: Subfamily not found for weight: ${t}`);
|
|
30
|
-
return {
|
|
31
|
-
family: f,
|
|
32
|
-
subfamily: l
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
async function m(i) {
|
|
36
|
-
const t = await a.getSubfamilyById(i);
|
|
37
|
-
if (!t)
|
|
38
|
-
throw new Error(`Fonts: Subfamily not found for id: ${i}`);
|
|
39
|
-
const n = await a.getFontFamilyById(t.font_id);
|
|
40
|
-
if (!n)
|
|
41
|
-
throw new Error(`Fonts: Family not found for id: ${t.font_id}`);
|
|
42
|
-
return {
|
|
43
|
-
family: n,
|
|
44
|
-
subfamily: t
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
async function s() {
|
|
48
|
-
const i = await a.getDefaultGlobalFont();
|
|
49
|
-
if (!i)
|
|
50
|
-
throw new Error("FontManager v2: (Default) Global Font Family not found");
|
|
51
|
-
const t = i.family.subfamilies.find(
|
|
52
|
-
(n) => n.id === i.default_subfamily_id
|
|
53
|
-
);
|
|
54
|
-
if (!t)
|
|
55
|
-
throw new Error("FontManager v2: (Default) Global Font Subfamily not found");
|
|
56
|
-
return {
|
|
57
|
-
family: i.family,
|
|
58
|
-
subfamily: t
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
async function w(i, t) {
|
|
62
|
-
let n;
|
|
63
|
-
return t ? n = await m(t) : n = await u(i), n;
|
|
64
|
-
}
|
|
1
|
+
const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
|
|
65
3
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
4
|
+
e as hasBrowserEnv,
|
|
5
|
+
n as hasStandardBrowserEnv,
|
|
6
|
+
t as hasStandardBrowserWebWorkerEnv,
|
|
7
|
+
o as navigator,
|
|
8
|
+
r as origin
|
|
70
9
|
};
|