@linker-design-plus/tiny-peony 1.4.10 → 1.4.12
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/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +168 -170
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -466,7 +466,9 @@ class Ge extends ne {
|
|
|
466
466
|
h && t.removeChild(t.firstChild);
|
|
467
467
|
}), this.content.getParas().forEach((t) => {
|
|
468
468
|
const a = t.firstChild, r = t.lastChild;
|
|
469
|
-
t.childNodes.length > 1 && ($(r) && r.tagName === "BR" && r.remove(), $(a) && a.tagName === "BR" && a.remove()
|
|
469
|
+
t.childNodes.length > 1 && ($(r) && r.tagName === "BR" && r.remove(), $(a) && a.tagName === "BR" && a.remove(), Array.from(t.childNodes).forEach((i) => {
|
|
470
|
+
$(i) && i.tagName === "BR" && i.remove();
|
|
471
|
+
})), (t.childNodes.length === 0 || t.childNodes.length === 1 && MA(t.childNodes[0]) && t.childNodes[0].textContent === "") && t.remove();
|
|
470
472
|
});
|
|
471
473
|
}), this._observer.observe(this._editorElement, {
|
|
472
474
|
childList: !0,
|
|
@@ -1292,9 +1294,9 @@ class Bt extends JI {
|
|
|
1292
1294
|
}, r = (K) => K.some((j) => $(j) && j.classList.contains(Zg())), i = () => {
|
|
1293
1295
|
let K, j;
|
|
1294
1296
|
const tA = S.length === 1;
|
|
1295
|
-
S.forEach((
|
|
1297
|
+
S.forEach((CA, nA) => {
|
|
1296
1298
|
if (nA === 0) {
|
|
1297
|
-
const
|
|
1299
|
+
const cA = () => {
|
|
1298
1300
|
var v, V, X;
|
|
1299
1301
|
const eA = (v = getSelection()) == null ? void 0 : v.getRangeAt(0), RA = eA == null ? void 0 : eA.startContainer, L = eA == null ? void 0 : eA.endContainer;
|
|
1300
1302
|
if (q(eA) || q(L) || q(RA))
|
|
@@ -1319,41 +1321,41 @@ class Bt extends JI {
|
|
|
1319
1321
|
return $(L) && L.classList.contains(UA) ? L.childNodes[eA.endOffset] : L;
|
|
1320
1322
|
};
|
|
1321
1323
|
[p, m, O, _] = d(
|
|
1322
|
-
|
|
1324
|
+
CA,
|
|
1323
1325
|
h,
|
|
1324
1326
|
y,
|
|
1325
|
-
tA ? D :
|
|
1326
|
-
tA ? F :
|
|
1327
|
-
tA ?
|
|
1327
|
+
tA ? D : CA[0],
|
|
1328
|
+
tA ? F : CA[0].childNodes.length,
|
|
1329
|
+
tA ? cA : null,
|
|
1328
1330
|
tA ? ["start", "end"] : ["start"]
|
|
1329
1331
|
);
|
|
1330
1332
|
return;
|
|
1331
1333
|
}
|
|
1332
1334
|
if (nA === S.length - 1) {
|
|
1333
1335
|
[K, j, O, _] = d(
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
+
CA,
|
|
1337
|
+
CA[0],
|
|
1336
1338
|
0,
|
|
1337
1339
|
D,
|
|
1338
1340
|
F,
|
|
1339
|
-
() =>
|
|
1341
|
+
() => CA[0].firstChild,
|
|
1340
1342
|
"end"
|
|
1341
1343
|
);
|
|
1342
1344
|
return;
|
|
1343
1345
|
}
|
|
1344
1346
|
d(
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
+
CA,
|
|
1348
|
+
CA[0],
|
|
1347
1349
|
0,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
+
CA[0],
|
|
1351
|
+
CA[0].childNodes.length,
|
|
1350
1352
|
null
|
|
1351
1353
|
);
|
|
1352
1354
|
});
|
|
1353
|
-
}, d = (K, j, tA,
|
|
1354
|
-
var
|
|
1355
|
+
}, d = (K, j, tA, CA, nA, cA, eA) => {
|
|
1356
|
+
var BA, QA, AA, GA;
|
|
1355
1357
|
const RA = Array.isArray(eA) ? eA : [eA], [L] = K, v = document.createRange();
|
|
1356
|
-
v.setStart(j, tA), v.setEnd(
|
|
1358
|
+
v.setStart(j, tA), v.setEnd(CA, nA), (BA = getSelection()) == null || BA.removeAllRanges(), (QA = getSelection()) == null || QA.addRange(v);
|
|
1357
1359
|
const V = v.startContainer === v.endContainer && ((GA = (AA = v.startContainer.parentElement) == null ? void 0 : AA.dataset) == null ? void 0 : GA.type) === x.highlight ? v.startContainer.parentElement.cloneNode(!1) : null, X = v.cloneContents(), J = document.createDocumentFragment();
|
|
1358
1360
|
Array.from(X.childNodes).forEach((wA) => {
|
|
1359
1361
|
if (!$(wA) || !wA.classList.contains(Zg())) {
|
|
@@ -1363,25 +1365,25 @@ class Bt extends JI {
|
|
|
1363
1365
|
J.append(...Array.from(wA.childNodes));
|
|
1364
1366
|
});
|
|
1365
1367
|
let H = document.createTextNode(""), dA = 0, DA = document.createTextNode(""), z = 0;
|
|
1366
|
-
return RA.includes("start") && (H = J.firstChild, dA = 0), RA.includes("end") && (DA = J.lastChild, z = MA(DA) ? DA.data.length : $(J.lastChild) && J.lastChild.dataset.type === x.highlight ? J.lastChild.childNodes.length : J.childNodes.length), v.deleteContents(), L.insertBefore(J, typeof
|
|
1368
|
+
return RA.includes("start") && (H = J.firstChild, dA = 0), RA.includes("end") && (DA = J.lastChild, z = MA(DA) ? DA.data.length : $(J.lastChild) && J.lastChild.dataset.type === x.highlight ? J.lastChild.childNodes.length : J.childNodes.length), v.deleteContents(), L.insertBefore(J, typeof cA == "function" ? cA() : cA), [H, dA, DA, z];
|
|
1367
1369
|
}, c = async (K) => {
|
|
1368
|
-
var tA,
|
|
1370
|
+
var tA, CA;
|
|
1369
1371
|
const j = document.createRange();
|
|
1370
|
-
p === O && $(p) && p.dataset.type === x.highlight ? j.selectNode(p) : (j.setStart(p, m), j.setEnd(O, _)), (tA = getSelection()) == null || tA.removeAllRanges(), (
|
|
1372
|
+
p === O && $(p) && p.dataset.type === x.highlight ? j.selectNode(p) : (j.setStart(p, m), j.setEnd(O, _)), (tA = getSelection()) == null || tA.removeAllRanges(), (CA = getSelection()) == null || CA.addRange(j), this.editor.cursor.range = j, this._insertAnchorTag(B.anchor, K);
|
|
1371
1373
|
}, { startContainer: h, startOffset: y, endContainer: D, endOffset: F } = o, f = a(D), N = jA(h), M = jA(D), k = N === M ? [N] : [N, ...DC(N, M), M], S = k.map((K, j) => {
|
|
1372
|
-
let tA = [],
|
|
1374
|
+
let tA = [], CA = 0, nA = K.childNodes.length;
|
|
1373
1375
|
switch (j) {
|
|
1374
1376
|
case 0: {
|
|
1375
|
-
|
|
1377
|
+
CA = t(a(h)), nA = // 同一段落
|
|
1376
1378
|
k.length - 1 === j && // 非P段落
|
|
1377
|
-
!($(D) && D.classList.contains(UA)) ? t(a(D)) + 1 : K.childNodes.length, tA = Array.from(K.childNodes).slice(
|
|
1379
|
+
!($(D) && D.classList.contains(UA)) ? t(a(D)) + 1 : K.childNodes.length, tA = Array.from(K.childNodes).slice(CA, nA);
|
|
1378
1380
|
break;
|
|
1379
1381
|
}
|
|
1380
1382
|
case k.length - 1:
|
|
1381
|
-
|
|
1383
|
+
CA = 0, nA = $(D) && D.classList.contains(UA) ? K.childNodes.length : t(a(D)) + 1, tA = Array.from(K.childNodes).slice(0, nA);
|
|
1382
1384
|
break;
|
|
1383
1385
|
default:
|
|
1384
|
-
|
|
1386
|
+
CA = 0, nA = K.childNodes.length, tA = Array.from(K.childNodes).slice(CA, nA);
|
|
1385
1387
|
break;
|
|
1386
1388
|
}
|
|
1387
1389
|
return [K, r(tA)];
|
|
@@ -1432,12 +1434,12 @@ class Bt extends JI {
|
|
|
1432
1434
|
}
|
|
1433
1435
|
const tA = window.getSelection();
|
|
1434
1436
|
tA.removeAllRanges(), tA.addRange(j);
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1437
|
-
const nA = F(
|
|
1437
|
+
const CA = document.createElement("div");
|
|
1438
|
+
CA.appendChild(j.cloneContents());
|
|
1439
|
+
const nA = F(CA.innerHTML);
|
|
1438
1440
|
this.editor.content.update(nA);
|
|
1439
|
-
const
|
|
1440
|
-
return nA.dataset.top = String(
|
|
1441
|
+
const cA = this._calcTopValue(nA.getBoundingClientRect());
|
|
1442
|
+
return nA.dataset.top = String(cA), B.uid = nA.dataset.uid, K && this._recordAnchor(B, t, cA, r), nA;
|
|
1441
1443
|
}, N = (p, m) => $(p) && p.tagName === "P" && p === m && // @ts-ignore
|
|
1442
1444
|
Array.from(p.childNodes).slice(i.startOffset, i.endOffset)[0].dataset.type === x.highlight, M = D(d), k = D(h), S = DC(M, k);
|
|
1443
1445
|
if (M === k) {
|
|
@@ -1511,7 +1513,6 @@ class Bt extends JI {
|
|
|
1511
1513
|
* * 7. 自动触发 vue 响应式渲染,更新右侧主播标签的决定定位 top 值
|
|
1512
1514
|
*/
|
|
1513
1515
|
async _syncAnchorTopValue() {
|
|
1514
|
-
console.log("---高度同步开始--- ");
|
|
1515
1516
|
const B = Array.from(
|
|
1516
1517
|
this.editor.element.querySelectorAll(`span[data-type="${Lg}"]`)
|
|
1517
1518
|
), o = B.reduce((r, i) => {
|
|
@@ -1526,7 +1527,7 @@ class Bt extends JI {
|
|
|
1526
1527
|
const d = i.data.uid ?? i.id, c = o.get(String(d)), h = r[c] ?? (r[c] = []);
|
|
1527
1528
|
return i.data.top = c, h.push(i), r;
|
|
1528
1529
|
}, {});
|
|
1529
|
-
Object.keys(a).forEach((r) => this.data[r] = a[r])
|
|
1530
|
+
Object.keys(a).forEach((r) => this.data[r] = a[r]);
|
|
1530
1531
|
}
|
|
1531
1532
|
setup() {
|
|
1532
1533
|
this.observer = new MutationObserver(() => this._syncAnchorTopValue()), this.observer.observe(this.editor.element, {
|
|
@@ -2350,7 +2351,7 @@ var Eo = Object.create, TB = Object.defineProperty, eo = Object.getOwnPropertyDe
|
|
|
2350
2351
|
Object.assign(i, f), f = null, i.arguments && i.arguments, i.thisProgram && (N = i.thisProgram), i.quit && (M = i.quit);
|
|
2351
2352
|
var tA;
|
|
2352
2353
|
i.wasmBinary && (tA = i.wasmBinary);
|
|
2353
|
-
function
|
|
2354
|
+
function CA(A) {
|
|
2354
2355
|
if (typeof F < "u" && F) {
|
|
2355
2356
|
var g = Buffer.from(A, "base64");
|
|
2356
2357
|
return new Uint8Array(g.buffer, g.byteOffset, g.length);
|
|
@@ -2359,30 +2360,30 @@ var Eo = Object.create, TB = Object.defineProperty, eo = Object.getOwnPropertyDe
|
|
|
2359
2360
|
return Q;
|
|
2360
2361
|
}
|
|
2361
2362
|
function nA(A) {
|
|
2362
|
-
if (QI(A)) return
|
|
2363
|
+
if (QI(A)) return CA(A.slice(dg.length));
|
|
2363
2364
|
}
|
|
2364
|
-
var
|
|
2365
|
+
var cA, eA = !1, RA, L, v, V, X, J, H, dA, DA;
|
|
2365
2366
|
function z() {
|
|
2366
|
-
var A =
|
|
2367
|
+
var A = cA.buffer;
|
|
2367
2368
|
i.HEAP8 = L = new Int8Array(A), i.HEAP16 = V = new Int16Array(A), i.HEAPU8 = v = new Uint8Array(A), i.HEAPU16 = X = new Uint16Array(A), i.HEAP32 = J = new Int32Array(A), i.HEAPU32 = H = new Uint32Array(A), i.HEAPF32 = dA = new Float32Array(A), i.HEAPF64 = DA = new Float64Array(A);
|
|
2368
2369
|
}
|
|
2369
|
-
var
|
|
2370
|
+
var BA = [], QA = [], AA = [];
|
|
2370
2371
|
function GA() {
|
|
2371
2372
|
if (i.preRun) for (typeof i.preRun == "function" && (i.preRun = [i.preRun]); i.preRun.length; ) Rg(i.preRun.shift());
|
|
2372
|
-
KI(
|
|
2373
|
+
KI(BA);
|
|
2373
2374
|
}
|
|
2374
2375
|
function wA() {
|
|
2375
|
-
!i.noFSInit && !e.init.initialized && e.init(), e.ignorePermissions = !1, KI(
|
|
2376
|
+
!i.noFSInit && !e.init.initialized && e.init(), e.ignorePermissions = !1, KI(QA);
|
|
2376
2377
|
}
|
|
2377
2378
|
function OA() {
|
|
2378
2379
|
if (i.postRun) for (typeof i.postRun == "function" && (i.postRun = [i.postRun]); i.postRun.length; ) WA(i.postRun.shift());
|
|
2379
2380
|
KI(AA);
|
|
2380
2381
|
}
|
|
2381
2382
|
function Rg(A) {
|
|
2382
|
-
|
|
2383
|
+
BA.unshift(A);
|
|
2383
2384
|
}
|
|
2384
2385
|
function Qg(A) {
|
|
2385
|
-
|
|
2386
|
+
QA.unshift(A);
|
|
2386
2387
|
}
|
|
2387
2388
|
function WA(A) {
|
|
2388
2389
|
AA.unshift(A);
|
|
@@ -2435,7 +2436,7 @@ var Eo = Object.create, TB = Object.defineProperty, eo = Object.getOwnPropertyDe
|
|
|
2435
2436
|
function $B() {
|
|
2436
2437
|
var A = _B();
|
|
2437
2438
|
function g(Q, n) {
|
|
2438
|
-
return vA = Q.exports,
|
|
2439
|
+
return vA = Q.exports, cA = vA.F, z(), YC = vA.I, Qg(vA.G), gg(), vA;
|
|
2439
2440
|
}
|
|
2440
2441
|
ZA();
|
|
2441
2442
|
function C(Q) {
|
|
@@ -3176,7 +3177,7 @@ return ret;
|
|
|
3176
3177
|
H[A >> 2] = C.length;
|
|
3177
3178
|
var Q = 0;
|
|
3178
3179
|
return C.forEach((n) => Q += n.length + 1), H[g >> 2] = Q, 0;
|
|
3179
|
-
},
|
|
3180
|
+
}, lA = { isAbs: (A) => A.charAt(0) === "/", splitPath: (A) => {
|
|
3180
3181
|
var g = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
|
3181
3182
|
return g.exec(A).slice(1);
|
|
3182
3183
|
}, normalizeArray: (A, g) => {
|
|
@@ -3187,17 +3188,17 @@ return ret;
|
|
|
3187
3188
|
if (g) for (; C; C--) A.unshift("..");
|
|
3188
3189
|
return A;
|
|
3189
3190
|
}, normalize: (A) => {
|
|
3190
|
-
var g =
|
|
3191
|
-
return A =
|
|
3191
|
+
var g = lA.isAbs(A), C = A.substr(-1) === "/";
|
|
3192
|
+
return A = lA.normalizeArray(A.split("/").filter((Q) => !!Q), !g).join("/"), !A && !g && (A = "."), A && C && (A += "/"), (g ? "/" : "") + A;
|
|
3192
3193
|
}, dirname: (A) => {
|
|
3193
|
-
var g =
|
|
3194
|
+
var g = lA.splitPath(A), C = g[0], Q = g[1];
|
|
3194
3195
|
return !C && !Q ? "." : (Q && (Q = Q.substr(0, Q.length - 1)), C + Q);
|
|
3195
3196
|
}, basename: (A) => {
|
|
3196
3197
|
if (A === "/") return "/";
|
|
3197
|
-
A =
|
|
3198
|
+
A = lA.normalize(A), A = A.replace(/\/$/, "");
|
|
3198
3199
|
var g = A.lastIndexOf("/");
|
|
3199
3200
|
return g === -1 ? A : A.substr(g + 1);
|
|
3200
|
-
}, join: (...A) =>
|
|
3201
|
+
}, join: (...A) => lA.normalize(A.join("/")), join2: (A, g) => lA.normalize(A + "/" + g) }, hE = () => {
|
|
3201
3202
|
if (typeof crypto == "object" && typeof crypto.getRandomValues == "function") return (Q) => crypto.getRandomValues(Q);
|
|
3202
3203
|
if (F) try {
|
|
3203
3204
|
var A = iC("crypto"), g = A.randomFillSync;
|
|
@@ -3212,9 +3213,9 @@ return ret;
|
|
|
3212
3213
|
var n = Q >= 0 ? A[Q] : e.cwd();
|
|
3213
3214
|
if (typeof n != "string") throw new TypeError("Arguments to path.resolve must be strings");
|
|
3214
3215
|
if (!n) return "";
|
|
3215
|
-
g = n + "/" + g, C =
|
|
3216
|
+
g = n + "/" + g, C = lA.isAbs(n);
|
|
3216
3217
|
}
|
|
3217
|
-
return g =
|
|
3218
|
+
return g = lA.normalizeArray(g.split("/").filter((s) => !!s), !C).join("/"), (C ? "/" : "") + g || ".";
|
|
3218
3219
|
}, relative: (A, g) => {
|
|
3219
3220
|
A = tg.resolve(A).substr(1), g = tg.resolve(g).substr(1);
|
|
3220
3221
|
function C(G) {
|
|
@@ -3416,7 +3417,7 @@ return ret;
|
|
|
3416
3417
|
n || s.canHandle(g) && (s.handle(A, g, C, Q), n = !0);
|
|
3417
3418
|
}), n;
|
|
3418
3419
|
}, GE = (A, g, C, Q, n, s, l, w, u, G) => {
|
|
3419
|
-
var Y = g ? tg.resolve(
|
|
3420
|
+
var Y = g ? tg.resolve(lA.join2(A, g)) : A;
|
|
3420
3421
|
function P(b) {
|
|
3421
3422
|
function W(Z) {
|
|
3422
3423
|
G == null || G(), w || RE(A, g, Z, Q, n, u), s == null || s(), gg();
|
|
@@ -3497,9 +3498,9 @@ return ret;
|
|
|
3497
3498
|
for (var Q = A.split("/").filter((P) => !!P), n = e.root, s = "/", l = 0; l < Q.length; l++) {
|
|
3498
3499
|
var w = l === Q.length - 1;
|
|
3499
3500
|
if (w && g.parent) break;
|
|
3500
|
-
if (n = e.lookupNode(n, Q[l]), s =
|
|
3501
|
+
if (n = e.lookupNode(n, Q[l]), s = lA.join2(s, Q[l]), e.isMountpoint(n) && (!w || w && g.follow_mount) && (n = n.mounted.root), !w || g.follow) for (var u = 0; e.isLink(n.mode); ) {
|
|
3501
3502
|
var G = e.readlink(s);
|
|
3502
|
-
s = tg.resolve(
|
|
3503
|
+
s = tg.resolve(lA.dirname(s), G);
|
|
3503
3504
|
var Y = e.lookupPath(s, { recurse_count: g.recurse_count + 1 });
|
|
3504
3505
|
if (n = Y.node, u++ > 40) throw new e.ErrnoError(32);
|
|
3505
3506
|
}
|
|
@@ -3660,7 +3661,7 @@ return ret;
|
|
|
3660
3661
|
}, lookup(A, g) {
|
|
3661
3662
|
return A.node_ops.lookup(A, g);
|
|
3662
3663
|
}, mknod(A, g, C) {
|
|
3663
|
-
var Q = e.lookupPath(A, { parent: !0 }), n = Q.node, s =
|
|
3664
|
+
var Q = e.lookupPath(A, { parent: !0 }), n = Q.node, s = lA.basename(A);
|
|
3664
3665
|
if (!s || s === "." || s === "..") throw new e.ErrnoError(28);
|
|
3665
3666
|
var l = e.mayCreate(n, s);
|
|
3666
3667
|
if (l) throw new e.ErrnoError(l);
|
|
@@ -3685,12 +3686,12 @@ return ret;
|
|
|
3685
3686
|
if (!tg.resolve(A)) throw new e.ErrnoError(44);
|
|
3686
3687
|
var C = e.lookupPath(g, { parent: !0 }), Q = C.node;
|
|
3687
3688
|
if (!Q) throw new e.ErrnoError(44);
|
|
3688
|
-
var n =
|
|
3689
|
+
var n = lA.basename(g), s = e.mayCreate(Q, n);
|
|
3689
3690
|
if (s) throw new e.ErrnoError(s);
|
|
3690
3691
|
if (!Q.node_ops.symlink) throw new e.ErrnoError(63);
|
|
3691
3692
|
return Q.node_ops.symlink(Q, n, A);
|
|
3692
3693
|
}, rename(A, g) {
|
|
3693
|
-
var C =
|
|
3694
|
+
var C = lA.dirname(A), Q = lA.dirname(g), n = lA.basename(A), s = lA.basename(g), l, w, u;
|
|
3694
3695
|
if (l = e.lookupPath(A, { parent: !0 }), w = l.node, l = e.lookupPath(g, { parent: !0 }), u = l.node, !w || !u) throw new e.ErrnoError(44);
|
|
3695
3696
|
if (w.mount !== u.mount) throw new e.ErrnoError(75);
|
|
3696
3697
|
var G = e.lookupNode(w, n), Y = tg.relative(A, Q);
|
|
@@ -3718,7 +3719,7 @@ return ret;
|
|
|
3718
3719
|
}
|
|
3719
3720
|
}
|
|
3720
3721
|
}, rmdir(A) {
|
|
3721
|
-
var g = e.lookupPath(A, { parent: !0 }), C = g.node, Q =
|
|
3722
|
+
var g = e.lookupPath(A, { parent: !0 }), C = g.node, Q = lA.basename(A), n = e.lookupNode(C, Q), s = e.mayDelete(C, Q, !0);
|
|
3722
3723
|
if (s) throw new e.ErrnoError(s);
|
|
3723
3724
|
if (!C.node_ops.rmdir) throw new e.ErrnoError(63);
|
|
3724
3725
|
if (e.isMountpoint(n)) throw new e.ErrnoError(10);
|
|
@@ -3730,7 +3731,7 @@ return ret;
|
|
|
3730
3731
|
}, unlink(A) {
|
|
3731
3732
|
var g = e.lookupPath(A, { parent: !0 }), C = g.node;
|
|
3732
3733
|
if (!C) throw new e.ErrnoError(44);
|
|
3733
|
-
var Q =
|
|
3734
|
+
var Q = lA.basename(A), n = e.lookupNode(C, Q), s = e.mayDelete(C, Q, !1);
|
|
3734
3735
|
if (s) throw new e.ErrnoError(s);
|
|
3735
3736
|
if (!C.node_ops.unlink) throw new e.ErrnoError(63);
|
|
3736
3737
|
if (e.isMountpoint(n)) throw new e.ErrnoError(10);
|
|
@@ -3799,7 +3800,7 @@ return ret;
|
|
|
3799
3800
|
var Q;
|
|
3800
3801
|
if (typeof A == "object") Q = A;
|
|
3801
3802
|
else {
|
|
3802
|
-
A =
|
|
3803
|
+
A = lA.normalize(A);
|
|
3803
3804
|
try {
|
|
3804
3805
|
var n = e.lookupPath(A, { follow: !(g & 131072) });
|
|
3805
3806
|
Q = n.node;
|
|
@@ -3939,7 +3940,7 @@ return ret;
|
|
|
3939
3940
|
var Q = { isRoot: !1, exists: !1, error: 0, name: null, path: null, object: null, parentExists: !1, parentPath: null, parentObject: null };
|
|
3940
3941
|
try {
|
|
3941
3942
|
var C = e.lookupPath(A, { parent: !0 });
|
|
3942
|
-
Q.parentExists = !0, Q.parentPath = C.path, Q.parentObject = C.node, Q.name =
|
|
3943
|
+
Q.parentExists = !0, Q.parentPath = C.path, Q.parentObject = C.node, Q.name = lA.basename(A), C = e.lookupPath(A, { follow: !g }), Q.exists = !0, Q.path = C.path, Q.object = C.node, Q.name = C.node.name, Q.isRoot = C.path === "/";
|
|
3943
3944
|
} catch (n) {
|
|
3944
3945
|
Q.error = n.errno;
|
|
3945
3946
|
}
|
|
@@ -3949,7 +3950,7 @@ return ret;
|
|
|
3949
3950
|
for (var n = g.split("/").reverse(); n.length; ) {
|
|
3950
3951
|
var s = n.pop();
|
|
3951
3952
|
if (s) {
|
|
3952
|
-
var l =
|
|
3953
|
+
var l = lA.join2(A, s);
|
|
3953
3954
|
try {
|
|
3954
3955
|
e.mkdir(l);
|
|
3955
3956
|
} catch {
|
|
@@ -3959,11 +3960,11 @@ return ret;
|
|
|
3959
3960
|
}
|
|
3960
3961
|
return l;
|
|
3961
3962
|
}, createFile(A, g, C, Q, n) {
|
|
3962
|
-
var s =
|
|
3963
|
+
var s = lA.join2(typeof A == "string" ? A : e.getPath(A), g), l = $I(Q, n);
|
|
3963
3964
|
return e.create(s, l);
|
|
3964
3965
|
}, createDataFile(A, g, C, Q, n, s) {
|
|
3965
3966
|
var l = g;
|
|
3966
|
-
A && (A = typeof A == "string" ? A : e.getPath(A), l = g ?
|
|
3967
|
+
A && (A = typeof A == "string" ? A : e.getPath(A), l = g ? lA.join2(A, g) : A);
|
|
3967
3968
|
var w = $I(Q, n), u = e.create(l, w);
|
|
3968
3969
|
if (C) {
|
|
3969
3970
|
if (typeof C == "string") {
|
|
@@ -3975,7 +3976,7 @@ return ret;
|
|
|
3975
3976
|
e.write(b, C, 0, C.length, 0, s), e.close(b), e.chmod(u, w);
|
|
3976
3977
|
}
|
|
3977
3978
|
}, createDevice(A, g, C, Q) {
|
|
3978
|
-
var n =
|
|
3979
|
+
var n = lA.join2(typeof A == "string" ? A : e.getPath(A), g), s = $I(!!C, !!Q);
|
|
3979
3980
|
e.createDevice.major || (e.createDevice.major = 64);
|
|
3980
3981
|
var l = e.makedev(e.createDevice.major++, 0);
|
|
3981
3982
|
return e.registerDevice(l, { open(w) {
|
|
@@ -4080,7 +4081,7 @@ return ret;
|
|
|
4080
4081
|
return P(b, L, kA, W, Z), { ptr: kA, allocated: !0 };
|
|
4081
4082
|
}, u.stream_ops = G, u;
|
|
4082
4083
|
} }, zg = { DEFAULT_POLLMASK: 5, calculateAt(A, g, C) {
|
|
4083
|
-
if (
|
|
4084
|
+
if (lA.isAbs(g)) return g;
|
|
4084
4085
|
var Q;
|
|
4085
4086
|
if (A === -100) Q = e.cwd();
|
|
4086
4087
|
else {
|
|
@@ -4091,7 +4092,7 @@ return ret;
|
|
|
4091
4092
|
if (!C) throw new e.ErrnoError(44);
|
|
4092
4093
|
return Q;
|
|
4093
4094
|
}
|
|
4094
|
-
return
|
|
4095
|
+
return lA.join2(Q, g);
|
|
4095
4096
|
}, doStat(A, g, C) {
|
|
4096
4097
|
var Q = A(g);
|
|
4097
4098
|
J[C >> 2] = Q.dev, J[C + 4 >> 2] = Q.mode, H[C + 8 >> 2] = Q.nlink, J[C + 12 >> 2] = Q.uid, J[C + 16 >> 2] = Q.gid, J[C + 20 >> 2] = Q.rdev, YA = [Q.size >>> 0, (EA = Q.size, +Math.abs(EA) >= 1 ? EA > 0 ? +Math.floor(EA / 4294967296) >>> 0 : ~~+Math.ceil((EA - +(~~EA >>> 0)) / 4294967296) >>> 0 : 0)], J[C + 24 >> 2] = YA[0], J[C + 28 >> 2] = YA[1], J[C + 32 >> 2] = 4096, J[C + 36 >> 2] = Q.blocks;
|
|
@@ -4466,12 +4467,12 @@ const Do = [
|
|
|
4466
4467
|
}, O = (_, K, j, tA) => {
|
|
4467
4468
|
var eA;
|
|
4468
4469
|
$(_) && _.tagName === "P" ? (h.setStart(_.firstChild, 0), h.setEnd(_, _.childNodes.length)) : (h.setStart(_, K), h.setEnd(j, tA));
|
|
4469
|
-
const
|
|
4470
|
-
|
|
4470
|
+
const CA = window.getSelection();
|
|
4471
|
+
CA.removeAllRanges(), CA.addRange(h);
|
|
4471
4472
|
const nA = document.createElement("div");
|
|
4472
4473
|
nA.appendChild(h.cloneContents());
|
|
4473
|
-
const
|
|
4474
|
-
(eA = I.editorCore.value) == null || eA.content.update(
|
|
4474
|
+
const cA = m(nA.innerHTML);
|
|
4475
|
+
(eA = I.editorCore.value) == null || eA.content.update(cA);
|
|
4475
4476
|
};
|
|
4476
4477
|
if (N === M) {
|
|
4477
4478
|
const _ = $(y) && y.tagName === "P";
|
|
@@ -4547,15 +4548,15 @@ const Do = [
|
|
|
4547
4548
|
Object.keys(((V = (v = t.value) == null ? void 0 : v.plugin[x.anchor]) == null ? void 0 : V.data) ?? []).forEach((X) => {
|
|
4548
4549
|
var DA, z;
|
|
4549
4550
|
const J = ((z = (DA = t.value) == null ? void 0 : DA.plugin[x.anchor]) == null ? void 0 : z.data[X]) ?? [], [H, dA] = J.reduce(
|
|
4550
|
-
(
|
|
4551
|
+
(BA, QA) => {
|
|
4551
4552
|
const AA = Array.from(
|
|
4552
|
-
document.body.querySelectorAll(`span[data-frag-id="anchor_${
|
|
4553
|
+
document.body.querySelectorAll(`span[data-frag-id="anchor_${QA.id}"]`)
|
|
4553
4554
|
);
|
|
4554
|
-
return
|
|
4555
|
+
return BA[AA.length ? 0 : 1].push(QA), BA;
|
|
4555
4556
|
},
|
|
4556
4557
|
[[], []]
|
|
4557
4558
|
);
|
|
4558
|
-
t.value.plugin[x.anchor].data[X] = H, dA.forEach((
|
|
4559
|
+
t.value.plugin[x.anchor].data[X] = H, dA.forEach((BA) => B("anchorRemove", BA.data));
|
|
4559
4560
|
});
|
|
4560
4561
|
}), i.observe(I.value, {
|
|
4561
4562
|
childList: !0,
|
|
@@ -4595,23 +4596,23 @@ const Do = [
|
|
|
4595
4596
|
const J = (DA = o.value) == null ? void 0 : DA.cursor.range;
|
|
4596
4597
|
let H = -1;
|
|
4597
4598
|
if (v && (J != null && J.collapse)) {
|
|
4598
|
-
const [z] = xA(J == null ? void 0 : J.startContainer, (
|
|
4599
|
-
H = V.findIndex((
|
|
4599
|
+
const [z] = xA(J == null ? void 0 : J.startContainer, (BA) => $(BA) && BA.dataset.type === x.anchor);
|
|
4600
|
+
H = V.findIndex((BA) => BA === z), X = H > -1 ? V.slice(H) : V;
|
|
4600
4601
|
}
|
|
4601
|
-
return X.map((z,
|
|
4602
|
-
let
|
|
4603
|
-
if (
|
|
4602
|
+
return X.map((z, BA) => {
|
|
4603
|
+
let QA = [];
|
|
4604
|
+
if (BA === 0 && H > -1) {
|
|
4604
4605
|
const AA = document.createRange();
|
|
4605
|
-
AA.setStart(J.startContainer, J.startOffset), AA.setEnd(z, z.childNodes.length),
|
|
4606
|
+
AA.setStart(J.startContainer, J.startOffset), AA.setEnd(z, z.childNodes.length), QA = Array.from(AA.cloneContents().childNodes);
|
|
4606
4607
|
} else
|
|
4607
|
-
|
|
4608
|
-
return
|
|
4609
|
-
}).join("") || V.map((z) => Array.from(z.childNodes).map((
|
|
4608
|
+
QA = Array.from(z.childNodes);
|
|
4609
|
+
return QA.map((AA) => K(AA)).join("");
|
|
4610
|
+
}).join("") || V.map((z) => Array.from(z.childNodes).map((BA) => K(BA)).join("")).join("");
|
|
4610
4611
|
}, tA = (L) => {
|
|
4611
4612
|
var X;
|
|
4612
4613
|
const v = L.uid ? `span[data-uid="${L.uid}"]` : `span[data-id="anchor_${L.id}"]`, V = (X = I.value) == null ? void 0 : X.querySelector(v);
|
|
4613
4614
|
return [V.dataset.emotion, V.dataset.role];
|
|
4614
|
-
},
|
|
4615
|
+
}, CA = () => {
|
|
4615
4616
|
var V;
|
|
4616
4617
|
return (((V = o.value) == null ? void 0 : V.content.getParas()) ?? []).filter(
|
|
4617
4618
|
(X) => {
|
|
@@ -4629,7 +4630,7 @@ const Do = [
|
|
|
4629
4630
|
var X;
|
|
4630
4631
|
(((X = t.value) == null ? void 0 : X.plugin.anchor.data[v.top]) ?? (t.value.plugin.anchor.data[v.top] = [])).push({ background: qB[(v.id - 1) % 10], data: v, id: v.id });
|
|
4631
4632
|
});
|
|
4632
|
-
},
|
|
4633
|
+
}, cA = () => {
|
|
4633
4634
|
fo.confirm({
|
|
4634
4635
|
title: "请确认",
|
|
4635
4636
|
content: "确定清空全部内容吗?",
|
|
@@ -4683,9 +4684,9 @@ const Do = [
|
|
|
4683
4684
|
isSelectionContainsTag: _,
|
|
4684
4685
|
getAnchorTtsMark: j,
|
|
4685
4686
|
getAnchorTtsEmotionAndRole: tA,
|
|
4686
|
-
isAllMarkedByAnchor:
|
|
4687
|
+
isAllMarkedByAnchor: CA,
|
|
4687
4688
|
addExtraAnchors: nA,
|
|
4688
|
-
clearContent:
|
|
4689
|
+
clearContent: cA,
|
|
4689
4690
|
insertContentAtCursor: RA,
|
|
4690
4691
|
renderHighlight: d,
|
|
4691
4692
|
unrenderHighlight: c
|
|
@@ -5497,14 +5498,14 @@ const VB = /* @__PURE__ */ JA(yn, [["render", Rn]]), [hB] = zA("refine-input"),
|
|
|
5497
5498
|
var hA;
|
|
5498
5499
|
document.removeEventListener("mousedown", p), (hA = O.value) == null || hA.removeEventListener("scroll", m);
|
|
5499
5500
|
});
|
|
5500
|
-
const K = Ce(I.width) ? `${I.width}px` : I.width, [j, tA] = FI(), [
|
|
5501
|
+
const K = Ce(I.width) ? `${I.width}px` : I.width, [j, tA] = FI(), [CA, nA] = mA(void 0), [cA, eA] = FI(!0), [RA, L] = FI(), [v, V] = mA(bA.未生成), [X, J] = mA(0), [H, dA] = mA([]), [DA, z] = mA(void 0), QA = {
|
|
5501
5502
|
name: "RefineGenerator",
|
|
5502
5503
|
refineGeneratorRef: D,
|
|
5503
5504
|
visible: N,
|
|
5504
5505
|
width: K,
|
|
5505
5506
|
generating: j,
|
|
5506
|
-
prompt:
|
|
5507
|
-
shortcutVisible:
|
|
5507
|
+
prompt: CA,
|
|
5508
|
+
shortcutVisible: cA,
|
|
5508
5509
|
content: H,
|
|
5509
5510
|
activedContent: DA,
|
|
5510
5511
|
contentVisible: RA,
|
|
@@ -5584,9 +5585,9 @@ const VB = /* @__PURE__ */ JA(yn, [["render", Rn]]), [hB] = zA("refine-input"),
|
|
|
5584
5585
|
setShortcutPosition: Rg,
|
|
5585
5586
|
setSubShortcutPosition: Qg,
|
|
5586
5587
|
calcModalPosition: WA
|
|
5587
|
-
} = kn(
|
|
5588
|
+
} = kn(QA);
|
|
5588
5589
|
return NB(BI, {
|
|
5589
|
-
...
|
|
5590
|
+
...QA,
|
|
5590
5591
|
generatorPosition: AA,
|
|
5591
5592
|
shortcutPosition: GA,
|
|
5592
5593
|
subShortcutPosition: wA,
|
|
@@ -5613,8 +5614,8 @@ const VB = /* @__PURE__ */ JA(yn, [["render", Rn]]), [hB] = zA("refine-input"),
|
|
|
5613
5614
|
modelValue: H.value,
|
|
5614
5615
|
"onUpdate:modelValue": (hA) => H.value = hA
|
|
5615
5616
|
}, null), R(Fn, {
|
|
5616
|
-
modelValue:
|
|
5617
|
-
"onUpdate:modelValue": (hA) =>
|
|
5617
|
+
modelValue: CA.value,
|
|
5618
|
+
"onUpdate:modelValue": (hA) => CA.value = hA
|
|
5618
5619
|
}, null)]), R(Nn, null, null)])])]),
|
|
5619
5620
|
innerSetVisible: M
|
|
5620
5621
|
};
|
|
@@ -5792,7 +5793,7 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5792
5793
|
addExtraAnchors: K,
|
|
5793
5794
|
clearContent: j,
|
|
5794
5795
|
insertContentAtCursor: tA,
|
|
5795
|
-
renderHighlight:
|
|
5796
|
+
renderHighlight: CA,
|
|
5796
5797
|
unrenderHighlight: nA
|
|
5797
5798
|
} = Fo(o, I, B);
|
|
5798
5799
|
NB(fg, {
|
|
@@ -5814,33 +5815,33 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5814
5815
|
isAllMarkedByAnchor: _,
|
|
5815
5816
|
addExtraAnchors: K,
|
|
5816
5817
|
clearContent: j,
|
|
5817
|
-
renderHighlight:
|
|
5818
|
+
renderHighlight: CA,
|
|
5818
5819
|
unrenderHighlight: nA,
|
|
5819
5820
|
refineContext: I.refineContext
|
|
5820
5821
|
});
|
|
5821
|
-
const
|
|
5822
|
-
var z,
|
|
5823
|
-
return ((
|
|
5824
|
-
}), eA = LA(() => Object.values(
|
|
5825
|
-
let AA = Array.from(document.body.querySelectorAll(
|
|
5826
|
-
|
|
5822
|
+
const cA = LA(() => {
|
|
5823
|
+
var z, BA;
|
|
5824
|
+
return ((BA = (z = a.value) == null ? void 0 : z.plugin.anchor) == null ? void 0 : BA.data) ?? {};
|
|
5825
|
+
}), eA = LA(() => Object.values(cA.value).flat().length), RA = LA(() => i.value <= 0 && !d.value), L = (z, BA, QA) => {
|
|
5826
|
+
let AA = Array.from(document.body.querySelectorAll(QA.uid ? `span[data-uid="${QA.uid}"]` : `span[data-frag-id="anchor_${z}"]`));
|
|
5827
|
+
QA.uid || (AA = AA.filter((GA) => !GA.dataset.uid)), AA.forEach((GA) => {
|
|
5827
5828
|
var wA, OA;
|
|
5828
5829
|
return (OA = (wA = r.value) == null ? void 0 : wA.plugin.anchor) == null ? void 0 : OA.remove(GA);
|
|
5829
|
-
}), B("anchorRemove",
|
|
5830
|
-
}, v = (z) => Object.entries(z).filter(([
|
|
5830
|
+
}), B("anchorRemove", QA);
|
|
5831
|
+
}, v = (z) => Object.entries(z).filter(([BA, QA]) => !!QA.length).map(([BA, QA]) => R("div", {
|
|
5831
5832
|
style: {
|
|
5832
5833
|
position: "absolute",
|
|
5833
|
-
top: `${
|
|
5834
|
+
top: `${BA}px`,
|
|
5834
5835
|
width: "100%",
|
|
5835
5836
|
paddingLeft: "24px",
|
|
5836
5837
|
transform: "translateY(-4px)"
|
|
5837
5838
|
},
|
|
5838
|
-
class: [
|
|
5839
|
-
}, [
|
|
5839
|
+
class: [QA.length > 1 && "multi-anchor", "anchor-wrapper"]
|
|
5840
|
+
}, [QA.length > 1 ? QA.slice(0, 6).map(({
|
|
5840
5841
|
background: AA,
|
|
5841
5842
|
data: GA,
|
|
5842
5843
|
id: wA
|
|
5843
|
-
}) => V(wA,
|
|
5844
|
+
}) => V(wA, BA, AA, GA, !0)) : V(QA[0].id, BA, QA[0].background, QA[0].data), QA.length > 6 ? R(ge, {
|
|
5844
5845
|
trigger: "click",
|
|
5845
5846
|
position: "tr",
|
|
5846
5847
|
popupContainer: ".c-editor-container__core-anchor",
|
|
@@ -5861,12 +5862,12 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5861
5862
|
}),
|
|
5862
5863
|
content: () => R("div", {
|
|
5863
5864
|
class: "multi-anchor anchor-popover-wrapper"
|
|
5864
|
-
}, [
|
|
5865
|
+
}, [QA.slice(6).map(({
|
|
5865
5866
|
background: AA,
|
|
5866
5867
|
data: GA,
|
|
5867
5868
|
id: wA
|
|
5868
|
-
}) => V(wA,
|
|
5869
|
-
}) : null])), V = (z,
|
|
5869
|
+
}) => V(wA, BA, AA, GA, !0))])
|
|
5870
|
+
}) : null])), V = (z, BA, QA, AA, GA = !1) => {
|
|
5870
5871
|
const wA = () => I.listenMode === LB.multiple || I.listenAnchorId !== `${AA.id}_${AA.uid}` ? R("span", {
|
|
5871
5872
|
onClick: () => B("anchorListen", AA, m(AA))
|
|
5872
5873
|
}, [R(pn, {
|
|
@@ -5880,7 +5881,7 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5880
5881
|
return R("section", {
|
|
5881
5882
|
class: Ig(),
|
|
5882
5883
|
style: {
|
|
5883
|
-
backgroundColor:
|
|
5884
|
+
backgroundColor: QA
|
|
5884
5885
|
}
|
|
5885
5886
|
}, [((WA = E.anchor) == null ? void 0 : WA.call(E, {
|
|
5886
5887
|
anchor: AA,
|
|
@@ -5901,12 +5902,12 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5901
5902
|
}, [AA.name]), R("label", {
|
|
5902
5903
|
class: Ig("info-speed-volume")
|
|
5903
5904
|
}, [$A("语速: "), AA.speed, $A(", 音量: "), AA.volume]), R("div", {
|
|
5904
|
-
onClick: () => L(z,
|
|
5905
|
+
onClick: () => L(z, BA, AA)
|
|
5905
5906
|
}, [R(uB, {
|
|
5906
5907
|
class: Ig("info-rem")
|
|
5907
5908
|
}, null)]), wA()]), GA ? R("div", {
|
|
5908
5909
|
class: Ig("rem"),
|
|
5909
|
-
onClick: () => L(z,
|
|
5910
|
+
onClick: () => L(z, BA, AA)
|
|
5910
5911
|
}, [R(uB, {
|
|
5911
5912
|
class: Ig("info-rem")
|
|
5912
5913
|
}, null)]) : null]);
|
|
@@ -5914,15 +5915,15 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5914
5915
|
return OA();
|
|
5915
5916
|
}, X = (z) => {
|
|
5916
5917
|
const {
|
|
5917
|
-
uid:
|
|
5918
|
+
uid: BA
|
|
5918
5919
|
} = z, {
|
|
5919
|
-
id:
|
|
5920
|
-
} = z, AA = Object.keys(
|
|
5920
|
+
id: QA
|
|
5921
|
+
} = z, AA = Object.keys(cA.value);
|
|
5921
5922
|
for (let wA = 0; wA < AA.length; wA++) {
|
|
5922
|
-
const OA = AA[wA], Qg =
|
|
5923
|
+
const OA = AA[wA], Qg = cA.value[OA].findIndex((WA) => WA.data.uid ? WA.data.uid === BA : WA.id === QA);
|
|
5923
5924
|
if (Qg > -1) {
|
|
5924
|
-
const WA =
|
|
5925
|
-
|
|
5925
|
+
const WA = cA.value[OA][Qg];
|
|
5926
|
+
cA.value[OA].splice(Qg, 1, {
|
|
5926
5927
|
...WA,
|
|
5927
5928
|
data: {
|
|
5928
5929
|
...z
|
|
@@ -5931,8 +5932,8 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5931
5932
|
break;
|
|
5932
5933
|
}
|
|
5933
5934
|
}
|
|
5934
|
-
let GA = Array.from(document.body.querySelectorAll(
|
|
5935
|
-
|
|
5935
|
+
let GA = Array.from(document.body.querySelectorAll(BA ? `span[data-uid="${BA}"]` : `span[data-frag-id="anchor_${QA}"]`));
|
|
5936
|
+
BA || (GA = GA.filter((wA) => !wA.dataset.uid)), GA.forEach((wA) => Object.assign(wA.dataset, {
|
|
5936
5937
|
provider: z.provider,
|
|
5937
5938
|
person: z.person,
|
|
5938
5939
|
volume: z.volumn || z.volume,
|
|
@@ -5966,53 +5967,50 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
5966
5967
|
}, dA = fA();
|
|
5967
5968
|
return {
|
|
5968
5969
|
action: r,
|
|
5969
|
-
innerRender: () => {
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
}
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
style: "display: none"
|
|
6014
|
-
}, [JSON.stringify(Object.keys(((CA = (z = r.value) == null ? void 0 : z.plugin.anchor) == null ? void 0 : CA.data) ?? {})), Object.values(lA.value).flat().length])]);
|
|
6015
|
-
},
|
|
5970
|
+
innerRender: () => R("section", {
|
|
5971
|
+
class: qA("wrapper")
|
|
5972
|
+
}, [R("div", {
|
|
5973
|
+
class: qA("", {
|
|
5974
|
+
simple: I.simple,
|
|
5975
|
+
disabled: I.disabled,
|
|
5976
|
+
refinable: I.refinable
|
|
5977
|
+
}),
|
|
5978
|
+
style: {
|
|
5979
|
+
height: Be(I.editorHeight) ? I.editorHeight : `${I.editorHeight}px`
|
|
5980
|
+
}
|
|
5981
|
+
}, [!I.simple && J(), R("div", {
|
|
5982
|
+
class: qA("core")
|
|
5983
|
+
}, [R("div", {
|
|
5984
|
+
class: qA("core-content")
|
|
5985
|
+
}, [R("div", {
|
|
5986
|
+
class: qA("core-content-editor")
|
|
5987
|
+
}, [R("div", {
|
|
5988
|
+
class: qA("core-content-editor-placeholder"),
|
|
5989
|
+
style: {
|
|
5990
|
+
display: RA.value ? "block" : "none"
|
|
5991
|
+
}
|
|
5992
|
+
}, [I.placeholder]), R("div", {
|
|
5993
|
+
ref: o,
|
|
5994
|
+
class: qA("core-content-editor-content"),
|
|
5995
|
+
contenteditable: !I.disabled,
|
|
5996
|
+
onDragover: (z) => z.preventDefault(),
|
|
5997
|
+
onDrop: (z) => z.preventDefault()
|
|
5998
|
+
}, [R("p", {
|
|
5999
|
+
class: UA
|
|
6000
|
+
}, [R("br", null, null)])])])]), I.simple ? null : R("div", {
|
|
6001
|
+
ref: t,
|
|
6002
|
+
class: qA("core-anchor")
|
|
6003
|
+
}, [eA.value ? v(cA.value) : null])]), !I.simple && R(Uo, null, null), I.refinable && R(Ln, {
|
|
6004
|
+
ref: dA
|
|
6005
|
+
}, null)]), !I.simple && R("div", {
|
|
6006
|
+
class: qA("splitor")
|
|
6007
|
+
}, null), !I.simple && !Object.values(cA.value).flat().length ? R("div", {
|
|
6008
|
+
class: qA("anchor-placeholder")
|
|
6009
|
+
}, [R("img", {
|
|
6010
|
+
src: No
|
|
6011
|
+
}, null)]) : null, H(), R("span", {
|
|
6012
|
+
style: "display: none"
|
|
6013
|
+
}, [JSON.stringify(cA.value), Object.values(cA.value).flat().length])]),
|
|
6016
6014
|
innerGetContent: c,
|
|
6017
6015
|
innerSetContent: h,
|
|
6018
6016
|
innerAppendContent: y,
|
|
@@ -6031,7 +6029,7 @@ const uB = /* @__PURE__ */ JA(mn, [["render", Kn]]), [qA] = zA("editor-container
|
|
|
6031
6029
|
innerUpdateAnchor: X,
|
|
6032
6030
|
innerClearContent: j,
|
|
6033
6031
|
innerInsertContentAtCursor: tA,
|
|
6034
|
-
innerRenderHightlight:
|
|
6032
|
+
innerRenderHightlight: CA,
|
|
6035
6033
|
innerUnrenderHightlight: nA
|
|
6036
6034
|
};
|
|
6037
6035
|
},
|