gp-designer 1.0.12 → 1.0.13
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/dist/gp-designer.es.js +315 -323
- package/dist/gp-designer.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as
|
1
|
+
import { defineComponent as Ge, computed as Ke, openBlock as B, createElementBlock as V, normalizeClass as Da, ref as z, watch as ot, createElementVNode as S, withModifiers as he, Fragment as Ht, renderList as js, createBlock as xt, createCommentVNode as K, mergeProps as zs, toDisplayString as we, resolveComponent as Pu, resolveDynamicComponent as ku, withCtx as Ks, createTextVNode as wu, unref as Ne, createVNode as lt, Transition as Bu, renderSlot as Uu, reactive as Fu, createApp as Hu, h as Ji, withDirectives as st, vModelSelect as Yu, vModelText as pt, normalizeStyle as qu } from "vue";
|
2
2
|
var j;
|
3
3
|
(function(e) {
|
4
4
|
e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
|
@@ -176,16 +176,16 @@ class Di extends Oi {
|
|
176
176
|
function k(e) {
|
177
177
|
return Vu(e);
|
178
178
|
}
|
179
|
-
function
|
179
|
+
function La(e) {
|
180
180
|
return e.type === j.CDATA;
|
181
181
|
}
|
182
182
|
function He(e) {
|
183
183
|
return e.type === j.Text;
|
184
184
|
}
|
185
|
-
function
|
185
|
+
function va(e) {
|
186
186
|
return e.type === j.Comment;
|
187
187
|
}
|
188
|
-
function
|
188
|
+
function ti(e) {
|
189
189
|
return e.type === j.Directive;
|
190
190
|
}
|
191
191
|
function at(e) {
|
@@ -198,25 +198,25 @@ function zt(e, t = !1) {
|
|
198
198
|
let a;
|
199
199
|
if (He(e))
|
200
200
|
a = new jt(e.data);
|
201
|
-
else if (
|
201
|
+
else if (va(e))
|
202
202
|
a = new Si(e.data);
|
203
203
|
else if (k(e)) {
|
204
|
-
const i = t ?
|
204
|
+
const i = t ? qa(e.children) : [], s = new Di(e.name, { ...e.attribs }, i);
|
205
205
|
i.forEach((u) => u.parent = s), e.namespace != null && (s.namespace = e.namespace), e["x-attribsNamespace"] && (s["x-attribsNamespace"] = { ...e["x-attribsNamespace"] }), e["x-attribsPrefix"] && (s["x-attribsPrefix"] = { ...e["x-attribsPrefix"] }), a = s;
|
206
|
-
} else if (
|
207
|
-
const i = t ?
|
206
|
+
} else if (La(e)) {
|
207
|
+
const i = t ? qa(e.children) : [], s = new Js(i);
|
208
208
|
i.forEach((u) => u.parent = s), a = s;
|
209
209
|
} else if (at(e)) {
|
210
|
-
const i = t ?
|
210
|
+
const i = t ? qa(e.children) : [], s = new dt(i);
|
211
211
|
i.forEach((u) => u.parent = s), e["x-mode"] && (s["x-mode"] = e["x-mode"]), a = s;
|
212
|
-
} else if (
|
212
|
+
} else if (ti(e)) {
|
213
213
|
const i = new xi(e.name, e.data);
|
214
214
|
e["x-name"] != null && (i["x-name"] = e["x-name"], i["x-publicId"] = e["x-publicId"], i["x-systemId"] = e["x-systemId"]), a = i;
|
215
215
|
} else
|
216
216
|
throw new Error(`Not implemented yet: ${e.type}`);
|
217
217
|
return a.startIndex = e.startIndex, a.endIndex = e.endIndex, e.sourceCodeLocation != null && (a.sourceCodeLocation = e.sourceCodeLocation), a;
|
218
218
|
}
|
219
|
-
function
|
219
|
+
function qa(e) {
|
220
220
|
const t = e.map((a) => zt(a, !0));
|
221
221
|
for (let a = 1; a < t.length; a++)
|
222
222
|
t[a].prev = t[a - 1], t[a - 1].next = t[a];
|
@@ -308,7 +308,7 @@ const Li = new Uint16Array(
|
|
308
308
|
// prettier-ignore
|
309
309
|
"Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
|
310
310
|
);
|
311
|
-
var
|
311
|
+
var Va;
|
312
312
|
const er = /* @__PURE__ */ new Map([
|
313
313
|
[0, 65533],
|
314
314
|
// C1 Unicode control character reference replacements
|
@@ -339,9 +339,9 @@ const er = /* @__PURE__ */ new Map([
|
|
339
339
|
[156, 339],
|
340
340
|
[158, 382],
|
341
341
|
[159, 376]
|
342
|
-
]),
|
342
|
+
]), ai = (
|
343
343
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
344
|
-
(
|
344
|
+
(Va = String.fromCodePoint) !== null && Va !== void 0 ? Va : function(e) {
|
345
345
|
let t = "";
|
346
346
|
return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), t += String.fromCharCode(e), t;
|
347
347
|
}
|
@@ -359,14 +359,14 @@ var Ze;
|
|
359
359
|
(function(e) {
|
360
360
|
e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
|
361
361
|
})(Ze || (Ze = {}));
|
362
|
-
function
|
362
|
+
function ii(e) {
|
363
363
|
return e >= me.ZERO && e <= me.NINE;
|
364
364
|
}
|
365
365
|
function ir(e) {
|
366
366
|
return e >= me.UPPER_A && e <= me.UPPER_F || e >= me.LOWER_A && e <= me.LOWER_F;
|
367
367
|
}
|
368
368
|
function sr(e) {
|
369
|
-
return e >= me.UPPER_A && e <= me.UPPER_Z || e >= me.LOWER_A && e <= me.LOWER_Z ||
|
369
|
+
return e >= me.UPPER_A && e <= me.UPPER_Z || e >= me.LOWER_A && e <= me.LOWER_Z || ii(e);
|
370
370
|
}
|
371
371
|
function nr(e) {
|
372
372
|
return e === me.EQUALS || sr(e);
|
@@ -443,7 +443,7 @@ class vi {
|
|
443
443
|
const i = a;
|
444
444
|
for (; a < t.length; ) {
|
445
445
|
const s = t.charCodeAt(a);
|
446
|
-
if (
|
446
|
+
if (ii(s) || ir(s))
|
447
447
|
a += 1;
|
448
448
|
else
|
449
449
|
return this.addToNumericResult(t, i, a, 16), this.emitNumericEntity(s, 3);
|
@@ -463,7 +463,7 @@ class vi {
|
|
463
463
|
const i = a;
|
464
464
|
for (; a < t.length; ) {
|
465
465
|
const s = t.charCodeAt(a);
|
466
|
-
if (
|
466
|
+
if (ii(s))
|
467
467
|
a += 1;
|
468
468
|
else
|
469
469
|
return this.addToNumericResult(t, i, a, 10), this.emitNumericEntity(s, 2);
|
@@ -568,7 +568,7 @@ class vi {
|
|
568
568
|
}
|
569
569
|
function tn(e) {
|
570
570
|
let t = "";
|
571
|
-
const a = new vi(e, (i) => t +=
|
571
|
+
const a = new vi(e, (i) => t += ai(i));
|
572
572
|
return function(s, u) {
|
573
573
|
let r = 0, o = 0;
|
574
574
|
for (; (o = s.indexOf("&", o)) >= 0; ) {
|
@@ -791,7 +791,7 @@ const as = /* @__PURE__ */ new Set([
|
|
791
791
|
"track",
|
792
792
|
"wbr"
|
793
793
|
]);
|
794
|
-
function
|
794
|
+
function Ra(e, t = {}) {
|
795
795
|
const a = "length" in e ? e : [e];
|
796
796
|
let i = "";
|
797
797
|
for (let s = 0; s < a.length; s++)
|
@@ -801,7 +801,7 @@ function va(e, t = {}) {
|
|
801
801
|
function Er(e, t) {
|
802
802
|
switch (e.type) {
|
803
803
|
case Wu:
|
804
|
-
return
|
804
|
+
return Ra(e.children, t);
|
805
805
|
case Zu:
|
806
806
|
case Xu:
|
807
807
|
return br(e);
|
@@ -839,7 +839,7 @@ function pr(e, t) {
|
|
839
839
|
) : (
|
840
840
|
// User explicitly asked for self-closing tags, even in HTML mode
|
841
841
|
t.selfClosingTags && as.has(e.name)
|
842
|
-
)) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i +=
|
842
|
+
)) ? (t.xmlMode || (i += " "), i += "/>") : (i += ">", e.children.length > 0 && (i += Ra(e.children, t)), (t.xmlMode || !as.has(e.name)) && (i += `</${e.name}>`)), i;
|
843
843
|
}
|
844
844
|
function br(e) {
|
845
845
|
return `<${e.data}>`;
|
@@ -856,22 +856,22 @@ function Ar(e) {
|
|
856
856
|
return `<!--${e.data}-->`;
|
857
857
|
}
|
858
858
|
function rn(e, t) {
|
859
|
-
return
|
859
|
+
return Ra(e, t);
|
860
860
|
}
|
861
861
|
function Nr(e, t) {
|
862
862
|
return Te(e) ? e.children.map((a) => rn(a, t)).join("") : "";
|
863
863
|
}
|
864
864
|
function Ea(e) {
|
865
865
|
return Array.isArray(e) ? e.map(Ea).join("") : k(e) ? e.name === "br" ? `
|
866
|
-
` : Ea(e.children) :
|
866
|
+
` : Ea(e.children) : La(e) ? Ea(e.children) : He(e) ? e.data : "";
|
867
867
|
}
|
868
868
|
function Ot(e) {
|
869
|
-
return Array.isArray(e) ? e.map(Ot).join("") : Te(e) && !
|
869
|
+
return Array.isArray(e) ? e.map(Ot).join("") : Te(e) && !va(e) ? Ot(e.children) : He(e) ? e.data : "";
|
870
870
|
}
|
871
871
|
function Ta(e) {
|
872
|
-
return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type === j.Tag ||
|
872
|
+
return Array.isArray(e) ? e.map(Ta).join("") : Te(e) && (e.type === j.Tag || La(e)) ? Ta(e.children) : He(e) ? e.data : "";
|
873
873
|
}
|
874
|
-
function
|
874
|
+
function ya(e) {
|
875
875
|
return Te(e) ? e.children : [];
|
876
876
|
}
|
877
877
|
function on(e) {
|
@@ -880,7 +880,7 @@ function on(e) {
|
|
880
880
|
function cn(e) {
|
881
881
|
const t = on(e);
|
882
882
|
if (t != null)
|
883
|
-
return
|
883
|
+
return ya(t);
|
884
884
|
const a = [e];
|
885
885
|
let { prev: i, next: s } = e;
|
886
886
|
for (; i != null; )
|
@@ -962,7 +962,7 @@ function vr(e, t) {
|
|
962
962
|
}
|
963
963
|
e.prev && (e.prev.next = t), t.parent = a, t.prev = e.prev, t.next = e, e.prev = t;
|
964
964
|
}
|
965
|
-
function
|
965
|
+
function Ma(e, t, a = !0, i = 1 / 0) {
|
966
966
|
return Mi(e, Array.isArray(t) ? t : [t], a, i);
|
967
967
|
}
|
968
968
|
function Mi(e, t, a, i) {
|
@@ -1039,16 +1039,16 @@ function Pr(e, t) {
|
|
1039
1039
|
}
|
1040
1040
|
function kr(e, t, a, i = 1 / 0) {
|
1041
1041
|
const s = dn(e);
|
1042
|
-
return s ?
|
1042
|
+
return s ? Ma(s, t, a, i) : [];
|
1043
1043
|
}
|
1044
1044
|
function wr(e, t, a = !0) {
|
1045
1045
|
return Array.isArray(t) || (t = [t]), Pi(hn("id", e), t, a);
|
1046
1046
|
}
|
1047
1047
|
function Lt(e, t, a = !0, i = 1 / 0) {
|
1048
|
-
return
|
1048
|
+
return Ma(pa.tag_name(e), t, a, i);
|
1049
1049
|
}
|
1050
1050
|
function Br(e, t, a = !0, i = 1 / 0) {
|
1051
|
-
return
|
1051
|
+
return Ma(pa.tag_type(e), t, a, i);
|
1052
1052
|
}
|
1053
1053
|
function Ur(e) {
|
1054
1054
|
let t = e.length;
|
@@ -1172,7 +1172,7 @@ function xe(e, t, a, i, s = !1) {
|
|
1172
1172
|
function Wr(e) {
|
1173
1173
|
return e === "rss" || e === "feed" || e === "rdf:RDF";
|
1174
1174
|
}
|
1175
|
-
const
|
1175
|
+
const Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1176
1176
|
__proto__: null,
|
1177
1177
|
get DocumentPosition() {
|
1178
1178
|
return Me;
|
@@ -1181,13 +1181,13 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1181
1181
|
appendChild: Or,
|
1182
1182
|
compareDocumentPosition: fn,
|
1183
1183
|
existsOne: ln,
|
1184
|
-
filter:
|
1184
|
+
filter: Ma,
|
1185
1185
|
find: Mi,
|
1186
1186
|
findAll: yr,
|
1187
1187
|
findOne: Pi,
|
1188
1188
|
findOneChild: Rr,
|
1189
1189
|
getAttributeValue: Ir,
|
1190
|
-
getChildren:
|
1190
|
+
getChildren: ya,
|
1191
1191
|
getElementById: wr,
|
1192
1192
|
getElements: kr,
|
1193
1193
|
getElementsByTagName: Lt,
|
@@ -1202,8 +1202,8 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1202
1202
|
hasAttrib: Cr,
|
1203
1203
|
hasChildren: Te,
|
1204
1204
|
innerText: Ta,
|
1205
|
-
isCDATA:
|
1206
|
-
isComment:
|
1205
|
+
isCDATA: La,
|
1206
|
+
isComment: va,
|
1207
1207
|
isDocument: at,
|
1208
1208
|
isTag: k,
|
1209
1209
|
isText: He,
|
@@ -1220,7 +1220,7 @@ const Ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1220
1220
|
}, Symbol.toStringTag, { value: "Module" })), $r = {
|
1221
1221
|
_useHtmlParser2: !1
|
1222
1222
|
};
|
1223
|
-
function
|
1223
|
+
function si(e, t) {
|
1224
1224
|
if (!e)
|
1225
1225
|
return t ?? $r;
|
1226
1226
|
const a = {
|
@@ -1239,7 +1239,7 @@ function Xr(e, t) {
|
|
1239
1239
|
function Gr(e, t) {
|
1240
1240
|
const a = Xr(e) ? (t = e, void 0) : e, i = {
|
1241
1241
|
...this === null || this === void 0 ? void 0 : this._options,
|
1242
|
-
...
|
1242
|
+
...si(t)
|
1243
1243
|
};
|
1244
1244
|
return mn(this, a, i);
|
1245
1245
|
}
|
@@ -1325,14 +1325,14 @@ var ct;
|
|
1325
1325
|
(function(e) {
|
1326
1326
|
e[e.LowerA = 97] = "LowerA", e[e.LowerZ = 122] = "LowerZ", e[e.UpperA = 65] = "UpperA", e[e.UpperZ = 90] = "UpperZ", e[e.Exclamation = 33] = "Exclamation";
|
1327
1327
|
})(ct || (ct = {}));
|
1328
|
-
function
|
1328
|
+
function ni(e) {
|
1329
1329
|
const t = e.indexOf("<");
|
1330
1330
|
if (t < 0 || t > e.length - 3)
|
1331
1331
|
return !1;
|
1332
1332
|
const a = e.charCodeAt(t + 1);
|
1333
1333
|
return (a >= ct.LowerA && a <= ct.LowerZ || a >= ct.UpperA && a <= ct.UpperZ || a === ct.Exclamation) && e.includes(">", t + 2);
|
1334
1334
|
}
|
1335
|
-
const Zt = Object.prototype.hasOwnProperty, Jt = /\s+/,
|
1335
|
+
const Zt = Object.prototype.hasOwnProperty, Jt = /\s+/, ui = "data-", ki = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, ao = /^{[^]*}$|^\[[^]*]$/;
|
1336
1336
|
function ga(e, t, a) {
|
1337
1337
|
var i;
|
1338
1338
|
if (!(!e || !k(e))) {
|
@@ -1377,7 +1377,7 @@ function ss(e, t, a) {
|
|
1377
1377
|
e[t]
|
1378
1378
|
) : !a && ki.test(t) ? ga(e, t, !1) !== void 0 : ga(e, t, a);
|
1379
1379
|
}
|
1380
|
-
function
|
1380
|
+
function Wa(e, t, a, i) {
|
1381
1381
|
t in e ? e[t] = a : Nt(e, t, !i && ki.test(t) ? a ? "" : null : `${a}`);
|
1382
1382
|
}
|
1383
1383
|
function so(e, t) {
|
@@ -1418,7 +1418,7 @@ function so(e, t) {
|
|
1418
1418
|
if (typeof e == "object")
|
1419
1419
|
throw new TypeError("Bad combination of arguments.");
|
1420
1420
|
return re(this, (i, s) => {
|
1421
|
-
k(i) &&
|
1421
|
+
k(i) && Wa(i, e, t.call(i, s, ss(i, e, this.options.xmlMode)), this.options.xmlMode);
|
1422
1422
|
});
|
1423
1423
|
}
|
1424
1424
|
return re(this, (i) => {
|
@@ -1426,10 +1426,10 @@ function so(e, t) {
|
|
1426
1426
|
if (typeof e == "object")
|
1427
1427
|
for (const s of Object.keys(e)) {
|
1428
1428
|
const u = e[s];
|
1429
|
-
|
1429
|
+
Wa(i, s, u, this.options.xmlMode);
|
1430
1430
|
}
|
1431
1431
|
else
|
1432
|
-
|
1432
|
+
Wa(i, e, t, this.options.xmlMode);
|
1433
1433
|
});
|
1434
1434
|
}
|
1435
1435
|
}
|
@@ -1439,15 +1439,15 @@ function ns(e, t, a) {
|
|
1439
1439
|
}
|
1440
1440
|
function no(e) {
|
1441
1441
|
for (const t of Object.keys(e.attribs)) {
|
1442
|
-
if (!t.startsWith(
|
1442
|
+
if (!t.startsWith(ui))
|
1443
1443
|
continue;
|
1444
|
-
const a = eo(t.slice(
|
1444
|
+
const a = eo(t.slice(ui.length));
|
1445
1445
|
Zt.call(e.data, a) || (e.data[a] = pn(e.attribs[t]));
|
1446
1446
|
}
|
1447
1447
|
return e.data;
|
1448
1448
|
}
|
1449
1449
|
function uo(e, t) {
|
1450
|
-
const a =
|
1450
|
+
const a = ui + to(t), i = e.data;
|
1451
1451
|
if (Zt.call(i, t))
|
1452
1452
|
return i[t];
|
1453
1453
|
if (Zt.call(e.attribs, a))
|
@@ -1665,13 +1665,13 @@ function po(e, t, a) {
|
|
1665
1665
|
function Mt(e) {
|
1666
1666
|
return e.replace(fo, po);
|
1667
1667
|
}
|
1668
|
-
function
|
1668
|
+
function $a(e) {
|
1669
1669
|
return e === 39 || e === 34;
|
1670
1670
|
}
|
1671
1671
|
function rs(e) {
|
1672
1672
|
return e === 32 || e === 9 || e === 10 || e === 12 || e === 13;
|
1673
1673
|
}
|
1674
|
-
function
|
1674
|
+
function ka(e) {
|
1675
1675
|
const t = [], a = Nn(t, `${e}`, 0);
|
1676
1676
|
if (a < e.length)
|
1677
1677
|
throw new Error(`Unmatched selector: ${e.slice(a)}`);
|
@@ -1782,7 +1782,7 @@ function Nn(e, t, a) {
|
|
1782
1782
|
} else t.charCodeAt(a) === 61 && (L = de.Equals, u(1));
|
1783
1783
|
let X = "", U = null;
|
1784
1784
|
if (L !== "exists") {
|
1785
|
-
if (
|
1785
|
+
if ($a(t.charCodeAt(a))) {
|
1786
1786
|
const P = t.charCodeAt(a);
|
1787
1787
|
let g = a + 1;
|
1788
1788
|
for (; g < t.length && (t.charCodeAt(g) !== P || o(g)); )
|
@@ -1827,7 +1827,7 @@ function Nn(e, t, a) {
|
|
1827
1827
|
let I = null;
|
1828
1828
|
if (t.charCodeAt(a) === 40)
|
1829
1829
|
if (mo.has(A)) {
|
1830
|
-
if (
|
1830
|
+
if ($a(t.charCodeAt(a + 1)))
|
1831
1831
|
throw new Error(`Pseudo-selector ${A} cannot be quoted`);
|
1832
1832
|
if (I = [], a = Nn(I, t, a + 1), t.charCodeAt(a) !== 41)
|
1833
1833
|
throw new Error(`Missing closing parenthesis in :${A} (${t})`);
|
@@ -1835,7 +1835,7 @@ function Nn(e, t, a) {
|
|
1835
1835
|
} else {
|
1836
1836
|
if (I = r(), To.has(A)) {
|
1837
1837
|
const L = I.charCodeAt(0);
|
1838
|
-
L === I.charCodeAt(I.length - 1) &&
|
1838
|
+
L === I.charCodeAt(I.length - 1) && $a(L) && (I = I.slice(1, -1));
|
1839
1839
|
}
|
1840
1840
|
I = Mt(I);
|
1841
1841
|
}
|
@@ -2100,7 +2100,7 @@ function oa(e, t) {
|
|
2100
2100
|
return i != null && t.isTag(i) && e(a);
|
2101
2101
|
};
|
2102
2102
|
}
|
2103
|
-
const
|
2103
|
+
const ri = {
|
2104
2104
|
contains(e, t, { adapter: a }) {
|
2105
2105
|
return function(s) {
|
2106
2106
|
return e(s) && a.getText(s).includes(t);
|
@@ -2170,13 +2170,13 @@ const ui = {
|
|
2170
2170
|
},
|
2171
2171
|
scope(e, t, a, i) {
|
2172
2172
|
const { equals: s } = a;
|
2173
|
-
return !i || i.length === 0 ?
|
2173
|
+
return !i || i.length === 0 ? ri.root(e, t, a) : i.length === 1 ? (u) => s(i[0], u) && e(u) : (u) => i.includes(u) && e(u);
|
2174
2174
|
},
|
2175
|
-
hover:
|
2176
|
-
visited:
|
2177
|
-
active:
|
2175
|
+
hover: Xa("isHovered"),
|
2176
|
+
visited: Xa("isVisited"),
|
2177
|
+
active: Xa("isActive")
|
2178
2178
|
};
|
2179
|
-
function
|
2179
|
+
function Xa(e) {
|
2180
2180
|
return function(a, i, { adapter: s }) {
|
2181
2181
|
const u = s[e];
|
2182
2182
|
return typeof u != "function" ? Y.falseFunc : function(o) {
|
@@ -2285,7 +2285,7 @@ function xn(e, t) {
|
|
2285
2285
|
const i = a.indexOf(e);
|
2286
2286
|
return i < 0 || i === a.length - 1 ? [] : a.slice(i + 1).filter(t.isTag);
|
2287
2287
|
}
|
2288
|
-
function
|
2288
|
+
function oi(e) {
|
2289
2289
|
return {
|
2290
2290
|
xmlMode: !!e.xmlMode,
|
2291
2291
|
lowerCaseAttributeNames: !!e.lowerCaseAttributeNames,
|
@@ -2297,22 +2297,22 @@ function ri(e) {
|
|
2297
2297
|
equals: e.equals
|
2298
2298
|
};
|
2299
2299
|
}
|
2300
|
-
const
|
2301
|
-
const u = s(t,
|
2300
|
+
const Ga = (e, t, a, i, s) => {
|
2301
|
+
const u = s(t, oi(a), i);
|
2302
2302
|
return u === Y.trueFunc ? e : u === Y.falseFunc ? Y.falseFunc : (r) => u(r) && e(r);
|
2303
|
-
},
|
2304
|
-
is:
|
2303
|
+
}, Qa = {
|
2304
|
+
is: Ga,
|
2305
2305
|
/**
|
2306
2306
|
* `:matches` and `:where` are aliases for `:is`.
|
2307
2307
|
*/
|
2308
|
-
matches:
|
2309
|
-
where:
|
2308
|
+
matches: Ga,
|
2309
|
+
where: Ga,
|
2310
2310
|
not(e, t, a, i, s) {
|
2311
|
-
const u = s(t,
|
2311
|
+
const u = s(t, oi(a), i);
|
2312
2312
|
return u === Y.falseFunc ? e : u === Y.trueFunc ? Y.falseFunc : (r) => !u(r) && e(r);
|
2313
2313
|
},
|
2314
2314
|
has(e, t, a, i, s) {
|
2315
|
-
const { adapter: u } = a, r =
|
2315
|
+
const { adapter: u } = a, r = oi(a);
|
2316
2316
|
r.relativeSelector = !0;
|
2317
2317
|
const o = t.some((f) => f.some(wi)) ? (
|
2318
2318
|
// Used as a placeholder. Will be replaced with the actual element.
|
@@ -2338,28 +2338,28 @@ function vo(e, t, a, i, s) {
|
|
2338
2338
|
var u;
|
2339
2339
|
const { name: r, data: o } = t;
|
2340
2340
|
if (Array.isArray(o)) {
|
2341
|
-
if (!(r in
|
2341
|
+
if (!(r in Qa))
|
2342
2342
|
throw new Error(`Unknown pseudo-class :${r}(${o})`);
|
2343
|
-
return
|
2343
|
+
return Qa[r](e, o, a, i, s);
|
2344
2344
|
}
|
2345
2345
|
const c = (u = a.pseudos) === null || u === void 0 ? void 0 : u[r], h = typeof c == "string" ? c : Do[r];
|
2346
2346
|
if (typeof h == "string") {
|
2347
2347
|
if (o != null)
|
2348
2348
|
throw new Error(`Pseudo ${r} doesn't have any arguments`);
|
2349
|
-
const f =
|
2350
|
-
return
|
2349
|
+
const f = ka(h);
|
2350
|
+
return Qa.is(e, f, a, i, s);
|
2351
2351
|
}
|
2352
2352
|
if (typeof c == "function")
|
2353
2353
|
return hs(c, r, o, 1), (f) => c(f, o) && e(f);
|
2354
|
-
if (r in
|
2355
|
-
return
|
2354
|
+
if (r in ri)
|
2355
|
+
return ri[r](e, o, a, i);
|
2356
2356
|
if (r in ls) {
|
2357
2357
|
const f = ls[r];
|
2358
2358
|
return hs(f, r, o, 2), (m) => f(m, a, o) && e(m);
|
2359
2359
|
}
|
2360
2360
|
throw new Error(`Unknown pseudo-class :${r}`);
|
2361
2361
|
}
|
2362
|
-
function
|
2362
|
+
function ja(e, t) {
|
2363
2363
|
const a = t.getParent(e);
|
2364
2364
|
return a && t.isTag(a) ? a : null;
|
2365
2365
|
}
|
@@ -2389,7 +2389,7 @@ function Ro(e, t, a, i, s) {
|
|
2389
2389
|
if (a.cacheResults === !1 || typeof WeakSet > "u")
|
2390
2390
|
return function(h) {
|
2391
2391
|
let f = h;
|
2392
|
-
for (; f =
|
2392
|
+
for (; f = ja(f, u); )
|
2393
2393
|
if (e(f))
|
2394
2394
|
return !0;
|
2395
2395
|
return !1;
|
@@ -2397,7 +2397,7 @@ function Ro(e, t, a, i, s) {
|
|
2397
2397
|
const o = /* @__PURE__ */ new WeakSet();
|
2398
2398
|
return function(h) {
|
2399
2399
|
let f = h;
|
2400
|
-
for (; f =
|
2400
|
+
for (; f = ja(f, u); )
|
2401
2401
|
if (!o.has(f)) {
|
2402
2402
|
if (u.isTag(f) && e(f))
|
2403
2403
|
return !0;
|
@@ -2412,7 +2412,7 @@ function Ro(e, t, a, i, s) {
|
|
2412
2412
|
do
|
2413
2413
|
if (e(h))
|
2414
2414
|
return !0;
|
2415
|
-
while (h =
|
2415
|
+
while (h = ja(h, u));
|
2416
2416
|
return !1;
|
2417
2417
|
};
|
2418
2418
|
case v.Parent:
|
@@ -2509,13 +2509,13 @@ function Bo(e, t) {
|
|
2509
2509
|
};
|
2510
2510
|
}
|
2511
2511
|
const Ln = (e, t) => e === t, Uo = {
|
2512
|
-
adapter:
|
2512
|
+
adapter: Pa,
|
2513
2513
|
equals: Ln
|
2514
2514
|
};
|
2515
2515
|
function Fo(e) {
|
2516
2516
|
var t, a, i, s;
|
2517
2517
|
const u = e ?? Uo;
|
2518
|
-
return (t = u.adapter) !== null && t !== void 0 || (u.adapter =
|
2518
|
+
return (t = u.adapter) !== null && t !== void 0 || (u.adapter = Pa), (a = u.equals) !== null && a !== void 0 || (u.equals = (s = (i = u.adapter) === null || i === void 0 ? void 0 : i.equals) !== null && s !== void 0 ? s : Ln), u;
|
2519
2519
|
}
|
2520
2520
|
function Ho(e) {
|
2521
2521
|
return function(a, i, s) {
|
@@ -2594,7 +2594,7 @@ function Rn(e, t, a = {}) {
|
|
2594
2594
|
function yn(e, t, a = {}) {
|
2595
2595
|
if (typeof t == "function")
|
2596
2596
|
return e.some(t);
|
2597
|
-
const [i, s] = Ui(
|
2597
|
+
const [i, s] = Ui(ka(t));
|
2598
2598
|
return i.length > 0 && e.some(Bi(i, a)) || s.some((u) => kn(u, e, a).length > 0);
|
2599
2599
|
}
|
2600
2600
|
function Go(e, t, a, i) {
|
@@ -2621,7 +2621,7 @@ function Go(e, t, a, i) {
|
|
2621
2621
|
}
|
2622
2622
|
}
|
2623
2623
|
function Mn(e, t, a = {}) {
|
2624
|
-
return Pn(
|
2624
|
+
return Pn(ka(e), t, a);
|
2625
2625
|
}
|
2626
2626
|
function Pn(e, t, a) {
|
2627
2627
|
if (t.length === 0)
|
@@ -2629,7 +2629,7 @@ function Pn(e, t, a) {
|
|
2629
2629
|
const [i, s] = Ui(e);
|
2630
2630
|
let u;
|
2631
2631
|
if (i.length) {
|
2632
|
-
const r =
|
2632
|
+
const r = li(t, i, a);
|
2633
2633
|
if (s.length === 0)
|
2634
2634
|
return r;
|
2635
2635
|
r.length && (u = new Set(r));
|
@@ -2664,14 +2664,14 @@ function kn(e, t, a) {
|
|
2664
2664
|
function Qo(e, t, a = {}, i = 1 / 0) {
|
2665
2665
|
if (typeof e == "function")
|
2666
2666
|
return wn(t, e);
|
2667
|
-
const [s, u] = Ui(
|
2668
|
-
return s.length && r.push(
|
2667
|
+
const [s, u] = Ui(ka(e)), r = u.map((o) => Ia(t, o, a, !0, i));
|
2668
|
+
return s.length && r.push(ci(t, s, a, i)), r.length === 0 ? [] : r.length === 1 ? r[0] : vt(r.reduce((o, c) => [...o, ...c]));
|
2669
2669
|
}
|
2670
2670
|
function Ia(e, t, a, i, s) {
|
2671
2671
|
const u = t.findIndex(Na), r = t.slice(0, u), o = t[u], c = t.length - 1 === u ? s : 1 / 0, h = Vo(o.name, o.data, c);
|
2672
2672
|
if (h === 0)
|
2673
2673
|
return [];
|
2674
|
-
const m = (r.length === 0 && !Array.isArray(e) ?
|
2674
|
+
const m = (r.length === 0 && !Array.isArray(e) ? ya(e).filter(k) : r.length === 0 ? (Array.isArray(e) ? e : [e]).filter(k) : i || r.some(qt) ? ci(e, [r], a, h) : li(e, [r], a)).slice(0, h);
|
2675
2675
|
let T = Go(o.name, m, o.data, a);
|
2676
2676
|
if (T.length === 0 || t.length === u + 1)
|
2677
2677
|
return T;
|
@@ -2679,7 +2679,7 @@ function Ia(e, t, a, i, s) {
|
|
2679
2679
|
if (I) {
|
2680
2680
|
if (qt(A[0])) {
|
2681
2681
|
const { type: L } = A[0];
|
2682
|
-
(L === v.Sibling || L === v.Adjacent) && (T = vn(T,
|
2682
|
+
(L === v.Sibling || L === v.Adjacent) && (T = vn(T, Pa, !0)), A.unshift($o);
|
2683
2683
|
}
|
2684
2684
|
a = {
|
2685
2685
|
...a,
|
@@ -2694,21 +2694,21 @@ function Ia(e, t, a, i, s) {
|
|
2694
2694
|
} else a.rootFunc && a.rootFunc !== Aa.trueFunc && (a = { ...a, rootFunc: Aa.trueFunc });
|
2695
2695
|
return A.some(Na) ? Ia(T, A, a, !1, s) : I ? (
|
2696
2696
|
// Query existing elements to resolve traversal.
|
2697
|
-
|
2697
|
+
ci(T, [A], a, s)
|
2698
2698
|
) : (
|
2699
2699
|
// If we don't have any more traversals, simply filter elements.
|
2700
|
-
|
2700
|
+
li(T, [A], a)
|
2701
2701
|
);
|
2702
2702
|
}
|
2703
|
-
function
|
2703
|
+
function ci(e, t, a, i) {
|
2704
2704
|
const s = Bi(t, a, e);
|
2705
2705
|
return wn(e, s, i);
|
2706
2706
|
}
|
2707
2707
|
function wn(e, t, a = 1 / 0) {
|
2708
|
-
const i = vn(e,
|
2708
|
+
const i = vn(e, Pa, t.shouldTestNextSiblings);
|
2709
2709
|
return Mi((s) => k(s) && t(s), i, !0, a);
|
2710
2710
|
}
|
2711
|
-
function
|
2711
|
+
function li(e, t, a) {
|
2712
2712
|
const i = (Array.isArray(e) ? e : [e]).filter(k);
|
2713
2713
|
if (i.length === 0)
|
2714
2714
|
return i;
|
@@ -2819,7 +2819,7 @@ const ac = Hi((e) => Ri(e)), ic = ia((e) => {
|
|
2819
2819
|
for (; e.prev; )
|
2820
2820
|
e = e.prev, k(e) && t.push(e);
|
2821
2821
|
return t;
|
2822
|
-
}, Rt), rc = Yi((e) => yi(e), Rt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), vt), cc = ia((e) =>
|
2822
|
+
}, Rt), rc = Yi((e) => yi(e), Rt), oc = ia((e) => cn(e).filter((t) => k(t) && t !== e), vt), cc = ia((e) => ya(e).filter(k), Rt);
|
2823
2823
|
function lc() {
|
2824
2824
|
const e = this.toArray().reduce((t, a) => Te(a) ? t.concat(a.children) : t, []);
|
2825
2825
|
return this._make(e);
|
@@ -3029,7 +3029,7 @@ function Un(e) {
|
|
3029
3029
|
return function(t) {
|
3030
3030
|
const a = this.length - 1, i = this.parents().last();
|
3031
3031
|
for (let s = 0; s < this.length; s++) {
|
3032
|
-
const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !
|
3032
|
+
const u = this[s], r = typeof t == "function" ? t.call(u, s, u) : typeof t == "string" && !ni(t) ? i.find(t).clone() : t, [o] = this._makeDomArray(r, s < a);
|
3033
3033
|
if (!o || !Te(o))
|
3034
3034
|
continue;
|
3035
3035
|
let c = o, h = 0;
|
@@ -3338,7 +3338,7 @@ function rl(e, t) {
|
|
3338
3338
|
return function a(i, s, u = !0) {
|
3339
3339
|
if (i == null)
|
3340
3340
|
throw new Error("cheerio.load() expects a string");
|
3341
|
-
const r =
|
3341
|
+
const r = si(s), o = e(i, r, u, null);
|
3342
3342
|
class c extends na {
|
3343
3343
|
_make(m, T) {
|
3344
3344
|
const A = h(m, T);
|
@@ -3354,10 +3354,10 @@ function rl(e, t) {
|
|
3354
3354
|
function h(f, m, T = o, A) {
|
3355
3355
|
if (f && Xe(f))
|
3356
3356
|
return f;
|
3357
|
-
const I =
|
3357
|
+
const I = si(A, r), L = typeof T == "string" ? [e(T, I, !1, null)] : "length" in T ? T : [T], M = Xe(L) ? L : new c(L, null, I);
|
3358
3358
|
if (M._root = M, !f)
|
3359
3359
|
return new c(void 0, M, I);
|
3360
|
-
const X = typeof f == "string" &&
|
3360
|
+
const X = typeof f == "string" && ni(f) ? (
|
3361
3361
|
// $(<html>)
|
3362
3362
|
e(f, I, !1, null).children
|
3363
3363
|
) : ol(f) ? (
|
@@ -3374,7 +3374,7 @@ function rl(e, t) {
|
|
3374
3374
|
let $ = f;
|
3375
3375
|
const F = m ? (
|
3376
3376
|
// If we don't have a context, maybe we have a root, from loading
|
3377
|
-
typeof m == "string" ?
|
3377
|
+
typeof m == "string" ? ni(m) ? (
|
3378
3378
|
// $('li', '<ul>...</ul>')
|
3379
3379
|
new c([e(m, I, !1, null)], M, I)
|
3380
3380
|
) : (
|
@@ -3710,7 +3710,7 @@ const El = /* @__PURE__ */ new Map([
|
|
3710
3710
|
[p.WBR, n.WBR],
|
3711
3711
|
[p.XMP, n.XMP]
|
3712
3712
|
]);
|
3713
|
-
function
|
3713
|
+
function wa(e) {
|
3714
3714
|
var t;
|
3715
3715
|
return (t = El.get(e)) !== null && t !== void 0 ? t : n.UNKNOWN;
|
3716
3716
|
}
|
@@ -3803,7 +3803,7 @@ const C = n, ml = {
|
|
3803
3803
|
[_.XLINK]: /* @__PURE__ */ new Set(),
|
3804
3804
|
[_.XML]: /* @__PURE__ */ new Set(),
|
3805
3805
|
[_.XMLNS]: /* @__PURE__ */ new Set()
|
3806
|
-
},
|
3806
|
+
}, hi = /* @__PURE__ */ new Set([C.H1, C.H2, C.H3, C.H4, C.H5, C.H6]), Tl = /* @__PURE__ */ new Set([
|
3807
3807
|
p.STYLE,
|
3808
3808
|
p.SCRIPT,
|
3809
3809
|
p.XMP,
|
@@ -4002,7 +4002,7 @@ let Al = class {
|
|
4002
4002
|
}
|
4003
4003
|
emitCurrentTagToken() {
|
4004
4004
|
const t = this.currentToken;
|
4005
|
-
this.prepareToken(t), t.tagID =
|
4005
|
+
this.prepareToken(t), t.tagID = wa(t.tagName), t.type === G.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(b.endTagWithAttributes), t.selfClosing && this._err(b.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
|
4006
4006
|
}
|
4007
4007
|
emitCurrentComment(t) {
|
4008
4008
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
@@ -5821,7 +5821,7 @@ class Dl {
|
|
5821
5821
|
this.shortenToLength(i < 0 ? 0 : i);
|
5822
5822
|
}
|
5823
5823
|
popUntilNumberedHeaderPopped() {
|
5824
|
-
this.popUntilPopped(
|
5824
|
+
this.popUntilPopped(hi, _.HTML);
|
5825
5825
|
}
|
5826
5826
|
popUntilTableCellPopped() {
|
5827
5827
|
this.popUntilPopped(Ol, _.HTML);
|
@@ -5906,7 +5906,7 @@ class Dl {
|
|
5906
5906
|
const a = this.tagIDs[t];
|
5907
5907
|
switch (this.treeAdapter.getNamespaceURI(this.items[t])) {
|
5908
5908
|
case _.HTML: {
|
5909
|
-
if (
|
5909
|
+
if (hi.has(a))
|
5910
5910
|
return !0;
|
5911
5911
|
if (Ca.has(a))
|
5912
5912
|
return !1;
|
@@ -5980,7 +5980,7 @@ class Dl {
|
|
5980
5980
|
this.pop();
|
5981
5981
|
}
|
5982
5982
|
}
|
5983
|
-
const
|
5983
|
+
const za = 3;
|
5984
5984
|
var Ue;
|
5985
5985
|
(function(e) {
|
5986
5986
|
e[e.Marker = 0] = "Marker", e[e.Element = 1] = "Element";
|
@@ -6008,16 +6008,16 @@ class Ll {
|
|
6008
6008
|
return i;
|
6009
6009
|
}
|
6010
6010
|
_ensureNoahArkCondition(t) {
|
6011
|
-
if (this.entries.length <
|
6011
|
+
if (this.entries.length < za)
|
6012
6012
|
return;
|
6013
6013
|
const a = this.treeAdapter.getAttrList(t), i = this._getNoahArkConditionCandidates(t, a);
|
6014
|
-
if (i.length <
|
6014
|
+
if (i.length < za)
|
6015
6015
|
return;
|
6016
6016
|
const s = new Map(a.map((r) => [r.name, r.value]));
|
6017
6017
|
let u = 0;
|
6018
6018
|
for (let r = 0; r < i.length; r++) {
|
6019
6019
|
const o = i[r];
|
6020
|
-
o.attrs.every((c) => s.get(c.name) === c.value) && (u += 1, u >=
|
6020
|
+
o.attrs.every((c) => s.get(c.name) === c.value) && (u += 1, u >= za && this.entries.splice(o.idx, 1));
|
6021
6021
|
}
|
6022
6022
|
}
|
6023
6023
|
//Mutations
|
@@ -6493,7 +6493,7 @@ function Vi(e) {
|
|
6493
6493
|
}
|
6494
6494
|
function Wl(e) {
|
6495
6495
|
const t = Yl.get(e.tagName);
|
6496
|
-
t != null && (e.tagName = t, e.tagID =
|
6496
|
+
t != null && (e.tagName = t, e.tagID = wa(e.tagName));
|
6497
6497
|
}
|
6498
6498
|
function $l(e, t) {
|
6499
6499
|
return t === _.MATHML && (e === n.MI || e === n.MO || e === n.MN || e === n.MS || e === n.MTEXT);
|
@@ -6534,7 +6534,7 @@ let Jn = class {
|
|
6534
6534
|
this.fragmentContext = i, this.scriptHandler = s, this.currentToken = null, this.stopped = !1, this.insertionMode = E.INITIAL, this.originalInsertionMode = E.INITIAL, this.headElement = null, this.formElement = null, this.currentNotInHTML = !1, this.tmplInsertionModeStack = [], this.pendingCharacterTokens = [], this.hasNonWhitespacePendingCharacterToken = !1, this.framesetOk = !0, this.skipNextNewLine = !1, this.fosterParentingEnabled = !1, this.options = {
|
6535
6535
|
...Ns,
|
6536
6536
|
...t
|
6537
|
-
}, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = a ?? this.treeAdapter.createDocument(), this.tokenizer = new Al(this.options, this), this.activeFormattingElements = new Ll(this.treeAdapter), this.fragmentContextID = i ?
|
6537
|
+
}, this.treeAdapter = this.options.treeAdapter, this.onParseError = this.options.onParseError, this.onParseError && (this.options.sourceCodeLocationInfo = !0), this.document = a ?? this.treeAdapter.createDocument(), this.tokenizer = new Al(this.options, this), this.activeFormattingElements = new Ll(this.treeAdapter), this.fragmentContextID = i ? wa(this.treeAdapter.getTagName(i)) : n.UNKNOWN, this._setContextModes(i ?? this.document, this.fragmentContextID), this.openElements = new Dl(this.document, this.treeAdapter, this);
|
6538
6538
|
}
|
6539
6539
|
// API
|
6540
6540
|
static parse(t, a) {
|
@@ -6974,7 +6974,7 @@ let Jn = class {
|
|
6974
6974
|
case E.IN_TABLE:
|
6975
6975
|
case E.IN_TABLE_BODY:
|
6976
6976
|
case E.IN_ROW: {
|
6977
|
-
|
6977
|
+
Ka(this, t);
|
6978
6978
|
break;
|
6979
6979
|
}
|
6980
6980
|
case E.IN_TABLE_TEXT: {
|
@@ -7033,7 +7033,7 @@ let Jn = class {
|
|
7033
7033
|
case E.IN_TABLE:
|
7034
7034
|
case E.IN_TABLE_BODY:
|
7035
7035
|
case E.IN_ROW: {
|
7036
|
-
|
7036
|
+
Ka(this, t);
|
7037
7037
|
break;
|
7038
7038
|
}
|
7039
7039
|
case E.IN_COLUMN_GROUP: {
|
@@ -7053,7 +7053,7 @@ let Jn = class {
|
|
7053
7053
|
/** @internal */
|
7054
7054
|
onComment(t) {
|
7055
7055
|
if (this.skipNextNewLine = !1, this.currentNotInHTML) {
|
7056
|
-
|
7056
|
+
di(this, t);
|
7057
7057
|
return;
|
7058
7058
|
}
|
7059
7059
|
switch (this.insertionMode) {
|
@@ -7075,7 +7075,7 @@ let Jn = class {
|
|
7075
7075
|
case E.IN_TEMPLATE:
|
7076
7076
|
case E.IN_FRAMESET:
|
7077
7077
|
case E.AFTER_FRAMESET: {
|
7078
|
-
|
7078
|
+
di(this, t);
|
7079
7079
|
break;
|
7080
7080
|
}
|
7081
7081
|
case E.IN_TABLE_TEXT: {
|
@@ -7179,11 +7179,11 @@ let Jn = class {
|
|
7179
7179
|
break;
|
7180
7180
|
}
|
7181
7181
|
case E.IN_TABLE_BODY: {
|
7182
|
-
|
7182
|
+
Fa(this, t);
|
7183
7183
|
break;
|
7184
7184
|
}
|
7185
7185
|
case E.IN_ROW: {
|
7186
|
-
|
7186
|
+
Ha(this, t);
|
7187
7187
|
break;
|
7188
7188
|
}
|
7189
7189
|
case E.IN_CELL: {
|
@@ -7256,7 +7256,7 @@ let Jn = class {
|
|
7256
7256
|
break;
|
7257
7257
|
}
|
7258
7258
|
case E.IN_BODY: {
|
7259
|
-
|
7259
|
+
Ua(this, t);
|
7260
7260
|
break;
|
7261
7261
|
}
|
7262
7262
|
case E.TEXT: {
|
@@ -7280,7 +7280,7 @@ let Jn = class {
|
|
7280
7280
|
break;
|
7281
7281
|
}
|
7282
7282
|
case E.IN_TABLE_BODY: {
|
7283
|
-
|
7283
|
+
fi(this, t);
|
7284
7284
|
break;
|
7285
7285
|
}
|
7286
7286
|
case E.IN_ROW: {
|
@@ -7419,7 +7419,7 @@ let Jn = class {
|
|
7419
7419
|
case E.IN_TABLE:
|
7420
7420
|
case E.IN_TABLE_BODY:
|
7421
7421
|
case E.IN_ROW: {
|
7422
|
-
|
7422
|
+
Ka(this, t);
|
7423
7423
|
break;
|
7424
7424
|
}
|
7425
7425
|
case E.IN_TABLE_TEXT: {
|
@@ -7457,7 +7457,7 @@ function t0(e, t) {
|
|
7457
7457
|
return e.openElements.replace(t.element, i), t.element = i, i;
|
7458
7458
|
}
|
7459
7459
|
function a0(e, t, a) {
|
7460
|
-
const i = e.treeAdapter.getTagName(t), s =
|
7460
|
+
const i = e.treeAdapter.getTagName(t), s = wa(i);
|
7461
7461
|
if (e._isElementCausesFosterParenting(s))
|
7462
7462
|
e._fosterParentElement(a);
|
7463
7463
|
else {
|
@@ -7482,7 +7482,7 @@ function Wi(e, t) {
|
|
7482
7482
|
e.treeAdapter.detachNode(u), r && a0(e, r, u), i0(e, s, i);
|
7483
7483
|
}
|
7484
7484
|
}
|
7485
|
-
function
|
7485
|
+
function di(e, t) {
|
7486
7486
|
e._appendCommentNode(t, e.openElements.currentTmplContentOrNode);
|
7487
7487
|
}
|
7488
7488
|
function s0(e, t) {
|
@@ -7707,9 +7707,9 @@ function m0(e, t) {
|
|
7707
7707
|
}
|
7708
7708
|
}
|
7709
7709
|
function Gt(e, t) {
|
7710
|
-
e._insertFakeElement(p.BODY, n.BODY), e.insertionMode = E.IN_BODY,
|
7710
|
+
e._insertFakeElement(p.BODY, n.BODY), e.insertionMode = E.IN_BODY, Ba(e, t);
|
7711
7711
|
}
|
7712
|
-
function
|
7712
|
+
function Ba(e, t) {
|
7713
7713
|
switch (t.type) {
|
7714
7714
|
case G.CHARACTER: {
|
7715
7715
|
tu(e, t);
|
@@ -7720,7 +7720,7 @@ function wa(e, t) {
|
|
7720
7720
|
break;
|
7721
7721
|
}
|
7722
7722
|
case G.COMMENT: {
|
7723
|
-
|
7723
|
+
di(e, t);
|
7724
7724
|
break;
|
7725
7725
|
}
|
7726
7726
|
case G.START_TAG: {
|
@@ -7728,7 +7728,7 @@ function wa(e, t) {
|
|
7728
7728
|
break;
|
7729
7729
|
}
|
7730
7730
|
case G.END_TAG: {
|
7731
|
-
|
7731
|
+
Ua(e, t);
|
7732
7732
|
break;
|
7733
7733
|
}
|
7734
7734
|
case G.EOF: {
|
@@ -7758,7 +7758,7 @@ function g0(e, t) {
|
|
7758
7758
|
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML);
|
7759
7759
|
}
|
7760
7760
|
function _0(e, t) {
|
7761
|
-
e.openElements.hasInButtonScope(n.P) && e._closePElement(),
|
7761
|
+
e.openElements.hasInButtonScope(n.P) && e._closePElement(), hi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, _.HTML);
|
7762
7762
|
}
|
7763
7763
|
function A0(e, t) {
|
7764
7764
|
e.openElements.hasInButtonScope(n.P) && e._closePElement(), e._insertElement(t, _.HTML), e.skipNextNewLine = !0, e.framesetOk = !1;
|
@@ -8114,7 +8114,7 @@ function su(e, t) {
|
|
8114
8114
|
break;
|
8115
8115
|
}
|
8116
8116
|
}
|
8117
|
-
function
|
8117
|
+
function Ua(e, t) {
|
8118
8118
|
switch (t.tagID) {
|
8119
8119
|
case n.A:
|
8120
8120
|
case n.B:
|
@@ -8225,7 +8225,7 @@ function eh(e, t) {
|
|
8225
8225
|
function th(e, t) {
|
8226
8226
|
e._err(t, b.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
|
8227
8227
|
}
|
8228
|
-
function
|
8228
|
+
function Ka(e, t) {
|
8229
8229
|
if (Zn.has(e.openElements.currentTagId))
|
8230
8230
|
switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = E.IN_TABLE_TEXT, t.type) {
|
8231
8231
|
case G.CHARACTER: {
|
@@ -8253,7 +8253,7 @@ function nh(e, t) {
|
|
8253
8253
|
e.openElements.clearBackToTableContext(), e._insertElement(t, _.HTML), e.insertionMode = E.IN_TABLE_BODY;
|
8254
8254
|
}
|
8255
8255
|
function uh(e, t) {
|
8256
|
-
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, n.TBODY), e.insertionMode = E.IN_TABLE_BODY,
|
8256
|
+
e.openElements.clearBackToTableContext(), e._insertFakeElement(p.TBODY, n.TBODY), e.insertionMode = E.IN_TABLE_BODY, Fa(e, t);
|
8257
8257
|
}
|
8258
8258
|
function rh(e, t) {
|
8259
8259
|
e.openElements.hasInTableScope(n.TABLE) && (e.openElements.popUntilTagNamePopped(n.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
@@ -8340,7 +8340,7 @@ function ea(e, t) {
|
|
8340
8340
|
}
|
8341
8341
|
function ua(e, t) {
|
8342
8342
|
const a = e.fosterParentingEnabled;
|
8343
|
-
e.fosterParentingEnabled = !0,
|
8343
|
+
e.fosterParentingEnabled = !0, Ba(e, t), e.fosterParentingEnabled = a;
|
8344
8344
|
}
|
8345
8345
|
function uu(e, t) {
|
8346
8346
|
e.pendingCharacterTokens.push(t);
|
@@ -8383,7 +8383,7 @@ function hh(e, t) {
|
|
8383
8383
|
case n.TR:
|
8384
8384
|
break;
|
8385
8385
|
default:
|
8386
|
-
|
8386
|
+
Ua(e, t);
|
8387
8387
|
}
|
8388
8388
|
}
|
8389
8389
|
function Xi(e, t) {
|
@@ -8423,7 +8423,7 @@ function dh(e, t) {
|
|
8423
8423
|
function Sa(e, t) {
|
8424
8424
|
e.openElements.currentTagId === n.COLGROUP && (e.openElements.pop(), e.insertionMode = E.IN_TABLE, e._processToken(t));
|
8425
8425
|
}
|
8426
|
-
function
|
8426
|
+
function Fa(e, t) {
|
8427
8427
|
switch (t.tagID) {
|
8428
8428
|
case n.TR: {
|
8429
8429
|
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, _.HTML), e.insertionMode = E.IN_ROW;
|
@@ -8431,7 +8431,7 @@ function Ua(e, t) {
|
|
8431
8431
|
}
|
8432
8432
|
case n.TH:
|
8433
8433
|
case n.TD: {
|
8434
|
-
e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(p.TR, n.TR), e.insertionMode = E.IN_ROW,
|
8434
|
+
e.openElements.clearBackToTableBodyContext(), e._insertFakeElement(p.TR, n.TR), e.insertionMode = E.IN_ROW, Ha(e, t);
|
8435
8435
|
break;
|
8436
8436
|
}
|
8437
8437
|
case n.CAPTION:
|
@@ -8447,7 +8447,7 @@ function Ua(e, t) {
|
|
8447
8447
|
Dt(e, t);
|
8448
8448
|
}
|
8449
8449
|
}
|
8450
|
-
function
|
8450
|
+
function fi(e, t) {
|
8451
8451
|
const a = t.tagID;
|
8452
8452
|
switch (t.tagID) {
|
8453
8453
|
case n.TBODY:
|
@@ -8473,7 +8473,7 @@ function di(e, t) {
|
|
8473
8473
|
ea(e, t);
|
8474
8474
|
}
|
8475
8475
|
}
|
8476
|
-
function
|
8476
|
+
function Ha(e, t) {
|
8477
8477
|
switch (t.tagID) {
|
8478
8478
|
case n.TH:
|
8479
8479
|
case n.TD: {
|
@@ -8487,7 +8487,7 @@ function Fa(e, t) {
|
|
8487
8487
|
case n.TFOOT:
|
8488
8488
|
case n.THEAD:
|
8489
8489
|
case n.TR: {
|
8490
|
-
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8490
|
+
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, Fa(e, t));
|
8491
8491
|
break;
|
8492
8492
|
}
|
8493
8493
|
default:
|
@@ -8501,13 +8501,13 @@ function cu(e, t) {
|
|
8501
8501
|
break;
|
8502
8502
|
}
|
8503
8503
|
case n.TABLE: {
|
8504
|
-
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8504
|
+
e.openElements.hasInTableScope(n.TR) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, fi(e, t));
|
8505
8505
|
break;
|
8506
8506
|
}
|
8507
8507
|
case n.TBODY:
|
8508
8508
|
case n.TFOOT:
|
8509
8509
|
case n.THEAD: {
|
8510
|
-
(e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(n.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY,
|
8510
|
+
(e.openElements.hasInTableScope(t.tagID) || e.openElements.hasInTableScope(n.TR)) && (e.openElements.clearBackToTableRowContext(), e.openElements.pop(), e.insertionMode = E.IN_TABLE_BODY, fi(e, t));
|
8511
8511
|
break;
|
8512
8512
|
}
|
8513
8513
|
case n.BODY:
|
@@ -8524,7 +8524,7 @@ function cu(e, t) {
|
|
8524
8524
|
}
|
8525
8525
|
function fh(e, t) {
|
8526
8526
|
const a = t.tagID;
|
8527
|
-
ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(),
|
8527
|
+
ou.has(a) ? (e.openElements.hasInTableScope(n.TD) || e.openElements.hasInTableScope(n.TH)) && (e._closeTableCell(), Ha(e, t)) : be(e, t);
|
8528
8528
|
}
|
8529
8529
|
function Eh(e, t) {
|
8530
8530
|
const a = t.tagID;
|
@@ -8549,7 +8549,7 @@ function Eh(e, t) {
|
|
8549
8549
|
case n.HTML:
|
8550
8550
|
break;
|
8551
8551
|
default:
|
8552
|
-
|
8552
|
+
Ua(e, t);
|
8553
8553
|
}
|
8554
8554
|
}
|
8555
8555
|
function lu(e, t) {
|
@@ -8640,12 +8640,12 @@ function ph(e, t) {
|
|
8640
8640
|
break;
|
8641
8641
|
}
|
8642
8642
|
case n.TR: {
|
8643
|
-
e.tmplInsertionModeStack[0] = E.IN_TABLE_BODY, e.insertionMode = E.IN_TABLE_BODY,
|
8643
|
+
e.tmplInsertionModeStack[0] = E.IN_TABLE_BODY, e.insertionMode = E.IN_TABLE_BODY, Fa(e, t);
|
8644
8644
|
break;
|
8645
8645
|
}
|
8646
8646
|
case n.TD:
|
8647
8647
|
case n.TH: {
|
8648
|
-
e.tmplInsertionModeStack[0] = E.IN_ROW, e.insertionMode = E.IN_ROW,
|
8648
|
+
e.tmplInsertionModeStack[0] = E.IN_ROW, e.insertionMode = E.IN_ROW, Ha(e, t);
|
8649
8649
|
break;
|
8650
8650
|
}
|
8651
8651
|
default:
|
@@ -8673,7 +8673,7 @@ function fu(e, t) {
|
|
8673
8673
|
xa(e, t);
|
8674
8674
|
}
|
8675
8675
|
function xa(e, t) {
|
8676
|
-
e.insertionMode = E.IN_BODY,
|
8676
|
+
e.insertionMode = E.IN_BODY, Ba(e, t);
|
8677
8677
|
}
|
8678
8678
|
function _h(e, t) {
|
8679
8679
|
switch (t.tagID) {
|
@@ -8717,7 +8717,7 @@ function Ch(e, t) {
|
|
8717
8717
|
t.tagID === n.HTML ? be(e, t) : ma(e, t);
|
8718
8718
|
}
|
8719
8719
|
function ma(e, t) {
|
8720
|
-
e.insertionMode = E.IN_BODY,
|
8720
|
+
e.insertionMode = E.IN_BODY, Ba(e, t);
|
8721
8721
|
}
|
8722
8722
|
function Sh(e, t) {
|
8723
8723
|
switch (t.tagID) {
|
@@ -8864,7 +8864,7 @@ function qh(e, t, a) {
|
|
8864
8864
|
}
|
8865
8865
|
const ze = {
|
8866
8866
|
// Re-exports from domhandler
|
8867
|
-
isCommentNode:
|
8867
|
+
isCommentNode: va,
|
8868
8868
|
isElementNode: k,
|
8869
8869
|
isTextNode: He,
|
8870
8870
|
//Node construction
|
@@ -8907,7 +8907,7 @@ const ze = {
|
|
8907
8907
|
},
|
8908
8908
|
setDocumentType(e, t, a, i) {
|
8909
8909
|
const s = qh(t, a, i);
|
8910
|
-
let u = e.children.find((r) =>
|
8910
|
+
let u = e.children.find((r) => ti(r) && r.name === "!doctype");
|
8911
8911
|
u ? u.data = s ?? null : (u = new xi("!doctype", s), ze.appendChild(e, u)), u["x-name"] = t, u["x-publicId"] = a, u["x-systemId"] = i;
|
8912
8912
|
},
|
8913
8913
|
setDocumentMode(e, t) {
|
@@ -8976,7 +8976,7 @@ const ze = {
|
|
8976
8976
|
},
|
8977
8977
|
//Node types
|
8978
8978
|
isDocumentTypeNode(e) {
|
8979
|
-
return
|
8979
|
+
return ti(e) && e.name === "!doctype";
|
8980
8980
|
},
|
8981
8981
|
// Source code location
|
8982
8982
|
setNodeSourceCodeLocation(e, t) {
|
@@ -9470,7 +9470,7 @@ class Kh {
|
|
9470
9470
|
/** @internal */
|
9471
9471
|
ontextentity(t, a) {
|
9472
9472
|
var i, s;
|
9473
|
-
this.endIndex = a - 1, (s = (i = this.cbs).ontext) === null || s === void 0 || s.call(i,
|
9473
|
+
this.endIndex = a - 1, (s = (i = this.cbs).ontext) === null || s === void 0 || s.call(i, ai(t)), this.startIndex = a;
|
9474
9474
|
}
|
9475
9475
|
/**
|
9476
9476
|
* Checks if the current tag is a void element. Override this if you want
|
@@ -9543,7 +9543,7 @@ class Kh {
|
|
9543
9543
|
}
|
9544
9544
|
/** @internal */
|
9545
9545
|
onattribentity(t) {
|
9546
|
-
this.attribvalue +=
|
9546
|
+
this.attribvalue += ai(t);
|
9547
9547
|
}
|
9548
9548
|
/** @internal */
|
9549
9549
|
onattribend(t, a) {
|
@@ -9687,7 +9687,7 @@ function Zh(e, t) {
|
|
9687
9687
|
const a = new Ju(void 0, t);
|
9688
9688
|
return new Kh(a, t).end(e), a.root;
|
9689
9689
|
}
|
9690
|
-
const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Rs = rl(Jh, (e, t) => t._useHtmlParser2 ?
|
9690
|
+
const Jh = Dc((e, t, a, i) => t._useHtmlParser2 ? Zh(e, t) : Vh(e, t, a, i)), Rs = rl(Jh, (e, t) => t._useHtmlParser2 ? Ra(e, t) : $h(e));
|
9691
9691
|
var te = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Text = 1] = "Text", e[e.Image = 2] = "Image", e[e.Video = 3] = "Video", e[e.Icon = 4] = "Icon", e[e.Link = 5] = "Link", e[e.Block = 10] = "Block", e))(te || {});
|
9692
9692
|
const ed = Ge({
|
9693
9693
|
name: "CustomIcon",
|
@@ -9710,13 +9710,13 @@ const ed = Ge({
|
|
9710
9710
|
};
|
9711
9711
|
function td(e, t, a, i, s, u) {
|
9712
9712
|
return B(), V("span", {
|
9713
|
-
class:
|
9713
|
+
class: Da(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)
|
9714
9714
|
}, null, 2);
|
9715
9715
|
}
|
9716
9716
|
const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
9717
9717
|
key: 0,
|
9718
9718
|
contenteditable: "false",
|
9719
|
-
class: /* @__PURE__ */
|
9719
|
+
class: /* @__PURE__ */ Da(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])
|
9720
9720
|
}, sd = { class: "flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden" }, nd = { class: "flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]" }, ud = { class: "p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, rd = /* @__PURE__ */ Ge({
|
9721
9721
|
__name: "IconModal",
|
9722
9722
|
props: {
|
@@ -9748,7 +9748,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9748
9748
|
m[1] || (m[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "选择图标", -1)),
|
9749
9749
|
S("span", {
|
9750
9750
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
9751
|
-
onClick: m[0] || (m[0] =
|
9751
|
+
onClick: m[0] || (m[0] = he((T) => h(), ["stop"]))
|
9752
9752
|
})
|
9753
9753
|
]),
|
9754
9754
|
S("div", ud, [
|
@@ -9756,7 +9756,7 @@ const ad = /* @__PURE__ */ yt(ed, [["render", td]]), id = {
|
|
9756
9756
|
key: T,
|
9757
9757
|
class: "w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",
|
9758
9758
|
iconName: T,
|
9759
|
-
onClick:
|
9759
|
+
onClick: he((A) => c(T), ["stop"]),
|
9760
9760
|
title: T
|
9761
9761
|
}, null, 8, ["iconName", "onClick", "title"]))), 128))
|
9762
9762
|
])
|
@@ -9811,11 +9811,11 @@ const od = /* @__PURE__ */ Ge({
|
|
9811
9811
|
class: "bg-background-deep box-border cursor-pointer absolute left-0 top-0",
|
9812
9812
|
title: "点击上传"
|
9813
9813
|
}, r.$attrs, {
|
9814
|
-
onClick: o[2] || (o[2] =
|
9814
|
+
onClick: o[2] || (o[2] = he(() => {
|
9815
9815
|
}, ["stop"]))
|
9816
9816
|
}), [
|
9817
9817
|
S("input", {
|
9818
|
-
onClick: o[0] || (o[0] =
|
9818
|
+
onClick: o[0] || (o[0] = he(() => {
|
9819
9819
|
}, ["stop"])),
|
9820
9820
|
contenteditable: "false",
|
9821
9821
|
class: "cursor-pointer w-16 opacity-0",
|
@@ -9872,13 +9872,13 @@ function pu(e) {
|
|
9872
9872
|
var t = cd(e, "string");
|
9873
9873
|
return typeof t == "symbol" ? t : t + "";
|
9874
9874
|
}
|
9875
|
-
function
|
9875
|
+
function Ei(e) {
|
9876
9876
|
"@babel/helpers - typeof";
|
9877
|
-
return
|
9877
|
+
return Ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
9878
9878
|
return typeof t;
|
9879
9879
|
} : function(t) {
|
9880
9880
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
9881
|
-
},
|
9881
|
+
}, Ei(e);
|
9882
9882
|
}
|
9883
9883
|
function ld(e, t) {
|
9884
9884
|
if (!(e instanceof t))
|
@@ -9907,20 +9907,20 @@ function bu(e) {
|
|
9907
9907
|
return fd(e) || Ed(e) || md(e) || Td();
|
9908
9908
|
}
|
9909
9909
|
function fd(e) {
|
9910
|
-
if (Array.isArray(e)) return
|
9910
|
+
if (Array.isArray(e)) return mi(e);
|
9911
9911
|
}
|
9912
9912
|
function Ed(e) {
|
9913
9913
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
9914
9914
|
}
|
9915
9915
|
function md(e, t) {
|
9916
9916
|
if (e) {
|
9917
|
-
if (typeof e == "string") return
|
9917
|
+
if (typeof e == "string") return mi(e, t);
|
9918
9918
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
9919
9919
|
if (a === "Object" && e.constructor && (a = e.constructor.name), a === "Map" || a === "Set") return Array.from(e);
|
9920
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
9920
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return mi(e, t);
|
9921
9921
|
}
|
9922
9922
|
}
|
9923
|
-
function
|
9923
|
+
function mi(e, t) {
|
9924
9924
|
(t == null || t > e.length) && (t = e.length);
|
9925
9925
|
for (var a = 0, i = new Array(t); a < t; a++) i[a] = e[a];
|
9926
9926
|
return i;
|
@@ -9929,7 +9929,7 @@ function Td() {
|
|
9929
9929
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
9930
9930
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
9931
9931
|
}
|
9932
|
-
var
|
9932
|
+
var Ya = typeof window < "u" && typeof window.document < "u", qe = Ya ? window : {}, Gi = Ya && qe.document.documentElement ? "ontouchstart" in qe.document.documentElement : !1, Qi = Ya ? "PointerEvent" in qe : !1, ae = "cropper", ji = "all", gu = "crop", _u = "move", Au = "zoom", ut = "e", rt = "w", gt = "s", Qe = "n", wt = "ne", Bt = "nw", Ut = "se", Ft = "sw", Ti = "".concat(ae, "-crop"), ks = "".concat(ae, "-disabled"), Oe = "".concat(ae, "-hidden"), ws = "".concat(ae, "-hide"), pd = "".concat(ae, "-invisible"), Oa = "".concat(ae, "-modal"), pi = "".concat(ae, "-move"), ta = "".concat(ae, "Action"), ha = "".concat(ae, "Preview"), zi = "crop", Nu = "move", Iu = "none", bi = "crop", gi = "cropend", _i = "cropmove", Ai = "cropstart", Bs = "dblclick", bd = Gi ? "touchstart" : "mousedown", gd = Gi ? "touchmove" : "mousemove", _d = Gi ? "touchend touchcancel" : "mouseup", Us = Qi ? "pointerdown" : bd, Fs = Qi ? "pointermove" : gd, Hs = Qi ? "pointerup pointercancel" : _d, Ys = "ready", qs = "resize", Vs = "wheel", Ni = "zoom", Ws = "image/jpeg", Ad = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, Nd = /^data:/, Id = /^data:image\/jpeg;base64,/, Cd = /^img|canvas$/i, Cu = 200, Su = 100, $s = {
|
9933
9933
|
// Define the view mode of the cropper
|
9934
9934
|
viewMode: 0,
|
9935
9935
|
// 0, 1, 2, 3
|
@@ -10007,11 +10007,11 @@ function W(e) {
|
|
10007
10007
|
var Xs = function(t) {
|
10008
10008
|
return t > 0 && t < 1 / 0;
|
10009
10009
|
};
|
10010
|
-
function
|
10010
|
+
function Za(e) {
|
10011
10011
|
return typeof e > "u";
|
10012
10012
|
}
|
10013
10013
|
function Et(e) {
|
10014
|
-
return
|
10014
|
+
return Ei(e) === "object" && e !== null;
|
10015
10015
|
}
|
10016
10016
|
var Od = Object.prototype.hasOwnProperty;
|
10017
10017
|
function _t(e) {
|
@@ -10031,7 +10031,7 @@ var Dd = Array.prototype.slice;
|
|
10031
10031
|
function xu(e) {
|
10032
10032
|
return Array.from ? Array.from(e) : Dd.call(e);
|
10033
10033
|
}
|
10034
|
-
function
|
10034
|
+
function ce(e, t) {
|
10035
10035
|
return e && Se(t) && (Array.isArray(e) || W(e.length) ? xu(e).forEach(function(a, i) {
|
10036
10036
|
t.call(e, a, i, e);
|
10037
10037
|
}) : Et(e) && Object.keys(e).forEach(function(a) {
|
@@ -10054,7 +10054,7 @@ function It(e) {
|
|
10054
10054
|
var vd = /^width|height|left|top|marginLeft|marginTop$/;
|
10055
10055
|
function et(e, t) {
|
10056
10056
|
var a = e.style;
|
10057
|
-
|
10057
|
+
ce(t, function(i, s) {
|
10058
10058
|
vd.test(s) && W(i) && (i = "".concat(i, "px")), a[s] = i;
|
10059
10059
|
});
|
10060
10060
|
}
|
@@ -10064,7 +10064,7 @@ function Rd(e, t) {
|
|
10064
10064
|
function Ee(e, t) {
|
10065
10065
|
if (t) {
|
10066
10066
|
if (W(e.length)) {
|
10067
|
-
|
10067
|
+
ce(e, function(i) {
|
10068
10068
|
Ee(i, t);
|
10069
10069
|
});
|
10070
10070
|
return;
|
@@ -10080,7 +10080,7 @@ function Ee(e, t) {
|
|
10080
10080
|
function Ye(e, t) {
|
10081
10081
|
if (t) {
|
10082
10082
|
if (W(e.length)) {
|
10083
|
-
|
10083
|
+
ce(e, function(a) {
|
10084
10084
|
Ye(a, t);
|
10085
10085
|
});
|
10086
10086
|
return;
|
@@ -10095,7 +10095,7 @@ function Ye(e, t) {
|
|
10095
10095
|
function At(e, t, a) {
|
10096
10096
|
if (t) {
|
10097
10097
|
if (W(e.length)) {
|
10098
|
-
|
10098
|
+
ce(e, function(i) {
|
10099
10099
|
At(i, t, a);
|
10100
10100
|
});
|
10101
10101
|
return;
|
@@ -10107,7 +10107,7 @@ var yd = /([a-z\d])([A-Z])/g;
|
|
10107
10107
|
function Ki(e) {
|
10108
10108
|
return e.replace(yd, "$1-$2").toLowerCase();
|
10109
10109
|
}
|
10110
|
-
function
|
10110
|
+
function Ii(e, t) {
|
10111
10111
|
return Et(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(Ki(t)));
|
10112
10112
|
}
|
10113
10113
|
function aa(e, t, a) {
|
@@ -10131,7 +10131,7 @@ function Md(e, t) {
|
|
10131
10131
|
}
|
10132
10132
|
var Ou = /\s\s*/, Du = function() {
|
10133
10133
|
var e = !1;
|
10134
|
-
if (
|
10134
|
+
if (Ya) {
|
10135
10135
|
var t = !1, a = function() {
|
10136
10136
|
}, i = Object.defineProperty({}, "once", {
|
10137
10137
|
get: function() {
|
@@ -10190,10 +10190,10 @@ function Lu(e) {
|
|
10190
10190
|
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
|
10191
10191
|
};
|
10192
10192
|
}
|
10193
|
-
var
|
10193
|
+
var Ja = qe.location, Pd = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
|
10194
10194
|
function Gs(e) {
|
10195
10195
|
var t = e.match(Pd);
|
10196
|
-
return t !== null && (t[1] !==
|
10196
|
+
return t !== null && (t[1] !== Ja.protocol || t[2] !== Ja.hostname || t[3] !== Ja.port);
|
10197
10197
|
}
|
10198
10198
|
function Qs(e) {
|
10199
10199
|
var t = "timestamp=".concat((/* @__PURE__ */ new Date()).getTime());
|
@@ -10211,8 +10211,8 @@ function Qt(e) {
|
|
10211
10211
|
}
|
10212
10212
|
function kd(e) {
|
10213
10213
|
var t = Tu({}, e), a = 0;
|
10214
|
-
return
|
10215
|
-
delete t[s],
|
10214
|
+
return ce(e, function(i, s) {
|
10215
|
+
delete t[s], ce(t, function(u) {
|
10216
10216
|
var r = Math.abs(i.startX - u.startX), o = Math.abs(i.startY - u.startY), c = Math.abs(i.endX - u.endX), h = Math.abs(i.endY - u.endY), f = Math.sqrt(r * r + o * o), m = Math.sqrt(c * c + h * h), T = (m - f) / f;
|
10217
10217
|
Math.abs(T) > Math.abs(a) && (a = T);
|
10218
10218
|
});
|
@@ -10230,7 +10230,7 @@ function da(e, t) {
|
|
10230
10230
|
}
|
10231
10231
|
function wd(e) {
|
10232
10232
|
var t = 0, a = 0, i = 0;
|
10233
|
-
return
|
10233
|
+
return ce(e, function(s) {
|
10234
10234
|
var u = s.startX, r = s.startY;
|
10235
10235
|
t += u, a += r, i += 1;
|
10236
10236
|
}), t /= i, a /= i, {
|
@@ -10266,10 +10266,10 @@ function Bd(e) {
|
|
10266
10266
|
};
|
10267
10267
|
}
|
10268
10268
|
function Ud(e, t, a, i) {
|
10269
|
-
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, I = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight,
|
10269
|
+
var s = t.aspectRatio, u = t.naturalWidth, r = t.naturalHeight, o = t.rotate, c = o === void 0 ? 0 : o, h = t.scaleX, f = h === void 0 ? 1 : h, m = t.scaleY, T = m === void 0 ? 1 : m, A = a.aspectRatio, I = a.naturalWidth, L = a.naturalHeight, M = i.fillColor, X = M === void 0 ? "transparent" : M, U = i.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = i.imageSmoothingQuality, P = F === void 0 ? "low" : F, g = i.maxWidth, w = g === void 0 ? 1 / 0 : g, Q = i.maxHeight, le = Q === void 0 ? 1 / 0 : Q, ge = i.minWidth, Ie = ge === void 0 ? 0 : ge, ve = i.minHeight, _e = ve === void 0 ? 0 : ve, Ae = document.createElement("canvas"), se = Ae.getContext("2d"), Re = tt({
|
10270
10270
|
aspectRatio: A,
|
10271
10271
|
width: w,
|
10272
|
-
height:
|
10272
|
+
height: le
|
10273
10273
|
}), x = tt({
|
10274
10274
|
aspectRatio: A,
|
10275
10275
|
width: Ie,
|
@@ -10277,7 +10277,7 @@ function Ud(e, t, a, i) {
|
|
10277
10277
|
}, "cover"), y = Math.min(Re.width, Math.max(x.width, I)), O = Math.min(Re.height, Math.max(x.height, L)), D = tt({
|
10278
10278
|
aspectRatio: s,
|
10279
10279
|
width: w,
|
10280
|
-
height:
|
10280
|
+
height: le
|
10281
10281
|
}), H = tt({
|
10282
10282
|
aspectRatio: s,
|
10283
10283
|
width: Ie,
|
@@ -10298,7 +10298,7 @@ function Fd(e, t, a) {
|
|
10298
10298
|
var Hd = /^data:.*,/;
|
10299
10299
|
function Yd(e) {
|
10300
10300
|
var t = e.replace(Hd, ""), a = atob(t), i = new ArrayBuffer(a.length), s = new Uint8Array(i);
|
10301
|
-
return
|
10301
|
+
return ce(s, function(u, r) {
|
10302
10302
|
s[r] = a.charCodeAt(r);
|
10303
10303
|
}), i;
|
10304
10304
|
}
|
@@ -10480,14 +10480,14 @@ var $d = {
|
|
10480
10480
|
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
|
10481
10481
|
},
|
10482
10482
|
output: function() {
|
10483
|
-
this.preview(), Ct(this.element,
|
10483
|
+
this.preview(), Ct(this.element, bi, this.getData());
|
10484
10484
|
}
|
10485
10485
|
}, Xd = {
|
10486
10486
|
initPreview: function() {
|
10487
10487
|
var t = this.element, a = this.crossOrigin, i = this.options.preview, s = a ? this.crossOriginUrl : this.url, u = t.alt || "The image to preview", r = document.createElement("img");
|
10488
10488
|
if (a && (r.crossOrigin = a), r.src = s, r.alt = u, this.viewBox.appendChild(r), this.viewBoxImage = r, !!i) {
|
10489
10489
|
var o = i;
|
10490
|
-
typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o,
|
10490
|
+
typeof i == "string" ? o = t.ownerDocument.querySelectorAll(i) : i.querySelector && (o = [i]), this.previews = o, ce(o, function(c) {
|
10491
10491
|
var h = document.createElement("img");
|
10492
10492
|
aa(c, ha, {
|
10493
10493
|
width: c.offsetWidth,
|
@@ -10498,8 +10498,8 @@ var $d = {
|
|
10498
10498
|
}
|
10499
10499
|
},
|
10500
10500
|
resetPreview: function() {
|
10501
|
-
|
10502
|
-
var a =
|
10501
|
+
ce(this.previews, function(t) {
|
10502
|
+
var a = Ii(t, ha);
|
10503
10503
|
et(t, {
|
10504
10504
|
width: a.width,
|
10505
10505
|
height: a.height
|
@@ -10514,8 +10514,8 @@ var $d = {
|
|
10514
10514
|
}, Qt(ie({
|
10515
10515
|
translateX: -c,
|
10516
10516
|
translateY: -h
|
10517
|
-
}, t)))),
|
10518
|
-
var m =
|
10517
|
+
}, t)))), ce(this.previews, function(f) {
|
10518
|
+
var m = Ii(f, ha), T = m.width, A = m.height, I = T, L = A, M = 1;
|
10519
10519
|
s && (M = T / s, L = u * M), u && L > A && (M = A / u, I = s * M, L = A), et(f, {
|
10520
10520
|
width: I,
|
10521
10521
|
height: L
|
@@ -10531,14 +10531,14 @@ var $d = {
|
|
10531
10531
|
}, Gd = {
|
10532
10532
|
bind: function() {
|
10533
10533
|
var t = this.element, a = this.options, i = this.cropper;
|
10534
|
-
Se(a.cropstart) && ye(t,
|
10534
|
+
Se(a.cropstart) && ye(t, Ai, a.cropstart), Se(a.cropmove) && ye(t, _i, a.cropmove), Se(a.cropend) && ye(t, gi, a.cropend), Se(a.crop) && ye(t, bi, a.crop), Se(a.zoom) && ye(t, Ni, a.zoom), ye(i, Us, this.onCropStart = this.cropStart.bind(this)), a.zoomable && a.zoomOnWheel && ye(i, Vs, this.onWheel = this.wheel.bind(this), {
|
10535
10535
|
passive: !1,
|
10536
10536
|
capture: !0
|
10537
10537
|
}), a.toggleDragModeOnDblclick && ye(i, Bs, this.onDblclick = this.dblclick.bind(this)), ye(t.ownerDocument, Fs, this.onCropMove = this.cropMove.bind(this)), ye(t.ownerDocument, Hs, this.onCropEnd = this.cropEnd.bind(this)), a.responsive && ye(window, qs, this.onResize = this.resize.bind(this));
|
10538
10538
|
},
|
10539
10539
|
unbind: function() {
|
10540
10540
|
var t = this.element, a = this.options, i = this.cropper;
|
10541
|
-
Se(a.cropstart) && ke(t,
|
10541
|
+
Se(a.cropstart) && ke(t, Ai, a.cropstart), Se(a.cropmove) && ke(t, _i, a.cropmove), Se(a.cropend) && ke(t, gi, a.cropend), Se(a.crop) && ke(t, bi, a.crop), Se(a.zoom) && ke(t, Ni, a.zoom), ke(i, Us, this.onCropStart), a.zoomable && a.zoomOnWheel && ke(i, Vs, this.onWheel, {
|
10542
10542
|
passive: !1,
|
10543
10543
|
capture: !0
|
10544
10544
|
}), a.toggleDragModeOnDblclick && ke(i, Bs, this.onDblclick), ke(t.ownerDocument, Fs, this.onCropMove), ke(t.ownerDocument, Hs, this.onCropEnd), a.responsive && ke(window, qs, this.onResize);
|
@@ -10549,16 +10549,16 @@ var $d = {
|
|
10549
10549
|
var t = this.options, a = this.container, i = this.containerData, s = a.offsetWidth / i.width, u = a.offsetHeight / i.height, r = Math.abs(s - 1) > Math.abs(u - 1) ? s : u;
|
10550
10550
|
if (r !== 1) {
|
10551
10551
|
var o, c;
|
10552
|
-
t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(
|
10552
|
+
t.restore && (o = this.getCanvasData(), c = this.getCropBoxData()), this.render(), t.restore && (this.setCanvasData(ce(o, function(h, f) {
|
10553
10553
|
o[f] = h * r;
|
10554
|
-
})), this.setCropBoxData(
|
10554
|
+
})), this.setCropBoxData(ce(c, function(h, f) {
|
10555
10555
|
c[f] = h * r;
|
10556
10556
|
})));
|
10557
10557
|
}
|
10558
10558
|
}
|
10559
10559
|
},
|
10560
10560
|
dblclick: function() {
|
10561
|
-
this.disabled || this.options.dragMode === Iu || this.setDragMode(Rd(this.dragBox,
|
10561
|
+
this.disabled || this.options.dragMode === Iu || this.setDragMode(Rd(this.dragBox, Ti) ? Nu : zi);
|
10562
10562
|
},
|
10563
10563
|
wheel: function(t) {
|
10564
10564
|
var a = this, i = Number(this.options.wheelZoomRatio) || 0.1, s = 1;
|
@@ -10571,9 +10571,9 @@ var $d = {
|
|
10571
10571
|
if (!(this.disabled || (t.type === "mousedown" || t.type === "pointerdown" && t.pointerType === "mouse") && // No primary button (Usually the left button)
|
10572
10572
|
(W(a) && a !== 1 || W(i) && i !== 0 || t.ctrlKey))) {
|
10573
10573
|
var s = this.options, u = this.pointers, r;
|
10574
|
-
t.changedTouches ?
|
10574
|
+
t.changedTouches ? ce(t.changedTouches, function(o) {
|
10575
10575
|
u[o.identifier] = da(o);
|
10576
|
-
}) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r =
|
10576
|
+
}) : u[t.pointerId || 0] = da(t), Object.keys(u).length > 1 && s.zoomable && s.zoomOnTouch ? r = Au : r = Ii(t.target, ta), Ad.test(r) && Ct(this.element, Ai, {
|
10577
10577
|
originalEvent: t,
|
10578
10578
|
action: r
|
10579
10579
|
}) !== !1 && (t.preventDefault(), this.action = r, this.cropping = !1, r === gu && (this.cropping = !0, Ee(this.dragBox, Oa)));
|
@@ -10583,10 +10583,10 @@ var $d = {
|
|
10583
10583
|
var a = this.action;
|
10584
10584
|
if (!(this.disabled || !a)) {
|
10585
10585
|
var i = this.pointers;
|
10586
|
-
t.preventDefault(), Ct(this.element,
|
10586
|
+
t.preventDefault(), Ct(this.element, _i, {
|
10587
10587
|
originalEvent: t,
|
10588
10588
|
action: a
|
10589
|
-
}) !== !1 && (t.changedTouches ?
|
10589
|
+
}) !== !1 && (t.changedTouches ? ce(t.changedTouches, function(s) {
|
10590
10590
|
ie(i[s.identifier] || {}, da(s, !0));
|
10591
10591
|
}) : ie(i[t.pointerId || 0] || {}, da(t, !0)), this.change(t));
|
10592
10592
|
}
|
@@ -10594,9 +10594,9 @@ var $d = {
|
|
10594
10594
|
cropEnd: function(t) {
|
10595
10595
|
if (!this.disabled) {
|
10596
10596
|
var a = this.action, i = this.pointers;
|
10597
|
-
t.changedTouches ?
|
10597
|
+
t.changedTouches ? ce(t.changedTouches, function(s) {
|
10598
10598
|
delete i[s.identifier];
|
10599
|
-
}) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)), Ct(this.element,
|
10599
|
+
}) : delete i[t.pointerId || 0], a && (t.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, At(this.dragBox, Oa, this.cropped && this.options.modal)), Ct(this.element, gi, {
|
10600
10600
|
originalEvent: t,
|
10601
10601
|
action: a
|
10602
10602
|
}));
|
@@ -10609,8 +10609,8 @@ var $d = {
|
|
10609
10609
|
var P = r[Object.keys(r)[0]], g = {
|
10610
10610
|
x: P.endX - P.startX,
|
10611
10611
|
y: P.endY - P.startY
|
10612
|
-
}, w = function(
|
10613
|
-
switch (
|
10612
|
+
}, w = function(le) {
|
10613
|
+
switch (le) {
|
10614
10614
|
case ut:
|
10615
10615
|
A + g.x > X && (g.x = X - A);
|
10616
10616
|
break;
|
@@ -10715,7 +10715,7 @@ var $d = {
|
|
10715
10715
|
F = Lu(this.cropper), h = P.startX - F.left, f = P.startY - F.top, m = u.minWidth, T = u.minHeight, g.x > 0 ? o = g.y > 0 ? Ut : wt : g.x < 0 && (h -= m, o = g.y > 0 ? Ft : Bt), g.y < 0 && (f -= T), this.cropped || (Ye(this.cropBox, Oe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
10716
10716
|
break;
|
10717
10717
|
}
|
10718
|
-
$ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()),
|
10718
|
+
$ && (u.width = m, u.height = T, u.left = h, u.top = f, this.action = o, this.renderCropBox()), ce(r, function(Q) {
|
10719
10719
|
Q.startX = Q.endX, Q.startY = Q.endY;
|
10720
10720
|
});
|
10721
10721
|
}
|
@@ -10745,7 +10745,7 @@ var $d = {
|
|
10745
10745
|
*/
|
10746
10746
|
replace: function(t) {
|
10747
10747
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
10748
|
-
return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t,
|
10748
|
+
return !this.disabled && t && (this.isImg && (this.element.src = t), a ? (this.url = t, this.image.src = t, this.ready && (this.viewBoxImage.src = t, ce(this.previews, function(i) {
|
10749
10749
|
i.getElementsByTagName("img")[0].src = t;
|
10750
10750
|
}))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(t))), this;
|
10751
10751
|
},
|
@@ -10773,7 +10773,7 @@ var $d = {
|
|
10773
10773
|
*/
|
10774
10774
|
move: function(t) {
|
10775
10775
|
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : t, i = this.canvasData, s = i.left, u = i.top;
|
10776
|
-
return this.moveTo(
|
10776
|
+
return this.moveTo(Za(t) ? t : s + Number(t), Za(a) ? a : u + Number(a));
|
10777
10777
|
},
|
10778
10778
|
/**
|
10779
10779
|
* Move the canvas to an absolute point
|
@@ -10806,7 +10806,7 @@ var $d = {
|
|
10806
10806
|
var s = this.options, u = this.canvasData, r = u.width, o = u.height, c = u.naturalWidth, h = u.naturalHeight;
|
10807
10807
|
if (t = Number(t), t >= 0 && this.ready && !this.disabled && s.zoomable) {
|
10808
10808
|
var f = c * t, m = h * t;
|
10809
|
-
if (Ct(this.element,
|
10809
|
+
if (Ct(this.element, Ni, {
|
10810
10810
|
ratio: t,
|
10811
10811
|
oldRatio: r / c,
|
10812
10812
|
originalEvent: i
|
@@ -10882,7 +10882,7 @@ var $d = {
|
|
10882
10882
|
height: u.height
|
10883
10883
|
};
|
10884
10884
|
var o = i.width / i.naturalWidth;
|
10885
|
-
if (
|
10885
|
+
if (ce(r, function(f, m) {
|
10886
10886
|
r[m] = f / o;
|
10887
10887
|
}), t) {
|
10888
10888
|
var c = Math.round(r.y + r.height), h = Math.round(r.x + r.width);
|
@@ -10932,7 +10932,7 @@ var $d = {
|
|
10932
10932
|
*/
|
10933
10933
|
getCanvasData: function() {
|
10934
10934
|
var t = this.canvasData, a = {};
|
10935
|
-
return this.ready &&
|
10935
|
+
return this.ready && ce(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], function(i) {
|
10936
10936
|
a[i] = t[i];
|
10937
10937
|
}), a;
|
10938
10938
|
},
|
@@ -10999,9 +10999,9 @@ var $d = {
|
|
10999
10999
|
M.width = It(I), M.height = It(L), X.fillStyle = t.fillColor || "transparent", X.fillRect(0, 0, I, L);
|
11000
11000
|
var U = t.imageSmoothingEnabled, $ = U === void 0 ? !0 : U, F = t.imageSmoothingQuality;
|
11001
11001
|
X.imageSmoothingEnabled = $, F && (X.imageSmoothingQuality = F);
|
11002
|
-
var P = i.width, g = i.height, w = u, Q = r,
|
11003
|
-
w <= -o || w > P ? (w = 0,
|
11004
|
-
var se = [w, Q,
|
11002
|
+
var P = i.width, g = i.height, w = u, Q = r, le, ge, Ie, ve, _e, Ae;
|
11003
|
+
w <= -o || w > P ? (w = 0, le = 0, Ie = 0, _e = 0) : w <= 0 ? (Ie = -w, w = 0, le = Math.min(P, o + w), _e = le) : w <= P && (Ie = 0, le = Math.min(o, P - w), _e = le), le <= 0 || Q <= -c || Q > g ? (Q = 0, ge = 0, ve = 0, Ae = 0) : Q <= 0 ? (ve = -Q, Q = 0, ge = Math.min(g, c + Q), Ae = ge) : Q <= g && (ve = 0, ge = Math.min(c, g - Q), Ae = ge);
|
11004
|
+
var se = [w, Q, le, ge];
|
11005
11005
|
if (_e > 0 && Ae > 0) {
|
11006
11006
|
var Re = I / o;
|
11007
11007
|
se.push(Ie * Re, ve * Re, _e * Re, Ae * Re);
|
@@ -11017,7 +11017,7 @@ var $d = {
|
|
11017
11017
|
*/
|
11018
11018
|
setAspectRatio: function(t) {
|
11019
11019
|
var a = this.options;
|
11020
|
-
return !this.disabled && !
|
11020
|
+
return !this.disabled && !Za(t) && (a.aspectRatio = Math.max(0, t) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this;
|
11021
11021
|
},
|
11022
11022
|
/**
|
11023
11023
|
* Change the drag mode.
|
@@ -11028,7 +11028,7 @@ var $d = {
|
|
11028
11028
|
var a = this.options, i = this.dragBox, s = this.face;
|
11029
11029
|
if (this.ready && !this.disabled) {
|
11030
11030
|
var u = t === zi, r = a.movable && t === Nu;
|
11031
|
-
t = u || r ? t : Iu, a.dragMode = t, aa(i, ta, t), At(i,
|
11031
|
+
t = u || r ? t : Iu, a.dragMode = t, aa(i, ta, t), At(i, Ti, u), At(i, pi, r), a.cropBoxMovable || (aa(s, ta, t), At(s, Ti, u), At(s, pi, r));
|
11032
11032
|
}
|
11033
11033
|
return this;
|
11034
11034
|
}
|
@@ -11130,7 +11130,7 @@ var $d = {
|
|
11130
11130
|
var a = this.element, i = this.options, s = this.image, u = a.parentNode, r = document.createElement("div");
|
11131
11131
|
r.innerHTML = Sd;
|
11132
11132
|
var o = r.querySelector(".".concat(ae, "-container")), c = o.querySelector(".".concat(ae, "-canvas")), h = o.querySelector(".".concat(ae, "-drag-box")), f = o.querySelector(".".concat(ae, "-crop-box")), m = f.querySelector(".".concat(ae, "-face"));
|
11133
|
-
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = m, c.appendChild(s), Ee(a, Oe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, Ee(f, Oe), i.guides || Ee(f.getElementsByClassName("".concat(ae, "-dashed")), Oe), i.center || Ee(f.getElementsByClassName("".concat(ae, "-center")), Oe), i.background && Ee(o, "".concat(ae, "-bg")), i.highlight || Ee(m, pd), i.cropBoxMovable && (Ee(m,
|
11133
|
+
this.container = u, this.cropper = o, this.canvas = c, this.dragBox = h, this.cropBox = f, this.viewBox = o.querySelector(".".concat(ae, "-view-box")), this.face = m, c.appendChild(s), Ee(a, Oe), u.insertBefore(o, a.nextSibling), Ye(s, ws), this.initPreview(), this.bind(), i.initialAspectRatio = Math.max(0, i.initialAspectRatio) || NaN, i.aspectRatio = Math.max(0, i.aspectRatio) || NaN, i.viewMode = Math.max(0, Math.min(3, Math.round(i.viewMode))) || 0, Ee(f, Oe), i.guides || Ee(f.getElementsByClassName("".concat(ae, "-dashed")), Oe), i.center || Ee(f.getElementsByClassName("".concat(ae, "-center")), Oe), i.background && Ee(o, "".concat(ae, "-bg")), i.highlight || Ee(m, pd), i.cropBoxMovable && (Ee(m, pi), aa(m, ta, ji)), i.cropBoxResizable || (Ee(f.getElementsByClassName("".concat(ae, "-line")), Oe), Ee(f.getElementsByClassName("".concat(ae, "-point")), Oe)), this.render(), this.ready = !0, this.setDragMode(i.dragMode), i.autoCrop && this.crop(), this.setData(i.data), Se(i.ready) && ye(a, Ys, i.ready, {
|
11134
11134
|
once: !0
|
11135
11135
|
}), Ct(a, Ys);
|
11136
11136
|
}
|
@@ -11252,8 +11252,8 @@ const Jd = {
|
|
11252
11252
|
P.name && (s.value.inputValue = P.name);
|
11253
11253
|
const g = new FileReader();
|
11254
11254
|
g.onload = (w) => {
|
11255
|
-
var Q,
|
11256
|
-
console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((
|
11255
|
+
var Q, le;
|
11256
|
+
console.log("e?.target?.result", (Q = w == null ? void 0 : w.target) == null ? void 0 : Q.result), m((le = w == null ? void 0 : w.target) == null ? void 0 : le.result);
|
11257
11257
|
}, g.readAsDataURL(P);
|
11258
11258
|
}
|
11259
11259
|
};
|
@@ -11315,7 +11315,7 @@ const Jd = {
|
|
11315
11315
|
P[1] || (P[1] = S("span", { class: "text-base font-semibold text-[#333]" }, "图片裁剪", -1)),
|
11316
11316
|
S("span", {
|
11317
11317
|
class: "text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",
|
11318
|
-
onClick:
|
11318
|
+
onClick: he(X, ["stop"])
|
11319
11319
|
})
|
11320
11320
|
]),
|
11321
11321
|
S("div", af, [
|
@@ -11328,7 +11328,7 @@ const Jd = {
|
|
11328
11328
|
S("input", {
|
11329
11329
|
type: "file",
|
11330
11330
|
accept: "image/*",
|
11331
|
-
onClick: P[0] || (P[0] =
|
11331
|
+
onClick: P[0] || (P[0] = he(() => {
|
11332
11332
|
}, ["stop"])),
|
11333
11333
|
contenteditable: "false",
|
11334
11334
|
ref: "fileInput",
|
@@ -11379,16 +11379,11 @@ const Jd = {
|
|
11379
11379
|
])) : K("", !0);
|
11380
11380
|
};
|
11381
11381
|
}
|
11382
|
-
}), _f = {
|
11383
|
-
key: 0,
|
11384
|
-
"date-action": "1",
|
11385
|
-
class: "aidition",
|
11386
|
-
contenteditable: "false"
|
11387
|
-
}, Af = { class: "aidition_left" }, Nf = { class: "aidition_right" }, If = {
|
11382
|
+
}), _f = { class: "aidition_left" }, Af = { class: "aidition_right" }, Nf = {
|
11388
11383
|
key: 0,
|
11389
11384
|
"date-action": "1",
|
11390
11385
|
class: "text-red-500 text-xs mt-1"
|
11391
|
-
},
|
11386
|
+
}, If = /* @__PURE__ */ Ge({
|
11392
11387
|
__name: "ElementRenderer",
|
11393
11388
|
props: {
|
11394
11389
|
element: {
|
@@ -11461,7 +11456,7 @@ const Jd = {
|
|
11461
11456
|
function Q() {
|
11462
11457
|
i("blockAction", { action: "delete", element: a.element });
|
11463
11458
|
}
|
11464
|
-
function
|
11459
|
+
function le(O) {
|
11465
11460
|
i("blockAction", O), i("contentUpdated", U());
|
11466
11461
|
}
|
11467
11462
|
function ge() {
|
@@ -11505,9 +11500,9 @@ const Jd = {
|
|
11505
11500
|
return B(), V(Ht, null, [
|
11506
11501
|
(B(), xt(ku(a.element.tag), zs({
|
11507
11502
|
class: [
|
11508
|
-
" ",
|
11503
|
+
"m-2 p-1 border-dashed border",
|
11509
11504
|
u.value ? "border-dashed border-[1px] border-blue-500" : "",
|
11510
|
-
s.value ? "border-dashed border-[1px] border-green-500 z-10" : "",
|
11505
|
+
s.value ? "border-dashed border-[1px] border-green-500 z-10 " : "",
|
11511
11506
|
o.value ? "border-dashed border-[1px] border-red-500" : "",
|
11512
11507
|
// 超出文字限制时显示红色边框
|
11513
11508
|
(!u.value && !s.value && !o.value, ""),
|
@@ -11517,7 +11512,7 @@ const Jd = {
|
|
11517
11512
|
]
|
11518
11513
|
}, a.element.attrs, {
|
11519
11514
|
contenteditable: r.value,
|
11520
|
-
onClick: D[1] || (D[1] =
|
11515
|
+
onClick: D[1] || (D[1] = he(() => T(a.element), ["stop"])),
|
11521
11516
|
onMouseenter: D[2] || (D[2] = () => L(a.element)),
|
11522
11517
|
onMouseleave: M,
|
11523
11518
|
onBlur: X,
|
@@ -11526,20 +11521,25 @@ const Jd = {
|
|
11526
11521
|
default: Ks(() => [
|
11527
11522
|
wu(we(a.element.editText || a.element.text), 1),
|
11528
11523
|
a.element.children && a.element.children.length ? (B(), V(Ht, { key: 0 }, [
|
11529
|
-
a.element.type === Ne(te).Block ? (B(), V("div",
|
11530
|
-
|
11531
|
-
|
11524
|
+
a.element.type === Ne(te).Block ? (B(), V("div", {
|
11525
|
+
key: 0,
|
11526
|
+
"date-action": "1",
|
11527
|
+
class: Da(["aidition", s.value ? "flex" : ""]),
|
11528
|
+
contenteditable: "false"
|
11529
|
+
}, [
|
11530
|
+
S("span", _f, we(a.element.editText || a.element.text), 1),
|
11531
|
+
S("div", Af, [
|
11532
11532
|
S("span", {
|
11533
|
-
onClick:
|
11533
|
+
onClick: he(g, ["stop"])
|
11534
11534
|
}, "排前"),
|
11535
11535
|
S("span", {
|
11536
|
-
onClick:
|
11536
|
+
onClick: he(w, ["stop"])
|
11537
11537
|
}, "排后"),
|
11538
11538
|
S("span", {
|
11539
|
-
onClick:
|
11539
|
+
onClick: he(Q, ["stop"])
|
11540
11540
|
}, "删除")
|
11541
11541
|
])
|
11542
|
-
])) : K("", !0),
|
11542
|
+
], 2)) : K("", !0),
|
11543
11543
|
(B(!0), V(Ht, null, js(a.element.children, (q, J) => (B(), xt(H, {
|
11544
11544
|
icons: e.icons,
|
11545
11545
|
key: J,
|
@@ -11549,44 +11549,36 @@ const Jd = {
|
|
11549
11549
|
onSelectElement: A,
|
11550
11550
|
onHoverElement: I,
|
11551
11551
|
onUpdateText: F,
|
11552
|
-
onBlockAction:
|
11552
|
+
onBlockAction: le,
|
11553
11553
|
onAddIcon: ve,
|
11554
11554
|
onUpload: x
|
11555
11555
|
}, null, 8, ["icons", "element", "selectedElement", "hoveredElement"]))), 128)),
|
11556
11556
|
a.element.type === Ne(te).Block ? (B(), V(Ht, { key: 1 }, [
|
11557
11557
|
S("span", {
|
11558
11558
|
class: "iconfont icon-a-tianjiaxian icon_gray_add",
|
11559
|
-
onClick:
|
11559
|
+
onClick: he(P, ["stop"]),
|
11560
11560
|
contenteditable: "false"
|
11561
11561
|
}),
|
11562
|
-
S("div", {
|
11563
|
-
class: "add_modules",
|
11564
|
-
onClick: ce(P, ["stop"]),
|
11565
|
-
contenteditable: "false"
|
11566
|
-
}, D[7] || (D[7] = [
|
11567
|
-
S("span", { class: "iconfont icon-a-tianjiamian" }, null, -1),
|
11568
|
-
S("span", null, "添加模块", -1)
|
11569
|
-
])),
|
11570
11562
|
S("div", {
|
11571
11563
|
class: "cont_aidition",
|
11572
11564
|
contenteditable: "false",
|
11573
|
-
onClick: D[0] || (D[0] =
|
11565
|
+
onClick: D[0] || (D[0] = he(() => {
|
11574
11566
|
}, ["stop"]))
|
11575
11567
|
}, [
|
11576
11568
|
S("span", {
|
11577
|
-
onClick:
|
11569
|
+
onClick: he(g, ["stop"]),
|
11578
11570
|
class: "iconfont icon-paiqian"
|
11579
11571
|
}),
|
11580
11572
|
S("span", {
|
11581
|
-
onClick:
|
11573
|
+
onClick: he(w, ["stop"]),
|
11582
11574
|
class: "iconfont icon-paihou"
|
11583
11575
|
}),
|
11584
11576
|
S("span", {
|
11585
|
-
onClick:
|
11577
|
+
onClick: he(Q, ["stop"]),
|
11586
11578
|
class: "iconfont icon-shanchu"
|
11587
11579
|
}),
|
11588
11580
|
S("span", {
|
11589
|
-
onClick:
|
11581
|
+
onClick: he(P, ["stop"]),
|
11590
11582
|
class: "iconfont icon-a-tianjiaxian"
|
11591
11583
|
})
|
11592
11584
|
])
|
@@ -11595,14 +11587,14 @@ const Jd = {
|
|
11595
11587
|
]),
|
11596
11588
|
_: 1
|
11597
11589
|
}, 16, ["class", "contenteditable"])),
|
11598
|
-
a.element.type == Ne(te).Text && o.value ? (B(), V("div",
|
11590
|
+
a.element.type == Ne(te).Text && o.value ? (B(), V("div", Nf, we(c.value), 1)) : K("", !0),
|
11599
11591
|
a.element.type === Ne(te).Image ? (B(), V("div", {
|
11600
11592
|
key: 1,
|
11601
11593
|
class: "absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",
|
11602
|
-
onClick: D[3] || (D[3] =
|
11594
|
+
onClick: D[3] || (D[3] = he(() => {
|
11603
11595
|
}, ["stop"]))
|
11604
11596
|
}, [
|
11605
|
-
D[
|
11597
|
+
D[7] || (D[7] = S("span", {
|
11606
11598
|
contenteditable: "false",
|
11607
11599
|
class: "cursor-pointer"
|
11608
11600
|
}, "上传图片", -1)),
|
@@ -11616,11 +11608,11 @@ const Jd = {
|
|
11616
11608
|
a.element.type === Ne(te).Icon ? (B(), V("div", {
|
11617
11609
|
key: 2,
|
11618
11610
|
class: "absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",
|
11619
|
-
onClick: D[5] || (D[5] =
|
11611
|
+
onClick: D[5] || (D[5] = he(() => {
|
11620
11612
|
}, ["stop"]))
|
11621
11613
|
}, [
|
11622
11614
|
S("span", {
|
11623
|
-
onClick: D[4] || (D[4] =
|
11615
|
+
onClick: D[4] || (D[4] = he((q) => ge(), ["stop"])),
|
11624
11616
|
contenteditable: "false",
|
11625
11617
|
class: "cursor-pointer"
|
11626
11618
|
}, "选择图标")
|
@@ -11639,7 +11631,7 @@ const Jd = {
|
|
11639
11631
|
], 64);
|
11640
11632
|
};
|
11641
11633
|
}
|
11642
|
-
}),
|
11634
|
+
}), Cf = /* @__PURE__ */ yt(If, [["__scopeId", "data-v-072a458e"]]), Sf = Ge({
|
11643
11635
|
name: "GpCheckbox",
|
11644
11636
|
props: {
|
11645
11637
|
modelValue: {
|
@@ -11659,22 +11651,22 @@ const Jd = {
|
|
11659
11651
|
}
|
11660
11652
|
};
|
11661
11653
|
}
|
11662
|
-
}),
|
11663
|
-
function
|
11664
|
-
return B(), V("div",
|
11665
|
-
S("label",
|
11654
|
+
}), xf = { class: "form-group" }, Of = { class: "flex items-center space-x-2 cursor-pointer" }, Df = ["checked", "aria-checked"], Lf = { class: "checkbox-label text-sm text-gray-700" };
|
11655
|
+
function vf(e, t, a, i, s, u) {
|
11656
|
+
return B(), V("div", xf, [
|
11657
|
+
S("label", Of, [
|
11666
11658
|
S("input", {
|
11667
11659
|
type: "checkbox",
|
11668
11660
|
checked: e.modelValue,
|
11669
11661
|
onChange: t[0] || (t[0] = (...r) => e.updateValue && e.updateValue(...r)),
|
11670
11662
|
class: "custom-checkbox",
|
11671
11663
|
"aria-checked": e.modelValue
|
11672
|
-
}, null, 40,
|
11673
|
-
S("span",
|
11664
|
+
}, null, 40, Df),
|
11665
|
+
S("span", Lf, we(e.label), 1)
|
11674
11666
|
])
|
11675
11667
|
]);
|
11676
11668
|
}
|
11677
|
-
const fa = /* @__PURE__ */ yt(
|
11669
|
+
const fa = /* @__PURE__ */ yt(Sf, [["render", vf], ["__scopeId", "data-v-68b8f276"]]), Rf = Ge({
|
11678
11670
|
name: "GpMessage",
|
11679
11671
|
props: {
|
11680
11672
|
message: {
|
@@ -11721,38 +11713,38 @@ const fa = /* @__PURE__ */ yt(xf, [["render", Rf], ["__scopeId", "data-v-68b8f27
|
|
11721
11713
|
closeMessage: i
|
11722
11714
|
};
|
11723
11715
|
}
|
11724
|
-
}),
|
11716
|
+
}), yf = {
|
11725
11717
|
key: 0,
|
11726
11718
|
class: "gp-message"
|
11727
|
-
},
|
11719
|
+
}, Mf = {
|
11728
11720
|
key: 0,
|
11729
11721
|
class: "mr-2"
|
11730
|
-
},
|
11722
|
+
}, Pf = {
|
11731
11723
|
key: 0,
|
11732
11724
|
class: "text-green-500"
|
11733
|
-
},
|
11725
|
+
}, kf = {
|
11734
11726
|
key: 1,
|
11735
11727
|
class: "text-red-500"
|
11736
|
-
},
|
11728
|
+
}, wf = {
|
11737
11729
|
key: 2,
|
11738
11730
|
class: "text-blue-500"
|
11739
|
-
},
|
11731
|
+
}, Bf = {
|
11740
11732
|
key: 3,
|
11741
11733
|
class: "text-yellow-500"
|
11742
11734
|
};
|
11743
|
-
function
|
11735
|
+
function Uf(e, t, a, i, s, u) {
|
11744
11736
|
return B(), xt(Bu, { name: "fade" }, {
|
11745
11737
|
default: Ks(() => [
|
11746
|
-
e.visible ? (B(), V("div",
|
11738
|
+
e.visible ? (B(), V("div", yf, [
|
11747
11739
|
S("div", {
|
11748
|
-
class:
|
11740
|
+
class: Da([e.typeClass, "message-content"])
|
11749
11741
|
}, [
|
11750
|
-
e.icon ? (B(), V("span",
|
11742
|
+
e.icon ? (B(), V("span", Mf, [
|
11751
11743
|
Uu(e.$slots, "icon", {}, () => [
|
11752
|
-
e.type === "success" ? (B(), V("span",
|
11753
|
-
e.type === "error" ? (B(), V("span",
|
11754
|
-
e.type === "info" ? (B(), V("span",
|
11755
|
-
e.type === "warning" ? (B(), V("span",
|
11744
|
+
e.type === "success" ? (B(), V("span", Pf, "✔")) : K("", !0),
|
11745
|
+
e.type === "error" ? (B(), V("span", kf, "✖")) : K("", !0),
|
11746
|
+
e.type === "info" ? (B(), V("span", wf, "ℹ")) : K("", !0),
|
11747
|
+
e.type === "warning" ? (B(), V("span", Bf, "⚠")) : K("", !0)
|
11756
11748
|
], !0)
|
11757
11749
|
])) : K("", !0),
|
11758
11750
|
S("span", null, we(e.message), 1),
|
@@ -11766,15 +11758,15 @@ function Ff(e, t, a, i, s, u) {
|
|
11766
11758
|
_: 3
|
11767
11759
|
});
|
11768
11760
|
}
|
11769
|
-
const
|
11770
|
-
let
|
11771
|
-
const
|
11761
|
+
const Ff = /* @__PURE__ */ yt(Rf, [["render", Uf], ["__scopeId", "data-v-56476f4c"]]), St = Fu([]);
|
11762
|
+
let ei = null;
|
11763
|
+
const Hf = () => {
|
11772
11764
|
const e = document.createElement("div");
|
11773
11765
|
return e.id = "global-message-container", document.body.appendChild(e), e;
|
11774
|
-
},
|
11775
|
-
if (
|
11776
|
-
const e =
|
11777
|
-
|
11766
|
+
}, Yf = () => {
|
11767
|
+
if (ei) return;
|
11768
|
+
const e = Hf();
|
11769
|
+
ei = Hu({
|
11778
11770
|
setup() {
|
11779
11771
|
return {
|
11780
11772
|
messageQueue: St
|
@@ -11798,7 +11790,7 @@ const Yf = () => {
|
|
11798
11790
|
class: `fixed flex flex-col gap-2 ${t.value}`
|
11799
11791
|
},
|
11800
11792
|
St.map(
|
11801
|
-
(a) => Ji(
|
11793
|
+
(a) => Ji(Ff, {
|
11802
11794
|
key: a.id,
|
11803
11795
|
...a.options,
|
11804
11796
|
onClose: () => yu(a.id)
|
@@ -11806,15 +11798,15 @@ const Yf = () => {
|
|
11806
11798
|
)
|
11807
11799
|
);
|
11808
11800
|
}
|
11809
|
-
}),
|
11801
|
+
}), ei.mount(e);
|
11810
11802
|
}, yu = (e) => {
|
11811
11803
|
const t = St.findIndex((a) => a.id === e);
|
11812
11804
|
t !== -1 && St.splice(t, 1);
|
11813
11805
|
};
|
11814
|
-
let
|
11806
|
+
let qf = 0;
|
11815
11807
|
const ue = (e) => {
|
11816
|
-
|
11817
|
-
const t =
|
11808
|
+
Yf();
|
11809
|
+
const t = qf++;
|
11818
11810
|
St.push({
|
11819
11811
|
id: t,
|
11820
11812
|
options: e
|
@@ -11854,7 +11846,7 @@ ue.warning = (e, t = 3e3, a = !0) => {
|
|
11854
11846
|
icon: a
|
11855
11847
|
} : { ...e, type: "warning" });
|
11856
11848
|
};
|
11857
|
-
const
|
11849
|
+
const Vf = { key: 0 }, Wf = { key: 0 }, $f = { class: "text-gray-500 my-2" }, Xf = { class: "text-gray-500 my-2" }, Gf = { key: 1 }, Qf = { key: 2 }, jf = { key: 3 }, zf = { key: 4 }, Kf = { key: 5 }, Zf = { key: 6 }, Jf = { key: 7 }, e1 = { key: 8 }, t1 = /* @__PURE__ */ Ge({
|
11858
11850
|
__name: "EditorPanel",
|
11859
11851
|
props: {
|
11860
11852
|
element: Object
|
@@ -11909,14 +11901,14 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11909
11901
|
i("updateElement", s.value), ue.success("保存成功");
|
11910
11902
|
}
|
11911
11903
|
return (r, o) => (B(), V("div", null, [
|
11912
|
-
s.value ? (B(), V("div",
|
11913
|
-
s.value.text !== void 0 ? (B(), V("div",
|
11904
|
+
s.value ? (B(), V("div", Vf, [
|
11905
|
+
s.value.text !== void 0 ? (B(), V("div", Wf, [
|
11914
11906
|
o[11] || (o[11] = S("label", { class: "block mt-4" }, "内容", -1)),
|
11915
|
-
S("div",
|
11907
|
+
S("div", $f, we(s.value.text || "-"), 1)
|
11916
11908
|
])) : K("", !0),
|
11917
11909
|
S("div", null, [
|
11918
11910
|
o[12] || (o[12] = S("label", { class: "block mt-4" }, "节点", -1)),
|
11919
|
-
S("div",
|
11911
|
+
S("div", Xf, we(s.value.xpath), 1)
|
11920
11912
|
]),
|
11921
11913
|
S("div", null, [
|
11922
11914
|
o[14] || (o[14] = S("label", { class: "block mt-4" }, "类型", -1)),
|
@@ -11935,7 +11927,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11935
11927
|
[Yu, s.value.type]
|
11936
11928
|
])
|
11937
11929
|
]),
|
11938
|
-
s.value.type == Ne(te).Text ? (B(), V("div",
|
11930
|
+
s.value.type == Ne(te).Text ? (B(), V("div", Gf, [
|
11939
11931
|
o[15] || (o[15] = S("label", { class: "block mt-4" }, "最小文本长度", -1)),
|
11940
11932
|
st(S("input", {
|
11941
11933
|
"onUpdate:modelValue": o[1] || (o[1] = (c) => s.value.rule.minText = c),
|
@@ -11944,7 +11936,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11944
11936
|
[pt, s.value.rule.minText]
|
11945
11937
|
])
|
11946
11938
|
])) : K("", !0),
|
11947
|
-
s.value.type == Ne(te).Text ? (B(), V("div",
|
11939
|
+
s.value.type == Ne(te).Text ? (B(), V("div", Qf, [
|
11948
11940
|
o[16] || (o[16] = S("label", { class: "block mt-4" }, "最大文本长度", -1)),
|
11949
11941
|
st(S("input", {
|
11950
11942
|
"onUpdate:modelValue": o[2] || (o[2] = (c) => s.value.rule.maxText = c),
|
@@ -11953,7 +11945,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11953
11945
|
[pt, s.value.rule.maxText]
|
11954
11946
|
])
|
11955
11947
|
])) : K("", !0),
|
11956
|
-
s.value.type == Ne(te).Image ? (B(), V("div",
|
11948
|
+
s.value.type == Ne(te).Image ? (B(), V("div", jf, [
|
11957
11949
|
o[17] || (o[17] = S("label", { class: "block mt-4" }, "是否裁剪", -1)),
|
11958
11950
|
lt(fa, {
|
11959
11951
|
class: "py-2",
|
@@ -11962,7 +11954,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11962
11954
|
label: "是"
|
11963
11955
|
}, null, 8, ["modelValue"])
|
11964
11956
|
])) : K("", !0),
|
11965
|
-
s.value.type == Ne(te).Image ? (B(), V("div",
|
11957
|
+
s.value.type == Ne(te).Image ? (B(), V("div", zf, [
|
11966
11958
|
o[18] || (o[18] = S("label", { class: "block mt-4" }, "图片宽度", -1)),
|
11967
11959
|
st(S("input", {
|
11968
11960
|
"onUpdate:modelValue": o[4] || (o[4] = (c) => s.value.rule.minImageWidth = c),
|
@@ -11971,7 +11963,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11971
11963
|
[pt, s.value.rule.minImageWidth]
|
11972
11964
|
])
|
11973
11965
|
])) : K("", !0),
|
11974
|
-
s.value.type == Ne(te).Image ? (B(), V("div",
|
11966
|
+
s.value.type == Ne(te).Image ? (B(), V("div", Kf, [
|
11975
11967
|
o[19] || (o[19] = S("label", { class: "block mt-4" }, "图片高度", -1)),
|
11976
11968
|
st(S("input", {
|
11977
11969
|
"onUpdate:modelValue": o[5] || (o[5] = (c) => s.value.rule.maxImageHeight = c),
|
@@ -11980,7 +11972,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11980
11972
|
[pt, s.value.rule.maxImageHeight]
|
11981
11973
|
])
|
11982
11974
|
])) : K("", !0),
|
11983
|
-
s.value.type == Ne(te).Block ? (B(), V("div",
|
11975
|
+
s.value.type == Ne(te).Block ? (B(), V("div", Zf, [
|
11984
11976
|
o[20] || (o[20] = S("label", { class: "block mt-4" }, "块最小数量", -1)),
|
11985
11977
|
st(S("input", {
|
11986
11978
|
"onUpdate:modelValue": o[6] || (o[6] = (c) => s.value.rule.minBlock = c),
|
@@ -11989,7 +11981,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11989
11981
|
[pt, s.value.rule.minBlock]
|
11990
11982
|
])
|
11991
11983
|
])) : K("", !0),
|
11992
|
-
s.value.type == Ne(te).Block ? (B(), V("div",
|
11984
|
+
s.value.type == Ne(te).Block ? (B(), V("div", Jf, [
|
11993
11985
|
o[21] || (o[21] = S("label", { class: "block mt-4" }, "块最大数量", -1)),
|
11994
11986
|
st(S("input", {
|
11995
11987
|
"onUpdate:modelValue": o[7] || (o[7] = (c) => s.value.rule.maxBlock = c),
|
@@ -11998,7 +11990,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
11998
11990
|
[pt, s.value.rule.maxBlock]
|
11999
11991
|
])
|
12000
11992
|
])) : K("", !0),
|
12001
|
-
s.value.type == Ne(te).Text || s.value.type == Ne(te).Icon ? (B(), V("div",
|
11993
|
+
s.value.type == Ne(te).Text || s.value.type == Ne(te).Icon ? (B(), V("div", e1, [
|
12002
11994
|
o[22] || (o[22] = S("label", { class: "block mt-4" }, "主题色", -1)),
|
12003
11995
|
lt(fa, {
|
12004
11996
|
class: "py-2",
|
@@ -12032,13 +12024,13 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12032
12024
|
}, " 保存 ")
|
12033
12025
|
]));
|
12034
12026
|
}
|
12035
|
-
}),
|
12027
|
+
}), a1 = /* @__PURE__ */ yt(t1, [["__scopeId", "data-v-34a23ef6"]]), i1 = { class: "flex h-screen" }, s1 = { class: "goodschool_mobile" }, n1 = ["innerHTML"], u1 = ["innerHTML"], r1 = { class: "flex-1 bg-gray-100 overflow-auto" }, o1 = { class: "p-4" }, c1 = {
|
12036
12028
|
key: 0,
|
12037
12029
|
class: "text-red-500 text-xs mt-2"
|
12038
|
-
},
|
12030
|
+
}, l1 = {
|
12039
12031
|
key: 0,
|
12040
12032
|
class: "resize-area border-l overflow-auto w-[375px]"
|
12041
|
-
},
|
12033
|
+
}, h1 = { class: "p-4" }, d1 = /* @__PURE__ */ Ge({
|
12042
12034
|
__name: "Designer",
|
12043
12035
|
props: {
|
12044
12036
|
mode: { default: "design" },
|
@@ -12101,10 +12093,10 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12101
12093
|
const q = I(r.value, h.value.parentxpath || "");
|
12102
12094
|
q && q.children && q.children.forEach((J) => {
|
12103
12095
|
var ne;
|
12104
|
-
J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (ne = J.attrs.class) != null && ne.includes(" mb40") || (J.attrs.class += " mb40"));
|
12096
|
+
J.tag === h.value.tag && (J.rule = x.rule, J.type = x.type, (ne = J.attrs.class) != null && ne.includes(" mb40 relative") || (J.attrs.class += " mb40 relative"));
|
12105
12097
|
});
|
12106
12098
|
} else
|
12107
|
-
(H = h.value.attrs.class) != null && H.includes(" mb40") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40", " "));
|
12099
|
+
(H = h.value.attrs.class) != null && H.includes(" mb40 relative") && (h.value.attrs.class = h.value.attrs.class.replace(" mb40 relative", " "));
|
12108
12100
|
}
|
12109
12101
|
function M(x) {
|
12110
12102
|
o.value = x;
|
@@ -12204,7 +12196,7 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12204
12196
|
function w(x, y) {
|
12205
12197
|
y.attrs.src = x;
|
12206
12198
|
}
|
12207
|
-
const Q = z(a.previewWidth),
|
12199
|
+
const Q = z(a.previewWidth), le = z(375);
|
12208
12200
|
let ge = z(!1), Ie = z(""), ve = 0, _e = 0;
|
12209
12201
|
function Ae(x) {
|
12210
12202
|
Ie.value = x, ge.value = !0, ve = event.clientX, _e = Q.value, window.addEventListener("mousemove", se), window.addEventListener("mouseup", Re);
|
@@ -12212,38 +12204,38 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12212
12204
|
function se(x) {
|
12213
12205
|
if (!ge.value) return;
|
12214
12206
|
const y = x.clientX - ve;
|
12215
|
-
Ie.value === "preview" ? Q.value = Math.max(200, _e + y) : Ie.value === "structure" && (
|
12207
|
+
Ie.value === "preview" ? Q.value = Math.max(200, _e + y) : Ie.value === "structure" && (le.value = Math.max(200, _e - y));
|
12216
12208
|
}
|
12217
12209
|
function Re() {
|
12218
12210
|
ge.value = !1, Ie.value = "", window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", Re);
|
12219
12211
|
}
|
12220
|
-
return (x, y) => (B(), V("div",
|
12212
|
+
return (x, y) => (B(), V("div", i1, [
|
12221
12213
|
S("div", {
|
12222
12214
|
class: "border-l overflow-auto resize-area",
|
12223
12215
|
style: qu({ width: Q.value + "px" })
|
12224
12216
|
}, [
|
12225
|
-
S("div",
|
12217
|
+
S("div", s1, [
|
12226
12218
|
y[1] || (y[1] = S("h2", { class: "text-lg font-bold" }, "实时预览", -1)),
|
12227
12219
|
o.value ? (B(), V("div", {
|
12228
12220
|
key: 0,
|
12229
12221
|
innerHTML: o.value
|
12230
|
-
}, null, 8,
|
12222
|
+
}, null, 8, n1)) : (B(), V("div", {
|
12231
12223
|
key: 1,
|
12232
12224
|
innerHTML: Ne(c)("body").html()
|
12233
|
-
}, null, 8,
|
12225
|
+
}, null, 8, u1))
|
12234
12226
|
])
|
12235
12227
|
], 4),
|
12236
12228
|
S("div", {
|
12237
12229
|
class: "resizer",
|
12238
12230
|
onMousedown: y[0] || (y[0] = (O) => Ae("preview"))
|
12239
12231
|
}, null, 32),
|
12240
|
-
S("div",
|
12241
|
-
S("div",
|
12232
|
+
S("div", r1, [
|
12233
|
+
S("div", o1, [
|
12242
12234
|
y[2] || (y[2] = S("div", { class: "flex justify-between" }, [
|
12243
12235
|
S("h2", { class: "text-lg font-bold" }, "结构渲染")
|
12244
12236
|
], -1)),
|
12245
|
-
m.value ? (B(), V("div",
|
12246
|
-
r.value ? (B(), xt(
|
12237
|
+
m.value ? (B(), V("div", c1, we(m.value), 1)) : K("", !0),
|
12238
|
+
r.value ? (B(), xt(Cf, {
|
12247
12239
|
key: 1,
|
12248
12240
|
icons: x.icons,
|
12249
12241
|
element: r.value,
|
@@ -12259,10 +12251,10 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12259
12251
|
}, null, 8, ["icons", "element", "selectedElement", "hoveredElement"])) : K("", !0)
|
12260
12252
|
])
|
12261
12253
|
]),
|
12262
|
-
u.value == "design" ? (B(), V("div",
|
12263
|
-
S("div",
|
12254
|
+
u.value == "design" ? (B(), V("div", l1, [
|
12255
|
+
S("div", h1, [
|
12264
12256
|
y[3] || (y[3] = S("h2", { class: "text-lg font-bold" }, "节点属性", -1)),
|
12265
|
-
h.value ? (B(), xt(
|
12257
|
+
h.value ? (B(), xt(a1, {
|
12266
12258
|
key: 0,
|
12267
12259
|
element: h.value,
|
12268
12260
|
onUpdateElement: L
|
@@ -12271,12 +12263,12 @@ const Wf = { key: 0 }, $f = { key: 0 }, Xf = { class: "text-gray-500 my-2" }, Gf
|
|
12271
12263
|
])) : K("", !0)
|
12272
12264
|
]));
|
12273
12265
|
}
|
12274
|
-
}),
|
12266
|
+
}), f1 = /* @__PURE__ */ yt(d1, [["__scopeId", "data-v-b3574918"]]), g1 = {
|
12275
12267
|
install(e) {
|
12276
|
-
e.component("Designer",
|
12268
|
+
e.component("Designer", f1);
|
12277
12269
|
}
|
12278
12270
|
};
|
12279
12271
|
export {
|
12280
|
-
|
12281
|
-
|
12272
|
+
f1 as Designer,
|
12273
|
+
g1 as default
|
12282
12274
|
};
|