ss-component-new 1.2.260 → 1.2.261
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/{MTLLoader-Dl9mTw8W.js → MTLLoader-C245YB7a.js} +1 -1
- package/dist/{MTLLoader-DtDBiOvx.cjs → MTLLoader-CYmAr1Hu.cjs} +1 -1
- package/dist/{OrbitControls-CdcdoP_z.cjs → OrbitControls-BIkLIikf.cjs} +1 -1
- package/dist/{OrbitControls-hxXl-AWN.js → OrbitControls-CgpbusUT.js} +1 -1
- package/dist/{URDFLoader-Di8hgv52.cjs → URDFLoader-CBs700OQ.cjs} +1 -1
- package/dist/{URDFLoader-pYSV0wzh.js → URDFLoader-CKxg-TKF.js} +2 -2
- package/dist/{animationData-SiPWaY1I.js → animationData-Cfp2CIii.js} +1 -1
- package/dist/{animationData-DngLuaYu.cjs → animationData-u8gzeOzI.cjs} +1 -1
- package/dist/{array-CTlySr4U.js → array-DtOCgsMJ.js} +1 -1
- package/dist/{array-CE7N7eIQ.cjs → array-DxmmIzG0.cjs} +1 -1
- package/dist/{iconfont-BVOuanHT.js → iconfont-C9Kc0DGF.js} +2 -2
- package/dist/{iconfont-ByiDQiFD.cjs → iconfont-CMh15h5f.cjs} +1 -1
- package/dist/{index-D0TBsAUZ.js → index-681BYwjT.js} +4 -4
- package/dist/{index-BSq-asvS.js → index-B6pgDwkd.js} +1 -1
- package/dist/{index-BfaEcA-K.js → index-B9_F5Al3.js} +1 -1
- package/dist/{index-Cyhf8X42.cjs → index-BCMUus0r.cjs} +1 -1
- package/dist/{index-DbnbiV9a.cjs → index-BCUCXydP.cjs} +1 -1
- package/dist/{index-C3a6pShZ.cjs → index-BQRQ125X.cjs} +10 -10
- package/dist/{index-DpEA84dE.js → index-B_HpCnnI.js} +1 -1
- package/dist/{index-wcpihAbi.cjs → index-BaXQQWXT.cjs} +1 -1
- package/dist/{index-BywcwEk3.js → index-BbRwjuYR.js} +1 -1
- package/dist/{index-dreNJkcx.cjs → index-BeFrtjpc.cjs} +1 -1
- package/dist/{index-D8ZicEml.cjs → index-Bj8tXTbv.cjs} +1 -1
- package/dist/{index-CkrHNhQi.js → index-BqeX5bms.js} +3 -3
- package/dist/{index-D9LQjWVV.js → index-BtyUih-J.js} +1 -1
- package/dist/{index-bHHAbQwQ.js → index-BwFEk7V_.js} +1 -1
- package/dist/{index-DAILOJJL.js → index-C-8esy-a.js} +5 -5
- package/dist/{index-_-2NItuI.js → index-CJu3D2uo.js} +16 -16
- package/dist/{index-DBty7hCh.cjs → index-COECU96d.cjs} +1 -1
- package/dist/{index-Dtvqp-E2.cjs → index-COif05bF.cjs} +1 -1
- package/dist/{index-UGtQHDze.cjs → index-CUSbHMVi.cjs} +1 -1
- package/dist/{index-BMrtmSoV.cjs → index-CWCj6D5D.cjs} +1 -1
- package/dist/{index-jChk2Xqh.js → index-CZdcobYs.js} +586 -583
- package/dist/{index-DGF03EDT.cjs → index-CamRKKJN.cjs} +1 -1
- package/dist/{index-C80fq22G.cjs → index-Cd3qAxFo.cjs} +1 -1
- package/dist/{index-D9kHGUMm.js → index-CjpctHsD.js} +453 -453
- package/dist/{index-CekyNTlc.js → index-Cuq29oa4.js} +1 -1
- package/dist/{index-hE6A7ggV.cjs → index-CxJVoJTn.cjs} +1 -1
- package/dist/{index-C9cv75Ff.cjs → index-D0bi9qIn.cjs} +1 -1
- package/dist/{index-CZO2Aebm.js → index-D2nSdA8F.js} +1 -1
- package/dist/{index-DETN0uoU.js → index-D3Bw7PIE.js} +1 -1
- package/dist/{index-CVMNmUxo.cjs → index-D4apDyB_.cjs} +1 -1
- package/dist/{index-Ba9M_o9i.js → index-D4cnfAlY.js} +7 -7
- package/dist/{index-CPuIXGYT.cjs → index-D8HXlxQr.cjs} +1 -1
- package/dist/{index-zF616DHi.cjs → index-DB3v8iRn.cjs} +1 -1
- package/dist/{index-ZMKPKBGl.js → index-DPJGncY-.js} +3 -3
- package/dist/{index-n4i6g5Qt.js → index-DQYsvYAn.js} +1 -1
- package/dist/{index-DoLdgL0Y.cjs → index-DZGolBog.cjs} +1 -1
- package/dist/{index-B466HFKM.js → index-D_tfFgs-.js} +4 -4
- package/dist/{index-Dx2jxLP4.cjs → index-Dn2djkJk.cjs} +1 -1
- package/dist/{index-B7mrNUHI.js → index-DrkWJouc.js} +2 -2
- package/dist/{index-CAChqXRJ.cjs → index-DyoBXbcl.cjs} +1 -1
- package/dist/{index-B8KOzVVO.js → index-ItYWSDdr.js} +2 -2
- package/dist/{index-B7v4FvTM.cjs → index-LGGNc6a1.cjs} +1 -1
- package/dist/index-eI_w6PXT.cjs +1 -0
- package/dist/{index-DlBP9uCE.js → index-lI5tYopv.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CI564I5w.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-0RX57baY.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B8t4r7F_.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CENgOezi.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang--2VUeSe0.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CPbadDFN.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C1-MzySx.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CxeEhL4_.js} +37 -37
- package/dist/{index.vue_vue_type_style_index_0_scoped_20f284c2_lang-CAQkooVn.js → index.vue_vue_type_style_index_0_scoped_20f284c2_lang-Cv0T9hca.js} +98 -98
- package/dist/index.vue_vue_type_style_index_0_scoped_20f284c2_lang-DfZ7hU4T.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-C5F5_N3v.cjs → index.vue_vue_type_style_index_1_lang-Cw-NkdEt.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-QGAL6wGN.js → index.vue_vue_type_style_index_1_lang-DKF4Ox94.js} +3 -3
- package/dist/{main-BvwYCNyA.cjs → main-DEeM0A21.cjs} +1 -1
- package/dist/{main-C4ciyWeN.js → main-yjDb2N94.js} +3 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-BgwW52m6.cjs → threeModel-CmCUsEAj.cjs} +1 -1
- package/dist/{threeModel-C5tbMJNJ.js → threeModel-DPqE-FYJ.js} +4 -4
- package/dist/{threePreview-SMR2MaWi.cjs → threePreview-BVuWZma4.cjs} +1 -1
- package/dist/{threePreview-BR8y18Tw.js → threePreview-D7Dq1xmv.js} +3 -3
- package/dist/{threeSceneView-CNVU4cLM.js → threeSceneView-BrHwguCF.js} +8 -8
- package/dist/{threeSceneView-CZgOffyY.cjs → threeSceneView-Bv4IAB1R.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DpRLfMyB.cjs → threeSceneViewForCPMPIP-B3z8U_hY.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CxdJHGbJ.js → threeSceneViewForCPMPIP-C1isyFva.js} +7 -7
- package/dist/{threeTrackPathView-DvSIss6R.js → threeTrackPathView-B894Zsbj.js} +3 -3
- package/dist/{threeTrackPathView-BsIrzOzv.cjs → threeTrackPathView-DhV3HUi4.cjs} +1 -1
- package/dist/{threeViewerHost-CX05nlql.cjs → threeViewerHost-CYvQxMHX.cjs} +1 -1
- package/dist/{threeViewerHost-DWyLZF-J.js → threeViewerHost-D_ONpQMP.js} +2 -2
- package/dist/{urdfTree-TnQmLdzF.js → urdfTree-Djufft4m.js} +1 -1
- package/dist/{urdfTree-Eq_C3sM7.cjs → urdfTree-WiAKgNE4.cjs} +1 -1
- package/dist/{workpieceTreePanel-BcQfXXI6.js → workpieceTreePanel-Cp8YumLm.js} +4 -4
- package/dist/{workpieceTreePanel-DEtEmBX8.cjs → workpieceTreePanel-DNg7xg7B.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BzvnDSwo.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_20f284c2_lang-DOa7pLu2.cjs +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ref as N, resolveComponent as X, createBlock as j, openBlock as _, createCommentVNode as s0, createSlots as $2, withCtx as L, renderSlot as m0, defineComponent as d2, onMounted as de, createVNode as J, createElementVNode as l0, createElementBlock as E, Fragment as y0, renderList as k0, createTextVNode as R2, toDisplayString as $0, reactive as f1, h as He, Transition as q8, withDirectives as gt, vShow as Yt, createApp as Y8, toRefs as Vs, nextTick as M2, isRef as K8, watch as s2, computed as i0, normalizeClass as ot, withModifiers as O4, onBeforeUnmount as D4, normalizeStyle as t2, resolveDynamicComponent as Kt, normalizeProps as X8, guardReactiveProps as Q8, mergeProps as p1, inject as J8, watchEffect as ye, onUnmounted as g1, unref as lt, resolveDirective as Z8 } from "vue";
|
|
2
2
|
import { S as mt } from "./index-BHtNKL1L.js";
|
|
3
|
-
import { aU as er, t as As, a0 as Bs, q as et, c as tr, u as ir, Z as xi, e as Es, aV as nr, aW as sr, aX as or, aY as lr, d as rr, aZ as bi, a_ as _i } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
3
|
+
import { aU as er, t as As, a0 as Bs, q as et, c as tr, u as ir, Z as xi, e as Es, aV as nr, aW as sr, aX as or, aY as lr, d as rr, aZ as bi, a_ as _i } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CxeEhL4_.js";
|
|
4
4
|
import { _ as P0 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import { bB as Ls, bC as Hs, c5 as ar, c6 as yi, br as cr, aW as l3, P as hr, a9 as Is, aA as Tt, aV as Si, W as Gs, c7 as dr, E as H3, c as h2, p as rt, s as vt, a as Ns, c8 as ur, aM as fr, ao as pr, c3 as gr, b as mr, aS as vr } from "./index-7MBVUN82.js";
|
|
6
6
|
import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
7
7
|
import { a as M4, u as T4 } from "./index-3oQGURYh.js";
|
|
8
|
-
import { s as z4 } from "./index-
|
|
9
|
-
import { T as Ci, a as wr } from "./threeViewerHost-
|
|
10
|
-
import { s as xr } from "./index-
|
|
8
|
+
import { s as z4 } from "./index-lI5tYopv.js";
|
|
9
|
+
import { T as Ci, a as wr } from "./threeViewerHost-D_ONpQMP.js";
|
|
10
|
+
import { s as xr } from "./index-B6pgDwkd.js";
|
|
11
11
|
var br = "[object Date]";
|
|
12
12
|
function _r(n) {
|
|
13
13
|
return Ls(n) && Hs(n) == br;
|
|
@@ -957,7 +957,7 @@ function ff(n, e) {
|
|
|
957
957
|
r: "20",
|
|
958
958
|
fill: "none"
|
|
959
959
|
})
|
|
960
|
-
]),
|
|
960
|
+
]), k = s.text ? He("p", { class: m.b("text") }, [s.text]) : void 0;
|
|
961
961
|
return He(q8, {
|
|
962
962
|
name: m.b("fade"),
|
|
963
963
|
onAfterLeave: h
|
|
@@ -975,7 +975,7 @@ function ff(n, e) {
|
|
|
975
975
|
}, [
|
|
976
976
|
He("div", {
|
|
977
977
|
class: m.b("spinner")
|
|
978
|
-
}, [y,
|
|
978
|
+
}, [y, k])
|
|
979
979
|
]), [[Yt, s.visible]])
|
|
980
980
|
])
|
|
981
981
|
});
|
|
@@ -1302,17 +1302,17 @@ const vf = {
|
|
|
1302
1302
|
}), f = (x) => {
|
|
1303
1303
|
var I;
|
|
1304
1304
|
const { value: b } = x;
|
|
1305
|
-
return Array.isArray(a.value) || (a.value = []), ((I = a.value) == null ? void 0 : I.find((
|
|
1305
|
+
return Array.isArray(a.value) || (a.value = []), ((I = a.value) == null ? void 0 : I.find((O) => b == O)) && y.value ? "active" : "";
|
|
1306
1306
|
}, p = (x) => {
|
|
1307
1307
|
let b = h2(a.value);
|
|
1308
1308
|
const P = /* @__PURE__ */ new Set();
|
|
1309
1309
|
for (let I = 0; I < x.length; I++) {
|
|
1310
|
-
const
|
|
1311
|
-
P.add(
|
|
1310
|
+
const O = x[I];
|
|
1311
|
+
P.add(O);
|
|
1312
1312
|
}
|
|
1313
1313
|
b = b.filter((I) => P.has(I)), As(a.value, b) || (a.value = b, i("tagChange", b));
|
|
1314
1314
|
}, m = (x) => {
|
|
1315
|
-
const { value: b } = x, P = h2(a.value), I = P.findIndex((
|
|
1315
|
+
const { value: b } = x, P = h2(a.value), I = P.findIndex((O) => O === b);
|
|
1316
1316
|
return I >= 0 ? P.splice(I, 1) : P.push(b), P;
|
|
1317
1317
|
}, v = (x) => {
|
|
1318
1318
|
if (!y.value)
|
|
@@ -1324,19 +1324,19 @@ const vf = {
|
|
|
1324
1324
|
}, y = i0(() => {
|
|
1325
1325
|
const x = t.optionUrl;
|
|
1326
1326
|
return !!(x != null && x.multiple);
|
|
1327
|
-
}),
|
|
1327
|
+
}), k = i0(() => {
|
|
1328
1328
|
var x, b, P;
|
|
1329
1329
|
return !((x = t.optionUrl) != null && x.multipleLimit) && ((b = t.optionUrl) == null ? void 0 : b.multipleLimit) !== 0 ? 1 : parseInt((P = t.optionUrl) == null ? void 0 : P.multipleLimit);
|
|
1330
|
-
}),
|
|
1330
|
+
}), z = i0(() => {
|
|
1331
1331
|
var x;
|
|
1332
1332
|
return (x = r.value) == null ? void 0 : x.filter(
|
|
1333
|
-
(b, P, I) => P === I.findIndex((
|
|
1333
|
+
(b, P, I) => P === I.findIndex((O) => O.value === b.value)
|
|
1334
1334
|
);
|
|
1335
|
-
}),
|
|
1336
|
-
var x, b, P, I,
|
|
1335
|
+
}), S = async () => {
|
|
1336
|
+
var x, b, P, I, O, H, D, e0, Z, V, W, u0, h0, D0, G0, w0, g, V0;
|
|
1337
1337
|
if (((b = (x = t.optionUrl) == null ? void 0 : x.allSelectionContents) == null ? void 0 : b.length) > 0) {
|
|
1338
1338
|
let x0 = "", I0 = [];
|
|
1339
|
-
(
|
|
1339
|
+
(D = (H = (O = (I = (P = t.optionUrl) == null ? void 0 : P.selectFilter) == null ? void 0 : I.replaceAll("(", "")) == null ? void 0 : O.replaceAll(")", "")) == null ? void 0 : H.split("||")) == null || D.forEach((A0) => {
|
|
1340
1340
|
var G2, z2;
|
|
1341
1341
|
let Z0 = A0 == null ? void 0 : A0.split("=");
|
|
1342
1342
|
x0 = (z2 = (G2 = Z0 == null ? void 0 : Z0[0]) == null ? void 0 : G2.replaceAll("{", "")) == null ? void 0 : z2.replaceAll("}", ""), I0 == null || I0.push(Z0 == null ? void 0 : Z0[1]);
|
|
@@ -1360,40 +1360,40 @@ const vf = {
|
|
|
1360
1360
|
return l.value ? l.value ? (_(), j(Xt, {
|
|
1361
1361
|
key: 1,
|
|
1362
1362
|
modelValue: o.value,
|
|
1363
|
-
"onUpdate:modelValue": b[1] || (b[1] = (
|
|
1363
|
+
"onUpdate:modelValue": b[1] || (b[1] = (O) => o.value = O),
|
|
1364
1364
|
onChange: d,
|
|
1365
1365
|
onBlur: c
|
|
1366
1366
|
}, null, 8, ["modelValue"])) : s0("", !0) : (_(), j(I, {
|
|
1367
1367
|
key: 0,
|
|
1368
1368
|
class: ot(["ss-select", u.value]),
|
|
1369
1369
|
modelValue: s.value,
|
|
1370
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
1370
|
+
"onUpdate:modelValue": b[0] || (b[0] = (O) => s.value = O),
|
|
1371
1371
|
filterable: "",
|
|
1372
1372
|
"allow-create": "true",
|
|
1373
1373
|
"default-first-option": "true",
|
|
1374
1374
|
multiple: y.value,
|
|
1375
|
-
"multiple-limit":
|
|
1375
|
+
"multiple-limit": k.value,
|
|
1376
1376
|
clearable: n.clearable,
|
|
1377
1377
|
placeholder: n.placeholder,
|
|
1378
1378
|
style: { width: "100%" },
|
|
1379
1379
|
onBlur: x.onBlur,
|
|
1380
|
-
onVisibleChange:
|
|
1380
|
+
onVisibleChange: S,
|
|
1381
1381
|
onChange: w,
|
|
1382
1382
|
onDblclick: h
|
|
1383
1383
|
}, {
|
|
1384
|
-
label: L(({ label:
|
|
1384
|
+
label: L(({ label: O, value: H }) => [
|
|
1385
1385
|
l0("div", {
|
|
1386
1386
|
class: ot(["option", [f({ value: H })]]),
|
|
1387
|
-
onClick: O4((
|
|
1387
|
+
onClick: O4((D) => v({ value: H }), ["stop"])
|
|
1388
1388
|
}, [
|
|
1389
|
-
l0("span", null, $0(
|
|
1389
|
+
l0("span", null, $0(O), 1)
|
|
1390
1390
|
], 10, yf)
|
|
1391
1391
|
]),
|
|
1392
1392
|
default: L(() => [
|
|
1393
|
-
(_(!0), E(y0, null, k0(
|
|
1394
|
-
key:
|
|
1395
|
-
label:
|
|
1396
|
-
value:
|
|
1393
|
+
(_(!0), E(y0, null, k0(z.value, (O) => (_(), j(P, {
|
|
1394
|
+
key: O.value,
|
|
1395
|
+
label: O.label,
|
|
1396
|
+
value: O.value
|
|
1397
1397
|
}, null, 8, ["label", "value"]))), 128))
|
|
1398
1398
|
]),
|
|
1399
1399
|
_: 1
|
|
@@ -1471,11 +1471,11 @@ const vf = {
|
|
|
1471
1471
|
r("fixChangeValue");
|
|
1472
1472
|
}, y = (V) => {
|
|
1473
1473
|
r("clickTrigger", V);
|
|
1474
|
-
},
|
|
1474
|
+
}, k = (V) => {
|
|
1475
1475
|
r("preview", V);
|
|
1476
|
-
},
|
|
1476
|
+
}, z = () => {
|
|
1477
1477
|
r("blur", d.value);
|
|
1478
|
-
},
|
|
1478
|
+
}, S = (V, W) => {
|
|
1479
1479
|
r("tagChange", {
|
|
1480
1480
|
value: V,
|
|
1481
1481
|
key: W
|
|
@@ -1502,11 +1502,11 @@ const vf = {
|
|
|
1502
1502
|
default:
|
|
1503
1503
|
return W;
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, O = (V) => {
|
|
1506
1506
|
r("changeVisible", V);
|
|
1507
1507
|
}, H = (V, W) => {
|
|
1508
1508
|
r("handleColEditChange", V, W);
|
|
1509
|
-
},
|
|
1509
|
+
}, D = async (V, W) => {
|
|
1510
1510
|
await M2(), r("handleColTypeChange", V, W);
|
|
1511
1511
|
};
|
|
1512
1512
|
s2(
|
|
@@ -1615,23 +1615,23 @@ const vf = {
|
|
|
1615
1615
|
isEdit: t == null ? void 0 : t.isEdit,
|
|
1616
1616
|
disabled: g == null ? void 0 : g.disabled,
|
|
1617
1617
|
onClickTrigger: y,
|
|
1618
|
-
onBlur:
|
|
1618
|
+
onBlur: z,
|
|
1619
1619
|
onChange: Z,
|
|
1620
1620
|
optionUrl: g == null ? void 0 : g.optionUrl,
|
|
1621
|
-
onChangeVisible:
|
|
1621
|
+
onChangeVisible: O,
|
|
1622
1622
|
onFixChangeValue: w,
|
|
1623
1623
|
originalValue: d.value[(g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name)],
|
|
1624
1624
|
onBlurChange: (r2) => x((g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name)),
|
|
1625
1625
|
onCreate: (r2) => b(g, r2),
|
|
1626
1626
|
config: g == null ? void 0 : g.config,
|
|
1627
1627
|
configModel: (g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name),
|
|
1628
|
-
onTagChange:
|
|
1628
|
+
onTagChange: S,
|
|
1629
1629
|
selectedTagList: (g == null ? void 0 : g.selectValue) ?? []
|
|
1630
1630
|
}, null, 40, ["modelValue", "onUpdate:modelValue", "content", "isEdit", "disabled", "optionUrl", "originalValue", "onBlurChange", "onCreate", "config", "configModel", "selectedTagList"])),
|
|
1631
1631
|
typeof d.value[(g == null ? void 0 : g.prop) ?? g.name] == "string" && ((x0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && x0.includes(".stl") || (I0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && I0.includes(".obj") || (j0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && j0.includes(".urdf") || (v2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && v2.includes(".STL") || (A0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && A0.includes(".ls") || (Z0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Z0.includes(".uv") || (G2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && G2.includes(".UV") || (z2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && z2.includes(".cpt") || (ze = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && ze.includes(".CPT") || (Pe = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Pe.includes(".cyd") || (Ve = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ve.includes(".CYD") || (Ae = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ae.includes(".nc") || (Be = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Be.includes(".NC") || (Ee = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ee.includes(".csv")) ? (_(), j(be, {
|
|
1632
1632
|
key: 1,
|
|
1633
1633
|
class: "calculator-content form-preview",
|
|
1634
|
-
onClickTrigger: (r2) =>
|
|
1634
|
+
onClickTrigger: (r2) => k(d.value[(g == null ? void 0 : g.prop) ?? g.name]),
|
|
1635
1635
|
modelValue: "预览"
|
|
1636
1636
|
}, null, 8, ["onClickTrigger"])) : s0("", !0)
|
|
1637
1637
|
];
|
|
@@ -1659,7 +1659,7 @@ const vf = {
|
|
|
1659
1659
|
content: f.value,
|
|
1660
1660
|
placeholder: "类型",
|
|
1661
1661
|
style: { width: "100%" },
|
|
1662
|
-
onChange: (x0) =>
|
|
1662
|
+
onChange: (x0) => D(x0, g)
|
|
1663
1663
|
}, null, 8, ["value", "content", "onChange"])
|
|
1664
1664
|
]),
|
|
1665
1665
|
_: 2
|
|
@@ -1729,12 +1729,12 @@ const vf = {
|
|
|
1729
1729
|
onClickTrigger: y,
|
|
1730
1730
|
originalValue: d.value[(g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name)],
|
|
1731
1731
|
onChange: Z,
|
|
1732
|
-
onBlur:
|
|
1732
|
+
onBlur: z,
|
|
1733
1733
|
key: g == null ? void 0 : g.type,
|
|
1734
1734
|
optionUrl: g == null ? void 0 : g.optionUrl,
|
|
1735
|
-
onChangeVisible:
|
|
1735
|
+
onChangeVisible: O,
|
|
1736
1736
|
onBlurChange: (r2) => x((g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name)),
|
|
1737
|
-
onTagChange: (r2) =>
|
|
1737
|
+
onTagChange: (r2) => S(r2, (g == null ? void 0 : g.prop) ?? g.name),
|
|
1738
1738
|
onCreate: (r2) => b(g, r2),
|
|
1739
1739
|
config: g == null ? void 0 : g.config,
|
|
1740
1740
|
configModel: (g == null ? void 0 : g.prop) ?? (g == null ? void 0 : g.name),
|
|
@@ -1750,7 +1750,7 @@ const vf = {
|
|
|
1750
1750
|
typeof d.value[(g == null ? void 0 : g.prop) ?? g.name] == "string" && ((x0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && x0.includes(".stl") || (I0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && I0.includes(".obj") || (j0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && j0.includes(".urdf") || (v2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && v2.includes(".STL") || (A0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && A0.includes(".ls") || (Z0 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Z0.includes(".uv") || (G2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && G2.includes(".UV") || (z2 = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && z2.includes(".cpt") || (ze = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && ze.includes(".CPT") || (Pe = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Pe.includes(".cyd") || (Ve = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ve.includes(".CYD") || (Ae = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ae.includes(".nc") || (Be = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Be.includes(".NC") || (Ee = d.value[(g == null ? void 0 : g.prop) ?? g.name]) != null && Ee.includes(".csv")) ? (_(), j(be, {
|
|
1751
1751
|
key: 2,
|
|
1752
1752
|
class: "calculator-content form-preview",
|
|
1753
|
-
onClickTrigger: (r2) =>
|
|
1753
|
+
onClickTrigger: (r2) => k(d.value[(g == null ? void 0 : g.prop) ?? g.name]),
|
|
1754
1754
|
modelValue: "预览"
|
|
1755
1755
|
}, null, 8, ["onClickTrigger"])) : s0("", !0)
|
|
1756
1756
|
];
|
|
@@ -1778,7 +1778,7 @@ const vf = {
|
|
|
1778
1778
|
content: f.value,
|
|
1779
1779
|
placeholder: "类型",
|
|
1780
1780
|
style: { width: "100%" },
|
|
1781
|
-
onChange: (x0) =>
|
|
1781
|
+
onChange: (x0) => D(x0, g)
|
|
1782
1782
|
}, null, 8, ["value", "content", "onChange"])
|
|
1783
1783
|
]),
|
|
1784
1784
|
_: 2
|
|
@@ -2109,18 +2109,18 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2109
2109
|
$index: y.$index,
|
|
2110
2110
|
scope: y
|
|
2111
2111
|
}),
|
|
2112
|
-
(_(!0), E(y0, null, k0(n.column.children, (
|
|
2113
|
-
key:
|
|
2114
|
-
column:
|
|
2112
|
+
(_(!0), E(y0, null, k0(n.column.children, (k, z) => (_(), j(o, {
|
|
2113
|
+
key: z,
|
|
2114
|
+
column: k
|
|
2115
2115
|
}, $2({ _: 2 }, [
|
|
2116
|
-
k0(e.$slots, (
|
|
2116
|
+
k0(e.$slots, (S, x) => ({
|
|
2117
2117
|
name: x,
|
|
2118
|
-
fn: L(({ row: b, slotData: P, item: I, column:
|
|
2118
|
+
fn: L(({ row: b, slotData: P, item: I, column: O }) => [
|
|
2119
2119
|
m0(e.$slots, x, p1({ ref_for: !0 }, P ?? b, {
|
|
2120
|
-
item: I ??
|
|
2120
|
+
item: I ?? k,
|
|
2121
2121
|
slotData: P ?? b,
|
|
2122
2122
|
row: b,
|
|
2123
|
-
column:
|
|
2123
|
+
column: O
|
|
2124
2124
|
}))
|
|
2125
2125
|
])
|
|
2126
2126
|
}))
|
|
@@ -2172,7 +2172,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2172
2172
|
})) : !1;
|
|
2173
2173
|
};
|
|
2174
2174
|
return (d, u) => {
|
|
2175
|
-
var m, v, w, y,
|
|
2175
|
+
var m, v, w, y, k, z, S, x, b, P, I, O;
|
|
2176
2176
|
const f = X("svg-icon"), p = X("el-table-column");
|
|
2177
2177
|
return n.column.isTableColHidden ? s0("", !0) : (_(), j(p, {
|
|
2178
2178
|
key: 0,
|
|
@@ -2180,13 +2180,13 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2180
2180
|
prop: n.column.prop,
|
|
2181
2181
|
fixed: ((m = n.column) == null ? void 0 : m.prop) === "operate" ? "right" : (v = n.column) == null ? void 0 : v.fixed,
|
|
2182
2182
|
align: ((w = n.column) == null ? void 0 : w.align) ?? "left",
|
|
2183
|
-
sortable: ((y = n.column) == null ? void 0 : y.prop) === "operate" ? !1 : ((
|
|
2184
|
-
filters: (
|
|
2183
|
+
sortable: ((y = n.column) == null ? void 0 : y.prop) === "operate" ? !1 : ((k = n.column) == null ? void 0 : k.sortable) ?? !1,
|
|
2184
|
+
filters: (z = n.column) != null && z.filterable ? c(n.column) : null,
|
|
2185
2185
|
"filter-method": l,
|
|
2186
|
-
"show-overflow-tooltip": ((
|
|
2186
|
+
"show-overflow-tooltip": ((S = n.column) == null ? void 0 : S.showOverflowTooltip) ?? !0,
|
|
2187
2187
|
width: ((x = n.column) == null ? void 0 : x.width) > 80 ? 80 : (b = n.column) == null ? void 0 : b.width,
|
|
2188
2188
|
"min-width": ((P = n.column) == null ? void 0 : P.prop) === "operate" ? 40 : "auto",
|
|
2189
|
-
"class-name": ((I = n.column) == null ? void 0 : I.prop) === "operate" ? "action" : (((
|
|
2189
|
+
"class-name": ((I = n.column) == null ? void 0 : I.prop) === "operate" ? "action" : (((O = n.column) == null ? void 0 : O.isNotDrag) ?? !1) === !0 ? "is-not-drag" : "is-drag"
|
|
2190
2190
|
}, {
|
|
2191
2191
|
header: L(() => [
|
|
2192
2192
|
n.column.prop !== "operate" ? (_(), E(y0, { key: 0 }, [
|
|
@@ -2206,7 +2206,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2206
2206
|
clearable: !1,
|
|
2207
2207
|
placeholder: "类型",
|
|
2208
2208
|
style: { width: "100%" },
|
|
2209
|
-
onChange: u[0] || (u[0] = (
|
|
2209
|
+
onChange: u[0] || (u[0] = (D) => a(D, n.column))
|
|
2210
2210
|
}, null, 8, ["value", "content"])
|
|
2211
2211
|
];
|
|
2212
2212
|
}),
|
|
@@ -2218,9 +2218,9 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2218
2218
|
], 64)) : m0(d.$slots, "operateHeader", { key: 1 })
|
|
2219
2219
|
]),
|
|
2220
2220
|
"filter-icon": L(() => {
|
|
2221
|
-
var H,
|
|
2221
|
+
var H, D, e0, Z;
|
|
2222
2222
|
return [
|
|
2223
|
-
(H = n.column) != null && H.filterable && ((
|
|
2223
|
+
(H = n.column) != null && H.filterable && ((D = n.column) == null ? void 0 : D.prop) !== "operate" ? (_(), j(f, {
|
|
2224
2224
|
key: 0,
|
|
2225
2225
|
name: (e0 = n.column) != null && e0.filterable && ((Z = n.column) == null ? void 0 : Z.prop) !== "operate" ? "colFilter" : "",
|
|
2226
2226
|
class: "custom-filter-icon"
|
|
@@ -2239,19 +2239,19 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2239
2239
|
$index: H.$index,
|
|
2240
2240
|
scope: H
|
|
2241
2241
|
}),
|
|
2242
|
-
(_(!0), E(y0, null, k0(n.column.children, (
|
|
2242
|
+
(_(!0), E(y0, null, k0(n.column.children, (D, e0) => (_(), j(Uf, {
|
|
2243
2243
|
key: e0,
|
|
2244
|
-
column:
|
|
2244
|
+
column: D
|
|
2245
2245
|
}, $2({ _: 2 }, [
|
|
2246
2246
|
k0(d.$slots, (Z, V) => ({
|
|
2247
2247
|
name: V,
|
|
2248
2248
|
fn: L(({ row: W, slotData: u0, item: h0, column: D0 }) => [
|
|
2249
2249
|
m0(d.$slots, V, p1({ ref_for: !0 }, u0 ?? W, {
|
|
2250
|
-
item: h0 ??
|
|
2250
|
+
item: h0 ?? D,
|
|
2251
2251
|
slotData: u0 ?? W,
|
|
2252
2252
|
row: W,
|
|
2253
2253
|
column: D0,
|
|
2254
|
-
columnProp:
|
|
2254
|
+
columnProp: D
|
|
2255
2255
|
}))
|
|
2256
2256
|
])
|
|
2257
2257
|
}))
|
|
@@ -2386,30 +2386,30 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2386
2386
|
const i = ir(rt), { chooseTitle: s } = vt(i), o = T4(rt), { activeMenuPath: l } = vt(o), r = N(!1), a = N(), h = N(), c = f1({ x: 0, y: 0 }), d = N([]), u = N([]), f = N(0), p = N(null), m = N(null), v = N(null), w = e, y = J8("contentRef");
|
|
2387
2387
|
de(() => {
|
|
2388
2388
|
var A, B, K, c0, f0;
|
|
2389
|
-
|
|
2389
|
+
S = z(), d.value = t == null ? void 0 : t.columns, u.value = (A = t == null ? void 0 : t.tableData) == null ? void 0 : A.map((Q) => {
|
|
2390
2390
|
var t0, d0, o0;
|
|
2391
2391
|
let Y = {};
|
|
2392
2392
|
for (let R in Q)
|
|
2393
|
-
R !== "level" && (Y[R] = Di(Q[R]) && Q[R] === 0 ? (t0 = Q[R]) == null ? void 0 : t0.toString() : Q[R]), R !== "id" && ((d0 = Mt.value) == null ? void 0 : d0.prop) !== R &&
|
|
2393
|
+
R !== "level" && (Y[R] = Di(Q[R]) && Q[R] === 0 ? (t0 = Q[R]) == null ? void 0 : t0.toString() : Q[R]), R !== "id" && ((d0 = Mt.value) == null ? void 0 : d0.prop) !== R && k(Q[R]) ? Y[R] = Q[R] ? (o0 = et(Q[R])) == null ? void 0 : o0.format("YYYY-MM-DD HH:mm:ss") : Q[R] : Y[R] = Q[R];
|
|
2394
2394
|
return Y;
|
|
2395
2395
|
});
|
|
2396
|
-
let
|
|
2397
|
-
if (
|
|
2398
|
-
let Q = (c0 = (K = d.value) == null ? void 0 : K[0]) == null ? void 0 : c0.prop, Y = (f0 = u.value) == null ? void 0 : f0.find((t0) => (t0 == null ? void 0 : t0[Q]) === (
|
|
2396
|
+
let C = (B = s.value) == null ? void 0 : B.find((Q) => (Q == null ? void 0 : Q.parentContent) === l.value);
|
|
2397
|
+
if (C) {
|
|
2398
|
+
let Q = (c0 = (K = d.value) == null ? void 0 : K[0]) == null ? void 0 : c0.prop, Y = (f0 = u.value) == null ? void 0 : f0.find((t0) => (t0 == null ? void 0 : t0[Q]) === (C == null ? void 0 : C.value));
|
|
2399
2399
|
p.value.setCurrentRow(), p.value && setTimeout(() => {
|
|
2400
2400
|
p.value && p.value.setCurrentRow(Y);
|
|
2401
2401
|
}, 100);
|
|
2402
2402
|
}
|
|
2403
2403
|
Z0(), z2(), document.addEventListener("click", I);
|
|
2404
2404
|
});
|
|
2405
|
-
const
|
|
2406
|
-
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[\+\-]\d{2}:\d{2})?$/.test(
|
|
2405
|
+
const k = (C) => {
|
|
2406
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[\+\-]\d{2}:\d{2})?$/.test(C))
|
|
2407
2407
|
return !1;
|
|
2408
|
-
const B = new Date(
|
|
2408
|
+
const B = new Date(C);
|
|
2409
2409
|
return !isNaN(B.getTime());
|
|
2410
2410
|
};
|
|
2411
|
-
function
|
|
2412
|
-
const
|
|
2411
|
+
function z() {
|
|
2412
|
+
const C = /* @__PURE__ */ new WeakSet(), A = new MutationObserver(Q), B = /* @__PURE__ */ new WeakMap(), K = [];
|
|
2413
2413
|
function c0(Y) {
|
|
2414
2414
|
try {
|
|
2415
2415
|
const t0 = Y.getBoundingClientRect(), d0 = Y.clientWidth || t0.width || 1, o0 = t0.width / d0 || 1, R = parseFloat(getComputedStyle(Y).zoom || "1");
|
|
@@ -2420,8 +2420,8 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2420
2420
|
}
|
|
2421
2421
|
function f0(Y) {
|
|
2422
2422
|
var o0;
|
|
2423
|
-
if (!Y ||
|
|
2424
|
-
|
|
2423
|
+
if (!Y || C.has(Y)) return;
|
|
2424
|
+
C.add(Y);
|
|
2425
2425
|
const t0 = Y.parentElement, d0 = (o0 = Y.closest(".el-scrollbar")) == null ? void 0 : o0.querySelector(".el-scrollbar__wrap");
|
|
2426
2426
|
!t0 || !d0 || Y.addEventListener(
|
|
2427
2427
|
"pointerdown",
|
|
@@ -2432,8 +2432,8 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2432
2432
|
} catch {
|
|
2433
2433
|
}
|
|
2434
2434
|
t0.classList.add("is-dragging");
|
|
2435
|
-
const g0 = c0(t0), r0 = t0.clientWidth || 1, O0 = Y.clientWidth || 0, L0 = Math.max(1, (r0 - O0) / g0), P2 = Math.max(1, (d0.scrollWidth || 0) - (d0.clientWidth || 0)),
|
|
2436
|
-
const Q3 = (q0.clientX -
|
|
2435
|
+
const g0 = c0(t0), r0 = t0.clientWidth || 1, O0 = Y.clientWidth || 0, L0 = Math.max(1, (r0 - O0) / g0), P2 = Math.max(1, (d0.scrollWidth || 0) - (d0.clientWidth || 0)), M = R.clientX, f2 = d0.scrollLeft, N0 = P2 / L0, n0 = (q0) => {
|
|
2436
|
+
const Q3 = (q0.clientX - M) / g0;
|
|
2437
2437
|
d0.scrollLeft = f2 + Q3 * N0;
|
|
2438
2438
|
}, C0 = () => {
|
|
2439
2439
|
try {
|
|
@@ -2456,7 +2456,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2456
2456
|
const o0 = t0.querySelector(".el-scrollbar__view") || t0.firstElementChild || t0, R = o0.querySelector("table") || o0.querySelector(".el-table__body") || o0, g0 = R.scrollWidth, r0 = t0.clientWidth, O0 = g0 - r0 > 2;
|
|
2457
2457
|
if (Y.classList.toggle("has-x-scroll", O0), d0.style.display = "", O0 && Y.querySelectorAll(".el-scrollbar__bar.is-horizontal .el-scrollbar__thumb").forEach(f0), !B.has(t0)) {
|
|
2458
2458
|
const L0 = new ResizeObserver(() => {
|
|
2459
|
-
const P2 = R && R.scrollWidth || t0.scrollWidth,
|
|
2459
|
+
const P2 = R && R.scrollWidth || t0.scrollWidth, M = t0.clientWidth, f2 = P2 - M > 2;
|
|
2460
2460
|
Y.classList.toggle("has-x-scroll", f2);
|
|
2461
2461
|
});
|
|
2462
2462
|
L0.observe(t0), R && L0.observe(R), B.set(t0, L0), K.push(() => L0.disconnect());
|
|
@@ -2472,16 +2472,16 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2472
2472
|
}), K.length = 0;
|
|
2473
2473
|
};
|
|
2474
2474
|
}
|
|
2475
|
-
let
|
|
2475
|
+
let S;
|
|
2476
2476
|
s2(
|
|
2477
2477
|
() => [s.value],
|
|
2478
2478
|
() => {
|
|
2479
2479
|
var A, B, K, c0, f0, Q, Y;
|
|
2480
|
-
let
|
|
2481
|
-
if (
|
|
2480
|
+
let C = (A = s.value) == null ? void 0 : A.find((t0) => (t0 == null ? void 0 : t0.parentContent) === l.value);
|
|
2481
|
+
if (C || !((K = (B = s.value) == null ? void 0 : B[0]) != null && K.parentContent)) {
|
|
2482
2482
|
let t0 = (f0 = (c0 = d.value) == null ? void 0 : c0[0]) == null ? void 0 : f0.prop, d0 = (Q = u.value) == null ? void 0 : Q.find((o0) => {
|
|
2483
2483
|
var R, g0;
|
|
2484
|
-
return (o0 == null ? void 0 : o0[t0]) === ((
|
|
2484
|
+
return (o0 == null ? void 0 : o0[t0]) === ((C == null ? void 0 : C.value) ?? ((g0 = (R = s.value) == null ? void 0 : R[0]) == null ? void 0 : g0.value));
|
|
2485
2485
|
});
|
|
2486
2486
|
(Y = p.value) == null || Y.setCurrentRow(), p.value && d0 && setTimeout(() => {
|
|
2487
2487
|
var o0;
|
|
@@ -2491,99 +2491,99 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2491
2491
|
},
|
|
2492
2492
|
{ deep: !0 }
|
|
2493
2493
|
), D4(() => {
|
|
2494
|
-
|
|
2494
|
+
S && S(), document.removeEventListener("click", I), u.value = void 0, d.value = void 0, x.value && clearTimeout(x.value);
|
|
2495
2495
|
});
|
|
2496
2496
|
const x = N(null);
|
|
2497
|
-
s2(() => t == null ? void 0 : t.isEditViewport, async (
|
|
2497
|
+
s2(() => t == null ? void 0 : t.isEditViewport, async (C) => {
|
|
2498
2498
|
var A;
|
|
2499
|
-
|
|
2499
|
+
C && ((A = t == null ? void 0 : t.tableData) == null ? void 0 : A.length) > 15 && (await M2(), x.value = setTimeout(() => {
|
|
2500
2500
|
const B = document.querySelectorAll(".el-table__body tr");
|
|
2501
2501
|
B.length > 0 && B[B.length - 1].scrollIntoView({ behavior: "smooth", block: "center" });
|
|
2502
2502
|
}, 10));
|
|
2503
2503
|
}, { immediate: !0 });
|
|
2504
|
-
const b = (
|
|
2505
|
-
w("handleColEditChange",
|
|
2506
|
-
}, P = (
|
|
2507
|
-
w("handleColTypeChange",
|
|
2508
|
-
}, I = (
|
|
2504
|
+
const b = (C, A) => {
|
|
2505
|
+
w("handleColEditChange", C, A);
|
|
2506
|
+
}, P = (C, A) => {
|
|
2507
|
+
w("handleColTypeChange", C, A);
|
|
2508
|
+
}, I = (C) => {
|
|
2509
2509
|
var A, B, K;
|
|
2510
|
-
r.value = !1, t.isEditViewport && y.value && !((B = (A = p.value) == null ? void 0 : A.$el) != null && B.contains(
|
|
2511
|
-
},
|
|
2512
|
-
var
|
|
2513
|
-
return (
|
|
2510
|
+
r.value = !1, t.isEditViewport && y.value && !((B = (A = p.value) == null ? void 0 : A.$el) != null && B.contains(C == null ? void 0 : C.target)) && ((K = y.value) != null && K.contains(C == null ? void 0 : C.target)) && w("submitEditingTable");
|
|
2511
|
+
}, O = i0(() => {
|
|
2512
|
+
var C;
|
|
2513
|
+
return (C = t == null ? void 0 : t.extraButton) == null ? void 0 : C.filter((A) => {
|
|
2514
2514
|
var B;
|
|
2515
2515
|
return !((B = A == null ? void 0 : A.label) != null && B.includes("批量"));
|
|
2516
2516
|
});
|
|
2517
2517
|
}), H = i0(() => {
|
|
2518
|
-
var
|
|
2519
|
-
return (
|
|
2518
|
+
var C;
|
|
2519
|
+
return (C = t == null ? void 0 : t.extraButton) == null ? void 0 : C.filter((A) => {
|
|
2520
2520
|
var B;
|
|
2521
2521
|
return (B = A == null ? void 0 : A.label) == null ? void 0 : B.includes("批量");
|
|
2522
2522
|
});
|
|
2523
|
-
}),
|
|
2524
|
-
|
|
2525
|
-
}, Z = (
|
|
2526
|
-
|
|
2527
|
-
}, V = (
|
|
2528
|
-
w("selectChange",
|
|
2529
|
-
}, W = (
|
|
2523
|
+
}), D = N(0), e0 = (C, A, B) => {
|
|
2524
|
+
D.value = C == null ? void 0 : C.id;
|
|
2525
|
+
}, Z = (C, A, B) => {
|
|
2526
|
+
D.value = 0;
|
|
2527
|
+
}, V = (C) => {
|
|
2528
|
+
w("selectChange", C);
|
|
2529
|
+
}, W = (C, A, B, K) => i0(() => {
|
|
2530
2530
|
var f0, Q, Y, t0, d0, o0, R, g0, r0, O0;
|
|
2531
|
-
let c0 =
|
|
2531
|
+
let c0 = C != null && C[A == null ? void 0 : A.prop] ? ((Q = (f0 = C == null ? void 0 : C[A == null ? void 0 : A.prop]) == null ? void 0 : f0[0]) == null ? void 0 : Q.contents) ?? (C == null ? void 0 : C[A == null ? void 0 : A.prop]) : ((t0 = (Y = C == null ? void 0 : C[B == null ? void 0 : B.prop]) == null ? void 0 : Y[0]) == null ? void 0 : t0.contents) ?? (C == null ? void 0 : C[B == null ? void 0 : B.prop]) ?? ((o0 = (d0 = K == null ? void 0 : K[B == null ? void 0 : B.prop]) == null ? void 0 : d0[0]) == null ? void 0 : o0.contents) ?? (K == null ? void 0 : K[B == null ? void 0 : B.prop]) ?? ((r0 = (g0 = C == null ? void 0 : C[(R = B == null ? void 0 : B.child) == null ? void 0 : R.prop]) == null ? void 0 : g0[0]) == null ? void 0 : r0.contents) ?? (C == null ? void 0 : C[(O0 = B == null ? void 0 : B.child) == null ? void 0 : O0.prop]);
|
|
2532
2532
|
return Array.isArray(c0) && !(c0 != null && c0.every((L0) => typeof L0 == "string" || typeof L0 == "number")) ? "查看" : c0;
|
|
2533
|
-
}), u0 = (
|
|
2533
|
+
}), u0 = (C) => {
|
|
2534
2534
|
var K, c0, f0;
|
|
2535
2535
|
let A = (c0 = (K = d.value) == null ? void 0 : K[0]) == null ? void 0 : c0.prop, B = (f0 = u.value) == null ? void 0 : f0.map((Q) => Q == null ? void 0 : Q[A]);
|
|
2536
2536
|
w("rowClick", {
|
|
2537
|
-
row:
|
|
2537
|
+
row: C,
|
|
2538
2538
|
type: "table",
|
|
2539
2539
|
usingRow: d.value,
|
|
2540
2540
|
firstContents: B
|
|
2541
2541
|
});
|
|
2542
|
-
}, h0 = (
|
|
2542
|
+
}, h0 = (C, A, B, K) => {
|
|
2543
2543
|
a.value = void 0;
|
|
2544
2544
|
const c0 = B == null ? void 0 : B.innerText;
|
|
2545
|
-
Jf(c0) && (c.x = K.clientX, c.y = K.clientY, r.value = !0, a.value = B.innerText, h.value =
|
|
2545
|
+
Jf(c0) && (c.x = K.clientX, c.y = K.clientY, r.value = !0, a.value = B.innerText, h.value = C);
|
|
2546
2546
|
}, D0 = () => {
|
|
2547
2547
|
a.value && w("preview", {
|
|
2548
2548
|
row: a.value,
|
|
2549
2549
|
rowData: h.value,
|
|
2550
2550
|
type: "table"
|
|
2551
2551
|
});
|
|
2552
|
-
}, G0 = (
|
|
2553
|
-
w("buttonClick",
|
|
2552
|
+
}, G0 = (C) => {
|
|
2553
|
+
w("buttonClick", C);
|
|
2554
2554
|
};
|
|
2555
2555
|
s2(
|
|
2556
2556
|
() => t == null ? void 0 : t.tableData,
|
|
2557
2557
|
() => {
|
|
2558
|
-
var
|
|
2559
|
-
u.value = (
|
|
2558
|
+
var C;
|
|
2559
|
+
u.value = (C = t == null ? void 0 : t.tableData) == null ? void 0 : C.map((A) => {
|
|
2560
2560
|
var K, c0, f0;
|
|
2561
2561
|
let B = {};
|
|
2562
2562
|
for (let Q in A)
|
|
2563
|
-
B[Q] = Di(A[Q]) && A[Q] === 0 ? (K = A[Q]) == null ? void 0 : K.toString() : A[Q], Q !== "id" && ((c0 = Mt.value) == null ? void 0 : c0.prop) !== Q &&
|
|
2563
|
+
B[Q] = Di(A[Q]) && A[Q] === 0 ? (K = A[Q]) == null ? void 0 : K.toString() : A[Q], Q !== "id" && ((c0 = Mt.value) == null ? void 0 : c0.prop) !== Q && k(A[Q]) && (B[Q] = A[Q] ? (f0 = et(A[Q])) == null ? void 0 : f0.format("YYYY-MM-DD HH:mm:ss") : A[Q]);
|
|
2564
2564
|
return B;
|
|
2565
2565
|
});
|
|
2566
2566
|
},
|
|
2567
2567
|
{ deep: !0 }
|
|
2568
2568
|
);
|
|
2569
|
-
const w0 = (
|
|
2570
|
-
w("clickButton",
|
|
2571
|
-
}, V0 = (
|
|
2572
|
-
w("doCurrentChange",
|
|
2573
|
-
}, x0 = (
|
|
2574
|
-
w("dbClickRow",
|
|
2575
|
-
}, I0 = (
|
|
2576
|
-
w("doSizeChange",
|
|
2577
|
-
}, j0 = (
|
|
2578
|
-
w("fixRow",
|
|
2579
|
-
}, v2 = (
|
|
2580
|
-
w("deleteRow",
|
|
2581
|
-
}, A0 = (
|
|
2582
|
-
w("contentClick",
|
|
2569
|
+
const w0 = (C) => pi(C), g = (C, A, B) => {
|
|
2570
|
+
w("clickButton", C, A, B);
|
|
2571
|
+
}, V0 = (C) => {
|
|
2572
|
+
w("doCurrentChange", C);
|
|
2573
|
+
}, x0 = (C, A) => {
|
|
2574
|
+
w("dbClickRow", C);
|
|
2575
|
+
}, I0 = (C) => {
|
|
2576
|
+
w("doSizeChange", C);
|
|
2577
|
+
}, j0 = (C) => {
|
|
2578
|
+
w("fixRow", C);
|
|
2579
|
+
}, v2 = (C) => {
|
|
2580
|
+
w("deleteRow", C);
|
|
2581
|
+
}, A0 = (C, A, B, K) => {
|
|
2582
|
+
w("contentClick", C, A, B, K);
|
|
2583
2583
|
}, Z0 = () => {
|
|
2584
2584
|
var A;
|
|
2585
|
-
const
|
|
2586
|
-
!
|
|
2585
|
+
const C = (A = p.value) == null ? void 0 : A.$el.querySelector(".el-table__header-wrapper tr");
|
|
2586
|
+
!C || !t.isMoveColumn || xi.create(C, {
|
|
2587
2587
|
animation: 180,
|
|
2588
2588
|
delay: 0,
|
|
2589
2589
|
handle: ".is-drag .cell",
|
|
@@ -2597,10 +2597,10 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2597
2597
|
});
|
|
2598
2598
|
}
|
|
2599
2599
|
});
|
|
2600
|
-
}, G2 = ({ column:
|
|
2600
|
+
}, G2 = ({ column: C }) => C.label && C.label.length > 8 ? "long-header" : "", z2 = () => {
|
|
2601
2601
|
var A;
|
|
2602
|
-
const
|
|
2603
|
-
|
|
2602
|
+
const C = (A = p.value) == null ? void 0 : A.$el.querySelector(".el-table__body-wrapper tbody");
|
|
2603
|
+
C && new xi(C, {
|
|
2604
2604
|
animation: 150,
|
|
2605
2605
|
handle: ".custom-drag-icon",
|
|
2606
2606
|
ghostClass: "sortable-ghost",
|
|
@@ -2611,18 +2611,18 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2611
2611
|
});
|
|
2612
2612
|
}
|
|
2613
2613
|
});
|
|
2614
|
-
}, ze = (
|
|
2614
|
+
}, ze = (C) => new Promise((A) => {
|
|
2615
2615
|
const B = new FileReader();
|
|
2616
|
-
B.onloadend = () => A(B.result), B.readAsDataURL(
|
|
2617
|
-
}), Pe = (
|
|
2618
|
-
let B =
|
|
2616
|
+
B.onloadend = () => A(B.result), B.readAsDataURL(C);
|
|
2617
|
+
}), Pe = (C, A = "file") => {
|
|
2618
|
+
let B = C.split(","), K = B[0].match(/:(.*?);/)[1], c0 = K.split("/")[1], f0 = atob(B[1]), Q = f0.length, Y = new Uint8Array(Q);
|
|
2619
2619
|
for (; Q--; )
|
|
2620
2620
|
Y[Q] = f0.charCodeAt(Q);
|
|
2621
2621
|
return new File([Y], `${A}.${c0}`, {
|
|
2622
2622
|
type: K
|
|
2623
2623
|
});
|
|
2624
|
-
}, Ve = async (
|
|
2625
|
-
const A = await ze(
|
|
2624
|
+
}, Ve = async (C) => {
|
|
2625
|
+
const A = await ze(C);
|
|
2626
2626
|
let B = Pe(A), K = new FormData();
|
|
2627
2627
|
K.append("file", B);
|
|
2628
2628
|
let c0;
|
|
@@ -2633,13 +2633,13 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2633
2633
|
name: (g0 = (t0 = (Y = f0.data.result) == null ? void 0 : Y.url) == null ? void 0 : t0.split("/")) == null ? void 0 : g0[((R = (o0 = (d0 = f0.data.result) == null ? void 0 : d0.url) == null ? void 0 : o0.split("/")) == null ? void 0 : R.length) - 1]
|
|
2634
2634
|
};
|
|
2635
2635
|
}), c0;
|
|
2636
|
-
}, Ae = async (
|
|
2636
|
+
}, Ae = async (C) => {
|
|
2637
2637
|
var A;
|
|
2638
2638
|
try {
|
|
2639
|
-
const B =
|
|
2639
|
+
const B = C.clipboardData || (window == null ? void 0 : window.clipboardData), K = B.getData("text/plain");
|
|
2640
2640
|
if (K === void 0) return;
|
|
2641
2641
|
if (K.includes("<table")) {
|
|
2642
|
-
|
|
2642
|
+
C.preventDefault();
|
|
2643
2643
|
const c0 = Be(K);
|
|
2644
2644
|
if (!c0.length) return;
|
|
2645
2645
|
const { rowIndex: f0, columnIndex: Q } = v.value || { rowIndex: 0, columnIndex: 0 }, Y = [];
|
|
@@ -2667,14 +2667,14 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2667
2667
|
if (c0 === void 0) return;
|
|
2668
2668
|
const Q = new DOMParser().parseFromString(c0, "text/html"), Y = Q.querySelectorAll("table");
|
|
2669
2669
|
if ((Y == null ? void 0 : Y.length) > 0) {
|
|
2670
|
-
|
|
2670
|
+
C.preventDefault();
|
|
2671
2671
|
const d0 = Y[0].querySelectorAll("tr"), o0 = [];
|
|
2672
2672
|
for (const r0 of d0) {
|
|
2673
2673
|
const O0 = r0.querySelectorAll("td, th"), L0 = [];
|
|
2674
2674
|
for (const P2 of O0) {
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
for (const f2 of
|
|
2675
|
+
const M = P2.querySelectorAll("img");
|
|
2676
|
+
if (M.length > 0)
|
|
2677
|
+
for (const f2 of M) {
|
|
2678
2678
|
const N0 = f2.getAttribute("src");
|
|
2679
2679
|
if (N0 && N0.startsWith("file:///")) {
|
|
2680
2680
|
const n0 = N0.match(/base64,(.*)/);
|
|
@@ -2700,9 +2700,9 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2700
2700
|
const r0 = [];
|
|
2701
2701
|
o0.forEach((L0) => {
|
|
2702
2702
|
if (L0 != null && L0.length) {
|
|
2703
|
-
const P2 = {},
|
|
2704
|
-
for (let f2 = 0; f2 < (
|
|
2705
|
-
const N0 =
|
|
2703
|
+
const P2 = {}, M = t.columns;
|
|
2704
|
+
for (let f2 = 0; f2 < (M == null ? void 0 : M.length); f2++) {
|
|
2705
|
+
const N0 = M[f2], n0 = N0 == null ? void 0 : N0.prop, C0 = L0 == null ? void 0 : L0[f2], q0 = C0 == null ? void 0 : C0.content;
|
|
2706
2706
|
P2[n0] = q0;
|
|
2707
2707
|
}
|
|
2708
2708
|
r0.push(P2);
|
|
@@ -2715,19 +2715,19 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2715
2715
|
const t0 = Q.querySelectorAll("span");
|
|
2716
2716
|
let d0 = "";
|
|
2717
2717
|
if (t0.length === 0) {
|
|
2718
|
-
const o0 = (A =
|
|
2718
|
+
const o0 = (A = C.clipboardData) == null ? void 0 : A.items;
|
|
2719
2719
|
d0 = [];
|
|
2720
2720
|
for (const R of o0)
|
|
2721
2721
|
if ((R == null ? void 0 : R.type) === "image/png") {
|
|
2722
2722
|
const g0 = await Ve(R == null ? void 0 : R.getAsFile());
|
|
2723
2723
|
d0.push(g0);
|
|
2724
2724
|
} else
|
|
2725
|
-
d0 =
|
|
2725
|
+
d0 = C.clipboardData.getData("text/plain");
|
|
2726
2726
|
} else
|
|
2727
2727
|
for (const o0 of t0)
|
|
2728
2728
|
d0 = d0 + o0.textContent.trim();
|
|
2729
2729
|
if (Array.isArray(d0)) {
|
|
2730
|
-
|
|
2730
|
+
C.preventDefault();
|
|
2731
2731
|
const { rowIndex: o0, columnProp: R } = v.value || { rowIndex: 0, columnIndex: 0 }, g0 = {}, r0 = u.value;
|
|
2732
2732
|
r0[o0][R] = d0;
|
|
2733
2733
|
}
|
|
@@ -2736,20 +2736,20 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2736
2736
|
} catch (B) {
|
|
2737
2737
|
console.error("粘贴失败:", B);
|
|
2738
2738
|
}
|
|
2739
|
-
}, Be = (
|
|
2739
|
+
}, Be = (C) => C.trim().split(/\r\n|\n|\r/).map((K) => K.trim() ? K.split(" ").map((c0) => c0.replace(/^"(.*)"$/, "$1")) : [""]), Ee = (C) => {
|
|
2740
2740
|
var A;
|
|
2741
|
-
|
|
2742
|
-
rowIndex:
|
|
2743
|
-
columnIndex:
|
|
2744
|
-
columnProp: (A =
|
|
2741
|
+
C && (v.value = {
|
|
2742
|
+
rowIndex: C == null ? void 0 : C.$index,
|
|
2743
|
+
columnIndex: C == null ? void 0 : C.cellIndex,
|
|
2744
|
+
columnProp: (A = C.column) == null ? void 0 : A.property
|
|
2745
2745
|
});
|
|
2746
|
-
}, r2 = ({ row:
|
|
2747
|
-
w("cellChange", A, B,
|
|
2748
|
-
}, W8 = (
|
|
2746
|
+
}, r2 = ({ row: C, rowIndex: A }) => A % 2 === 0 ? "default-row" : "special-row", j8 = (C, A, B) => {
|
|
2747
|
+
w("cellChange", A, B, C);
|
|
2748
|
+
}, W8 = (C) => C == null ? void 0 : C.toLocaleString("zh-CN", {
|
|
2749
2749
|
minimumFractionDigits: 2,
|
|
2750
2750
|
maximumFractionDigits: 2
|
|
2751
|
-
}), U8 = (
|
|
2752
|
-
const { columns: A, data: B } =
|
|
2751
|
+
}), U8 = (C) => {
|
|
2752
|
+
const { columns: A, data: B } = C, K = [];
|
|
2753
2753
|
return A.forEach((c0, f0) => {
|
|
2754
2754
|
var t0, d0;
|
|
2755
2755
|
if (f0 === 0) {
|
|
@@ -2774,18 +2774,18 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2774
2774
|
};
|
|
2775
2775
|
s2(
|
|
2776
2776
|
() => t == null ? void 0 : t.isClearSelection,
|
|
2777
|
-
async (
|
|
2777
|
+
async (C) => {
|
|
2778
2778
|
var A;
|
|
2779
|
-
|
|
2779
|
+
C && (await M2(), (A = p.value) == null || A.clearSelection());
|
|
2780
2780
|
},
|
|
2781
2781
|
{ immediate: !0 }
|
|
2782
2782
|
);
|
|
2783
2783
|
const Mt = i0(() => {
|
|
2784
2784
|
var A, B;
|
|
2785
|
-
const
|
|
2786
|
-
return
|
|
2785
|
+
const C = (A = d.value) == null ? void 0 : A.find((K) => K == null ? void 0 : K.isMainKey);
|
|
2786
|
+
return C || ((B = d.value) == null ? void 0 : B[0]);
|
|
2787
2787
|
});
|
|
2788
|
-
return (
|
|
2788
|
+
return (C, A) => {
|
|
2789
2789
|
var Q, Y, t0, d0, o0;
|
|
2790
2790
|
const B = X("el-table-column"), K = X("svg-icon"), c0 = X("el-table"), f0 = X("el-pagination");
|
|
2791
2791
|
return _(), E("div", {
|
|
@@ -2794,19 +2794,19 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2794
2794
|
ref: m
|
|
2795
2795
|
}, [
|
|
2796
2796
|
J(Wf, {
|
|
2797
|
-
buttons:
|
|
2797
|
+
buttons: O.value,
|
|
2798
2798
|
onButtonClick: G0,
|
|
2799
2799
|
columns: d.value
|
|
2800
2800
|
}, {
|
|
2801
2801
|
headerButton: L(() => [
|
|
2802
|
-
m0(
|
|
2803
|
-
buttons:
|
|
2802
|
+
m0(C.$slots, "headerButton", {
|
|
2803
|
+
buttons: O.value,
|
|
2804
2804
|
columns: d.value
|
|
2805
2805
|
}, void 0, !0)
|
|
2806
2806
|
]),
|
|
2807
2807
|
_: 3
|
|
2808
2808
|
}, 8, ["buttons", "columns"]),
|
|
2809
|
-
m0(
|
|
2809
|
+
m0(C.$slots, "viewport", { id: "excludeElementId" }, void 0, !0),
|
|
2810
2810
|
n.isCardViewport ? (_(), E("div", op, [
|
|
2811
2811
|
(_(!0), E(y0, null, k0(u.value, (R) => (_(), j(Xf, {
|
|
2812
2812
|
key: R == null ? void 0 : R.id,
|
|
@@ -2904,7 +2904,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2904
2904
|
((R = n.columns) == null ? void 0 : R.length) > 0 && n.allowSelect ? (_(), j(B, {
|
|
2905
2905
|
key: 0,
|
|
2906
2906
|
type: "selection",
|
|
2907
|
-
width: (g0 = n.columns) != null && g0.some((
|
|
2907
|
+
width: (g0 = n.columns) != null && g0.some((M) => M == null ? void 0 : M.showSummary) ? 55 : 38,
|
|
2908
2908
|
fixed: ""
|
|
2909
2909
|
}, null, 8, ["width"])) : s0("", !0),
|
|
2910
2910
|
J(B, {
|
|
@@ -2912,19 +2912,19 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2912
2912
|
"min-width": 12,
|
|
2913
2913
|
fixed: ""
|
|
2914
2914
|
}, {
|
|
2915
|
-
default: L(({ row:
|
|
2915
|
+
default: L(({ row: M, column: f2, $index: N0 }) => [
|
|
2916
2916
|
gt(l0("span", Zf, [
|
|
2917
2917
|
J(K, {
|
|
2918
2918
|
name: "drag",
|
|
2919
2919
|
style: { width: "15px", height: "15px", cursor: "move" }
|
|
2920
2920
|
})
|
|
2921
2921
|
], 512), [
|
|
2922
|
-
[Yt, (
|
|
2922
|
+
[Yt, (M == null ? void 0 : M.id) === D.value]
|
|
2923
2923
|
])
|
|
2924
2924
|
]),
|
|
2925
2925
|
_: 1
|
|
2926
2926
|
}),
|
|
2927
|
-
n.showIndex && !((r0 = n.tableData) != null && r0.some((
|
|
2927
|
+
n.showIndex && !((r0 = n.tableData) != null && r0.some((M) => M == null ? void 0 : M.children)) && ((O0 = n.columns) == null ? void 0 : O0.length) > 0 ? (_(), j(B, {
|
|
2928
2928
|
key: 1,
|
|
2929
2929
|
type: "index",
|
|
2930
2930
|
label: "序号",
|
|
@@ -2932,12 +2932,12 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2932
2932
|
}, $2({ _: 2 }, [
|
|
2933
2933
|
n.isEditViewport ? {
|
|
2934
2934
|
name: "default",
|
|
2935
|
-
fn: L(({ row:
|
|
2935
|
+
fn: L(({ row: M, column: f2, $index: N0 }) => {
|
|
2936
2936
|
var n0, C0;
|
|
2937
2937
|
return [
|
|
2938
|
-
N0 === ((n0 = u.value) == null ? void 0 : n0.length) - 1 && ((C0 = n.cacheExtraButtons) != null && C0.some((q0) => (q0 == null ? void 0 : q0.label) === "新增")) ? m0(
|
|
2938
|
+
N0 === ((n0 = u.value) == null ? void 0 : n0.length) - 1 && ((C0 = n.cacheExtraButtons) != null && C0.some((q0) => (q0 == null ? void 0 : q0.label) === "新增")) ? m0(C.$slots, "rowCreate", {
|
|
2939
2939
|
key: 0,
|
|
2940
|
-
row:
|
|
2940
|
+
row: M,
|
|
2941
2941
|
index: N0 + 1
|
|
2942
2942
|
}, void 0, !0) : s0("", !0)
|
|
2943
2943
|
];
|
|
@@ -2945,7 +2945,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2945
2945
|
key: "0"
|
|
2946
2946
|
} : void 0
|
|
2947
2947
|
]), 1024)) : s0("", !0),
|
|
2948
|
-
(L0 = n.tableData) != null && L0.some((
|
|
2948
|
+
(L0 = n.tableData) != null && L0.some((M) => M == null ? void 0 : M.children) && ((P2 = n.columns) == null ? void 0 : P2.length) > 0 ? (_(), j(B, {
|
|
2949
2949
|
key: 2,
|
|
2950
2950
|
type: "default",
|
|
2951
2951
|
"min-width": 15,
|
|
@@ -2953,12 +2953,12 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2953
2953
|
}, $2({ _: 2 }, [
|
|
2954
2954
|
n.isEditViewport ? {
|
|
2955
2955
|
name: "default",
|
|
2956
|
-
fn: L(({ row:
|
|
2956
|
+
fn: L(({ row: M, column: f2, $index: N0 }) => {
|
|
2957
2957
|
var n0, C0;
|
|
2958
2958
|
return [
|
|
2959
|
-
N0 === ((n0 = u.value) == null ? void 0 : n0.length) - 1 && ((C0 = n.cacheExtraButtons) != null && C0.some((q0) => (q0 == null ? void 0 : q0.label) === "新增")) ? m0(
|
|
2959
|
+
N0 === ((n0 = u.value) == null ? void 0 : n0.length) - 1 && ((C0 = n.cacheExtraButtons) != null && C0.some((q0) => (q0 == null ? void 0 : q0.label) === "新增")) ? m0(C.$slots, "rowCreate", {
|
|
2960
2960
|
key: 0,
|
|
2961
|
-
row:
|
|
2961
|
+
row: M,
|
|
2962
2962
|
index: N0 + 1
|
|
2963
2963
|
}, void 0, !0) : s0("", !0)
|
|
2964
2964
|
];
|
|
@@ -2966,57 +2966,57 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
2966
2966
|
key: "0"
|
|
2967
2967
|
} : void 0
|
|
2968
2968
|
]), 1024)) : s0("", !0),
|
|
2969
|
-
(_(!0), E(y0, null, k0(d.value, (
|
|
2969
|
+
(_(!0), E(y0, null, k0(d.value, (M, f2) => {
|
|
2970
2970
|
var N0;
|
|
2971
2971
|
return _(), E(y0, null, [
|
|
2972
|
-
(N0 = n.checkedColumns) != null && N0.includes(
|
|
2972
|
+
(N0 = n.checkedColumns) != null && N0.includes(M == null ? void 0 : M.label) ? (_(), j(qf, {
|
|
2973
2973
|
key: 0,
|
|
2974
2974
|
tableData: u.value,
|
|
2975
|
-
column:
|
|
2975
|
+
column: M,
|
|
2976
2976
|
isEditViewport: n.isEditViewport,
|
|
2977
2977
|
onHandleColEditChange: b,
|
|
2978
2978
|
onHandleColTypeChange: P
|
|
2979
2979
|
}, {
|
|
2980
2980
|
operateHeader: L(() => [
|
|
2981
|
-
(
|
|
2981
|
+
(M == null ? void 0 : M.label) === "操作" ? m0(C.$slots, "operateCol", { key: 0 }, void 0, !0) : s0("", !0)
|
|
2982
2982
|
]),
|
|
2983
2983
|
content: L(({ row: n0, item: C0, slotData: q0, scope: Q3, column: Xe, columnProp: F8 }) => {
|
|
2984
2984
|
var gi, mi, vi;
|
|
2985
2985
|
return [
|
|
2986
|
-
((
|
|
2986
|
+
((M == null ? void 0 : M.type) ?? "text") === "text" && ((n0 == null ? void 0 : n0.tableEditType) ?? "text") === "text" ? (_(), E("span", {
|
|
2987
2987
|
key: 0,
|
|
2988
2988
|
class: "table-content",
|
|
2989
|
-
style: t2({ cursor:
|
|
2989
|
+
style: t2({ cursor: M != null && M.isMainKey ? "pointer" : "default", color: M != null && M.isExistChild && !(M != null && M.directiveColor) ? "var(--vertical-menuitem-active-bg)" : "", textDecoration: M != null && M.isExistChild && !(M != null && M.directiveColor) ? "underline" : "" }),
|
|
2990
2990
|
onClick: (e2) => {
|
|
2991
2991
|
var wi;
|
|
2992
|
-
return A0(n0 != null && n0[
|
|
2993
|
-
data: W(n0,
|
|
2994
|
-
isMainKey:
|
|
2992
|
+
return A0(n0 != null && n0[M == null ? void 0 : M.prop] ? n0 == null ? void 0 : n0[M == null ? void 0 : M.prop] : (n0 == null ? void 0 : n0[C0 == null ? void 0 : C0.prop]) ?? (q0 == null ? void 0 : q0[C0 == null ? void 0 : C0.prop]) ?? (n0 == null ? void 0 : n0[(wi = C0 == null ? void 0 : C0.child) == null ? void 0 : wi.prop]), C0 == null ? void 0 : C0.prop, n0 ?? q0, {
|
|
2993
|
+
data: W(n0, M, C0, q0).value,
|
|
2994
|
+
isMainKey: M == null ? void 0 : M.isMainKey
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
2997
|
}, [
|
|
2998
|
-
|
|
2999
|
-
((gi = n.columns) == null ? void 0 : gi.findIndex((e2) => (e2 == null ? void 0 : e2.prop) === (
|
|
3000
|
-
m0(
|
|
2998
|
+
C.$slots.content ? (_(), E(y0, { key: 0 }, [
|
|
2999
|
+
((gi = n.columns) == null ? void 0 : gi.findIndex((e2) => (e2 == null ? void 0 : e2.prop) === (M == null ? void 0 : M.prop))) >= ((n0 == null ? void 0 : n0.level) ?? -1) ? (_(), E("div", tp, [
|
|
3000
|
+
m0(C.$slots, "content", {
|
|
3001
3001
|
row: n0,
|
|
3002
|
-
column: F8 ??
|
|
3002
|
+
column: F8 ?? M,
|
|
3003
3003
|
colIndex: f2,
|
|
3004
3004
|
item: C0,
|
|
3005
3005
|
slotData: q0
|
|
3006
3006
|
}, void 0, !0)
|
|
3007
3007
|
])) : s0("", !0)
|
|
3008
|
-
], 64)) : ((mi = n.columns) == null ? void 0 : mi.findIndex((e2) => (e2 == null ? void 0 : e2.prop) === (
|
|
3009
|
-
R2($0(W(n0,
|
|
3008
|
+
], 64)) : ((mi = n.columns) == null ? void 0 : mi.findIndex((e2) => (e2 == null ? void 0 : e2.prop) === (M == null ? void 0 : M.prop))) >= ((n0 == null ? void 0 : n0.level) ?? -1) ? (_(), E(y0, { key: 1 }, [
|
|
3009
|
+
R2($0(W(n0, M, C0, q0)), 1)
|
|
3010
3010
|
], 64)) : s0("", !0)
|
|
3011
3011
|
], 12, ep)) : s0("", !0),
|
|
3012
|
-
((
|
|
3012
|
+
((M == null ? void 0 : M.type) ?? "text") === "operate" && !(M != null && M.isExistChild) ? (_(), E("span", {
|
|
3013
3013
|
key: 1,
|
|
3014
3014
|
class: "table-operate",
|
|
3015
3015
|
style: t2({
|
|
3016
|
-
justifyContent: n.isShowEdit && n.isShowDelete ? "space-between" :
|
|
3016
|
+
justifyContent: n.isShowEdit && n.isShowDelete ? "space-between" : M == null ? void 0 : M.align
|
|
3017
3017
|
})
|
|
3018
3018
|
}, [
|
|
3019
|
-
m0(
|
|
3019
|
+
m0(C.$slots, "actions", { item: n0 }, void 0, !0),
|
|
3020
3020
|
n.isShowEdit ? (_(), E("span", {
|
|
3021
3021
|
key: 0,
|
|
3022
3022
|
onClick: (e2) => j0(n0),
|
|
@@ -3028,15 +3028,15 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
3028
3028
|
class: "red-table-operate table-operate-content"
|
|
3029
3029
|
}, "删除", 8, np)) : s0("", !0)
|
|
3030
3030
|
], 4)) : s0("", !0),
|
|
3031
|
-
((
|
|
3032
|
-
(_(), j(Kt(w0(n0 != null && n0[
|
|
3031
|
+
((M == null ? void 0 : M.type) ?? "text") === "edit" && ((n0 == null ? void 0 : n0.tableEditType) ?? "text") !== "edit" || ((M == null ? void 0 : M.type) ?? "text") === "text" && ((n0 == null ? void 0 : n0.tableEditType) ?? "text") === "edit" && !(M != null && M.isExistChild) ? (_(), E("span", sp, [
|
|
3032
|
+
(_(), j(Kt(w0(n0 != null && n0[M == null ? void 0 : M.prop] && Array.isArray(n0[M.prop]) && ((vi = n0[M.prop]) != null && vi.every((e2) => typeof e2 == "Object")) ? "Upload" : (M == null ? void 0 : M.columnType) === "" || !(M != null && M.columnType) ? "Input" : M == null ? void 0 : M.columnType)), {
|
|
3033
3033
|
modelValue: n0[Xe == null ? void 0 : Xe.property],
|
|
3034
3034
|
"onUpdate:modelValue": (e2) => n0[Xe == null ? void 0 : Xe.property] = e2,
|
|
3035
3035
|
style: { height: "100%" },
|
|
3036
|
-
content: (
|
|
3037
|
-
optionUrl:
|
|
3036
|
+
content: (M == null ? void 0 : M.contents) ?? [],
|
|
3037
|
+
optionUrl: M == null ? void 0 : M.optionUrl,
|
|
3038
3038
|
onFocus: (e2) => Ee(Q3),
|
|
3039
|
-
onChange: (e2) => j8(e2, n0,
|
|
3039
|
+
onChange: (e2) => j8(e2, n0, M)
|
|
3040
3040
|
}, null, 40, ["modelValue", "onUpdate:modelValue", "content", "optionUrl", "onFocus", "onChange"]))
|
|
3041
3041
|
])) : s0("", !0)
|
|
3042
3042
|
];
|
|
@@ -3050,7 +3050,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
3050
3050
|
_: 3
|
|
3051
3051
|
}, 8, ["data", "show-summary", "sum-text", "default-sort"])),
|
|
3052
3052
|
l0("div", dp, [
|
|
3053
|
-
n.isCardViewport ? s0("", !0) : m0(
|
|
3053
|
+
n.isCardViewport ? s0("", !0) : m0(C.$slots, "batchButton", {
|
|
3054
3054
|
key: 0,
|
|
3055
3055
|
buttons: H.value,
|
|
3056
3056
|
columns: d.value
|
|
@@ -3309,22 +3309,24 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
3309
3309
|
default: !1
|
|
3310
3310
|
}
|
|
3311
3311
|
},
|
|
3312
|
-
emits: ["clickMenu", "openMenu", "closeMenu"],
|
|
3312
|
+
emits: ["clickMenu", "openMenu", "closeMenu", "selectMenu"],
|
|
3313
3313
|
setup(n, { emit: e }) {
|
|
3314
|
-
const t = T4(rt), { activeMenuPath: i, activeMenuOpenPaths: s, activeTopMenuPath: o } = vt(t), l = M4(rt), { routeToChildPath: r } = vt(l), a = n, h = e, c = (
|
|
3315
|
-
h("clickMenu",
|
|
3316
|
-
}, d = (
|
|
3317
|
-
h("openMenu",
|
|
3318
|
-
}, u = (
|
|
3319
|
-
h("
|
|
3320
|
-
}, f =
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3314
|
+
const t = T4(rt), { activeMenuPath: i, activeMenuOpenPaths: s, activeTopMenuPath: o } = vt(t), l = M4(rt), { routeToChildPath: r } = vt(l), a = n, h = e, c = (v) => {
|
|
3315
|
+
h("clickMenu", v);
|
|
3316
|
+
}, d = (v) => {
|
|
3317
|
+
h("openMenu", v);
|
|
3318
|
+
}, u = (v) => {
|
|
3319
|
+
h("selectMenu", v);
|
|
3320
|
+
}, f = (v) => {
|
|
3321
|
+
h("closeMenu", v);
|
|
3322
|
+
}, p = i0(() => r.value ? (a == null ? void 0 : a.mode) === "vertical" ? r.value : o.value : (a == null ? void 0 : a.mode) === "vertical" ? i.value : o.value), m = i0(() => s.value);
|
|
3323
|
+
return (v, w) => {
|
|
3324
|
+
const y = X("el-sub-menu"), k = X("el-menu-item"), z = X("el-menu");
|
|
3325
|
+
return _(), j(z, {
|
|
3324
3326
|
class: "menu-wrap",
|
|
3325
3327
|
mode: n.mode,
|
|
3326
|
-
"default-active":
|
|
3327
|
-
openeds:
|
|
3328
|
+
"default-active": p.value,
|
|
3329
|
+
openeds: m.value,
|
|
3328
3330
|
"unique-opened": n.uniqueOpened,
|
|
3329
3331
|
"collapse-transition": !1,
|
|
3330
3332
|
"popper-class": "ss-menu-popper",
|
|
@@ -3332,48 +3334,49 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
3332
3334
|
ellipsis: !0,
|
|
3333
3335
|
collapse: n.isCollapse,
|
|
3334
3336
|
onOpen: d,
|
|
3335
|
-
onClose:
|
|
3337
|
+
onClose: f,
|
|
3338
|
+
onSelect: u
|
|
3336
3339
|
}, {
|
|
3337
3340
|
default: L(() => [
|
|
3338
|
-
(_(!0), E(y0, null, k0(n.menuList, (
|
|
3339
|
-
|
|
3340
|
-
index:
|
|
3341
|
-
key:
|
|
3342
|
-
style: t2(
|
|
3341
|
+
(_(!0), E(y0, null, k0(n.menuList, (S) => (_(), E(y0, null, [
|
|
3342
|
+
S.show && S.children && S.children.length > 0 ? (_(), j(y, {
|
|
3343
|
+
index: S.path,
|
|
3344
|
+
key: S.path,
|
|
3345
|
+
style: t2(S.style)
|
|
3343
3346
|
}, {
|
|
3344
3347
|
title: L(() => [
|
|
3345
3348
|
J(mt, {
|
|
3346
|
-
name:
|
|
3349
|
+
name: S.icon ?? ((S == null ? void 0 : S.level) <= 2 ? "default" : ""),
|
|
3347
3350
|
class: "menu-icon"
|
|
3348
3351
|
}, null, 8, ["name"]),
|
|
3349
|
-
m0(
|
|
3352
|
+
m0(v.$slots, "title", { menu: S }, void 0, !0)
|
|
3350
3353
|
]),
|
|
3351
3354
|
default: L(() => [
|
|
3352
3355
|
J(wp, {
|
|
3353
|
-
menuList:
|
|
3356
|
+
menuList: S.children,
|
|
3354
3357
|
onClickMenu: c
|
|
3355
3358
|
}, $2({ _: 2 }, [
|
|
3356
|
-
k0(
|
|
3357
|
-
name:
|
|
3358
|
-
fn: L((
|
|
3359
|
-
m0(
|
|
3359
|
+
k0(v.$slots, (x, b) => ({
|
|
3360
|
+
name: b,
|
|
3361
|
+
fn: L((P) => [
|
|
3362
|
+
m0(v.$slots, b, p1({ ref_for: !0 }, P), void 0, !0)
|
|
3360
3363
|
])
|
|
3361
3364
|
}))
|
|
3362
3365
|
]), 1032, ["menuList"])
|
|
3363
3366
|
]),
|
|
3364
3367
|
_: 2
|
|
3365
|
-
}, 1032, ["index", "style"])) :
|
|
3366
|
-
index:
|
|
3367
|
-
key:
|
|
3368
|
-
style: t2(
|
|
3369
|
-
onClick: (
|
|
3368
|
+
}, 1032, ["index", "style"])) : S.show ? (_(), j(k, {
|
|
3369
|
+
index: S.path,
|
|
3370
|
+
key: S.path,
|
|
3371
|
+
style: t2(S.style),
|
|
3372
|
+
onClick: (x) => c(S)
|
|
3370
3373
|
}, {
|
|
3371
3374
|
title: L(() => [
|
|
3372
|
-
m0(
|
|
3375
|
+
m0(v.$slots, "title", { menu: S }, void 0, !0)
|
|
3373
3376
|
]),
|
|
3374
3377
|
default: L(() => [
|
|
3375
3378
|
J(mt, {
|
|
3376
|
-
name:
|
|
3379
|
+
name: S.icon ?? ((S == null ? void 0 : S.level) <= 2 ? "default" : ""),
|
|
3377
3380
|
class: "menu-icon"
|
|
3378
3381
|
}, null, 8, ["name"])
|
|
3379
3382
|
]),
|
|
@@ -3385,7 +3388,7 @@ const Rf = /* @__PURE__ */ P0(Gf, [["render", Nf]]), $f = { class: "extra-button
|
|
|
3385
3388
|
}, 8, ["mode", "default-active", "openeds", "unique-opened", "collapse"]);
|
|
3386
3389
|
};
|
|
3387
3390
|
}
|
|
3388
|
-
}), Rs = /* @__PURE__ */ P0(xp, [["__scopeId", "data-v-
|
|
3391
|
+
}), Rs = /* @__PURE__ */ P0(xp, [["__scopeId", "data-v-cce7242d"]]), GS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3389
3392
|
__proto__: null,
|
|
3390
3393
|
default: Rs
|
|
3391
3394
|
}, Symbol.toStringTag, { value: "Module" })), bp = {
|
|
@@ -4654,9 +4657,9 @@ class Ne {
|
|
|
4654
4657
|
*/
|
|
4655
4658
|
extend(e, t = e) {
|
|
4656
4659
|
if (e <= this.anchor && t >= this.anchor)
|
|
4657
|
-
return
|
|
4660
|
+
return T.range(e, t);
|
|
4658
4661
|
let i = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t;
|
|
4659
|
-
return
|
|
4662
|
+
return T.range(this.anchor, i);
|
|
4660
4663
|
}
|
|
4661
4664
|
/**
|
|
4662
4665
|
Compare this range to another range.
|
|
@@ -4677,7 +4680,7 @@ class Ne {
|
|
|
4677
4680
|
static fromJSON(e) {
|
|
4678
4681
|
if (!e || typeof e.anchor != "number" || typeof e.head != "number")
|
|
4679
4682
|
throw new RangeError("Invalid JSON representation for SelectionRange");
|
|
4680
|
-
return
|
|
4683
|
+
return T.range(e.anchor, e.head);
|
|
4681
4684
|
}
|
|
4682
4685
|
/**
|
|
4683
4686
|
@internal
|
|
@@ -4686,7 +4689,7 @@ class Ne {
|
|
|
4686
4689
|
return new Ne(e, t, i);
|
|
4687
4690
|
}
|
|
4688
4691
|
}
|
|
4689
|
-
class
|
|
4692
|
+
class T {
|
|
4690
4693
|
constructor(e, t) {
|
|
4691
4694
|
this.ranges = e, this.mainIndex = t;
|
|
4692
4695
|
}
|
|
@@ -4695,7 +4698,7 @@ class z {
|
|
|
4695
4698
|
position for changes.
|
|
4696
4699
|
*/
|
|
4697
4700
|
map(e, t = -1) {
|
|
4698
|
-
return e.empty ? this :
|
|
4701
|
+
return e.empty ? this : T.create(this.ranges.map((i) => i.map(e, t)), this.mainIndex);
|
|
4699
4702
|
}
|
|
4700
4703
|
/**
|
|
4701
4704
|
Compare this selection to another selection. By default, ranges
|
|
@@ -4724,13 +4727,13 @@ class z {
|
|
|
4724
4727
|
holding only the main range from this selection.
|
|
4725
4728
|
*/
|
|
4726
4729
|
asSingle() {
|
|
4727
|
-
return this.ranges.length == 1 ? this : new
|
|
4730
|
+
return this.ranges.length == 1 ? this : new T([this.main], 0);
|
|
4728
4731
|
}
|
|
4729
4732
|
/**
|
|
4730
4733
|
Extend this selection with an extra range.
|
|
4731
4734
|
*/
|
|
4732
4735
|
addRange(e, t = !0) {
|
|
4733
|
-
return
|
|
4736
|
+
return T.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1);
|
|
4734
4737
|
}
|
|
4735
4738
|
/**
|
|
4736
4739
|
Replace a given range with another range, and then normalize the
|
|
@@ -4738,7 +4741,7 @@ class z {
|
|
|
4738
4741
|
*/
|
|
4739
4742
|
replaceRange(e, t = this.mainIndex) {
|
|
4740
4743
|
let i = this.ranges.slice();
|
|
4741
|
-
return i[t] = e,
|
|
4744
|
+
return i[t] = e, T.create(i, this.mainIndex);
|
|
4742
4745
|
}
|
|
4743
4746
|
/**
|
|
4744
4747
|
Convert this selection to an object that can be serialized to
|
|
@@ -4753,13 +4756,13 @@ class z {
|
|
|
4753
4756
|
static fromJSON(e) {
|
|
4754
4757
|
if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
|
|
4755
4758
|
throw new RangeError("Invalid JSON representation for EditorSelection");
|
|
4756
|
-
return new
|
|
4759
|
+
return new T(e.ranges.map((t) => Ne.fromJSON(t)), e.main);
|
|
4757
4760
|
}
|
|
4758
4761
|
/**
|
|
4759
4762
|
Create a selection holding a single range.
|
|
4760
4763
|
*/
|
|
4761
4764
|
static single(e, t = e) {
|
|
4762
|
-
return new
|
|
4765
|
+
return new T([T.range(e, t)], 0);
|
|
4763
4766
|
}
|
|
4764
4767
|
/**
|
|
4765
4768
|
Sort and merge the given set of ranges, creating a valid
|
|
@@ -4771,10 +4774,10 @@ class z {
|
|
|
4771
4774
|
for (let i = 0, s = 0; s < e.length; s++) {
|
|
4772
4775
|
let o = e[s];
|
|
4773
4776
|
if (o.empty ? o.from <= i : o.from < i)
|
|
4774
|
-
return
|
|
4777
|
+
return T.normalized(e.slice(), t);
|
|
4775
4778
|
i = o.to;
|
|
4776
4779
|
}
|
|
4777
|
-
return new
|
|
4780
|
+
return new T(e, t);
|
|
4778
4781
|
}
|
|
4779
4782
|
/**
|
|
4780
4783
|
Create a cursor selection range at the given position. You can
|
|
@@ -4800,10 +4803,10 @@ class z {
|
|
|
4800
4803
|
let o = e[s], l = e[s - 1];
|
|
4801
4804
|
if (o.empty ? o.from <= l.to : o.from < l.to) {
|
|
4802
4805
|
let r = l.from, a = Math.max(o.to, l.to);
|
|
4803
|
-
s <= t && t--, e.splice(--s, 2, o.anchor > o.head ?
|
|
4806
|
+
s <= t && t--, e.splice(--s, 2, o.anchor > o.head ? T.range(a, r) : T.range(r, a));
|
|
4804
4807
|
}
|
|
4805
4808
|
}
|
|
4806
|
-
return new
|
|
4809
|
+
return new T(e, t);
|
|
4807
4810
|
}
|
|
4808
4811
|
}
|
|
4809
4812
|
function Ks(n, e) {
|
|
@@ -5351,7 +5354,7 @@ function L6(n, e, t) {
|
|
|
5351
5354
|
let i = e.selection, s = ct(e.annotations);
|
|
5352
5355
|
return e.userEvent && (s = s.concat(K0.userEvent.of(e.userEvent))), {
|
|
5353
5356
|
changes: e.changes instanceof Y0 ? e.changes : Y0.of(e.changes || [], t, n.facet(Js)),
|
|
5354
|
-
selection: i && (i instanceof
|
|
5357
|
+
selection: i && (i instanceof T ? i : T.single(i.anchor, i.head)),
|
|
5355
5358
|
effects: ct(e.effects),
|
|
5356
5359
|
annotations: s,
|
|
5357
5360
|
scrollIntoView: !!e.scrollIntoView
|
|
@@ -5491,7 +5494,7 @@ class b0 {
|
|
|
5491
5494
|
replaceSelection(e) {
|
|
5492
5495
|
return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({
|
|
5493
5496
|
changes: { from: t.from, to: t.to, insert: e },
|
|
5494
|
-
range:
|
|
5497
|
+
range: T.cursor(t.from + e.length)
|
|
5495
5498
|
}));
|
|
5496
5499
|
}
|
|
5497
5500
|
/**
|
|
@@ -5516,7 +5519,7 @@ class b0 {
|
|
|
5516
5519
|
}
|
|
5517
5520
|
return {
|
|
5518
5521
|
changes: s,
|
|
5519
|
-
selection:
|
|
5522
|
+
selection: T.create(o, t.mainIndex),
|
|
5520
5523
|
effects: l
|
|
5521
5524
|
};
|
|
5522
5525
|
}
|
|
@@ -5586,7 +5589,7 @@ class b0 {
|
|
|
5586
5589
|
}
|
|
5587
5590
|
return b0.create({
|
|
5588
5591
|
doc: e.doc,
|
|
5589
|
-
selection:
|
|
5592
|
+
selection: T.fromJSON(e.selection),
|
|
5590
5593
|
extensions: t.extensions ? s.concat([t.extensions]) : s
|
|
5591
5594
|
});
|
|
5592
5595
|
}
|
|
@@ -5596,7 +5599,7 @@ class b0 {
|
|
|
5596
5599
|
transactions.
|
|
5597
5600
|
*/
|
|
5598
5601
|
static create(e = {}) {
|
|
5599
|
-
let t = a3.resolve(e.extensions || [], /* @__PURE__ */ new Map()), i = e.doc instanceof S0 ? e.doc : S0.of((e.doc || "").split(t.staticFacet(b0.lineSeparator) || z6)), s = e.selection ? e.selection instanceof
|
|
5602
|
+
let t = a3.resolve(e.extensions || [], /* @__PURE__ */ new Map()), i = e.doc instanceof S0 ? e.doc : S0.of((e.doc || "").split(t.staticFacet(b0.lineSeparator) || z6)), s = e.selection ? e.selection instanceof T ? e.selection : T.single(e.selection.anchor, e.selection.head) : T.single(0);
|
|
5600
5603
|
return Ks(s, i.length), t.staticFacet(E6) || (s = s.asSingle()), new b0(t, i, s, t.dynamicSlots.map(() => null), (o, l) => l.create(o), null);
|
|
5601
5604
|
}
|
|
5602
5605
|
/**
|
|
@@ -5701,7 +5704,7 @@ class b0 {
|
|
|
5701
5704
|
break;
|
|
5702
5705
|
r = a;
|
|
5703
5706
|
}
|
|
5704
|
-
return l == r ? null :
|
|
5707
|
+
return l == r ? null : T.range(l + i, r + i);
|
|
5705
5708
|
}
|
|
5706
5709
|
}
|
|
5707
5710
|
b0.allowMultipleSelections = E6;
|
|
@@ -6622,28 +6625,28 @@ function cg(n, e, t, i, s, o, l, r) {
|
|
|
6622
6625
|
if (s == "nearest")
|
|
6623
6626
|
e.top < u.top ? (w = e.top - (u.top + l), t > 0 && e.bottom > u.bottom + w && (w = e.bottom - u.bottom + l)) : e.bottom > u.bottom && (w = e.bottom - u.bottom + l, t < 0 && e.top - w < u.top && (w = e.top - (u.top + l)));
|
|
6624
6627
|
else {
|
|
6625
|
-
let y = e.bottom - e.top,
|
|
6626
|
-
w = (s == "center" && y <=
|
|
6628
|
+
let y = e.bottom - e.top, k = u.bottom - u.top;
|
|
6629
|
+
w = (s == "center" && y <= k ? e.top + y / 2 - k / 2 : s == "start" || s == "center" && t < 0 ? e.top - l : e.bottom - k + l) - u.top;
|
|
6627
6630
|
}
|
|
6628
6631
|
if (i == "nearest" ? e.left < u.left ? (v = e.left - (u.left + o), t > 0 && e.right > u.right + v && (v = e.right - u.right + o)) : e.right > u.right && (v = e.right - u.right + o, t < 0 && e.left < u.left + v && (v = e.left - (u.left + o))) : v = (i == "center" ? e.left + (e.right - e.left) / 2 - (u.right - u.left) / 2 : i == "start" == r ? e.left - o : e.right - (u.right - u.left) + o) - u.left, v || w)
|
|
6629
6632
|
if (f)
|
|
6630
6633
|
h.scrollBy(v, w);
|
|
6631
6634
|
else {
|
|
6632
|
-
let y = 0,
|
|
6635
|
+
let y = 0, k = 0;
|
|
6633
6636
|
if (w) {
|
|
6634
|
-
let
|
|
6635
|
-
c.scrollTop += w / m,
|
|
6637
|
+
let z = c.scrollTop;
|
|
6638
|
+
c.scrollTop += w / m, k = (c.scrollTop - z) * m;
|
|
6636
6639
|
}
|
|
6637
6640
|
if (v) {
|
|
6638
|
-
let
|
|
6639
|
-
c.scrollLeft += v / p, y = (c.scrollLeft -
|
|
6641
|
+
let z = c.scrollLeft;
|
|
6642
|
+
c.scrollLeft += v / p, y = (c.scrollLeft - z) * p;
|
|
6640
6643
|
}
|
|
6641
6644
|
e = {
|
|
6642
6645
|
left: e.left - y,
|
|
6643
|
-
top: e.top -
|
|
6646
|
+
top: e.top - k,
|
|
6644
6647
|
right: e.right - y,
|
|
6645
|
-
bottom: e.bottom -
|
|
6646
|
-
}, y && Math.abs(y - v) < 1 && (i = "nearest"),
|
|
6648
|
+
bottom: e.bottom - k
|
|
6649
|
+
}, y && Math.abs(y - v) < 1 && (i = "nearest"), k && Math.abs(k - w) < 1 && (s = "nearest");
|
|
6647
6650
|
}
|
|
6648
6651
|
if (f)
|
|
6649
6652
|
break;
|
|
@@ -8085,7 +8088,7 @@ function Mg(n, e, t, i, s) {
|
|
|
8085
8088
|
let c = o2(n.text, l, a.forward(s, t));
|
|
8086
8089
|
(c < a.from || c > a.to) && (c = h), Mo = n.text.slice(Math.min(l, c), Math.max(l, c));
|
|
8087
8090
|
let d = r == (s ? e.length - 1 : 0) ? null : e[r + (s ? 1 : -1)];
|
|
8088
|
-
return d && c == h && d.level + (s ? 0 : 1) < a.level ?
|
|
8091
|
+
return d && c == h && d.level + (s ? 0 : 1) < a.level ? T.cursor(d.side(!s, t) + n.from, d.forward(s, t) ? 1 : -1, d.level) : T.cursor(c + n.from, a.forward(s, t) ? -1 : 1, a.level);
|
|
8089
8092
|
}
|
|
8090
8093
|
function Tg(n, e, t) {
|
|
8091
8094
|
for (let i = e; i < t; i++) {
|
|
@@ -8110,7 +8113,7 @@ class dt {
|
|
|
8110
8113
|
return e.empty ? this : new dt(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
|
|
8111
8114
|
}
|
|
8112
8115
|
clip(e) {
|
|
8113
|
-
return this.range.to <= e.doc.length ? this : new dt(
|
|
8116
|
+
return this.range.to <= e.doc.length ? this : new dt(T.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
|
|
8114
8117
|
}
|
|
8115
8118
|
}
|
|
8116
8119
|
const D1 = /* @__PURE__ */ p0.define({ map: (n, e) => n.map(e) }), Io = /* @__PURE__ */ p0.define();
|
|
@@ -8397,14 +8400,14 @@ class Yi extends z0 {
|
|
|
8397
8400
|
break;
|
|
8398
8401
|
let { fromA: a, toA: h, fromB: c, toB: d } = r, u, f, p, m;
|
|
8399
8402
|
if (i && i.range.fromB < d && i.range.toB > c) {
|
|
8400
|
-
let
|
|
8401
|
-
f =
|
|
8403
|
+
let z = Wt.build(this.view.state.doc, c, i.range.fromB, this.decorations, this.dynamicDecorationMap), S = Wt.build(this.view.state.doc, i.range.toB, d, this.decorations, this.dynamicDecorationMap);
|
|
8404
|
+
f = z.breakAtStart, p = z.openStart, m = S.openEnd;
|
|
8402
8405
|
let x = this.compositionView(i);
|
|
8403
|
-
|
|
8406
|
+
S.breakAtStart ? x.breakAfter = 1 : S.content.length && x.merge(x.length, x.length, S.content[0], !1, S.openStart, 0) && (x.breakAfter = S.content[0].breakAfter, S.content.shift()), z.content.length && x.merge(0, 0, z.content[z.content.length - 1], !0, 0, z.openEnd) && z.content.pop(), u = z.content.concat(x).concat(S.content);
|
|
8404
8407
|
} else
|
|
8405
8408
|
({ content: u, breakAtStart: f, openStart: p, openEnd: m } = Wt.build(this.view.state.doc, c, d, this.decorations, this.dynamicDecorationMap));
|
|
8406
|
-
let { i: v, off: w } = o.findPos(h, 1), { i: y, off:
|
|
8407
|
-
mo(this, y,
|
|
8409
|
+
let { i: v, off: w } = o.findPos(h, 1), { i: y, off: k } = o.findPos(a, -1);
|
|
8410
|
+
mo(this, y, k, v, w, u, f, p, m);
|
|
8408
8411
|
}
|
|
8409
8412
|
i && this.fixCompositionDOM(i);
|
|
8410
8413
|
}
|
|
@@ -8775,7 +8778,7 @@ function Hg(n, e) {
|
|
|
8775
8778
|
function Ig(n, e, t = 1) {
|
|
8776
8779
|
let i = n.charCategorizer(e), s = n.doc.lineAt(e), o = e - s.from;
|
|
8777
8780
|
if (s.length == 0)
|
|
8778
|
-
return
|
|
8781
|
+
return T.cursor(e);
|
|
8779
8782
|
o == 0 ? t = 1 : o == s.length && (t = -1);
|
|
8780
8783
|
let l = o, r = o;
|
|
8781
8784
|
t < 0 ? l = o2(s.text, o, !1) : r = o2(s.text, o);
|
|
@@ -8792,7 +8795,7 @@ function Ig(n, e, t = 1) {
|
|
|
8792
8795
|
break;
|
|
8793
8796
|
r = h;
|
|
8794
8797
|
}
|
|
8795
|
-
return
|
|
8798
|
+
return T.range(l + s.from, r + s.from);
|
|
8796
8799
|
}
|
|
8797
8800
|
function Gg(n, e) {
|
|
8798
8801
|
return e.left > n ? e.left - n : Math.max(0, n - e.right);
|
|
@@ -8816,10 +8819,10 @@ function t4(n, e, t) {
|
|
|
8816
8819
|
for (let v = 0; v < m.length; v++) {
|
|
8817
8820
|
let w = m[v];
|
|
8818
8821
|
s && n6(s, w) && (w = Ki(Xi(w, s.bottom), s.top));
|
|
8819
|
-
let y = Gg(e, w),
|
|
8820
|
-
if (y == 0 &&
|
|
8822
|
+
let y = Gg(e, w), k = Ng(t, w);
|
|
8823
|
+
if (y == 0 && k == 0)
|
|
8821
8824
|
return p.nodeType == 3 ? Qi(p, e, t) : t4(p, e, t);
|
|
8822
|
-
(!i || l >
|
|
8825
|
+
(!i || l > k || l == k && o > y) && (i = p, s = w, o = y, l = k, r = y ? e < w.left ? v > 0 : v < m.length - 1 : !0), y == 0 ? t > w.bottom && (!c || c.bottom < w.bottom) ? (a = p, c = w) : t < w.top && (!d || d.top > w.top) && (h = p, d = w) : c && n6(c, w) ? c = Xi(c, w.bottom) : d && n6(d, w) && (d = Ki(d, w.top));
|
|
8823
8826
|
}
|
|
8824
8827
|
}
|
|
8825
8828
|
if (c && c.bottom >= t ? (i = a, s = c) : d && d.top <= t && (i = h, s = d), !i)
|
|
@@ -8859,11 +8862,11 @@ function Wo(n, e, t, i = -1) {
|
|
|
8859
8862
|
return 0;
|
|
8860
8863
|
if (u > h)
|
|
8861
8864
|
return n.state.doc.length;
|
|
8862
|
-
for (let
|
|
8863
|
-
for (; u = i > 0 ? a.bottom +
|
|
8864
|
-
if (
|
|
8865
|
+
for (let z = n.viewState.heightOracle.textHeight / 2, S = !1; a = n.elementAtHeight(u), a.type != g2.Text; )
|
|
8866
|
+
for (; u = i > 0 ? a.bottom + z : a.top - z, !(u >= 0 && u <= h); ) {
|
|
8867
|
+
if (S)
|
|
8865
8868
|
return t ? null : 0;
|
|
8866
|
-
|
|
8869
|
+
S = !0, i = -i;
|
|
8867
8870
|
}
|
|
8868
8871
|
d = r + u;
|
|
8869
8872
|
let f = a.from;
|
|
@@ -8876,28 +8879,28 @@ function Wo(n, e, t, i = -1) {
|
|
|
8876
8879
|
let w, y = -1;
|
|
8877
8880
|
if (v && ((s = n.docView.nearest(v)) === null || s === void 0 ? void 0 : s.isEditable) != !1) {
|
|
8878
8881
|
if (p.caretPositionFromPoint) {
|
|
8879
|
-
let
|
|
8880
|
-
|
|
8882
|
+
let z = p.caretPositionFromPoint(c, d);
|
|
8883
|
+
z && ({ offsetNode: w, offset: y } = z);
|
|
8881
8884
|
} else if (p.caretRangeFromPoint) {
|
|
8882
|
-
let
|
|
8883
|
-
|
|
8885
|
+
let z = p.caretRangeFromPoint(c, d);
|
|
8886
|
+
z && ({ startContainer: w, startOffset: y } = z, (!n.contentDOM.contains(w) || U.safari && Rg(w, y, c) || U.chrome && $g(w, y, c)) && (w = void 0));
|
|
8884
8887
|
}
|
|
8885
8888
|
w && (y = Math.min(ie(w), y));
|
|
8886
8889
|
}
|
|
8887
8890
|
if (!w || !n.docView.dom.contains(w)) {
|
|
8888
|
-
let
|
|
8889
|
-
if (!
|
|
8891
|
+
let z = W0.find(n.docView, f);
|
|
8892
|
+
if (!z)
|
|
8890
8893
|
return u > a.top + a.height / 2 ? a.to : a.from;
|
|
8891
|
-
({ node: w, offset: y } = t4(
|
|
8894
|
+
({ node: w, offset: y } = t4(z.dom, c, d));
|
|
8892
8895
|
}
|
|
8893
|
-
let
|
|
8894
|
-
if (!
|
|
8896
|
+
let k = n.docView.nearest(w);
|
|
8897
|
+
if (!k)
|
|
8895
8898
|
return null;
|
|
8896
|
-
if (
|
|
8897
|
-
let
|
|
8898
|
-
return e.y <
|
|
8899
|
+
if (k.isWidget && ((o = k.dom) === null || o === void 0 ? void 0 : o.nodeType) == 1) {
|
|
8900
|
+
let z = k.dom.getBoundingClientRect();
|
|
8901
|
+
return e.y < z.top || e.y <= z.bottom && e.x <= (z.left + z.right) / 2 ? k.posAtStart : k.posAtEnd;
|
|
8899
8902
|
} else
|
|
8900
|
-
return
|
|
8903
|
+
return k.localPosFromDOM(w, y) + k.posAtStart;
|
|
8901
8904
|
}
|
|
8902
8905
|
function Ji(n, e, t, i, s) {
|
|
8903
8906
|
let o = Math.round((i - e.left) * n.defaultCharacterWidth);
|
|
@@ -8966,9 +8969,9 @@ function jg(n, e, t, i) {
|
|
|
8966
8969
|
y: (o.top + o.bottom) / 2
|
|
8967
8970
|
});
|
|
8968
8971
|
if (a != null)
|
|
8969
|
-
return
|
|
8972
|
+
return T.cursor(a, t ? -1 : 1);
|
|
8970
8973
|
}
|
|
8971
|
-
return
|
|
8974
|
+
return T.cursor(t ? s.to : s.from, t ? -1 : 1);
|
|
8972
8975
|
}
|
|
8973
8976
|
function Zi(n, e, t, i) {
|
|
8974
8977
|
let s = n.state.doc.lineAt(e.head), o = n.bidiSpans(s), l = n.textDirectionAt(s.from);
|
|
@@ -9001,7 +9004,7 @@ function Wg(n, e, t) {
|
|
|
9001
9004
|
function Ug(n, e, t, i) {
|
|
9002
9005
|
let s = e.head, o = t ? 1 : -1;
|
|
9003
9006
|
if (s == (t ? n.state.doc.length : 0))
|
|
9004
|
-
return
|
|
9007
|
+
return T.cursor(s, e.assoc);
|
|
9005
9008
|
let l = e.goalColumn, r, a = n.contentDOM.getBoundingClientRect(), h = n.coordsAtPos(s, e.assoc || -1), c = n.documentTop;
|
|
9006
9009
|
if (h)
|
|
9007
9010
|
l == null && (l = h.left - a.left), r = o < 0 ? h.top : h.bottom;
|
|
@@ -9014,7 +9017,7 @@ function Ug(n, e, t, i) {
|
|
|
9014
9017
|
let p = r + (u + f) * o, m = Wo(n, { x: d, y: p }, !1, o);
|
|
9015
9018
|
if (p < a.top || p > a.bottom || (o < 0 ? m < s : m > s)) {
|
|
9016
9019
|
let v = n.docView.coordsForChar(m), w = !v || p < v.top ? -1 : 1;
|
|
9017
|
-
return
|
|
9020
|
+
return T.cursor(m, w, void 0, l);
|
|
9018
9021
|
}
|
|
9019
9022
|
}
|
|
9020
9023
|
}
|
|
@@ -9034,7 +9037,7 @@ function J1(n, e, t) {
|
|
|
9034
9037
|
}
|
|
9035
9038
|
function s6(n, e, t) {
|
|
9036
9039
|
let i = J1(n.state.facet(N4).map((s) => s(n)), t.from, e.head > t.from ? -1 : 1);
|
|
9037
|
-
return i == t.from ? t :
|
|
9040
|
+
return i == t.from ? t : T.cursor(i, i < t.from ? 1 : -1);
|
|
9038
9041
|
}
|
|
9039
9042
|
const Ht = "";
|
|
9040
9043
|
class Fg {
|
|
@@ -9125,7 +9128,7 @@ class Yg {
|
|
|
9125
9128
|
let d = Math.min(a, h), u = Math.max(a, h), f = c.from - d, p = c.to - u;
|
|
9126
9129
|
(f == 0 || f == 1 || d == 0) && (p == 0 || p == -1 || u == e.state.doc.length) && (a = 0, h = e.state.doc.length);
|
|
9127
9130
|
}
|
|
9128
|
-
this.newSel =
|
|
9131
|
+
this.newSel = T.single(h, a);
|
|
9129
9132
|
}
|
|
9130
9133
|
}
|
|
9131
9134
|
}
|
|
@@ -9143,12 +9146,12 @@ function Uo(n, e) {
|
|
|
9143
9146
|
} else i && (!n.hasFocus && n.state.facet(le) || i.main.eq(s)) && (i = null);
|
|
9144
9147
|
if (!t && !i)
|
|
9145
9148
|
return !1;
|
|
9146
|
-
if (!t && e.typeOver && !s.empty && i && i.main.empty ? t = { from: s.from, to: s.to, insert: n.state.doc.slice(s.from, s.to) } : (U.mac || U.android) && t && t.from == t.to && t.from == s.head - 1 && /^\. ?$/.test(t.insert.toString()) && n.contentDOM.getAttribute("autocorrect") == "off" ? (i && t.insert.length == 2 && (i =
|
|
9149
|
+
if (!t && e.typeOver && !s.empty && i && i.main.empty ? t = { from: s.from, to: s.to, insert: n.state.doc.slice(s.from, s.to) } : (U.mac || U.android) && t && t.from == t.to && t.from == s.head - 1 && /^\. ?$/.test(t.insert.toString()) && n.contentDOM.getAttribute("autocorrect") == "off" ? (i && t.insert.length == 2 && (i = T.single(i.main.anchor - 1, i.main.head - 1)), t = { from: t.from, to: t.to, insert: S0.of([t.insert.toString().replace(".", " ")]) }) : t && t.from >= s.from && t.to <= s.to && (t.from != s.from || t.to != s.to) && s.to - s.from - (t.to - t.from) <= 4 ? t = {
|
|
9147
9150
|
from: s.from,
|
|
9148
9151
|
to: s.to,
|
|
9149
9152
|
insert: n.state.doc.slice(s.from, t.from).append(t.insert).append(n.state.doc.slice(t.to, s.to))
|
|
9150
9153
|
} : U.chrome && t && t.from == t.to && t.from == s.head && t.insert.toString() == `
|
|
9151
|
-
` && n.lineWrapping && (i && (i =
|
|
9154
|
+
` && n.lineWrapping && (i && (i = T.single(i.main.anchor - 1, i.main.head - 1)), t = { from: s.from, to: s.to, insert: S0.of([" "]) }), t)
|
|
9152
9155
|
return $4(n, t, i, o);
|
|
9153
9156
|
if (i && !i.main.eq(s)) {
|
|
9154
9157
|
let l = !1, r = "select";
|
|
@@ -9197,7 +9200,7 @@ function Kg(n, e, t) {
|
|
|
9197
9200
|
let w = s.changes({ from: v, to: m, insert: e.insert }), y = p.to - o.to;
|
|
9198
9201
|
return {
|
|
9199
9202
|
changes: w,
|
|
9200
|
-
range: a ?
|
|
9203
|
+
range: a ? T.range(Math.max(0, a.anchor + y), Math.max(0, a.head + y)) : p.map(w)
|
|
9201
9204
|
};
|
|
9202
9205
|
});
|
|
9203
9206
|
} else
|
|
@@ -9242,7 +9245,7 @@ function Jg(n, e) {
|
|
|
9242
9245
|
if (n.length == 0)
|
|
9243
9246
|
return null;
|
|
9244
9247
|
let t = n[0].pos, i = n.length == 2 ? n[1].pos : t;
|
|
9245
|
-
return t > -1 && i > -1 ?
|
|
9248
|
+
return t > -1 && i > -1 ? T.single(t + e, i + e) : null;
|
|
9246
9249
|
}
|
|
9247
9250
|
class Zg {
|
|
9248
9251
|
setSelectionOrigin(e) {
|
|
@@ -9391,14 +9394,14 @@ class nm {
|
|
|
9391
9394
|
let s = e.ranges[i], o = null;
|
|
9392
9395
|
if (s.empty) {
|
|
9393
9396
|
let l = J1(this.atoms, s.from, 0);
|
|
9394
|
-
l != s.from && (o =
|
|
9397
|
+
l != s.from && (o = T.cursor(l, -1));
|
|
9395
9398
|
} else {
|
|
9396
9399
|
let l = J1(this.atoms, s.from, -1), r = J1(this.atoms, s.to, 1);
|
|
9397
|
-
(l != s.from || r != s.to) && (o =
|
|
9400
|
+
(l != s.from || r != s.to) && (o = T.range(s.from == s.anchor ? l : r, s.from == s.head ? l : r));
|
|
9398
9401
|
}
|
|
9399
9402
|
o && (t || (t = e.ranges.slice()), t[i] = o);
|
|
9400
9403
|
}
|
|
9401
|
-
return t ?
|
|
9404
|
+
return t ? T.create(t, e.mainIndex) : e;
|
|
9402
9405
|
}
|
|
9403
9406
|
select(e) {
|
|
9404
9407
|
let { view: t } = this, i = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
|
|
@@ -9472,14 +9475,14 @@ function Ko(n, e) {
|
|
|
9472
9475
|
let d = t.toText((l ? o.line(s++).text : e) + t.lineBreak);
|
|
9473
9476
|
return {
|
|
9474
9477
|
changes: { from: c.from, insert: d },
|
|
9475
|
-
range:
|
|
9478
|
+
range: T.cursor(h.from + d.length)
|
|
9476
9479
|
};
|
|
9477
9480
|
});
|
|
9478
9481
|
} else l ? i = t.changeByRange((a) => {
|
|
9479
9482
|
let h = o.line(s++);
|
|
9480
9483
|
return {
|
|
9481
9484
|
changes: { from: a.from, to: a.to, insert: h.text },
|
|
9482
|
-
range:
|
|
9485
|
+
range: T.cursor(a.from + h.length)
|
|
9483
9486
|
};
|
|
9484
9487
|
}) : i = t.replaceSelection(o);
|
|
9485
9488
|
n.dispatch(i, {
|
|
@@ -9519,12 +9522,12 @@ W2.mousedown = (n, e) => {
|
|
|
9519
9522
|
};
|
|
9520
9523
|
function nn(n, e, t, i) {
|
|
9521
9524
|
if (i == 1)
|
|
9522
|
-
return
|
|
9525
|
+
return T.cursor(e, t);
|
|
9523
9526
|
if (i == 2)
|
|
9524
9527
|
return Ig(n.state, e, t);
|
|
9525
9528
|
{
|
|
9526
9529
|
let s = W0.find(n.docView, e), o = n.state.doc.lineAt(s ? s.posAtEnd : e), l = s ? s.posAtStart : o.from, r = s ? s.posAtEnd : o.to;
|
|
9527
|
-
return r < n.state.doc.length && r == o.to && r++,
|
|
9530
|
+
return r < n.state.doc.length && r == o.to && r++, T.range(l, r);
|
|
9528
9531
|
}
|
|
9529
9532
|
}
|
|
9530
9533
|
let sn = (n, e, t) => e >= t.top && e <= t.bottom && n >= t.left && n <= t.right;
|
|
@@ -9565,9 +9568,9 @@ function dm(n, e) {
|
|
|
9565
9568
|
let a = on(n, o), h, c = nn(n, a.pos, a.bias, i);
|
|
9566
9569
|
if (t.pos != a.pos && !l) {
|
|
9567
9570
|
let d = nn(n, t.pos, t.bias, i), u = Math.min(d.from, c.from), f = Math.max(d.to, c.to);
|
|
9568
|
-
c = u < c.from ?
|
|
9571
|
+
c = u < c.from ? T.range(u, f) : T.range(f, u);
|
|
9569
9572
|
}
|
|
9570
|
-
return l ? s.replaceRange(s.main.extend(c.from, c.to)) : r && i == 1 && s.ranges.length > 1 && (h = um(s, a.pos)) ? h : r ? s.addRange(c) :
|
|
9573
|
+
return l ? s.replaceRange(s.main.extend(c.from, c.to)) : r && i == 1 && s.ranges.length > 1 && (h = um(s, a.pos)) ? h : r ? s.addRange(c) : T.create([c]);
|
|
9571
9574
|
}
|
|
9572
9575
|
};
|
|
9573
9576
|
}
|
|
@@ -9575,7 +9578,7 @@ function um(n, e) {
|
|
|
9575
9578
|
for (let t = 0; t < n.ranges.length; t++) {
|
|
9576
9579
|
let { from: i, to: s } = n.ranges[t];
|
|
9577
9580
|
if (i <= e && s >= e)
|
|
9578
|
-
return
|
|
9581
|
+
return T.create(n.ranges.slice(0, t).concat(n.ranges.slice(t + 1)), n.mainIndex == t ? 0 : n.mainIndex - (n.mainIndex > t ? 1 : 0));
|
|
9579
9582
|
}
|
|
9580
9583
|
return null;
|
|
9581
9584
|
}
|
|
@@ -9585,7 +9588,7 @@ W2.dragstart = (n, e) => {
|
|
|
9585
9588
|
let s = n.docView.nearest(e.target);
|
|
9586
9589
|
if (s && s.isWidget) {
|
|
9587
9590
|
let o = s.posAtStart, l = o + s.length;
|
|
9588
|
-
(o >= t.to || l <= t.from) && (t =
|
|
9591
|
+
(o >= t.to || l <= t.from) && (t = T.range(o, l));
|
|
9589
9592
|
}
|
|
9590
9593
|
}
|
|
9591
9594
|
let { inputState: i } = n;
|
|
@@ -10299,8 +10302,8 @@ class pn {
|
|
|
10299
10302
|
this.contentDOMHeight = r.height, this.mustMeasureContent = !1;
|
|
10300
10303
|
let h = 0, c = 0;
|
|
10301
10304
|
if (r.width && r.height) {
|
|
10302
|
-
let { scaleX:
|
|
10303
|
-
(
|
|
10305
|
+
let { scaleX: z, scaleY: S } = ao(t, r);
|
|
10306
|
+
(z > 5e-3 && Math.abs(this.scaleX - z) > 5e-3 || S > 5e-3 && Math.abs(this.scaleY - S) > 5e-3) && (this.scaleX = z, this.scaleY = S, h |= 16, l = a = !0);
|
|
10304
10307
|
}
|
|
10305
10308
|
let d = (parseInt(i.paddingTop) || 0) * this.scaleY, u = (parseInt(i.paddingBottom) || 0) * this.scaleY;
|
|
10306
10309
|
(this.paddingTop != d || this.paddingBottom != u) && (this.paddingTop = d, this.paddingBottom = u, h |= 18), this.editorWidth != e.scrollDOM.clientWidth && (s.lineWrapping && (a = !0), this.editorWidth = e.scrollDOM.clientWidth, h |= 16);
|
|
@@ -10313,20 +10316,20 @@ class pn {
|
|
|
10313
10316
|
return 0;
|
|
10314
10317
|
let y = r.width;
|
|
10315
10318
|
if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = r.width, this.editorHeight = e.scrollDOM.clientHeight, h |= 16), a) {
|
|
10316
|
-
let
|
|
10317
|
-
if (s.mustRefreshForHeights(
|
|
10318
|
-
let { lineHeight:
|
|
10319
|
-
l =
|
|
10319
|
+
let z = e.docView.measureVisibleLineHeights(this.viewport);
|
|
10320
|
+
if (s.mustRefreshForHeights(z) && (l = !0), l || s.lineWrapping && Math.abs(y - this.contentDOMWidth) > s.charWidth) {
|
|
10321
|
+
let { lineHeight: S, charWidth: x, textHeight: b } = e.docView.measureTextSize();
|
|
10322
|
+
l = S > 0 && s.refresh(o, S, x, b, Math.max(5, y / x), z), l && (e.docView.minWidth = 0, h |= 16);
|
|
10320
10323
|
}
|
|
10321
10324
|
m > 0 && v > 0 ? c = Math.max(m, v) : m < 0 && v < 0 && (c = Math.min(m, v)), un();
|
|
10322
|
-
for (let
|
|
10323
|
-
let x =
|
|
10324
|
-
this.heightMap = (l ? m2.empty().applyChanges(this.stateDeco, S0.empty, this.heightOracle, [new E2(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(s, 0, l, new vm(
|
|
10325
|
+
for (let S of this.viewports) {
|
|
10326
|
+
let x = S.from == this.viewport.from ? z : e.docView.measureVisibleLineHeights(S);
|
|
10327
|
+
this.heightMap = (l ? m2.empty().applyChanges(this.stateDeco, S0.empty, this.heightOracle, [new E2(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(s, 0, l, new vm(S.from, x));
|
|
10325
10328
|
}
|
|
10326
10329
|
_t && (h |= 2);
|
|
10327
10330
|
}
|
|
10328
|
-
let
|
|
10329
|
-
return
|
|
10331
|
+
let k = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
|
|
10332
|
+
return k && (h & 2 && (h |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), h |= this.updateForViewport()), (h & 2 || k) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(l ? [] : this.lineGaps, e)), h |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), h;
|
|
10330
10333
|
}
|
|
10331
10334
|
get visibleTop() {
|
|
10332
10335
|
return this.scaler.fromDOM(this.pixelViewport.top);
|
|
@@ -10396,9 +10399,9 @@ class pn {
|
|
|
10396
10399
|
}
|
|
10397
10400
|
let v = Dm(e, (w) => w.from >= u.from && w.to <= u.to && Math.abs(w.from - c) < o && Math.abs(w.to - d) < o && !m.some((y) => w.from < y && w.to > y));
|
|
10398
10401
|
if (!v) {
|
|
10399
|
-
if (d < u.to && t && i && t.visibleRanges.some((
|
|
10400
|
-
let
|
|
10401
|
-
|
|
10402
|
+
if (d < u.to && t && i && t.visibleRanges.some((k) => k.from <= d && k.to >= d)) {
|
|
10403
|
+
let k = t.moveToLineBoundary(T.cursor(d), !1, !0).head;
|
|
10404
|
+
k > c && (d = k);
|
|
10402
10405
|
}
|
|
10403
10406
|
let w = this.gapSize(u, c, d, f), y = i || w < 2e6 ? w : 2e6;
|
|
10404
10407
|
v = new o6(c, d, w, y);
|
|
@@ -10414,8 +10417,8 @@ class pn {
|
|
|
10414
10417
|
if (i) {
|
|
10415
10418
|
let m = s / this.heightOracle.lineLength * this.heightOracle.lineHeight, v, w;
|
|
10416
10419
|
if (u != null) {
|
|
10417
|
-
let y = V1(d, u),
|
|
10418
|
-
v = y -
|
|
10420
|
+
let y = V1(d, u), k = ((this.visibleBottom - this.visibleTop) / 2 + m) / c.height;
|
|
10421
|
+
v = y - k, w = y + k;
|
|
10419
10422
|
} else
|
|
10420
10423
|
v = (this.visibleTop - c.top - m) / c.height, w = (this.visibleBottom - c.top + m) / c.height;
|
|
10421
10424
|
f = P1(d, v), p = P1(d, w);
|
|
@@ -10424,13 +10427,13 @@ class pn {
|
|
|
10424
10427
|
if (m > 2e6)
|
|
10425
10428
|
for (let x of e)
|
|
10426
10429
|
x.from >= c.from && x.from < c.to && x.size != x.displaySize && x.from * this.heightOracle.charWidth + w < this.pixelViewport.left && (w = x.size - x.displaySize);
|
|
10427
|
-
let y = this.pixelViewport.left + w,
|
|
10430
|
+
let y = this.pixelViewport.left + w, k = this.pixelViewport.right + w, z, S;
|
|
10428
10431
|
if (u != null) {
|
|
10429
|
-
let x = V1(d, u), b = ((
|
|
10430
|
-
|
|
10432
|
+
let x = V1(d, u), b = ((k - y) / 2 + v) / m;
|
|
10433
|
+
z = x - b, S = x + b;
|
|
10431
10434
|
} else
|
|
10432
|
-
|
|
10433
|
-
f = P1(d,
|
|
10435
|
+
z = (y - v) / m, S = (k + v) / m;
|
|
10436
|
+
f = P1(d, z), p = P1(d, S);
|
|
10434
10437
|
}
|
|
10435
10438
|
f > c.from && a(c.from, f, c, d), p < c.to && a(p, c.to, c, d);
|
|
10436
10439
|
};
|
|
@@ -11129,13 +11132,13 @@ class Vm {
|
|
|
11129
11132
|
let h = { from: r, to: a, insert: S0.of(i.text.split(`
|
|
11130
11133
|
`)) };
|
|
11131
11134
|
if (h.from == this.from && o < this.from ? h.from = o : h.to == this.to && o > this.to && (h.to = o), h.from == h.to && !h.insert.length) {
|
|
11132
|
-
let c =
|
|
11135
|
+
let c = T.single(this.toEditorPos(i.selectionStart), this.toEditorPos(i.selectionEnd));
|
|
11133
11136
|
c.main.eq(s) || e.dispatch({ selection: c, userEvent: "select" });
|
|
11134
11137
|
return;
|
|
11135
11138
|
}
|
|
11136
11139
|
if ((U.mac || U.android) && h.from == l - 1 && /^\. ?$/.test(i.text) && e.contentDOM.getAttribute("autocorrect") == "off" && (h = { from: r, to: a, insert: S0.of([i.text.replace(".", " ")]) }), this.pendingContextChange = h, !e.state.readOnly) {
|
|
11137
11140
|
let c = this.to - this.from + (h.to - h.from + h.insert.length);
|
|
11138
|
-
$4(e, h,
|
|
11141
|
+
$4(e, h, T.single(this.toEditorPos(i.selectionStart, c), this.toEditorPos(i.selectionEnd, c)));
|
|
11139
11142
|
}
|
|
11140
11143
|
this.pendingContextChange && (this.revertPending(e.state), this.setSelection(e.state));
|
|
11141
11144
|
}, this.handlers.characterboundsupdate = (i) => {
|
|
@@ -11358,7 +11361,7 @@ class F {
|
|
|
11358
11361
|
for (let u of e) {
|
|
11359
11362
|
if (d && (d = d.map(u.changes)), u.scrollIntoView) {
|
|
11360
11363
|
let { main: f } = u.state.selection;
|
|
11361
|
-
d = new dt(f.empty ? f :
|
|
11364
|
+
d = new dt(f.empty ? f : T.cursor(f.head, f.head > f.anchor ? -1 : 1));
|
|
11362
11365
|
}
|
|
11363
11366
|
for (let f of u.effects)
|
|
11364
11367
|
f.is(D1) && (d = f.value.clip(this.state));
|
|
@@ -11696,7 +11699,7 @@ class F {
|
|
|
11696
11699
|
*/
|
|
11697
11700
|
visualLineSide(e, t) {
|
|
11698
11701
|
let i = this.bidiSpans(e), s = this.textDirectionAt(e.from), o = i[t ? i.length - 1 : 0];
|
|
11699
|
-
return
|
|
11702
|
+
return T.cursor(o.side(t, s) + e.from, o.forward(!t, s) ? 1 : -1);
|
|
11700
11703
|
}
|
|
11701
11704
|
/**
|
|
11702
11705
|
Move to the next line boundary in the given direction. If
|
|
@@ -11876,7 +11879,7 @@ class F {
|
|
|
11876
11879
|
cause it to scroll the given position or range into view.
|
|
11877
11880
|
*/
|
|
11878
11881
|
static scrollIntoView(e, t = {}) {
|
|
11879
|
-
return D1.of(new dt(typeof e == "number" ?
|
|
11882
|
+
return D1.of(new dt(typeof e == "number" ? T.cursor(e) : e, t.y, t.x, t.yMargin, t.xMargin));
|
|
11880
11883
|
}
|
|
11881
11884
|
/**
|
|
11882
11885
|
Return an effect that resets the editor to its current (at the
|
|
@@ -11892,7 +11895,7 @@ class F {
|
|
|
11892
11895
|
*/
|
|
11893
11896
|
scrollSnapshot() {
|
|
11894
11897
|
let { scrollTop: e, scrollLeft: t } = this.scrollDOM, i = this.viewState.scrollAnchorAt(e);
|
|
11895
|
-
return D1.of(new dt(
|
|
11898
|
+
return D1.of(new dt(T.cursor(i.from), "start", "start", i.top - e, t, !0));
|
|
11896
11899
|
}
|
|
11897
11900
|
/**
|
|
11898
11901
|
Enable or disable tab-focus mode, which disables key bindings
|
|
@@ -12078,10 +12081,10 @@ function Gm(n, e = Bm) {
|
|
|
12078
12081
|
s(y, !0), f[y] || (f[y] = {
|
|
12079
12082
|
preventDefault: !0,
|
|
12080
12083
|
stopPropagation: !1,
|
|
12081
|
-
run: [(
|
|
12082
|
-
let
|
|
12084
|
+
run: [(k) => {
|
|
12085
|
+
let z = ge = { view: k, prefix: y, scope: l };
|
|
12083
12086
|
return setTimeout(() => {
|
|
12084
|
-
ge ==
|
|
12087
|
+
ge == z && (ge = null);
|
|
12085
12088
|
}, Im), !0;
|
|
12086
12089
|
}]
|
|
12087
12090
|
});
|
|
@@ -12185,44 +12188,44 @@ function Nm(n, e, t) {
|
|
|
12185
12188
|
return [];
|
|
12186
12189
|
let i = Math.max(t.from, n.viewport.from), s = Math.min(t.to, n.viewport.to), o = n.textDirection == E0.LTR, l = n.contentDOM, r = l.getBoundingClientRect(), a = ll(n), h = l.querySelector(".cm-line"), c = h && window.getComputedStyle(h), d = r.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), u = r.right - (c ? parseInt(c.paddingRight) : 0), f = i4(n, i, 1), p = i4(n, s, -1), m = f.type == g2.Text ? f : null, v = p.type == g2.Text ? p : null;
|
|
12187
12190
|
if (m && (n.lineWrapping || f.widgetLineBreaks) && (m = _n(n, i, 1, m)), v && (n.lineWrapping || p.widgetLineBreaks) && (v = _n(n, s, -1, v)), m && v && m.from == v.from && m.to == v.to)
|
|
12188
|
-
return y(
|
|
12191
|
+
return y(k(t.from, t.to, m));
|
|
12189
12192
|
{
|
|
12190
|
-
let
|
|
12191
|
-
return (m || f).to < (v || p).from - (m && v ? 1 : 0) || f.widgetLineBreaks > 1 &&
|
|
12193
|
+
let S = m ? k(t.from, null, m) : z(f, !1), x = v ? k(null, t.to, v) : z(p, !0), b = [];
|
|
12194
|
+
return (m || f).to < (v || p).from - (m && v ? 1 : 0) || f.widgetLineBreaks > 1 && S.bottom + n.defaultLineHeight / 2 < x.top ? b.push(w(d, S.bottom, u, x.top)) : S.bottom < x.top && n.elementAtHeight((S.bottom + x.top) / 2).type == g2.Text && (S.bottom = x.top = (S.bottom + x.top) / 2), y(S).concat(b).concat(y(x));
|
|
12192
12195
|
}
|
|
12193
|
-
function w(
|
|
12194
|
-
return new w1(e,
|
|
12196
|
+
function w(S, x, b, P) {
|
|
12197
|
+
return new w1(e, S - a.left, x - a.top, b - S, P - x);
|
|
12195
12198
|
}
|
|
12196
|
-
function y({ top:
|
|
12199
|
+
function y({ top: S, bottom: x, horizontal: b }) {
|
|
12197
12200
|
let P = [];
|
|
12198
12201
|
for (let I = 0; I < b.length; I += 2)
|
|
12199
|
-
P.push(w(b[I],
|
|
12202
|
+
P.push(w(b[I], S, b[I + 1], x));
|
|
12200
12203
|
return P;
|
|
12201
12204
|
}
|
|
12202
|
-
function
|
|
12203
|
-
let P = 1e9, I = -1e9,
|
|
12205
|
+
function k(S, x, b) {
|
|
12206
|
+
let P = 1e9, I = -1e9, O = [];
|
|
12204
12207
|
function H(Z, V, W, u0, h0) {
|
|
12205
12208
|
let D0 = n.coordsAtPos(Z, Z == b.to ? -2 : 2), G0 = n.coordsAtPos(W, W == b.from ? 2 : -2);
|
|
12206
|
-
!D0 || !G0 || (P = Math.min(D0.top, G0.top, P), I = Math.max(D0.bottom, G0.bottom, I), h0 == E0.LTR ?
|
|
12209
|
+
!D0 || !G0 || (P = Math.min(D0.top, G0.top, P), I = Math.max(D0.bottom, G0.bottom, I), h0 == E0.LTR ? O.push(o && V ? d : D0.left, o && u0 ? u : G0.right) : O.push(!o && u0 ? d : G0.left, !o && V ? u : D0.right));
|
|
12207
12210
|
}
|
|
12208
|
-
let
|
|
12211
|
+
let D = S ?? b.from, e0 = x ?? b.to;
|
|
12209
12212
|
for (let Z of n.visibleRanges)
|
|
12210
|
-
if (Z.to >
|
|
12211
|
-
for (let V = Math.max(Z.from,
|
|
12213
|
+
if (Z.to > D && Z.from < e0)
|
|
12214
|
+
for (let V = Math.max(Z.from, D), W = Math.min(Z.to, e0); ; ) {
|
|
12212
12215
|
let u0 = n.state.doc.lineAt(V);
|
|
12213
12216
|
for (let h0 of n.bidiSpans(u0)) {
|
|
12214
12217
|
let D0 = h0.from + u0.from, G0 = h0.to + u0.from;
|
|
12215
12218
|
if (D0 >= W)
|
|
12216
12219
|
break;
|
|
12217
|
-
G0 > V && H(Math.max(D0, V),
|
|
12220
|
+
G0 > V && H(Math.max(D0, V), S == null && D0 <= D, Math.min(G0, W), x == null && G0 >= e0, h0.dir);
|
|
12218
12221
|
}
|
|
12219
12222
|
if (V = u0.to + 1, V >= W)
|
|
12220
12223
|
break;
|
|
12221
12224
|
}
|
|
12222
|
-
return
|
|
12225
|
+
return O.length == 0 && H(D, S == null, e0, x == null, n.textDirection), { top: P, bottom: I, horizontal: O };
|
|
12223
12226
|
}
|
|
12224
|
-
function
|
|
12225
|
-
let b = r.top + (x ?
|
|
12227
|
+
function z(S, x) {
|
|
12228
|
+
let b = r.top + (x ? S.top : S.bottom);
|
|
12226
12229
|
return { top: b, bottom: b, horizontal: [] };
|
|
12227
12230
|
}
|
|
12228
12231
|
}
|
|
@@ -12305,7 +12308,7 @@ const Wm = /* @__PURE__ */ rl({
|
|
|
12305
12308
|
for (let s of e.selection.ranges) {
|
|
12306
12309
|
let o = s == e.selection.main;
|
|
12307
12310
|
if (s.empty || t.drawRangeCursor) {
|
|
12308
|
-
let l = o ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", r = s.empty ? s :
|
|
12311
|
+
let l = o ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", r = s.empty ? s : T.cursor(s.head, s.head > s.anchor ? -1 : 1);
|
|
12309
12312
|
for (let a of w1.forRange(n, l, r))
|
|
12310
12313
|
i.push(a);
|
|
12311
12314
|
}
|
|
@@ -12638,17 +12641,17 @@ function cv(n, e, t) {
|
|
|
12638
12641
|
let l = Math.min(e.off, t.off), r = Math.max(e.off, t.off);
|
|
12639
12642
|
for (let a = i; a <= s; a++) {
|
|
12640
12643
|
let h = n.doc.line(a);
|
|
12641
|
-
h.length <= r && o.push(
|
|
12644
|
+
h.length <= r && o.push(T.range(h.from + l, h.to + r));
|
|
12642
12645
|
}
|
|
12643
12646
|
} else {
|
|
12644
12647
|
let l = Math.min(e.col, t.col), r = Math.max(e.col, t.col);
|
|
12645
12648
|
for (let a = i; a <= s; a++) {
|
|
12646
12649
|
let h = n.doc.line(a), c = R6(h.text, l, n.tabSize, !0);
|
|
12647
12650
|
if (c < 0)
|
|
12648
|
-
o.push(
|
|
12651
|
+
o.push(T.cursor(h.to));
|
|
12649
12652
|
else {
|
|
12650
12653
|
let d = R6(h.text, r, n.tabSize);
|
|
12651
|
-
o.push(
|
|
12654
|
+
o.push(T.range(h.from + c, h.from + d));
|
|
12652
12655
|
}
|
|
12653
12656
|
}
|
|
12654
12657
|
}
|
|
@@ -12676,7 +12679,7 @@ function dv(n, e) {
|
|
|
12676
12679
|
if (!r)
|
|
12677
12680
|
return i;
|
|
12678
12681
|
let a = cv(n.state, t, r);
|
|
12679
|
-
return a.length ? l ?
|
|
12682
|
+
return a.length ? l ? T.create(a.concat(i.ranges)) : T.create(a) : i;
|
|
12680
12683
|
}
|
|
12681
12684
|
} : null;
|
|
12682
12685
|
}
|
|
@@ -12878,25 +12881,25 @@ const a6 = /* @__PURE__ */ q.define({
|
|
|
12878
12881
|
c.style.top = Vt;
|
|
12879
12882
|
continue;
|
|
12880
12883
|
}
|
|
12881
|
-
let f = a.arrow ? h.dom.querySelector(".cm-tooltip-arrow") : null, p = f ? 7 : 0, m = u.right - u.left, v = (e = On.get(h)) !== null && e !== void 0 ? e : u.bottom - u.top, w = h.offset || wv, y = this.view.textDirection == E0.LTR,
|
|
12882
|
-
!a.strictSide && (
|
|
12883
|
-
let
|
|
12884
|
-
if (
|
|
12885
|
-
if (
|
|
12884
|
+
let f = a.arrow ? h.dom.querySelector(".cm-tooltip-arrow") : null, p = f ? 7 : 0, m = u.right - u.left, v = (e = On.get(h)) !== null && e !== void 0 ? e : u.bottom - u.top, w = h.offset || wv, y = this.view.textDirection == E0.LTR, k = u.width > i.right - i.left ? y ? i.left : i.right - u.width : y ? Math.max(i.left, Math.min(d.left - (f ? 14 : 0) + w.x, i.right - m)) : Math.min(Math.max(i.left, d.left - m + (f ? 14 : 0) - w.x), i.right - m), z = this.above[r];
|
|
12885
|
+
!a.strictSide && (z ? d.top - v - p - w.y < i.top : d.bottom + v + p + w.y > i.bottom) && z == i.bottom - d.bottom > d.top - i.top && (z = this.above[r] = !z);
|
|
12886
|
+
let S = (z ? d.top - i.top : i.bottom - d.bottom) - p;
|
|
12887
|
+
if (S < v && h.resize !== !1) {
|
|
12888
|
+
if (S < this.view.defaultLineHeight) {
|
|
12886
12889
|
c.style.top = Vt;
|
|
12887
12890
|
continue;
|
|
12888
12891
|
}
|
|
12889
|
-
On.set(h, v), c.style.height = (v =
|
|
12892
|
+
On.set(h, v), c.style.height = (v = S) / o + "px";
|
|
12890
12893
|
} else c.style.height && (c.style.height = "");
|
|
12891
|
-
let x =
|
|
12894
|
+
let x = z ? d.top - v - p - w.y : d.bottom + p + w.y, b = k + m;
|
|
12892
12895
|
if (h.overlap !== !0)
|
|
12893
12896
|
for (let P of l)
|
|
12894
|
-
P.left < b && P.right >
|
|
12895
|
-
if (this.position == "absolute" ? (c.style.top = (x - n.parent.top) / o + "px", Dn(c, (
|
|
12896
|
-
let P = d.left + (y ? w.x : -w.x) - (
|
|
12897
|
+
P.left < b && P.right > k && P.top < x + v && P.bottom > x && (x = z ? P.top - v - 2 - p : P.bottom + p + 2);
|
|
12898
|
+
if (this.position == "absolute" ? (c.style.top = (x - n.parent.top) / o + "px", Dn(c, (k - n.parent.left) / s)) : (c.style.top = x / o + "px", Dn(c, k / s)), f) {
|
|
12899
|
+
let P = d.left + (y ? w.x : -w.x) - (k + 14 - 7);
|
|
12897
12900
|
f.style.left = P / s + "px";
|
|
12898
12901
|
}
|
|
12899
|
-
h.overlap !== !0 && l.push({ left:
|
|
12902
|
+
h.overlap !== !0 && l.push({ left: k, top: x, right: b, bottom: x + v }), c.classList.toggle("cm-tooltip-above", z), c.classList.toggle("cm-tooltip-below", !z), h.positioned && h.positioned(n.space);
|
|
12900
12903
|
}
|
|
12901
12904
|
}
|
|
12902
12905
|
maybeMeasure() {
|
|
@@ -14694,12 +14697,12 @@ function X4(n) {
|
|
|
14694
14697
|
function jv(n) {
|
|
14695
14698
|
var e;
|
|
14696
14699
|
let { buffer: t, nodeSet: i, maxBufferLength: s = gl, reused: o = [], minRepeatType: l = i.types.length } = n, r = Array.isArray(t) ? new K4(t, t.length) : t, a = i.types, h = 0, c = 0;
|
|
14697
|
-
function d(
|
|
14698
|
-
let { id: H, start:
|
|
14700
|
+
function d(S, x, b, P, I, O) {
|
|
14701
|
+
let { id: H, start: D, end: e0, size: Z } = r, V = c, W = h;
|
|
14699
14702
|
for (; Z < 0; )
|
|
14700
14703
|
if (r.next(), Z == -1) {
|
|
14701
14704
|
let w0 = o[H];
|
|
14702
|
-
b.push(w0), P.push(
|
|
14705
|
+
b.push(w0), P.push(D - S);
|
|
14703
14706
|
return;
|
|
14704
14707
|
} else if (Z == -3) {
|
|
14705
14708
|
h = H;
|
|
@@ -14709,79 +14712,79 @@ function jv(n) {
|
|
|
14709
14712
|
return;
|
|
14710
14713
|
} else
|
|
14711
14714
|
throw new RangeError(`Unrecognized record size: ${Z}`);
|
|
14712
|
-
let u0 = a[H], h0, D0, G0 =
|
|
14713
|
-
if (e0 -
|
|
14715
|
+
let u0 = a[H], h0, D0, G0 = D - S;
|
|
14716
|
+
if (e0 - D <= s && (D0 = v(r.pos - x, I))) {
|
|
14714
14717
|
let w0 = new Uint16Array(D0.size - D0.skip), g = r.pos - D0.size, V0 = w0.length;
|
|
14715
14718
|
for (; r.pos > g; )
|
|
14716
14719
|
V0 = w(D0.start, w0, V0);
|
|
14717
|
-
h0 = new Oe(w0, e0 - D0.start, i), G0 = D0.start -
|
|
14720
|
+
h0 = new Oe(w0, e0 - D0.start, i), G0 = D0.start - S;
|
|
14718
14721
|
} else {
|
|
14719
14722
|
let w0 = r.pos - Z;
|
|
14720
14723
|
r.next();
|
|
14721
14724
|
let g = [], V0 = [], x0 = H >= l ? H : -1, I0 = 0, j0 = e0;
|
|
14722
14725
|
for (; r.pos > w0; )
|
|
14723
|
-
x0 >= 0 && r.id == x0 && r.size >= 0 ? (r.end <= j0 - s && (p(g, V0,
|
|
14724
|
-
if (x0 >= 0 && I0 > 0 && I0 < g.length && p(g, V0,
|
|
14726
|
+
x0 >= 0 && r.id == x0 && r.size >= 0 ? (r.end <= j0 - s && (p(g, V0, D, I0, r.end, j0, x0, V, W), I0 = g.length, j0 = r.end), r.next()) : O > 2500 ? u(D, w0, g, V0) : d(D, w0, g, V0, x0, O + 1);
|
|
14727
|
+
if (x0 >= 0 && I0 > 0 && I0 < g.length && p(g, V0, D, I0, D, j0, x0, V, W), g.reverse(), V0.reverse(), x0 > -1 && I0 > 0) {
|
|
14725
14728
|
let v2 = f(u0, W);
|
|
14726
|
-
h0 = Q4(u0, g, V0, 0, g.length, 0, e0 -
|
|
14729
|
+
h0 = Q4(u0, g, V0, 0, g.length, 0, e0 - D, v2, v2);
|
|
14727
14730
|
} else
|
|
14728
|
-
h0 = m(u0, g, V0, e0 -
|
|
14731
|
+
h0 = m(u0, g, V0, e0 - D, V - e0, W);
|
|
14729
14732
|
}
|
|
14730
14733
|
b.push(h0), P.push(G0);
|
|
14731
14734
|
}
|
|
14732
|
-
function u(
|
|
14733
|
-
let I = [],
|
|
14735
|
+
function u(S, x, b, P) {
|
|
14736
|
+
let I = [], O = 0, H = -1;
|
|
14734
14737
|
for (; r.pos > x; ) {
|
|
14735
|
-
let { id:
|
|
14738
|
+
let { id: D, start: e0, end: Z, size: V } = r;
|
|
14736
14739
|
if (V > 4)
|
|
14737
14740
|
r.next();
|
|
14738
14741
|
else {
|
|
14739
14742
|
if (H > -1 && e0 < H)
|
|
14740
14743
|
break;
|
|
14741
|
-
H < 0 && (H = Z - s), I.push(
|
|
14744
|
+
H < 0 && (H = Z - s), I.push(D, e0, Z), O++, r.next();
|
|
14742
14745
|
}
|
|
14743
14746
|
}
|
|
14744
|
-
if (
|
|
14745
|
-
let
|
|
14747
|
+
if (O) {
|
|
14748
|
+
let D = new Uint16Array(O * 4), e0 = I[I.length - 2];
|
|
14746
14749
|
for (let Z = I.length - 3, V = 0; Z >= 0; Z -= 3)
|
|
14747
|
-
|
|
14748
|
-
b.push(new Oe(
|
|
14750
|
+
D[V++] = I[Z], D[V++] = I[Z + 1] - e0, D[V++] = I[Z + 2] - e0, D[V++] = V;
|
|
14751
|
+
b.push(new Oe(D, I[2] - e0, i)), P.push(e0 - S);
|
|
14749
14752
|
}
|
|
14750
14753
|
}
|
|
14751
|
-
function f(
|
|
14754
|
+
function f(S, x) {
|
|
14752
14755
|
return (b, P, I) => {
|
|
14753
|
-
let
|
|
14754
|
-
if (H >= 0 && (
|
|
14755
|
-
if (!H &&
|
|
14756
|
-
return
|
|
14757
|
-
(e0 =
|
|
14756
|
+
let O = 0, H = b.length - 1, D, e0;
|
|
14757
|
+
if (H >= 0 && (D = b[H]) instanceof U0) {
|
|
14758
|
+
if (!H && D.type == S && D.length == I)
|
|
14759
|
+
return D;
|
|
14760
|
+
(e0 = D.prop(v0.lookAhead)) && (O = P[H] + D.length + e0);
|
|
14758
14761
|
}
|
|
14759
|
-
return m(
|
|
14762
|
+
return m(S, b, P, I, O, x);
|
|
14760
14763
|
};
|
|
14761
14764
|
}
|
|
14762
|
-
function p(
|
|
14765
|
+
function p(S, x, b, P, I, O, H, D, e0) {
|
|
14763
14766
|
let Z = [], V = [];
|
|
14764
|
-
for (;
|
|
14765
|
-
Z.push(
|
|
14766
|
-
|
|
14767
|
+
for (; S.length > P; )
|
|
14768
|
+
Z.push(S.pop()), V.push(x.pop() + b - I);
|
|
14769
|
+
S.push(m(i.types[H], Z, V, O - I, D - O, e0)), x.push(I - b);
|
|
14767
14770
|
}
|
|
14768
|
-
function m(
|
|
14769
|
-
if (
|
|
14770
|
-
let
|
|
14771
|
-
H = H ? [
|
|
14771
|
+
function m(S, x, b, P, I, O, H) {
|
|
14772
|
+
if (O) {
|
|
14773
|
+
let D = [v0.contextHash, O];
|
|
14774
|
+
H = H ? [D].concat(H) : [D];
|
|
14772
14775
|
}
|
|
14773
14776
|
if (I > 25) {
|
|
14774
|
-
let
|
|
14775
|
-
H = H ? [
|
|
14777
|
+
let D = [v0.lookAhead, I];
|
|
14778
|
+
H = H ? [D].concat(H) : [D];
|
|
14776
14779
|
}
|
|
14777
|
-
return new U0(
|
|
14780
|
+
return new U0(S, x, b, P, H);
|
|
14778
14781
|
}
|
|
14779
|
-
function v(
|
|
14780
|
-
let b = r.fork(), P = 0, I = 0,
|
|
14781
|
-
e: for (let e0 = b.pos -
|
|
14782
|
+
function v(S, x) {
|
|
14783
|
+
let b = r.fork(), P = 0, I = 0, O = 0, H = b.end - s, D = { size: 0, start: 0, skip: 0 };
|
|
14784
|
+
e: for (let e0 = b.pos - S; b.pos > e0; ) {
|
|
14782
14785
|
let Z = b.size;
|
|
14783
14786
|
if (b.id == x && Z >= 0) {
|
|
14784
|
-
|
|
14787
|
+
D.size = P, D.start = I, D.skip = O, O += 4, P += 4, b.next();
|
|
14785
14788
|
continue;
|
|
14786
14789
|
}
|
|
14787
14790
|
let V = b.pos - Z;
|
|
@@ -14797,28 +14800,28 @@ function jv(n) {
|
|
|
14797
14800
|
else b.id >= l && (W += 4);
|
|
14798
14801
|
b.next();
|
|
14799
14802
|
}
|
|
14800
|
-
I = u0, P += Z,
|
|
14803
|
+
I = u0, P += Z, O += W;
|
|
14801
14804
|
}
|
|
14802
|
-
return (x < 0 || P ==
|
|
14805
|
+
return (x < 0 || P == S) && (D.size = P, D.start = I, D.skip = O), D.size > 4 ? D : void 0;
|
|
14803
14806
|
}
|
|
14804
|
-
function w(
|
|
14805
|
-
let { id: P, start: I, end:
|
|
14807
|
+
function w(S, x, b) {
|
|
14808
|
+
let { id: P, start: I, end: O, size: H } = r;
|
|
14806
14809
|
if (r.next(), H >= 0 && P < l) {
|
|
14807
|
-
let
|
|
14810
|
+
let D = b;
|
|
14808
14811
|
if (H > 4) {
|
|
14809
14812
|
let e0 = r.pos - (H - 4);
|
|
14810
14813
|
for (; r.pos > e0; )
|
|
14811
|
-
b = w(
|
|
14814
|
+
b = w(S, x, b);
|
|
14812
14815
|
}
|
|
14813
|
-
x[--b] =
|
|
14816
|
+
x[--b] = D, x[--b] = O - S, x[--b] = I - S, x[--b] = P;
|
|
14814
14817
|
} else H == -3 ? h = P : H == -4 && (c = P);
|
|
14815
14818
|
return b;
|
|
14816
14819
|
}
|
|
14817
|
-
let y = [],
|
|
14820
|
+
let y = [], k = [];
|
|
14818
14821
|
for (; r.pos > 0; )
|
|
14819
|
-
d(n.start || 0, n.bufferStart || 0, y,
|
|
14820
|
-
let
|
|
14821
|
-
return new U0(a[n.topID], y.reverse(),
|
|
14822
|
+
d(n.start || 0, n.bufferStart || 0, y, k, -1, 0);
|
|
14823
|
+
let z = (e = n.length) !== null && e !== void 0 ? e : y.length ? k[0] + y[0].length : 0;
|
|
14824
|
+
return new U0(a[n.topID], y.reverse(), k.reverse(), z);
|
|
14822
14825
|
}
|
|
14823
14826
|
const Ln = /* @__PURE__ */ new WeakMap();
|
|
14824
14827
|
function n3(n, e) {
|
|
@@ -14847,26 +14850,26 @@ function Q4(n, e, t, i, s, o, l, r, a) {
|
|
|
14847
14850
|
/* Balance.BranchFactor */
|
|
14848
14851
|
), d = [], u = [];
|
|
14849
14852
|
function f(p, m, v, w, y) {
|
|
14850
|
-
for (let
|
|
14851
|
-
let
|
|
14852
|
-
for (
|
|
14853
|
-
let b = n3(n, p[
|
|
14853
|
+
for (let k = v; k < w; ) {
|
|
14854
|
+
let z = k, S = m[k], x = n3(n, p[k]);
|
|
14855
|
+
for (k++; k < w; k++) {
|
|
14856
|
+
let b = n3(n, p[k]);
|
|
14854
14857
|
if (x + b >= c)
|
|
14855
14858
|
break;
|
|
14856
14859
|
x += b;
|
|
14857
14860
|
}
|
|
14858
|
-
if (
|
|
14861
|
+
if (k == z + 1) {
|
|
14859
14862
|
if (x > c) {
|
|
14860
|
-
let b = p[
|
|
14861
|
-
f(b.children, b.positions, 0, b.children.length, m[
|
|
14863
|
+
let b = p[z];
|
|
14864
|
+
f(b.children, b.positions, 0, b.children.length, m[z] + y);
|
|
14862
14865
|
continue;
|
|
14863
14866
|
}
|
|
14864
|
-
d.push(p[
|
|
14867
|
+
d.push(p[z]);
|
|
14865
14868
|
} else {
|
|
14866
|
-
let b = m[
|
|
14867
|
-
d.push(Q4(n, p, m,
|
|
14869
|
+
let b = m[k - 1] + p[k - 1].length - S;
|
|
14870
|
+
d.push(Q4(n, p, m, z, k, S, b, null, a));
|
|
14868
14871
|
}
|
|
14869
|
-
u.push(
|
|
14872
|
+
u.push(S + y - o);
|
|
14870
14873
|
}
|
|
14871
14874
|
}
|
|
14872
14875
|
return f(e, t, i, s, 0), (r || a)(d, u, l);
|
|
@@ -15171,11 +15174,11 @@ class Qv {
|
|
|
15171
15174
|
if (u && u.overlay) {
|
|
15172
15175
|
let f = e.node.enter(u.overlay[0].from + r, 1), p = this.highlighters.filter((v) => !v.scope || v.scope(u.tree.type)), m = e.firstChild();
|
|
15173
15176
|
for (let v = 0, w = r; ; v++) {
|
|
15174
|
-
let y = v < u.overlay.length ? u.overlay[v] : null,
|
|
15175
|
-
if (
|
|
15176
|
-
for (; e.from <
|
|
15177
|
+
let y = v < u.overlay.length ? u.overlay[v] : null, k = y ? y.from + r : a, z = Math.max(t, w), S = Math.min(i, k);
|
|
15178
|
+
if (z < S && m)
|
|
15179
|
+
for (; e.from < S && (this.highlightRange(e, z, S, s, o), this.startSpan(Math.min(S, e.to), h), !(e.to >= k || !e.nextSibling())); )
|
|
15177
15180
|
;
|
|
15178
|
-
if (!y ||
|
|
15181
|
+
if (!y || k > i)
|
|
15179
15182
|
break;
|
|
15180
15183
|
w = y.to + r, w > t && (this.highlightRange(f.cursor(), Math.max(t, y.from + r), Math.min(i, w), "", p), this.startSpan(Math.min(i, w), h));
|
|
15181
15184
|
}
|
|
@@ -17029,7 +17032,7 @@ class S2 {
|
|
|
17029
17032
|
};
|
|
17030
17033
|
}
|
|
17031
17034
|
static fromJSON(e) {
|
|
17032
|
-
return new S2(e.changes && Y0.fromJSON(e.changes), [], e.mapped && te.fromJSON(e.mapped), e.startSelection &&
|
|
17035
|
+
return new S2(e.changes && Y0.fromJSON(e.changes), [], e.mapped && te.fromJSON(e.mapped), e.startSelection && T.fromJSON(e.startSelection), e.selectionsAfter.map(T.fromJSON));
|
|
17033
17036
|
}
|
|
17034
17037
|
// This does not check `addToHistory` and such, it assumes the
|
|
17035
17038
|
// transaction needs to be converted to an item. Returns null when
|
|
@@ -17154,7 +17157,7 @@ const ax = [
|
|
|
17154
17157
|
{ key: "Alt-u", mac: "Mod-Shift-u", run: tx, preventDefault: !0 }
|
|
17155
17158
|
];
|
|
17156
17159
|
function Ot(n, e) {
|
|
17157
|
-
return
|
|
17160
|
+
return T.create(n.ranges.map(e), n.mainIndex);
|
|
17158
17161
|
}
|
|
17159
17162
|
function se(n, e) {
|
|
17160
17163
|
return n.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
|
|
@@ -17164,7 +17167,7 @@ function U2({ state: n, dispatch: e }, t) {
|
|
|
17164
17167
|
return i.eq(n.selection, !0) ? !1 : (e(se(n, i)), !0);
|
|
17165
17168
|
}
|
|
17166
17169
|
function q3(n, e) {
|
|
17167
|
-
return
|
|
17170
|
+
return T.cursor(e ? n.to : n.from);
|
|
17168
17171
|
}
|
|
17169
17172
|
function Ul(n, e) {
|
|
17170
17173
|
return U2(n, (t) => t.empty ? n.moveByChar(t, e) : q3(t, e));
|
|
@@ -17192,7 +17195,7 @@ function Y3(n, e, t) {
|
|
|
17192
17195
|
dx(n, h, s) ? i = h : a = t ? h.to : h.from;
|
|
17193
17196
|
}
|
|
17194
17197
|
let o = i.type.prop(s), l, r;
|
|
17195
|
-
return o && (l = t ? Z2(n, i.from, 1) : Z2(n, i.to, -1)) && l.matched ? r = t ? l.end.to : l.end.from : r = t ? i.to : i.from,
|
|
17198
|
+
return o && (l = t ? Z2(n, i.from, 1) : Z2(n, i.to, -1)) && l.matched ? r = t ? l.end.to : l.end.from : r = t ? i.to : i.from, T.cursor(r, t ? -1 : 1);
|
|
17196
17199
|
}
|
|
17197
17200
|
const ux = (n) => U2(n, (e) => Y3(n.state, e, !u2(n))), fx = (n) => U2(n, (e) => Y3(n.state, e, u2(n)));
|
|
17198
17201
|
function Kl(n, e) {
|
|
@@ -17237,11 +17240,11 @@ function Te(n, e, t) {
|
|
|
17237
17240
|
let i = n.lineBlockAt(e.head), s = n.moveToLineBoundary(e, t);
|
|
17238
17241
|
if (s.head == e.head && s.head != (t ? i.to : i.from) && (s = n.moveToLineBoundary(e, t, !1)), !t && s.head == i.from && i.length) {
|
|
17239
17242
|
let o = /^\s*/.exec(n.state.sliceDoc(i.from, Math.min(i.from + 100, i.to)))[0].length;
|
|
17240
|
-
o && e.head != i.from + o && (s =
|
|
17243
|
+
o && e.head != i.from + o && (s = T.cursor(i.from + o));
|
|
17241
17244
|
}
|
|
17242
17245
|
return s;
|
|
17243
17246
|
}
|
|
17244
|
-
const px = (n) => U2(n, (e) => Te(n, e, !0)), gx = (n) => U2(n, (e) => Te(n, e, !1)), mx = (n) => U2(n, (e) => Te(n, e, !u2(n))), vx = (n) => U2(n, (e) => Te(n, e, u2(n))), wx = (n) => U2(n, (e) =>
|
|
17247
|
+
const px = (n) => U2(n, (e) => Te(n, e, !0)), gx = (n) => U2(n, (e) => Te(n, e, !1)), mx = (n) => U2(n, (e) => Te(n, e, !u2(n))), vx = (n) => U2(n, (e) => Te(n, e, u2(n))), wx = (n) => U2(n, (e) => T.cursor(n.lineBlockAt(e.head).from, 1)), xx = (n) => U2(n, (e) => T.cursor(n.lineBlockAt(e.head).to, -1));
|
|
17245
17248
|
function bx(n, e, t) {
|
|
17246
17249
|
let i = !1, s = Ot(n.selection, (o) => {
|
|
17247
17250
|
let l = Z2(n, o.head, -1) || Z2(n, o.head, 1) || o.head > 0 && Z2(n, o.head - 1, 1) || o.head < n.doc.length && Z2(n, o.head + 1, -1);
|
|
@@ -17249,7 +17252,7 @@ function bx(n, e, t) {
|
|
|
17249
17252
|
return o;
|
|
17250
17253
|
i = !0;
|
|
17251
17254
|
let r = l.start.from == o.head ? l.end.to : l.end.from;
|
|
17252
|
-
return
|
|
17255
|
+
return T.cursor(r);
|
|
17253
17256
|
});
|
|
17254
17257
|
return i ? (e(se(n, s)), !0) : !1;
|
|
17255
17258
|
}
|
|
@@ -17257,7 +17260,7 @@ const _x = ({ state: n, dispatch: e }) => bx(n, e);
|
|
|
17257
17260
|
function I2(n, e) {
|
|
17258
17261
|
let t = Ot(n.state.selection, (i) => {
|
|
17259
17262
|
let s = e(i);
|
|
17260
|
-
return
|
|
17263
|
+
return T.range(i.anchor, s.head, s.goalColumn, s.bidiLevel || void 0);
|
|
17261
17264
|
});
|
|
17262
17265
|
return t.eq(n.state.selection) ? !1 : (n.dispatch(se(n.state, t)), !0);
|
|
17263
17266
|
}
|
|
@@ -17276,9 +17279,9 @@ const o8 = (n) => s8(n, !1), l8 = (n) => s8(n, !0);
|
|
|
17276
17279
|
function r8(n, e) {
|
|
17277
17280
|
return I2(n, (t) => n.moveVertically(t, e, Jl(n).height));
|
|
17278
17281
|
}
|
|
17279
|
-
const qn = (n) => r8(n, !1), Yn = (n) => r8(n, !0), Ox = (n) => I2(n, (e) => Te(n, e, !0)), Dx = (n) => I2(n, (e) => Te(n, e, !1)), Mx = (n) => I2(n, (e) => Te(n, e, !u2(n))), Tx = (n) => I2(n, (e) => Te(n, e, u2(n))), zx = (n) => I2(n, (e) =>
|
|
17280
|
-
let t = K3(n).map(({ from: i, to: s }) =>
|
|
17281
|
-
return e(n.update({ selection:
|
|
17282
|
+
const qn = (n) => r8(n, !1), Yn = (n) => r8(n, !0), Ox = (n) => I2(n, (e) => Te(n, e, !0)), Dx = (n) => I2(n, (e) => Te(n, e, !1)), Mx = (n) => I2(n, (e) => Te(n, e, !u2(n))), Tx = (n) => I2(n, (e) => Te(n, e, u2(n))), zx = (n) => I2(n, (e) => T.cursor(n.lineBlockAt(e.head).from)), Px = (n) => I2(n, (e) => T.cursor(n.lineBlockAt(e.head).to)), Kn = ({ state: n, dispatch: e }) => (e(se(n, { anchor: 0 })), !0), Xn = ({ state: n, dispatch: e }) => (e(se(n, { anchor: n.doc.length })), !0), Qn = ({ state: n, dispatch: e }) => (e(se(n, { anchor: n.selection.main.anchor, head: 0 })), !0), Jn = ({ state: n, dispatch: e }) => (e(se(n, { anchor: n.selection.main.anchor, head: n.doc.length })), !0), Vx = ({ state: n, dispatch: e }) => (e(n.update({ selection: { anchor: 0, head: n.doc.length }, userEvent: "select" })), !0), Ax = ({ state: n, dispatch: e }) => {
|
|
17283
|
+
let t = K3(n).map(({ from: i, to: s }) => T.range(i, Math.min(s + 1, n.doc.length)));
|
|
17284
|
+
return e(n.update({ selection: T.create(t), userEvent: "select" })), !0;
|
|
17282
17285
|
}, Bx = ({ state: n, dispatch: e }) => {
|
|
17283
17286
|
let t = Ot(n.selection, (i) => {
|
|
17284
17287
|
let s = J0(n), o = s.resolveStack(i.from, 1);
|
|
@@ -17289,14 +17292,14 @@ const qn = (n) => r8(n, !1), Yn = (n) => r8(n, !0), Ox = (n) => I2(n, (e) => Te(
|
|
|
17289
17292
|
for (let l = o; l; l = l.next) {
|
|
17290
17293
|
let { node: r } = l;
|
|
17291
17294
|
if ((r.from < i.from && r.to >= i.to || r.to > i.to && r.from <= i.from) && l.next)
|
|
17292
|
-
return
|
|
17295
|
+
return T.range(r.to, r.from);
|
|
17293
17296
|
}
|
|
17294
17297
|
return i;
|
|
17295
17298
|
});
|
|
17296
17299
|
return t.eq(n.selection) ? !1 : (e(se(n, t)), !0);
|
|
17297
17300
|
}, Ex = ({ state: n, dispatch: e }) => {
|
|
17298
17301
|
let t = n.selection, i = null;
|
|
17299
|
-
return t.ranges.length > 1 ? i =
|
|
17302
|
+
return t.ranges.length > 1 ? i = T.create([t.main]) : t.main.empty || (i = T.create([T.cursor(t.main.head)])), i ? (e(se(n, i)), !0) : !1;
|
|
17300
17303
|
};
|
|
17301
17304
|
function b1(n, e) {
|
|
17302
17305
|
if (n.state.readOnly)
|
|
@@ -17308,7 +17311,7 @@ function b1(n, e) {
|
|
|
17308
17311
|
a < l ? (t = "delete.backward", a = R1(n, a, !1)) : a > l && (t = "delete.forward", a = R1(n, a, !0)), l = Math.min(l, a), r = Math.max(r, a);
|
|
17309
17312
|
} else
|
|
17310
17313
|
l = R1(n, l, !1), r = R1(n, r, !0);
|
|
17311
|
-
return l == r ? { range: o } : { changes: { from: l, to: r }, range:
|
|
17314
|
+
return l == r ? { range: o } : { changes: { from: l, to: r }, range: T.cursor(l, l < o.head ? -1 : 1) };
|
|
17312
17315
|
});
|
|
17313
17316
|
return s.changes.empty ? !1 : (n.dispatch(i.update(s, {
|
|
17314
17317
|
scrollIntoView: !0,
|
|
@@ -17363,7 +17366,7 @@ const a8 = (n, e, t) => b1(n, (i) => {
|
|
|
17363
17366
|
return !1;
|
|
17364
17367
|
let t = n.changeByRange((i) => ({
|
|
17365
17368
|
changes: { from: i.from, to: i.to, insert: S0.of(["", ""]) },
|
|
17366
|
-
range:
|
|
17369
|
+
range: T.cursor(i.from)
|
|
17367
17370
|
}));
|
|
17368
17371
|
return e(n.update(t, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
17369
17372
|
}, Rx = ({ state: n, dispatch: e }) => {
|
|
@@ -17375,7 +17378,7 @@ const a8 = (n, e, t) => b1(n, (i) => {
|
|
|
17375
17378
|
let s = i.from, o = n.doc.lineAt(s), l = s == o.from ? s - 1 : o2(o.text, s - o.from, !1) + o.from, r = s == o.to ? s + 1 : o2(o.text, s - o.from, !0) + o.from;
|
|
17376
17379
|
return {
|
|
17377
17380
|
changes: { from: l, to: r, insert: n.doc.slice(s, r).append(n.doc.slice(l, s)) },
|
|
17378
|
-
range:
|
|
17381
|
+
range: T.cursor(r)
|
|
17379
17382
|
};
|
|
17380
17383
|
});
|
|
17381
17384
|
return t.changes.empty ? !1 : (e(n.update(t, { scrollIntoView: !0, userEvent: "move.character" })), !0);
|
|
@@ -17404,17 +17407,17 @@ function u8(n, e, t) {
|
|
|
17404
17407
|
if (t) {
|
|
17405
17408
|
i.push({ from: o.to, to: l.to }, { from: o.from, insert: l.text + n.lineBreak });
|
|
17406
17409
|
for (let a of o.ranges)
|
|
17407
|
-
s.push(
|
|
17410
|
+
s.push(T.range(Math.min(n.doc.length, a.anchor + r), Math.min(n.doc.length, a.head + r)));
|
|
17408
17411
|
} else {
|
|
17409
17412
|
i.push({ from: l.from, to: o.from }, { from: o.to, insert: n.lineBreak + l.text });
|
|
17410
17413
|
for (let a of o.ranges)
|
|
17411
|
-
s.push(
|
|
17414
|
+
s.push(T.range(a.anchor - r, a.head - r));
|
|
17412
17415
|
}
|
|
17413
17416
|
}
|
|
17414
17417
|
return i.length ? (e(n.update({
|
|
17415
17418
|
changes: i,
|
|
17416
17419
|
scrollIntoView: !0,
|
|
17417
|
-
selection:
|
|
17420
|
+
selection: T.create(s, n.selection.mainIndex),
|
|
17418
17421
|
userEvent: "move.line"
|
|
17419
17422
|
})), !0) : !1;
|
|
17420
17423
|
}
|
|
@@ -17461,7 +17464,7 @@ function p8(n) {
|
|
|
17461
17464
|
let d = ["", r1(e, c)];
|
|
17462
17465
|
return a && d.push(r1(e, h.lineIndent(r.from, -1))), {
|
|
17463
17466
|
changes: { from: o, to: l, insert: S0.of(d) },
|
|
17464
|
-
range:
|
|
17467
|
+
range: T.cursor(o + 1 + d[1].length)
|
|
17465
17468
|
};
|
|
17466
17469
|
});
|
|
17467
17470
|
return t(e.update(i, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
@@ -17478,7 +17481,7 @@ function ni(n, e) {
|
|
|
17478
17481
|
let o = n.changes(s);
|
|
17479
17482
|
return {
|
|
17480
17483
|
changes: s,
|
|
17481
|
-
range:
|
|
17484
|
+
range: T.range(o.mapPos(i.anchor, 1), o.mapPos(i.head, 1))
|
|
17482
17485
|
};
|
|
17483
17486
|
});
|
|
17484
17487
|
}
|
|
@@ -17768,7 +17771,7 @@ function _4(n) {
|
|
|
17768
17771
|
let v = f / 100;
|
|
17769
17772
|
a && (v = v * (a == "-" ? -1 : 1) + r.number / l.doc.lines), f = Math.round(l.doc.lines * v);
|
|
17770
17773
|
} else h && a && (f = f * (a == "-" ? -1 : 1) + r.number);
|
|
17771
|
-
let p = l.doc.line(Math.max(1, Math.min(l.doc.lines, f))), m =
|
|
17774
|
+
let p = l.doc.line(Math.max(1, Math.min(l.doc.lines, f))), m = T.cursor(p.from + Math.max(0, Math.min(u, p.length)));
|
|
17772
17775
|
n.dispatch({
|
|
17773
17776
|
effects: [Ft.of(!1), F.scrollIntoView(m.from, { y: "center" })],
|
|
17774
17777
|
selection: m
|
|
@@ -17879,7 +17882,7 @@ const db = /* @__PURE__ */ F0.fromClass(class {
|
|
|
17879
17882
|
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
17880
17883
|
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
17881
17884
|
}), fb = ({ state: n, dispatch: e }) => {
|
|
17882
|
-
let { selection: t } = n, i =
|
|
17885
|
+
let { selection: t } = n, i = T.create(t.ranges.map((s) => n.wordAt(s.head) || T.cursor(s.head)), t.mainIndex);
|
|
17883
17886
|
return i.eq(t) ? !1 : (e(n.update({ selection: i })), !0);
|
|
17884
17887
|
};
|
|
17885
17888
|
function pb(n, e) {
|
|
@@ -17909,7 +17912,7 @@ const gb = ({ state: n, dispatch: e }) => {
|
|
|
17909
17912
|
return !1;
|
|
17910
17913
|
let s = pb(n, i);
|
|
17911
17914
|
return s ? (e(n.update({
|
|
17912
|
-
selection: n.selection.addRange(
|
|
17915
|
+
selection: n.selection.addRange(T.range(s.from, s.to), !1),
|
|
17913
17916
|
effects: F.scrollIntoView(s.to)
|
|
17914
17917
|
})), !0) : !1;
|
|
17915
17918
|
}, Dt = /* @__PURE__ */ q.define({
|
|
@@ -18142,7 +18145,7 @@ const M3 = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
|
18142
18145
|
let { to: t } = n.state.selection.main, i = e.nextMatch(n.state, t, t);
|
|
18143
18146
|
if (!i)
|
|
18144
18147
|
return !1;
|
|
18145
|
-
let s =
|
|
18148
|
+
let s = T.single(i.from, i.to), o = n.state.facet(Dt);
|
|
18146
18149
|
return n.dispatch({
|
|
18147
18150
|
selection: s,
|
|
18148
18151
|
effects: [ri(n, i), o.scrollToMatch(s.main, n)],
|
|
@@ -18152,7 +18155,7 @@ const M3 = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
|
18152
18155
|
let { state: t } = n, { from: i } = t.selection.main, s = e.prevMatch(t, i, i);
|
|
18153
18156
|
if (!s)
|
|
18154
18157
|
return !1;
|
|
18155
|
-
let o =
|
|
18158
|
+
let o = T.single(s.from, s.to), l = n.state.facet(Dt);
|
|
18156
18159
|
return n.dispatch({
|
|
18157
18160
|
selection: o,
|
|
18158
18161
|
effects: [ri(n, s), l.scrollToMatch(o.main, n)],
|
|
@@ -18161,7 +18164,7 @@ const M3 = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
|
18161
18164
|
}), Sb = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
18162
18165
|
let t = e.matchAll(n.state, 1e3);
|
|
18163
18166
|
return !t || !t.length ? !1 : (n.dispatch({
|
|
18164
|
-
selection:
|
|
18167
|
+
selection: T.create(t.map((i) => T.range(i.from, i.to))),
|
|
18165
18168
|
userEvent: "select.search.matches"
|
|
18166
18169
|
}), !0);
|
|
18167
18170
|
}), Cb = ({ state: n, dispatch: e }) => {
|
|
@@ -18172,10 +18175,10 @@ const M3 = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
|
18172
18175
|
for (let r = new St(n.doc, n.sliceDoc(i, s)); !r.next().done; ) {
|
|
18173
18176
|
if (o.length > 1e3)
|
|
18174
18177
|
return !1;
|
|
18175
|
-
r.value.from == i && (l = o.length), o.push(
|
|
18178
|
+
r.value.from == i && (l = o.length), o.push(T.range(r.value.from, r.value.to));
|
|
18176
18179
|
}
|
|
18177
18180
|
return e(n.update({
|
|
18178
|
-
selection:
|
|
18181
|
+
selection: T.create(o, l),
|
|
18179
18182
|
userEvent: "select.search.matches"
|
|
18180
18183
|
})), !0;
|
|
18181
18184
|
}, ns = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
@@ -18188,7 +18191,7 @@ const M3 = /* @__PURE__ */ _1((n, { query: e }) => {
|
|
|
18188
18191
|
let l = o, r = [], a, h, c = [];
|
|
18189
18192
|
l.from == i && l.to == s && (h = t.toText(e.getReplacement(l)), r.push({ from: l.from, to: l.to, insert: h }), l = e.nextMatch(t, l.from, l.to), c.push(F.announce.of(t.phrase("replaced match on line $", t.doc.lineAt(i).number) + ".")));
|
|
18190
18193
|
let d = n.state.changes(r);
|
|
18191
|
-
return l && (a =
|
|
18194
|
+
return l && (a = T.single(l.from, l.to).map(d), c.push(ri(n, l)), c.push(t.facet(Dt).scrollToMatch(a.main, n))), n.dispatch({
|
|
18192
18195
|
changes: d,
|
|
18193
18196
|
selection: a,
|
|
18194
18197
|
effects: c,
|
|
@@ -18517,7 +18520,7 @@ function Vb(n, e, t, i) {
|
|
|
18517
18520
|
let a = n.toText(e);
|
|
18518
18521
|
return {
|
|
18519
18522
|
changes: { from: r.from + o, to: i == s.from ? r.to : r.from + l, insert: a },
|
|
18520
|
-
range:
|
|
18523
|
+
range: T.cursor(r.from + o + a.length)
|
|
18521
18524
|
};
|
|
18522
18525
|
})), { scrollIntoView: !0, userEvent: "input.complete" });
|
|
18523
18526
|
}
|
|
@@ -18557,31 +18560,31 @@ class Bb {
|
|
|
18557
18560
|
return null;
|
|
18558
18561
|
let { chars: t, folded: i, any: s, precise: o, byWord: l } = this;
|
|
18559
18562
|
if (t.length == 1) {
|
|
18560
|
-
let y = x2(e, 0),
|
|
18563
|
+
let y = x2(e, 0), k = Q2(y), z = k == e.length ? 0 : -100;
|
|
18561
18564
|
if (y != t[0]) if (y == i[0])
|
|
18562
|
-
|
|
18565
|
+
z += -200;
|
|
18563
18566
|
else
|
|
18564
18567
|
return null;
|
|
18565
|
-
return this.ret(
|
|
18568
|
+
return this.ret(z, [0, k]);
|
|
18566
18569
|
}
|
|
18567
18570
|
let r = e.indexOf(this.pattern);
|
|
18568
18571
|
if (r == 0)
|
|
18569
18572
|
return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
|
|
18570
18573
|
let a = t.length, h = 0;
|
|
18571
18574
|
if (r < 0) {
|
|
18572
|
-
for (let y = 0,
|
|
18573
|
-
let
|
|
18574
|
-
(
|
|
18575
|
+
for (let y = 0, k = Math.min(e.length, 200); y < k && h < a; ) {
|
|
18576
|
+
let z = x2(e, y);
|
|
18577
|
+
(z == t[h] || z == i[h]) && (s[h++] = y), y += Q2(z);
|
|
18575
18578
|
}
|
|
18576
18579
|
if (h < a)
|
|
18577
18580
|
return null;
|
|
18578
18581
|
}
|
|
18579
18582
|
let c = 0, d = 0, u = !1, f = 0, p = -1, m = -1, v = /[a-z]/.test(e), w = !0;
|
|
18580
|
-
for (let y = 0,
|
|
18581
|
-
let
|
|
18582
|
-
r < 0 && (c < a &&
|
|
18583
|
-
let x, b =
|
|
18584
|
-
(!y || b == 1 && v ||
|
|
18583
|
+
for (let y = 0, k = Math.min(e.length, 200), z = 0; y < k && d < a; ) {
|
|
18584
|
+
let S = x2(e, y);
|
|
18585
|
+
r < 0 && (c < a && S == t[c] && (o[c++] = y), f < a && (S == t[f] || S == i[f] ? (f == 0 && (p = y), m = y + 1, f++) : f = 0));
|
|
18586
|
+
let x, b = S < 255 ? S >= 48 && S <= 57 || S >= 97 && S <= 122 ? 2 : S >= 65 && S <= 90 ? 1 : 0 : (x = P4(S)) != x.toLowerCase() ? 1 : x != x.toUpperCase() ? 2 : 0;
|
|
18587
|
+
(!y || b == 1 && v || z == 0 && b != 0) && (t[d] == S || i[d] == S && (u = !0) ? l[d++] = y : l.length && (w = !1)), z = b, y += Q2(S);
|
|
18585
18588
|
}
|
|
18586
18589
|
return d == a && l[0] == 0 && w ? this.result(-100 + (u ? -200 : 0), l, e) : f == a && p == 0 ? this.ret(-200 - e.length + (m == e.length ? 0 : -100), [0, m]) : r > -1 ? this.ret(-700 - e.length, [r, r + this.pattern.length]) : f == a ? this.ret(-900 - e.length, [p, m]) : d == a ? this.result(-100 + (u ? -200 : 0) + -700 + (w ? 0 : -1100), l, e) : t.length == 2 ? null : this.result((s[0] ? -700 : 0) + -200 + -1100, s, e);
|
|
18587
18590
|
}
|
|
@@ -19415,7 +19418,7 @@ const s_ = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navi
|
|
|
19415
19418
|
if (a == r && X3(n.doc, l.head) == z8(x2(a, 0)))
|
|
19416
19419
|
return {
|
|
19417
19420
|
changes: { from: l.head - a.length, to: l.head + a.length },
|
|
19418
|
-
range:
|
|
19421
|
+
range: T.cursor(l.head - a.length)
|
|
19419
19422
|
};
|
|
19420
19423
|
}
|
|
19421
19424
|
return { range: s = l };
|
|
@@ -19455,13 +19458,13 @@ function h_(n, e, t, i) {
|
|
|
19455
19458
|
return {
|
|
19456
19459
|
changes: [{ insert: e, from: l.from }, { insert: t, from: l.to }],
|
|
19457
19460
|
effects: Re.of(l.to + e.length),
|
|
19458
|
-
range:
|
|
19461
|
+
range: T.range(l.anchor + e.length, l.head + e.length)
|
|
19459
19462
|
};
|
|
19460
19463
|
let r = X3(n.doc, l.head);
|
|
19461
19464
|
return !r || /\s/.test(r) || i.indexOf(r) > -1 ? {
|
|
19462
19465
|
changes: { insert: e + t, from: l.head },
|
|
19463
19466
|
effects: Re.of(l.head + e.length),
|
|
19464
|
-
range:
|
|
19467
|
+
range: T.cursor(l.head + e.length)
|
|
19465
19468
|
} : { range: s = l };
|
|
19466
19469
|
});
|
|
19467
19470
|
return s ? null : n.update(o, {
|
|
@@ -19472,7 +19475,7 @@ function h_(n, e, t, i) {
|
|
|
19472
19475
|
function d_(n, e, t) {
|
|
19473
19476
|
let i = null, s = n.changeByRange((o) => o.empty && X3(n.doc, o.head) == t ? {
|
|
19474
19477
|
changes: { from: o.head, to: o.head + t.length, insert: t },
|
|
19475
|
-
range:
|
|
19478
|
+
range: T.cursor(o.head + t.length)
|
|
19476
19479
|
} : i = { range: o });
|
|
19477
19480
|
return i ? null : n.update(s, {
|
|
19478
19481
|
scrollIntoView: !0,
|
|
@@ -19485,7 +19488,7 @@ function u_(n, e, t, i) {
|
|
|
19485
19488
|
return {
|
|
19486
19489
|
changes: [{ insert: e, from: r.from }, { insert: e, from: r.to }],
|
|
19487
19490
|
effects: Re.of(r.to + e.length),
|
|
19488
|
-
range:
|
|
19491
|
+
range: T.range(r.anchor + e.length, r.head + e.length)
|
|
19489
19492
|
};
|
|
19490
19493
|
let a = r.head, h = X3(n.doc, a), c;
|
|
19491
19494
|
if (h == e) {
|
|
@@ -19493,13 +19496,13 @@ function u_(n, e, t, i) {
|
|
|
19493
19496
|
return {
|
|
19494
19497
|
changes: { insert: e + e, from: a },
|
|
19495
19498
|
effects: Re.of(a + e.length),
|
|
19496
|
-
range:
|
|
19499
|
+
range: T.cursor(a + e.length)
|
|
19497
19500
|
};
|
|
19498
19501
|
if (V8(n, a)) {
|
|
19499
19502
|
let u = t && n.sliceDoc(a, a + e.length * 3) == e + e + e ? e + e + e : e;
|
|
19500
19503
|
return {
|
|
19501
19504
|
changes: { from: a, to: a + u.length, insert: u },
|
|
19502
|
-
range:
|
|
19505
|
+
range: T.cursor(a + u.length)
|
|
19503
19506
|
};
|
|
19504
19507
|
}
|
|
19505
19508
|
} else {
|
|
@@ -19507,13 +19510,13 @@ function u_(n, e, t, i) {
|
|
|
19507
19510
|
return {
|
|
19508
19511
|
changes: { insert: e + e + e + e, from: a },
|
|
19509
19512
|
effects: Re.of(a + e.length),
|
|
19510
|
-
range:
|
|
19513
|
+
range: T.cursor(a + e.length)
|
|
19511
19514
|
};
|
|
19512
19515
|
if (n.charCategorizer(a)(h) != H0.Word && us(n, a, s) > -1 && !f_(n, a, e, s))
|
|
19513
19516
|
return {
|
|
19514
19517
|
changes: { insert: e + e, from: a },
|
|
19515
19518
|
effects: Re.of(a + e.length),
|
|
19516
|
-
range:
|
|
19519
|
+
range: T.cursor(a + e.length)
|
|
19517
19520
|
};
|
|
19518
19521
|
}
|
|
19519
19522
|
return { range: o = r };
|
|
@@ -21533,14 +21536,14 @@ function ay(n, e) {
|
|
|
21533
21536
|
} else if (u == "tag") {
|
|
21534
21537
|
let m = k6(c, p), v = r[m], w = [], y = p && p.lastChild;
|
|
21535
21538
|
m && (!y || y.name != "CloseTag" || o3(c, y) != m) && w.push(v ? v.closeCompletion : { label: "</" + m + ">", type: "type", boost: 2 });
|
|
21536
|
-
let
|
|
21539
|
+
let k = w.concat(((v == null ? void 0 : v.children) || (p ? o : l)).map((z) => z.openCompletion));
|
|
21537
21540
|
if (p && (v != null && v.text.length)) {
|
|
21538
|
-
let
|
|
21539
|
-
|
|
21541
|
+
let z = p.firstChild;
|
|
21542
|
+
z.to > a.pos - 20 && !/\S/.test(a.state.sliceDoc(z.to, a.pos)) && (k = k.concat(v.text));
|
|
21540
21543
|
}
|
|
21541
21544
|
return {
|
|
21542
21545
|
from: f,
|
|
21543
|
-
options:
|
|
21546
|
+
options: k,
|
|
21544
21547
|
validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
|
|
21545
21548
|
};
|
|
21546
21549
|
} else
|
|
@@ -21605,7 +21608,7 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21605
21608
|
if (p.from == u - 2 && ((d = v.lastChild) === null || d === void 0 ? void 0 : d.name) != "CloseTag" && (m = Ms(l.doc, v, u))) {
|
|
21606
21609
|
let w = u + (l.doc.sliceString(u, u + 1) === ">" ? 1 : 0), y = `${m}>`;
|
|
21607
21610
|
return {
|
|
21608
|
-
range:
|
|
21611
|
+
range: T.cursor(u + y.length, -1),
|
|
21609
21612
|
changes: { from: u, to: w, insert: y }
|
|
21610
21613
|
};
|
|
21611
21614
|
}
|
|
@@ -21761,11 +21764,11 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21761
21764
|
url: i == null ? void 0 : i.blobUrl,
|
|
21762
21765
|
extension: r.value
|
|
21763
21766
|
}]), r = i0(() => {
|
|
21764
|
-
const
|
|
21765
|
-
if (!
|
|
21766
|
-
const H =
|
|
21767
|
-
let
|
|
21768
|
-
return
|
|
21767
|
+
const O = o.value;
|
|
21768
|
+
if (!O) return;
|
|
21769
|
+
const H = O.lastIndexOf(".");
|
|
21770
|
+
let D = O == null ? void 0 : O.slice(H + 1);
|
|
21771
|
+
return D = D == null ? void 0 : D.toLowerCase(), D;
|
|
21769
21772
|
}), a = i0(() => (o.value, c.value || d.value || u.value));
|
|
21770
21773
|
i0(() => ({
|
|
21771
21774
|
isUv: c.value,
|
|
@@ -21774,18 +21777,18 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21774
21777
|
isNc: u.value
|
|
21775
21778
|
}));
|
|
21776
21779
|
const h = i0(() => (r == null ? void 0 : r.value) === "cpt"), c = i0(() => (r == null ? void 0 : r.value) === "uv"), d = i0(() => (r == null ? void 0 : r.value) === "cyd"), u = i0(() => (r == null ? void 0 : r.value) === "nc"), f = i0(() => (r == null ? void 0 : r.value) === "txt"), p = i0(() => {
|
|
21777
|
-
var
|
|
21778
|
-
return ((H = (
|
|
21780
|
+
var O, H, D, e0, Z, V;
|
|
21781
|
+
return ((H = (O = i.blobUrl) == null ? void 0 : O.toUpperCase()) == null ? void 0 : H.includes(".OBJ")) || ((e0 = (D = i.blobUrl) == null ? void 0 : D.toUpperCase()) == null ? void 0 : e0.includes(".STL")) || ((V = (Z = i.blobUrl) == null ? void 0 : Z.toUpperCase()) == null ? void 0 : V.includes(".MTL")) || (r == null ? void 0 : r.value) === "obj" || (r == null ? void 0 : r.value) === "stl";
|
|
21779
21782
|
}), m = i0(() => (r == null ? void 0 : r.value) === "ls"), v = i0(() => {
|
|
21780
|
-
var
|
|
21781
|
-
return ((H = (
|
|
21782
|
-
}), w = i0(() => v.value), y = i0(() => (r == null ? void 0 : r.value) === "docx"),
|
|
21783
|
-
const
|
|
21784
|
-
return
|
|
21785
|
-
}), b = i0(() => (r == null ? void 0 : r.value) === "pptx"), P = i0(() => (r == null ? void 0 : r.value) === "mp4"), I = i0(() => !f && !m && !w && !y && !
|
|
21783
|
+
var O, H;
|
|
21784
|
+
return ((H = (O = i.blobUrl) == null ? void 0 : O.toUpperCase()) == null ? void 0 : H.includes(".URDF")) || (r == null ? void 0 : r.value) === "urdf";
|
|
21785
|
+
}), w = i0(() => v.value), y = i0(() => (r == null ? void 0 : r.value) === "docx"), k = i0(() => (r == null ? void 0 : r.value) === "csv"), z = i0(() => (r == null ? void 0 : r.value) === "xlsx"), S = i0(() => (r == null ? void 0 : r.value) === "pdf"), x = i0(() => {
|
|
21786
|
+
const O = r == null ? void 0 : r.value;
|
|
21787
|
+
return O === "jpg" || O === "jpeg" || O === "png" || O === "gif" || O === "webp" || O === "bmp";
|
|
21788
|
+
}), b = i0(() => (r == null ? void 0 : r.value) === "pptx"), P = i0(() => (r == null ? void 0 : r.value) === "mp4"), I = i0(() => !f && !m && !w && !y && !z && !S && !x && !b);
|
|
21786
21789
|
return g1(() => {
|
|
21787
21790
|
t("destroy");
|
|
21788
|
-
}), (
|
|
21791
|
+
}), (O, H) => (_(), E("div", ky, [
|
|
21789
21792
|
a.value ? (_(), E("div", Oy, [
|
|
21790
21793
|
J(Ci, {
|
|
21791
21794
|
files: l.value,
|
|
@@ -21813,19 +21816,19 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21813
21816
|
key: i == null ? void 0 : i.fullScreen
|
|
21814
21817
|
}, null, 8, ["files"]))
|
|
21815
21818
|
])) : s0("", !0),
|
|
21816
|
-
|
|
21819
|
+
z.value ? (_(), E("div", Ty, [
|
|
21817
21820
|
J(zp, {
|
|
21818
21821
|
fileName: o.value,
|
|
21819
21822
|
blobUrl: s.value
|
|
21820
21823
|
}, null, 8, ["fileName", "blobUrl"])
|
|
21821
21824
|
])) : s0("", !0),
|
|
21822
|
-
|
|
21825
|
+
k.value ? (_(), E("div", zy, [
|
|
21823
21826
|
J(Bp, {
|
|
21824
21827
|
fileName: o.value,
|
|
21825
21828
|
blobUrl: s.value
|
|
21826
21829
|
}, null, 8, ["fileName", "blobUrl"])
|
|
21827
21830
|
])) : s0("", !0),
|
|
21828
|
-
|
|
21831
|
+
S.value ? (_(), E("div", Py, [
|
|
21829
21832
|
J(Ip, {
|
|
21830
21833
|
fileName: o.value,
|
|
21831
21834
|
blobUrl: s.value
|
|
@@ -21848,7 +21851,7 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21848
21851
|
fileName: o.value,
|
|
21849
21852
|
blobUrl: s.value
|
|
21850
21853
|
}, null, 8, ["fileName", "blobUrl"])
|
|
21851
|
-
])) : !y.value && !
|
|
21854
|
+
])) : !y.value && !z.value && !S.value && !v.value && !x.value && !b.value && !p.value && !P.value && !a.value && !k.value ? (_(), E("div", Ey, [
|
|
21852
21855
|
J(py, {
|
|
21853
21856
|
fileName: o.value,
|
|
21854
21857
|
blobUrl: s.value
|
|
@@ -21914,9 +21917,9 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
21914
21917
|
const p = o.value;
|
|
21915
21918
|
return (v = p == null ? void 0 : p[0]) == null ? void 0 : v.name;
|
|
21916
21919
|
}), h = () => {
|
|
21917
|
-
var v, w, y,
|
|
21920
|
+
var v, w, y, k;
|
|
21918
21921
|
var p = document.createElement("a"), m = (w = (v = o.value) == null ? void 0 : v[0]) == null ? void 0 : w.blobUrl;
|
|
21919
|
-
p.style.display = "none", p.href = m, p.download = decodeURI((
|
|
21922
|
+
p.style.display = "none", p.href = m, p.download = decodeURI((k = (y = o.value) == null ? void 0 : y[0]) == null ? void 0 : k.name), document.body.appendChild(p), p.click(), document.body.removeChild(p);
|
|
21920
21923
|
}, c = N(!1), d = () => {
|
|
21921
21924
|
const p = c.value;
|
|
21922
21925
|
c.value = !p;
|
|
@@ -22024,19 +22027,19 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22024
22027
|
}) : b = await rr({
|
|
22025
22028
|
url: (I = h2(x)) == null ? void 0 : I.url
|
|
22026
22029
|
}), !x.url.toUpperCase().includes(".OBJ") && !x.url.toUpperCase().includes(".STL") && !x.url.toUpperCase().includes(".MTL") && !x.url.toUpperCase().includes(".URDF")) {
|
|
22027
|
-
let
|
|
22028
|
-
d.value =
|
|
22030
|
+
let O = URL.createObjectURL(b.data);
|
|
22031
|
+
d.value = O;
|
|
22029
22032
|
} else
|
|
22030
22033
|
d.value = x == null ? void 0 : x.url;
|
|
22031
22034
|
}, m = async (x) => {
|
|
22032
|
-
var P, I,
|
|
22035
|
+
var P, I, O, H, D, e0, Z, V, W;
|
|
22033
22036
|
if ((x == null ? void 0 : x.oldUrl) || (x == null ? void 0 : x.url)) {
|
|
22034
22037
|
const u0 = vf.service({
|
|
22035
22038
|
lock: !0,
|
|
22036
22039
|
text: "Loading",
|
|
22037
22040
|
background: "rgba(0, 0, 0, 0.7)"
|
|
22038
22041
|
});
|
|
22039
|
-
c.value = x != null && x.oldUrl ? (
|
|
22042
|
+
c.value = x != null && x.oldUrl ? (O = x == null ? void 0 : x.oldUrl) == null ? void 0 : O.split("/")[((I = (P = x == null ? void 0 : x.oldUrl) == null ? void 0 : P.split("/")) == null ? void 0 : I.length) - 1] : (x == null ? void 0 : x.name) + "." + ((W = (D = (H = h2(x)) == null ? void 0 : H.url) == null ? void 0 : D.split(".")) == null ? void 0 : W[((V = (Z = (e0 = h2(x)) == null ? void 0 : e0.url) == null ? void 0 : Z.split(".")) == null ? void 0 : V.length) - 1]), await p(x).finally(() => {
|
|
22040
22043
|
u0.close();
|
|
22041
22044
|
});
|
|
22042
22045
|
} else {
|
|
@@ -22054,37 +22057,37 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22054
22057
|
var b;
|
|
22055
22058
|
u.value = (b = h2(u.value)) == null ? void 0 : b.filter((P, I) => I !== x), a.value = u.value;
|
|
22056
22059
|
}, y = (x) => {
|
|
22057
|
-
var
|
|
22058
|
-
const b = x.split(","), P = (
|
|
22059
|
-
let
|
|
22060
|
-
const H = new Uint8Array(
|
|
22061
|
-
for (;
|
|
22062
|
-
H[
|
|
22060
|
+
var D;
|
|
22061
|
+
const b = x.split(","), P = (D = b == null ? void 0 : b[0]) == null ? void 0 : D.match(/:(.*?);/)[1], I = atob(b[1]);
|
|
22062
|
+
let O = I.length;
|
|
22063
|
+
const H = new Uint8Array(O);
|
|
22064
|
+
for (; O--; )
|
|
22065
|
+
H[O] = I.charCodeAt(O);
|
|
22063
22066
|
return new Blob([H], { type: P });
|
|
22064
|
-
},
|
|
22067
|
+
}, k = async () => {
|
|
22065
22068
|
var I;
|
|
22066
22069
|
s.value = !0;
|
|
22067
|
-
const x = (I = a.value) == null ? void 0 : I.map(async (
|
|
22068
|
-
if (
|
|
22069
|
-
const H = new FormData(),
|
|
22070
|
-
return H.append("file",
|
|
22071
|
-
} else if (
|
|
22070
|
+
const x = (I = a.value) == null ? void 0 : I.map(async (O) => {
|
|
22071
|
+
if (O != null && O.base64) {
|
|
22072
|
+
const H = new FormData(), D = y(O == null ? void 0 : O.base64);
|
|
22073
|
+
return H.append("file", D, O == null ? void 0 : O.name), await M6(H);
|
|
22074
|
+
} else if (O != null && O.raw) {
|
|
22072
22075
|
const H = new FormData();
|
|
22073
|
-
return H.append("file",
|
|
22076
|
+
return H.append("file", O == null ? void 0 : O.raw, O == null ? void 0 : O.name), await M6(H);
|
|
22074
22077
|
} else
|
|
22075
|
-
return
|
|
22078
|
+
return O;
|
|
22076
22079
|
}), b = await Promise.all(x);
|
|
22077
22080
|
let P = [];
|
|
22078
|
-
b == null || b.map((
|
|
22079
|
-
var H,
|
|
22081
|
+
b == null || b.map((O) => {
|
|
22082
|
+
var H, D, e0, Z, V, W;
|
|
22080
22083
|
return P.push({
|
|
22081
|
-
name: ((
|
|
22082
|
-
url: ((Z = (e0 =
|
|
22083
|
-
}), (W = (V =
|
|
22084
|
+
name: ((D = (H = O == null ? void 0 : O.data) == null ? void 0 : H.result) == null ? void 0 : D.fileName) ?? (O == null ? void 0 : O.name),
|
|
22085
|
+
url: ((Z = (e0 = O == null ? void 0 : O.data) == null ? void 0 : e0.result) == null ? void 0 : Z.url) ?? (O == null ? void 0 : O.url)
|
|
22086
|
+
}), (W = (V = O == null ? void 0 : O.data) == null ? void 0 : V.result) == null ? void 0 : W.url;
|
|
22084
22087
|
}), H3.success("上传成功"), o.value = P, i("update:modelValue", P), i("change", P), a.value = [], h.value = !1, s.value = !1;
|
|
22085
|
-
},
|
|
22088
|
+
}, z = () => {
|
|
22086
22089
|
h.value = !1, a.value = o.value, u.value = o.value;
|
|
22087
|
-
},
|
|
22090
|
+
}, S = (x) => {
|
|
22088
22091
|
if (!x) return;
|
|
22089
22092
|
const b = new FileReader();
|
|
22090
22093
|
b.onload = (P) => {
|
|
@@ -22105,7 +22108,7 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22105
22108
|
}, b.readAsDataURL(x.raw);
|
|
22106
22109
|
};
|
|
22107
22110
|
return (x, b) => {
|
|
22108
|
-
const P = X("svg-icon"), I = X("el-icon"),
|
|
22111
|
+
const P = X("svg-icon"), I = X("el-icon"), O = X("el-upload"), H = Z8("loading");
|
|
22109
22112
|
return t != null && t.isEdit ? (_(), E("div", Fy, [
|
|
22110
22113
|
J(be, {
|
|
22111
22114
|
type: "primary",
|
|
@@ -22114,23 +22117,23 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22114
22117
|
modelValue: "上传"
|
|
22115
22118
|
}),
|
|
22116
22119
|
l0("div", qy, [
|
|
22117
|
-
(_(!0), E(y0, null, k0(o.value, (
|
|
22120
|
+
(_(!0), E(y0, null, k0(o.value, (D) => {
|
|
22118
22121
|
var e0, Z, V, W;
|
|
22119
22122
|
return _(), E("div", {
|
|
22120
22123
|
class: "upload-content-title",
|
|
22121
|
-
key:
|
|
22124
|
+
key: D,
|
|
22122
22125
|
style: { display: "flex", "justify-content": "space-between", width: "100%", position: "relative" }
|
|
22123
22126
|
}, [
|
|
22124
22127
|
l0("div", {
|
|
22125
22128
|
style: { width: "90%", overflow: "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" },
|
|
22126
|
-
title:
|
|
22127
|
-
}, $0((Z = (e0 =
|
|
22129
|
+
title: D == null ? void 0 : D.name
|
|
22130
|
+
}, $0((Z = (e0 = D == null ? void 0 : D.url) == null ? void 0 : e0.split(".")) != null && Z[1] ? (D == null ? void 0 : D.name) + "." + ((W = (V = D == null ? void 0 : D.url) == null ? void 0 : V.split(".")) == null ? void 0 : W[1]) : D == null ? void 0 : D.name), 9, Yy),
|
|
22128
22131
|
l0("div", Ky, [
|
|
22129
22132
|
J(P, {
|
|
22130
22133
|
class: "icon-blue",
|
|
22131
22134
|
name: "EyeFill",
|
|
22132
22135
|
style: { width: "20px", height: "20px", cursor: "pointer" },
|
|
22133
|
-
onClick: (u0) => m(
|
|
22136
|
+
onClick: (u0) => m(D)
|
|
22134
22137
|
}, null, 8, ["onClick"])
|
|
22135
22138
|
])
|
|
22136
22139
|
]);
|
|
@@ -22138,20 +22141,20 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22138
22141
|
]),
|
|
22139
22142
|
J(z4, {
|
|
22140
22143
|
visible: h.value,
|
|
22141
|
-
onBeforeDestroy:
|
|
22144
|
+
onBeforeDestroy: z,
|
|
22142
22145
|
title: "上传文件"
|
|
22143
22146
|
}, {
|
|
22144
22147
|
default: L(() => [
|
|
22145
22148
|
gt((_(), E("div", null, [
|
|
22146
|
-
J(
|
|
22149
|
+
J(O, {
|
|
22147
22150
|
"file-list": u.value,
|
|
22148
|
-
"onUpdate:fileList": b[0] || (b[0] = (
|
|
22151
|
+
"onUpdate:fileList": b[0] || (b[0] = (D) => u.value = D),
|
|
22149
22152
|
multiple: "",
|
|
22150
22153
|
drag: "",
|
|
22151
22154
|
action: "",
|
|
22152
22155
|
"auto-upload": !1,
|
|
22153
22156
|
limit: 20,
|
|
22154
|
-
"on-change":
|
|
22157
|
+
"on-change": S,
|
|
22155
22158
|
class: "upload-content"
|
|
22156
22159
|
}, {
|
|
22157
22160
|
tip: L(() => b[1] || (b[1] = [
|
|
@@ -22169,17 +22172,17 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22169
22172
|
l0("em", null, "点击上传")
|
|
22170
22173
|
], -1))
|
|
22171
22174
|
]),
|
|
22172
|
-
file: L(({ file:
|
|
22175
|
+
file: L(({ file: D, index: e0 }) => {
|
|
22173
22176
|
var Z, V, W, u0;
|
|
22174
22177
|
return [
|
|
22175
22178
|
l0("div", Xy, [
|
|
22176
|
-
l0("div", Qy, $0((V = (Z =
|
|
22179
|
+
l0("div", Qy, $0((V = (Z = D == null ? void 0 : D.url) == null ? void 0 : Z.split(".")) != null && V[1] ? (D == null ? void 0 : D.name) + "." + ((u0 = (W = D == null ? void 0 : D.url) == null ? void 0 : W.split(".")) == null ? void 0 : u0[1]) : D == null ? void 0 : D.name), 1),
|
|
22177
22180
|
l0("div", Jy, [
|
|
22178
22181
|
J(P, {
|
|
22179
22182
|
class: "icon-blue",
|
|
22180
22183
|
name: "EyeFill",
|
|
22181
22184
|
style: { width: "20px", height: "20px", cursor: "pointer" },
|
|
22182
|
-
onClick: (h0) => m(
|
|
22185
|
+
onClick: (h0) => m(D)
|
|
22183
22186
|
}, null, 8, ["onClick"]),
|
|
22184
22187
|
J(P, {
|
|
22185
22188
|
class: "icon-blue",
|
|
@@ -22200,14 +22203,14 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22200
22203
|
footer: L(() => [
|
|
22201
22204
|
l0("div", Zy, [
|
|
22202
22205
|
J(be, {
|
|
22203
|
-
onClickTrigger:
|
|
22206
|
+
onClickTrigger: z,
|
|
22204
22207
|
id: "themeBorderButton",
|
|
22205
22208
|
disabled: s.value,
|
|
22206
22209
|
modelValue: "取消"
|
|
22207
22210
|
}, null, 8, ["disabled"]),
|
|
22208
22211
|
J(be, {
|
|
22209
22212
|
type: "primary",
|
|
22210
|
-
onClickTrigger:
|
|
22213
|
+
onClickTrigger: k,
|
|
22211
22214
|
id: "themeButton",
|
|
22212
22215
|
disabled: s.value,
|
|
22213
22216
|
modelValue: "确认"
|
|
@@ -22235,7 +22238,7 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22235
22238
|
emits: ["update:modelValue", "change"],
|
|
22236
22239
|
setup(n, { emit: e }) {
|
|
22237
22240
|
const t = n, i = i0(() => "http://222.92.178.198:62001"), s = e, o = async (h) => {
|
|
22238
|
-
var m, v, w, y,
|
|
22241
|
+
var m, v, w, y, k;
|
|
22239
22242
|
const { file: c, onSuccess: d, onError: u } = h, f = new FormData();
|
|
22240
22243
|
f.append("file", c);
|
|
22241
22244
|
const p = await M6(f);
|
|
@@ -22243,7 +22246,7 @@ const hy = /* @__PURE__ */ F.inputHandler.of((n, e, t, i, s) => {
|
|
|
22243
22246
|
name: c == null ? void 0 : c.name,
|
|
22244
22247
|
uid: c == null ? void 0 : c.uid,
|
|
22245
22248
|
id: (w = (v = p == null ? void 0 : p.data) == null ? void 0 : v.result) == null ? void 0 : w.id,
|
|
22246
|
-
url: (
|
|
22249
|
+
url: (k = (y = p == null ? void 0 : p.data) == null ? void 0 : y.result) == null ? void 0 : k.url
|
|
22247
22250
|
}]);
|
|
22248
22251
|
}, l = N([]);
|
|
22249
22252
|
s2(() => t == null ? void 0 : t.modelValue, (h) => {
|
|
@@ -22760,13 +22763,13 @@ var cS = /* @__PURE__ */ d2({
|
|
|
22760
22763
|
function y() {
|
|
22761
22764
|
return t.signaturePad.isEmpty();
|
|
22762
22765
|
}
|
|
22763
|
-
function
|
|
22766
|
+
function k() {
|
|
22764
22767
|
return o.value;
|
|
22765
22768
|
}
|
|
22766
|
-
function
|
|
22769
|
+
function z() {
|
|
22767
22770
|
return t.cacheImages = [], t.cacheImages;
|
|
22768
22771
|
}
|
|
22769
|
-
function
|
|
22772
|
+
function S() {
|
|
22770
22773
|
t.signaturePad.clear(), e.emit("input", null);
|
|
22771
22774
|
}
|
|
22772
22775
|
return de(() => {
|
|
@@ -22796,9 +22799,9 @@ var cS = /* @__PURE__ */ d2({
|
|
|
22796
22799
|
lockSignaturePad: v,
|
|
22797
22800
|
openSignaturePad: w,
|
|
22798
22801
|
isEmpty: y,
|
|
22799
|
-
getPropImagesAndCacheImages:
|
|
22800
|
-
clearCacheImages:
|
|
22801
|
-
clearSignature:
|
|
22802
|
+
getPropImagesAndCacheImages: k,
|
|
22803
|
+
clearCacheImages: z,
|
|
22804
|
+
clearSignature: S
|
|
22802
22805
|
};
|
|
22803
22806
|
},
|
|
22804
22807
|
render() {
|
|
@@ -23059,18 +23062,18 @@ const dS = { class: "signature-wrap" }, uS = { class: "signature-types" }, fS =
|
|
|
23059
23062
|
const p = /{\\pict[\s\S]+?({\\\*\\blipuid\s?[\da-fA-F]+)[\s}]*/, m = new RegExp("(?:(" + p.source + "))([\\da-fA-F\\s]+)\\}", "g"), v = f.match(m), w = [];
|
|
23060
23063
|
if (v)
|
|
23061
23064
|
for (const y of v) {
|
|
23062
|
-
let
|
|
23063
|
-
y.includes("\\pngblip") ?
|
|
23065
|
+
let k = !1;
|
|
23066
|
+
y.includes("\\pngblip") ? k = "image/png" : y.includes("\\jpegblip") && (k = "image/jpeg"), k && w.push({
|
|
23064
23067
|
hex: y.replace(p, "").replace(/[^\da-fA-F]/g, ""),
|
|
23065
|
-
type:
|
|
23068
|
+
type: k
|
|
23066
23069
|
});
|
|
23067
23070
|
}
|
|
23068
23071
|
return w;
|
|
23069
23072
|
}, c = (f) => btoa(f.match(/\w{2}/g).map((p) => String.fromCharCode(parseInt(p, 16))).join("")), d = (f, p = "file") => {
|
|
23070
|
-
let m = f.split(","), v = m[0].match(/:(.*?);/)[1], w = v.split("/")[1], y = atob(m[1]),
|
|
23071
|
-
for (;
|
|
23072
|
-
k
|
|
23073
|
-
return new File([
|
|
23073
|
+
let m = f.split(","), v = m[0].match(/:(.*?);/)[1], w = v.split("/")[1], y = atob(m[1]), k = y.length, z = new Uint8Array(k);
|
|
23074
|
+
for (; k--; )
|
|
23075
|
+
z[k] = y.charCodeAt(k);
|
|
23076
|
+
return new File([z], `${p}.${w}`, {
|
|
23074
23077
|
type: v
|
|
23075
23078
|
});
|
|
23076
23079
|
}, u = async (f, p) => {
|
|
@@ -23089,13 +23092,13 @@ const dS = { class: "signature-wrap" }, uS = { class: "signature-types" }, fS =
|
|
|
23089
23092
|
o.value = [];
|
|
23090
23093
|
const m = p.clipboardData.getData("text/rtf");
|
|
23091
23094
|
if (m && m !== "") {
|
|
23092
|
-
const w = h(m).map((
|
|
23093
|
-
for (let
|
|
23095
|
+
const w = h(m).map((S) => c(S.hex));
|
|
23096
|
+
for (let S = 0; S < w.length; S++) {
|
|
23094
23097
|
let x = o.value;
|
|
23095
|
-
x.push(`data:image/png;base64,${w[
|
|
23098
|
+
x.push(`data:image/png;base64,${w[S]}`), o.value = x, await u(`data:image/png;base64,${w[S]}`, w.length);
|
|
23096
23099
|
}
|
|
23097
|
-
s.selection.root.querySelectorAll('img[src*="//:0"]').forEach((
|
|
23098
|
-
o.value[x] ?
|
|
23100
|
+
s.selection.root.querySelectorAll('img[src*="//:0"]').forEach((S, x) => {
|
|
23101
|
+
o.value[x] ? S.src = o.value[x] : S.style.display = "none";
|
|
23099
23102
|
});
|
|
23100
23103
|
}
|
|
23101
23104
|
l("update:modelValue", r.value);
|
|
@@ -23300,7 +23303,7 @@ const OS = ["onDblclick"], DS = {
|
|
|
23300
23303
|
w != null && w.value || (w == null ? void 0 : w.value) === "" ? (_(), j(Kt(l(w == null ? void 0 : w.type)), {
|
|
23301
23304
|
key: 0,
|
|
23302
23305
|
modelValue: w.value,
|
|
23303
|
-
"onUpdate:modelValue": (
|
|
23306
|
+
"onUpdate:modelValue": (k) => w.value = k,
|
|
23304
23307
|
content: (w == null ? void 0 : w.contents) ?? []
|
|
23305
23308
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "content"])) : s0("", !0)
|
|
23306
23309
|
]))), 128))
|