@emailmaker/filemanager 1.1.85-dev.9 → 1.1.93
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/.build-meta.json +1 -1
- package/components/ImageIcons/iconStockSearch.d.ts +1 -3
- package/core.esm.js +255 -239
- package/core.js +1 -1
- package/{file-manager-FilerobotEditor.js → file-manager-FilerobotEditor-WbM5WTct.js} +6 -6
- package/file-manager-IconsTab-CCn0Q0ng.js +2434 -0
- package/{file-manager-ImageCodeGenerator.js → file-manager-ImageCodeGenerator-m06RVQr7.js} +8 -8
- package/{file-manager-JsBarcode.js → file-manager-JsBarcode-CyaffT5b.js} +30 -30
- package/{file-manager-browser.js → file-manager-browser-DDyRNDQk.js} +8 -8
- package/{file-manager-hooks-fhltHD9p.js → file-manager-hooks-UP2zpv8z.js} +1876 -1900
- package/{file-manager-imageEditorTranslations-rRWZAwnp.js → file-manager-imageEditorTranslations-CtNVql-A.js} +9 -12
- package/{file-manager-rolldown-runtime-DawGUBAG.js → file-manager-rolldown-runtime-DAVfCfog.js} +2 -2
- package/{file-manager-urls-BpPtVuK4.js → file-manager-useMediaListEngine-B9sz3gcs.js} +119 -139
- package/file-manager.esm.js +1218 -1271
- package/file-manager.js +12 -12
- package/package.json +1 -4
- package/types.d.ts +0 -7
- package/utils/imageCompression.d.ts +0 -5
- package/assets/icon-sets/lucide.json +0 -6275
- package/assets/icon-sets/tabler.json +0 -19336
- package/components/ImageIcons/iconSets.d.ts +0 -36
- package/components/ImageIcons/iconSets.test.d.ts +0 -1
- package/file-manager-IconsTab.js +0 -2046
- package/utils/generateId.d.ts +0 -5
- package/utils/imageCompression.editedImage.test.d.ts +0 -1
package/file-manager-IconsTab.js
DELETED
|
@@ -1,2046 +0,0 @@
|
|
|
1
|
-
import { $ as e, C as t, I as n, L as r, S as i, U as a, V as o, Z as s, b as c, et as l, j as u, t as d, x as f } from "./file-manager-hooks-fhltHD9p.js";
|
|
2
|
-
import { a as p, i as m, l as h, o as g, s as _, t as v, u as y } from "./file-manager-urls-BpPtVuK4.js";
|
|
3
|
-
import b from "react";
|
|
4
|
-
import { Button as x, Checkbox as S, ColorPicker as C, Divider as w, Form as T, Input as ee, InputNumber as E, Modal as te, Space as D, Spin as ne, Typography as re } from "antd";
|
|
5
|
-
import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
6
|
-
import { LoadingOutlined as ae } from "@ant-design/icons";
|
|
7
|
-
import { FolderPlus as oe } from "@untitledui/icons/FolderPlus";
|
|
8
|
-
import { Copy04 as se } from "@untitledui/icons/Copy04";
|
|
9
|
-
import { Scale01 as ce } from "@untitledui/icons/Scale01";
|
|
10
|
-
import { SearchMd as le } from "@untitledui/icons/SearchMd";
|
|
11
|
-
var A = {
|
|
12
|
-
"em-filemanager": "em-filemanager",
|
|
13
|
-
emFilemanager: "em-filemanager",
|
|
14
|
-
iconsTab: "iconsTab",
|
|
15
|
-
hasSearch: "hasSearch",
|
|
16
|
-
iconsSearchWrapper: "iconsSearchWrapper",
|
|
17
|
-
iconsSearchForm: "iconsSearchForm",
|
|
18
|
-
iconsSearchFormCenteredContainer: "iconsSearchFormCenteredContainer",
|
|
19
|
-
iconsSearchFormCentered: "iconsSearchFormCentered",
|
|
20
|
-
iconsSearchFormInput: "iconsSearchFormInput",
|
|
21
|
-
iconsSearchFormInputInput: "iconsSearchFormInputInput",
|
|
22
|
-
iconsSearchResults: "iconsSearchResults",
|
|
23
|
-
iconsControlsControls: "iconsControlsControls",
|
|
24
|
-
iconsControls: "iconsControls",
|
|
25
|
-
iconsControlsFamilySlug: "iconsControlsFamilySlug",
|
|
26
|
-
iconsControlElement: "iconsControlElement",
|
|
27
|
-
iconsControlsNumField: "iconsControlsNumField",
|
|
28
|
-
iconsControlsNumLabel: "iconsControlsNumLabel",
|
|
29
|
-
iconsControlsNumInput: "iconsControlsNumInput",
|
|
30
|
-
iconsControlsNumSuffix: "iconsControlsNumSuffix",
|
|
31
|
-
iconsControlsCompact: "iconsControlsCompact",
|
|
32
|
-
iconsControlsInputNumber: "iconsControlsInputNumber",
|
|
33
|
-
iconsControlsDropdownBtn: "iconsControlsDropdownBtn",
|
|
34
|
-
sliderDropdown: "sliderDropdown",
|
|
35
|
-
iconsControlsHeader: "iconsControlsHeader",
|
|
36
|
-
iconsSearchFormSelect: "iconsSearchFormSelect",
|
|
37
|
-
iconsSearchFormStyleItem: "iconsSearchFormStyleItem",
|
|
38
|
-
fadeInSlide: "fadeInSlide",
|
|
39
|
-
iconsSearchDivider: "iconsSearchDivider",
|
|
40
|
-
iconsSearchFormInputIcon: "iconsSearchFormInputIcon",
|
|
41
|
-
iconsGrid: "iconsGrid",
|
|
42
|
-
iconsBottomBar: "iconsBottomBar",
|
|
43
|
-
iconsBottomBarContent: "iconsBottomBarContent",
|
|
44
|
-
iconsGridEmpty: "iconsGridEmpty",
|
|
45
|
-
iconsGridEmptyState: "iconsGridEmptyState",
|
|
46
|
-
resultsContainer: "resultsContainer",
|
|
47
|
-
playButton: "playButton",
|
|
48
|
-
title: "title",
|
|
49
|
-
subtitle: "subtitle",
|
|
50
|
-
iconsGridInfiniteScroll: "iconsGridInfiniteScroll",
|
|
51
|
-
iconsGridLoadingMore: "iconsGridLoadingMore",
|
|
52
|
-
iconsGridGrid: "iconsGridGrid",
|
|
53
|
-
iconsGridVirtualCanvas: "iconsGridVirtualCanvas",
|
|
54
|
-
iconsGridItem: "iconsGridItem",
|
|
55
|
-
iconsGridItemThumbnail: "iconsGridItemThumbnail",
|
|
56
|
-
iconsGridItemSvg: "iconsGridItemSvg",
|
|
57
|
-
iconsGridItemImg: "iconsGridItemImg",
|
|
58
|
-
iconsGridItemName: "iconsGridItemName",
|
|
59
|
-
iconsGridItemSelected: "iconsGridItemSelected",
|
|
60
|
-
iconsGridItemInsertButton: "iconsGridItemInsertButton",
|
|
61
|
-
iconsGridLoading: "iconsGridLoading",
|
|
62
|
-
iconsControlsBackButton: "iconsControlsBackButton",
|
|
63
|
-
iconsGridCheckbox: "iconsGridCheckbox",
|
|
64
|
-
iconsGridShowCheckboxes: "iconsGridShowCheckboxes",
|
|
65
|
-
iconsHeaderContainer: "iconsHeaderContainer",
|
|
66
|
-
iconsHeaderContainerLeft: "iconsHeaderContainerLeft",
|
|
67
|
-
iconsHeaderDivider: "iconsHeaderDivider",
|
|
68
|
-
copyToFolderModalBody: "copyToFolderModalBody",
|
|
69
|
-
copyToFolderModalLoadingOverlay: "copyToFolderModalLoadingOverlay"
|
|
70
|
-
}, ue = ({ query: e, onQueryChange: t, onSubmit: n, hasResults: r = !1, inputRef: i }) => {
|
|
71
|
-
let { t: a } = s(), { options: c } = o(), { config: l } = c, u = e.length > 0 && r;
|
|
72
|
-
return /* @__PURE__ */ k("div", {
|
|
73
|
-
className: A.iconsSearchFormCenteredContainer,
|
|
74
|
-
children: [/* @__PURE__ */ O(T, {
|
|
75
|
-
layout: "inline",
|
|
76
|
-
onFinish: n,
|
|
77
|
-
className: u ? A.iconsSearchResults : A.iconsSearchFormCentered,
|
|
78
|
-
children: /* @__PURE__ */ O(T.Item, {
|
|
79
|
-
className: A.iconsSearchFormInput,
|
|
80
|
-
children: /* @__PURE__ */ O(ee, {
|
|
81
|
-
ref: i,
|
|
82
|
-
className: A.iconsSearchFormInputInput,
|
|
83
|
-
allowClear: !0,
|
|
84
|
-
prefix: /* @__PURE__ */ O(le, {
|
|
85
|
-
size: 16,
|
|
86
|
-
strokeWidth: l?.iconStrokeWidth,
|
|
87
|
-
onClick: n
|
|
88
|
-
}),
|
|
89
|
-
placeholder: a("Search icons"),
|
|
90
|
-
value: e,
|
|
91
|
-
onChange: (e) => t(e.target.value),
|
|
92
|
-
onKeyDown: (e) => e.code === "Space" && n(),
|
|
93
|
-
onPressEnter: n,
|
|
94
|
-
spellCheck: "false"
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
|
-
}), u && /* @__PURE__ */ O("div", {
|
|
98
|
-
className: `ant-divider ${A.iconsSearchDivider}`,
|
|
99
|
-
role: "separator"
|
|
100
|
-
})]
|
|
101
|
-
});
|
|
102
|
-
}, de = (e) => {
|
|
103
|
-
let { t } = s(), { colorHex: n, setColorHex: r, colorHex2: i, setColorHex2: a, colorHex3: o, setColorHex3: c, sizePx: l, setSizePx: u, strokeWidth: d, setStrokeWidth: f, showSecondColor: p, showThirdColor: m } = e;
|
|
104
|
-
return /* @__PURE__ */ O("div", {
|
|
105
|
-
className: A.iconsControls,
|
|
106
|
-
children: /* @__PURE__ */ k("div", {
|
|
107
|
-
className: A.iconsControlsControls,
|
|
108
|
-
children: [
|
|
109
|
-
/* @__PURE__ */ k("div", {
|
|
110
|
-
className: A.iconsControlsNumField,
|
|
111
|
-
children: [/* @__PURE__ */ O(re.Text, {
|
|
112
|
-
type: "secondary",
|
|
113
|
-
className: A.iconsControlsNumLabel,
|
|
114
|
-
children: t("Size")
|
|
115
|
-
}), /* @__PURE__ */ O(E, {
|
|
116
|
-
className: A.iconsControlsNumInput,
|
|
117
|
-
min: 20,
|
|
118
|
-
max: 200,
|
|
119
|
-
step: 1,
|
|
120
|
-
value: l,
|
|
121
|
-
suffix: /* @__PURE__ */ O("span", {
|
|
122
|
-
className: A.iconsControlsNumSuffix,
|
|
123
|
-
children: "px"
|
|
124
|
-
}),
|
|
125
|
-
onChange: (e) => u(typeof e == "number" && !Number.isNaN(e) ? e : 50),
|
|
126
|
-
"aria-label": t("Size")
|
|
127
|
-
})]
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ k("div", {
|
|
130
|
-
className: A.iconsControlsNumField,
|
|
131
|
-
children: [/* @__PURE__ */ O(re.Text, {
|
|
132
|
-
type: "secondary",
|
|
133
|
-
className: A.iconsControlsNumLabel,
|
|
134
|
-
children: t("Stroke width")
|
|
135
|
-
}), /* @__PURE__ */ O(E, {
|
|
136
|
-
className: A.iconsControlsNumInput,
|
|
137
|
-
min: .3,
|
|
138
|
-
max: 3,
|
|
139
|
-
step: .1,
|
|
140
|
-
value: typeof d == "number" ? d : 1,
|
|
141
|
-
suffix: /* @__PURE__ */ O("span", {
|
|
142
|
-
className: A.iconsControlsNumSuffix,
|
|
143
|
-
children: "px"
|
|
144
|
-
}),
|
|
145
|
-
onChange: (e) => f(typeof e == "number" && !Number.isNaN(e) ? e : 1),
|
|
146
|
-
"aria-label": t("Stroke width")
|
|
147
|
-
})]
|
|
148
|
-
}),
|
|
149
|
-
/* @__PURE__ */ k(D, {
|
|
150
|
-
size: 8,
|
|
151
|
-
children: [
|
|
152
|
-
/* @__PURE__ */ k("div", {
|
|
153
|
-
className: A.iconsControlElement,
|
|
154
|
-
children: [/* @__PURE__ */ O("span", { children: t("Color1") }), /* @__PURE__ */ O(C, {
|
|
155
|
-
value: n,
|
|
156
|
-
format: "hex",
|
|
157
|
-
disabledAlpha: !0,
|
|
158
|
-
showText: !0,
|
|
159
|
-
onChange: (e, t) => {
|
|
160
|
-
let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
|
|
161
|
-
r(n);
|
|
162
|
-
},
|
|
163
|
-
size: "middle"
|
|
164
|
-
})]
|
|
165
|
-
}),
|
|
166
|
-
p && /* @__PURE__ */ k("div", {
|
|
167
|
-
className: A.iconsControlElement,
|
|
168
|
-
children: [/* @__PURE__ */ O("span", { children: t("Color2") }), /* @__PURE__ */ O(C, {
|
|
169
|
-
value: i,
|
|
170
|
-
format: "hex",
|
|
171
|
-
disabledAlpha: !0,
|
|
172
|
-
showText: !0,
|
|
173
|
-
onChange: (e, t) => {
|
|
174
|
-
let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
|
|
175
|
-
a(n);
|
|
176
|
-
},
|
|
177
|
-
size: "middle"
|
|
178
|
-
})]
|
|
179
|
-
}),
|
|
180
|
-
m && /* @__PURE__ */ k("div", {
|
|
181
|
-
className: A.iconsControlElement,
|
|
182
|
-
children: [/* @__PURE__ */ O("span", { children: t("Color3") }), /* @__PURE__ */ O(C, {
|
|
183
|
-
value: o,
|
|
184
|
-
format: "hex",
|
|
185
|
-
disabledAlpha: !0,
|
|
186
|
-
showText: !0,
|
|
187
|
-
onChange: (e, t) => {
|
|
188
|
-
let n = typeof e == "string" ? e : e?.toHexString ? e.toHexString() : t;
|
|
189
|
-
c(n);
|
|
190
|
-
},
|
|
191
|
-
size: "middle"
|
|
192
|
-
})]
|
|
193
|
-
})
|
|
194
|
-
]
|
|
195
|
-
})
|
|
196
|
-
]
|
|
197
|
-
})
|
|
198
|
-
});
|
|
199
|
-
}, fe = /* @__PURE__ */ O(ae, {
|
|
200
|
-
style: { fontSize: 20 },
|
|
201
|
-
spin: !0
|
|
202
|
-
}), pe = 240, j = 160, me = 56, he = ({ items: e, loading: t, isCollectingResults: n = !1, hasMore: r = !1, hasQuery: i, selectedHash: a, onItemClick: o, onInsert: c, onLoadMore: l, colorVars: u, svgTextMap: f, previewSize: p, selectedHashes: g, onToggleSelect: _ }) => {
|
|
203
|
-
let { t: v } = s(), { ThumbsUpIcon: x } = y(), C = !!(g && g.size > 0), w = b.useRef(null), { positionedItems: T, containerHeight: ee, isNearEnd: E, handleViewportChange: te } = m({
|
|
204
|
-
items: e,
|
|
205
|
-
getId: (e) => e.hash,
|
|
206
|
-
getPreviewSrc: () => void 0,
|
|
207
|
-
getAltText: (e) => e.name,
|
|
208
|
-
layoutMode: "grid",
|
|
209
|
-
minColumnWidth: j,
|
|
210
|
-
estimatedItemHeight: (p ?? 50) + me,
|
|
211
|
-
gap: 16,
|
|
212
|
-
prefetchThresholdPx: pe
|
|
213
|
-
}), D = d(te, [e.length, p ?? 50]);
|
|
214
|
-
b.useEffect(() => {
|
|
215
|
-
r || (w.current = null);
|
|
216
|
-
}, [r, e.length]), b.useEffect(() => {
|
|
217
|
-
if (!t && !n && r && e.length > 0 && E) {
|
|
218
|
-
if (w.current === e.length) return;
|
|
219
|
-
w.current = e.length, l?.();
|
|
220
|
-
}
|
|
221
|
-
}, [
|
|
222
|
-
r,
|
|
223
|
-
n,
|
|
224
|
-
E,
|
|
225
|
-
e.length,
|
|
226
|
-
t,
|
|
227
|
-
l
|
|
228
|
-
]);
|
|
229
|
-
let re = i ? /* @__PURE__ */ O("div", {
|
|
230
|
-
className: A.iconsGridEmptyState,
|
|
231
|
-
children: /* @__PURE__ */ O(h, {})
|
|
232
|
-
}) : /* @__PURE__ */ O("div", {
|
|
233
|
-
className: A.iconsGridEmptyState,
|
|
234
|
-
children: /* @__PURE__ */ k("div", {
|
|
235
|
-
className: A.resultsContainer,
|
|
236
|
-
children: [
|
|
237
|
-
/* @__PURE__ */ O("span", {
|
|
238
|
-
className: A.videoIcon,
|
|
239
|
-
children: /* @__PURE__ */ O(x, {
|
|
240
|
-
className: A.playButton,
|
|
241
|
-
style: {
|
|
242
|
-
width: 48,
|
|
243
|
-
height: 49,
|
|
244
|
-
marginBottom: 10
|
|
245
|
-
}
|
|
246
|
-
})
|
|
247
|
-
}),
|
|
248
|
-
/* @__PURE__ */ O("h1", {
|
|
249
|
-
className: A.title,
|
|
250
|
-
children: v("Thousands of icons")
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ O("p", {
|
|
253
|
-
className: A.subtitle,
|
|
254
|
-
children: v("Enter a search query and we'll find the perfect icon for you")
|
|
255
|
-
})
|
|
256
|
-
]
|
|
257
|
-
})
|
|
258
|
-
});
|
|
259
|
-
return /* @__PURE__ */ k("div", {
|
|
260
|
-
id: "iconsScrollableDiv",
|
|
261
|
-
ref: D,
|
|
262
|
-
className: A.iconsGrid,
|
|
263
|
-
children: [e.length === 0 && !t ? re : /* @__PURE__ */ k(ie, { children: [/* @__PURE__ */ O("div", {
|
|
264
|
-
className: A.iconsGridVirtualCanvas,
|
|
265
|
-
style: { height: ee },
|
|
266
|
-
children: T.map(({ row: e, layout: t }) => {
|
|
267
|
-
let n = e.item, r = !!(g && g.has(n.hash) || a === n.hash), i = f[n.hash];
|
|
268
|
-
return /* @__PURE__ */ k("div", {
|
|
269
|
-
style: {
|
|
270
|
-
position: "absolute",
|
|
271
|
-
top: t.top,
|
|
272
|
-
left: t.left,
|
|
273
|
-
width: t.width,
|
|
274
|
-
height: t.height
|
|
275
|
-
},
|
|
276
|
-
className: `${A.iconsGridItem} ${r ? A.iconsGridItemSelected : ""} ${C ? A.iconsGridShowCheckboxes : ""}`,
|
|
277
|
-
onClick: () => o(n),
|
|
278
|
-
children: [
|
|
279
|
-
/* @__PURE__ */ O("div", {
|
|
280
|
-
style: { height: p ?? 50 },
|
|
281
|
-
className: A.iconsGridItemThumbnail,
|
|
282
|
-
children: i ? /* @__PURE__ */ O("div", {
|
|
283
|
-
style: {
|
|
284
|
-
color: u?.colorHex,
|
|
285
|
-
"--em-icon-grad-1": u?.colorHex ?? "#000",
|
|
286
|
-
"--em-icon-grad-2": u?.colorHex2 ?? "#ff007a",
|
|
287
|
-
"--em-icon-color-1": u?.colorHex ?? "#000",
|
|
288
|
-
"--em-icon-color-2": u?.colorHex2 ?? "#ff007a",
|
|
289
|
-
"--em-icon-color-3": u?.colorHex3 ?? "#00C2FF",
|
|
290
|
-
"--em-icon-stroke-1": u?.colorHex ?? "#000",
|
|
291
|
-
"--em-icon-stroke-2": u?.colorHex2 ?? "#ff007a",
|
|
292
|
-
"--em-icon-stroke-3": u?.colorHex3 ?? "#00C2FF",
|
|
293
|
-
"--em-icon-fill-1": u?.colorHex ?? "#000",
|
|
294
|
-
"--em-icon-fill-2": u?.colorHex2 ?? "#ff007a",
|
|
295
|
-
"--em-icon-fill-3": u?.colorHex3 ?? "#00C2FF"
|
|
296
|
-
},
|
|
297
|
-
dangerouslySetInnerHTML: { __html: i },
|
|
298
|
-
className: A.iconsGridItemSvg
|
|
299
|
-
}) : /* @__PURE__ */ O("div", {
|
|
300
|
-
className: A.iconsGridItemImg,
|
|
301
|
-
style: {
|
|
302
|
-
display: "flex",
|
|
303
|
-
alignItems: "center",
|
|
304
|
-
justifyContent: "center"
|
|
305
|
-
},
|
|
306
|
-
children: /* @__PURE__ */ O(ne, {
|
|
307
|
-
indicator: fe,
|
|
308
|
-
size: "small"
|
|
309
|
-
})
|
|
310
|
-
})
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ O("div", {
|
|
313
|
-
className: A.iconsGridItemName,
|
|
314
|
-
title: n.name,
|
|
315
|
-
children: n.name
|
|
316
|
-
}),
|
|
317
|
-
_ ? /* @__PURE__ */ O("div", {
|
|
318
|
-
onClick: (e) => {
|
|
319
|
-
e.stopPropagation();
|
|
320
|
-
},
|
|
321
|
-
className: A.iconsGridCheckbox,
|
|
322
|
-
children: /* @__PURE__ */ O(S, {
|
|
323
|
-
checked: !!(g && g.has(n.hash)),
|
|
324
|
-
onChange: () => _(n.hash)
|
|
325
|
-
})
|
|
326
|
-
}) : null
|
|
327
|
-
]
|
|
328
|
-
}, n.hash);
|
|
329
|
-
})
|
|
330
|
-
}), n && /* @__PURE__ */ O("div", {
|
|
331
|
-
className: A.iconsGridLoadingMore,
|
|
332
|
-
children: /* @__PURE__ */ O(ne, { indicator: fe })
|
|
333
|
-
})] }), t && e.length === 0 && /* @__PURE__ */ O("div", {
|
|
334
|
-
className: A.iconsGridLoading,
|
|
335
|
-
children: /* @__PURE__ */ O(ne, { indicator: fe })
|
|
336
|
-
})]
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region packages/file-manager/src/components/ImageIcons/defaultIconStockTranslate.ts
|
|
341
|
-
function ge(e) {
|
|
342
|
-
return /[\u0400-\u04FF]/.test(e);
|
|
343
|
-
}
|
|
344
|
-
function _e(e) {
|
|
345
|
-
let t = e.trim();
|
|
346
|
-
return async (e, n) => {
|
|
347
|
-
let r = e.trim();
|
|
348
|
-
if (!ge(r)) return r;
|
|
349
|
-
try {
|
|
350
|
-
let i = await fetch(t, {
|
|
351
|
-
method: "POST",
|
|
352
|
-
headers: { "Content-Type": "application/json" },
|
|
353
|
-
body: JSON.stringify({
|
|
354
|
-
text: e,
|
|
355
|
-
locale: n.locale
|
|
356
|
-
}),
|
|
357
|
-
credentials: "same-origin"
|
|
358
|
-
});
|
|
359
|
-
if (!i.ok) return r;
|
|
360
|
-
let a = await i.json(), o = a.translatedText ?? a.text ?? r;
|
|
361
|
-
return String(o).trim() || r;
|
|
362
|
-
} catch {
|
|
363
|
-
return r;
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function ve(e) {
|
|
368
|
-
if (!e) return;
|
|
369
|
-
if (e.handleTranslate) return e.handleTranslate;
|
|
370
|
-
let t = e.iconStockTranslateUrl?.trim();
|
|
371
|
-
if (t) return _e(t);
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region node_modules/@iconify/utils/lib/icon/defaults.js
|
|
375
|
-
var ye = Object.freeze({
|
|
376
|
-
left: 0,
|
|
377
|
-
top: 0,
|
|
378
|
-
width: 16,
|
|
379
|
-
height: 16
|
|
380
|
-
}), M = Object.freeze({
|
|
381
|
-
rotate: 0,
|
|
382
|
-
vFlip: !1,
|
|
383
|
-
hFlip: !1
|
|
384
|
-
}), N = Object.freeze({
|
|
385
|
-
...ye,
|
|
386
|
-
...M
|
|
387
|
-
}), be = Object.freeze({
|
|
388
|
-
...N,
|
|
389
|
-
body: "",
|
|
390
|
-
hidden: !1
|
|
391
|
-
}), P = Object.freeze({
|
|
392
|
-
width: null,
|
|
393
|
-
height: null
|
|
394
|
-
}), xe = Object.freeze({
|
|
395
|
-
...P,
|
|
396
|
-
...M
|
|
397
|
-
});
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region node_modules/@iconify/utils/lib/icon/transformations.js
|
|
400
|
-
function F(e, t) {
|
|
401
|
-
let n = {};
|
|
402
|
-
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
403
|
-
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
404
|
-
return r && (n.rotate = r), n;
|
|
405
|
-
}
|
|
406
|
-
//#endregion
|
|
407
|
-
//#region node_modules/@iconify/utils/lib/icon/merge.js
|
|
408
|
-
function Se(e, t) {
|
|
409
|
-
let n = F(e, t);
|
|
410
|
-
for (let r in be) r in M ? r in e && !(r in n) && (n[r] = M[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
411
|
-
return n;
|
|
412
|
-
}
|
|
413
|
-
//#endregion
|
|
414
|
-
//#region node_modules/@iconify/utils/lib/icon-set/tree.js
|
|
415
|
-
function I(e, t) {
|
|
416
|
-
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
417
|
-
function a(e) {
|
|
418
|
-
if (n[e]) return i[e] = [];
|
|
419
|
-
if (!(e in i)) {
|
|
420
|
-
i[e] = null;
|
|
421
|
-
let t = r[e] && r[e].parent, n = t && a(t);
|
|
422
|
-
n && (i[e] = [t].concat(n));
|
|
423
|
-
}
|
|
424
|
-
return i[e];
|
|
425
|
-
}
|
|
426
|
-
return (t || Object.keys(n).concat(Object.keys(r))).forEach(a), i;
|
|
427
|
-
}
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region node_modules/@iconify/utils/lib/icon-set/get-icon.js
|
|
430
|
-
function L(e, t, n) {
|
|
431
|
-
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
432
|
-
function o(e) {
|
|
433
|
-
a = Se(r[e] || i[e], a);
|
|
434
|
-
}
|
|
435
|
-
return o(t), n.forEach(o), Se(e, a);
|
|
436
|
-
}
|
|
437
|
-
function R(e, t) {
|
|
438
|
-
if (e.icons[t]) return L(e, t, []);
|
|
439
|
-
let n = I(e, [t])[t];
|
|
440
|
-
return n ? L(e, t, n) : null;
|
|
441
|
-
}
|
|
442
|
-
//#endregion
|
|
443
|
-
//#region node_modules/@iconify/utils/lib/svg/size.js
|
|
444
|
-
var Ce = /(-?[0-9.]*[0-9]+[0-9.]*)/g, z = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
445
|
-
function we(e, t, n) {
|
|
446
|
-
if (t === 1) return e;
|
|
447
|
-
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
448
|
-
if (typeof e != "string") return e;
|
|
449
|
-
let r = e.split(Ce);
|
|
450
|
-
if (r === null || !r.length) return e;
|
|
451
|
-
let i = [], a = r.shift(), o = z.test(a);
|
|
452
|
-
for (;;) {
|
|
453
|
-
if (o) {
|
|
454
|
-
let e = parseFloat(a);
|
|
455
|
-
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
456
|
-
} else i.push(a);
|
|
457
|
-
if (a = r.shift(), a === void 0) return i.join("");
|
|
458
|
-
o = !o;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region node_modules/@iconify/utils/lib/svg/defs.js
|
|
463
|
-
function B(e, t = "defs") {
|
|
464
|
-
let n = "", r = e.indexOf("<" + t);
|
|
465
|
-
for (; r >= 0;) {
|
|
466
|
-
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
467
|
-
if (i === -1 || a === -1) break;
|
|
468
|
-
let o = e.indexOf(">", a);
|
|
469
|
-
if (o === -1) break;
|
|
470
|
-
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
471
|
-
}
|
|
472
|
-
return {
|
|
473
|
-
defs: n,
|
|
474
|
-
content: e
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
function Te(e, t) {
|
|
478
|
-
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
479
|
-
}
|
|
480
|
-
function Ee(e, t, n) {
|
|
481
|
-
let r = B(e);
|
|
482
|
-
return Te(r.defs, t + r.content + n);
|
|
483
|
-
}
|
|
484
|
-
//#endregion
|
|
485
|
-
//#region node_modules/@iconify/utils/lib/svg/build.js
|
|
486
|
-
var De = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
487
|
-
function V(e, t) {
|
|
488
|
-
let n = {
|
|
489
|
-
...N,
|
|
490
|
-
...e
|
|
491
|
-
}, r = {
|
|
492
|
-
...xe,
|
|
493
|
-
...t
|
|
494
|
-
}, i = {
|
|
495
|
-
left: n.left,
|
|
496
|
-
top: n.top,
|
|
497
|
-
width: n.width,
|
|
498
|
-
height: n.height
|
|
499
|
-
}, a = n.body;
|
|
500
|
-
[n, r].forEach((e) => {
|
|
501
|
-
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
502
|
-
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
503
|
-
let s;
|
|
504
|
-
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
505
|
-
case 1:
|
|
506
|
-
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
507
|
-
break;
|
|
508
|
-
case 2:
|
|
509
|
-
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
510
|
-
break;
|
|
511
|
-
case 3: s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
512
|
-
}
|
|
513
|
-
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = Ee(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
514
|
-
});
|
|
515
|
-
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
516
|
-
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = we(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? we(u, l / c) : s === "auto" ? l : s);
|
|
517
|
-
let f = {}, p = (e, t) => {
|
|
518
|
-
De(t) || (f[e] = t.toString());
|
|
519
|
-
};
|
|
520
|
-
p("width", u), p("height", d);
|
|
521
|
-
let m = [
|
|
522
|
-
i.left,
|
|
523
|
-
i.top,
|
|
524
|
-
c,
|
|
525
|
-
l
|
|
526
|
-
];
|
|
527
|
-
return f.viewBox = m.join(" "), {
|
|
528
|
-
attributes: f,
|
|
529
|
-
viewBox: m,
|
|
530
|
-
body: a
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
//#endregion
|
|
534
|
-
//#region node_modules/@iconify/utils/lib/svg/html.js
|
|
535
|
-
function Oe(e, t) {
|
|
536
|
-
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
537
|
-
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
538
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
539
|
-
}
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region packages/file-manager/src/components/ImageIcons/iconSearchRuLexicon.ts
|
|
542
|
-
var H = /* @__PURE__ */ new Set(/* @__PURE__ */ "и.в.во.на.с.со.к.ко.у.о.об.от.до.по.за.из.без.для.при.про.или.the.a.an.and.or.of.to.in.on.for".split(".")), U = {
|
|
543
|
-
дом: ["home", "house"],
|
|
544
|
-
домой: ["home"],
|
|
545
|
-
сердце: ["heart"],
|
|
546
|
-
любовь: ["heart"],
|
|
547
|
-
звезда: ["star"],
|
|
548
|
-
солнце: ["sun"],
|
|
549
|
-
луна: ["moon"],
|
|
550
|
-
облако: ["cloud"],
|
|
551
|
-
дождь: ["rain", "cloud"],
|
|
552
|
-
снег: ["snow"],
|
|
553
|
-
огонь: ["fire", "flame"],
|
|
554
|
-
вода: ["droplet", "water"],
|
|
555
|
-
молния: [
|
|
556
|
-
"bolt",
|
|
557
|
-
"zap",
|
|
558
|
-
"lightning"
|
|
559
|
-
],
|
|
560
|
-
пользователь: ["user", "person"],
|
|
561
|
-
человек: [
|
|
562
|
-
"user",
|
|
563
|
-
"person",
|
|
564
|
-
"people"
|
|
565
|
-
],
|
|
566
|
-
люди: ["users", "people"],
|
|
567
|
-
лицо: ["face", "smile"],
|
|
568
|
-
улыбка: ["smile"],
|
|
569
|
-
рука: ["hand"],
|
|
570
|
-
глаз: ["eye"],
|
|
571
|
-
ключ: ["key"],
|
|
572
|
-
замок: ["lock"],
|
|
573
|
-
почта: [
|
|
574
|
-
"mail",
|
|
575
|
-
"email",
|
|
576
|
-
"inbox"
|
|
577
|
-
],
|
|
578
|
-
письмо: [
|
|
579
|
-
"mail",
|
|
580
|
-
"envelope",
|
|
581
|
-
"email"
|
|
582
|
-
],
|
|
583
|
-
конверт: ["envelope", "mail"],
|
|
584
|
-
сообщение: ["message", "chat"],
|
|
585
|
-
чат: ["message", "chat"],
|
|
586
|
-
телефон: ["phone"],
|
|
587
|
-
смартфон: ["smartphone", "device"],
|
|
588
|
-
камера: ["camera"],
|
|
589
|
-
фото: ["image", "photo"],
|
|
590
|
-
картинка: ["image", "picture"],
|
|
591
|
-
изображение: ["image", "photo"],
|
|
592
|
-
видео: ["video"],
|
|
593
|
-
музыка: ["music"],
|
|
594
|
-
звук: [
|
|
595
|
-
"volume",
|
|
596
|
-
"speaker",
|
|
597
|
-
"audio"
|
|
598
|
-
],
|
|
599
|
-
микрофон: ["mic", "microphone"],
|
|
600
|
-
поиск: ["search"],
|
|
601
|
-
лупа: ["search"],
|
|
602
|
-
настройки: [
|
|
603
|
-
"settings",
|
|
604
|
-
"cog",
|
|
605
|
-
"gear"
|
|
606
|
-
],
|
|
607
|
-
меню: ["menu"],
|
|
608
|
-
закрыть: ["x", "close"],
|
|
609
|
-
удалить: ["trash", "delete"],
|
|
610
|
-
корзина: ["trash"],
|
|
611
|
-
редактировать: ["edit", "pencil"],
|
|
612
|
-
копировать: ["copy"],
|
|
613
|
-
сохранить: ["save"],
|
|
614
|
-
скачать: ["download"],
|
|
615
|
-
загрузить: ["upload"],
|
|
616
|
-
папка: ["folder"],
|
|
617
|
-
файл: ["file", "document"],
|
|
618
|
-
документ: ["file", "document"],
|
|
619
|
-
текст: ["text"],
|
|
620
|
-
календарь: ["calendar"],
|
|
621
|
-
время: ["clock"],
|
|
622
|
-
часы: ["clock", "watch"],
|
|
623
|
-
карта: ["map"],
|
|
624
|
-
глобус: ["globe"],
|
|
625
|
-
мир: [
|
|
626
|
-
"globe",
|
|
627
|
-
"world",
|
|
628
|
-
"earth"
|
|
629
|
-
],
|
|
630
|
-
адрес: [
|
|
631
|
-
"map-pin",
|
|
632
|
-
"location",
|
|
633
|
-
"pin"
|
|
634
|
-
],
|
|
635
|
-
метка: [
|
|
636
|
-
"map-pin",
|
|
637
|
-
"marker",
|
|
638
|
-
"pin"
|
|
639
|
-
],
|
|
640
|
-
стрелка: ["arrow", "chevron"],
|
|
641
|
-
влево: [
|
|
642
|
-
"left",
|
|
643
|
-
"arrow-left",
|
|
644
|
-
"chevron-left"
|
|
645
|
-
],
|
|
646
|
-
вправо: [
|
|
647
|
-
"right",
|
|
648
|
-
"arrow-right",
|
|
649
|
-
"chevron-right"
|
|
650
|
-
],
|
|
651
|
-
вверх: [
|
|
652
|
-
"up",
|
|
653
|
-
"arrow-up",
|
|
654
|
-
"chevron-up"
|
|
655
|
-
],
|
|
656
|
-
вниз: [
|
|
657
|
-
"down",
|
|
658
|
-
"arrow-down",
|
|
659
|
-
"chevron-down"
|
|
660
|
-
],
|
|
661
|
-
плей: ["play"],
|
|
662
|
-
пауза: ["pause"],
|
|
663
|
-
стоп: ["stop"],
|
|
664
|
-
галочка: ["check"],
|
|
665
|
-
крестик: ["x"],
|
|
666
|
-
плюс: ["plus"],
|
|
667
|
-
минус: ["minus"],
|
|
668
|
-
покупки: [
|
|
669
|
-
"shopping",
|
|
670
|
-
"cart",
|
|
671
|
-
"bag"
|
|
672
|
-
],
|
|
673
|
-
магазин: ["store", "shop"],
|
|
674
|
-
подарок: ["gift"],
|
|
675
|
-
щит: ["shield"],
|
|
676
|
-
банк: ["bank", "building"],
|
|
677
|
-
картабанковская: ["credit-card", "card"],
|
|
678
|
-
уведомление: ["bell"],
|
|
679
|
-
колокол: ["bell"],
|
|
680
|
-
флаг: ["flag"],
|
|
681
|
-
закладка: ["bookmark"],
|
|
682
|
-
ссылка: ["link"],
|
|
683
|
-
код: ["code", "terminal"],
|
|
684
|
-
терминал: ["terminal"],
|
|
685
|
-
лампочка: ["lightbulb", "light-bulb"],
|
|
686
|
-
идея: ["lightbulb"],
|
|
687
|
-
батарея: ["battery"],
|
|
688
|
-
питание: ["power", "plug"],
|
|
689
|
-
сеть: ["wifi", "network"],
|
|
690
|
-
принтер: ["printer"],
|
|
691
|
-
монитор: ["monitor", "display"],
|
|
692
|
-
компьютер: [
|
|
693
|
-
"computer",
|
|
694
|
-
"laptop",
|
|
695
|
-
"pc"
|
|
696
|
-
],
|
|
697
|
-
клавиатура: ["keyboard"],
|
|
698
|
-
книга: ["book"],
|
|
699
|
-
график: ["chart", "graph"],
|
|
700
|
-
таблица: ["table", "grid"],
|
|
701
|
-
список: ["list"],
|
|
702
|
-
фильтр: ["filter"],
|
|
703
|
-
тег: ["tag"],
|
|
704
|
-
отправить: ["send"],
|
|
705
|
-
поделиться: ["share"],
|
|
706
|
-
нравится: ["thumbs", "like"],
|
|
707
|
-
скрыть: ["eye-off", "hidden"],
|
|
708
|
-
предупреждение: ["alert", "warning"],
|
|
709
|
-
ошибка: ["x-circle", "alert-circle"],
|
|
710
|
-
успех: ["check-circle"],
|
|
711
|
-
информация: ["info"],
|
|
712
|
-
помощь: ["help"],
|
|
713
|
-
вопрос: ["help", "question"],
|
|
714
|
-
язык: [
|
|
715
|
-
"language",
|
|
716
|
-
"languages",
|
|
717
|
-
"translate"
|
|
718
|
-
],
|
|
719
|
-
перевод: ["language", "translate"],
|
|
720
|
-
масштаб: ["zoom", "maximize"],
|
|
721
|
-
экран: [
|
|
722
|
-
"monitor",
|
|
723
|
-
"screen",
|
|
724
|
-
"display"
|
|
725
|
-
],
|
|
726
|
-
цвет: ["palette", "swatch"],
|
|
727
|
-
кисть: ["brush", "paint"],
|
|
728
|
-
карандаш: ["pencil"],
|
|
729
|
-
выравнивание: ["align"],
|
|
730
|
-
центр: ["center"],
|
|
731
|
-
круг: ["circle"],
|
|
732
|
-
квадрат: ["square"],
|
|
733
|
-
вход: ["log-in", "login"],
|
|
734
|
-
выход: ["log-out", "logout"],
|
|
735
|
-
профиль: ["user", "account"],
|
|
736
|
-
команда: ["users", "group"],
|
|
737
|
-
задача: [
|
|
738
|
-
"check",
|
|
739
|
-
"list",
|
|
740
|
-
"todo"
|
|
741
|
-
],
|
|
742
|
-
цель: ["target"],
|
|
743
|
-
вложение: ["paperclip"],
|
|
744
|
-
архив: ["archive"],
|
|
745
|
-
ножницы: ["scissors"],
|
|
746
|
-
скрепка: ["paperclip"],
|
|
747
|
-
локация: ["map-pin"],
|
|
748
|
-
навигация: ["navigation", "compass"],
|
|
749
|
-
компас: ["compass"],
|
|
750
|
-
самолет: ["plane", "airplane"],
|
|
751
|
-
машина: ["car"],
|
|
752
|
-
мяч: ["ball"],
|
|
753
|
-
мячик: ["ball"],
|
|
754
|
-
поезд: ["train"],
|
|
755
|
-
корабль: ["ship"],
|
|
756
|
-
велосипед: ["bike", "bicycle"],
|
|
757
|
-
кофе: ["coffee"],
|
|
758
|
-
еда: [
|
|
759
|
-
"utensils",
|
|
760
|
-
"cake",
|
|
761
|
-
"pizza"
|
|
762
|
-
],
|
|
763
|
-
собака: ["dog"],
|
|
764
|
-
кошка: ["cat"],
|
|
765
|
-
птица: ["bird"],
|
|
766
|
-
дерево: ["tree"],
|
|
767
|
-
цветок: ["flower"],
|
|
768
|
-
гора: ["mountain"],
|
|
769
|
-
волны: ["waves"],
|
|
770
|
-
зонт: ["umbrella"],
|
|
771
|
-
работа: ["briefcase"],
|
|
772
|
-
школа: [
|
|
773
|
-
"school",
|
|
774
|
-
"academic",
|
|
775
|
-
"graduation"
|
|
776
|
-
],
|
|
777
|
-
больница: [
|
|
778
|
-
"cross",
|
|
779
|
-
"heart",
|
|
780
|
-
"medical"
|
|
781
|
-
],
|
|
782
|
-
ребенок: ["baby"],
|
|
783
|
-
семья: ["home", "users"],
|
|
784
|
-
группа: ["users", "group"],
|
|
785
|
-
мужчина: ["man", "user"],
|
|
786
|
-
женщина: ["woman", "user"],
|
|
787
|
-
кольцо: ["ring"],
|
|
788
|
-
корона: ["crown"],
|
|
789
|
-
медаль: ["medal", "award"],
|
|
790
|
-
кубок: ["trophy"],
|
|
791
|
-
рюкзак: ["backpack"],
|
|
792
|
-
чемодан: ["luggage"],
|
|
793
|
-
кошелек: ["wallet"],
|
|
794
|
-
очки: ["glasses"],
|
|
795
|
-
шляпа: ["hat"],
|
|
796
|
-
рубашка: ["shirt"],
|
|
797
|
-
обувь: ["shoe"],
|
|
798
|
-
здание: ["building"],
|
|
799
|
-
окно: ["window"],
|
|
800
|
-
дверь: ["door"],
|
|
801
|
-
лифт: ["arrow-up-down", "arrows-up-down"],
|
|
802
|
-
парковка: ["parking"],
|
|
803
|
-
топливо: ["fuel"],
|
|
804
|
-
дорога: ["route", "road"],
|
|
805
|
-
мост: ["bridge"],
|
|
806
|
-
река: ["waves"],
|
|
807
|
-
море: ["waves"],
|
|
808
|
-
ночь: ["moon"],
|
|
809
|
-
день: ["sun"],
|
|
810
|
-
таймер: ["timer"],
|
|
811
|
-
будильник: ["alarm"],
|
|
812
|
-
деньги: [
|
|
813
|
-
"banknote",
|
|
814
|
-
"currency",
|
|
815
|
-
"dollar"
|
|
816
|
-
],
|
|
817
|
-
процент: ["percent"],
|
|
818
|
-
квитанция: ["receipt"],
|
|
819
|
-
счет: ["receipt", "document"],
|
|
820
|
-
договор: ["document", "signature"],
|
|
821
|
-
печать: ["stamp"],
|
|
822
|
-
подпись: ["signature", "pen"],
|
|
823
|
-
суд: ["scale"],
|
|
824
|
-
полиция: ["shield"],
|
|
825
|
-
пожарные: ["fire"],
|
|
826
|
-
скорая: [
|
|
827
|
-
"life",
|
|
828
|
-
"buoy",
|
|
829
|
-
"cross"
|
|
830
|
-
],
|
|
831
|
-
аптека: ["pill"],
|
|
832
|
-
таблетка: ["pill"],
|
|
833
|
-
здоровье: ["heart", "pulse"],
|
|
834
|
-
рост: ["trending-up", "arrow-up"],
|
|
835
|
-
падение: ["trending-down", "arrow-down"],
|
|
836
|
-
робот: ["bot", "cpu"],
|
|
837
|
-
мозг: ["brain"],
|
|
838
|
-
база: ["database"],
|
|
839
|
-
сервер: ["server"],
|
|
840
|
-
облакоинтернет: ["cloud"],
|
|
841
|
-
заметка: ["note", "sticky"],
|
|
842
|
-
комментарий: ["chat", "bubble"],
|
|
843
|
-
якорь: ["anchor"],
|
|
844
|
-
пароль: ["key", "lock"],
|
|
845
|
-
отпечаток: ["fingerprint"],
|
|
846
|
-
обновить: ["refresh", "sync"],
|
|
847
|
-
синхронизация: ["refresh", "sync"],
|
|
848
|
-
наушники: ["headphones"],
|
|
849
|
-
громкость: ["volume"],
|
|
850
|
-
беззвука: ["volume-x", "mute"],
|
|
851
|
-
повтор: ["repeat"],
|
|
852
|
-
следующий: ["skip-forward", "forward"],
|
|
853
|
-
предыдущий: ["skip-back", "backward"],
|
|
854
|
-
камеравыкл: ["camera-off"],
|
|
855
|
-
микрофонвыкл: ["mic-off"],
|
|
856
|
-
телефонзвонок: ["phone-call"],
|
|
857
|
-
входящие: ["inbox"],
|
|
858
|
-
исходящие: ["send", "outbox"],
|
|
859
|
-
черновик: ["draft", "file"],
|
|
860
|
-
спам: ["ban", "shield"],
|
|
861
|
-
рассылка: ["mail", "send"],
|
|
862
|
-
подписка: ["bell", "rss"],
|
|
863
|
-
отписка: ["bell-off"],
|
|
864
|
-
палитра: ["palette"],
|
|
865
|
-
градиент: ["gradient"],
|
|
866
|
-
слои: ["layers"],
|
|
867
|
-
кроп: ["crop"],
|
|
868
|
-
поворот: ["rotate"],
|
|
869
|
-
гаечный: ["wrench"],
|
|
870
|
-
молоток: ["hammer"],
|
|
871
|
-
баг: ["bug"],
|
|
872
|
-
штрихкод: ["barcode"],
|
|
873
|
-
куаркод: ["qr-code"],
|
|
874
|
-
звезда2: ["sparkles"],
|
|
875
|
-
магия: ["wand", "sparkles"],
|
|
876
|
-
снежинка: ["snowflake"],
|
|
877
|
-
радуга: ["rainbow"],
|
|
878
|
-
лист: ["leaf"],
|
|
879
|
-
ракета: ["rocket"],
|
|
880
|
-
спутник: ["satellite"],
|
|
881
|
-
капля: ["droplet"],
|
|
882
|
-
грузовик: ["truck"],
|
|
883
|
-
автобус: ["bus"],
|
|
884
|
-
такси: ["car", "taxi"],
|
|
885
|
-
торт: ["cake"],
|
|
886
|
-
пицца: ["pizza"],
|
|
887
|
-
яблоко: ["apple"],
|
|
888
|
-
банан: ["banana"],
|
|
889
|
-
рыба: ["fish"],
|
|
890
|
-
вино: ["wine"],
|
|
891
|
-
пиво: ["beer"],
|
|
892
|
-
чашка: ["cup", "mug"],
|
|
893
|
-
рассылка2: ["mail", "megaphone"],
|
|
894
|
-
шаблон: ["layout", "file"],
|
|
895
|
-
воронка: ["filter", "funnel"],
|
|
896
|
-
аналитика: ["chart", "pie"],
|
|
897
|
-
отчет: ["document", "chart"],
|
|
898
|
-
дашборд: ["layout", "grid"],
|
|
899
|
-
поддержка: ["life-buoy", "headset"],
|
|
900
|
-
телеграм: ["telegram", "send"],
|
|
901
|
-
вотсап: ["whatsapp"],
|
|
902
|
-
инстаграм: ["instagram"],
|
|
903
|
-
ютуб: ["youtube"],
|
|
904
|
-
твиттер: ["twitter"],
|
|
905
|
-
фейсбук: ["facebook"],
|
|
906
|
-
гитхаб: ["github", "git"],
|
|
907
|
-
гугл: ["google", "chrome"],
|
|
908
|
-
яндекс: ["search"],
|
|
909
|
-
эпл: ["apple"],
|
|
910
|
-
вк: ["vk"]
|
|
911
|
-
};
|
|
912
|
-
function ke(e) {
|
|
913
|
-
return /[\u0400-\u04FF]/.test(e);
|
|
914
|
-
}
|
|
915
|
-
function Ae(e) {
|
|
916
|
-
return e >= 48 && e <= 57 || e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 1040 && e <= 1103 || e === 1025 || e === 1105;
|
|
917
|
-
}
|
|
918
|
-
function je(e) {
|
|
919
|
-
let t = 0, n = e.length;
|
|
920
|
-
for (; t < n && !Ae(e.charCodeAt(t));) t += 1;
|
|
921
|
-
for (; n > t && !Ae(e.charCodeAt(n - 1));) --n;
|
|
922
|
-
return e.slice(t, n);
|
|
923
|
-
}
|
|
924
|
-
function Me(e) {
|
|
925
|
-
return e.toLowerCase().trim().split(/[\s,.;/\\|]+/).map(je).filter((e) => e.length >= 2 && !H.has(e));
|
|
926
|
-
}
|
|
927
|
-
function Ne(e) {
|
|
928
|
-
let t = Me(e);
|
|
929
|
-
if (t.length === 0) return [];
|
|
930
|
-
let n = [];
|
|
931
|
-
for (let e of t) if (ke(e)) {
|
|
932
|
-
let t = U[e];
|
|
933
|
-
t?.length ? n.push([...t]) : n.push([e]);
|
|
934
|
-
} else n.push([e]);
|
|
935
|
-
return n;
|
|
936
|
-
}
|
|
937
|
-
function Pe(e) {
|
|
938
|
-
return {
|
|
939
|
-
direct: e.trim().toLowerCase(),
|
|
940
|
-
groups: Ne(e)
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
function W(e, t, n) {
|
|
944
|
-
return t.length >= 2 && e.includes(t) ? !0 : n.length !== 0 && n.every((t) => t.some((t) => t.length >= 2 && e.includes(t)));
|
|
945
|
-
}
|
|
946
|
-
//#endregion
|
|
947
|
-
//#region packages/file-manager/src/components/ImageIcons/iconSets.ts
|
|
948
|
-
var Fe = ["lucide", "tabler"], G = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), q = {};
|
|
949
|
-
function Ie(e) {
|
|
950
|
-
let t = q.baseUrl === e.baseUrl, n = q.path === e.path;
|
|
951
|
-
t && n || (q = e, G.clear(), K.clear());
|
|
952
|
-
}
|
|
953
|
-
function Le(e) {
|
|
954
|
-
let t = q.path || "static/media/icon-sets";
|
|
955
|
-
return v(q.baseUrl || "", `${t}/${e}.json`);
|
|
956
|
-
}
|
|
957
|
-
async function Re(e) {
|
|
958
|
-
try {
|
|
959
|
-
let t = await fetch(Le(e));
|
|
960
|
-
if (!t.ok) throw Error(`HTTP ${t.status}`);
|
|
961
|
-
let n = await t.json();
|
|
962
|
-
return G.set(e, n), n;
|
|
963
|
-
} catch (t) {
|
|
964
|
-
return console.error(`[file-manager] icon set "${e}" is not available at ${Le(e)}`, t), K.delete(e), null;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
function ze(e) {
|
|
968
|
-
let t = G.get(e);
|
|
969
|
-
if (t) return Promise.resolve(t);
|
|
970
|
-
let n = K.get(e) ?? Re(e);
|
|
971
|
-
return K.set(e, n), n;
|
|
972
|
-
}
|
|
973
|
-
async function Be() {
|
|
974
|
-
return (await Promise.all(Fe.map(async (e) => ({
|
|
975
|
-
prefix: e,
|
|
976
|
-
json: await ze(e)
|
|
977
|
-
})))).filter((e) => e.json !== null);
|
|
978
|
-
}
|
|
979
|
-
function J(e) {
|
|
980
|
-
return G.get(e) ?? null;
|
|
981
|
-
}
|
|
982
|
-
//#endregion
|
|
983
|
-
//#region packages/file-manager/src/components/ImageIcons/iconStockSearch.ts
|
|
984
|
-
var Ve = {
|
|
985
|
-
lucide: "Lucide",
|
|
986
|
-
tabler: "Tabler Icons"
|
|
987
|
-
};
|
|
988
|
-
function He(e, t) {
|
|
989
|
-
let n = t, r = e.icons;
|
|
990
|
-
for (let e = 0; e < 24; e += 1) {
|
|
991
|
-
let e = r[n];
|
|
992
|
-
if (e && typeof e.parent == "string") {
|
|
993
|
-
n = e.parent;
|
|
994
|
-
continue;
|
|
995
|
-
}
|
|
996
|
-
break;
|
|
997
|
-
}
|
|
998
|
-
return n;
|
|
999
|
-
}
|
|
1000
|
-
function Ue(e, t) {
|
|
1001
|
-
let n = e.icons[t];
|
|
1002
|
-
return !!(n && "body" in n && n.hidden);
|
|
1003
|
-
}
|
|
1004
|
-
function We(e) {
|
|
1005
|
-
return e.split("-").map((e) => e.length ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" ");
|
|
1006
|
-
}
|
|
1007
|
-
function Ge(e, t) {
|
|
1008
|
-
let n = e.prefix || t.toLowerCase(), r = [];
|
|
1009
|
-
for (let i of Object.keys(e.icons)) {
|
|
1010
|
-
let a = e.icons[i];
|
|
1011
|
-
if (a && "body" in a && a.hidden) continue;
|
|
1012
|
-
let o = He(e, i);
|
|
1013
|
-
if (Ue(e, o) || !R(e, i)) continue;
|
|
1014
|
-
let s = `${i} ${i.replace(/-/g, " ")}`.toLowerCase();
|
|
1015
|
-
r.push({
|
|
1016
|
-
prefix: n,
|
|
1017
|
-
slug: i,
|
|
1018
|
-
canonical: o,
|
|
1019
|
-
haystack: s,
|
|
1020
|
-
label: t
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
return r;
|
|
1024
|
-
}
|
|
1025
|
-
var Ke = null;
|
|
1026
|
-
async function qe() {
|
|
1027
|
-
return Ke ||= (await Be()).flatMap(({ prefix: e, json: t }) => Ge(t, Ve[e])), Ke;
|
|
1028
|
-
}
|
|
1029
|
-
function Y(e, t, n) {
|
|
1030
|
-
let { haystack: r, slug: i } = e;
|
|
1031
|
-
if (!W(r, t, n)) return 0;
|
|
1032
|
-
let a = 10;
|
|
1033
|
-
if (t.length >= 2 && r.includes(t)) i.startsWith(t) ? a += 100 : r.startsWith(t) ? a += 50 : r.split(/\s+/).some((e) => e.startsWith(t)) ? a += 30 : a += 15;
|
|
1034
|
-
else if (n.length > 0) for (let e of n) {
|
|
1035
|
-
let t = e.filter((e) => e.length >= 2 && r.includes(e));
|
|
1036
|
-
if (t.length === 0) continue;
|
|
1037
|
-
let n = Math.max(...t.map((e) => i.startsWith(e) ? 100 : r.startsWith(e) ? 50 : r.split(/\s+/).some((t) => t.startsWith(e)) ? 30 : 15));
|
|
1038
|
-
a += n;
|
|
1039
|
-
}
|
|
1040
|
-
return a;
|
|
1041
|
-
}
|
|
1042
|
-
async function Je(e) {
|
|
1043
|
-
let t = e.trim();
|
|
1044
|
-
if (t.length < 3) return [];
|
|
1045
|
-
let { direct: n, groups: r } = Pe(t), i = /* @__PURE__ */ new Map();
|
|
1046
|
-
for (let e of await qe()) {
|
|
1047
|
-
let t = Y(e, n, r);
|
|
1048
|
-
if (t <= 0) continue;
|
|
1049
|
-
let a = `${e.prefix}:${e.canonical}`, o = i.get(a);
|
|
1050
|
-
(!o || t > o.score) && i.set(a, { score: t });
|
|
1051
|
-
}
|
|
1052
|
-
return Array.from(i.entries()).sort((e, t) => t[1].score - e[1].score || e[0].localeCompare(t[0])).map(([e]) => e);
|
|
1053
|
-
}
|
|
1054
|
-
function Ye(e, t) {
|
|
1055
|
-
if (t.length === 0) return e;
|
|
1056
|
-
let n = new Set(e), r = [...e];
|
|
1057
|
-
for (let e of t) n.has(e) || (n.add(e), r.push(e));
|
|
1058
|
-
return r;
|
|
1059
|
-
}
|
|
1060
|
-
function Xe(e) {
|
|
1061
|
-
let t = e.indexOf(":"), n = t > 0 ? e.slice(0, t) : "", r = t > 0 ? e.slice(t + 1) : e, i = Ve[n] ?? n;
|
|
1062
|
-
return {
|
|
1063
|
-
hash: e,
|
|
1064
|
-
name: We(r),
|
|
1065
|
-
imagePreviewUrl: "",
|
|
1066
|
-
isFree: !0,
|
|
1067
|
-
familySlug: n,
|
|
1068
|
-
familyName: i
|
|
1069
|
-
};
|
|
1070
|
-
}
|
|
1071
|
-
//#endregion
|
|
1072
|
-
//#region packages/file-manager/src/utils/svgParseUtils.ts
|
|
1073
|
-
var X = "path|rect|circle|ellipse|polygon|line|polyline|g";
|
|
1074
|
-
function Ze(e) {
|
|
1075
|
-
let t = e.trim();
|
|
1076
|
-
if (/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t)) {
|
|
1077
|
-
let e = t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})/);
|
|
1078
|
-
if (e) return "#" + (e[1].length === 3 ? e[1].replace(/(.)/g, "$1$1") : e[1]).toLowerCase();
|
|
1079
|
-
}
|
|
1080
|
-
let n = t.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);
|
|
1081
|
-
if (n) return "#" + [
|
|
1082
|
-
1,
|
|
1083
|
-
2,
|
|
1084
|
-
3
|
|
1085
|
-
].map((e) => parseInt(n[e], 10).toString(16).padStart(2, "0")).join("");
|
|
1086
|
-
let r = t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*[\d.]+\s*\)/);
|
|
1087
|
-
return r ? "#" + [
|
|
1088
|
-
1,
|
|
1089
|
-
2,
|
|
1090
|
-
3
|
|
1091
|
-
].map((e) => parseInt(r[e], 10).toString(16).padStart(2, "0")).join("") : {
|
|
1092
|
-
black: "#000000",
|
|
1093
|
-
white: "#ffffff",
|
|
1094
|
-
red: "#ff0000",
|
|
1095
|
-
green: "#008000",
|
|
1096
|
-
blue: "#0000ff"
|
|
1097
|
-
}[t.toLowerCase()] ?? (Z(t) || "#000000");
|
|
1098
|
-
}
|
|
1099
|
-
function Z(e) {
|
|
1100
|
-
let t = e.trim();
|
|
1101
|
-
if (!t || t === "none" || t === "transparent" || /^url\(#/.test(t)) return null;
|
|
1102
|
-
if (/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t)) {
|
|
1103
|
-
let e = t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})/);
|
|
1104
|
-
return e ? "#" + (e[1].length === 3 ? e[1].replace(/(.)/g, "$1$1") : e[1]).toLowerCase() : null;
|
|
1105
|
-
}
|
|
1106
|
-
if (/^rgb\(/.test(t)) {
|
|
1107
|
-
let e = t.match(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);
|
|
1108
|
-
if (e) return "#" + [
|
|
1109
|
-
1,
|
|
1110
|
-
2,
|
|
1111
|
-
3
|
|
1112
|
-
].map((t) => parseInt(e[t], 10).toString(16).padStart(2, "0")).join("");
|
|
1113
|
-
}
|
|
1114
|
-
if (/^rgba\(/.test(t)) {
|
|
1115
|
-
let e = t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*[\d.]+\s*\)/);
|
|
1116
|
-
if (e) return "#" + [
|
|
1117
|
-
1,
|
|
1118
|
-
2,
|
|
1119
|
-
3
|
|
1120
|
-
].map((t) => parseInt(e[t], 10).toString(16).padStart(2, "0")).join("");
|
|
1121
|
-
}
|
|
1122
|
-
let n = {
|
|
1123
|
-
black: "#000000",
|
|
1124
|
-
white: "#ffffff",
|
|
1125
|
-
red: "#ff0000",
|
|
1126
|
-
green: "#008000",
|
|
1127
|
-
blue: "#0000ff"
|
|
1128
|
-
}, r = t.toLowerCase();
|
|
1129
|
-
return n[r] ? n[r] : (r === "currentcolor" || r === "inherit" || /^[a-zA-Z]+$/.test(t), null);
|
|
1130
|
-
}
|
|
1131
|
-
function Q(e, t) {
|
|
1132
|
-
let n = RegExp(`${t}\\s*:\\s*([^;]+)`, "i"), r = e.match(n);
|
|
1133
|
-
return r ? r[1].trim() : null;
|
|
1134
|
-
}
|
|
1135
|
-
function Qe(e) {
|
|
1136
|
-
let t = [], n = /* @__PURE__ */ new Set();
|
|
1137
|
-
Array.from(e.matchAll(/<stop[^>]*?stop-color\s*=\s*["']([^"']+)["']/gi)).map((e) => e[1]).forEach((e) => {
|
|
1138
|
-
let r = Z(e);
|
|
1139
|
-
r && !n.has(r) && (n.add(r), t.push(e));
|
|
1140
|
-
});
|
|
1141
|
-
let r = RegExp(`<(?:${X})([^>]*)>`, "gi"), i;
|
|
1142
|
-
for (; (i = r.exec(e)) !== null;) {
|
|
1143
|
-
let e = i[1], r = e.match(/fill\s*=\s*["']([^"']*)["']/i);
|
|
1144
|
-
if (r && r[1]) {
|
|
1145
|
-
let e = Z(r[1]);
|
|
1146
|
-
e && !n.has(e) && (n.add(e), t.push(r[1]));
|
|
1147
|
-
}
|
|
1148
|
-
let a = e.match(/stroke\s*=\s*["']([^"']*)["']/i);
|
|
1149
|
-
if (a && a[1]) {
|
|
1150
|
-
let e = Z(a[1]);
|
|
1151
|
-
e && !n.has(e) && (n.add(e), t.push(a[1]));
|
|
1152
|
-
}
|
|
1153
|
-
let o = e.match(/style\s*=\s*["']([^"']*)["']/i);
|
|
1154
|
-
if (o && o[1]) {
|
|
1155
|
-
let e = Q(o[1], "fill");
|
|
1156
|
-
if (e) {
|
|
1157
|
-
let r = Z(e);
|
|
1158
|
-
r && !n.has(r) && (n.add(r), t.push(e));
|
|
1159
|
-
}
|
|
1160
|
-
let r = Q(o[1], "stroke");
|
|
1161
|
-
if (r) {
|
|
1162
|
-
let e = Z(r);
|
|
1163
|
-
e && !n.has(e) && (n.add(e), t.push(r));
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
let a = e.match(/<svg([^>]*)>/i);
|
|
1168
|
-
if (a && a[1]) {
|
|
1169
|
-
let e = a[1];
|
|
1170
|
-
for (let [r, i] of [["fill", /fill\s*=\s*["']([^"']*)["']/i], ["stroke", /stroke\s*=\s*["']([^"']*)["']/i]]) {
|
|
1171
|
-
let r = e.match(i);
|
|
1172
|
-
if (r && r[1]) {
|
|
1173
|
-
let e = Z(r[1]);
|
|
1174
|
-
e && !n.has(e) && (n.add(e), t.push(r[1]));
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
let r = e.match(/style\s*=\s*["']([^"']*)["']/i);
|
|
1178
|
-
if (r && r[1]) for (let e of ["fill", "stroke"]) {
|
|
1179
|
-
let i = Q(r[1], e);
|
|
1180
|
-
if (i) {
|
|
1181
|
-
let e = Z(i);
|
|
1182
|
-
e && !n.has(e) && (n.add(e), t.push(i));
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
return t;
|
|
1187
|
-
}
|
|
1188
|
-
function $e(e) {
|
|
1189
|
-
let t = 0, n = RegExp(`<(?:${X})([^>]*)>`, "gi"), r;
|
|
1190
|
-
for (; (r = n.exec(e)) !== null;) {
|
|
1191
|
-
let e = r[1], n = e.match(/fill\s*=\s*["']([^"']*)["']/i), i = e.match(/style\s*=\s*["']([^"']*)["']/i), a = n && n[1] && !/^none$/i.test(n[1]) && !/^url\(#/i.test(n[1]), o = i && Q(i[1], "fill") && !/^none$/i.test(Q(i[1], "fill"));
|
|
1192
|
-
(a || o) && (t += 1);
|
|
1193
|
-
}
|
|
1194
|
-
return t;
|
|
1195
|
-
}
|
|
1196
|
-
function et(e) {
|
|
1197
|
-
let t = 0, n = RegExp(`<(?:${X})([^>]*)>`, "gi"), r;
|
|
1198
|
-
for (; (r = n.exec(e)) !== null;) {
|
|
1199
|
-
let e = r[1], n = e.match(/stroke\s*=\s*["']([^"']*)["']/i), i = e.match(/style\s*=\s*["']([^"']*)["']/i), a = n && n[1] && !/^none$/i.test(n[1]) && !/^url\(#/i.test(n[1]), o = i && Q(i[1], "stroke") && !/^none$/i.test(Q(i[1], "stroke"));
|
|
1200
|
-
(a || o) && (t += 1);
|
|
1201
|
-
}
|
|
1202
|
-
return t;
|
|
1203
|
-
}
|
|
1204
|
-
function tt(e) {
|
|
1205
|
-
return /<linearGradient/i.test(e) || /<radialGradient/i.test(e) || /fill="url\(#|stroke="url\(#/i.test(e);
|
|
1206
|
-
}
|
|
1207
|
-
function nt(e) {
|
|
1208
|
-
let t = e.trim().replace(/(?:px|em|ex|%)\s*$/i, ""), n = parseFloat(t);
|
|
1209
|
-
return Number.isNaN(n) || n <= 0 || n > 10 ? null : Math.round(n * 10) / 10;
|
|
1210
|
-
}
|
|
1211
|
-
function rt(e) {
|
|
1212
|
-
let t = [], n = e.indexOf("</defs>"), r = n >= 0 ? e.slice(n) : e, i = RegExp(`<(?:${X})[^>]*stroke-width\\s*=\\s*["']([^"']+)["']`, "gi"), a;
|
|
1213
|
-
for (; (a = i.exec(r)) !== null;) {
|
|
1214
|
-
let e = nt(a[1]);
|
|
1215
|
-
e != null && t.push(e);
|
|
1216
|
-
}
|
|
1217
|
-
let o = RegExp(`<(?:${X})[^>]*style\\s*=\\s*["'][^"']*stroke-width\\s*:\\s*([^;"]+)[^"']*["']`, "gi");
|
|
1218
|
-
for (; (a = o.exec(r)) !== null;) {
|
|
1219
|
-
let e = nt(a[1]);
|
|
1220
|
-
e != null && t.push(e);
|
|
1221
|
-
}
|
|
1222
|
-
if (t.length === 0) return;
|
|
1223
|
-
t.sort((e, t) => e - t);
|
|
1224
|
-
let s = Math.floor(t.length / 2);
|
|
1225
|
-
return t.length % 2 == 1 ? t[s] : (t[s - 1] + t[s]) / 2;
|
|
1226
|
-
}
|
|
1227
|
-
function it(e) {
|
|
1228
|
-
return {
|
|
1229
|
-
colors: Qe(e),
|
|
1230
|
-
fillsCount: $e(e),
|
|
1231
|
-
strokesCount: et(e),
|
|
1232
|
-
hasGradient: tt(e),
|
|
1233
|
-
strokeWidth: rt(e)
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
function at(e) {
|
|
1237
|
-
let t = [], n = /* @__PURE__ */ new Set(), r = 0, i = 0, a = !1, o;
|
|
1238
|
-
for (let s of e) {
|
|
1239
|
-
r += s.fillsCount, i += s.strokesCount, s.hasGradient && (a = !0);
|
|
1240
|
-
for (let e of s.colors) {
|
|
1241
|
-
let r = Z(e);
|
|
1242
|
-
r && !n.has(r) && (n.add(r), t.push(e));
|
|
1243
|
-
}
|
|
1244
|
-
o == null && s.strokeWidth != null && (o = s.strokeWidth);
|
|
1245
|
-
}
|
|
1246
|
-
return {
|
|
1247
|
-
colors: t,
|
|
1248
|
-
fillsCount: r,
|
|
1249
|
-
strokesCount: i,
|
|
1250
|
-
hasGradient: a,
|
|
1251
|
-
strokeWidth: o
|
|
1252
|
-
};
|
|
1253
|
-
}
|
|
1254
|
-
function ot(e) {
|
|
1255
|
-
let t = /* @__PURE__ */ new Map(), n = { v: 1 }, r = (e) => {
|
|
1256
|
-
let r = Z(e);
|
|
1257
|
-
r && !t.has(r) && (t.set(r, n.v), n.v = Math.min(n.v + 1, 3));
|
|
1258
|
-
}, i = e.match(/<svg([^>]*)>/i);
|
|
1259
|
-
if (i?.[1]) {
|
|
1260
|
-
let e = i[1], t = e.match(/fill\s*=\s*["']([^"']*)["']/i), n = e.match(/stroke\s*=\s*["']([^"']*)["']/i);
|
|
1261
|
-
t?.[1] && !/^none$/i.test(t[1]) && !/^url\(#/i.test(t[1]) && r(t[1]), n?.[1] && !/^none$/i.test(n[1]) && !/^url\(#/i.test(n[1]) && r(n[1]);
|
|
1262
|
-
}
|
|
1263
|
-
let a = RegExp(`<(?:${X})([^>]*)>`, "gi"), o;
|
|
1264
|
-
for (; (o = a.exec(e)) !== null;) {
|
|
1265
|
-
let e = o[1], t = e.match(/fill\s*=\s*["']([^"']*)["']/i), n = e.match(/style\s*=\s*["']([^"']*)["']/i)?.[1]?.match(/fill\s*:\s*([^;]+)/i), i = (t?.[1] ?? n?.[1]?.trim())?.trim();
|
|
1266
|
-
i && !/^none$/i.test(i) && !/^url\(#/i.test(i) && r(i);
|
|
1267
|
-
let a = e.match(/stroke\s*=\s*["']([^"']*)["']/i), s = e.match(/style\s*=\s*["']([^"']*)["']/i)?.[1]?.match(/stroke\s*:\s*([^;]+)/i), c = (a?.[1] ?? s?.[1]?.trim())?.trim();
|
|
1268
|
-
c && !/^none$/i.test(c) && !/^url\(#/i.test(c) && r(c);
|
|
1269
|
-
}
|
|
1270
|
-
return t;
|
|
1271
|
-
}
|
|
1272
|
-
function st(e) {
|
|
1273
|
-
let t = [], n = /* @__PURE__ */ new Set(), r = (e) => {
|
|
1274
|
-
let r = Z(e);
|
|
1275
|
-
r && !n.has(r) && (n.add(r), t.push(e));
|
|
1276
|
-
}, i = Array.from(e.matchAll(/<stop[^>]*?stop-color\s*=\s*["']([^"']+)["']/gi)).map((e) => e[1]);
|
|
1277
|
-
if (i.length >= 2) return i.slice(0, 3).forEach((e) => r(e)), t;
|
|
1278
|
-
let a = e.match(/<svg([^>]*)>/i);
|
|
1279
|
-
if (a?.[1]) {
|
|
1280
|
-
let e = a[1], t = e.match(/fill\s*=\s*["']([^"']*)["']/i), n = e.match(/stroke\s*=\s*["']([^"']*)["']/i);
|
|
1281
|
-
t?.[1] && !/^none$/i.test(t[1]) && !/^url\(#/i.test(t[1]) && r(t[1]), n?.[1] && !/^none$/i.test(n[1]) && !/^url\(#/i.test(n[1]) && r(n[1]);
|
|
1282
|
-
}
|
|
1283
|
-
let o = RegExp(`<(?:${X})([^>]*)>`, "gi"), s;
|
|
1284
|
-
for (; (s = o.exec(e)) !== null;) {
|
|
1285
|
-
let e = s[1], t = e.match(/fill\s*=\s*["']([^"']*)["']/i), n = e.match(/style\s*=\s*["']([^"']*)["']/i)?.[1]?.match(/fill\s*:\s*([^;]+)/i), i = (t?.[1] ?? n?.[1]?.trim())?.trim();
|
|
1286
|
-
i && !/^none$/i.test(i) && !/^url\(#/i.test(i) && r(i);
|
|
1287
|
-
let a = e.match(/stroke\s*=\s*["']([^"']*)["']/i), o = e.match(/style\s*=\s*["']([^"']*)["']/i)?.[1]?.match(/stroke\s*:\s*([^;]+)/i), c = (a?.[1] ?? o?.[1]?.trim())?.trim();
|
|
1288
|
-
c && !/^none$/i.test(c) && !/^url\(#/i.test(c) && r(c);
|
|
1289
|
-
}
|
|
1290
|
-
return t.slice(0, 3);
|
|
1291
|
-
}
|
|
1292
|
-
//#endregion
|
|
1293
|
-
//#region packages/file-manager/src/components/ImageIcons/normalizeSvgForCss.ts
|
|
1294
|
-
function ct(e, t) {
|
|
1295
|
-
let n = e, r = /<linearGradient[\s\S]*?<\/linearGradient>/i.test(n) || /<radialGradient[\s\S]*?<\/radialGradient>/i.test(n);
|
|
1296
|
-
if (!(/fill="url\(#/i.test(n) || /stroke="url\(#/i.test(n))) {
|
|
1297
|
-
let e = ot(n), t = (t) => {
|
|
1298
|
-
let n = Z(t), r = n ? e.get(n) : void 0;
|
|
1299
|
-
return r === 1 ? "var(--em-icon-color-1)" : r === 2 ? "var(--em-icon-color-2)" : r === 3 ? "var(--em-icon-color-3)" : "currentColor";
|
|
1300
|
-
};
|
|
1301
|
-
n = n.replace(/<svg([^>]*)>/i, (e, n) => {
|
|
1302
|
-
let r = n, i = n.match(/fill\s*=\s*["']([^"']*)["']/i);
|
|
1303
|
-
i?.[1] && !/^none$/i.test(i[1]) && !/^url\(#/i.test(i[1]) && (r = r.replace(/fill\s*=\s*["'][^"']*["']/i, `fill="${t(i[1])}"`));
|
|
1304
|
-
let a = n.match(/stroke\s*=\s*["']([^"']*)["']/i);
|
|
1305
|
-
return a?.[1] && !/^none$/i.test(a[1]) && !/^url\(#/i.test(a[1]) && (r = r.replace(/stroke\s*=\s*["'][^"']*["']/i, `stroke="${t(a[1])}"`)), `<svg${r}>`;
|
|
1306
|
-
}), n = n.replace(/<(path|rect|circle|ellipse|polygon|line|polyline)([^>]*?)(\/>|>)/gi, (e, n, r, i) => {
|
|
1307
|
-
let a = r, o = r.match(/fill\s*=\s*["']([^"']*)["']/i), s = r.match(/style\s*=\s*["']([^"']*)["']/i), c = s?.[1]?.match(/fill\s*:\s*([^;]+)/i), l = (o?.[1] ?? c?.[1]?.trim())?.trim();
|
|
1308
|
-
if (l && !/^none$/i.test(l) && !/^url\(#/i.test(l)) {
|
|
1309
|
-
let e = t(l);
|
|
1310
|
-
o ? a = a.replace(/fill\s*=\s*["'][^"']*["']/i, `fill="${e}"`) : s?.[1] && (a = a.replace(/style\s*=\s*["']([^"']*)["']/i, (t, n) => "style=\"" + n.replace(/fill\s*:\s*[^;]+/gi, "fill: " + e) + "\""));
|
|
1311
|
-
}
|
|
1312
|
-
let u = r.match(/stroke\s*=\s*["']([^"']*)["']/i), d = r.match(/style\s*=\s*["']([^"']*)["']/i), f = d?.[1]?.match(/stroke\s*:\s*([^;]+)/i), p = (u?.[1] ?? f?.[1]?.trim())?.trim();
|
|
1313
|
-
if (p && !/^none$/i.test(p) && !/^url\(#/i.test(p)) {
|
|
1314
|
-
let e = t(p);
|
|
1315
|
-
u ? a = a.replace(/stroke\s*=\s*["'][^"']*["']/i, `stroke="${e}"`) : d?.[1] && (a = a.replace(/style\s*=\s*["']([^"']*)["']/i, (t, n) => "style=\"" + n.replace(/stroke\s*:\s*[^;]+/gi, "stroke: " + e) + "\""));
|
|
1316
|
-
}
|
|
1317
|
-
return `<${n}${a}${i}`;
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
return r && (n = n.replace(/<linearGradient([^>]*?)>([\s\S]*?)<\/linearGradient>/gi, (e, t, n) => {
|
|
1321
|
-
let r = 0;
|
|
1322
|
-
return `<linearGradient${t}>${n.replace(/<stop([^>]*?)>/gi, (e, t) => {
|
|
1323
|
-
let n = r === 0 ? "var(--em-icon-grad-1)" : "var(--em-icon-grad-2)";
|
|
1324
|
-
return r += 1, /stop-color\s*=/.test(t) ? "<stop" + t.replace(/stop-color="[^"]*"/i, "stop-color=\"" + n + "\"") + ">" : "<stop" + t + " stop-color=\"" + n + "\">";
|
|
1325
|
-
})}</linearGradient>`;
|
|
1326
|
-
}), n = n.replace(/<radialGradient([^>]*?)>([\s\S]*?)<\/radialGradient>/gi, (e, t, n) => {
|
|
1327
|
-
let r = 0;
|
|
1328
|
-
return `<radialGradient${t}>${n.replace(/<stop([^>]*?)>/gi, (e, t) => {
|
|
1329
|
-
let n = r === 0 ? "var(--em-icon-grad-1)" : "var(--em-icon-grad-2)";
|
|
1330
|
-
return r += 1, /stop-color\s*=/.test(t) ? "<stop" + t.replace(/stop-color="[^"]*"/i, "stop-color=\"" + n + "\"") + ">" : "<stop" + t + " stop-color=\"" + n + "\">";
|
|
1331
|
-
})}</radialGradient>`;
|
|
1332
|
-
})), typeof t?.strokeWidth == "number" && !Number.isNaN(t.strokeWidth) && (/stroke-width\s*=\s*["'][^"']*["']/i.test(n) && (n = n.replace(/stroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${t.strokeWidth}"`)), /stroke-width\s*:/.test(n) && (n = n.replace(/stroke-width\s*:\s*[^;]+/gi, `stroke-width: ${t.strokeWidth}`)), /stroke-width/i.test(n) || (n = n.replace(/<svg/, `<svg stroke-width="${t.strokeWidth}"`))), n = n.replace(/<svg([^>]*)>/i, (e, t) => `<svg${t.replace(/\swidth="[^"]*"/i, "").replace(/\sheight="[^"]*"/i, "")} width="100%" height="100%">`), n;
|
|
1333
|
-
}
|
|
1334
|
-
//#endregion
|
|
1335
|
-
//#region packages/file-manager/src/components/ImageIcons/useIconifyStock.ts
|
|
1336
|
-
var $ = /* @__PURE__ */ new Map();
|
|
1337
|
-
function lt(e) {
|
|
1338
|
-
let t = e.indexOf(":");
|
|
1339
|
-
if (t <= 0) return null;
|
|
1340
|
-
let n = e.slice(0, t), r = e.slice(t + 1);
|
|
1341
|
-
return r ? {
|
|
1342
|
-
prefix: n,
|
|
1343
|
-
slug: r
|
|
1344
|
-
} : null;
|
|
1345
|
-
}
|
|
1346
|
-
function ut(e, t, n) {
|
|
1347
|
-
let r = J(e);
|
|
1348
|
-
if (!r) throw Error(`Unknown icon set prefix: ${e}`);
|
|
1349
|
-
let i = R(r, t);
|
|
1350
|
-
if (!i) throw Error(`Unknown icon: ${e}:${t}`);
|
|
1351
|
-
let a = V(i, {
|
|
1352
|
-
width: n,
|
|
1353
|
-
height: n
|
|
1354
|
-
}), o = Oe(a.body, a.attributes);
|
|
1355
|
-
return o = o.replace(/<svg([^>]*)>/i, (e, t) => `<svg${t.replace(/\swidth="[^"]*"/i, "").replace(/\sheight="[^"]*"/i, "")} width="100%" height="100%">`), o;
|
|
1356
|
-
}
|
|
1357
|
-
function dt(e) {
|
|
1358
|
-
return {
|
|
1359
|
-
fetchSvgDataUrl: b.useCallback(async (t, n) => {
|
|
1360
|
-
let r = lt(t);
|
|
1361
|
-
if (!r) throw Error(`Invalid icon id (expected prefix:name): ${t}`);
|
|
1362
|
-
let { prefix: i, slug: a } = r, o = n?.size ?? 96, s = [
|
|
1363
|
-
t,
|
|
1364
|
-
e ? "css=1" : "css=0",
|
|
1365
|
-
e ? "" : `c1=${n?.inlineColors?.colorHex ?? ""}|c2=${n?.inlineColors?.colorHex2 ?? ""}|c3=${n?.inlineColors?.colorHex3 ?? ""}`,
|
|
1366
|
-
n?.strokeWidth == null ? "" : `sw=${n.strokeWidth}`,
|
|
1367
|
-
`s=${o}`
|
|
1368
|
-
].filter(Boolean).join("|"), l = $.get(s);
|
|
1369
|
-
if (l) return l;
|
|
1370
|
-
if (n?.signal?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
1371
|
-
await Be();
|
|
1372
|
-
let u = ut(i, a, o), d = u;
|
|
1373
|
-
e ? d = ct(d, { strokeWidth: n?.strokeWidth }) : n?.inlineColors && (d = c(d, n.inlineColors));
|
|
1374
|
-
let f = `data:image/svg+xml;utf8,${encodeURIComponent(d)}`, p = {
|
|
1375
|
-
text: d,
|
|
1376
|
-
url: f,
|
|
1377
|
-
original: u
|
|
1378
|
-
};
|
|
1379
|
-
return $.set(s, p), p;
|
|
1380
|
-
}, [e]),
|
|
1381
|
-
normalizeSvgForCss: ct
|
|
1382
|
-
};
|
|
1383
|
-
}
|
|
1384
|
-
//#endregion
|
|
1385
|
-
//#region packages/file-manager/src/components/ImageIcons/useIconsCopyToFolder.tsx
|
|
1386
|
-
async function ft(t) {
|
|
1387
|
-
let { hashes: n, items: r, folderId: i, dataProviders: o, getPngDataUrlForItem: s, dataUrlToBlob: c, config: u } = t, d = 0, f = 0;
|
|
1388
|
-
for (let t of n) {
|
|
1389
|
-
let n = r.find((e) => e.hash === t);
|
|
1390
|
-
if (!n) {
|
|
1391
|
-
f += 1;
|
|
1392
|
-
continue;
|
|
1393
|
-
}
|
|
1394
|
-
let p = await s(n);
|
|
1395
|
-
if (!p) {
|
|
1396
|
-
f += 1;
|
|
1397
|
-
continue;
|
|
1398
|
-
}
|
|
1399
|
-
let m = n.name?.trim() || `icon-${t}`, h = l(`${m}.png`, u), g = await a(o, h, i, !1, e(u)), _ = c(p, "image/png"), v = new File([_], g, {
|
|
1400
|
-
type: "image/png",
|
|
1401
|
-
lastModified: Date.now()
|
|
1402
|
-
});
|
|
1403
|
-
try {
|
|
1404
|
-
await o.uploadFile({
|
|
1405
|
-
name: g,
|
|
1406
|
-
size: v.size,
|
|
1407
|
-
type: v.type,
|
|
1408
|
-
folderId: i,
|
|
1409
|
-
data: v,
|
|
1410
|
-
extension: "png"
|
|
1411
|
-
}), d += 1;
|
|
1412
|
-
} catch {
|
|
1413
|
-
f += 1;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
return {
|
|
1417
|
-
successCount: d,
|
|
1418
|
-
failCount: f
|
|
1419
|
-
};
|
|
1420
|
-
}
|
|
1421
|
-
var pt = ({ items: e, selectedHashes: t, getPngDataUrlForItem: n, dataUrlToBlob: i, clearSelection: a }) => {
|
|
1422
|
-
let { t: c } = s(), { options: l, state: d } = o(), f = r(), [m, h] = b.useState(!1), [g] = T.useForm(), [_, v] = b.useState(!1), x = b.useRef(!1), { state: S, actions: { fetchFolders: C, fetchChildFolders: w, handleModalOk: ee } } = u(), { EmptyFolderIcon: E } = y(), { activeFormField: te, setActiveFormField: D, generateMenuItemsFromFolders: ne } = p({
|
|
1423
|
-
folders: Array.isArray(S.folders) ? S.folders : [],
|
|
1424
|
-
selectedFolder: d.selectedFolder,
|
|
1425
|
-
EmptyFolderIcon: E,
|
|
1426
|
-
handleCreateFolderModalOk: ee,
|
|
1427
|
-
setIsLoading: v,
|
|
1428
|
-
t: c
|
|
1429
|
-
}), re = b.useCallback(async () => {
|
|
1430
|
-
await C(), h(!0);
|
|
1431
|
-
}, [C]), ie = b.useCallback(async (e) => {
|
|
1432
|
-
e.length > 0 && (g.setFieldsValue({ targetFolder: e[0] }), te !== e[0].toString() && D(""));
|
|
1433
|
-
}, [
|
|
1434
|
-
te,
|
|
1435
|
-
g,
|
|
1436
|
-
D
|
|
1437
|
-
]), O = b.useCallback(async (r) => {
|
|
1438
|
-
try {
|
|
1439
|
-
let { dataProviders: o } = l;
|
|
1440
|
-
if (!o || !o.uploadFile && !o.uploadFiles) {
|
|
1441
|
-
f.error({
|
|
1442
|
-
id: "FILES_UPLOAD_PROVIDER_NOT_CONFIGURED",
|
|
1443
|
-
message: c("API-endpoint for file upload is not configured"),
|
|
1444
|
-
placement: "bottomRight"
|
|
1445
|
-
});
|
|
1446
|
-
return;
|
|
1447
|
-
}
|
|
1448
|
-
let s = r || d?.selectedFolder || void 0, u = Array.from(t);
|
|
1449
|
-
if (u.length === 0) return;
|
|
1450
|
-
let { successCount: p, failCount: m } = await ft({
|
|
1451
|
-
hashes: u,
|
|
1452
|
-
items: e,
|
|
1453
|
-
folderId: s,
|
|
1454
|
-
dataProviders: {
|
|
1455
|
-
uploadFile: o.uploadFile ?? (async (e) => {
|
|
1456
|
-
if (!o.uploadFiles) throw Error("Upload is not supported by data provider");
|
|
1457
|
-
let t = await o.uploadFiles({
|
|
1458
|
-
folderId: e.folderId,
|
|
1459
|
-
items: [{
|
|
1460
|
-
name: e.name,
|
|
1461
|
-
size: e.size,
|
|
1462
|
-
type: e.type,
|
|
1463
|
-
folderId: e.folderId,
|
|
1464
|
-
data: e.data,
|
|
1465
|
-
extension: e.extension
|
|
1466
|
-
}]
|
|
1467
|
-
}), n = t?.detailed?.[0];
|
|
1468
|
-
if (!t || !t.success || !n || n.success === !1) {
|
|
1469
|
-
let e = n?.error?.message || t?.error?.message || "Upload failed";
|
|
1470
|
-
throw Error(e);
|
|
1471
|
-
}
|
|
1472
|
-
return n.data;
|
|
1473
|
-
}),
|
|
1474
|
-
getFiles: o.getFiles,
|
|
1475
|
-
getFolders: o.getFolders
|
|
1476
|
-
},
|
|
1477
|
-
getPngDataUrlForItem: n,
|
|
1478
|
-
dataUrlToBlob: i,
|
|
1479
|
-
config: l?.config
|
|
1480
|
-
});
|
|
1481
|
-
p > 0 && f.success({
|
|
1482
|
-
id: "FILES_COPY_SUCCESS",
|
|
1483
|
-
message: c("Files copied"),
|
|
1484
|
-
placement: "bottomRight",
|
|
1485
|
-
data: {
|
|
1486
|
-
successCount: p,
|
|
1487
|
-
totalCount: u.length,
|
|
1488
|
-
itemIds: u,
|
|
1489
|
-
folderId: s ?? null
|
|
1490
|
-
}
|
|
1491
|
-
}), m > 0 && f.error({
|
|
1492
|
-
id: "FILES_COPY_ERROR",
|
|
1493
|
-
message: c("При копировании произошли ошибки"),
|
|
1494
|
-
placement: "bottomRight",
|
|
1495
|
-
data: {
|
|
1496
|
-
failCount: m,
|
|
1497
|
-
totalCount: u.length,
|
|
1498
|
-
itemIds: u,
|
|
1499
|
-
folderId: s ?? null
|
|
1500
|
-
}
|
|
1501
|
-
}), a();
|
|
1502
|
-
} catch (e) {
|
|
1503
|
-
console.error(e), f.error({
|
|
1504
|
-
id: "FILES_COPY_ERROR",
|
|
1505
|
-
message: c("При копировании произошли ошибки"),
|
|
1506
|
-
placement: "bottomRight",
|
|
1507
|
-
innerException: e,
|
|
1508
|
-
data: {
|
|
1509
|
-
failCount: Array.from(t).length || 0,
|
|
1510
|
-
totalCount: Array.from(t).length || 0,
|
|
1511
|
-
itemIds: Array.from(t),
|
|
1512
|
-
folderId: d?.selectedFolder ?? null
|
|
1513
|
-
}
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
}, [
|
|
1517
|
-
a,
|
|
1518
|
-
i,
|
|
1519
|
-
n,
|
|
1520
|
-
e,
|
|
1521
|
-
f,
|
|
1522
|
-
l,
|
|
1523
|
-
t,
|
|
1524
|
-
d?.selectedFolder,
|
|
1525
|
-
c
|
|
1526
|
-
]);
|
|
1527
|
-
return {
|
|
1528
|
-
isCopyIconsModalVisible: m,
|
|
1529
|
-
isCopyLoading: _,
|
|
1530
|
-
copyForm: g,
|
|
1531
|
-
openCopyModal: re,
|
|
1532
|
-
closeCopyModal: b.useCallback(() => {
|
|
1533
|
-
_ || x.current || (h(!1), D(""), v(!1));
|
|
1534
|
-
}, [_, D]),
|
|
1535
|
-
resetAfterClose: b.useCallback(() => {
|
|
1536
|
-
D(""), v(!1);
|
|
1537
|
-
}, [D]),
|
|
1538
|
-
handleCopyTreeSelect: ie,
|
|
1539
|
-
handleIconsCopyOk: b.useCallback(async (e) => {
|
|
1540
|
-
if (!x.current) {
|
|
1541
|
-
x.current = !0, v(!0);
|
|
1542
|
-
try {
|
|
1543
|
-
await O(e ?? null), h(!1), D("");
|
|
1544
|
-
} finally {
|
|
1545
|
-
x.current = !1, v(!1);
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
}, [O, D]),
|
|
1549
|
-
handleCreateFolderAndCopy: b.useCallback(() => {
|
|
1550
|
-
let e = d.selectedFolder ?? "folders";
|
|
1551
|
-
D(e), g.setFieldsValue({
|
|
1552
|
-
folderName: c("New folder"),
|
|
1553
|
-
targetFolder: e
|
|
1554
|
-
});
|
|
1555
|
-
}, [
|
|
1556
|
-
g,
|
|
1557
|
-
d.selectedFolder,
|
|
1558
|
-
D,
|
|
1559
|
-
c
|
|
1560
|
-
]),
|
|
1561
|
-
fetchChildFolders: w,
|
|
1562
|
-
generateMenuItemsFromFolders: ne
|
|
1563
|
-
};
|
|
1564
|
-
}, mt = 30, ht = 30, gt = 8;
|
|
1565
|
-
async function _t(e, t, n) {
|
|
1566
|
-
if (e.length === 0) return [];
|
|
1567
|
-
let r = Array(e.length), i = 0, a = Math.max(1, Math.min(t, e.length)), o = async () => {
|
|
1568
|
-
for (;;) {
|
|
1569
|
-
let t = i++;
|
|
1570
|
-
if (t >= e.length) return;
|
|
1571
|
-
r[t] = await n(e[t]);
|
|
1572
|
-
}
|
|
1573
|
-
};
|
|
1574
|
-
return await Promise.all(Array.from({ length: a }, () => o())), r;
|
|
1575
|
-
}
|
|
1576
|
-
var vt = ({ customRequest: e, query: r, setQuery: a, inputRef: l }) => {
|
|
1577
|
-
let { t: u } = s(), d = n(), [p, m] = b.useState(""), h = r === void 0 ? p : r, v = a === void 0 ? m : a, [y, S] = b.useState(""), [C, E] = b.useState([]), [ae, le] = b.useState(0), [fe, pe] = b.useState(!1), [j, me] = b.useState(!1), [ge, _e] = b.useState(!1), [ye, M] = b.useState(null), [N, be] = b.useState({}), [P, xe] = b.useState({}), [F, Se] = b.useState("#000000"), [I, L] = b.useState("#ff007a"), [R, Ce] = b.useState("#00C2FF"), [z, we] = b.useState(1), [B, Te] = b.useState(50), [Ee, De] = b.useState(!1), { options: V } = o(), Oe = V.config, H = b.useRef(!1), U = b.useRef(null), ke = b.useRef(0), Ae = b.useRef(null), je = b.useRef(null), Me = b.useRef(void 0);
|
|
1578
|
-
Me.current = ve(V?.config);
|
|
1579
|
-
let Ne = b.useRef(V?.config?.locale);
|
|
1580
|
-
Ne.current = V?.config?.locale;
|
|
1581
|
-
let Pe = b.useRef(null), W = b.useRef(/* @__PURE__ */ new Set()), Fe = b.useRef(null), G = b.useRef(/* @__PURE__ */ new Set()), [K, q] = b.useState(/* @__PURE__ */ new Set()), Le = b.useRef([]), Re = b.useRef(null), { fetchSvgDataUrl: ze, normalizeSvgForCss: Be } = dt(!0), J = b.useMemo(() => {
|
|
1582
|
-
if (C.length === 0) return null;
|
|
1583
|
-
let e = new Set(C.map((e) => e.hash)), t = Object.keys(P).some((t) => e.has(t)) ? P : N, n = C.map((e) => t[e.hash]).filter((e) => !!e);
|
|
1584
|
-
return n.length === 0 ? null : at(n.map((e) => it(e)));
|
|
1585
|
-
}, [
|
|
1586
|
-
C,
|
|
1587
|
-
P,
|
|
1588
|
-
N
|
|
1589
|
-
]), Ve = !!J?.hasGradient, He = b.useMemo(() => {
|
|
1590
|
-
let e = t("icon-color-2", "i");
|
|
1591
|
-
return C.some((t) => {
|
|
1592
|
-
let n = N[t.hash];
|
|
1593
|
-
return !!n && e.test(n);
|
|
1594
|
-
});
|
|
1595
|
-
}, [C, N]), Ue = b.useMemo(() => {
|
|
1596
|
-
let e = t("icon-color-3", "i");
|
|
1597
|
-
return C.some((t) => {
|
|
1598
|
-
let n = N[t.hash];
|
|
1599
|
-
return !!n && e.test(n);
|
|
1600
|
-
});
|
|
1601
|
-
}, [C, N]), We = b.useMemo(() => J ? Ve || J.colors.length >= 2 && He : !1, [
|
|
1602
|
-
J,
|
|
1603
|
-
Ve,
|
|
1604
|
-
!0,
|
|
1605
|
-
He
|
|
1606
|
-
]), Ge = b.useMemo(() => J ? J.colors.length >= 3 && Ue : !1, [
|
|
1607
|
-
J,
|
|
1608
|
-
!0,
|
|
1609
|
-
Ue
|
|
1610
|
-
]);
|
|
1611
|
-
b.useEffect(() => {
|
|
1612
|
-
Ie({
|
|
1613
|
-
baseUrl: Oe?.baseUrl,
|
|
1614
|
-
path: Oe?.iconSetsUrl
|
|
1615
|
-
});
|
|
1616
|
-
}, [Oe?.baseUrl, Oe?.iconSetsUrl]), b.useEffect(() => (H.current = !0, () => {
|
|
1617
|
-
H.current = !1;
|
|
1618
|
-
try {
|
|
1619
|
-
Pe.current?.abort(), Fe.current?.abort();
|
|
1620
|
-
} catch {}
|
|
1621
|
-
}), []);
|
|
1622
|
-
let Ke = b.useRef(h), qe = b.useCallback(async (e) => {
|
|
1623
|
-
let t = e.override?.query ?? y;
|
|
1624
|
-
if (!t || t.trim().length < 3 || (e.initial ? j : ge || j) || !H.current) return;
|
|
1625
|
-
e.initial ? (Le.current = e.override?.stockIds === void 0 ? await Je(t) : e.override.stockIds, me(!0), E([]), be({}), xe({}), le(0), pe(!1)) : _e(!0);
|
|
1626
|
-
let n = Le.current, r = e.initial ? 0 : ae, i = e.initial ? mt : ht, a = `${t}|${r}|${i}|${e.initial ? "i" : "m"}`;
|
|
1627
|
-
if (!G.current.has(a)) {
|
|
1628
|
-
G.current.add(a);
|
|
1629
|
-
try {
|
|
1630
|
-
let t = n.slice(r, r + i).map(Xe);
|
|
1631
|
-
if (!H.current) return;
|
|
1632
|
-
if (e.initial) {
|
|
1633
|
-
let e = t.filter((e, t, n) => n.findIndex((t) => t.hash === e.hash) === t);
|
|
1634
|
-
E(e);
|
|
1635
|
-
} else E((e) => {
|
|
1636
|
-
let n = new Set(e.map((e) => e.hash)), r = t.filter((e) => !n.has(e.hash));
|
|
1637
|
-
return r.length > 0 ? [...e, ...r] : e;
|
|
1638
|
-
});
|
|
1639
|
-
pe(r + t.length < n.length), le(r + t.length);
|
|
1640
|
-
} catch (e) {
|
|
1641
|
-
if (e?.name === "AbortError") return;
|
|
1642
|
-
console.error(e), d.error(u("Request error"));
|
|
1643
|
-
} finally {
|
|
1644
|
-
H.current && (e.initial ? me(!1) : _e(!1)), G.current.delete(a);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
}, [
|
|
1648
|
-
y,
|
|
1649
|
-
ge,
|
|
1650
|
-
j,
|
|
1651
|
-
ae,
|
|
1652
|
-
u
|
|
1653
|
-
]);
|
|
1654
|
-
b.useEffect(() => {
|
|
1655
|
-
je.current = qe;
|
|
1656
|
-
}, [qe]);
|
|
1657
|
-
let Y = b.useCallback(async (e) => {
|
|
1658
|
-
if (!e || e.trim().length < 3) return;
|
|
1659
|
-
let t = e.trim();
|
|
1660
|
-
if (Ae.current === t) return;
|
|
1661
|
-
let n = ++ke.current, r = e.trim(), i = r;
|
|
1662
|
-
if (Me.current) try {
|
|
1663
|
-
i = (await Me.current(e, { locale: Ne.current }) ?? r).trim() || r;
|
|
1664
|
-
} catch (e) {
|
|
1665
|
-
console.error("IconsTab: translation error", e), i = r;
|
|
1666
|
-
}
|
|
1667
|
-
if (n !== ke.current) return;
|
|
1668
|
-
W.current.clear(), M(null), q(/* @__PURE__ */ new Set()), S(i);
|
|
1669
|
-
let a;
|
|
1670
|
-
Me.current && r !== i && (a = Ye(await Je(i), await Je(r))), await je.current?.({
|
|
1671
|
-
initial: !0,
|
|
1672
|
-
override: {
|
|
1673
|
-
query: i,
|
|
1674
|
-
stockIds: a
|
|
1675
|
-
}
|
|
1676
|
-
}), Ae.current = t;
|
|
1677
|
-
}, []), X = b.useCallback(async () => {
|
|
1678
|
-
!h || h.trim().length < 3 || (U.current &&= (window.clearTimeout(U.current), null), await Y(h));
|
|
1679
|
-
}, [h, Y]), Z = b.useCallback(() => {
|
|
1680
|
-
ke.current += 1, W.current.clear(), Le.current = [], Re.current = null, S(""), E([]), _e(!1), pe(!1), le(0), Ae.current = null, M(null), q(/* @__PURE__ */ new Set()), Se("#000000"), L("#ff007a"), Ce("#00C2FF");
|
|
1681
|
-
}, []);
|
|
1682
|
-
b.useEffect(() => {
|
|
1683
|
-
let e = Ke.current;
|
|
1684
|
-
e && e.trim().length >= 3 && Y(e);
|
|
1685
|
-
}, [Y]), b.useEffect(() => {
|
|
1686
|
-
let e = h.trim();
|
|
1687
|
-
if (U.current &&= (window.clearTimeout(U.current), null), e.length < 3) {
|
|
1688
|
-
Z();
|
|
1689
|
-
return;
|
|
1690
|
-
}
|
|
1691
|
-
U.current = window.setTimeout(() => {
|
|
1692
|
-
Y(e);
|
|
1693
|
-
}, 700);
|
|
1694
|
-
}, [
|
|
1695
|
-
h,
|
|
1696
|
-
Z,
|
|
1697
|
-
Y
|
|
1698
|
-
]);
|
|
1699
|
-
let Q = b.useCallback((e) => {
|
|
1700
|
-
M(e.hash);
|
|
1701
|
-
}, []);
|
|
1702
|
-
b.useEffect(() => {
|
|
1703
|
-
if (C.length === 0) return;
|
|
1704
|
-
let e = C.map((e) => e.hash).filter((e) => !N[e]);
|
|
1705
|
-
if (e = e.filter((e) => !W.current.has(e)), e.length === 0) return;
|
|
1706
|
-
let t = !1;
|
|
1707
|
-
Pe.current?.abort();
|
|
1708
|
-
let n = new AbortController();
|
|
1709
|
-
return Pe.current = n, _t(e, gt, (e) => ze(e, {
|
|
1710
|
-
strokeWidth: typeof z == "number" ? z : void 0,
|
|
1711
|
-
size: B,
|
|
1712
|
-
signal: n.signal,
|
|
1713
|
-
inlineColors: void 0
|
|
1714
|
-
}).then((t) => ({
|
|
1715
|
-
h: e,
|
|
1716
|
-
r: t
|
|
1717
|
-
})).catch((t) => (t?.name === "AbortError" || W.current.add(e), {
|
|
1718
|
-
h: e,
|
|
1719
|
-
r: null
|
|
1720
|
-
}))).then((e) => {
|
|
1721
|
-
if (t || !H.current) return;
|
|
1722
|
-
let n = {}, r = {};
|
|
1723
|
-
e.forEach((e) => {
|
|
1724
|
-
e && e.h && e.r && (n[e.h] = e.r.text, e.r.original && (r[e.h] = e.r.original));
|
|
1725
|
-
}), Object.keys(n).length > 0 && be((e) => ({
|
|
1726
|
-
...e,
|
|
1727
|
-
...n
|
|
1728
|
-
})), Object.keys(r).length > 0 && xe((e) => ({
|
|
1729
|
-
...e,
|
|
1730
|
-
...r
|
|
1731
|
-
}));
|
|
1732
|
-
}).catch(() => {}), () => {
|
|
1733
|
-
t = !0, n.abort();
|
|
1734
|
-
};
|
|
1735
|
-
}, [
|
|
1736
|
-
F,
|
|
1737
|
-
I,
|
|
1738
|
-
R,
|
|
1739
|
-
ze,
|
|
1740
|
-
C,
|
|
1741
|
-
B,
|
|
1742
|
-
z,
|
|
1743
|
-
N,
|
|
1744
|
-
!0
|
|
1745
|
-
]), b.useEffect(() => {
|
|
1746
|
-
if (C.length === 0) return;
|
|
1747
|
-
let e = C.map((e) => e.hash), t = {}, n = !1;
|
|
1748
|
-
e.forEach((e) => {
|
|
1749
|
-
let r = P[e] || N[e];
|
|
1750
|
-
if (!r) return;
|
|
1751
|
-
let i = Be(r, { strokeWidth: typeof z == "number" ? z : void 0 });
|
|
1752
|
-
i && i !== N[e] && (t[e] = i, n = !0);
|
|
1753
|
-
}), n && Object.keys(t).length > 0 && be((e) => ({
|
|
1754
|
-
...e,
|
|
1755
|
-
...t
|
|
1756
|
-
}));
|
|
1757
|
-
}, [
|
|
1758
|
-
C,
|
|
1759
|
-
Be,
|
|
1760
|
-
P,
|
|
1761
|
-
z,
|
|
1762
|
-
N
|
|
1763
|
-
]), b.useEffect(() => {
|
|
1764
|
-
if (C.length === 0) return;
|
|
1765
|
-
let e = y.trim();
|
|
1766
|
-
if (!e || Re.current === e) return;
|
|
1767
|
-
let t = C.find((e) => P[e.hash]);
|
|
1768
|
-
if (!t) return;
|
|
1769
|
-
let n = P[t.hash];
|
|
1770
|
-
if (!n) return;
|
|
1771
|
-
Re.current = e;
|
|
1772
|
-
let r = st(n), i = (e) => {
|
|
1773
|
-
let t = (e || "").trim().match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
|
|
1774
|
-
return t ? "#" + (t[1].length === 3 ? t[1].replace(/(.)/g, "$1$1") : t[1]).toLowerCase() : Ze(e);
|
|
1775
|
-
};
|
|
1776
|
-
r[0] && Se(i(r[0])), r[1] && L(i(r[1])), r[2] && Ce(i(r[2]));
|
|
1777
|
-
}, [
|
|
1778
|
-
y,
|
|
1779
|
-
C,
|
|
1780
|
-
P
|
|
1781
|
-
]);
|
|
1782
|
-
let Qe = b.useCallback((e) => c(e, {
|
|
1783
|
-
colorHex: F,
|
|
1784
|
-
colorHex2: I,
|
|
1785
|
-
colorHex3: R
|
|
1786
|
-
}), [
|
|
1787
|
-
F,
|
|
1788
|
-
I,
|
|
1789
|
-
R
|
|
1790
|
-
]), $e = b.useCallback((e) => {
|
|
1791
|
-
q((t) => {
|
|
1792
|
-
let n = new Set(t);
|
|
1793
|
-
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1794
|
-
});
|
|
1795
|
-
}, []), et = b.useCallback(() => {
|
|
1796
|
-
q(/* @__PURE__ */ new Set());
|
|
1797
|
-
}, []), tt = b.useMemo(() => {
|
|
1798
|
-
if (K.size === 1) {
|
|
1799
|
-
let [e] = Array.from(K);
|
|
1800
|
-
return C.find((t) => t.hash === e) || null;
|
|
1801
|
-
}
|
|
1802
|
-
return K.size === 0 && ye && C.find((e) => e.hash === ye) || null;
|
|
1803
|
-
}, [
|
|
1804
|
-
C,
|
|
1805
|
-
ye,
|
|
1806
|
-
K
|
|
1807
|
-
]), nt = b.useCallback((e, t = "image/png") => {
|
|
1808
|
-
try {
|
|
1809
|
-
let n = e.split(",");
|
|
1810
|
-
if (n.length < 2) return new Blob([], { type: t });
|
|
1811
|
-
let r = n[1] || "", i = atob(r), a = Array(i.length);
|
|
1812
|
-
for (let e = 0; e < i.length; e += 1) a[e] = i.charCodeAt(e);
|
|
1813
|
-
let o = new Uint8Array(a);
|
|
1814
|
-
return new Blob([o], { type: t });
|
|
1815
|
-
} catch {
|
|
1816
|
-
return new Blob([], { type: t });
|
|
1817
|
-
}
|
|
1818
|
-
}, []), rt = b.useCallback(async (e, t) => {
|
|
1819
|
-
try {
|
|
1820
|
-
let n = N[e.hash] || P[e.hash];
|
|
1821
|
-
n ||= (await ze(e.hash, {
|
|
1822
|
-
strokeWidth: typeof z == "number" ? z : void 0,
|
|
1823
|
-
size: B,
|
|
1824
|
-
signal: t,
|
|
1825
|
-
inlineColors: void 0
|
|
1826
|
-
})).text;
|
|
1827
|
-
let r = Qe(n), a = f(r, B);
|
|
1828
|
-
return i(r, a.width, a.height);
|
|
1829
|
-
} catch {
|
|
1830
|
-
return null;
|
|
1831
|
-
}
|
|
1832
|
-
}, [
|
|
1833
|
-
Qe,
|
|
1834
|
-
F,
|
|
1835
|
-
I,
|
|
1836
|
-
R,
|
|
1837
|
-
ze,
|
|
1838
|
-
P,
|
|
1839
|
-
B,
|
|
1840
|
-
z,
|
|
1841
|
-
N,
|
|
1842
|
-
!0
|
|
1843
|
-
]), ot = b.useCallback(async (t) => {
|
|
1844
|
-
try {
|
|
1845
|
-
if (!H.current) return;
|
|
1846
|
-
De(!0), Fe.current?.abort();
|
|
1847
|
-
let n = new AbortController();
|
|
1848
|
-
Fe.current = n;
|
|
1849
|
-
let r = await rt(t, n.signal);
|
|
1850
|
-
if (!H.current || !r) return;
|
|
1851
|
-
await Promise.resolve(e(r));
|
|
1852
|
-
} catch (e) {
|
|
1853
|
-
console.error("IconsTab: insert error", e), d.error(u("Request error"));
|
|
1854
|
-
} finally {
|
|
1855
|
-
H.current && De(!1);
|
|
1856
|
-
}
|
|
1857
|
-
}, [
|
|
1858
|
-
e,
|
|
1859
|
-
rt,
|
|
1860
|
-
u
|
|
1861
|
-
]), { isCopyIconsModalVisible: ct, isCopyLoading: $, copyForm: lt, openCopyModal: ut, closeCopyModal: ft, resetAfterClose: vt, handleCopyTreeSelect: yt, handleIconsCopyOk: bt, fetchChildFolders: xt, generateMenuItemsFromFolders: St, handleCreateFolderAndCopy: Ct } = pt({
|
|
1862
|
-
items: C,
|
|
1863
|
-
selectedHashes: K,
|
|
1864
|
-
getPngDataUrlForItem: rt,
|
|
1865
|
-
dataUrlToBlob: nt,
|
|
1866
|
-
clearSelection: et
|
|
1867
|
-
}), wt = !!y.trim() && (C.length > 0 || j), Tt = wt && K.size > 0;
|
|
1868
|
-
return /* @__PURE__ */ k(ie, { children: [/* @__PURE__ */ k("div", {
|
|
1869
|
-
className: `${A.iconsTab} ${y.trim() ? A.hasSearch : ""}`,
|
|
1870
|
-
children: [
|
|
1871
|
-
wt && Tt ? /* @__PURE__ */ k("div", {
|
|
1872
|
-
className: A.iconsHeaderContainer,
|
|
1873
|
-
children: [/* @__PURE__ */ k("div", {
|
|
1874
|
-
className: A.iconsHeaderContainerLeft,
|
|
1875
|
-
children: [/* @__PURE__ */ k(re.Text, {
|
|
1876
|
-
type: "secondary",
|
|
1877
|
-
children: [
|
|
1878
|
-
K.size,
|
|
1879
|
-
" ",
|
|
1880
|
-
u("selected")
|
|
1881
|
-
]
|
|
1882
|
-
}), /* @__PURE__ */ O(x, {
|
|
1883
|
-
icon: /* @__PURE__ */ O(ce, { size: 16 }),
|
|
1884
|
-
onClick: et,
|
|
1885
|
-
children: u("Deselected")
|
|
1886
|
-
})]
|
|
1887
|
-
}), /* @__PURE__ */ O(D, { children: /* @__PURE__ */ O(x, {
|
|
1888
|
-
icon: /* @__PURE__ */ O(se, { size: 16 }),
|
|
1889
|
-
onClick: ut,
|
|
1890
|
-
children: u("Copy to folder")
|
|
1891
|
-
}) })]
|
|
1892
|
-
}) : /* @__PURE__ */ O(ue, {
|
|
1893
|
-
query: h,
|
|
1894
|
-
onQueryChange: v,
|
|
1895
|
-
onSubmit: X,
|
|
1896
|
-
hasResults: C.length > 0 || j,
|
|
1897
|
-
inputRef: l
|
|
1898
|
-
}),
|
|
1899
|
-
wt ? /* @__PURE__ */ O(de, {
|
|
1900
|
-
colorHex: F,
|
|
1901
|
-
setColorHex: Se,
|
|
1902
|
-
colorHex2: I,
|
|
1903
|
-
setColorHex2: L,
|
|
1904
|
-
colorHex3: R,
|
|
1905
|
-
setColorHex3: Ce,
|
|
1906
|
-
sizePx: B,
|
|
1907
|
-
setSizePx: Te,
|
|
1908
|
-
strokeWidth: z,
|
|
1909
|
-
setStrokeWidth: we,
|
|
1910
|
-
showSecondColor: We,
|
|
1911
|
-
showThirdColor: Ge
|
|
1912
|
-
}) : null,
|
|
1913
|
-
/* @__PURE__ */ O(he, {
|
|
1914
|
-
items: C,
|
|
1915
|
-
loading: j,
|
|
1916
|
-
isCollectingResults: ge,
|
|
1917
|
-
hasMore: fe,
|
|
1918
|
-
hasQuery: !!y.trim(),
|
|
1919
|
-
selectedHash: ye,
|
|
1920
|
-
onItemClick: Q,
|
|
1921
|
-
onInsert: ot,
|
|
1922
|
-
onLoadMore: () => {
|
|
1923
|
-
qe({ initial: !1 }).catch(() => {});
|
|
1924
|
-
},
|
|
1925
|
-
colorVars: {
|
|
1926
|
-
colorHex: F,
|
|
1927
|
-
colorHex2: I,
|
|
1928
|
-
colorHex3: R
|
|
1929
|
-
},
|
|
1930
|
-
svgTextMap: N,
|
|
1931
|
-
previewSize: B,
|
|
1932
|
-
selectedHashes: K,
|
|
1933
|
-
onToggleSelect: $e
|
|
1934
|
-
}),
|
|
1935
|
-
tt ? /* @__PURE__ */ k("div", {
|
|
1936
|
-
className: A.iconsBottomBar,
|
|
1937
|
-
children: [/* @__PURE__ */ O(w, { className: "zero-divider" }), /* @__PURE__ */ O("div", {
|
|
1938
|
-
className: A.iconsBottomBarContent,
|
|
1939
|
-
children: /* @__PURE__ */ O(D, { children: /* @__PURE__ */ O(x, {
|
|
1940
|
-
size: "large",
|
|
1941
|
-
type: "primary",
|
|
1942
|
-
style: { height: 40 },
|
|
1943
|
-
loading: Ee,
|
|
1944
|
-
onClick: () => ot(tt),
|
|
1945
|
-
children: u("Choose")
|
|
1946
|
-
}) })
|
|
1947
|
-
})]
|
|
1948
|
-
}) : null
|
|
1949
|
-
]
|
|
1950
|
-
}), /* @__PURE__ */ O(te, {
|
|
1951
|
-
title: /* @__PURE__ */ O("div", {
|
|
1952
|
-
className: "modal-title",
|
|
1953
|
-
children: u("Copy to folder")
|
|
1954
|
-
}),
|
|
1955
|
-
open: ct,
|
|
1956
|
-
onCancel: () => {
|
|
1957
|
-
$ || ft();
|
|
1958
|
-
},
|
|
1959
|
-
mask: { closable: !$ },
|
|
1960
|
-
closable: !$,
|
|
1961
|
-
keyboard: !$,
|
|
1962
|
-
centered: !0,
|
|
1963
|
-
getContainer: V.getModalContainer,
|
|
1964
|
-
footer: /* @__PURE__ */ k("div", {
|
|
1965
|
-
className: g.formFooter,
|
|
1966
|
-
children: [/* @__PURE__ */ k(x, {
|
|
1967
|
-
className: g.folderButton,
|
|
1968
|
-
onClick: Ct,
|
|
1969
|
-
loading: $,
|
|
1970
|
-
children: [/* @__PURE__ */ O(oe, {
|
|
1971
|
-
size: 18,
|
|
1972
|
-
strokeWidth: V.config?.iconStrokeWidth
|
|
1973
|
-
}), u("Create folder")]
|
|
1974
|
-
}), /* @__PURE__ */ O(x, {
|
|
1975
|
-
type: "primary",
|
|
1976
|
-
className: g.folderButton,
|
|
1977
|
-
onClick: () => {
|
|
1978
|
-
ft();
|
|
1979
|
-
},
|
|
1980
|
-
loading: $,
|
|
1981
|
-
children: u("Done")
|
|
1982
|
-
})]
|
|
1983
|
-
}),
|
|
1984
|
-
afterClose: () => vt(),
|
|
1985
|
-
children: /* @__PURE__ */ k("div", {
|
|
1986
|
-
className: A.copyToFolderModalBody,
|
|
1987
|
-
children: [$ ? /* @__PURE__ */ O("div", {
|
|
1988
|
-
className: A.copyToFolderModalLoadingOverlay,
|
|
1989
|
-
children: /* @__PURE__ */ O(ne, { size: "large" })
|
|
1990
|
-
}) : null, /* @__PURE__ */ O(T, {
|
|
1991
|
-
form: lt,
|
|
1992
|
-
layout: "vertical",
|
|
1993
|
-
initialValues: {
|
|
1994
|
-
targetFolder: "folders",
|
|
1995
|
-
folderName: u("New folder"),
|
|
1996
|
-
is_force_create: !1
|
|
1997
|
-
},
|
|
1998
|
-
children: /* @__PURE__ */ k("div", {
|
|
1999
|
-
className: g.foldersWrapper,
|
|
2000
|
-
children: [
|
|
2001
|
-
/* @__PURE__ */ O(T.Item, {
|
|
2002
|
-
name: "targetFolder",
|
|
2003
|
-
rules: [{
|
|
2004
|
-
required: !0,
|
|
2005
|
-
message: u("Select the destination folder")
|
|
2006
|
-
}],
|
|
2007
|
-
className: g.formItem,
|
|
2008
|
-
children: /* @__PURE__ */ O(_, {
|
|
2009
|
-
onSelect: yt,
|
|
2010
|
-
generateMenuItems: () => St({
|
|
2011
|
-
targetForm: lt,
|
|
2012
|
-
onTreeSelect: yt,
|
|
2013
|
-
onComplete: bt,
|
|
2014
|
-
actionButtonText: u("Copy here")
|
|
2015
|
-
}),
|
|
2016
|
-
fetchChildFolders: xt,
|
|
2017
|
-
disabledFolders: [],
|
|
2018
|
-
mode: "selection",
|
|
2019
|
-
className: "folderSelectionTree",
|
|
2020
|
-
defaultExpandAll: !0
|
|
2021
|
-
})
|
|
2022
|
-
}),
|
|
2023
|
-
/* @__PURE__ */ O(T.Item, {
|
|
2024
|
-
name: "folderName",
|
|
2025
|
-
style: { display: "none" },
|
|
2026
|
-
rules: [{
|
|
2027
|
-
required: !0,
|
|
2028
|
-
validator: (e, t) => typeof t == "string" && t.trim().length === 0 ? Promise.reject(Error(u("Enter the name of the folder"))) : Promise.resolve()
|
|
2029
|
-
}],
|
|
2030
|
-
children: /* @__PURE__ */ O(ee, {})
|
|
2031
|
-
}),
|
|
2032
|
-
/* @__PURE__ */ O(T.Item, {
|
|
2033
|
-
name: "is_force_create",
|
|
2034
|
-
style: { display: "none" },
|
|
2035
|
-
children: /* @__PURE__ */ O(ee, {})
|
|
2036
|
-
})
|
|
2037
|
-
]
|
|
2038
|
-
})
|
|
2039
|
-
})]
|
|
2040
|
-
})
|
|
2041
|
-
})] });
|
|
2042
|
-
};
|
|
2043
|
-
//#endregion
|
|
2044
|
-
export { vt as IconsTab, vt as default };
|
|
2045
|
-
|
|
2046
|
-
//# sourceMappingURL=file-manager-IconsTab.js.map
|