@worm-vue3-print/common 1.4.2 → 1.4.3
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/README.md +2 -2
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/common.css +1 -1
- package/dist/common.js +75 -67
- package/dist/core/default-template.d.ts +1 -1
- package/dist/core/format.d.ts +1 -1
- package/dist/core/h.d.ts +1 -1
- package/dist/core/icons.d.ts +1 -1
- package/dist/core/store.d.ts +1 -1
- package/dist/index.cjs +18 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +830 -793
- package/dist/print-designer.d.ts +2 -1
- package/dist/shell/binding.d.ts +1 -1
- package/dist/shell/canvas.d.ts +3 -1
- package/dist/shell/code.d.ts +1 -1
- package/dist/shell/color-picker.d.ts +1 -1
- package/dist/shell/controls.d.ts +1 -1
- package/dist/shell/crop-anchor.d.ts +1 -1
- package/dist/shell/elements.d.ts +1 -1
- package/dist/shell/expression-editor.d.ts +1 -1
- package/dist/shell/flow-list.d.ts +1 -1
- package/dist/shell/font-select.d.ts +1 -1
- package/dist/shell/format-bar.d.ts +1 -1
- package/dist/shell/help-content/changelog.d.ts +1 -1
- package/dist/shell/help-content/faq.d.ts +1 -1
- package/dist/shell/help-content/features.d.ts +1 -1
- package/dist/shell/help-content/getting-started.d.ts +1 -1
- package/dist/shell/help-content/index.d.ts +1 -1
- package/dist/shell/help-content/shortcuts.d.ts +1 -1
- package/dist/shell/help-modal.d.ts +1 -1
- package/dist/shell/page-extras.d.ts +1 -1
- package/dist/shell/panels.d.ts +1 -1
- package/dist/shell/prop-group.d.ts +1 -1
- package/dist/shell/property-panel.d.ts +1 -1
- package/dist/shell/property-search.d.ts +1 -1
- package/dist/shell/ruler.d.ts +1 -1
- package/dist/shell/table-props.d.ts +1 -1
- package/dist/shell/table.d.ts +1 -1
- package/dist/shell/toolbar-overflow.d.ts +1 -1
- package/dist/shell/toolbar.d.ts +1 -1
- package/dist/shell/watermark.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useAlign as
|
|
2
|
-
import { resolveCanvasFontFamily as wi, getPaperDimensions as
|
|
3
|
-
import { browserCodeRenderer as
|
|
4
|
-
import
|
|
1
|
+
import { useAlign as Ta, useGroup as Ea, generateId as Rt, createRuntimeElement as Ca, createFieldLabelElement as Aa, createFieldElement as Da, zoneFromPaperPoint as Ma, ZONE_ALLOWED_TYPES as _a, getZoneRects as za, clampToZone as Pa, finalizeElementZone as Ia, syncTableElementSize as $t, generateGroupId as Fa, MIN_SCALE_PERCENT as Jo, getPaperDimensions as xt, normalizeTemplateUnits as Ra, resolveCellGroupMode as bi, resolveCellBorderDisplay as rr, applyElementBorderPreset as ar, applyBorderPreset as sr, setCellBorderEdge as lr, elementVisibleBorders as La, setElementBorderEdgeVisible as ei, ELEMENT_BORDER_SIDES as dr, acceptsElementBorder as ti, resolveBorderEdgeStates as cr, barcodeUnitsPerModule as pr, barcodeQuietZoneModules as ur, layoutBarcodeSize as hr, barcodeAvailableBoxMm as fo, resolveBarcodeDesignValue as xi, BARCODE_MARGIN_BOTTOM_MODULES as fr, BARCODE_TEXT_FONT_SIZE_MODULES as mr, canMergeReason as gr, setRowType as vi, resolveCellBorderCss as io, normalizeSelection as Oa, cellImageBoxMm as Na, cropStyleDeclarations as br, resolveShrinkMinFontSize as xr, clampResizedColumnWidth as $a, cellFitCapMm as vr, cellFitWidthMm as yr, evaluateTemplate as Ot, DEFAULT_DEMO_DATA as Ge, resolveCellTextFit as wr, splitCells as Sr, mergeCells as kr, deleteCol as Ba, insertCol as on, deleteRow as Ha, insertRow as nn, resolveFlowColumns as po, resolveFlowGapX as oi, resolveFlowRowHeight as ii, detectFlowListKey as ni, RESIZE_POINTS as Wa, resolveElementBorder as Ua, resolveElementTextFit as yi, resolveElementNowrap as qa, resolveElementWhiteSpace as Ga, resolveElementRotation as Ka, PRESET_COLORS as Tr, resolveOverlayPlacement as ja, PAPER_PRESETS as St, groupFields as Er, copyTextToClipboard as Cr, isContinuousPaperSize as Ar, PROPERTY_REGISTRY as Ya, searchProperties as Va, getTableCellBindings as Xa, getElementBindings as Za, parseCropAnchor as Qa, resolveCropPreview as Ja, resolveCropTravel as es, cropWindow as ts, cropPresetOptions as os, buildCropAnchor as rn, propertyTip as fe, CROP_SCALE_LABEL as is, CROP_SCALE_MAX as ns, CROP_SCALE_MIN as an, cropAxisFields as rs, cropAxisNote as as, CROP_SAMPLE_NOTE as ss, findMainCell as Dr, DEFAULT_BORDER as no, resolveSharedCellType as ls, barcodeBarWidthRecommendText as Mr, resolveDesignImageSrc as _r, BORDER_LINE_STYLES as ri, createDefaultOptions as zr, collectWritableCells as ds, setHeaderRepeat as cs, IMAGE_FIT_OPTIONS as ai, CELL_BORDER_APPLY_HINT_MULTI as ps, CELL_BORDER_APPLY_HINT_MIXED as us, CELL_BORDER_APPLY_HINT as hs, normalizeRotationAngle as sn, isFreeAngleEditable as fs, isRotationExcludedType as ms, collectFollowMemberIds as gs, resolveFlowMaxSpan as Oo, suggestFlowColumns as bs, resolveElementBorderDisplay as xs, elementBorderEdgeVisible as ln, ELEMENT_BORDER_APPLY_HINT as vs, propertyDefault as ys, CODE_OBLIQUE_NOTE as ws, setElementBorderField as Ss, effectiveElementBorderSpec as ks, filterGroups as Ts, resolveToolbarOverflow as Es, RULER_THICKNESS as No, mmToPx as gt, chooseMajorStepMM as Cs, buildRulerTicks as As, pxToMm as ro, nextWheelScale as dn, computeFitScale as Ds, FIT_SCALE_MIN_PERCENT as Ms, computeAdsorb as _s, calcResizeRect as zs } from "@worm-vue3-print/core/designer";
|
|
2
|
+
import { resolveCanvasFontFamily as wi, getPaperDimensions as Ps, mmToPx as cn, resolveWatermarkLayout as Is, collectFollowMemberIds as Fs, normalizeFontCatalog as Rs, findFontOption as pn, fontOptionLabel as un, filterFontOptions as Ls, normalizeFontQuery as hn, TILE_DEFAULTS as Be, validateTiling as Pr, computeMaxColumns as Ir, computeTileLayout as Os, resolveSheetMm as fn, WATERMARK_DEFAULTS as X, WATERMARK_DENSITY_PRESETS as Ns, resolveSystemVariables as $s, buildFontFaceCss as Bs, normalizeTemplate as Hs, collectPrintWarnings as Ws } from "@worm-vue3-print/core";
|
|
3
|
+
import { browserCodeRenderer as Fr, fitTextNode as Us } from "@worm-vue3-print/core/browser";
|
|
4
|
+
import Rr from "jsbarcode";
|
|
5
5
|
function a(o, e = {}, t = []) {
|
|
6
6
|
return { tag: o, props: e, children: t };
|
|
7
7
|
}
|
|
8
|
-
const Lr = "http://www.w3.org/2000/svg",
|
|
9
|
-
function
|
|
8
|
+
const Lr = "http://www.w3.org/2000/svg", qs = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]), Gs = /* @__PURE__ */ new Set(["indeterminate"]);
|
|
9
|
+
function Ks(o) {
|
|
10
10
|
return o === "svg" || o === "path" || o === "circle" || o === "rect" || o === "line" || o === "g";
|
|
11
11
|
}
|
|
12
12
|
function me(o, e) {
|
|
@@ -16,7 +16,7 @@ function me(o, e) {
|
|
|
16
16
|
}
|
|
17
17
|
if (o instanceof Node)
|
|
18
18
|
return e.appendChild(o), o;
|
|
19
|
-
const { tag: t, props: i, children: n } = o, r =
|
|
19
|
+
const { tag: t, props: i, children: n } = o, r = Ks(t) ? document.createElementNS(Lr, t) : document.createElement(t);
|
|
20
20
|
for (const [s, l] of Object.entries(i))
|
|
21
21
|
if (!(l == null || l === !1))
|
|
22
22
|
if (s === "class") r.setAttribute("class", String(l));
|
|
@@ -28,14 +28,14 @@ function me(o, e) {
|
|
|
28
28
|
r.addEventListener(s.slice(2).toLowerCase(), l);
|
|
29
29
|
else if (s === "dataset")
|
|
30
30
|
for (const [c, p] of Object.entries(l)) r.dataset[c] = p;
|
|
31
|
-
else Gs.has(s) ? r[s] = !0 : typeof l == "boolean" ? l && r.setAttribute(s,
|
|
31
|
+
else Gs.has(s) ? r[s] = !0 : typeof l == "boolean" ? l && r.setAttribute(s, qs.has(s) ? "true" : "") : r.setAttribute(s, String(l));
|
|
32
32
|
for (const s of n) me(s, r);
|
|
33
33
|
return e.appendChild(r), r;
|
|
34
34
|
}
|
|
35
35
|
function Or(o) {
|
|
36
36
|
for (; o.firstChild; ) o.removeChild(o.firstChild);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const js = Lr;
|
|
39
39
|
function mo() {
|
|
40
40
|
return {
|
|
41
41
|
paperSize: "A4",
|
|
@@ -52,7 +52,7 @@ const mn = "开启拼版后只能有一个设计页面";
|
|
|
52
52
|
function Nr(o) {
|
|
53
53
|
const e = (t, i) => (t ?? []).map((n) => {
|
|
54
54
|
const r = { ...n.options };
|
|
55
|
-
return (n.printElementType?.type ?? n.type) === "table" && $t(r), { id: n.id ||
|
|
55
|
+
return (n.printElementType?.type ?? n.type) === "table" && $t(r), { id: n.id || Rt(), zone: i, options: r, printElementType: { ...n.printElementType } };
|
|
56
56
|
});
|
|
57
57
|
return {
|
|
58
58
|
...o,
|
|
@@ -67,7 +67,7 @@ function Nr(o) {
|
|
|
67
67
|
]
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Ys(o) {
|
|
71
71
|
const e = o.elements, t = (i) => e.filter((n) => (n.zone || "content") === i).map((n) => ({ id: n.id, type: n.printElementType.type, options: { ...n.options }, printElementType: { ...n.printElementType } }));
|
|
72
72
|
return {
|
|
73
73
|
unit: "mm",
|
|
@@ -88,7 +88,7 @@ function gn(o) {
|
|
|
88
88
|
return t.length ? t.map(e) : [e(mo(), 0)];
|
|
89
89
|
}
|
|
90
90
|
const ht = (o) => JSON.parse(JSON.stringify(o));
|
|
91
|
-
class
|
|
91
|
+
class Vs {
|
|
92
92
|
scale = 100;
|
|
93
93
|
showRuler = !0;
|
|
94
94
|
showGrid = !0;
|
|
@@ -114,8 +114,8 @@ class Ys {
|
|
|
114
114
|
undoStack = [];
|
|
115
115
|
redoStack = [];
|
|
116
116
|
listeners = /* @__PURE__ */ new Set();
|
|
117
|
-
align =
|
|
118
|
-
group =
|
|
117
|
+
align = Ta();
|
|
118
|
+
group = Ea();
|
|
119
119
|
constructor(e = {}) {
|
|
120
120
|
if (this.pages = gn(e.initialTemplate), this.fields = e.initialFields ?? [], e.initialElements?.length) {
|
|
121
121
|
const t = this.pages[0];
|
|
@@ -177,7 +177,7 @@ class Ys {
|
|
|
177
177
|
}
|
|
178
178
|
this.recordHistory();
|
|
179
179
|
const t = ht(this.pages[e]);
|
|
180
|
-
t.name = `${t.name ?? `页面 ${e + 1}`} 副本`, t.elements = t.elements.map((i) => ({ ...i, id:
|
|
180
|
+
t.name = `${t.name ?? `页面 ${e + 1}`} 副本`, t.elements = t.elements.map((i) => ({ ...i, id: Rt() })), this.pages.splice(e + 1, 0, t), this.switchPage(e + 1), this.emit();
|
|
181
181
|
}
|
|
182
182
|
deletePage(e) {
|
|
183
183
|
this.pages.length <= 1 || (this.recordHistory(), this.pages.splice(e, 1), this.activePageIndex = Math.max(0, Math.min(this.activePageIndex, this.pages.length - 1)), this.resetSelection(), this.emit());
|
|
@@ -250,7 +250,7 @@ class Ys {
|
|
|
250
250
|
// ─── 参考线(常驻,存于当前页 templateData.guides)───
|
|
251
251
|
addGuide(e, t) {
|
|
252
252
|
const i = this.templateData.guides ?? [];
|
|
253
|
-
this.templateData.guides = [...i, { id:
|
|
253
|
+
this.templateData.guides = [...i, { id: Rt(), type: e, position: Math.round(t * 10) / 10 }], this.emit();
|
|
254
254
|
}
|
|
255
255
|
moveGuide(e, t) {
|
|
256
256
|
const i = this.templateData.guides ?? [];
|
|
@@ -261,11 +261,11 @@ class Ys {
|
|
|
261
261
|
}
|
|
262
262
|
// ─── 元素增删改 ───
|
|
263
263
|
addElement(e, t = {}, i) {
|
|
264
|
-
const n =
|
|
264
|
+
const n = Ca(e, t);
|
|
265
265
|
return i && !this.placeAtDropPoint(n, i) || (this.recordHistory(), this.templateData.elements.push(n), this.select(/* @__PURE__ */ new Set([n.id])), this.emit()), n;
|
|
266
266
|
}
|
|
267
267
|
addFieldElement(e, t = {}, i, n = !1) {
|
|
268
|
-
const r = n ?
|
|
268
|
+
const r = n ? Aa(e) : Da(e);
|
|
269
269
|
return Object.assign(r.options, t), i && !this.placeAtDropPoint(r, i) || (this.recordHistory(), this.templateData.elements.push(r), this.select(/* @__PURE__ */ new Set([r.id])), this.emit()), r;
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
@@ -273,11 +273,11 @@ class Ys {
|
|
|
273
273
|
* dropPoint 为纸面 mm;页眉/页脚不允许的类型返回 false(调用方不加入元素)。
|
|
274
274
|
*/
|
|
275
275
|
placeAtDropPoint(e, t) {
|
|
276
|
-
const i = this.templateData, n =
|
|
277
|
-
if (n !== "content" && !
|
|
276
|
+
const i = this.templateData, n = Ma(i, t.x, t.y);
|
|
277
|
+
if (n !== "content" && !_a.includes(e.printElementType.type))
|
|
278
278
|
return alert("该元素类型不能放入页眉/页脚"), !1;
|
|
279
|
-
const r =
|
|
280
|
-
return e.zone = n, e.options.left = t.x - r.left, e.options.top = t.y - r.top, n !== "content" &&
|
|
279
|
+
const r = za(i)[n];
|
|
280
|
+
return e.zone = n, e.options.left = t.x - r.left, e.options.top = t.y - r.top, n !== "content" && Pa(e, r), !0;
|
|
281
281
|
}
|
|
282
282
|
deleteSelected() {
|
|
283
283
|
this.selectedIds.size && (this.recordHistory(), this.templateData.elements = this.templateData.elements.filter((e) => !this.selectedIds.has(e.id)), this.selectedIds = /* @__PURE__ */ new Set(), this.emit());
|
|
@@ -326,7 +326,7 @@ class Ys {
|
|
|
326
326
|
let t = !1;
|
|
327
327
|
for (const i of this.elements) {
|
|
328
328
|
const n = e.get(i.id);
|
|
329
|
-
!n || n === this.geoSig(i) ||
|
|
329
|
+
!n || n === this.geoSig(i) || Ia(i, this.templateData).rejected && (t = !0);
|
|
330
330
|
}
|
|
331
331
|
t && alert("该元素类型不能放入页眉/页脚"), this.emit();
|
|
332
332
|
}
|
|
@@ -386,7 +386,7 @@ class Ys {
|
|
|
386
386
|
const n = this.templateData.elements;
|
|
387
387
|
for (const r of this.clipboard) {
|
|
388
388
|
const s = ht(r);
|
|
389
|
-
s.id =
|
|
389
|
+
s.id = Rt(), s.options.left += e, s.options.top += e, s.options.groupId = s.options.groupId ? i.get(s.options.groupId) : void 0, n.push(s);
|
|
390
390
|
}
|
|
391
391
|
this.emit();
|
|
392
392
|
}
|
|
@@ -450,7 +450,7 @@ class Ys {
|
|
|
450
450
|
}
|
|
451
451
|
// ─── 序列化 ───
|
|
452
452
|
getTemplateJson() {
|
|
453
|
-
const e = this.pages.map(
|
|
453
|
+
const e = this.pages.map(Ys), t = e.length === 1 ? e[0] : { version: 1, pages: e };
|
|
454
454
|
return JSON.stringify(t);
|
|
455
455
|
}
|
|
456
456
|
loadTemplate(e) {
|
|
@@ -461,13 +461,13 @@ class Ys {
|
|
|
461
461
|
return xt(this.templateData);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
const et = /* @__PURE__ */ Symbol("mixed"), $o = /* @__PURE__ */ new Set(["text", "longText"]),
|
|
464
|
+
const et = /* @__PURE__ */ Symbol("mixed"), $o = /* @__PURE__ */ new Set(["text", "longText"]), Xs = ["top", "right", "bottom", "left"], Zs = { on: !0, off: !1, mixed: et };
|
|
465
465
|
function bn(o) {
|
|
466
466
|
const e = cr(o), t = {};
|
|
467
|
-
for (const i of
|
|
467
|
+
for (const i of Xs) t[i] = Zs[e[i]];
|
|
468
468
|
return t;
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const Qs = [
|
|
471
471
|
"fontFamily",
|
|
472
472
|
"fontSize",
|
|
473
473
|
"fontWeight",
|
|
@@ -476,7 +476,7 @@ const Zs = [
|
|
|
476
476
|
"verticalAlign",
|
|
477
477
|
"textDecoration"
|
|
478
478
|
];
|
|
479
|
-
class
|
|
479
|
+
class Js {
|
|
480
480
|
constructor(e) {
|
|
481
481
|
this.store = e;
|
|
482
482
|
}
|
|
@@ -700,7 +700,7 @@ class Qs {
|
|
|
700
700
|
get elementEdges() {
|
|
701
701
|
if (this.context !== "elements") return null;
|
|
702
702
|
const e = this.selectedElements;
|
|
703
|
-
return e.length ? bn(e.map((t) =>
|
|
703
|
+
return e.length ? bn(e.map((t) => La(t.options))) : null;
|
|
704
704
|
}
|
|
705
705
|
/** 元素分边切换:勾上用面板草稿;整圈生效时撤一边会把其余三边展开成分边 */
|
|
706
706
|
toggleElementEdge(e, t) {
|
|
@@ -755,7 +755,7 @@ class Qs {
|
|
|
755
755
|
if (!t) return !1;
|
|
756
756
|
const i = t.options, n = t.printElementType.type;
|
|
757
757
|
return this.painterSnapshot = {
|
|
758
|
-
text: $o.has(n) ? Object.fromEntries(
|
|
758
|
+
text: $o.has(n) ? Object.fromEntries(Qs.map((r) => [r, i[r]])) : null,
|
|
759
759
|
backgroundColor: i.backgroundColor,
|
|
760
760
|
border: ti(n) ? { borderWidth: i.borderWidth, borderStyle: i.borderStyle, borderColor: i.borderColor, borders: this.clonePainterBorders(i.borders) } : null
|
|
761
761
|
}, this.painterSource = t.id, this.painterActive = !0, this.painterLocked = e, !0;
|
|
@@ -795,10 +795,10 @@ function xn(o, e) {
|
|
|
795
795
|
for (var t = 0, i = Array(e); t < e; t++) i[t] = o[t];
|
|
796
796
|
return i;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function el(o) {
|
|
799
799
|
if (Array.isArray(o)) return o;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function tl(o, e) {
|
|
802
802
|
var t = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
|
|
803
803
|
if (t != null) {
|
|
804
804
|
var i, n, r, s, l = [], c = !0, p = !1;
|
|
@@ -816,21 +816,21 @@ function el(o, e) {
|
|
|
816
816
|
return l;
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function ol() {
|
|
820
820
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
821
821
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
822
822
|
}
|
|
823
|
-
function ol(o, e) {
|
|
824
|
-
return Js(o) || el(o, e) || il(o, e) || tl();
|
|
825
|
-
}
|
|
826
823
|
function il(o, e) {
|
|
824
|
+
return el(o) || tl(o, e) || nl(o, e) || ol();
|
|
825
|
+
}
|
|
826
|
+
function nl(o, e) {
|
|
827
827
|
if (o) {
|
|
828
828
|
if (typeof o == "string") return xn(o, e);
|
|
829
829
|
var t = {}.toString.call(o).slice(8, -1);
|
|
830
830
|
return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? xn(o, e) : void 0;
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
const $r = Object.entries, vn = Object.setPrototypeOf,
|
|
833
|
+
const $r = Object.entries, vn = Object.setPrototypeOf, rl = Object.isFrozen, al = Object.getPrototypeOf, sl = Object.getOwnPropertyDescriptor;
|
|
834
834
|
let ne = Object.freeze, ae = Object.seal, bt = Object.create, Br = typeof Reflect < "u" && Reflect, si = Br.apply, li = Br.construct;
|
|
835
835
|
ne || (ne = function(e) {
|
|
836
836
|
return e;
|
|
@@ -848,7 +848,7 @@ li || (li = function(e) {
|
|
|
848
848
|
i[n - 1] = arguments[n];
|
|
849
849
|
return new e(...i);
|
|
850
850
|
});
|
|
851
|
-
const Qe = ie(Array.prototype.forEach),
|
|
851
|
+
const Qe = ie(Array.prototype.forEach), ll = ie(Array.prototype.lastIndexOf), yn = ie(Array.prototype.pop), Dt = ie(Array.prototype.push), dl = ie(Array.prototype.splice), yt = Array.isArray, Ft = ie(String.prototype.toLowerCase), Bo = ie(String.prototype.toString), wn = ie(String.prototype.match), Mt = ie(String.prototype.replace), Sn = ie(String.prototype.indexOf), cl = ie(String.prototype.trim), pl = ie(Number.prototype.toString), ul = ie(Boolean.prototype.toString), kn = typeof BigInt > "u" ? null : ie(BigInt.prototype.toString), Tn = typeof Symbol > "u" ? null : ie(Symbol.prototype.toString), ve = ie(Object.prototype.hasOwnProperty), _t = ie(Object.prototype.toString), le = ie(RegExp.prototype.test), Ze = hl(TypeError);
|
|
852
852
|
function ie(o) {
|
|
853
853
|
return function(e) {
|
|
854
854
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -857,7 +857,7 @@ function ie(o) {
|
|
|
857
857
|
return si(o, e, i);
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
|
-
function
|
|
860
|
+
function hl(o) {
|
|
861
861
|
return function() {
|
|
862
862
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
863
863
|
t[i] = arguments[i];
|
|
@@ -865,7 +865,7 @@ function ul(o) {
|
|
|
865
865
|
};
|
|
866
866
|
}
|
|
867
867
|
function N(o, e) {
|
|
868
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
868
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ft;
|
|
869
869
|
if (vn && vn(o, null), !yt(e))
|
|
870
870
|
return o;
|
|
871
871
|
let i = e.length;
|
|
@@ -873,13 +873,13 @@ function N(o, e) {
|
|
|
873
873
|
let n = e[i];
|
|
874
874
|
if (typeof n == "string") {
|
|
875
875
|
const r = t(n);
|
|
876
|
-
r !== n && (
|
|
876
|
+
r !== n && (rl(e) || (e[i] = r), n = r);
|
|
877
877
|
}
|
|
878
878
|
o[n] = !0;
|
|
879
879
|
}
|
|
880
880
|
return o;
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function fl(o) {
|
|
883
883
|
for (let e = 0; e < o.length; e++)
|
|
884
884
|
ve(o, e) || (o[e] = null);
|
|
885
885
|
return o;
|
|
@@ -887,20 +887,20 @@ function hl(o) {
|
|
|
887
887
|
function Ee(o) {
|
|
888
888
|
const e = bt(null);
|
|
889
889
|
for (const i of $r(o)) {
|
|
890
|
-
var t =
|
|
890
|
+
var t = il(i, 2);
|
|
891
891
|
const n = t[0], r = t[1];
|
|
892
|
-
ve(o, n) && (yt(r) ? e[n] =
|
|
892
|
+
ve(o, n) && (yt(r) ? e[n] = fl(r) : r && typeof r == "object" && r.constructor === Object ? e[n] = Ee(r) : e[n] = r);
|
|
893
893
|
}
|
|
894
894
|
return e;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function ml(o) {
|
|
897
897
|
switch (typeof o) {
|
|
898
898
|
case "string":
|
|
899
899
|
return o;
|
|
900
900
|
case "number":
|
|
901
|
-
return cl(o);
|
|
902
|
-
case "boolean":
|
|
903
901
|
return pl(o);
|
|
902
|
+
case "boolean":
|
|
903
|
+
return ul(o);
|
|
904
904
|
case "bigint":
|
|
905
905
|
return kn ? kn(o) : "0";
|
|
906
906
|
case "symbol":
|
|
@@ -924,34 +924,34 @@ function fl(o) {
|
|
|
924
924
|
}
|
|
925
925
|
function _e(o, e) {
|
|
926
926
|
for (; o !== null; ) {
|
|
927
|
-
const i =
|
|
927
|
+
const i = sl(o, e);
|
|
928
928
|
if (i) {
|
|
929
929
|
if (i.get)
|
|
930
930
|
return ie(i.get);
|
|
931
931
|
if (typeof i.value == "function")
|
|
932
932
|
return ie(i.value);
|
|
933
933
|
}
|
|
934
|
-
o =
|
|
934
|
+
o = al(o);
|
|
935
935
|
}
|
|
936
936
|
function t() {
|
|
937
937
|
return null;
|
|
938
938
|
}
|
|
939
939
|
return t;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function gl(o) {
|
|
942
942
|
try {
|
|
943
943
|
return le(o, ""), !0;
|
|
944
944
|
} catch {
|
|
945
945
|
return !1;
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
-
const En = ne(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ho = ne(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Wo = ne(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]),
|
|
948
|
+
const En = ne(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ho = ne(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Wo = ne(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), bl = ne(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Uo = ne(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), xl = ne(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Cn = ne(["#text"]), An = ne(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), qo = ne(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Dn = ne(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ao = ne(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), vl = ae(/{{[\w\W]*|^[\w\W]*}}/g), yl = ae(/<%[\w\W]*|^[\w\W]*%>/g), wl = ae(/\${[\w\W]*/g), Sl = ae(/^data-[\-\w.\u00B7-\uFFFF]+$/), kl = ae(/^aria-[\-\w]+$/), Mn = ae(
|
|
949
949
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
950
950
|
// eslint-disable-line no-useless-escape
|
|
951
|
-
),
|
|
951
|
+
), Tl = ae(/^(?:\w+script|data):/i), El = ae(
|
|
952
952
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
953
953
|
// eslint-disable-line no-control-regex
|
|
954
|
-
),
|
|
954
|
+
), Cl = ae(/^html$/i), Al = ae(/^[a-z][.\w]*(-[.\w]+)+$/i), _n = ae(/<[/\w!]/g), zn = ae(/<[/\w]/g), Dl = ae(/<\/no(script|embed|frames)/i), Ml = ae(/\/>/i), Te = {
|
|
955
955
|
element: 1,
|
|
956
956
|
attribute: 2,
|
|
957
957
|
text: 3,
|
|
@@ -967,14 +967,14 @@ const En = ne(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
967
967
|
documentFragment: 11,
|
|
968
968
|
notation: 12
|
|
969
969
|
// Deprecated
|
|
970
|
-
}, Hr = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"],
|
|
970
|
+
}, Hr = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], _l = ne(N({}, Hr)), zl = (function() {
|
|
971
971
|
const o = {};
|
|
972
972
|
return Qe(Hr, (e) => {
|
|
973
973
|
o[e] = ae(new RegExp("</" + e + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
974
974
|
}), ne(o);
|
|
975
|
-
})(),
|
|
975
|
+
})(), Pl = function() {
|
|
976
976
|
return typeof window > "u" ? null : window;
|
|
977
|
-
},
|
|
977
|
+
}, Il = function(e, t) {
|
|
978
978
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
979
979
|
return null;
|
|
980
980
|
let i = null;
|
|
@@ -1007,12 +1007,12 @@ const En = ne(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
1007
1007
|
};
|
|
1008
1008
|
}, He = function(e, t, i, n) {
|
|
1009
1009
|
return ve(e, t) && yt(e[t]) ? N(n.base ? Ee(n.base) : {}, e[t], n.transform) : i;
|
|
1010
|
-
},
|
|
1010
|
+
}, Go = function(e, t, i) {
|
|
1011
1011
|
const n = ve(e, t) ? e[t] : void 0;
|
|
1012
1012
|
return n && typeof n == "object" ? Ee(n) : i();
|
|
1013
1013
|
};
|
|
1014
1014
|
function Wr() {
|
|
1015
|
-
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
1015
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Pl();
|
|
1016
1016
|
const e = (T) => Wr(T);
|
|
1017
1017
|
if (e.version = "3.4.14", e.removed = [], !o || !o.document || o.document.nodeType !== Te.document || !o.Element)
|
|
1018
1018
|
return e.isSupported = !1, e;
|
|
@@ -1021,9 +1021,9 @@ function Wr() {
|
|
|
1021
1021
|
o.DocumentFragment;
|
|
1022
1022
|
const r = o.HTMLTemplateElement, s = o.Node, l = o.Element, c = o.NodeFilter, p = o.NamedNodeMap;
|
|
1023
1023
|
p === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
|
|
1024
|
-
const u = o.DOMParser, f = o.trustedTypes, m = l.prototype,
|
|
1024
|
+
const u = o.DOMParser, f = o.trustedTypes, m = l.prototype, b = _e(m, "cloneNode"), w = _e(m, "remove"), g = _e(m, "nextSibling"), S = _e(m, "childNodes"), k = _e(m, "parentNode"), C = _e(m, "shadowRoot"), P = _e(m, "attributes"), z = s && s.prototype ? _e(s.prototype, "nodeType") : null, H = s && s.prototype ? _e(s.prototype, "nodeName") : null, se = s && s.prototype ? _e(s.prototype, "ownerDocument") : null, j = function(d) {
|
|
1025
1025
|
return z ? z(d) : d.nodeType;
|
|
1026
|
-
},
|
|
1026
|
+
}, I = function(d) {
|
|
1027
1027
|
return H ? H(d) : d.nodeName;
|
|
1028
1028
|
};
|
|
1029
1029
|
if (typeof r == "function") {
|
|
@@ -1048,16 +1048,16 @@ function Wr() {
|
|
|
1048
1048
|
} finally {
|
|
1049
1049
|
Z--;
|
|
1050
1050
|
}
|
|
1051
|
-
},
|
|
1052
|
-
return ce || (Y =
|
|
1053
|
-
},
|
|
1051
|
+
}, Fe = function() {
|
|
1052
|
+
return ce || (Y = Il(f, n), ce = !0), Y;
|
|
1053
|
+
}, F = t, ee = F.implementation, je = F.createNodeIterator, pe = F.createDocumentFragment, Ye = F.getElementsByTagName, nt = i.importNode;
|
|
1054
1054
|
let W = Pn();
|
|
1055
1055
|
e.isSupported = typeof $r == "function" && typeof k == "function" && ee && ee.createHTMLDocument !== void 0;
|
|
1056
|
-
const ko =
|
|
1057
|
-
let Ut = Mn,
|
|
1056
|
+
const ko = vl, Ht = yl, Wt = wl, To = Sl, Ve = kl, we = Tl, Se = El, Eo = Al;
|
|
1057
|
+
let Ut = Mn, q = null;
|
|
1058
1058
|
const kt = N({}, [...En, ...Ho, ...Wo, ...Uo, ...Cn]);
|
|
1059
|
-
let
|
|
1060
|
-
const rt = N({}, [...An, ...
|
|
1059
|
+
let G = null;
|
|
1060
|
+
const rt = N({}, [...An, ...qo, ...Dn, ...ao]);
|
|
1061
1061
|
let ue = Object.seal(bt(null, {
|
|
1062
1062
|
tagNameCheck: {
|
|
1063
1063
|
writable: !0,
|
|
@@ -1077,7 +1077,7 @@ function Wr() {
|
|
|
1077
1077
|
enumerable: !0,
|
|
1078
1078
|
value: !1
|
|
1079
1079
|
}
|
|
1080
|
-
})), ke = null,
|
|
1080
|
+
})), ke = null, qt = null;
|
|
1081
1081
|
const O = Object.seal(bt(null, {
|
|
1082
1082
|
tagCheck: {
|
|
1083
1083
|
writable: !0,
|
|
@@ -1092,8 +1092,8 @@ function Wr() {
|
|
|
1092
1092
|
value: null
|
|
1093
1093
|
}
|
|
1094
1094
|
}));
|
|
1095
|
-
let Tt = !0, at = !0,
|
|
1096
|
-
const
|
|
1095
|
+
let Tt = !0, at = !0, x = !1, L = !0, Q = !1, te = !0, De = !1, Et = !1, Gt = null, Kt = null, Co = !1, st = !1, jt = !1, Yt = !1, Ii = !0, Fi = !1;
|
|
1096
|
+
const Ri = "user-content-";
|
|
1097
1097
|
let Ao = !0, Do = !1, lt = {}, dt = null;
|
|
1098
1098
|
const Li = N({}, [
|
|
1099
1099
|
"annotation-xml",
|
|
@@ -1137,26 +1137,26 @@ function Wr() {
|
|
|
1137
1137
|
let $i = null;
|
|
1138
1138
|
const Bi = N({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Vt = "http://www.w3.org/1998/Math/MathML", Xt = "http://www.w3.org/2000/svg", ze = "http://www.w3.org/1999/xhtml";
|
|
1139
1139
|
let ct = ze, Mo = !1, _o = null;
|
|
1140
|
-
const
|
|
1140
|
+
const la = N({}, [Vt, Xt, ze], Bo), Hi = ne(["mi", "mo", "mn", "ms", "mtext"]);
|
|
1141
1141
|
let zo = N({}, Hi);
|
|
1142
1142
|
const Wi = ne(["annotation-xml"]);
|
|
1143
1143
|
let Po = N({}, Wi);
|
|
1144
|
-
const
|
|
1144
|
+
const da = N({}, ["title", "style", "font", "a", "script"]);
|
|
1145
1145
|
let Ct = null;
|
|
1146
|
-
const
|
|
1146
|
+
const ca = ["application/xhtml+xml", "text/html"], pa = "text/html";
|
|
1147
1147
|
let oe = null, pt = null;
|
|
1148
|
-
const
|
|
1148
|
+
const ua = t.createElement("form"), Ui = function(d) {
|
|
1149
1149
|
return d instanceof RegExp || d instanceof Function;
|
|
1150
|
-
},
|
|
1150
|
+
}, Io = function() {
|
|
1151
1151
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1152
1152
|
if (pt && pt === d)
|
|
1153
1153
|
return;
|
|
1154
1154
|
(!d || typeof d != "object") && (d = {}), d = Ee(d), Ct = // eslint-disable-next-line unicorn/prefer-includes
|
|
1155
|
-
|
|
1155
|
+
ca.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? pa : d.PARSER_MEDIA_TYPE, oe = Ct === "application/xhtml+xml" ? Bo : Ft, q = He(d, "ALLOWED_TAGS", kt, {
|
|
1156
1156
|
transform: oe
|
|
1157
|
-
}),
|
|
1157
|
+
}), G = He(d, "ALLOWED_ATTR", rt, {
|
|
1158
1158
|
transform: oe
|
|
1159
|
-
}), _o = He(d, "ALLOWED_NAMESPACES",
|
|
1159
|
+
}), _o = He(d, "ALLOWED_NAMESPACES", la, {
|
|
1160
1160
|
transform: Bo
|
|
1161
1161
|
}), $i = He(d, "ADD_URI_SAFE_ATTR", Bi, {
|
|
1162
1162
|
transform: oe,
|
|
@@ -1168,21 +1168,21 @@ function Wr() {
|
|
|
1168
1168
|
transform: oe
|
|
1169
1169
|
}), ke = He(d, "FORBID_TAGS", Ee({}), {
|
|
1170
1170
|
transform: oe
|
|
1171
|
-
}),
|
|
1171
|
+
}), qt = He(d, "FORBID_ATTR", Ee({}), {
|
|
1172
1172
|
transform: oe
|
|
1173
|
-
}), lt = ve(d, "USE_PROFILES") ? d.USE_PROFILES && typeof d.USE_PROFILES == "object" ? Ee(d.USE_PROFILES) : d.USE_PROFILES : !1, Tt = d.ALLOW_ARIA_ATTR !== !1, at = d.ALLOW_DATA_ATTR !== !1,
|
|
1173
|
+
}), lt = ve(d, "USE_PROFILES") ? d.USE_PROFILES && typeof d.USE_PROFILES == "object" ? Ee(d.USE_PROFILES) : d.USE_PROFILES : !1, Tt = d.ALLOW_ARIA_ATTR !== !1, at = d.ALLOW_DATA_ATTR !== !1, x = d.ALLOW_UNKNOWN_PROTOCOLS || !1, L = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Q = d.SAFE_FOR_TEMPLATES || !1, te = d.SAFE_FOR_XML !== !1, De = d.WHOLE_DOCUMENT || !1, st = d.RETURN_DOM || !1, jt = d.RETURN_DOM_FRAGMENT || !1, Yt = d.RETURN_TRUSTED_TYPE || !1, Co = d.FORCE_BODY || !1, Ii = d.SANITIZE_DOM !== !1, Fi = d.SANITIZE_NAMED_PROPS || !1, Ao = d.KEEP_CONTENT !== !1, Do = d.IN_PLACE || !1, Ut = gl(d.ALLOWED_URI_REGEXP) ? d.ALLOWED_URI_REGEXP : Mn, ct = typeof d.NAMESPACE == "string" ? d.NAMESPACE : ze, zo = Go(
|
|
1174
1174
|
d,
|
|
1175
1175
|
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
1176
1176
|
() => N({}, Hi)
|
|
1177
1177
|
// Default built-in map
|
|
1178
|
-
), Po =
|
|
1178
|
+
), Po = Go(
|
|
1179
1179
|
d,
|
|
1180
1180
|
"HTML_INTEGRATION_POINTS",
|
|
1181
1181
|
() => N({}, Wi)
|
|
1182
1182
|
// Default built-in map
|
|
1183
1183
|
);
|
|
1184
|
-
const h =
|
|
1185
|
-
if (ue = bt(null), ve(h, "tagNameCheck") && Ui(h.tagNameCheck) && (ue.tagNameCheck = h.tagNameCheck), ve(h, "attributeNameCheck") && Ui(h.attributeNameCheck) && (ue.attributeNameCheck = h.attributeNameCheck), ve(h, "allowCustomizedBuiltInElements") && typeof h.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = h.allowCustomizedBuiltInElements), ae(ue), Q && (at = !1), jt && (st = !0), lt && (
|
|
1184
|
+
const h = Go(d, "CUSTOM_ELEMENT_HANDLING", () => bt(null));
|
|
1185
|
+
if (ue = bt(null), ve(h, "tagNameCheck") && Ui(h.tagNameCheck) && (ue.tagNameCheck = h.tagNameCheck), ve(h, "attributeNameCheck") && Ui(h.attributeNameCheck) && (ue.attributeNameCheck = h.attributeNameCheck), ve(h, "allowCustomizedBuiltInElements") && typeof h.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = h.allowCustomizedBuiltInElements), ae(ue), Q && (at = !1), jt && (st = !0), lt && (q = N({}, Cn), G = bt(null), lt.html === !0 && (N(q, En), N(G, An)), lt.svg === !0 && (N(q, Ho), N(G, qo), N(G, ao)), lt.svgFilters === !0 && (N(q, Wo), N(G, qo), N(G, ao)), lt.mathMl === !0 && (N(q, Uo), N(G, Dn), N(G, ao))), O.tagCheck = null, O.attributeCheck = null, ve(d, "ADD_TAGS") && (typeof d.ADD_TAGS == "function" ? O.tagCheck = d.ADD_TAGS : yt(d.ADD_TAGS) && (q === kt && (q = Ee(q)), N(q, d.ADD_TAGS, oe))), ve(d, "ADD_ATTR") && (typeof d.ADD_ATTR == "function" ? O.attributeCheck = d.ADD_ATTR : yt(d.ADD_ATTR) && (G === rt && (G = Ee(G)), N(G, d.ADD_ATTR, oe))), ve(d, "ADD_FORBID_CONTENTS") && yt(d.ADD_FORBID_CONTENTS) && (dt === Li && (dt = Ee(dt)), N(dt, d.ADD_FORBID_CONTENTS, oe)), Ao && (q["#text"] = !0), De && N(q, ["html", "head", "body"]), q.table && (N(q, ["tbody"]), delete ke.tbody), d.TRUSTED_TYPES_POLICY) {
|
|
1186
1186
|
if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1187
1187
|
throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1188
1188
|
if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -1194,22 +1194,22 @@ function Wr() {
|
|
|
1194
1194
|
} catch (E) {
|
|
1195
1195
|
throw D = y, E;
|
|
1196
1196
|
}
|
|
1197
|
-
} else d.TRUSTED_TYPES_POLICY === null ? (D = void 0, U = "") : (D === void 0 && (D =
|
|
1197
|
+
} else d.TRUSTED_TYPES_POLICY === null ? (D = void 0, U = "") : (D === void 0 && (D = Fe()), D && typeof U == "string" && (U = B("")));
|
|
1198
1198
|
ne && ne(d), pt = d;
|
|
1199
|
-
},
|
|
1200
|
-
return h.namespaceURI === ze ? d === "svg" : h.namespaceURI === Vt ? d === "svg" && (y === "annotation-xml" || zo[y]) : !!
|
|
1201
|
-
}, ha = function(d, h, y) {
|
|
1202
|
-
return h.namespaceURI === ze ? d === "math" : h.namespaceURI === Xt ? d === "math" && Po[y] : !!qi[d];
|
|
1199
|
+
}, qi = N({}, [...Ho, ...Wo, ...bl]), Gi = N({}, [...Uo, ...xl]), ha = function(d, h, y) {
|
|
1200
|
+
return h.namespaceURI === ze ? d === "svg" : h.namespaceURI === Vt ? d === "svg" && (y === "annotation-xml" || zo[y]) : !!qi[d];
|
|
1203
1201
|
}, fa = function(d, h, y) {
|
|
1204
|
-
return h.namespaceURI ===
|
|
1205
|
-
}, ma = function(d) {
|
|
1202
|
+
return h.namespaceURI === ze ? d === "math" : h.namespaceURI === Xt ? d === "math" && Po[y] : !!Gi[d];
|
|
1203
|
+
}, ma = function(d, h, y) {
|
|
1204
|
+
return h.namespaceURI === Xt && !Po[y] || h.namespaceURI === Vt && !zo[y] ? !1 : !Gi[d] && (da[d] || !qi[d]);
|
|
1205
|
+
}, ga = function(d) {
|
|
1206
1206
|
let h = k(d);
|
|
1207
1207
|
(!h || !h.tagName) && (h = {
|
|
1208
1208
|
namespaceURI: ct,
|
|
1209
1209
|
tagName: "template"
|
|
1210
1210
|
});
|
|
1211
|
-
const y =
|
|
1212
|
-
return _o[d.namespaceURI] ? d.namespaceURI === Xt ?
|
|
1211
|
+
const y = Ft(d.tagName), E = Ft(h.tagName);
|
|
1212
|
+
return _o[d.namespaceURI] ? d.namespaceURI === Xt ? ha(y, h, E) : d.namespaceURI === Vt ? fa(y, h, E) : d.namespaceURI === ze ? ma(y, h, E) : !!(Ct === "application/xhtml+xml" && _o[d.namespaceURI]) : !1;
|
|
1213
1213
|
}, $e = function(d) {
|
|
1214
1214
|
Dt(e.removed, {
|
|
1215
1215
|
element: d
|
|
@@ -1279,18 +1279,18 @@ function Wr() {
|
|
|
1279
1279
|
h.setAttribute(d, "");
|
|
1280
1280
|
} catch {
|
|
1281
1281
|
}
|
|
1282
|
-
},
|
|
1282
|
+
}, ba = function(d) {
|
|
1283
1283
|
const h = P(d);
|
|
1284
1284
|
if (h)
|
|
1285
1285
|
for (let y = h.length - 1; y >= 0; --y) {
|
|
1286
1286
|
const E = h[y], A = E && E.name;
|
|
1287
|
-
typeof A != "string" ||
|
|
1287
|
+
typeof A != "string" || G[oe(A)] || Ki(d, E, A);
|
|
1288
1288
|
}
|
|
1289
1289
|
}, Qt = function(d) {
|
|
1290
1290
|
const h = [d];
|
|
1291
1291
|
for (; h.length > 0; ) {
|
|
1292
1292
|
const y = h.pop();
|
|
1293
|
-
j(y) === Te.element &&
|
|
1293
|
+
j(y) === Te.element && ba(y);
|
|
1294
1294
|
const A = S(y);
|
|
1295
1295
|
if (A)
|
|
1296
1296
|
for (let _ = A.length - 1; _ >= 0; --_)
|
|
@@ -1298,7 +1298,7 @@ function Wr() {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
}, ji = function(d, h) {
|
|
1300
1300
|
return te ? d === "patchsrc" ? !0 : d === "for" && h !== "label" && h !== "output" : !1;
|
|
1301
|
-
},
|
|
1301
|
+
}, xa = function(d) {
|
|
1302
1302
|
if (!te)
|
|
1303
1303
|
return;
|
|
1304
1304
|
const h = [d];
|
|
@@ -1312,7 +1312,7 @@ function Wr() {
|
|
|
1312
1312
|
continue;
|
|
1313
1313
|
}
|
|
1314
1314
|
if (E === Te.element) {
|
|
1315
|
-
const _ = y, K = oe(
|
|
1315
|
+
const _ = y, K = oe(I(y));
|
|
1316
1316
|
try {
|
|
1317
1317
|
_.hasAttribute && _.hasAttribute("patchsrc") && _.removeAttribute("patchsrc"), _.hasAttribute && _.hasAttribute("for") && ji("for", K) && _.removeAttribute("for");
|
|
1318
1318
|
} catch {
|
|
@@ -1358,7 +1358,7 @@ function Wr() {
|
|
|
1358
1358
|
);
|
|
1359
1359
|
}, Jt = function(d) {
|
|
1360
1360
|
return d = Mt(d, ko, " "), d = Mt(d, Ht, " "), d = Mt(d, Wt, " "), d;
|
|
1361
|
-
},
|
|
1361
|
+
}, Fo = function(d) {
|
|
1362
1362
|
var h;
|
|
1363
1363
|
d.normalize();
|
|
1364
1364
|
const y = se ? se(d) : d.ownerDocument, E = je.call(
|
|
@@ -1373,7 +1373,7 @@ function Wr() {
|
|
|
1373
1373
|
A.data = Jt(A.data), A = E.nextNode();
|
|
1374
1374
|
const _ = (h = d.querySelectorAll) === null || h === void 0 ? void 0 : h.call(d, "template");
|
|
1375
1375
|
_ && Qe(_, (K) => {
|
|
1376
|
-
ut(K.content) &&
|
|
1376
|
+
ut(K.content) && Fo(K.content);
|
|
1377
1377
|
});
|
|
1378
1378
|
}, eo = function(d) {
|
|
1379
1379
|
const h = H ? H(d) : null;
|
|
@@ -1423,8 +1423,8 @@ function Wr() {
|
|
|
1423
1423
|
y.call(e, d, h, pt);
|
|
1424
1424
|
});
|
|
1425
1425
|
}
|
|
1426
|
-
const
|
|
1427
|
-
return !!(te && d.hasChildNodes() && !At(d.firstElementChild) && le(_n, d.textContent) && le(_n, d.innerHTML) || te && d.namespaceURI === ze &&
|
|
1426
|
+
const va = function(d, h) {
|
|
1427
|
+
return !!(te && d.hasChildNodes() && !At(d.firstElementChild) && le(_n, d.textContent) && le(_n, d.innerHTML) || te && d.namespaceURI === ze && _l[h] && (At(d.firstElementChild) || typeof d.textContent == "string" && le(zl[h], d.textContent)) || d.nodeType === Te.processingInstruction || te && d.nodeType === Te.comment && le(zn, d.data));
|
|
1428
1428
|
}, to = function(d, h) {
|
|
1429
1429
|
if (d instanceof RegExp)
|
|
1430
1430
|
return le(d, h);
|
|
@@ -1434,7 +1434,7 @@ function Wr() {
|
|
|
1434
1434
|
return !!d(h, ...E);
|
|
1435
1435
|
}
|
|
1436
1436
|
return !1;
|
|
1437
|
-
},
|
|
1437
|
+
}, ya = function(d, h, y) {
|
|
1438
1438
|
if (!ke[h] && en(h) && to(ue.tagNameCheck, h))
|
|
1439
1439
|
return !1;
|
|
1440
1440
|
if (Ao && !dt[h]) {
|
|
@@ -1442,7 +1442,7 @@ function Wr() {
|
|
|
1442
1442
|
if (A && E) {
|
|
1443
1443
|
const _ = A.length;
|
|
1444
1444
|
for (let K = _ - 1; K >= 0; --K) {
|
|
1445
|
-
const V = d === y ?
|
|
1445
|
+
const V = d === y ? b(A[K], !0) : A[K];
|
|
1446
1446
|
E.insertBefore(V, g(d));
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
@@ -1457,19 +1457,19 @@ function Wr() {
|
|
|
1457
1457
|
return !0;
|
|
1458
1458
|
if (eo(d))
|
|
1459
1459
|
return $e(d), !0;
|
|
1460
|
-
const y = oe(
|
|
1461
|
-
if (
|
|
1460
|
+
const y = oe(I(d));
|
|
1461
|
+
if (q = Xi(W.uponSanitizeElement, q, kt, Gt), Pe(W.uponSanitizeElement, d, {
|
|
1462
1462
|
tagName: y,
|
|
1463
|
-
allowedTags:
|
|
1463
|
+
allowedTags: q
|
|
1464
1464
|
}), Zi(d, h))
|
|
1465
1465
|
return !0;
|
|
1466
|
-
if (
|
|
1466
|
+
if (va(d, y))
|
|
1467
1467
|
return $e(d), !0;
|
|
1468
|
-
if (ke[y] || !(O.tagCheck instanceof Function && O.tagCheck(y)) && !
|
|
1469
|
-
const A =
|
|
1468
|
+
if (ke[y] || !(O.tagCheck instanceof Function && O.tagCheck(y)) && !q[y]) {
|
|
1469
|
+
const A = ya(d, y, h);
|
|
1470
1470
|
return A === !1 && Pe(W.afterSanitizeElements, d, null), A;
|
|
1471
1471
|
}
|
|
1472
|
-
if (j(d) === Te.element && !
|
|
1472
|
+
if (j(d) === Te.element && !ga(d) || (y === "noscript" || y === "noembed" || y === "noframes") && le(Dl, d.innerHTML))
|
|
1473
1473
|
return $e(d), !0;
|
|
1474
1474
|
if (Q && d.nodeType === Te.text) {
|
|
1475
1475
|
const A = Jt(d.textContent);
|
|
@@ -1479,10 +1479,10 @@ function Wr() {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
return Pe(W.afterSanitizeElements, d, null), !1;
|
|
1481
1481
|
}, Ji = function(d, h, y) {
|
|
1482
|
-
if (
|
|
1482
|
+
if (qt[h] || ji(h, d) || Ii && (h === "id" || h === "name") && (y in t || y in ua))
|
|
1483
1483
|
return !1;
|
|
1484
|
-
const E =
|
|
1485
|
-
return at && le(To, h) || Tt && le(Ve, h) ? !0 : E ? $i[h] || le(Ut, Mt(y, Se, "")) || (h === "src" || h === "xlink:href" || h === "href") && d !== "script" && Sn(y, "data:") === 0 && Oi[d] ||
|
|
1484
|
+
const E = G[h] || O.attributeCheck instanceof Function && O.attributeCheck(h, d);
|
|
1485
|
+
return at && le(To, h) || Tt && le(Ve, h) ? !0 : E ? $i[h] || le(Ut, Mt(y, Se, "")) || (h === "src" || h === "xlink:href" || h === "href") && d !== "script" && Sn(y, "data:") === 0 && Oi[d] || x && !le(we, Mt(y, Se, "")) ? !0 : !y : (
|
|
1486
1486
|
// Condition a) covers a basically valid custom element tag name whose
|
|
1487
1487
|
// tag passes the configured tagNameCheck and whose attribute name
|
|
1488
1488
|
// passes the configured attributeNameCheck ...
|
|
@@ -1491,9 +1491,9 @@ function Wr() {
|
|
|
1491
1491
|
// allowed.
|
|
1492
1492
|
h === "is" && ue.allowCustomizedBuiltInElements && to(ue.tagNameCheck, y)
|
|
1493
1493
|
);
|
|
1494
|
-
},
|
|
1495
|
-
return !
|
|
1496
|
-
},
|
|
1494
|
+
}, wa = N({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), en = function(d) {
|
|
1495
|
+
return !wa[Ft(d)] && le(Eo, d);
|
|
1496
|
+
}, Sa = function(d, h, y, E) {
|
|
1497
1497
|
if (D && typeof f == "object" && typeof f.getAttributeType == "function" && !y)
|
|
1498
1498
|
switch (f.getAttributeType(d, h)) {
|
|
1499
1499
|
case "TrustedHTML":
|
|
@@ -1502,7 +1502,7 @@ function Wr() {
|
|
|
1502
1502
|
return re(E);
|
|
1503
1503
|
}
|
|
1504
1504
|
return E;
|
|
1505
|
-
},
|
|
1505
|
+
}, ka = function(d, h, y, E) {
|
|
1506
1506
|
try {
|
|
1507
1507
|
y ? d.setAttributeNS(y, h, E) : d.setAttribute(h, E), eo(d) ? $e(d) : yn(e.removed);
|
|
1508
1508
|
} catch {
|
|
@@ -1513,20 +1513,20 @@ function Wr() {
|
|
|
1513
1513
|
const h = d.attributes;
|
|
1514
1514
|
if (!h || eo(d))
|
|
1515
1515
|
return;
|
|
1516
|
-
|
|
1516
|
+
G = Xi(W.uponSanitizeAttribute, G, rt, Kt);
|
|
1517
1517
|
const y = {
|
|
1518
1518
|
attrName: "",
|
|
1519
1519
|
attrValue: "",
|
|
1520
1520
|
keepAttr: !0,
|
|
1521
|
-
allowedAttributes:
|
|
1521
|
+
allowedAttributes: G,
|
|
1522
1522
|
forceKeepAttr: void 0
|
|
1523
1523
|
};
|
|
1524
1524
|
let E = h.length;
|
|
1525
1525
|
const A = oe(d.nodeName);
|
|
1526
1526
|
for (; E--; ) {
|
|
1527
1527
|
const _ = h[E], K = _.name, V = _.namespaceURI, be = _.value, xe = oe(K), Lo = be;
|
|
1528
|
-
let he = K === "value" ? Lo :
|
|
1529
|
-
if (y.attrName = xe, y.attrValue = he, y.keepAttr = !0, y.forceKeepAttr = void 0, Pe(W.uponSanitizeAttribute, d, y), he = y.attrValue,
|
|
1528
|
+
let he = K === "value" ? Lo : cl(Lo);
|
|
1529
|
+
if (y.attrName = xe, y.attrValue = he, y.keepAttr = !0, y.forceKeepAttr = void 0, Pe(W.uponSanitizeAttribute, d, y), he = y.attrValue, Fi && (xe === "id" || xe === "name") && Sn(he, Ri) !== 0 && (Xe(K, d, _), he = Ri + he), te && le(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, he)) {
|
|
1530
1530
|
Xe(K, d, _);
|
|
1531
1531
|
continue;
|
|
1532
1532
|
}
|
|
@@ -1539,7 +1539,7 @@ function Wr() {
|
|
|
1539
1539
|
Xe(K, d, _);
|
|
1540
1540
|
continue;
|
|
1541
1541
|
}
|
|
1542
|
-
if (!L && le(
|
|
1542
|
+
if (!L && le(Ml, he)) {
|
|
1543
1543
|
Xe(K, d, _);
|
|
1544
1544
|
continue;
|
|
1545
1545
|
}
|
|
@@ -1547,7 +1547,7 @@ function Wr() {
|
|
|
1547
1547
|
Xe(K, d, _);
|
|
1548
1548
|
continue;
|
|
1549
1549
|
}
|
|
1550
|
-
he =
|
|
1550
|
+
he = Sa(A, xe, V, he), he !== Lo && ka(d, K, V, he);
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
1553
|
Pe(W.afterSanitizeAttributes, d, null);
|
|
@@ -1557,10 +1557,10 @@ function Wr() {
|
|
|
1557
1557
|
for (Pe(W.beforeSanitizeShadowDOM, d, null); h = y.nextNode(); )
|
|
1558
1558
|
if (Pe(W.uponSanitizeShadowNode, h, null), Qi(h, d), tn(h), ut(h.content) && oo(h.content), j(h) === Te.element) {
|
|
1559
1559
|
const E = C(h);
|
|
1560
|
-
ut(E) && (
|
|
1560
|
+
ut(E) && (Ro(E), oo(E));
|
|
1561
1561
|
}
|
|
1562
1562
|
Pe(W.afterSanitizeShadowDOM, d, null);
|
|
1563
|
-
},
|
|
1563
|
+
}, Ro = function(d) {
|
|
1564
1564
|
const h = [{
|
|
1565
1565
|
node: d,
|
|
1566
1566
|
shadow: null
|
|
@@ -1602,29 +1602,29 @@ function Wr() {
|
|
|
1602
1602
|
};
|
|
1603
1603
|
return e.sanitize = function(T) {
|
|
1604
1604
|
let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, y = null, E = null, A = null;
|
|
1605
|
-
if (Mo = !T, Mo && (T = "<!-->"), typeof T != "string" && !At(T) && (T =
|
|
1605
|
+
if (Mo = !T, Mo && (T = "<!-->"), typeof T != "string" && !At(T) && (T = ml(T), typeof T != "string"))
|
|
1606
1606
|
throw Ze("dirty is not a string, aborting");
|
|
1607
1607
|
if (!e.isSupported)
|
|
1608
1608
|
return T;
|
|
1609
|
-
Et ? (
|
|
1609
|
+
Et ? (q = Gt, G = Kt) : Io(d), (W.uponSanitizeElement.length > 0 || W.uponSanitizeAttribute.length > 0) && (q = Ee(q)), W.uponSanitizeAttribute.length > 0 && (G = Ee(G)), e.removed = [];
|
|
1610
1610
|
const _ = Do && typeof T != "string" && At(T);
|
|
1611
1611
|
if (_) {
|
|
1612
|
-
|
|
1613
|
-
const be =
|
|
1612
|
+
xa(T);
|
|
1613
|
+
const be = I(T);
|
|
1614
1614
|
if (typeof be == "string") {
|
|
1615
1615
|
const xe = oe(be);
|
|
1616
|
-
if (!
|
|
1616
|
+
if (!q[xe] || ke[xe])
|
|
1617
1617
|
throw Zt(T), Ze("root node is forbidden and cannot be sanitized in-place");
|
|
1618
1618
|
}
|
|
1619
1619
|
if (eo(T))
|
|
1620
1620
|
throw Zt(T), Ze("root node is clobbered and cannot be sanitized in-place");
|
|
1621
1621
|
try {
|
|
1622
|
-
|
|
1622
|
+
Ro(T);
|
|
1623
1623
|
} catch (xe) {
|
|
1624
1624
|
throw Zt(T), xe;
|
|
1625
1625
|
}
|
|
1626
1626
|
} else if (At(T))
|
|
1627
|
-
h = Yi("<!---->"), y = h.ownerDocument.importNode(T, !0), y.nodeType === Te.element && y.nodeName === "BODY" || y.nodeName === "HTML" ? h = y : h.appendChild(y),
|
|
1627
|
+
h = Yi("<!---->"), y = h.ownerDocument.importNode(T, !0), y.nodeType === Te.element && y.nodeName === "BODY" || y.nodeName === "HTML" ? h = y : h.appendChild(y), Ro(y);
|
|
1628
1628
|
else {
|
|
1629
1629
|
if (!st && !Q && !De && // eslint-disable-next-line unicorn/prefer-includes
|
|
1630
1630
|
T.indexOf("<") === -1)
|
|
@@ -1646,25 +1646,25 @@ function Wr() {
|
|
|
1646
1646
|
if (_)
|
|
1647
1647
|
return Qe(e.removed, (be) => {
|
|
1648
1648
|
be.element && Qt(be.element);
|
|
1649
|
-
}), Q &&
|
|
1649
|
+
}), Q && Fo(T), T;
|
|
1650
1650
|
if (st) {
|
|
1651
|
-
if (Q &&
|
|
1651
|
+
if (Q && Fo(h), jt)
|
|
1652
1652
|
for (A = pe.call(h.ownerDocument); h.firstChild; )
|
|
1653
1653
|
A.appendChild(h.firstChild);
|
|
1654
1654
|
else
|
|
1655
1655
|
A = h;
|
|
1656
|
-
return (
|
|
1656
|
+
return (G.shadowroot || G.shadowrootmode) && (A = nt.call(i, A, !0)), A;
|
|
1657
1657
|
}
|
|
1658
1658
|
let V = De ? h.outerHTML : h.innerHTML;
|
|
1659
|
-
return De &&
|
|
1659
|
+
return De && q["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && le(Cl, h.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
|
|
1660
1660
|
` + V), Q && (V = Jt(V)), D && Yt ? B(V) : V;
|
|
1661
1661
|
}, e.setConfig = function() {
|
|
1662
1662
|
let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1663
|
-
|
|
1663
|
+
Io(T), Et = !0, Gt = q, Kt = G;
|
|
1664
1664
|
}, e.clearConfig = function() {
|
|
1665
|
-
pt = null, Et = !1,
|
|
1665
|
+
pt = null, Et = !1, Gt = null, Kt = null, D = Y, U = "";
|
|
1666
1666
|
}, e.isValidAttribute = function(T, d, h) {
|
|
1667
|
-
pt ||
|
|
1667
|
+
pt || Io({});
|
|
1668
1668
|
const y = oe(T), E = oe(d);
|
|
1669
1669
|
return Ji(y, E, h);
|
|
1670
1670
|
}, e.addHook = function(T, d) {
|
|
@@ -1672,8 +1672,8 @@ function Wr() {
|
|
|
1672
1672
|
}, e.removeHook = function(T, d) {
|
|
1673
1673
|
if (ve(W, T)) {
|
|
1674
1674
|
if (d !== void 0) {
|
|
1675
|
-
const h =
|
|
1676
|
-
return h === -1 ? void 0 :
|
|
1675
|
+
const h = ll(W[T], d);
|
|
1676
|
+
return h === -1 ? void 0 : dl(W[T], h, 1)[0];
|
|
1677
1677
|
}
|
|
1678
1678
|
return yn(W[T]);
|
|
1679
1679
|
}
|
|
@@ -1691,17 +1691,17 @@ const Rl = {
|
|
|
1691
1691
|
none: "xMidYMid meet",
|
|
1692
1692
|
"scale-down": "xMidYMid meet"
|
|
1693
1693
|
};
|
|
1694
|
-
function
|
|
1694
|
+
function Ll(o) {
|
|
1695
1695
|
const e = o.options;
|
|
1696
1696
|
return xi(e.formatter, void 0, String(e.testData || e.title || "")) || "条码";
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function Ol(o) {
|
|
1699
1699
|
return a("div", {
|
|
1700
1700
|
class: "print-qrcode",
|
|
1701
1701
|
dataset: { codeId: o.id, codeKind: "qrcode" }
|
|
1702
1702
|
});
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function Nl(o) {
|
|
1705
1705
|
const e = o.options;
|
|
1706
1706
|
return a("div", {
|
|
1707
1707
|
class: "print-barcode",
|
|
@@ -1711,13 +1711,13 @@ function Ol(o) {
|
|
|
1711
1711
|
style: { maxWidth: "100%", maxHeight: "100%" }
|
|
1712
1712
|
})]);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function $l(o) {
|
|
1715
1715
|
const e = (o.getAttribute("viewBox") ?? "").trim().split(/[\s,]+/).map(Number);
|
|
1716
1716
|
return e.length !== 4 || e.some((t) => !Number.isFinite(t)) ? null : { width: e[2], height: e[3] };
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function Bl(o, e) {
|
|
1719
1719
|
const t = o.options, i = pr(t.barWidth), n = ur(t.barQuietZone), r = (s) => {
|
|
1720
|
-
|
|
1720
|
+
Rr(e, Ll(o), {
|
|
1721
1721
|
format: String(t.barcodeType || "CODE128"),
|
|
1722
1722
|
width: i,
|
|
1723
1723
|
height: s * i,
|
|
@@ -1730,7 +1730,7 @@ function $l(o, e) {
|
|
|
1730
1730
|
marginTop: 0,
|
|
1731
1731
|
marginBottom: fr * i
|
|
1732
1732
|
});
|
|
1733
|
-
const l =
|
|
1733
|
+
const l = $l(e);
|
|
1734
1734
|
return l ? { widthUnits: l.width, heightUnits: l.height } : null;
|
|
1735
1735
|
};
|
|
1736
1736
|
try {
|
|
@@ -1749,11 +1749,11 @@ function $l(o, e) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
e.setAttribute("shape-rendering", "crispEdges");
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function Hl(o, e) {
|
|
1753
1753
|
const t = o.options, i = xi(t.formatter, void 0, String(t.testData || t.title || "")) || "二维码";
|
|
1754
1754
|
e.replaceChildren();
|
|
1755
1755
|
try {
|
|
1756
|
-
const n =
|
|
1756
|
+
const n = Fr.render(i, "qrcode", {
|
|
1757
1757
|
qrCodeLevel: String(t.qrCodeLevel ?? "M"),
|
|
1758
1758
|
qrQuietZone: typeof t.qrQuietZone == "number" ? t.qrQuietZone : void 0
|
|
1759
1759
|
}), r = document.createElement("img");
|
|
@@ -1761,36 +1761,36 @@ function Bl(o, e) {
|
|
|
1761
1761
|
} catch {
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function Wl(o, e) {
|
|
1765
1765
|
for (const t of Array.from(o.querySelectorAll("[data-code-kind]"))) {
|
|
1766
1766
|
const i = t.dataset.codeId, n = e.find((r) => r.id === i);
|
|
1767
1767
|
if (n)
|
|
1768
1768
|
if (t.dataset.codeKind === "barcode") {
|
|
1769
1769
|
const r = t.querySelector("svg");
|
|
1770
|
-
r &&
|
|
1770
|
+
r && Bl(n, r);
|
|
1771
1771
|
} else
|
|
1772
|
-
|
|
1772
|
+
Hl(n, t);
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
|
-
const
|
|
1775
|
+
const Ul = {
|
|
1776
1776
|
header: "题",
|
|
1777
1777
|
data: "数",
|
|
1778
1778
|
subtotal: "小",
|
|
1779
1779
|
summary: "汇"
|
|
1780
|
-
},
|
|
1780
|
+
}, ql = [
|
|
1781
1781
|
{ value: "header", label: "标题行" },
|
|
1782
1782
|
{ value: "data", label: "数据行" },
|
|
1783
1783
|
{ value: "subtotal", label: "小计行" },
|
|
1784
1784
|
{ value: "summary", label: "汇总行" }
|
|
1785
|
-
], uo = 3.7795275591, Gl = 0.1, di = (o) => JSON.parse(JSON.stringify(o)),
|
|
1785
|
+
], uo = 3.7795275591, Gl = 0.1, di = (o) => JSON.parse(JSON.stringify(o)), In = /* @__PURE__ */ new WeakMap();
|
|
1786
1786
|
function Ne(o) {
|
|
1787
|
-
let e =
|
|
1788
|
-
return e || (e = { menu: null, menuElId: null, anchor: null, layouts: /* @__PURE__ */ new Map() },
|
|
1787
|
+
let e = In.get(o);
|
|
1788
|
+
return e || (e = { menu: null, menuElId: null, anchor: null, layouts: /* @__PURE__ */ new Map() }, In.set(o, e)), e;
|
|
1789
1789
|
}
|
|
1790
1790
|
function Bt(o, e) {
|
|
1791
1791
|
return o.templateData.elements.find((t) => t.id === e) ?? null;
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1793
|
+
function Kl(o, e) {
|
|
1794
1794
|
const t = o.tableSelection;
|
|
1795
1795
|
return !t || t.elementId !== e.id ? null : o.selectedElement?.id !== e.id ? (o.tableSelection = null, null) : t;
|
|
1796
1796
|
}
|
|
@@ -1807,43 +1807,43 @@ function Ur(o, e, t) {
|
|
|
1807
1807
|
rows: n.tableRows ?? [],
|
|
1808
1808
|
colWidths: n.tableColWidths ?? [],
|
|
1809
1809
|
isSelected: o.selectedIds.has(t.id),
|
|
1810
|
-
selection:
|
|
1811
|
-
maxTableWidth:
|
|
1810
|
+
selection: Kl(o, t),
|
|
1811
|
+
maxTableWidth: qr(o)
|
|
1812
1812
|
};
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function qr(o) {
|
|
1815
1815
|
return o.paperSize.width - o.templateData.margins.left - o.templateData.margins.right;
|
|
1816
1816
|
}
|
|
1817
1817
|
function Si(o) {
|
|
1818
1818
|
return o.options.tableDefaultFontSize ?? 10;
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function Gr(o) {
|
|
1821
1821
|
return o.options.tableDefaultColor ?? "#333333";
|
|
1822
1822
|
}
|
|
1823
|
-
function
|
|
1823
|
+
function jl(o, e) {
|
|
1824
1824
|
let t = 0;
|
|
1825
1825
|
for (let i = 0; i < e; i++) t += o.rows[i].height;
|
|
1826
1826
|
return t;
|
|
1827
1827
|
}
|
|
1828
|
-
function jl(o, e) {
|
|
1829
|
-
return Ne(o.store).layouts.get(o.el.id)?.[e]?.top ?? Kl(o, e);
|
|
1830
|
-
}
|
|
1831
1828
|
function Yl(o, e) {
|
|
1829
|
+
return Ne(o.store).layouts.get(o.el.id)?.[e]?.top ?? jl(o, e);
|
|
1830
|
+
}
|
|
1831
|
+
function Vl(o, e) {
|
|
1832
1832
|
return Ne(o.store).layouts.get(o.el.id)?.[e]?.height ?? o.rows[e]?.height ?? 0;
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function Xl(o) {
|
|
1835
1835
|
const e = o.options.dataSource;
|
|
1836
|
-
if (e && Array.isArray(
|
|
1837
|
-
for (const t of Object.values(
|
|
1836
|
+
if (e && Array.isArray(Ge[e])) return Ge[e];
|
|
1837
|
+
for (const t of Object.values(Ge))
|
|
1838
1838
|
if (Array.isArray(t)) return t;
|
|
1839
1839
|
}
|
|
1840
1840
|
function Kr(o) {
|
|
1841
1841
|
return o.cellType === "barcode" || o.cellType === "qrcode";
|
|
1842
1842
|
}
|
|
1843
1843
|
function jr(o, e) {
|
|
1844
|
-
return Kr(e) ? xi(e.formatter,
|
|
1844
|
+
return Kr(e) ? xi(e.formatter, Xl(o)) : e.formatter || "";
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Zl(o, e) {
|
|
1847
1847
|
const t = { designMode: !0, showGhostBorder: o.store.showTableGhostBorder };
|
|
1848
1848
|
return {
|
|
1849
1849
|
fontFamily: wi(e.fontFamily ?? o.options.tableDefaultFontFamily),
|
|
@@ -1853,7 +1853,7 @@ function Xl(o, e) {
|
|
|
1853
1853
|
verticalAlign: e.valign ?? "middle",
|
|
1854
1854
|
fontSize: (e.fontSize ?? Si(o)) + "pt",
|
|
1855
1855
|
fontWeight: e.fontWeight ?? "normal",
|
|
1856
|
-
color: e.color ??
|
|
1856
|
+
color: e.color ?? Gr(o),
|
|
1857
1857
|
backgroundColor: e.backgroundColor ?? "transparent",
|
|
1858
1858
|
borderTop: io(e.borders?.top, t),
|
|
1859
1859
|
borderRight: io(e.borders?.right, t),
|
|
@@ -1864,61 +1864,61 @@ function Xl(o, e) {
|
|
|
1864
1864
|
overflow: e.wordWrap ?? !0 ? "visible" : "hidden"
|
|
1865
1865
|
};
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function Ql(o, e, t) {
|
|
1868
1868
|
const i = o.selection;
|
|
1869
1869
|
return [!!i && e >= i.r1 && e <= i.r2 && t >= i.c1 && t <= i.c2 ? "cell-selected" : "", o.rows[e]?.type === "data" ? "row-data-bg" : ""].filter(Boolean).join(" ");
|
|
1870
1870
|
}
|
|
1871
1871
|
function Yr(o) {
|
|
1872
1872
|
return wr(o);
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function Jl(o) {
|
|
1875
1875
|
return Yr(o) !== "autoHeight";
|
|
1876
1876
|
}
|
|
1877
|
-
function
|
|
1877
|
+
function ed(o, e) {
|
|
1878
1878
|
return e.fontSize ?? Si(o);
|
|
1879
1879
|
}
|
|
1880
1880
|
function vo(o, e, t) {
|
|
1881
1881
|
return vr(o.rows, e, t, o.options.tableDefaultPadding ?? 1);
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1883
|
+
function td(o, e, t) {
|
|
1884
1884
|
return yr(o.colWidths, e, t, o.options.tableDefaultPadding ?? 1);
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function od(o, e, t) {
|
|
1887
1887
|
return {
|
|
1888
1888
|
maxHeight: vo(o, t, e) + "mm",
|
|
1889
1889
|
overflow: "hidden",
|
|
1890
1890
|
...e.wordWrap === !1 ? { whiteSpace: "nowrap", textOverflow: "ellipsis" } : {}
|
|
1891
1891
|
};
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function id(o, e, t) {
|
|
1894
1894
|
const i = {
|
|
1895
|
-
fitBase: String(
|
|
1895
|
+
fitBase: String(ed(o, e)),
|
|
1896
1896
|
fitMin: String(xr(e.shrinkMinFontSize)),
|
|
1897
1897
|
fitMm: String(vo(o, t, e))
|
|
1898
1898
|
};
|
|
1899
1899
|
return Yr(e) === "shrink" && (i.fit = "shrink"), i;
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function nd(o) {
|
|
1902
1902
|
const e = (o.getAttribute("viewBox") ?? "").trim().split(/[\s,]+/).map(Number);
|
|
1903
1903
|
return e.length !== 4 || e.some((t) => !Number.isFinite(t)) ? null : { width: e[2], height: e[3] };
|
|
1904
1904
|
}
|
|
1905
|
-
const
|
|
1905
|
+
const rd = {
|
|
1906
1906
|
contain: "xMidYMid meet",
|
|
1907
1907
|
cover: "xMidYMid slice",
|
|
1908
1908
|
fill: "none",
|
|
1909
1909
|
none: "xMidYMid meet",
|
|
1910
1910
|
"scale-down": "xMidYMid meet"
|
|
1911
1911
|
};
|
|
1912
|
-
function
|
|
1912
|
+
function ad(o, e, t, i) {
|
|
1913
1913
|
const n = document.createElement("div");
|
|
1914
1914
|
n.className = "cell-barcode";
|
|
1915
|
-
const r = document.createElementNS(
|
|
1915
|
+
const r = document.createElementNS(js, "svg");
|
|
1916
1916
|
n.appendChild(r);
|
|
1917
1917
|
const s = jr(o, i);
|
|
1918
1918
|
if (i.cellType === "barcode") {
|
|
1919
|
-
r.setAttribute("preserveAspectRatio",
|
|
1919
|
+
r.setAttribute("preserveAspectRatio", rd[i.fit || "contain"] ?? "xMidYMid meet");
|
|
1920
1920
|
const l = pr(i.barWidth), c = ur(i.barQuietZone), p = (m) => {
|
|
1921
|
-
|
|
1921
|
+
Rr(r, s, {
|
|
1922
1922
|
format: i.barcodeType || "CODE128",
|
|
1923
1923
|
width: l,
|
|
1924
1924
|
height: m * l,
|
|
@@ -1931,15 +1931,15 @@ function rd(o, e, t, i) {
|
|
|
1931
1931
|
marginTop: 0,
|
|
1932
1932
|
marginBottom: fr * l
|
|
1933
1933
|
});
|
|
1934
|
-
const
|
|
1935
|
-
return
|
|
1934
|
+
const b = nd(r);
|
|
1935
|
+
return b ? { widthUnits: b.width, heightUnits: b.height } : null;
|
|
1936
1936
|
};
|
|
1937
1937
|
let u = null;
|
|
1938
1938
|
try {
|
|
1939
1939
|
u = hr({
|
|
1940
1940
|
barHeightMm: i.barHeight,
|
|
1941
1941
|
// 最大宽高并入可用框(与出图端同一助手),作为结算上限而非事后 CSS 缩放
|
|
1942
|
-
boxWidthMm: fo(
|
|
1942
|
+
boxWidthMm: fo(td(o, t, i), i.maxWidth),
|
|
1943
1943
|
boxHeightMm: fo(vo(o, e, i), i.maxHeight),
|
|
1944
1944
|
dpi: i.printerDpi,
|
|
1945
1945
|
barWidth: i.barWidth,
|
|
@@ -1958,7 +1958,7 @@ function rd(o, e, t, i) {
|
|
|
1958
1958
|
}
|
|
1959
1959
|
if (r.style.display = "none", !s) return n;
|
|
1960
1960
|
try {
|
|
1961
|
-
const l =
|
|
1961
|
+
const l = Fr.render(s, "qrcode", {
|
|
1962
1962
|
qrCodeLevel: String(i.qrCodeLevel || "M"),
|
|
1963
1963
|
qrQuietZone: typeof i.qrQuietZone == "number" ? i.qrQuietZone : void 0
|
|
1964
1964
|
}), c = document.createElement("img");
|
|
@@ -1967,45 +1967,45 @@ function rd(o, e, t, i) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
return n;
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Fn() {
|
|
1971
1971
|
const o = document.createElement("div");
|
|
1972
1972
|
return o.className = "image-placeholder", o.textContent = "图片", o;
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function sd(o) {
|
|
1975
1975
|
const e = o.formatter || "";
|
|
1976
|
-
return e ? e.includes("{") ? Ot(e,
|
|
1976
|
+
return e ? e.includes("{") ? Ot(e, Ge) : e : "";
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1978
|
+
function ld(o, e, t) {
|
|
1979
1979
|
const i = document.createElement("div");
|
|
1980
1980
|
i.className = "cell-image";
|
|
1981
|
-
const n =
|
|
1981
|
+
const n = Na(t.fit, vo(o, e, t));
|
|
1982
1982
|
n !== void 0 && (i.style.height = `${n}mm`);
|
|
1983
|
-
const r =
|
|
1983
|
+
const r = sd(t);
|
|
1984
1984
|
if (!r)
|
|
1985
|
-
return i.appendChild(
|
|
1985
|
+
return i.appendChild(Fn()), i;
|
|
1986
1986
|
const s = document.createElement("img");
|
|
1987
1987
|
s.setAttribute("src", r), n !== void 0 && (s.style.width = "100%", s.style.height = "100%"), s.style.objectFit = t.fit || "contain";
|
|
1988
1988
|
for (const [l, c] of Object.entries(br(t.fit, t.fitScale, t.objectPosition)))
|
|
1989
1989
|
s.style[l] = c;
|
|
1990
1990
|
return s.style.maxWidth = t.maxWidth ? `${t.maxWidth}mm` : "100%", s.style.maxHeight = t.maxHeight ? `${t.maxHeight}mm` : "100%", s.addEventListener("error", () => {
|
|
1991
|
-
s.remove(), i.appendChild(
|
|
1991
|
+
s.remove(), i.appendChild(Fn());
|
|
1992
1992
|
}, { once: !0 }), i.appendChild(s), i;
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1995
|
-
if (Kr(n)) return
|
|
1996
|
-
if (n.cellType === "image") return
|
|
1994
|
+
function dd(o, e, t, i, n) {
|
|
1995
|
+
if (Kr(n)) return ad(o, t, i, n);
|
|
1996
|
+
if (n.cellType === "image") return ld(o, t, n);
|
|
1997
1997
|
const r = jr(o, n), s = () => e.type === "data" ? a("span", { class: "data-placeholder", text: r }) : r;
|
|
1998
|
-
return
|
|
1998
|
+
return Jl(n) ? a("div", {
|
|
1999
1999
|
class: "cell-fit",
|
|
2000
|
-
style:
|
|
2001
|
-
dataset:
|
|
2000
|
+
style: od(o, n, t),
|
|
2001
|
+
dataset: id(o, n, t)
|
|
2002
2002
|
}, [s()]) : s();
|
|
2003
2003
|
}
|
|
2004
2004
|
function go(o, e, t) {
|
|
2005
|
-
const i = { elementId: o.el.id, ...
|
|
2005
|
+
const i = { elementId: o.el.id, ...Oa(o.rows, e, t) };
|
|
2006
2006
|
o.store.setTableSelection(i), o.fire("table-selection-change", { elementId: o.el.id, selection: i });
|
|
2007
2007
|
}
|
|
2008
|
-
function
|
|
2008
|
+
function cd(o, e, t, i, n) {
|
|
2009
2009
|
if (n.button !== 0 || (o.fire("table-cell-mousedown", { elementId: o.el.id, r: e, c: t, cellId: i, event: n }), !o.isSelected)) return;
|
|
2010
2010
|
n.stopPropagation();
|
|
2011
2011
|
const r = Ne(o.store);
|
|
@@ -2013,7 +2013,7 @@ function dd(o, e, t, i, n) {
|
|
|
2013
2013
|
Ne(o.store).anchor = null;
|
|
2014
2014
|
}, { once: !0 });
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function pd(o, e, t) {
|
|
2017
2017
|
const i = Ne(o.store).anchor;
|
|
2018
2018
|
i && go(o, i, { r: e, c: t });
|
|
2019
2019
|
}
|
|
@@ -2021,22 +2021,22 @@ function Vr(o, e) {
|
|
|
2021
2021
|
const t = Ne(o);
|
|
2022
2022
|
t.menu?.visible && (t.menu.visible = !1, e("table-menu-close", { elementId: t.menuElId }), o.emit(!1));
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function ud(o, e, t, i) {
|
|
2025
2025
|
i.preventDefault(), i.stopPropagation(), o.isSelected || o.store.selectOne(o.el.id);
|
|
2026
2026
|
const n = o.selection;
|
|
2027
2027
|
n && e >= n.r1 && e <= n.r2 && t >= n.c1 && t <= n.c2 || go(o, { r: e, c: t }, { r: e, c: t });
|
|
2028
2028
|
const s = Ne(o.store);
|
|
2029
2029
|
s.menuElId = o.el.id, s.menu && (s.menu.x = i.clientX, s.menu.y = i.clientY, s.menu.visible = !0), o.fire("table-cell-contextmenu", { elementId: o.el.id, r: e, c: t, clientX: i.clientX, clientY: i.clientY }), o.store.emit(!1), document.addEventListener("mousedown", () => Vr(o.store, o.fire), { once: !0 });
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function Rn(o, e, t) {
|
|
2032
2032
|
const i = o.reduce((n, r) => n + r, 0) + (o[e] ?? 0);
|
|
2033
2033
|
return i > t ? `插入后表格总宽 ${Math.round(i * 10) / 10}mm 超过打印范围宽度 ${t}mm,请先缩小列宽` : null;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function hd(o, e) {
|
|
2036
2036
|
const t = o.real.options.tableRows ?? [], i = o.real.options.tableColWidths ?? [], n = e(di(t), di(i));
|
|
2037
2037
|
return n ? (window.alert(n), !1) : (o.store.recordHistory(), e(t, i), o.store.setTableSelection(null), $t(o.real.options), o.store.emit(), !0);
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2039
|
+
function Re(o, e, t) {
|
|
2040
2040
|
Vr(o.store, o.fire);
|
|
2041
2041
|
const i = o.selection;
|
|
2042
2042
|
if (!i) return;
|
|
@@ -2049,22 +2049,22 @@ function Ie(o, e, t) {
|
|
|
2049
2049
|
n = (r) => (nn(r, i.r2, "below"), null);
|
|
2050
2050
|
break;
|
|
2051
2051
|
case "delete-row":
|
|
2052
|
-
n = (r) =>
|
|
2052
|
+
n = (r) => Ha(r, i.r1);
|
|
2053
2053
|
break;
|
|
2054
2054
|
case "insert-col-left":
|
|
2055
2055
|
n = (r, s) => {
|
|
2056
|
-
const l =
|
|
2056
|
+
const l = Rn(s, i.c1, o.maxTableWidth);
|
|
2057
2057
|
return l || (on(r, s, i.c1, "left"), null);
|
|
2058
2058
|
};
|
|
2059
2059
|
break;
|
|
2060
2060
|
case "insert-col-right":
|
|
2061
2061
|
n = (r, s) => {
|
|
2062
|
-
const l =
|
|
2062
|
+
const l = Rn(s, i.c2, o.maxTableWidth);
|
|
2063
2063
|
return l || (on(r, s, i.c2, "right"), null);
|
|
2064
2064
|
};
|
|
2065
2065
|
break;
|
|
2066
2066
|
case "delete-col":
|
|
2067
|
-
n = (r, s) =>
|
|
2067
|
+
n = (r, s) => Ba(r, s, i.c1);
|
|
2068
2068
|
break;
|
|
2069
2069
|
case "merge":
|
|
2070
2070
|
n = (r) => (kr(r, i), null);
|
|
@@ -2076,9 +2076,9 @@ function Ie(o, e, t) {
|
|
|
2076
2076
|
n = (r) => t ? vi(r, i.r1, t) : "未指定行类型";
|
|
2077
2077
|
break;
|
|
2078
2078
|
}
|
|
2079
|
-
n &&
|
|
2079
|
+
n && hd(o, n) && o.fire(`table-${e}`, { elementId: o.el.id, ...t ? { type: t } : {} });
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function fd(o) {
|
|
2082
2082
|
const e = o.selection;
|
|
2083
2083
|
if (!e) return !1;
|
|
2084
2084
|
for (let t = e.r1; t <= e.r2; t++)
|
|
@@ -2103,7 +2103,7 @@ function Le(o, e, t = {}) {
|
|
|
2103
2103
|
});
|
|
2104
2104
|
}
|
|
2105
2105
|
const Ko = () => a("div", { class: "menu-divider" });
|
|
2106
|
-
function
|
|
2106
|
+
function md(o, e, t) {
|
|
2107
2107
|
const i = Ne(o);
|
|
2108
2108
|
if (i.menu = t, !t.visible || !i.menuElId) return "";
|
|
2109
2109
|
const n = Bt(o, i.menuElId);
|
|
@@ -2116,19 +2116,19 @@ function fd(o, e, t) {
|
|
|
2116
2116
|
style: { left: t.x + "px", top: t.y + "px" },
|
|
2117
2117
|
onMousedown: (c) => c.stopPropagation()
|
|
2118
2118
|
}, [
|
|
2119
|
-
Le("在上方插入行", () =>
|
|
2120
|
-
Le("在下方插入行", () =>
|
|
2121
|
-
Le("删除行", () =>
|
|
2119
|
+
Le("在上方插入行", () => Re(r, "insert-row-above")),
|
|
2120
|
+
Le("在下方插入行", () => Re(r, "insert-row-below")),
|
|
2121
|
+
Le("删除行", () => Re(r, "delete-row"), { disabled: r.rows.length <= 1 }),
|
|
2122
2122
|
Ko(),
|
|
2123
|
-
Le("在左侧插入列", () =>
|
|
2124
|
-
Le("在右侧插入列", () =>
|
|
2125
|
-
Le("删除列", () =>
|
|
2123
|
+
Le("在左侧插入列", () => Re(r, "insert-col-left")),
|
|
2124
|
+
Le("在右侧插入列", () => Re(r, "insert-col-right")),
|
|
2125
|
+
Le("删除列", () => Re(r, "delete-col"), { disabled: r.colWidths.length <= 1 }),
|
|
2126
2126
|
Ko(),
|
|
2127
|
-
Le("合并单元格", () =>
|
|
2128
|
-
Le("拆分单元格", () =>
|
|
2127
|
+
Le("合并单元格", () => Re(r, "merge"), { disabled: !!s, title: s || "" }),
|
|
2128
|
+
Le("拆分单元格", () => Re(r, "split"), { disabled: !fd(r) }),
|
|
2129
2129
|
Ko(),
|
|
2130
2130
|
a("div", { class: "menu-group-title", text: "行类型" }),
|
|
2131
|
-
...
|
|
2131
|
+
...ql.map((c) => Le(c.label, () => Re(r, "set-row-type", c.value), {
|
|
2132
2132
|
disabled: !!Ln(r, c.value),
|
|
2133
2133
|
title: Ln(r, c.value) || "",
|
|
2134
2134
|
active: l === c.value
|
|
@@ -2139,11 +2139,11 @@ let ot = null;
|
|
|
2139
2139
|
function Xr() {
|
|
2140
2140
|
ot && (document.removeEventListener("mousemove", ki), document.removeEventListener("mouseup", Ti), ot.handle.classList.remove("dragging"), ot = null);
|
|
2141
2141
|
}
|
|
2142
|
-
function
|
|
2142
|
+
function gd(o, e) {
|
|
2143
2143
|
const t = o.closest(".hiprint-printPaper");
|
|
2144
2144
|
return (t && t.offsetWidth > 0 ? t.getBoundingClientRect().width / t.offsetWidth : 0) || (e.scale || 100) / 100;
|
|
2145
2145
|
}
|
|
2146
|
-
function
|
|
2146
|
+
function bd(o, e, t) {
|
|
2147
2147
|
if (t.button !== 0) return;
|
|
2148
2148
|
const i = t.currentTarget, n = i.closest(".print-table");
|
|
2149
2149
|
if (!n) return;
|
|
@@ -2156,7 +2156,7 @@ function gd(o, e, t) {
|
|
|
2156
2156
|
boundary: e,
|
|
2157
2157
|
startX: t.clientX,
|
|
2158
2158
|
startWidth: r[e - 1] ?? 0,
|
|
2159
|
-
scale:
|
|
2159
|
+
scale: gd(n, o.store),
|
|
2160
2160
|
root: n,
|
|
2161
2161
|
wrapper: i.closest(".print-element"),
|
|
2162
2162
|
handle: i
|
|
@@ -2168,11 +2168,11 @@ function ki(o) {
|
|
|
2168
2168
|
const t = Bt(e.store, e.elId), i = t?.options.tableColWidths;
|
|
2169
2169
|
if (!t || !i) return;
|
|
2170
2170
|
const n = (o.clientX - e.startX) / (e.scale * uo), r = e.boundary - 1;
|
|
2171
|
-
i[r] =
|
|
2171
|
+
i[r] = $a(
|
|
2172
2172
|
i,
|
|
2173
2173
|
r,
|
|
2174
2174
|
e.startWidth + n,
|
|
2175
|
-
|
|
2175
|
+
qr(e.store)
|
|
2176
2176
|
), $t(t.options), i.forEach((s, l) => {
|
|
2177
2177
|
const c = e.root.querySelector(`colgroup col:nth-child(${l + 1})`);
|
|
2178
2178
|
c && (c.style.width = `${s}mm`);
|
|
@@ -2188,7 +2188,7 @@ function Ti() {
|
|
|
2188
2188
|
const e = Bt(o.store, o.elId);
|
|
2189
2189
|
e && $t(e.options), o.store.emit(), o.fire("table-col-resize-end", { elementId: o.elId });
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function xd(o, e, t) {
|
|
2192
2192
|
const i = t.querySelector("table");
|
|
2193
2193
|
if (!i) return;
|
|
2194
2194
|
const n = i.offsetHeight;
|
|
@@ -2202,36 +2202,36 @@ function bd(o, e, t) {
|
|
|
2202
2202
|
top: (f.offsetTop - c) / uo,
|
|
2203
2203
|
height: f.offsetHeight / uo
|
|
2204
2204
|
})), u = Ne(o);
|
|
2205
|
-
|
|
2205
|
+
vd(u.layouts.get(e), p) || (u.layouts.set(e, p), s = !0), s && o.emit(!1);
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function vd(o, e) {
|
|
2208
2208
|
return !o || o.length !== e.length ? !1 : e.every((t, i) => {
|
|
2209
2209
|
const n = o[i];
|
|
2210
2210
|
return Math.round(t.top * 10) === Math.round(n.top * 10) && Math.round(t.height * 10) === Math.round(n.height * 10);
|
|
2211
2211
|
});
|
|
2212
2212
|
}
|
|
2213
|
-
function
|
|
2213
|
+
function yd(o, e) {
|
|
2214
2214
|
const t = document.createComment("pd-table-measure");
|
|
2215
2215
|
return requestAnimationFrame(() => {
|
|
2216
2216
|
if (!t.isConnected) return;
|
|
2217
2217
|
const i = t.parentElement;
|
|
2218
|
-
i &&
|
|
2218
|
+
i && xd(o, e, i);
|
|
2219
2219
|
}), t;
|
|
2220
2220
|
}
|
|
2221
|
-
function
|
|
2221
|
+
function wd(o) {
|
|
2222
2222
|
return o.isSelected && !o.real.options.locked && o.colWidths.length >= 1;
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2224
|
+
function Sd(o) {
|
|
2225
2225
|
return Array.from({ length: o.colWidths.length }, (e, t) => t + 1);
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function kd(o, e) {
|
|
2228
2228
|
return o.colWidths.slice(0, e).reduce((t, i) => t + i, 0);
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2230
|
+
function Td(o, e, t) {
|
|
2231
2231
|
const i = Ur(e, t, o);
|
|
2232
2232
|
if (!i) return a("div", { class: "print-table" });
|
|
2233
2233
|
const n = [
|
|
2234
|
-
a("table", { style: { fontSize: `${Si(i)}pt`, color:
|
|
2234
|
+
a("table", { style: { fontSize: `${Si(i)}pt`, color: Gr(i) } }, [
|
|
2235
2235
|
a("colgroup", {}, i.colWidths.map((r) => a("col", { style: { width: r + "mm" } }))),
|
|
2236
2236
|
a("tbody", {}, i.rows.map((r, s) => a(
|
|
2237
2237
|
"tr",
|
|
@@ -2239,34 +2239,34 @@ function kd(o, e, t) {
|
|
|
2239
2239
|
r.cells.map((l, c) => l.merged ? "" : a("td", {
|
|
2240
2240
|
rowspan: l.rowspan || 1,
|
|
2241
2241
|
colspan: l.colspan || 1,
|
|
2242
|
-
class:
|
|
2243
|
-
style:
|
|
2244
|
-
onMousedown: (p) =>
|
|
2245
|
-
onMouseenter: () =>
|
|
2246
|
-
onContextmenu: (p) =>
|
|
2247
|
-
}, [
|
|
2242
|
+
class: Ql(i, s, c),
|
|
2243
|
+
style: Zl(i, l),
|
|
2244
|
+
onMousedown: (p) => cd(i, s, c, l.id, p),
|
|
2245
|
+
onMouseenter: () => pd(i, s, c),
|
|
2246
|
+
onContextmenu: (p) => ud(i, s, c, p)
|
|
2247
|
+
}, [dd(i, r, s, c, l)])).filter(Boolean)
|
|
2248
2248
|
)))
|
|
2249
2249
|
])
|
|
2250
2250
|
];
|
|
2251
|
-
return
|
|
2251
|
+
return wd(i) && n.push(a("div", { class: "col-resize-layer" }, Sd(i).map((r) => a("div", {
|
|
2252
2252
|
class: "col-resize-handle",
|
|
2253
2253
|
role: "separator",
|
|
2254
2254
|
"aria-label": `列宽手柄${r}`,
|
|
2255
|
-
style: { left:
|
|
2255
|
+
style: { left: kd(i, r) + "mm" },
|
|
2256
2256
|
onMousedown: (s) => {
|
|
2257
|
-
s.stopPropagation(), s.preventDefault(),
|
|
2257
|
+
s.stopPropagation(), s.preventDefault(), bd(i, r, s);
|
|
2258
2258
|
}
|
|
2259
2259
|
})))), i.isSelected && n.push(a("div", { class: "row-badges" }, i.rows.map((r, s) => a("span", {
|
|
2260
2260
|
class: "row-badge",
|
|
2261
|
-
style: { top:
|
|
2262
|
-
text:
|
|
2263
|
-
})))), n.push(
|
|
2261
|
+
style: { top: Yl(i, s) + "mm", height: Vl(i, s) + "mm" },
|
|
2262
|
+
text: Ul[r.type]
|
|
2263
|
+
})))), n.push(yd(e, o.id)), a("div", {
|
|
2264
2264
|
class: "print-table design-mode",
|
|
2265
2265
|
dataset: { tableId: o.id },
|
|
2266
2266
|
onContextmenu: (r) => r.preventDefault()
|
|
2267
2267
|
}, n);
|
|
2268
2268
|
}
|
|
2269
|
-
const
|
|
2269
|
+
const Ed = [
|
|
2270
2270
|
"黄芪 20g",
|
|
2271
2271
|
"当归尾 15g",
|
|
2272
2272
|
"赤芍 10g",
|
|
@@ -2278,15 +2278,15 @@ const Td = [
|
|
|
2278
2278
|
function ci(o) {
|
|
2279
2279
|
return Array.isArray(o) && o.length > 0 ? o : [];
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function Cd(o, e) {
|
|
2282
2282
|
const t = ni(o, e) ?? (e ? Object.keys(e).find((n) => Array.isArray(e[n])) : void 0);
|
|
2283
2283
|
if (t) return ci(e?.[t]);
|
|
2284
|
-
const i = ni(o,
|
|
2285
|
-
return i ? ci(
|
|
2284
|
+
const i = ni(o, Ge);
|
|
2285
|
+
return i ? ci(Ge[i]) : [];
|
|
2286
2286
|
}
|
|
2287
|
-
function
|
|
2288
|
-
const t = o.options, i = typeof t.formatter == "string" ? t.formatter : "", n = ci(e)[0], r =
|
|
2289
|
-
if (r.length === 0) return [...
|
|
2287
|
+
function Ad(o, e) {
|
|
2288
|
+
const t = o.options, i = typeof t.formatter == "string" ? t.formatter : "", n = ci(e)[0], r = Cd(i, n);
|
|
2289
|
+
if (r.length === 0) return [...Ed];
|
|
2290
2290
|
if (!i) return r.map((c) => String(c?.name ?? JSON.stringify(c)));
|
|
2291
2291
|
const s = n ?? {}, l = ni(i, s) ?? Object.keys(s).find((c) => Array.isArray(s[c]));
|
|
2292
2292
|
return r.map((c) => {
|
|
@@ -2297,7 +2297,7 @@ function Cd(o, e) {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
});
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Dd(o, e) {
|
|
2301
2301
|
const t = o.options, i = po(t.flowColumns), n = oi(t.flowGapX), r = ii(t.flowRowHeight), s = {
|
|
2302
2302
|
display: "grid",
|
|
2303
2303
|
gridTemplateColumns: `repeat(${i},minmax(0,1fr))`,
|
|
@@ -2311,13 +2311,13 @@ function Ad(o, e) {
|
|
|
2311
2311
|
color: t.color || "#333",
|
|
2312
2312
|
boxSizing: "border-box"
|
|
2313
2313
|
};
|
|
2314
|
-
return t.fontFamily && (s.fontFamily = String(t.fontFamily)), t.backgroundColor && (s.backgroundColor = String(t.backgroundColor)), a("div", { class: "print-flowlist", style: s },
|
|
2314
|
+
return t.fontFamily && (s.fontFamily = String(t.fontFamily)), t.backgroundColor && (s.backgroundColor = String(t.backgroundColor)), a("div", { class: "print-flowlist", style: s }, Ad(o, e).map(
|
|
2315
2315
|
(l) => a("div", { class: "print-flow-cell", text: l })
|
|
2316
2316
|
));
|
|
2317
2317
|
}
|
|
2318
|
-
const On = { top: "flex-start", middle: "center", bottom: "flex-end" },
|
|
2319
|
-
function
|
|
2320
|
-
const t = o.options, i =
|
|
2318
|
+
const On = { top: "flex-start", middle: "center", bottom: "flex-end" }, Md = { left: "flex-start", center: "center", right: "flex-end" };
|
|
2319
|
+
function _d(o, e) {
|
|
2320
|
+
const t = o.options, i = Ua(o.printElementType.type, t), n = {};
|
|
2321
2321
|
if (i?.all && (n.border = `${i.all.borderWidth} ${i.all.borderStyle} ${i.all.borderColor}`), i)
|
|
2322
2322
|
for (const r of dr) {
|
|
2323
2323
|
const s = i.edges[r];
|
|
@@ -2332,12 +2332,12 @@ function Md(o, e) {
|
|
|
2332
2332
|
zIndex: String(t.zIndex || "auto"),
|
|
2333
2333
|
...n,
|
|
2334
2334
|
// 元素级旋转:与 BaseElement/出纸端同一 CSS 独立属性 rotate(排除类型、跟随区成员不转、码类低档吸附直角)
|
|
2335
|
-
...
|
|
2335
|
+
...zd(o, e)
|
|
2336
2336
|
};
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function zd(o, e) {
|
|
2339
2339
|
if (e?.has(o.id)) return {};
|
|
2340
|
-
const t =
|
|
2340
|
+
const t = Ka(o.printElementType.type, o.options);
|
|
2341
2341
|
return t === void 0 ? {} : { rotate: `${t}deg` };
|
|
2342
2342
|
}
|
|
2343
2343
|
function Nn(o) {
|
|
@@ -2362,15 +2362,15 @@ function Nn(o) {
|
|
|
2362
2362
|
padding: `${e.contentPaddingTop || 0}pt ${e.contentPaddingRight || 0}pt ${e.contentPaddingBottom || 0}pt ${e.contentPaddingLeft || 0}pt`
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
|
|
2365
|
+
qa(e) && (s.whiteSpace = "nowrap", s.textOverflow = "ellipsis");
|
|
2366
2366
|
const l = Ga(e);
|
|
2367
|
-
return l && (s.whiteSpace = l), e.verticalAlign && (s.display = "flex", e.textAlign === "justify" ? (s.flexDirection = "column", s.justifyContent = On[e.verticalAlign] ?? "flex-start") : (s.alignItems = On[e.verticalAlign] ?? "flex-start", s.justifyContent =
|
|
2367
|
+
return l && (s.whiteSpace = l), e.verticalAlign && (s.display = "flex", e.textAlign === "justify" ? (s.flexDirection = "column", s.justifyContent = On[e.verticalAlign] ?? "flex-start") : (s.alignItems = On[e.verticalAlign] ?? "flex-start", s.justifyContent = Md[e.textAlign || "left"] ?? "flex-start")), { style: s, fit: i };
|
|
2368
2368
|
}
|
|
2369
|
-
function
|
|
2369
|
+
function Pd(o) {
|
|
2370
2370
|
const e = o.options, t = `${e.borderWidth || 0.75}pt`, i = e.borderStyle || "solid", n = e.borderColor || "#333";
|
|
2371
2371
|
return o.printElementType.type === "hline" ? { width: "100%", height: "0", borderTop: `${t} ${i} ${n}`, boxSizing: "border-box" } : { width: "0", height: "100%", borderLeft: `${t} ${i} ${n}`, boxSizing: "border-box" };
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function Id(o) {
|
|
2374
2374
|
const e = o.options;
|
|
2375
2375
|
return {
|
|
2376
2376
|
width: "100%",
|
|
@@ -2424,20 +2424,20 @@ function Rd(o, e, t) {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
case "hline":
|
|
2426
2426
|
case "vline":
|
|
2427
|
-
return a("div", { class: "print-line", style:
|
|
2427
|
+
return a("div", { class: "print-line", style: Pd(o) });
|
|
2428
2428
|
case "rect":
|
|
2429
2429
|
case "oval":
|
|
2430
|
-
return a("div", { class: "print-shape", style:
|
|
2430
|
+
return a("div", { class: "print-shape", style: Id(o) });
|
|
2431
2431
|
case "image": {
|
|
2432
|
-
const r = String(n.src ?? ""), s = r.includes("{") ? Ot(r,
|
|
2432
|
+
const r = String(n.src ?? ""), s = r.includes("{") ? Ot(r, Ge) : r;
|
|
2433
2433
|
return a("div", { class: "print-image" }, [
|
|
2434
2434
|
s ? a("img", { src: s, style: Fd(o) }) : a("div", { class: "image-placeholder", text: "图片" })
|
|
2435
2435
|
]);
|
|
2436
2436
|
}
|
|
2437
2437
|
case "qrcode":
|
|
2438
|
-
return Ll(o);
|
|
2439
|
-
case "barcode":
|
|
2440
2438
|
return Ol(o);
|
|
2439
|
+
case "barcode":
|
|
2440
|
+
return Nl(o);
|
|
2441
2441
|
case "html": {
|
|
2442
2442
|
const r = String(n.formatter ?? ""), s = r ? Fl.sanitize(Ot(r, {})) : '<div style="background:#e0e0e0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:10pt;color:#999">HTML</div>';
|
|
2443
2443
|
return a("div", { class: "print-html", html: s });
|
|
@@ -2456,9 +2456,9 @@ function Rd(o, e, t) {
|
|
|
2456
2456
|
text: n.title || "{pageIndex}/{totalPages}"
|
|
2457
2457
|
});
|
|
2458
2458
|
case "table":
|
|
2459
|
-
return t ?
|
|
2459
|
+
return t ? Td(o, t.store, t.fire) : a("div", { class: "print-table" });
|
|
2460
2460
|
case "flowList":
|
|
2461
|
-
return
|
|
2461
|
+
return Dd(o);
|
|
2462
2462
|
default:
|
|
2463
2463
|
return a("div", { text: i });
|
|
2464
2464
|
}
|
|
@@ -2466,9 +2466,9 @@ function Rd(o, e, t) {
|
|
|
2466
2466
|
function Zr(o) {
|
|
2467
2467
|
return `x:${Math.round(o.left)} y:${Math.round(o.top)} ${Math.round(o.width)}×${Math.round(o.height)}mm`;
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2469
|
+
function Ld(o, e, t) {
|
|
2470
2470
|
const i = o.store, n = i.selectedIds.has(e.id), r = i.previewIds.has(e.id), s = e.options, l = e.zone || "content", c = [Rd(e, !0, { store: i, fire: o.fire })];
|
|
2471
|
-
return i.draggingIds.has(e.id) && c.push(a("div", { class: "drag-preview" })), n && (c.push(a("div", { class: "resize-handles" },
|
|
2471
|
+
return i.draggingIds.has(e.id) && c.push(a("div", { class: "drag-preview" })), n && (c.push(a("div", { class: "resize-handles" }, Wa.map((p) => a("div", {
|
|
2472
2472
|
class: `resize-handle handle-${p}`,
|
|
2473
2473
|
dataset: { point: p, elId: e.id },
|
|
2474
2474
|
onMousedown: (u) => o.fire("resize-start", { event: u, id: e.id, point: p })
|
|
@@ -2486,7 +2486,7 @@ function Id(o, e, t) {
|
|
|
2486
2486
|
s.locked ? "locked" : "",
|
|
2487
2487
|
s.visible === !1 ? "hidden" : ""
|
|
2488
2488
|
].filter(Boolean).join(" "),
|
|
2489
|
-
style:
|
|
2489
|
+
style: _d(e, t),
|
|
2490
2490
|
dataset: { elId: e.id },
|
|
2491
2491
|
onMousedown: (p) => o.fire("element-mousedown", { event: p, id: e.id }),
|
|
2492
2492
|
// 双击判定在 print-designer 的 element-mousedown 分支(paint 全量重建会断掉原生 dblclick)
|
|
@@ -2513,7 +2513,7 @@ function pi(o, e) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
};
|
|
2515
2515
|
}
|
|
2516
|
-
const
|
|
2516
|
+
const Od = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M0 .5H20M.5 0V20" fill="none" stroke="rgba(0,0,0,0.08)" stroke-width="1" stroke-dasharray="4 4"/></svg>';
|
|
2517
2517
|
function Bn(o, e) {
|
|
2518
2518
|
return o.type === "vertical" ? {
|
|
2519
2519
|
left: `${o.position}mm`,
|
|
@@ -2527,8 +2527,8 @@ function Bn(o, e) {
|
|
|
2527
2527
|
borderTopColor: o.color || "var(--pd-accent-secondary, #f56c6c)"
|
|
2528
2528
|
};
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2531
|
-
const t =
|
|
2530
|
+
function Nd(o, e) {
|
|
2531
|
+
const t = Is(o.watermark, [], e);
|
|
2532
2532
|
return t ? a(
|
|
2533
2533
|
"div",
|
|
2534
2534
|
{ class: "watermark-layer", style: { opacity: String(t.opacity) } },
|
|
@@ -2554,7 +2554,7 @@ function jo(o, e, t, i, n, r) {
|
|
|
2554
2554
|
const s = o.store, l = [];
|
|
2555
2555
|
t !== "content" && l.push(a("span", { class: "zone-label", text: t === "header" ? "页眉" : "页脚" }));
|
|
2556
2556
|
const c = t === "content" ? Fs(n) : void 0;
|
|
2557
|
-
if (l.push(...n.map((p) =>
|
|
2557
|
+
if (l.push(...n.map((p) => Ld(o, p, c))), t !== "content") {
|
|
2558
2558
|
const p = t === "header" ? "bottom" : "top";
|
|
2559
2559
|
l.push(a("div", {
|
|
2560
2560
|
class: `zone-resize-handle handle-${p}`,
|
|
@@ -2577,8 +2577,22 @@ function jo(o, e, t, i, n, r) {
|
|
|
2577
2577
|
dataset: { zone: t, paperWidth: String(r.width), paperHeight: String(r.height) }
|
|
2578
2578
|
}, l.filter(Boolean));
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2581
|
-
const
|
|
2580
|
+
function $d(o) {
|
|
2581
|
+
const e = o.currentTarget, t = o.dataTransfer?.types ?? [], i = t.includes("fieldkey"), n = t.includes("elementtype");
|
|
2582
|
+
if (!i && !n) {
|
|
2583
|
+
e.querySelector(".drop-hint")?.remove();
|
|
2584
|
+
return;
|
|
2585
|
+
}
|
|
2586
|
+
i && (o.ctrlKey || o.metaKey) && (e.dataset.dropLabelIntent = "1");
|
|
2587
|
+
const r = n ? "+ 元素" : e.dataset.dropLabelIntent ? "+ 静态文本" : "+ 取值字段";
|
|
2588
|
+
let s = e.querySelector(".drop-hint");
|
|
2589
|
+
s || (s = document.createElement("div"), s.className = "drop-hint", e.appendChild(s)), s.textContent = r, s.style.left = `${o.clientX + 14}px`, s.style.top = `${o.clientY + 18}px`;
|
|
2590
|
+
}
|
|
2591
|
+
function Qr(o) {
|
|
2592
|
+
o && (o.querySelector(".drop-hint")?.remove(), delete o.dataset.dropLabelIntent);
|
|
2593
|
+
}
|
|
2594
|
+
function Bd(o, e) {
|
|
2595
|
+
const t = o.store, i = t.templateData, n = Ps(i), r = (t.scale || 100) / 100, s = pi(i, n), l = (f) => t.elements.filter((m) => (m.zone || "content") === f), c = a("div", {
|
|
2582
2596
|
class: "hiprint-printPaper-content",
|
|
2583
2597
|
dataset: { content: "" },
|
|
2584
2598
|
style: {
|
|
@@ -2591,12 +2605,12 @@ function Nd(o, e) {
|
|
|
2591
2605
|
t.showGrid ? a("div", {
|
|
2592
2606
|
class: "grid-bg",
|
|
2593
2607
|
style: {
|
|
2594
|
-
backgroundImage: `url("data:image/svg+xml,${encodeURIComponent(
|
|
2608
|
+
backgroundImage: `url("data:image/svg+xml,${encodeURIComponent(Od)}")`,
|
|
2595
2609
|
backgroundSize: "5mm 5mm",
|
|
2596
2610
|
backgroundPosition: "0 0"
|
|
2597
2611
|
}
|
|
2598
2612
|
}) : "",
|
|
2599
|
-
...i.watermark && Object.keys(i.watermark).length ? [
|
|
2613
|
+
...i.watermark && Object.keys(i.watermark).length ? [Nd(i, n)] : [],
|
|
2600
2614
|
jo(o, e, "header", s.header, l("header"), n),
|
|
2601
2615
|
jo(o, e, "content", s.content, l("content"), n),
|
|
2602
2616
|
jo(o, e, "footer", s.footer, l("footer"), n),
|
|
@@ -2694,8 +2708,18 @@ function Nd(o, e) {
|
|
|
2694
2708
|
return a("div", {
|
|
2695
2709
|
class: "canvas-area",
|
|
2696
2710
|
dataset: { test: "canvas-area" },
|
|
2697
|
-
onDragover: (f) =>
|
|
2698
|
-
|
|
2711
|
+
onDragover: (f) => {
|
|
2712
|
+
const m = f;
|
|
2713
|
+
m.preventDefault(), m.dataTransfer && (m.dataTransfer.dropEffect = "copy"), $d(m);
|
|
2714
|
+
},
|
|
2715
|
+
onDragleave: (f) => {
|
|
2716
|
+
const m = f.currentTarget, b = f.relatedTarget;
|
|
2717
|
+
(!b || !m.contains(b)) && m.querySelector(".drop-hint")?.remove();
|
|
2718
|
+
},
|
|
2719
|
+
onDrop: (f) => {
|
|
2720
|
+
const m = f, b = f.currentTarget, w = b.dataset.dropLabelIntent === "1";
|
|
2721
|
+
Qr(b), w && (m.labelIntent = !0), o.fire("drop", m);
|
|
2722
|
+
},
|
|
2699
2723
|
onMousedown: (f) => o.fire("canvas-mousedown", f),
|
|
2700
2724
|
onMousemove: (f) => o.fire("canvas-mousemove", f),
|
|
2701
2725
|
onMouseleave: () => o.fire("canvas-mouseleave"),
|
|
@@ -2717,7 +2741,7 @@ function Me(o, e, t, i, n = !1, r) {
|
|
|
2717
2741
|
}
|
|
2718
2742
|
});
|
|
2719
2743
|
}
|
|
2720
|
-
const
|
|
2744
|
+
const Hd = {
|
|
2721
2745
|
AlignCenterHorizontal: '<path d="M2 12h20" /><path d="M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4" /><path d="M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4" /><path d="M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1" /><path d="M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1" />',
|
|
2722
2746
|
AlignCenterVertical: '<path d="M12 2v20" /><path d="M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4" /><path d="M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4" /><path d="M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1" /><path d="M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1" />',
|
|
2723
2747
|
AlignEndHorizontal: '<rect width="6" height="16" x="4" y="2" rx="2" /><rect width="6" height="9" x="14" y="9" rx="2" /><path d="M22 22H2" />',
|
|
@@ -2759,7 +2783,7 @@ const $d = {
|
|
|
2759
2783
|
ZoomOut: '<circle cx="11" cy="11" r="8" /><line x1="21" x2="16.65" y1="21" y2="16.65" /><line x1="8" x2="14" y1="11" y2="11" />'
|
|
2760
2784
|
};
|
|
2761
2785
|
function ge(o, e = 15, t) {
|
|
2762
|
-
const i =
|
|
2786
|
+
const i = Hd[o];
|
|
2763
2787
|
return i ? `<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${e}"${t ? ` class="${t}"` : ""} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${i}</svg>` : "";
|
|
2764
2788
|
}
|
|
2765
2789
|
let tt = null;
|
|
@@ -2775,27 +2799,27 @@ function Ei(o) {
|
|
|
2775
2799
|
}
|
|
2776
2800
|
function Ci(o) {
|
|
2777
2801
|
const e = Ei(o);
|
|
2778
|
-
return e ?
|
|
2802
|
+
return e ? Jr(e) : "#000000";
|
|
2779
2803
|
}
|
|
2780
|
-
function
|
|
2804
|
+
function Jr({ r: o, g: e, b: t }) {
|
|
2781
2805
|
return `#${[o, e, t].map((i) => Math.round(Nt(i / 255) * 255).toString(16).padStart(2, "0")).join("")}`;
|
|
2782
2806
|
}
|
|
2783
|
-
function
|
|
2807
|
+
function Wd(o, e, t) {
|
|
2784
2808
|
const i = o / 255, n = e / 255, r = t / 255, s = Math.max(i, n, r), l = Math.min(i, n, r), c = s - l;
|
|
2785
2809
|
let p = 0;
|
|
2786
2810
|
return c !== 0 && (s === i ? p = (n - r) / c % 6 : s === n ? p = (r - i) / c + 2 : p = (i - n) / c + 4, p *= 60, p < 0 && (p += 360)), { h: p, s: s === 0 ? 0 : c / s, v: s };
|
|
2787
2811
|
}
|
|
2788
|
-
function
|
|
2812
|
+
function Ud(o, e, t) {
|
|
2789
2813
|
const i = t * e, n = (o % 360 + 360) % 360 / 60, r = i * (1 - Math.abs(n % 2 - 1)), [s, l, c] = n < 1 ? [i, r, 0] : n < 2 ? [r, i, 0] : n < 3 ? [0, i, r] : n < 4 ? [0, r, i] : n < 5 ? [r, 0, i] : [i, 0, r], p = t - i;
|
|
2790
2814
|
return { r: (s + p) * 255, g: (l + p) * 255, b: (c + p) * 255 };
|
|
2791
2815
|
}
|
|
2792
|
-
function
|
|
2816
|
+
function qd(o) {
|
|
2793
2817
|
return ((Number.isFinite(o) ? o : 0) % 360 + 360) % 360;
|
|
2794
2818
|
}
|
|
2795
2819
|
function Nt(o) {
|
|
2796
2820
|
return Math.min(1, Math.max(0, Number.isFinite(o) ? o : 0));
|
|
2797
2821
|
}
|
|
2798
|
-
function
|
|
2822
|
+
function Gd(o) {
|
|
2799
2823
|
const e = o.title ?? "颜色选择";
|
|
2800
2824
|
return a("button", {
|
|
2801
2825
|
type: "button",
|
|
@@ -2809,7 +2833,7 @@ function Ud(o) {
|
|
|
2809
2833
|
Lt();
|
|
2810
2834
|
return;
|
|
2811
2835
|
}
|
|
2812
|
-
Lt(),
|
|
2836
|
+
Lt(), Kd(i, o);
|
|
2813
2837
|
}
|
|
2814
2838
|
}, [
|
|
2815
2839
|
a("span", {
|
|
@@ -2822,7 +2846,7 @@ function Lt() {
|
|
|
2822
2846
|
const o = tt;
|
|
2823
2847
|
o && (tt = null, o.teardowns.forEach((e) => e()), o.trigger.setAttribute("aria-expanded", "false"), o.panel.remove());
|
|
2824
2848
|
}
|
|
2825
|
-
function
|
|
2849
|
+
function Kd(o, e) {
|
|
2826
2850
|
const t = o.getRootNode(), i = t instanceof ShadowRoot ? t : document.body, n = {
|
|
2827
2851
|
root: t,
|
|
2828
2852
|
title: e.title ?? "颜色选择",
|
|
@@ -2845,15 +2869,15 @@ function Gd(o, e) {
|
|
|
2845
2869
|
items: [],
|
|
2846
2870
|
teardowns: []
|
|
2847
2871
|
};
|
|
2848
|
-
e.value && Di(n, e.value) ? n.hexText = Ci(e.value).toUpperCase() : n.hexText = e.value ? String(e.value) : "", n.panel = me(
|
|
2872
|
+
e.value && Di(n, e.value) ? n.hexText = Ci(e.value).toUpperCase() : n.hexText = e.value ? String(e.value) : "", n.panel = me(Xd(n), i), n.current = n.panel.querySelector(".picker-current"), n.hex = n.panel.querySelector(".picker-hex"), n.area = n.panel.querySelector(".picker-area"), n.handle = n.panel.querySelector(".picker-handle"), n.hueRange = n.panel.querySelector(".picker-hue"), n.clearBtn = n.panel.querySelector(".picker-clear"), n.items = Array.from(n.panel.querySelectorAll(".preset-color-item")).map((r, s) => ({ el: r, color: Tr[s] })), yo(n), jd(n), Yd(n), tt = n, o.setAttribute("aria-expanded", "true");
|
|
2849
2873
|
}
|
|
2850
|
-
function
|
|
2874
|
+
function jd(o) {
|
|
2851
2875
|
const e = o.trigger.getBoundingClientRect(), t = 190, i = o.panel.offsetHeight || 216, n = 8, r = Math.max(n, Math.min(e.left, window.innerWidth - t - n)), s = e.bottom + 6, l = s + i > window.innerHeight - n ? Math.max(n, e.top - i - 6) : s;
|
|
2852
2876
|
o.panel.style.left = `${r}px`, o.panel.style.top = `${l}px`;
|
|
2853
2877
|
}
|
|
2854
|
-
function
|
|
2878
|
+
function Yd(o) {
|
|
2855
2879
|
const e = (n) => {
|
|
2856
|
-
const r =
|
|
2880
|
+
const r = Vd(n);
|
|
2857
2881
|
r.includes(o.trigger) || r.includes(o.panel) || Lt();
|
|
2858
2882
|
}, t = (n) => {
|
|
2859
2883
|
n.key === "Escape" && Lt();
|
|
@@ -2866,11 +2890,11 @@ function Kd(o) {
|
|
|
2866
2890
|
() => o.root.removeEventListener("scroll", i, !0)
|
|
2867
2891
|
);
|
|
2868
2892
|
}
|
|
2869
|
-
function
|
|
2893
|
+
function Vd(o) {
|
|
2870
2894
|
const e = typeof o.composedPath == "function" ? o.composedPath() : [];
|
|
2871
2895
|
return e.length ? e : [o.target];
|
|
2872
2896
|
}
|
|
2873
|
-
function
|
|
2897
|
+
function Xd(o) {
|
|
2874
2898
|
return a("div", {
|
|
2875
2899
|
class: "preset-color-panel",
|
|
2876
2900
|
role: "dialog",
|
|
@@ -2886,15 +2910,15 @@ function Yd(o) {
|
|
|
2886
2910
|
maxlength: 7,
|
|
2887
2911
|
spellcheck: "false",
|
|
2888
2912
|
"aria-label": "颜色值",
|
|
2889
|
-
onInput: (e) =>
|
|
2913
|
+
onInput: (e) => Qd(o, e.target.value)
|
|
2890
2914
|
})
|
|
2891
2915
|
]),
|
|
2892
2916
|
a("div", {
|
|
2893
2917
|
class: "picker-area",
|
|
2894
2918
|
"aria-label": "自定义颜色",
|
|
2895
2919
|
tabindex: 0,
|
|
2896
|
-
onPointerdown: (e) =>
|
|
2897
|
-
onKeydown: (e) =>
|
|
2920
|
+
onPointerdown: (e) => Jd(o, e),
|
|
2921
|
+
onKeydown: (e) => ec(o, e)
|
|
2898
2922
|
}, [a("span", { class: "picker-handle" })]),
|
|
2899
2923
|
a("input", {
|
|
2900
2924
|
class: "picker-hue",
|
|
@@ -2903,7 +2927,7 @@ function Yd(o) {
|
|
|
2903
2927
|
max: 360,
|
|
2904
2928
|
step: 1,
|
|
2905
2929
|
"aria-label": "色相",
|
|
2906
|
-
onInput: (e) =>
|
|
2930
|
+
onInput: (e) => tc(o, Number(e.target.value)),
|
|
2907
2931
|
onChange: () => Mi(o)
|
|
2908
2932
|
}),
|
|
2909
2933
|
a("div", { class: "picker-heading" }, [
|
|
@@ -2932,12 +2956,12 @@ function Yd(o) {
|
|
|
2932
2956
|
style: { background: e },
|
|
2933
2957
|
title: e,
|
|
2934
2958
|
"aria-label": e,
|
|
2935
|
-
onClick: () =>
|
|
2959
|
+
onClick: () => Zd(o, e)
|
|
2936
2960
|
})))
|
|
2937
2961
|
]);
|
|
2938
2962
|
}
|
|
2939
2963
|
function Ai(o) {
|
|
2940
|
-
return
|
|
2964
|
+
return Jr(Ud(o.hue, o.saturation, o.value_));
|
|
2941
2965
|
}
|
|
2942
2966
|
function yo(o) {
|
|
2943
2967
|
const e = Ai(o);
|
|
@@ -2950,11 +2974,11 @@ function yo(o) {
|
|
|
2950
2974
|
function Di(o, e) {
|
|
2951
2975
|
const t = Ei(e);
|
|
2952
2976
|
if (!t) return !1;
|
|
2953
|
-
const i =
|
|
2977
|
+
const i = Wd(t.r, t.g, t.b);
|
|
2954
2978
|
return o.hue = i.h, o.saturation = i.s, o.value_ = i.v, o.hexText = Ci(e).toUpperCase(), !0;
|
|
2955
2979
|
}
|
|
2956
2980
|
function vt(o, e, t, i) {
|
|
2957
|
-
o.hue =
|
|
2981
|
+
o.hue = qd(e), o.saturation = Nt(t), o.value_ = Nt(i), o.hexText = Ai(o).toUpperCase(), yo(o);
|
|
2958
2982
|
}
|
|
2959
2983
|
function Mi(o) {
|
|
2960
2984
|
const e = Ai(o);
|
|
@@ -2963,10 +2987,10 @@ function Mi(o) {
|
|
|
2963
2987
|
function bo(o, e) {
|
|
2964
2988
|
o.model = e, e || (o.hexText = ""), yo(o), o.onChange(e);
|
|
2965
2989
|
}
|
|
2966
|
-
function
|
|
2990
|
+
function Zd(o, e) {
|
|
2967
2991
|
Di(o, e), bo(o, e);
|
|
2968
2992
|
}
|
|
2969
|
-
function
|
|
2993
|
+
function Qd(o, e) {
|
|
2970
2994
|
const t = e.trim();
|
|
2971
2995
|
if (!t) {
|
|
2972
2996
|
o.clearable && bo(o, void 0);
|
|
@@ -2974,7 +2998,7 @@ function Xd(o, e) {
|
|
|
2974
2998
|
}
|
|
2975
2999
|
Ei(t) && (Di(o, t), bo(o, Ci(t)));
|
|
2976
3000
|
}
|
|
2977
|
-
function
|
|
3001
|
+
function Jd(o, e) {
|
|
2978
3002
|
o.dragging = !0, Hn(o, e);
|
|
2979
3003
|
const t = (n) => {
|
|
2980
3004
|
o.dragging && Hn(o, n);
|
|
@@ -2989,12 +3013,12 @@ function Hn(o, e) {
|
|
|
2989
3013
|
const i = Nt((e.clientX - t.left) / t.width), n = Nt(1 - (e.clientY - t.top) / t.height);
|
|
2990
3014
|
vt(o, o.hue, i, n);
|
|
2991
3015
|
}
|
|
2992
|
-
function
|
|
3016
|
+
function ec(o, e) {
|
|
2993
3017
|
const t = e.shiftKey ? 0.1 : 0.02;
|
|
2994
3018
|
let i = !0;
|
|
2995
3019
|
e.key === "ArrowLeft" ? vt(o, o.hue, o.saturation - t, o.value_) : e.key === "ArrowRight" ? vt(o, o.hue, o.saturation + t, o.value_) : e.key === "ArrowUp" ? vt(o, o.hue, o.saturation, o.value_ + t) : e.key === "ArrowDown" ? vt(o, o.hue, o.saturation, o.value_ - t) : i = !1, i && (e.preventDefault(), Mi(o));
|
|
2996
3020
|
}
|
|
2997
|
-
function
|
|
3021
|
+
function tc(o, e) {
|
|
2998
3022
|
vt(o, e, o.saturation, o.value_);
|
|
2999
3023
|
}
|
|
3000
3024
|
function J(o, e, t, i) {
|
|
@@ -3024,7 +3048,7 @@ function xo(o, e, t, i) {
|
|
|
3024
3048
|
n ? a("div", { class: `tb-dd-panel${t.panelClass ? ` ${t.panelClass}` : ""}` }, i) : ""
|
|
3025
3049
|
].filter(Boolean));
|
|
3026
3050
|
}
|
|
3027
|
-
function
|
|
3051
|
+
function R(o) {
|
|
3028
3052
|
const e = o.step ?? 1, t = String(e), i = t.indexOf("."), n = i === -1 ? 0 : t.length - i - 1, r = (f) => Number.isFinite(f) ? Number(f.toFixed(n)) : 0, s = (f) => {
|
|
3029
3053
|
let m = r(f);
|
|
3030
3054
|
return o.min !== void 0 && m < o.min && (m = o.min), o.max !== void 0 && m > o.max && (m = o.max), m;
|
|
@@ -3040,12 +3064,12 @@ function I(o) {
|
|
|
3040
3064
|
placeholder: o.placeholder,
|
|
3041
3065
|
disabled: !!o.disabled,
|
|
3042
3066
|
onChange: (f) => {
|
|
3043
|
-
const m = f.target,
|
|
3044
|
-
if (
|
|
3067
|
+
const m = f.target, b = (m.value ?? "").trim();
|
|
3068
|
+
if (b === "") {
|
|
3045
3069
|
l !== void 0 && (m.value = String(l));
|
|
3046
3070
|
return;
|
|
3047
3071
|
}
|
|
3048
|
-
const w = Number(
|
|
3072
|
+
const w = Number(b);
|
|
3049
3073
|
if (!Number.isFinite(w)) {
|
|
3050
3074
|
m.value = l === void 0 ? "" : String(l);
|
|
3051
3075
|
return;
|
|
@@ -3108,9 +3132,9 @@ function it(o) {
|
|
|
3108
3132
|
}
|
|
3109
3133
|
});
|
|
3110
3134
|
}
|
|
3111
|
-
const
|
|
3135
|
+
const Ie = (o) => a("h3", { class: "pd-divider", text: o });
|
|
3112
3136
|
function Ae(o, e, t = "颜色选择", i) {
|
|
3113
|
-
return
|
|
3137
|
+
return Gd({ value: o, title: t, triggerClass: i, onChange: (n) => e(n) });
|
|
3114
3138
|
}
|
|
3115
3139
|
function Ke(o, e, t, i, n = !1) {
|
|
3116
3140
|
return a("div", {
|
|
@@ -3127,7 +3151,7 @@ function Ke(o, e, t, i, n = !1) {
|
|
|
3127
3151
|
a("span", { text: r.label })
|
|
3128
3152
|
])));
|
|
3129
3153
|
}
|
|
3130
|
-
function
|
|
3154
|
+
function ea(o, e, t, i = {}) {
|
|
3131
3155
|
const n = document.createElement("select");
|
|
3132
3156
|
n.className = i.className ?? "pd-select", i.width && (n.style.width = i.width);
|
|
3133
3157
|
for (const r of e) {
|
|
@@ -3136,7 +3160,7 @@ function Jr(o, e, t, i = {}) {
|
|
|
3136
3160
|
}
|
|
3137
3161
|
return n.value = o, e.some((r) => r.value === o) || (n.selectedIndex = -1), n.addEventListener("change", () => t(n.value)), n;
|
|
3138
3162
|
}
|
|
3139
|
-
function
|
|
3163
|
+
function oc(o) {
|
|
3140
3164
|
const e = window.innerHeight;
|
|
3141
3165
|
for (let t = o.parentElement; t && t !== document.body; t = t.parentElement) {
|
|
3142
3166
|
const i = getComputedStyle(t).overflowY;
|
|
@@ -3148,30 +3172,30 @@ function ec(o) {
|
|
|
3148
3172
|
return { top: 0, bottom: e };
|
|
3149
3173
|
}
|
|
3150
3174
|
function wo(o) {
|
|
3151
|
-
const e = Rs(o.fonts), t = o.placeholder ?? "默认", i = `font-select-list-${o.id}`, n = (
|
|
3152
|
-
const D =
|
|
3175
|
+
const e = Rs(o.fonts), t = o.placeholder ?? "默认", i = `font-select-list-${o.id}`, n = (I) => {
|
|
3176
|
+
const D = I?.trim();
|
|
3153
3177
|
return D ? pn(e, D)?.label ?? D : "";
|
|
3154
|
-
}, r = (
|
|
3155
|
-
const D = hn(
|
|
3156
|
-
return e.find((Y) => Y.label && hn(Y.label) === D)?.family ??
|
|
3178
|
+
}, r = (I) => {
|
|
3179
|
+
const D = hn(I);
|
|
3180
|
+
return e.find((Y) => Y.label && hn(Y.label) === D)?.family ?? I;
|
|
3157
3181
|
}, s = () => {
|
|
3158
|
-
const
|
|
3159
|
-
return
|
|
3160
|
-
}, l = (
|
|
3182
|
+
const I = o.value?.trim();
|
|
3183
|
+
return I ? pn(e, I) ? "" : I : "";
|
|
3184
|
+
}, l = (I) => {
|
|
3161
3185
|
const D = (o.value ?? "").trim(), U = (Z, v, B, re) => ({
|
|
3162
3186
|
kind: Z,
|
|
3163
3187
|
key: v,
|
|
3164
3188
|
label: B,
|
|
3165
3189
|
value: re,
|
|
3166
3190
|
selected: (re ?? "") === D
|
|
3167
|
-
}), Y =
|
|
3191
|
+
}), Y = I.trim();
|
|
3168
3192
|
if (!Y) {
|
|
3169
3193
|
const Z = [U("clear", "__clear__", t)], v = s();
|
|
3170
3194
|
v && Z.push(U("unknown", "__unknown__", `${v}(未知)`, v));
|
|
3171
3195
|
for (const B of e) Z.push(U("font", B.family, un(B), B.family));
|
|
3172
3196
|
return Z;
|
|
3173
3197
|
}
|
|
3174
|
-
const ce =
|
|
3198
|
+
const ce = Ls(e, Y).map((Z) => U("font", Z.family, un(Z), Z.family));
|
|
3175
3199
|
if (!ce.length) {
|
|
3176
3200
|
const Z = r(Y);
|
|
3177
3201
|
ce.push(U("free", "__free__", `使用「${Z}」`, Z));
|
|
@@ -3189,18 +3213,18 @@ function wo(o) {
|
|
|
3189
3213
|
highlighted: f?.highlighted ?? -1
|
|
3190
3214
|
};
|
|
3191
3215
|
m.open && (p.value = m.query);
|
|
3192
|
-
const
|
|
3216
|
+
const b = () => {
|
|
3193
3217
|
o.state.fontOpen = m.open ? { id: o.id, query: m.query, highlighted: m.highlighted } : null;
|
|
3194
3218
|
};
|
|
3195
|
-
|
|
3219
|
+
b();
|
|
3196
3220
|
const w = () => {
|
|
3197
|
-
const
|
|
3198
|
-
return l(m.query).findIndex((D) => (D.value ?? "") ===
|
|
3221
|
+
const I = (o.value ?? "").trim();
|
|
3222
|
+
return l(m.query).findIndex((D) => (D.value ?? "") === I);
|
|
3199
3223
|
}, g = () => {
|
|
3200
|
-
const
|
|
3201
|
-
u.classList.toggle("is-up",
|
|
3202
|
-
triggerTop:
|
|
3203
|
-
triggerBottom:
|
|
3224
|
+
const I = p.getBoundingClientRect(), D = oc(p);
|
|
3225
|
+
u.classList.toggle("is-up", ja({
|
|
3226
|
+
triggerTop: I.top,
|
|
3227
|
+
triggerBottom: I.bottom,
|
|
3204
3228
|
overlayHeight: u.getBoundingClientRect().height,
|
|
3205
3229
|
boundaryTop: D.top,
|
|
3206
3230
|
boundaryBottom: D.bottom
|
|
@@ -3211,8 +3235,8 @@ function wo(o) {
|
|
|
3211
3235
|
return;
|
|
3212
3236
|
}
|
|
3213
3237
|
u.isConnected || c.appendChild(u);
|
|
3214
|
-
const
|
|
3215
|
-
u.replaceChildren(...
|
|
3238
|
+
const I = l(m.query);
|
|
3239
|
+
u.replaceChildren(...I.map((D, U) => {
|
|
3216
3240
|
const Y = document.createElement("li");
|
|
3217
3241
|
return Y.id = `${i}-${U}`, Y.className = "font-select-option" + (U === m.highlighted ? " is-active" : "") + (D.kind === "unknown" || D.kind === "free" ? " is-muted" : ""), Y.setAttribute("role", "option"), Y.setAttribute("aria-selected", String(D.selected)), Y.textContent = D.label, Y.addEventListener("mousedown", (ce) => {
|
|
3218
3242
|
ce.preventDefault(), se(D);
|
|
@@ -3222,24 +3246,24 @@ function wo(o) {
|
|
|
3222
3246
|
m.highlighted >= 0 ? `${i}-${m.highlighted}` : ""
|
|
3223
3247
|
), g();
|
|
3224
3248
|
}, k = () => {
|
|
3225
|
-
m.open || o.disabled || (m.open = !0, m.query = "", m.highlighted = w(),
|
|
3249
|
+
m.open || o.disabled || (m.open = !0, m.query = "", m.highlighted = w(), b(), S());
|
|
3226
3250
|
}, C = () => {
|
|
3227
3251
|
m.open || k();
|
|
3228
3252
|
}, P = () => {
|
|
3229
|
-
m.open = !0, m.query = p.value, m.highlighted = l(m.query).length ? 0 : -1,
|
|
3230
|
-
}, z = (
|
|
3253
|
+
m.open = !0, m.query = p.value, m.highlighted = l(m.query).length ? 0 : -1, b(), S();
|
|
3254
|
+
}, z = (I) => {
|
|
3231
3255
|
if (!m.open) {
|
|
3232
3256
|
k();
|
|
3233
3257
|
return;
|
|
3234
3258
|
}
|
|
3235
3259
|
const D = l(m.query).length - 1;
|
|
3236
3260
|
if (D < 0) return;
|
|
3237
|
-
m.highlighted = Math.min(Math.max(m.highlighted +
|
|
3261
|
+
m.highlighted = Math.min(Math.max(m.highlighted + I, 0), D), b(), S(), u.children[m.highlighted]?.scrollIntoView?.({ block: "nearest" });
|
|
3238
3262
|
}, H = () => {
|
|
3239
3263
|
if (!m.open) return;
|
|
3240
|
-
const
|
|
3241
|
-
if (
|
|
3242
|
-
se(
|
|
3264
|
+
const I = l(m.query)[m.highlighted];
|
|
3265
|
+
if (I) {
|
|
3266
|
+
se(I);
|
|
3243
3267
|
return;
|
|
3244
3268
|
}
|
|
3245
3269
|
const D = m.query.trim();
|
|
@@ -3247,22 +3271,22 @@ function wo(o) {
|
|
|
3247
3271
|
const U = r(D);
|
|
3248
3272
|
se({ value: U });
|
|
3249
3273
|
}
|
|
3250
|
-
}, se = (
|
|
3251
|
-
m.open = !1, m.query = "", m.highlighted = -1,
|
|
3274
|
+
}, se = (I) => {
|
|
3275
|
+
m.open = !1, m.query = "", m.highlighted = -1, b(), p.value = n(I.value), S(), o.onChange(I.value);
|
|
3252
3276
|
}, j = () => {
|
|
3253
|
-
m.open && (m.open = !1, m.query = "", m.highlighted = -1,
|
|
3277
|
+
m.open && (m.open = !1, m.query = "", m.highlighted = -1, b(), p.value = n(o.value), S());
|
|
3254
3278
|
};
|
|
3255
|
-
return p.addEventListener("focus", k), p.addEventListener("click", C), p.addEventListener("input", P), p.addEventListener("blur", j), p.addEventListener("keydown", (
|
|
3256
|
-
const D =
|
|
3279
|
+
return p.addEventListener("focus", k), p.addEventListener("click", C), p.addEventListener("input", P), p.addEventListener("blur", j), p.addEventListener("keydown", (I) => {
|
|
3280
|
+
const D = I;
|
|
3257
3281
|
D.key === "ArrowDown" ? (D.preventDefault(), z(1)) : D.key === "ArrowUp" ? (D.preventDefault(), z(-1)) : D.key === "Enter" ? (D.preventDefault(), H()) : D.key === "Escape" && (D.preventDefault(), j());
|
|
3258
3282
|
}), c.append(p), S(), m.open && (p.focus(), p.setSelectionRange(m.query.length, m.query.length)), c;
|
|
3259
3283
|
}
|
|
3260
|
-
const
|
|
3284
|
+
const ic = [
|
|
3261
3285
|
{ key: "solid", label: "实线", preview: "1.5px solid currentColor" },
|
|
3262
3286
|
{ key: "dashed", label: "虚线", preview: "1.5px dashed currentColor" },
|
|
3263
3287
|
{ key: "dotted", label: "点线", preview: "1.5px dotted currentColor" },
|
|
3264
3288
|
{ key: "double", label: "双线", preview: "3px double currentColor" }
|
|
3265
|
-
],
|
|
3289
|
+
], nc = {
|
|
3266
3290
|
left: "TextAlignStart",
|
|
3267
3291
|
center: "TextAlignCenter",
|
|
3268
3292
|
right: "TextAlignEnd",
|
|
@@ -3279,7 +3303,7 @@ function We(o, e, t, i, n = {}) {
|
|
|
3279
3303
|
});
|
|
3280
3304
|
}
|
|
3281
3305
|
const ft = '<rect class="g-faint" x="2.5" y="2.5" width="13" height="13" />', Wn = '<rect class="g-solid" x="2.5" y="2.5" width="13" height="13" fill="none" />';
|
|
3282
|
-
function
|
|
3306
|
+
function rc(o) {
|
|
3283
3307
|
const e = o.format;
|
|
3284
3308
|
e.syncBorderDraft();
|
|
3285
3309
|
const t = e.values, i = !e.fontEditable, n = i || e.context === "cells", r = e.context === "none", s = e.context === "cells", l = !e.painterActive && (e.context === "none" || e.context === "cells" || !e.painterCapturable), c = e.painterActive ? "退出格式刷(Esc)" : e.context === "cells" ? "格式刷(表格单元格暂不支持)" : e.context === "none" ? "格式刷(需选中元素)" : e.painterCapturable ? "格式刷:单击刷一次,双击连续刷" : "格式刷(请仅选中一个源元素)", p = (m) => i ? `${m}(需选中文本元素)` : m, u = [
|
|
@@ -3300,7 +3324,7 @@ function ic(o) {
|
|
|
3300
3324
|
We("edge-left", "左边框", `${ft}<line class="g-solid" x1="3" y1="2" x2="3" y2="16" />`, () => e.applyEdge("left"), { on: e.edgeOn("left") }),
|
|
3301
3325
|
We("edge-right", "右边框", `${ft}<line class="g-solid" x1="15" y1="2" x2="15" y2="16" />`, () => e.applyEdge("right"), { on: e.edgeOn("right") })
|
|
3302
3326
|
]),
|
|
3303
|
-
a("div", { class: "ft-style-row" },
|
|
3327
|
+
a("div", { class: "ft-style-row" }, ic.map((m) => a("button", {
|
|
3304
3328
|
type: "button",
|
|
3305
3329
|
class: `ft-style-btn${e.borderStyle === m.key ? " on" : ""}`,
|
|
3306
3330
|
dataset: {
|
|
@@ -3314,7 +3338,7 @@ function ic(o) {
|
|
|
3314
3338
|
}, [a("span", { class: "ft-style-line", style: { borderTop: m.preview } })]))),
|
|
3315
3339
|
a("div", { class: "ft-border-style-row" }, [
|
|
3316
3340
|
a("span", { class: "ft-edge-label", text: "粗细" }),
|
|
3317
|
-
a("div", { class: "ft-line-width" }, [
|
|
3341
|
+
a("div", { class: "ft-line-width" }, [R({
|
|
3318
3342
|
value: e.borderWidth,
|
|
3319
3343
|
min: 0.25,
|
|
3320
3344
|
max: 5,
|
|
@@ -3340,10 +3364,10 @@ function ic(o) {
|
|
|
3340
3364
|
["center", "水平居中", "TextAlignCenter"],
|
|
3341
3365
|
["right", "右对齐", "TextAlignEnd"],
|
|
3342
3366
|
["justify", "两端对齐(撑满行宽,含末行)", "TextAlignJustify"]
|
|
3343
|
-
].map(([m,
|
|
3367
|
+
].map(([m, b, w]) => a("button", {
|
|
3344
3368
|
type: "button",
|
|
3345
3369
|
class: `ft-cell-btn${t.textAlign === m ? " on" : ""}`,
|
|
3346
|
-
dataset: { test: `align-${m}`, tip:
|
|
3370
|
+
dataset: { test: `align-${m}`, tip: b },
|
|
3347
3371
|
disabled: i,
|
|
3348
3372
|
onClick: () => e.applyStyle({ textAlign: m }),
|
|
3349
3373
|
html: ge(w)
|
|
@@ -3352,10 +3376,10 @@ function ic(o) {
|
|
|
3352
3376
|
["top", "顶端对齐", "ArrowUpToLine"],
|
|
3353
3377
|
["middle", "垂直居中", "ChevronsUpDown"],
|
|
3354
3378
|
["bottom", "底端对齐", "ArrowDownToLine"]
|
|
3355
|
-
].map(([m,
|
|
3379
|
+
].map(([m, b, w]) => a("button", {
|
|
3356
3380
|
type: "button",
|
|
3357
3381
|
class: `ft-cell-btn${t.verticalAlign === m ? " on" : ""}`,
|
|
3358
|
-
dataset: { test: `valign-${m}`, tip:
|
|
3382
|
+
dataset: { test: `valign-${m}`, tip: b },
|
|
3359
3383
|
disabled: i,
|
|
3360
3384
|
onClick: () => e.applyStyle({ verticalAlign: m }),
|
|
3361
3385
|
html: ge(w)
|
|
@@ -3391,7 +3415,7 @@ function ic(o) {
|
|
|
3391
3415
|
onChange: (m) => e.applyStyle({ fontFamily: m })
|
|
3392
3416
|
})]),
|
|
3393
3417
|
a("div", { class: "ft-size", dataset: { test: "font-size" } }, [
|
|
3394
|
-
|
|
3418
|
+
R({
|
|
3395
3419
|
value: typeof t.fontSize == "number" ? t.fontSize : void 0,
|
|
3396
3420
|
min: 5,
|
|
3397
3421
|
max: 72,
|
|
@@ -3406,13 +3430,13 @@ function ic(o) {
|
|
|
3406
3430
|
["bold", "Bold", "加粗", () => e.toggleBold()],
|
|
3407
3431
|
["underline", "Underline", "下划线", () => e.toggleUnderline()],
|
|
3408
3432
|
["strike", "Strikethrough", "删除线", () => e.toggleStrike()]
|
|
3409
|
-
].map(([m,
|
|
3433
|
+
].map(([m, b, w, g]) => a("button", {
|
|
3410
3434
|
type: "button",
|
|
3411
3435
|
class: `ft-btn${t[m] === !0 ? " on" : ""}`,
|
|
3412
3436
|
dataset: { test: m, tip: p(w) },
|
|
3413
3437
|
disabled: m === "bold" ? i : n,
|
|
3414
3438
|
onClick: g,
|
|
3415
|
-
html: ge(
|
|
3439
|
+
html: ge(b)
|
|
3416
3440
|
}))
|
|
3417
3441
|
]),
|
|
3418
3442
|
a("div", { class: "tb-ou ft-group", dataset: { unit: "color" } }, [
|
|
@@ -3427,7 +3451,7 @@ function ic(o) {
|
|
|
3427
3451
|
]),
|
|
3428
3452
|
a("div", { class: "tb-ou ft-group", dataset: { unit: "align" } }, [
|
|
3429
3453
|
xo(o, "align", {
|
|
3430
|
-
icon:
|
|
3454
|
+
icon: nc[String(t.textAlign)] ?? "TextAlignStart",
|
|
3431
3455
|
text: "对齐",
|
|
3432
3456
|
textClass: "ft-btn-text",
|
|
3433
3457
|
tip: i ? "对齐(需选中文本元素或单元格)" : "对齐",
|
|
@@ -3447,7 +3471,7 @@ function ic(o) {
|
|
|
3447
3471
|
])
|
|
3448
3472
|
]);
|
|
3449
3473
|
}
|
|
3450
|
-
const
|
|
3474
|
+
const ac = [
|
|
3451
3475
|
{ type: "text", label: "文本", icon: "T" },
|
|
3452
3476
|
{ type: "barcode", label: "条形码", icon: "▍▍" },
|
|
3453
3477
|
{ type: "qrcode", label: "二维码", icon: "▦" },
|
|
@@ -3460,7 +3484,7 @@ const nc = [
|
|
|
3460
3484
|
{ type: "rect", label: "矩形", icon: "▭" },
|
|
3461
3485
|
{ type: "oval", label: "椭圆", icon: "◯" },
|
|
3462
3486
|
{ type: "html", label: "HTML", icon: "<>" }
|
|
3463
|
-
],
|
|
3487
|
+
], sc = {
|
|
3464
3488
|
text: "T",
|
|
3465
3489
|
longText: "¶",
|
|
3466
3490
|
table: "⊞",
|
|
@@ -3474,7 +3498,7 @@ const nc = [
|
|
|
3474
3498
|
oval: "○",
|
|
3475
3499
|
html: "<>"
|
|
3476
3500
|
};
|
|
3477
|
-
function
|
|
3501
|
+
function lc(o) {
|
|
3478
3502
|
const e = o.state;
|
|
3479
3503
|
if (e.leftCollapsed)
|
|
3480
3504
|
return a("div", { class: "left-panel collapsed" }, [
|
|
@@ -3516,30 +3540,33 @@ function ac(o) {
|
|
|
3516
3540
|
}
|
|
3517
3541
|
}))
|
|
3518
3542
|
]),
|
|
3519
|
-
t("elements",
|
|
3520
|
-
t("fields", [
|
|
3521
|
-
t("layers", [
|
|
3543
|
+
t("elements", dc()),
|
|
3544
|
+
t("fields", [cc(o)]),
|
|
3545
|
+
t("layers", [pc(o)])
|
|
3522
3546
|
])
|
|
3523
3547
|
]);
|
|
3524
3548
|
}
|
|
3525
3549
|
function Un(o, e, t) {
|
|
3526
3550
|
return a("button", { type: "button", class: "collapse-btn", title: e, text: o, onClick: t });
|
|
3527
3551
|
}
|
|
3528
|
-
function
|
|
3552
|
+
function dc() {
|
|
3529
3553
|
return [
|
|
3530
3554
|
a("div", { class: "panel-title", text: "拖拽元素到画布" }),
|
|
3531
|
-
...
|
|
3555
|
+
...ac.map((o) => a("div", {
|
|
3532
3556
|
class: "material-card",
|
|
3533
3557
|
draggable: !0,
|
|
3534
3558
|
dataset: { test: `material-${o.type}` },
|
|
3535
|
-
onDragstart: (e) =>
|
|
3559
|
+
onDragstart: (e) => {
|
|
3560
|
+
const t = e.dataTransfer;
|
|
3561
|
+
t?.setData("elementType", o.type), t && (t.effectAllowed = "all");
|
|
3562
|
+
}
|
|
3536
3563
|
}, [
|
|
3537
3564
|
a("span", { class: "material-icon", text: o.icon }),
|
|
3538
3565
|
a("span", { class: "material-label", text: o.label })
|
|
3539
3566
|
]))
|
|
3540
3567
|
];
|
|
3541
3568
|
}
|
|
3542
|
-
function
|
|
3569
|
+
function cc(o) {
|
|
3543
3570
|
const e = o.state, t = Er(o.store.fields), i = (e.fieldSearch ?? "").trim().toLowerCase(), n = i ? t.map((r) => ({ ...r, fields: r.fields.filter((s) => `${s.fieldLabel}${s.fieldKey}`.toLowerCase().includes(i)) })).filter((r) => r.fields.length) : t;
|
|
3544
3571
|
return a("div", { class: "field-tree-panel" }, [
|
|
3545
3572
|
a("div", { class: "panel-title", text: "业务字段" }),
|
|
@@ -3567,10 +3594,11 @@ function lc(o) {
|
|
|
3567
3594
|
]) : "", c = s ? [] : r.fields.map((p) => a("div", {
|
|
3568
3595
|
class: "field-row",
|
|
3569
3596
|
draggable: !0,
|
|
3570
|
-
"data-tip": `${p.fieldLabel} (${p.fieldKey}) · 单击复制字段名 · Ctrl
|
|
3597
|
+
"data-tip": `${p.fieldLabel} (${p.fieldKey}) · 单击复制字段名 · 拖动中按住 Ctrl(Mac 为 ⌘)切换为插入字段名`,
|
|
3571
3598
|
style: { paddingLeft: `${r.key ? 22 : 8}px` },
|
|
3572
3599
|
onDragstart: (u) => {
|
|
3573
|
-
u.dataTransfer
|
|
3600
|
+
const f = u.dataTransfer;
|
|
3601
|
+
f?.setData("fieldKey", p.fieldKey), f && (f.effectAllowed = "all");
|
|
3574
3602
|
},
|
|
3575
3603
|
// 单击复制字段中文名(对齐 canvas FieldTreePanel 的 onCopyField,Gitee #IKRIZM)
|
|
3576
3604
|
onClick: () => {
|
|
@@ -3593,7 +3621,7 @@ function lc(o) {
|
|
|
3593
3621
|
n.length === 0 ? a("p", { class: "pd-empty", text: "暂无字段" }) : ""
|
|
3594
3622
|
].filter(Boolean));
|
|
3595
3623
|
}
|
|
3596
|
-
function
|
|
3624
|
+
function pc(o) {
|
|
3597
3625
|
const e = o.store, t = [...e.elements].sort((l, c) => (c.options.zIndex ?? 0) - (l.options.zIndex ?? 0)), i = e.elements.filter((l) => e.selectedIds.has(l.id)), n = i.length >= 2, r = i.some((l) => !!l.options.groupId), s = (l) => l.zone === "header" ? "页眉" : l.zone === "footer" ? "页脚" : "";
|
|
3598
3626
|
return a("div", { class: "layer-panel" }, [
|
|
3599
3627
|
a("div", { class: "panel-title", text: "图层" }),
|
|
@@ -3601,7 +3629,7 @@ function dc(o) {
|
|
|
3601
3629
|
class: `layer-item${e.selectedIds.has(l.id) ? " active" : ""}`,
|
|
3602
3630
|
onClick: (c) => e.selectElement(l.id, c.ctrlKey || c.metaKey)
|
|
3603
3631
|
}, [
|
|
3604
|
-
a("span", { class: "layer-icon", text:
|
|
3632
|
+
a("span", { class: "layer-icon", text: sc[l.printElementType.type] || "?" }),
|
|
3605
3633
|
a("span", { class: "layer-name", text: l.options.title || l.printElementType.title || l.printElementType.type }),
|
|
3606
3634
|
s(l) ? a("span", { class: "layer-zone", text: s(l) }) : "",
|
|
3607
3635
|
a("span", { class: "layer-zindex", text: `z:${l.options.zIndex ?? 0}` })
|
|
@@ -3633,7 +3661,7 @@ function dc(o) {
|
|
|
3633
3661
|
].filter(Boolean)) : ""
|
|
3634
3662
|
].filter(Boolean));
|
|
3635
3663
|
}
|
|
3636
|
-
function
|
|
3664
|
+
function uc(o) {
|
|
3637
3665
|
const e = o.store, t = o.state, i = e.pages.length > 1, n = e.pages[e.activePageIndex]?.name || `页面 ${e.activePageIndex + 1}`, r = e.tilingEnabled;
|
|
3638
3666
|
return a("div", { class: "page-tabs" }, [
|
|
3639
3667
|
a("div", { class: "page-tabs-list" }, e.pages.map((l, c) => t.renamingPage === c ? a("input", {
|
|
@@ -3705,7 +3733,7 @@ function cc(o) {
|
|
|
3705
3733
|
t.renamingPage !== null && l && e.renamePage(t.renamingPage, l), t.renamingPage = null, o.repaint();
|
|
3706
3734
|
}
|
|
3707
3735
|
}
|
|
3708
|
-
function
|
|
3736
|
+
function hc(o) {
|
|
3709
3737
|
const e = o.store, t = e.templateData, i = xt(t), n = t.orientation === "landscape" ? "横向" : "纵向", r = St[t.paperSize]?.label ?? t.paperSize, s = t.outputRotation, l = `${r} ${n} ${Math.round(i.width)}×${Math.round(i.height)}mm${s ? `(旋转${s}°)` : ""}`;
|
|
3710
3738
|
return a("div", { class: "status-bar" }, [
|
|
3711
3739
|
// canvas 的坐标位是 v-if,无坐标时不占位:这里用 display 同步隐藏
|
|
@@ -3722,8 +3750,8 @@ function pc(o) {
|
|
|
3722
3750
|
a("span", { class: "status-item status-paper", text: l })
|
|
3723
3751
|
]);
|
|
3724
3752
|
}
|
|
3725
|
-
const
|
|
3726
|
-
function
|
|
3753
|
+
const fc = Object.keys(St).filter((o) => o !== "CUSTOM" && !St[o]?.continuous);
|
|
3754
|
+
function mc(o) {
|
|
3727
3755
|
const e = document.createElement("label");
|
|
3728
3756
|
e.className = "pd-button small upload-label";
|
|
3729
3757
|
const t = document.createTextNode("上传背景图"), i = document.createElement("input");
|
|
@@ -3754,10 +3782,10 @@ function hc(o) {
|
|
|
3754
3782
|
}
|
|
3755
3783
|
}), o.host.uploadDesignBackground || n(!0), e;
|
|
3756
3784
|
}
|
|
3757
|
-
function
|
|
3785
|
+
function gc(o) {
|
|
3758
3786
|
const t = o.store.templateData.designBackground, i = t?.rotation ?? 0;
|
|
3759
3787
|
return a("div", { class: "design-background-config" }, [
|
|
3760
|
-
|
|
3788
|
+
Ie("设计背景"),
|
|
3761
3789
|
a("p", { class: "design-background-tip", text: "仅设计器显示,用于套打定位,不会出现在预览和打印中" }),
|
|
3762
3790
|
t?.src ? [
|
|
3763
3791
|
a("div", { class: "design-background-path", title: t.src, text: t.src }),
|
|
@@ -3777,10 +3805,10 @@ function fc(o) {
|
|
|
3777
3805
|
onClick: () => o.store.updateTemplateData({ designBackground: void 0 })
|
|
3778
3806
|
})
|
|
3779
3807
|
])
|
|
3780
|
-
] :
|
|
3808
|
+
] : mc(o)
|
|
3781
3809
|
].flat());
|
|
3782
3810
|
}
|
|
3783
|
-
function
|
|
3811
|
+
function bc(o) {
|
|
3784
3812
|
const e = o.store, t = e.templateData, i = t.tiling, n = {
|
|
3785
3813
|
...Be,
|
|
3786
3814
|
...i ?? {},
|
|
@@ -3796,17 +3824,17 @@ function mc(o) {
|
|
|
3796
3824
|
base: Be.sheetMargin,
|
|
3797
3825
|
propKey: w,
|
|
3798
3826
|
write: () => p(w, Be.sheetMargin[w])
|
|
3799
|
-
}), p = (w, g) => s({ sheetMargin: { ...n.sheetMargin, [w]: g ?? 0 } }), u = { ...t, tiling: n }, f = Pr(u), m = Math.max(
|
|
3800
|
-
let
|
|
3827
|
+
}), p = (w, g) => s({ sheetMargin: { ...n.sheetMargin, [w]: g ?? 0 } }), u = { ...t, tiling: n }, f = Pr(u), m = Math.max(Ir(u), 1);
|
|
3828
|
+
let b = "";
|
|
3801
3829
|
if (!f.length)
|
|
3802
3830
|
try {
|
|
3803
|
-
const w =
|
|
3804
|
-
|
|
3831
|
+
const w = Os(u), g = fn(u), S = n.sheetPaperSize === "CUSTOM" ? "自定义" : n.sheetPaperSize ?? "A4", k = n.sheetPaperSize === "CUSTOM" ? "" : n.sheetOrientation === "landscape" ? " 横向" : " 纵向";
|
|
3832
|
+
b = `目标纸 ${S}${k} ${g.width}×${g.height}mm · ${w.columns} 列 × ${w.rows} 行 = 每张 ${w.perSheet} 格 · 每格 ${w.tile.width}×${w.tile.height}mm`;
|
|
3805
3833
|
} catch {
|
|
3806
|
-
|
|
3834
|
+
b = "";
|
|
3807
3835
|
}
|
|
3808
3836
|
return a("div", { class: "tiling-config", dataset: { test: "tiling-config" } }, [
|
|
3809
|
-
|
|
3837
|
+
Ie("拼版打印"),
|
|
3810
3838
|
a("p", { class: "pd-hint", text: "把标签按「列 × 行」铺到一张大纸上批量打印" }),
|
|
3811
3839
|
a("div", { class: "pd-field" }, [
|
|
3812
3840
|
a("label", { class: "tiling-switch" }, [
|
|
@@ -3844,7 +3872,7 @@ function mc(o) {
|
|
|
3844
3872
|
});
|
|
3845
3873
|
}
|
|
3846
3874
|
}, [
|
|
3847
|
-
...
|
|
3875
|
+
...fc.map((w) => a("option", {
|
|
3848
3876
|
value: w,
|
|
3849
3877
|
text: St[w]?.label ?? w,
|
|
3850
3878
|
selected: (n.sheetPaperSize ?? "A4") === w
|
|
@@ -3852,68 +3880,68 @@ function mc(o) {
|
|
|
3852
3880
|
a("option", { value: "CUSTOM", text: "自定义", selected: n.sheetPaperSize === "CUSTOM" })
|
|
3853
3881
|
]), void 0, l("sheetPaperSize")),
|
|
3854
3882
|
n.sheetPaperSize === "CUSTOM" ? $("目标纸宽高 (mm)", a("div", { class: "custom-size-grid" }, [
|
|
3855
|
-
|
|
3883
|
+
R({ value: Number(n.sheetCustomWidth ?? 0), min: 25, max: 2e3, onCommit: (w) => s({ sheetCustomWidth: w }) }),
|
|
3856
3884
|
a("span", { class: "custom-size-x", text: "×" }),
|
|
3857
|
-
|
|
3885
|
+
R({ value: Number(n.sheetCustomHeight ?? 0), min: 25, max: 2e3, onCommit: (w) => s({ sheetCustomHeight: w }) })
|
|
3858
3886
|
])) : $("目标纸方向", Ke("tiling-ori", [
|
|
3859
3887
|
{ value: "portrait", label: "纵向" },
|
|
3860
3888
|
{ value: "landscape", label: "横向" }
|
|
3861
3889
|
], n.sheetOrientation === "landscape" ? "landscape" : "portrait", (w) => s({ sheetOrientation: w })), void 0, l("sheetOrientation")),
|
|
3862
|
-
|
|
3890
|
+
Ie("拼版留白 (mm)"),
|
|
3863
3891
|
a("div", { class: "margin-grid" }, [
|
|
3864
|
-
$("上",
|
|
3865
|
-
$("下",
|
|
3866
|
-
$("左",
|
|
3867
|
-
$("右",
|
|
3892
|
+
$("上", R({ value: n.sheetMargin.top ?? 0, min: 0, max: 100, onCommit: (w) => p("top", w) }), void 0, c("top")),
|
|
3893
|
+
$("下", R({ value: n.sheetMargin.bottom ?? 0, min: 0, max: 100, onCommit: (w) => p("bottom", w) }), void 0, c("bottom")),
|
|
3894
|
+
$("左", R({ value: n.sheetMargin.left ?? 0, min: 0, max: 100, onCommit: (w) => p("left", w) }), void 0, c("left")),
|
|
3895
|
+
$("右", R({ value: n.sheetMargin.right ?? 0, min: 0, max: 100, onCommit: (w) => p("right", w) }), void 0, c("right"))
|
|
3868
3896
|
]),
|
|
3869
|
-
|
|
3870
|
-
$("横向间距",
|
|
3871
|
-
$("纵向间距",
|
|
3872
|
-
$("列数",
|
|
3897
|
+
Ie("格间距与列数"),
|
|
3898
|
+
$("横向间距", R({ value: n.gapX ?? 0, min: 0, max: 50, onCommit: (w) => s({ gapX: w ?? 0 }) }), void 0, l("gapX")),
|
|
3899
|
+
$("纵向间距", R({ value: n.gapY ?? 0, min: 0, max: 50, onCommit: (w) => s({ gapY: w ?? 0 }) }), void 0, l("gapY")),
|
|
3900
|
+
$("列数", R({ value: n.columns ?? 1, min: 1, max: m, onCommit: (w) => s({ columns: w || 1 }) })),
|
|
3873
3901
|
...f.map((w) => a("p", { class: "pd-hint tiling-error", text: w.message })),
|
|
3874
|
-
!f.length &&
|
|
3902
|
+
!f.length && b ? a("p", { class: "pd-hint tiling-summary", text: b }) : ""
|
|
3875
3903
|
] : ""
|
|
3876
3904
|
].flat().filter(Boolean));
|
|
3877
3905
|
}
|
|
3878
|
-
const
|
|
3906
|
+
const xc = new Set(Ya.map((o) => o.group)), vc = { "table-settings": "content" }, qn = /* @__PURE__ */ new Map();
|
|
3879
3907
|
function _i(o) {
|
|
3880
3908
|
const e = o ?? "";
|
|
3881
|
-
let t =
|
|
3909
|
+
let t = qn.get(e);
|
|
3882
3910
|
if (!t) {
|
|
3883
|
-
const { groups: i, itemKeys: n } =
|
|
3884
|
-
t = { groups: i, keys: n, searching: !!e.trim() },
|
|
3911
|
+
const { groups: i, itemKeys: n } = Va(e);
|
|
3912
|
+
t = { groups: i, keys: n, searching: !!e.trim() }, qn.set(e, t);
|
|
3885
3913
|
}
|
|
3886
3914
|
return t;
|
|
3887
3915
|
}
|
|
3888
3916
|
function zi(o) {
|
|
3889
|
-
const e =
|
|
3890
|
-
return
|
|
3917
|
+
const e = vc[o] ?? o;
|
|
3918
|
+
return xc.has(e) ? e : "";
|
|
3891
3919
|
}
|
|
3892
|
-
function
|
|
3920
|
+
function yc(o, e) {
|
|
3893
3921
|
const t = _i(o.state.propSearch);
|
|
3894
3922
|
if (!t.searching) return !0;
|
|
3895
3923
|
const i = zi(e);
|
|
3896
3924
|
return !i || t.groups.includes(i);
|
|
3897
3925
|
}
|
|
3898
|
-
function
|
|
3926
|
+
function wc(o, e) {
|
|
3899
3927
|
const t = _i(o.state.propSearch);
|
|
3900
3928
|
return !t.searching || t.keys.has(e);
|
|
3901
3929
|
}
|
|
3902
|
-
function
|
|
3930
|
+
function ta(o, e) {
|
|
3903
3931
|
const t = o.props.style ?? {};
|
|
3904
3932
|
return o.props.style = { ...t, display: e ? "" : "none" }, o;
|
|
3905
3933
|
}
|
|
3906
3934
|
function M(o, e, t) {
|
|
3907
3935
|
const i = t.props.dataset ?? {};
|
|
3908
|
-
return t.props.dataset = { ...i, propKey: e },
|
|
3936
|
+
return t.props.dataset = { ...i, propKey: e }, ta(t, wc(o, e));
|
|
3909
3937
|
}
|
|
3910
|
-
function
|
|
3938
|
+
function Sc(o, e, t) {
|
|
3911
3939
|
const i = zi(e);
|
|
3912
3940
|
if (!i) return t;
|
|
3913
3941
|
const n = t.props.dataset ?? {};
|
|
3914
|
-
return t.props.dataset = { ...n, propGroup: i },
|
|
3942
|
+
return t.props.dataset = { ...n, propGroup: i }, ta(t, yc(o, e));
|
|
3915
3943
|
}
|
|
3916
|
-
function
|
|
3944
|
+
function oa(o, e) {
|
|
3917
3945
|
const t = _i(e);
|
|
3918
3946
|
for (const i of Array.from(o.querySelectorAll("[data-prop-group]"))) {
|
|
3919
3947
|
const n = zi(i.dataset.propGroup ?? "");
|
|
@@ -3922,7 +3950,7 @@ function ta(o, e) {
|
|
|
3922
3950
|
for (const i of Array.from(o.querySelectorAll("[data-prop-key]")))
|
|
3923
3951
|
i.style.display = !t.searching || t.keys.has(i.dataset.propKey ?? "") ? "" : "none";
|
|
3924
3952
|
}
|
|
3925
|
-
function
|
|
3953
|
+
function kc(o) {
|
|
3926
3954
|
return a("div", { class: "property-search" }, [
|
|
3927
3955
|
a("input", {
|
|
3928
3956
|
class: "pd-input",
|
|
@@ -3932,17 +3960,17 @@ function wc(o) {
|
|
|
3932
3960
|
value: o.state.propSearch ?? "",
|
|
3933
3961
|
onInput: (e) => {
|
|
3934
3962
|
const t = e.target, i = t.value;
|
|
3935
|
-
o.state.propSearch = i,
|
|
3963
|
+
o.state.propSearch = i, oa(t.getRootNode(), i);
|
|
3936
3964
|
}
|
|
3937
3965
|
})
|
|
3938
3966
|
]);
|
|
3939
3967
|
}
|
|
3940
|
-
const
|
|
3968
|
+
const Tc = {
|
|
3941
3969
|
Document: "≡",
|
|
3942
3970
|
Brush: "◧",
|
|
3943
3971
|
Setting: "⚙"
|
|
3944
3972
|
};
|
|
3945
|
-
function
|
|
3973
|
+
function Ec(o, e) {
|
|
3946
3974
|
try {
|
|
3947
3975
|
const t = window.localStorage.getItem(`property-group-${o}`);
|
|
3948
3976
|
return t === null ? e : t === "true";
|
|
@@ -3950,22 +3978,22 @@ function kc(o, e) {
|
|
|
3950
3978
|
return e;
|
|
3951
3979
|
}
|
|
3952
3980
|
}
|
|
3953
|
-
function
|
|
3981
|
+
function Cc(o, e) {
|
|
3954
3982
|
try {
|
|
3955
3983
|
window.localStorage.setItem(`property-group-${o}`, String(e));
|
|
3956
3984
|
} catch {
|
|
3957
3985
|
}
|
|
3958
3986
|
}
|
|
3959
3987
|
function ye(o, e, t, i, n, r = !0) {
|
|
3960
|
-
const s =
|
|
3961
|
-
return
|
|
3988
|
+
const s = Ec(e, r);
|
|
3989
|
+
return Sc(o, e, a("div", { class: `property-group${s ? " is-expanded" : ""}` }, [
|
|
3962
3990
|
a("div", {
|
|
3963
3991
|
class: "group-header",
|
|
3964
3992
|
onClick: () => {
|
|
3965
|
-
|
|
3993
|
+
Cc(e, !s), o.repaint();
|
|
3966
3994
|
}
|
|
3967
3995
|
}, [
|
|
3968
|
-
a("span", { class: "group-icon", text:
|
|
3996
|
+
a("span", { class: "group-icon", text: Tc[i] || "•" }),
|
|
3969
3997
|
a("span", { class: "group-title", text: t }),
|
|
3970
3998
|
a("span", { class: "expand-icon", text: s ? "▾" : "▸" })
|
|
3971
3999
|
]),
|
|
@@ -3979,7 +4007,7 @@ function ye(o, e, t, i, n, r = !0) {
|
|
|
3979
4007
|
function So(o) {
|
|
3980
4008
|
return a("form", { class: "pd-form", onSubmit: (e) => e.preventDefault() }, o.filter(Boolean));
|
|
3981
4009
|
}
|
|
3982
|
-
function
|
|
4010
|
+
function ia(o) {
|
|
3983
4011
|
return o.split(".").flatMap((e) => {
|
|
3984
4012
|
const t = e.match(/^([^\[]+)((?:\[\d+\])*)$/);
|
|
3985
4013
|
if (!t) return [e];
|
|
@@ -3987,28 +4015,28 @@ function oa(o) {
|
|
|
3987
4015
|
return [i, ...n];
|
|
3988
4016
|
});
|
|
3989
4017
|
}
|
|
3990
|
-
function
|
|
3991
|
-
return
|
|
4018
|
+
function Gn(o, e) {
|
|
4019
|
+
return ia(e).reduce(
|
|
3992
4020
|
(n, r) => n == null ? "" : n[r],
|
|
3993
4021
|
o
|
|
3994
4022
|
) ?? "";
|
|
3995
4023
|
}
|
|
3996
4024
|
function Pi(o, e, t, i) {
|
|
3997
|
-
const n =
|
|
4025
|
+
const n = ia(t), r = n.pop(), s = n.reduce(
|
|
3998
4026
|
(l, c) => ((l[c] === void 0 || l[c] === null) && (l[c] = {}), l[c]),
|
|
3999
4027
|
e
|
|
4000
4028
|
);
|
|
4001
4029
|
s[r] = i || void 0, o.recordHistory(), o.emit();
|
|
4002
4030
|
}
|
|
4003
|
-
function
|
|
4031
|
+
function Ac(o, e) {
|
|
4004
4032
|
const t = o.store;
|
|
4005
4033
|
if (e.printElementType.type === "table" && t.tableSelection?.elementId === e.id) {
|
|
4006
4034
|
const { r1: i, c1: n } = t.tableSelection, r = (e.options.tableRows ?? [])[i];
|
|
4007
|
-
if (r) return
|
|
4035
|
+
if (r) return Xa(r.type, i, n, e.options.fields?.[0]?.dataSource);
|
|
4008
4036
|
}
|
|
4009
|
-
return
|
|
4037
|
+
return Za(e);
|
|
4010
4038
|
}
|
|
4011
|
-
function
|
|
4039
|
+
function Dc(o, e) {
|
|
4012
4040
|
const t = document.createElement("label");
|
|
4013
4041
|
t.className = "pd-button small upload-label", me(a("svg", { class: "pd-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, [
|
|
4014
4042
|
a("path", { fill: "currentColor", d: "M12 3l4 4h-3v7h-2V7H8zm-7 12h14v5H5Z" })
|
|
@@ -4045,43 +4073,43 @@ function Cc(o, e) {
|
|
|
4045
4073
|
const l = document.createElement("p");
|
|
4046
4074
|
return l.className = "upload-tip", l.textContent = "支持 jpg/png/gif/bmp/webp/svg 等图片,上传后填入相对路径", s.append(t, l), s;
|
|
4047
4075
|
}
|
|
4048
|
-
function
|
|
4076
|
+
function Mc(o, e) {
|
|
4049
4077
|
const t = (i) => o.fire("open-expression", {
|
|
4050
4078
|
elementId: e.id,
|
|
4051
4079
|
targetPath: i.targetPath,
|
|
4052
|
-
value:
|
|
4080
|
+
value: Gn(e, i.targetPath)
|
|
4053
4081
|
});
|
|
4054
4082
|
return ye(o, "binding", "内容", "Document", [
|
|
4055
|
-
...
|
|
4083
|
+
...Ac(o, e).map((i) => $(
|
|
4056
4084
|
i.label,
|
|
4057
4085
|
a("input", {
|
|
4058
4086
|
class: "pd-input",
|
|
4059
4087
|
type: "text",
|
|
4060
|
-
value:
|
|
4088
|
+
value: Gn(e, i.targetPath),
|
|
4061
4089
|
placeholder: i.placeholder || "输入内容,支持 {字段} 表达式",
|
|
4062
4090
|
// canvas 用 @input 实时写回;本包整体重绘会打断输入,改为 change(提交时机不同,结果一致)
|
|
4063
4091
|
onChange: (n) => Pi(o.store, e, i.targetPath, n.target.value),
|
|
4064
4092
|
onDblclick: () => t(i)
|
|
4065
4093
|
})
|
|
4066
4094
|
)),
|
|
4067
|
-
e.printElementType.type === "image" ?
|
|
4095
|
+
e.printElementType.type === "image" ? Dc(o, e) : ""
|
|
4068
4096
|
].filter(Boolean));
|
|
4069
4097
|
}
|
|
4070
4098
|
const zt = /* @__PURE__ */ new Map();
|
|
4071
4099
|
function so(o) {
|
|
4072
4100
|
return `${Math.round(o * 1e4) / 1e4}%`;
|
|
4073
4101
|
}
|
|
4074
|
-
function
|
|
4075
|
-
const t =
|
|
4102
|
+
function na(o, e) {
|
|
4103
|
+
const t = Qa(e.value), i = t.kind === "custom", n = t.kind === "axes" ? t.x : 50, r = t.kind === "axes" ? t.y : 50, s = Ja(e.src), l = zt.get(s.src), c = {
|
|
4076
4104
|
widthMm: e.widthMm,
|
|
4077
4105
|
heightMm: e.heightMm,
|
|
4078
4106
|
naturalWidth: l?.width,
|
|
4079
4107
|
naturalHeight: l?.height,
|
|
4080
4108
|
fit: e.fit,
|
|
4081
4109
|
scalePct: e.scale
|
|
4082
|
-
}, p =
|
|
4110
|
+
}, p = es(c), u = ts(c, n, r), f = document.createElement("select");
|
|
4083
4111
|
f.className = "pd-select", f.style.width = "100%";
|
|
4084
|
-
for (const g of
|
|
4112
|
+
for (const g of os(p, n, r)) {
|
|
4085
4113
|
const S = document.createElement("option");
|
|
4086
4114
|
S.value = g.value, S.textContent = g.label, f.appendChild(S);
|
|
4087
4115
|
}
|
|
@@ -4094,25 +4122,25 @@ function ia(o, e) {
|
|
|
4094
4122
|
const [g, S] = f.value.split(",").map(Number);
|
|
4095
4123
|
e.onCommit(rn(g, S));
|
|
4096
4124
|
});
|
|
4097
|
-
const m = fe(e.fieldKey),
|
|
4125
|
+
const m = fe(e.fieldKey), b = [a("div", { class: "pd-field", dataset: { field: e.fieldKey } }, [
|
|
4098
4126
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t" }, [e.label, ui(m)]), e.resetAnchor ?? ""].filter(Boolean)),
|
|
4099
4127
|
f
|
|
4100
4128
|
])];
|
|
4101
|
-
|
|
4102
|
-
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t" }, [
|
|
4103
|
-
|
|
4129
|
+
b.push(a("div", { class: "pd-field", dataset: { field: "ap-img-fit-scale" } }, [
|
|
4130
|
+
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t" }, [is, ui(fe("ap-img-fit-scale"))]), e.resetScale ?? ""].filter(Boolean)),
|
|
4131
|
+
R({
|
|
4104
4132
|
value: e.scale,
|
|
4105
4133
|
min: an,
|
|
4106
|
-
max:
|
|
4134
|
+
max: ns,
|
|
4107
4135
|
step: 5,
|
|
4108
4136
|
placeholder: "默认 100",
|
|
4109
4137
|
onCommit: (g) => e.onScaleCommit(g > an ? g : void 0)
|
|
4110
4138
|
})
|
|
4111
4139
|
]));
|
|
4112
|
-
for (const g of
|
|
4113
|
-
|
|
4140
|
+
for (const g of rs(p, n, r))
|
|
4141
|
+
b.push(a("div", { class: "pd-field", dataset: { field: e.fieldKey } }, [
|
|
4114
4142
|
a("span", { class: "pd-label", text: g.label }),
|
|
4115
|
-
|
|
4143
|
+
R({
|
|
4116
4144
|
value: g.value,
|
|
4117
4145
|
min: 0,
|
|
4118
4146
|
max: 100,
|
|
@@ -4120,8 +4148,8 @@ function ia(o, e) {
|
|
|
4120
4148
|
onCommit: (S) => e.onCommit(rn(g.name === "horizontal" ? S : n, g.name === "vertical" ? S : r))
|
|
4121
4149
|
})
|
|
4122
4150
|
]));
|
|
4123
|
-
const w =
|
|
4124
|
-
return w &&
|
|
4151
|
+
const w = as(p, i);
|
|
4152
|
+
return w && b.push(a("p", { class: "pd-crop-note", text: w })), s.isSample && b.push(a("p", { class: "pd-crop-note", text: ss })), b.push(a("div", { class: "pd-crop-preview" }, [
|
|
4125
4153
|
a("img", {
|
|
4126
4154
|
class: "pd-crop-thumb",
|
|
4127
4155
|
src: s.src,
|
|
@@ -4141,7 +4169,7 @@ function ia(o, e) {
|
|
|
4141
4169
|
class: "pd-crop-win",
|
|
4142
4170
|
style: { left: so(u.leftPct), top: so(u.topPct), width: so(u.widthPct), height: so(u.heightPct) }
|
|
4143
4171
|
}) : ""
|
|
4144
|
-
])), a("div", { class: e.containerClass ?? "pd-crop-anchor" },
|
|
4172
|
+
])), a("div", { class: e.containerClass ?? "pd-crop-anchor" }, b);
|
|
4145
4173
|
}
|
|
4146
4174
|
const Je = (o) => Number(o ?? 0), hi = (o) => o || void 0;
|
|
4147
4175
|
function wt(o, e, t, i, n) {
|
|
@@ -4155,7 +4183,7 @@ function wt(o, e, t, i, n) {
|
|
|
4155
4183
|
})
|
|
4156
4184
|
]);
|
|
4157
4185
|
}
|
|
4158
|
-
function
|
|
4186
|
+
function ra(o, e, t, i, n = !1, r) {
|
|
4159
4187
|
return a("div", { class: "pd-field" }, [
|
|
4160
4188
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: o }), ""].filter(Boolean)),
|
|
4161
4189
|
a("select", {
|
|
@@ -4168,41 +4196,41 @@ function na(o, e, t, i, n = !1, r) {
|
|
|
4168
4196
|
function Pt(o, e, t, i, n = {}) {
|
|
4169
4197
|
return a("div", { class: "pd-field" }, [
|
|
4170
4198
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: o }), n.reset ?? ""].filter(Boolean)),
|
|
4171
|
-
|
|
4199
|
+
ea(e, t, i, {
|
|
4172
4200
|
className: "pd-select",
|
|
4173
4201
|
...n.full ? { width: "100%" } : {}
|
|
4174
4202
|
})
|
|
4175
4203
|
]);
|
|
4176
4204
|
}
|
|
4177
|
-
const
|
|
4205
|
+
const It = (o) => a("p", { class: "pd-hint", text: o }), _c = "多级表头作为一个结构整体重复,勾选后表头区所有行都会在每页顶部重复", zc = [
|
|
4178
4206
|
{ value: "header", label: "标题行" },
|
|
4179
4207
|
{ value: "data", label: "数据行" },
|
|
4180
4208
|
{ value: "subtotal", label: "小计行(每页小计)" },
|
|
4181
4209
|
{ value: "summary", label: "汇总行" }
|
|
4182
|
-
],
|
|
4210
|
+
], Pc = [
|
|
4183
4211
|
{ value: "CODE128", label: "CODE128(通用)" },
|
|
4184
4212
|
{ value: "EAN13", label: "EAN13(商品码)" },
|
|
4185
4213
|
{ value: "EAN8", label: "EAN8" },
|
|
4186
4214
|
{ value: "UPC", label: "UPC" },
|
|
4187
4215
|
{ value: "CODE39", label: "CODE39" },
|
|
4188
4216
|
{ value: "ITF14", label: "ITF14" }
|
|
4189
|
-
],
|
|
4217
|
+
], Ic = [
|
|
4190
4218
|
{ value: "L", label: "L(最低,容量大)" },
|
|
4191
4219
|
{ value: "M", label: "M(推荐)" },
|
|
4192
4220
|
{ value: "Q", label: "Q" },
|
|
4193
4221
|
{ value: "H", label: "H(最高)" }
|
|
4194
|
-
],
|
|
4222
|
+
], Fc = [
|
|
4195
4223
|
{ value: "clip", label: "截断" },
|
|
4196
4224
|
{ value: "shrink", label: "自动缩小" },
|
|
4197
4225
|
{ value: "autoHeight", label: "自适应行高" }
|
|
4198
|
-
],
|
|
4199
|
-
function
|
|
4226
|
+
], Rc = { value: "__multi__", label: "多选", disabled: !0 };
|
|
4227
|
+
function Lc(o, e) {
|
|
4200
4228
|
const t = o.store, i = t.tableSelection, n = e.options.tableRows ?? [], r = i ? n[i.r1] : void 0;
|
|
4201
4229
|
if (!i || !r) return ye(o, "table-row", "行属性", "Grid", []);
|
|
4202
4230
|
const s = (l) => t.updateElement(e.id, l);
|
|
4203
4231
|
return ye(o, "table-row", "行属性", "Grid", [
|
|
4204
4232
|
So([
|
|
4205
|
-
|
|
4233
|
+
ra("行类型", r.type, zc, (l) => {
|
|
4206
4234
|
const c = vi(n, i.r1, l);
|
|
4207
4235
|
if (c) {
|
|
4208
4236
|
window.alert(c);
|
|
@@ -4212,7 +4240,7 @@ function Rc(o, e) {
|
|
|
4212
4240
|
}, !0),
|
|
4213
4241
|
a("div", { class: "pd-field" }, [
|
|
4214
4242
|
a("span", { class: "pd-label", text: "行高 (mm)" }),
|
|
4215
|
-
|
|
4243
|
+
R({
|
|
4216
4244
|
value: r.height,
|
|
4217
4245
|
min: 3,
|
|
4218
4246
|
max: 100,
|
|
@@ -4223,12 +4251,12 @@ function Rc(o, e) {
|
|
|
4223
4251
|
})
|
|
4224
4252
|
]),
|
|
4225
4253
|
r.type === "header" ? wt("表头每页重复", r.repeatOnPage ?? !1, (l) => {
|
|
4226
|
-
|
|
4227
|
-
},
|
|
4254
|
+
cs(n, l), s({ tableRows: n });
|
|
4255
|
+
}, _c) : ""
|
|
4228
4256
|
])
|
|
4229
4257
|
]);
|
|
4230
4258
|
}
|
|
4231
|
-
function
|
|
4259
|
+
function Oc(o, e) {
|
|
4232
4260
|
const t = o.store, i = e.options, n = (u) => t.updateElement(e.id, u), r = i.tableColWidths ?? [], s = t.paperSize.width - t.templateData.margins.left - t.templateData.margins.right, l = t.fields.filter((u) => u.fieldType === "list").map((u) => ({ value: u.fieldKey, label: u.fieldLabel })), c = zr("table"), p = (u) => it({
|
|
4233
4261
|
target: i,
|
|
4234
4262
|
base: c,
|
|
@@ -4237,7 +4265,7 @@ function Ic(o, e) {
|
|
|
4237
4265
|
});
|
|
4238
4266
|
return ye(o, "table-settings", "表格设置", "Grid", [
|
|
4239
4267
|
So([
|
|
4240
|
-
|
|
4268
|
+
ra("列表数据源字段", i.dataSource ?? "", l, (u) => n({ dataSource: u || void 0 }), !0),
|
|
4241
4269
|
a("div", { class: "pd-field" }, [
|
|
4242
4270
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: "默认字体" }), p("tableDefaultFontFamily")]),
|
|
4243
4271
|
wo({
|
|
@@ -4251,7 +4279,7 @@ function Ic(o, e) {
|
|
|
4251
4279
|
]),
|
|
4252
4280
|
a("div", { class: "pd-field" }, [
|
|
4253
4281
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: "默认字号 (pt)" }), p("tableDefaultFontSize")]),
|
|
4254
|
-
|
|
4282
|
+
R({
|
|
4255
4283
|
value: Je(i.tableDefaultFontSize),
|
|
4256
4284
|
min: 0,
|
|
4257
4285
|
max: 72,
|
|
@@ -4265,7 +4293,7 @@ function Ic(o, e) {
|
|
|
4265
4293
|
]),
|
|
4266
4294
|
a("div", { class: "pd-field" }, [
|
|
4267
4295
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: "默认内边距 (mm)" }), p("tableDefaultPadding")]),
|
|
4268
|
-
|
|
4296
|
+
R({
|
|
4269
4297
|
value: Je(i.tableDefaultPadding),
|
|
4270
4298
|
min: 0,
|
|
4271
4299
|
max: 10,
|
|
@@ -4278,14 +4306,14 @@ function Ic(o, e) {
|
|
|
4278
4306
|
a("span", { class: "pd-label", text: "列宽 (mm)" }),
|
|
4279
4307
|
...r.map((u, f) => a("div", { class: "col-width-row" }, [
|
|
4280
4308
|
a("span", { style: { width: "60px" }, text: `列${f + 1}` }),
|
|
4281
|
-
|
|
4309
|
+
R({
|
|
4282
4310
|
value: u,
|
|
4283
4311
|
min: 5,
|
|
4284
4312
|
max: 200,
|
|
4285
4313
|
onCommit: (m) => {
|
|
4286
|
-
const
|
|
4287
|
-
if (
|
|
4288
|
-
const w = Math.max(5, Math.round((s -
|
|
4314
|
+
const b = r.reduce((w, g, S) => S === f ? w : w + g, 0);
|
|
4315
|
+
if (b + m > s) {
|
|
4316
|
+
const w = Math.max(5, Math.round((s - b) * 10) / 10);
|
|
4289
4317
|
window.alert(`表格总宽不能超过打印范围宽度 ${s}mm,列${f + 1} 已调整为 ${w}mm`), r[f] = w;
|
|
4290
4318
|
} else
|
|
4291
4319
|
r[f] = m;
|
|
@@ -4297,7 +4325,7 @@ function Ic(o, e) {
|
|
|
4297
4325
|
])
|
|
4298
4326
|
]);
|
|
4299
4327
|
}
|
|
4300
|
-
function
|
|
4328
|
+
function Nc(o, e) {
|
|
4301
4329
|
const t = o.store, i = e.options, n = e.printElementType.type === "table", r = (l) => t.updateElement(e.id, l), s = [];
|
|
4302
4330
|
if (n)
|
|
4303
4331
|
s.push(M(o, "pg-enabled", wt(
|
|
@@ -4325,65 +4353,65 @@ const Yo = /* @__PURE__ */ new WeakMap(), Kn = [
|
|
|
4325
4353
|
{ value: "bottom", label: "下" },
|
|
4326
4354
|
{ value: "left", label: "左" }
|
|
4327
4355
|
];
|
|
4328
|
-
function
|
|
4356
|
+
function $c(o, e) {
|
|
4329
4357
|
const t = o.store, i = t.tableSelection, n = e.options.tableRows ?? [];
|
|
4330
4358
|
if (!i) return ye(o, "table-cell", "单元格", "Menu", []);
|
|
4331
4359
|
const r = Dr(n, i.r1, i.c1), s = n[r.r]?.cells[r.c];
|
|
4332
4360
|
if (!s) return ye(o, "table-cell", "单元格", "Menu", []);
|
|
4333
|
-
const l = () =>
|
|
4334
|
-
m?.key !== f && Yo.set(t,
|
|
4335
|
-
const w = (
|
|
4361
|
+
const l = () => ds(n, i), c = bi(n, i), p = c.count, u = c.mode === "multi", f = `${e.id}:${i.r1}:${i.c1}:${i.r2}:${i.c2}`, m = Yo.get(t), b = m?.key === f ? m : { key: f, border: {}, values: {}, edges: {} };
|
|
4362
|
+
m?.key !== f && Yo.set(t, b);
|
|
4363
|
+
const w = (x) => {
|
|
4336
4364
|
Yo.set(t, {
|
|
4337
4365
|
key: f,
|
|
4338
|
-
border:
|
|
4339
|
-
values:
|
|
4340
|
-
edges:
|
|
4366
|
+
border: x.border ?? b.border,
|
|
4367
|
+
values: x.values ?? b.values,
|
|
4368
|
+
edges: x.edges ?? b.edges
|
|
4341
4369
|
});
|
|
4342
|
-
}, g = (
|
|
4343
|
-
w({ border: { ...
|
|
4344
|
-
}, S = (
|
|
4345
|
-
l().forEach(
|
|
4346
|
-
}, k = (
|
|
4370
|
+
}, g = (x, L) => {
|
|
4371
|
+
w({ border: { ...b.border, [x]: L } }), o.repaint();
|
|
4372
|
+
}, S = (x, L) => {
|
|
4373
|
+
l().forEach(x), u && L && w({ values: { ...b.values, ...L } }), t.updateElement(e.id, { tableRows: n });
|
|
4374
|
+
}, k = (x, L) => {
|
|
4347
4375
|
S((Q) => {
|
|
4348
|
-
Q[
|
|
4349
|
-
}, { [
|
|
4350
|
-
}, C = (
|
|
4376
|
+
Q[x] = L;
|
|
4377
|
+
}, { [x]: L });
|
|
4378
|
+
}, C = (x) => u ? b.values[x] : s[x], P = (x) => u && x in b.values, z = u ? { width: void 0, style: void 0, color: void 0 } : rr(n, i), H = !u && l().some((x) => !!x.borders && !!(x.borders.top || x.borders.right || x.borders.bottom || x.borders.left)), se = !u && !H, j = {
|
|
4351
4379
|
width: se ? 0 : typeof z.width == "number" ? z.width : no.width,
|
|
4352
4380
|
style: se ? "none" : typeof z.style == "string" && z.style !== "mixed" ? z.style : no.style,
|
|
4353
4381
|
color: typeof z.color == "string" && z.color !== "mixed" ? z.color : no.color,
|
|
4354
|
-
...
|
|
4355
|
-
},
|
|
4382
|
+
...b.border
|
|
4383
|
+
}, I = "__mixed__", D = {
|
|
4356
4384
|
style: !u && z.style === "mixed",
|
|
4357
4385
|
width: !u && z.width === "mixed",
|
|
4358
4386
|
color: !u && z.color === "mixed"
|
|
4359
|
-
}, U = D.style && !("style" in
|
|
4360
|
-
const L = { style:
|
|
4361
|
-
|
|
4362
|
-
},
|
|
4387
|
+
}, U = D.style && !("style" in b.border), Y = D.width && !("width" in b.border), ce = D.color && !("color" in b.border), Z = U || Y || ce, v = U ? I : j.style, B = Y ? void 0 : j.width, re = ce ? void 0 : j.color, Fe = (x) => {
|
|
4388
|
+
const L = { style: x };
|
|
4389
|
+
x !== "none" && B === 0 ? L.width = no.width : x === "none" && !H && (L.width = 0), w({ border: { ...b.border, ...L } }), o.repaint();
|
|
4390
|
+
}, F = () => ({ ...j }), ee = u ? Kn.reduce((x, L) => (x[L.value] = b.edges[L.value] ? "on" : "off", x), {}) : cr(l().map((x) => x.borders)), je = u ? "cellType" in b.values ? b.values.cellType ?? "text" : ls(n, i) : s.cellType ?? "text", pe = je === "barcode", Ye = je === "qrcode", nt = je === "image", W = je === "text", ko = pe && !!C("printerDpi"), Ht = Mr(C("printerDpi"), C("barWidth")), Wt = u ? b.values.textFit : wr(s), To = u ? "cellType" in b.values ? b.values.cellType ?? "text" : "" : s.cellType || "text", Ve = (x) => u ? [Rc, ...x] : x, we = (x) => u ? "多选" : x, Se = (x, L) => u ? b.values[x] : L, Eo = u ? C("barcodeType") ?? "__multi__" : s.barcodeType || "CODE128", Ut = u ? P("printerDpi") ? C("printerDpi") ? String(C("printerDpi")) : "" : "__multi__" : s.printerDpi ? String(s.printerDpi) : "", q = u ? C("qrCodeLevel") ?? "__multi__" : s.qrCodeLevel || "M", kt = u ? C("fit") ?? "__multi__" : s.fit || "contain", G = Wt ?? "__multi__", rt = gr(n, i);
|
|
4363
4391
|
let ue = !1;
|
|
4364
|
-
for (let
|
|
4392
|
+
for (let x = i.r1; x <= i.r2 && !ue; x++)
|
|
4365
4393
|
for (let L = i.c1; L <= i.c2 && !ue; L++) {
|
|
4366
|
-
const Q = n[
|
|
4394
|
+
const Q = n[x]?.cells[L];
|
|
4367
4395
|
Q && !Q.merged && ((Q.rowspan ?? 1) > 1 || (Q.colspan ?? 1) > 1) && (ue = !0);
|
|
4368
4396
|
}
|
|
4369
|
-
const ke = (
|
|
4370
|
-
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text:
|
|
4371
|
-
|
|
4372
|
-
]),
|
|
4397
|
+
const ke = (x, L, Q, te = {}, De) => a("div", { class: "pd-field" }, [
|
|
4398
|
+
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: x }), De ?? ""].filter(Boolean)),
|
|
4399
|
+
R({ value: L, ...te, onCommit: (Et) => k(Q, hi(Et)) })
|
|
4400
|
+
]), qt = "恢复默认值(跟随表格默认)", O = (x) => it({
|
|
4373
4401
|
target: s,
|
|
4374
4402
|
base: {},
|
|
4375
|
-
propKey:
|
|
4376
|
-
tipOverride:
|
|
4403
|
+
propKey: x,
|
|
4404
|
+
tipOverride: qt,
|
|
4377
4405
|
force: u,
|
|
4378
4406
|
// 走 writeField 而非 write:多选时要同时清掉批写草稿,否则控件会继续显示重置前的值
|
|
4379
|
-
write: () => k(
|
|
4407
|
+
write: () => k(x, void 0)
|
|
4380
4408
|
}), Tt = e.options.tableDefaultPadding ?? 1, at = {
|
|
4381
4409
|
width: yr(e.options.tableColWidths ?? [], r.c, s, Tt),
|
|
4382
4410
|
height: vr(n, r.r, s, Tt)
|
|
4383
4411
|
};
|
|
4384
4412
|
return ye(o, "table-cell", "单元格", "Menu", [
|
|
4385
4413
|
So([
|
|
4386
|
-
u ?
|
|
4414
|
+
u ? It(`已选 ${p} 格 · 批量设置:不显示单格配置,改动会应用到全部选中格`) : "",
|
|
4387
4415
|
a("div", { class: "pd-field" }, [
|
|
4388
4416
|
a("span", { class: "pd-label", text: "单元格类型" }),
|
|
4389
4417
|
Ke("cell-type", [
|
|
@@ -4391,31 +4419,31 @@ function Oc(o, e) {
|
|
|
4391
4419
|
{ value: "barcode", label: "条形码" },
|
|
4392
4420
|
{ value: "qrcode", label: "二维码" },
|
|
4393
4421
|
{ value: "image", label: "图片" }
|
|
4394
|
-
], To, (
|
|
4395
|
-
const L =
|
|
4396
|
-
|
|
4422
|
+
], To, (x) => {
|
|
4423
|
+
const L = x === "text" ? void 0 : x, Q = { cellType: x };
|
|
4424
|
+
x !== "barcode" && Object.assign(Q, {
|
|
4397
4425
|
barcodeType: void 0,
|
|
4398
4426
|
showBarcodeText: void 0,
|
|
4399
4427
|
printerDpi: void 0,
|
|
4400
4428
|
barQuietZone: void 0,
|
|
4401
4429
|
barHeight: void 0
|
|
4402
|
-
}),
|
|
4403
|
-
te.cellType = L,
|
|
4430
|
+
}), x !== "qrcode" && Object.assign(Q, { qrCodeLevel: void 0, qrQuietZone: void 0 }), S((te) => {
|
|
4431
|
+
te.cellType = L, x !== "barcode" && (te.barcodeType = void 0, te.showBarcodeText = void 0, te.printerDpi = void 0, te.barQuietZone = void 0, te.barHeight = void 0), x !== "qrcode" && (te.qrCodeLevel = void 0, te.qrQuietZone = void 0);
|
|
4404
4432
|
}, Q);
|
|
4405
4433
|
})
|
|
4406
4434
|
]),
|
|
4407
4435
|
pe ? Pt(
|
|
4408
4436
|
"码制",
|
|
4409
4437
|
Eo,
|
|
4410
|
-
Ve(
|
|
4411
|
-
(
|
|
4412
|
-
|
|
4438
|
+
Ve(Pc),
|
|
4439
|
+
(x) => {
|
|
4440
|
+
x !== "__multi__" && k("barcodeType", x || void 0);
|
|
4413
4441
|
}
|
|
4414
4442
|
) : "",
|
|
4415
4443
|
pe ? wt(
|
|
4416
4444
|
"显示文本",
|
|
4417
|
-
u ?
|
|
4418
|
-
(
|
|
4445
|
+
u ? b.values.showBarcodeText === !0 : s.showBarcodeText !== !1,
|
|
4446
|
+
(x) => k("showBarcodeText", x),
|
|
4419
4447
|
void 0,
|
|
4420
4448
|
O("showBarcodeText")
|
|
4421
4449
|
) : "",
|
|
@@ -4426,21 +4454,21 @@ function Oc(o, e) {
|
|
|
4426
4454
|
{ min: 2, max: 8, step: 0.5, placeholder: we("") },
|
|
4427
4455
|
O("barWidth")
|
|
4428
4456
|
) : "",
|
|
4429
|
-
pe ?
|
|
4457
|
+
pe ? It((ko ? "已设置打印机分辨率:条宽会被吸附到最近的整数打印点(DPI 优先于毫米值),单元格放不下时整体等比缩小" : "热敏/针式打印建议 3 及以上:决定条码的落纸尺寸,条越粗出纸后条宽越稳定") + (Ht ? `。${Ht}` : "")) : "",
|
|
4430
4458
|
// 同二维码:走 stepper 而非 numField,0 档(不留白边)是合法值不能被归并成未设置
|
|
4431
|
-
pe ? Ce("静区 (模块)",
|
|
4459
|
+
pe ? Ce("静区 (模块)", R({
|
|
4432
4460
|
value: Se("barQuietZone", s.barQuietZone),
|
|
4433
4461
|
min: 0,
|
|
4434
4462
|
max: 20,
|
|
4435
4463
|
placeholder: we("默认 10"),
|
|
4436
|
-
onCommit: (
|
|
4464
|
+
onCommit: (x) => k("barQuietZone", x)
|
|
4437
4465
|
}), fe("cd-bar-quiet-zone"), O("barQuietZone")) : "",
|
|
4438
|
-
pe ? Ce("条高 (mm)",
|
|
4466
|
+
pe ? Ce("条高 (mm)", R({
|
|
4439
4467
|
value: Se("barHeight", s.barHeight),
|
|
4440
4468
|
min: 1,
|
|
4441
4469
|
max: 100,
|
|
4442
4470
|
placeholder: we("默认 30 模块"),
|
|
4443
|
-
onCommit: (
|
|
4471
|
+
onCommit: (x) => k("barHeight", x ?? void 0)
|
|
4444
4472
|
}), fe("cd-bar-height"), O("barHeight")) : "",
|
|
4445
4473
|
pe ? ke(
|
|
4446
4474
|
"文本字号(相对条高,条高为 30)",
|
|
@@ -4454,40 +4482,40 @@ function Oc(o, e) {
|
|
|
4454
4482
|
{ value: "203", label: "203 dpi(8 点/mm)" },
|
|
4455
4483
|
{ value: "300", label: "300 dpi(11.8 点/mm)" },
|
|
4456
4484
|
{ value: "600", label: "600 dpi(23.6 点/mm)" }
|
|
4457
|
-
]), (
|
|
4458
|
-
if (
|
|
4459
|
-
const L = Number(
|
|
4485
|
+
]), (x) => {
|
|
4486
|
+
if (x === "__multi__") return;
|
|
4487
|
+
const L = Number(x);
|
|
4460
4488
|
k("printerDpi", L > 0 ? L : void 0);
|
|
4461
4489
|
}, { reset: O("printerDpi") }) : "",
|
|
4462
|
-
pe ?
|
|
4490
|
+
pe ? It("填写后条宽吸附到整数打印点(消除出纸「条宽忽宽忽窄」):条码先按条宽渲染,可用宽度够就原样落纸,不够才整体等比缩小") : "",
|
|
4463
4491
|
Ye ? Pt(
|
|
4464
4492
|
"纠错级别",
|
|
4465
|
-
|
|
4466
|
-
Ve(
|
|
4467
|
-
(
|
|
4468
|
-
|
|
4493
|
+
q,
|
|
4494
|
+
Ve(Ic),
|
|
4495
|
+
(x) => {
|
|
4496
|
+
x !== "__multi__" && k("qrCodeLevel", x || void 0);
|
|
4469
4497
|
},
|
|
4470
4498
|
{ reset: O("qrCodeLevel") }
|
|
4471
4499
|
) : "",
|
|
4472
4500
|
// 与元素台同构造直接用 stepper:numField 经 orUndef 会把显式填的 0 归并成未设置(出图虽一致,存的值应与用户填的一致),且它也不带说明图标
|
|
4473
|
-
Ye ? Ce("静区 (模块)",
|
|
4501
|
+
Ye ? Ce("静区 (模块)", R({
|
|
4474
4502
|
value: Se("qrQuietZone", s.qrQuietZone),
|
|
4475
4503
|
min: 0,
|
|
4476
4504
|
max: 8,
|
|
4477
4505
|
placeholder: we("默认 0"),
|
|
4478
|
-
onCommit: (
|
|
4506
|
+
onCommit: (x) => k("qrQuietZone", x)
|
|
4479
4507
|
}), fe("cd-quiet-zone"), O("qrQuietZone")) : "",
|
|
4480
|
-
pe ?
|
|
4508
|
+
pe ? It("单元格条码尺寸由「条宽」与「打印机分辨率」结算:可用宽度足够时按条宽原样落纸,不足时整体等比缩小;拉伸会把条宽变成非整数,故条形码不提供缩放模式,可用「最大宽高」限制上限。要放大条码:先加条宽倍率,再收窄静区(左右白边会换成条宽),必要时关掉显示文本以让出文本区高度") : "",
|
|
4481
4509
|
Ye || nt ? Pt(
|
|
4482
4510
|
"缩放模式",
|
|
4483
4511
|
kt,
|
|
4484
4512
|
Ve(ai),
|
|
4485
|
-
(
|
|
4486
|
-
|
|
4513
|
+
(x) => {
|
|
4514
|
+
x !== "__multi__" && k("fit", x);
|
|
4487
4515
|
},
|
|
4488
4516
|
{ reset: O("fit") }
|
|
4489
4517
|
) : "",
|
|
4490
|
-
nt && !u && s.fit === "cover" ?
|
|
4518
|
+
nt && !u && s.fit === "cover" ? na(o, {
|
|
4491
4519
|
fieldKey: "ap-img-object-position",
|
|
4492
4520
|
label: "裁剪锚点",
|
|
4493
4521
|
src: _r(s.formatter),
|
|
@@ -4497,8 +4525,8 @@ function Oc(o, e) {
|
|
|
4497
4525
|
heightMm: at.height,
|
|
4498
4526
|
scale: s.fitScale,
|
|
4499
4527
|
value: s.objectPosition,
|
|
4500
|
-
onCommit: (
|
|
4501
|
-
onScaleCommit: (
|
|
4528
|
+
onCommit: (x) => k("objectPosition", x),
|
|
4529
|
+
onScaleCommit: (x) => k("fitScale", x),
|
|
4502
4530
|
resetAnchor: O("objectPosition"),
|
|
4503
4531
|
resetScale: O("fitScale")
|
|
4504
4532
|
}) : "",
|
|
@@ -4523,7 +4551,7 @@ function Oc(o, e) {
|
|
|
4523
4551
|
type: "text",
|
|
4524
4552
|
value: u ? C("formatter") ?? "" : s.formatter || "",
|
|
4525
4553
|
placeholder: u ? "多选(输入后覆盖全部选中格)" : "输入内容,支持 {字段} 表达式",
|
|
4526
|
-
onChange: (
|
|
4554
|
+
onChange: (x) => k("formatter", x.target.value || void 0),
|
|
4527
4555
|
// 表达式编辑器入口在壳层(对照 canvas 的 onDblClickCell → table-cell-dblclick)
|
|
4528
4556
|
onDblclick: () => o.fire("table-cell-dblclick", { elementId: e.id, r: r.r, c: r.c, cellId: s.id })
|
|
4529
4557
|
})
|
|
@@ -4538,8 +4566,8 @@ function Oc(o, e) {
|
|
|
4538
4566
|
{ value: "right", label: "右" },
|
|
4539
4567
|
{ value: "justify", label: "两端" }
|
|
4540
4568
|
],
|
|
4541
|
-
u ?
|
|
4542
|
-
(
|
|
4569
|
+
u ? b.values.align ?? "" : s.align || "left",
|
|
4570
|
+
(x) => k("align", x)
|
|
4543
4571
|
)
|
|
4544
4572
|
]),
|
|
4545
4573
|
a("div", { class: "pd-field" }, [
|
|
@@ -4551,8 +4579,8 @@ function Oc(o, e) {
|
|
|
4551
4579
|
{ value: "middle", label: "中" },
|
|
4552
4580
|
{ value: "bottom", label: "下" }
|
|
4553
4581
|
],
|
|
4554
|
-
u ?
|
|
4555
|
-
(
|
|
4582
|
+
u ? b.values.valign ?? "" : s.valign || "top",
|
|
4583
|
+
(x) => k("valign", x)
|
|
4556
4584
|
)
|
|
4557
4585
|
]),
|
|
4558
4586
|
a("div", { class: "cell-style-grid" }, [
|
|
@@ -4564,7 +4592,7 @@ function Oc(o, e) {
|
|
|
4564
4592
|
fonts: o.host.fonts,
|
|
4565
4593
|
value: u ? C("fontFamily") : s.fontFamily,
|
|
4566
4594
|
placeholder: we("继承默认"),
|
|
4567
|
-
onChange: (
|
|
4595
|
+
onChange: (x) => k("fontFamily", x)
|
|
4568
4596
|
})
|
|
4569
4597
|
]),
|
|
4570
4598
|
ke(
|
|
@@ -4579,76 +4607,76 @@ function Oc(o, e) {
|
|
|
4579
4607
|
a("input", {
|
|
4580
4608
|
class: "pd-switch",
|
|
4581
4609
|
type: "checkbox",
|
|
4582
|
-
checked: u ?
|
|
4583
|
-
onChange: (
|
|
4610
|
+
checked: u ? b.values.fontWeight === "bold" : s.fontWeight === "bold",
|
|
4611
|
+
onChange: (x) => k(
|
|
4584
4612
|
"fontWeight",
|
|
4585
|
-
|
|
4613
|
+
x.target.checked ? "bold" : void 0
|
|
4586
4614
|
)
|
|
4587
4615
|
})
|
|
4588
4616
|
]),
|
|
4589
4617
|
a("div", { class: "pd-field" }, [
|
|
4590
4618
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: "文字颜色" }), O("color")]),
|
|
4591
|
-
Ae(u ? C("color") : s.color, (
|
|
4619
|
+
Ae(u ? C("color") : s.color, (x) => k("color", x), "文字颜色")
|
|
4592
4620
|
]),
|
|
4593
4621
|
a("div", { class: "pd-field" }, [
|
|
4594
4622
|
a("span", { class: "pd-label" }, [a("span", { class: "pd-label-t", text: "背景色" }), O("backgroundColor")]),
|
|
4595
|
-
Ae(u ? C("backgroundColor") : s.backgroundColor, (
|
|
4623
|
+
Ae(u ? C("backgroundColor") : s.backgroundColor, (x) => k("backgroundColor", x), "背景颜色")
|
|
4596
4624
|
])
|
|
4597
4625
|
]),
|
|
4598
|
-
|
|
4626
|
+
Ie("边框"),
|
|
4599
4627
|
a("div", { class: "border-style-row" }, [
|
|
4600
4628
|
// 裸下拉必须显式赋值当前值(只靠 <option selected> 在内核不一致时会回落到第二项)
|
|
4601
|
-
|
|
4629
|
+
ea(
|
|
4602
4630
|
v,
|
|
4603
4631
|
[
|
|
4604
|
-
...U ? [{ value:
|
|
4632
|
+
...U ? [{ value: I, label: "混合", disabled: !0 }] : [],
|
|
4605
4633
|
...ri
|
|
4606
4634
|
],
|
|
4607
|
-
(
|
|
4608
|
-
|
|
4635
|
+
(x) => {
|
|
4636
|
+
x !== I && Fe(x);
|
|
4609
4637
|
},
|
|
4610
4638
|
{ width: "90px" }
|
|
4611
4639
|
),
|
|
4612
|
-
a("div", { style: { width: "112px", flexShrink: "0" } }, [
|
|
4640
|
+
a("div", { style: { width: "112px", flexShrink: "0" } }, [R({
|
|
4613
4641
|
value: B,
|
|
4614
4642
|
min: 0.25,
|
|
4615
4643
|
max: 5,
|
|
4616
4644
|
step: 0.25,
|
|
4617
4645
|
placeholder: u ? "多选" : Y ? "混合" : void 0,
|
|
4618
|
-
onCommit: (
|
|
4646
|
+
onCommit: (x) => g("width", x)
|
|
4619
4647
|
})]),
|
|
4620
|
-
Ae(re, (
|
|
4648
|
+
Ae(re, (x) => g("color", x), "边框颜色")
|
|
4621
4649
|
]),
|
|
4622
4650
|
a("div", { class: "pd-button-group border-presets" }, [
|
|
4623
4651
|
["all", "全部"],
|
|
4624
4652
|
["outer", "外侧"],
|
|
4625
4653
|
["inner", "内部"],
|
|
4626
4654
|
["none", "无"]
|
|
4627
|
-
].map(([
|
|
4655
|
+
].map(([x, L]) => a("button", {
|
|
4628
4656
|
type: "button",
|
|
4629
4657
|
class: "pd-button small",
|
|
4630
4658
|
text: L,
|
|
4631
4659
|
// 线型=无 ⇒ 预设就是清边框(不写一条隐形的 none 边)
|
|
4632
4660
|
onClick: () => {
|
|
4633
|
-
sr(n, i, j.style === "none" ? "none" :
|
|
4661
|
+
sr(n, i, j.style === "none" ? "none" : x, F()), t.updateElement(e.id, { tableRows: n });
|
|
4634
4662
|
}
|
|
4635
4663
|
}))),
|
|
4636
|
-
a("div", { class: "pd-checkbox-group" }, Kn.map((
|
|
4664
|
+
a("div", { class: "pd-checkbox-group" }, Kn.map((x) => a("label", { class: "pd-checkbox" }, [
|
|
4637
4665
|
a("input", {
|
|
4638
4666
|
type: "checkbox",
|
|
4639
|
-
value:
|
|
4640
|
-
checked: ee[
|
|
4641
|
-
indeterminate: ee[
|
|
4667
|
+
value: x.value,
|
|
4668
|
+
checked: ee[x.value] === "on",
|
|
4669
|
+
indeterminate: ee[x.value] === "mixed",
|
|
4642
4670
|
onChange: (L) => {
|
|
4643
4671
|
const te = L.target.checked && j.style !== "none";
|
|
4644
|
-
u && w({ edges: { ...
|
|
4645
|
-
lr(De,
|
|
4672
|
+
u && w({ edges: { ...b.edges, [x.value]: te } }), S((De) => {
|
|
4673
|
+
lr(De, x.value, te ? F() : null);
|
|
4646
4674
|
});
|
|
4647
4675
|
}
|
|
4648
4676
|
}),
|
|
4649
|
-
a("span", { text:
|
|
4677
|
+
a("span", { text: x.label })
|
|
4650
4678
|
]))),
|
|
4651
|
-
|
|
4679
|
+
It(u ? ps : Z ? us : hs),
|
|
4652
4680
|
ke(
|
|
4653
4681
|
"内边距 (mm)",
|
|
4654
4682
|
Se("padding", Je(s.padding)),
|
|
@@ -4658,17 +4686,17 @@ function Oc(o, e) {
|
|
|
4658
4686
|
),
|
|
4659
4687
|
wt(
|
|
4660
4688
|
"自动换行",
|
|
4661
|
-
u ?
|
|
4662
|
-
(
|
|
4689
|
+
u ? b.values.wordWrap === !0 : s.wordWrap ?? !0,
|
|
4690
|
+
(x) => k("wordWrap", x),
|
|
4663
4691
|
void 0,
|
|
4664
4692
|
O("wordWrap")
|
|
4665
4693
|
),
|
|
4666
4694
|
W ? Pt(
|
|
4667
4695
|
"文字溢出",
|
|
4668
|
-
|
|
4669
|
-
Ve(
|
|
4670
|
-
(
|
|
4671
|
-
|
|
4696
|
+
G,
|
|
4697
|
+
Ve(Fc),
|
|
4698
|
+
(x) => {
|
|
4699
|
+
x !== "__multi__" && k("textFit", x);
|
|
4672
4700
|
},
|
|
4673
4701
|
{ full: !0, reset: O("textFit") }
|
|
4674
4702
|
) : "",
|
|
@@ -4703,16 +4731,16 @@ function Oc(o, e) {
|
|
|
4703
4731
|
])
|
|
4704
4732
|
]);
|
|
4705
4733
|
}
|
|
4706
|
-
const Vo =
|
|
4734
|
+
const Vo = Ns;
|
|
4707
4735
|
function fi(o) {
|
|
4708
4736
|
const e = o.trim();
|
|
4709
4737
|
return e ? /[{}]/.test(e) || /^[A-Za-z_$][\w$]*\s*\(/.test(e) ? !0 : /^[A-Za-z_$][\w$]*(\.[\w$]+)+$/.test(e) : !1;
|
|
4710
4738
|
}
|
|
4711
|
-
function
|
|
4739
|
+
function Bc(o) {
|
|
4712
4740
|
return o ? o.mode === "binding" ? o.binding ?? "" : o.content ?? "" : "";
|
|
4713
4741
|
}
|
|
4714
|
-
function
|
|
4715
|
-
const e = o.store.templateData.watermark, t =
|
|
4742
|
+
function Hc(o) {
|
|
4743
|
+
const e = o.store.templateData.watermark, t = Bc(e), i = e?.mode === "binding" || t !== "" && fi(t), n = (() => {
|
|
4716
4744
|
const p = e?.tileWidth ?? X.tileWidth, u = e?.tileHeight ?? X.tileHeight;
|
|
4717
4745
|
for (const [f, m] of Object.entries(Vo))
|
|
4718
4746
|
if (m.width === p && m.height === u) return f;
|
|
@@ -4746,7 +4774,7 @@ function $c(o) {
|
|
|
4746
4774
|
write: () => r({ [p]: X[p] })
|
|
4747
4775
|
});
|
|
4748
4776
|
return a("div", { class: "watermark-config" }, [
|
|
4749
|
-
|
|
4777
|
+
Ie("水印"),
|
|
4750
4778
|
a("form", { class: "pd-form", onSubmit: (p) => p.preventDefault() }, [
|
|
4751
4779
|
a("div", { class: "pd-field" }, [
|
|
4752
4780
|
a("span", { class: "pd-label", text: "水印表达式" }),
|
|
@@ -4850,7 +4878,7 @@ function $c(o) {
|
|
|
4850
4878
|
]);
|
|
4851
4879
|
}
|
|
4852
4880
|
function de(o, e, t, i, n = {}, r) {
|
|
4853
|
-
return $(e,
|
|
4881
|
+
return $(e, R({ value: t, ...n, onCommit: i }), void 0, r);
|
|
4854
4882
|
}
|
|
4855
4883
|
function Ue(o, e, t, i, n, r, s) {
|
|
4856
4884
|
const l = document.createElement("select");
|
|
@@ -4869,20 +4897,20 @@ function mt(o, e, t, i, n) {
|
|
|
4869
4897
|
onChange: (r) => i(r.target.checked)
|
|
4870
4898
|
}), void 0, n);
|
|
4871
4899
|
}
|
|
4872
|
-
const
|
|
4900
|
+
const Wc = [
|
|
4873
4901
|
{ value: "all", label: "全部" },
|
|
4874
4902
|
{ value: "outer", label: "外侧" },
|
|
4875
4903
|
{ value: "inner", label: "内部" },
|
|
4876
4904
|
{ value: "none", label: "无" }
|
|
4877
|
-
],
|
|
4905
|
+
], Uc = [
|
|
4878
4906
|
{ value: "top", label: "上" },
|
|
4879
4907
|
{ value: "right", label: "右" },
|
|
4880
4908
|
{ value: "bottom", label: "下" },
|
|
4881
4909
|
{ value: "left", label: "左" }
|
|
4882
4910
|
];
|
|
4883
|
-
function
|
|
4911
|
+
function qc(o, e) {
|
|
4884
4912
|
const t = o.store, i = e.options, n = e.printElementType.type, r = (v) => t.updateElement(e.id, v), s = n === "text" || n === "longText", l = n === "barcode" || n === "qrcode", c = n === "table", p = c && t.tableSelection?.elementId === e.id, u = p && bi(e.options.tableRows ?? [], t.tableSelection).mode === "multi", f = [];
|
|
4885
|
-
u || f.push(
|
|
4913
|
+
u || f.push(Mc(o, e)), p || f.push(ye(o, "position-size", "位置与尺寸", "Location", [
|
|
4886
4914
|
a("form", { class: "pd-form", onSubmit: (v) => v.preventDefault() }, [
|
|
4887
4915
|
a("div", { class: "position-grid" }, [
|
|
4888
4916
|
M(o, "ps-left", de(o, "X", i.left, (v) => r({ left: v }), { min: 0 })),
|
|
@@ -4892,8 +4920,8 @@ function Wc(o, e) {
|
|
|
4892
4920
|
])
|
|
4893
4921
|
])
|
|
4894
4922
|
]));
|
|
4895
|
-
const m = zr(n),
|
|
4896
|
-
const re =
|
|
4923
|
+
const m = zr(n), b = (v, B) => {
|
|
4924
|
+
const re = ys(B);
|
|
4897
4925
|
return it({
|
|
4898
4926
|
target: i,
|
|
4899
4927
|
base: m,
|
|
@@ -4902,7 +4930,7 @@ function Wc(o, e) {
|
|
|
4902
4930
|
tipUnit: re?.unit,
|
|
4903
4931
|
write: () => r({ [v]: m[v] })
|
|
4904
4932
|
});
|
|
4905
|
-
}, w = typeof i.rotate == "number" && Number.isFinite(i.rotate) && i.rotate !== 0 ? sn(i.rotate) : void 0, g = (v) => r({ rotate: v === void 0 || v === 0 ? void 0 : sn(v) }), S =
|
|
4933
|
+
}, w = typeof i.rotate == "number" && Number.isFinite(i.rotate) && i.rotate !== 0 ? sn(i.rotate) : void 0, g = (v) => r({ rotate: v === void 0 || v === 0 ? void 0 : sn(v) }), S = fs(n, i), k = ms(n) || gs(t.elements).has(e.id), C = k ? "" : M(o, "ap-rotate", Ce(
|
|
4906
4934
|
"旋转 (°)",
|
|
4907
4935
|
a("div", { class: "pd-rotate-row" }, [
|
|
4908
4936
|
a("button", {
|
|
@@ -4913,7 +4941,7 @@ function Wc(o, e) {
|
|
|
4913
4941
|
text: "↺",
|
|
4914
4942
|
onClick: () => g((w ?? 0) - 90)
|
|
4915
4943
|
}),
|
|
4916
|
-
a("div", { class: "pd-rotate-stepper" }, [
|
|
4944
|
+
a("div", { class: "pd-rotate-stepper" }, [R({
|
|
4917
4945
|
value: w,
|
|
4918
4946
|
min: 0,
|
|
4919
4947
|
max: 359,
|
|
@@ -4931,8 +4959,8 @@ function Wc(o, e) {
|
|
|
4931
4959
|
})
|
|
4932
4960
|
]),
|
|
4933
4961
|
fe("ap-rotate"),
|
|
4934
|
-
|
|
4935
|
-
)), P = k || S ? "" : a("p", { class: "pd-hint pd-rotate-note", text:
|
|
4962
|
+
b("rotate", "ap-rotate")
|
|
4963
|
+
)), P = k || S ? "" : a("p", { class: "pd-hint pd-rotate-note", text: ws });
|
|
4936
4964
|
if (f.push(ye(o, "appearance", "外观", "Brush", [
|
|
4937
4965
|
a("form", { class: "pd-form", onSubmit: (v) => v.preventDefault() }, s ? [
|
|
4938
4966
|
M(o, "ap-font-family", $("字体", wo({
|
|
@@ -4942,47 +4970,47 @@ function Wc(o, e) {
|
|
|
4942
4970
|
value: typeof i.fontFamily == "string" ? i.fontFamily : void 0,
|
|
4943
4971
|
placeholder: "默认",
|
|
4944
4972
|
onChange: (v) => r({ fontFamily: v })
|
|
4945
|
-
}), void 0,
|
|
4946
|
-
M(o, "ap-font-size", de(o, "字体大小", i.fontSize, (v) => r({ fontSize: v }), { min: 8, max: 72 },
|
|
4973
|
+
}), void 0, b("fontFamily", "ap-font-family"))),
|
|
4974
|
+
M(o, "ap-font-size", de(o, "字体大小", i.fontSize, (v) => r({ fontSize: v }), { min: 8, max: 72 }, b("fontSize", "ap-font-size"))),
|
|
4947
4975
|
M(o, "ap-font-weight", Ue(o, "字体粗细", String(i.fontWeight ?? ""), [
|
|
4948
4976
|
{ value: "normal", label: "正常" },
|
|
4949
4977
|
{ value: "bold", label: "粗体" },
|
|
4950
4978
|
{ value: "bolder", label: "更粗" },
|
|
4951
4979
|
{ value: "lighter", label: "细体" }
|
|
4952
|
-
], (v) => r({ fontWeight: v }), void 0,
|
|
4980
|
+
], (v) => r({ fontWeight: v }), void 0, b("fontWeight", "ap-font-weight"))),
|
|
4953
4981
|
M(o, "ap-align", $("对齐", Ke("ta", [
|
|
4954
4982
|
{ value: "left", label: "左" },
|
|
4955
4983
|
{ value: "center", label: "中" },
|
|
4956
4984
|
{ value: "right", label: "右" },
|
|
4957
4985
|
{ value: "justify", label: "两端" }
|
|
4958
|
-
], i.textAlign || "left", (v) => r({ textAlign: v })), void 0,
|
|
4986
|
+
], i.textAlign || "left", (v) => r({ textAlign: v })), void 0, b("textAlign", "ap-align"))),
|
|
4959
4987
|
M(o, "ap-vertical-align", $("垂直对齐", Ke("va", [
|
|
4960
4988
|
{ value: "top", label: "顶" },
|
|
4961
4989
|
{ value: "middle", label: "中" },
|
|
4962
4990
|
{ value: "bottom", label: "底" }
|
|
4963
|
-
], i.verticalAlign || "top", (v) => r({ verticalAlign: v })), void 0,
|
|
4991
|
+
], i.verticalAlign || "top", (v) => r({ verticalAlign: v })), void 0, b("verticalAlign", "ap-vertical-align"))),
|
|
4964
4992
|
a("div", { class: "color-row" }, [
|
|
4965
|
-
M(o, "ap-color", $("颜色", Ae(i.color, (v) => r({ color: v }), "字体颜色"), void 0,
|
|
4966
|
-
M(o, "ap-bg-color", $("背景色", Ae(i.backgroundColor, (v) => r({ backgroundColor: v }), "背景颜色"), void 0,
|
|
4993
|
+
M(o, "ap-color", $("颜色", Ae(i.color, (v) => r({ color: v }), "字体颜色"), void 0, b("color", "ap-color"))),
|
|
4994
|
+
M(o, "ap-bg-color", $("背景色", Ae(i.backgroundColor, (v) => r({ backgroundColor: v }), "背景颜色"), void 0, b("backgroundColor", "ap-bg-color")))
|
|
4967
4995
|
]),
|
|
4968
|
-
M(o, "ap-line-height", de(o, "行高", i.lineHeight, (v) => r({ lineHeight: v || void 0 }), { min: 0, max: 100 },
|
|
4969
|
-
M(o, "ap-letter-spacing", de(o, "字间距", i.letterSpacing, (v) => r({ letterSpacing: v || void 0 }), { min: 0, max: 20, step: 0.5 },
|
|
4996
|
+
M(o, "ap-line-height", de(o, "行高", i.lineHeight, (v) => r({ lineHeight: v || void 0 }), { min: 0, max: 100 }, b("lineHeight", "ap-line-height"))),
|
|
4997
|
+
M(o, "ap-letter-spacing", de(o, "字间距", i.letterSpacing, (v) => r({ letterSpacing: v || void 0 }), { min: 0, max: 20, step: 0.5 }, b("letterSpacing", "ap-letter-spacing"))),
|
|
4970
4998
|
M(o, "ap-text-fit", Ue(o, "文字溢出", yi(n, i), [
|
|
4971
4999
|
{ value: "clip", label: "截断" },
|
|
4972
5000
|
{ value: "shrink", label: "自动缩小" },
|
|
4973
5001
|
{ value: "autoHeight", label: "自适应行高" }
|
|
4974
|
-
], (v) => r({ textFit: v }), void 0,
|
|
4975
|
-
i.textFit === "shrink" ? M(o, "ap-shrink-min", $("最小字号 (pt)",
|
|
5002
|
+
], (v) => r({ textFit: v }), void 0, b("textFit", "ap-text-fit"))),
|
|
5003
|
+
i.textFit === "shrink" ? M(o, "ap-shrink-min", $("最小字号 (pt)", R({
|
|
4976
5004
|
value: i.shrinkMinFontSize,
|
|
4977
5005
|
min: 1,
|
|
4978
5006
|
max: 72,
|
|
4979
5007
|
step: 0.5,
|
|
4980
5008
|
placeholder: "默认 6",
|
|
4981
5009
|
onCommit: (v) => r({ shrinkMinFontSize: v || void 0 })
|
|
4982
|
-
}), void 0,
|
|
4983
|
-
n === "longText" ? M(o, "ap-long-text-indent", Ce("首行缩进 (字符)",
|
|
4984
|
-
M(o, "ap-word-wrap", mt(o, "自动换行", i.wordWrap !== !1, (v) => r({ wordWrap: v ? void 0 : !1 }),
|
|
4985
|
-
M(o, "ap-keep-line-breaks", mt(o, "保留换行符", i.keepLineBreaks === !0, (v) => r({ keepLineBreaks: v ? !0 : void 0 }),
|
|
5010
|
+
}), void 0, b("shrinkMinFontSize", "ap-shrink-min"))) : "",
|
|
5011
|
+
n === "longText" ? M(o, "ap-long-text-indent", Ce("首行缩进 (字符)", R({ value: i.longTextIndent, min: 0, max: 10, placeholder: "默认 0", onCommit: (v) => r({ longTextIndent: v || void 0 }) }), fe("ap-long-text-indent"), b("longTextIndent", "ap-long-text-indent"))) : "",
|
|
5012
|
+
M(o, "ap-word-wrap", mt(o, "自动换行", i.wordWrap !== !1, (v) => r({ wordWrap: v ? void 0 : !1 }), b("wordWrap", "ap-word-wrap"))),
|
|
5013
|
+
M(o, "ap-keep-line-breaks", mt(o, "保留换行符", i.keepLineBreaks === !0, (v) => r({ keepLineBreaks: v ? !0 : void 0 }), b("keepLineBreaks", "ap-keep-line-breaks"))),
|
|
4986
5014
|
C,
|
|
4987
5015
|
P
|
|
4988
5016
|
] : [
|
|
@@ -4994,10 +5022,10 @@ function Wc(o, e) {
|
|
|
4994
5022
|
ai,
|
|
4995
5023
|
(v) => r({ fit: v }),
|
|
4996
5024
|
fe("ap-img-fit"),
|
|
4997
|
-
|
|
5025
|
+
b("fit", "ap-img-fit")
|
|
4998
5026
|
)) : "",
|
|
4999
5027
|
// 只有剪裁档有「被裁掉的那条边」可挪,其余档不出这一行(与 canvas AppearanceGroup、两端单元格台同一门禁)
|
|
5000
|
-
n === "image" && i.fit === "cover" ? M(o, "ap-img-object-position",
|
|
5028
|
+
n === "image" && i.fit === "cover" ? M(o, "ap-img-object-position", na(o, {
|
|
5001
5029
|
fieldKey: "ap-img-object-position",
|
|
5002
5030
|
label: "裁剪锚点",
|
|
5003
5031
|
src: _r(i.src),
|
|
@@ -5008,8 +5036,8 @@ function Wc(o, e) {
|
|
|
5008
5036
|
value: i.objectPosition === void 0 ? void 0 : String(i.objectPosition),
|
|
5009
5037
|
onCommit: (v) => r({ objectPosition: v }),
|
|
5010
5038
|
onScaleCommit: (v) => r({ fitScale: v }),
|
|
5011
|
-
resetAnchor:
|
|
5012
|
-
resetScale:
|
|
5039
|
+
resetAnchor: b("objectPosition", "ap-img-object-position"),
|
|
5040
|
+
resetScale: b("fitScale", "ap-img-fit-scale")
|
|
5013
5041
|
})) : "",
|
|
5014
5042
|
C,
|
|
5015
5043
|
P,
|
|
@@ -5017,9 +5045,9 @@ function Wc(o, e) {
|
|
|
5017
5045
|
n === "flowList" ? a("p", { class: "pd-empty", text: "当前元素不支持外观设置" }) : ""
|
|
5018
5046
|
].filter(Boolean))
|
|
5019
5047
|
])), l) {
|
|
5020
|
-
const v = n === "barcode", B = String(i.barcodeType || "CODE128").toUpperCase(), re = i.printerDpi ? String(i.printerDpi) : "",
|
|
5048
|
+
const v = n === "barcode", B = String(i.barcodeType || "CODE128").toUpperCase(), re = i.printerDpi ? String(i.printerDpi) : "", Fe = Mr(i.printerDpi, i.barWidth);
|
|
5021
5049
|
f.push(ye(o, "code", "条码设置", "Postcard", [
|
|
5022
|
-
a("form", { class: "pd-form", onSubmit: (
|
|
5050
|
+
a("form", { class: "pd-form", onSubmit: (F) => F.preventDefault() }, [
|
|
5023
5051
|
v ? [
|
|
5024
5052
|
M(o, "cd-type", Ue(o, "码制", B, [
|
|
5025
5053
|
{ value: "CODE128", label: "CODE128(通用)" },
|
|
@@ -5028,60 +5056,60 @@ function Wc(o, e) {
|
|
|
5028
5056
|
{ value: "UPC", label: "UPC" },
|
|
5029
5057
|
{ value: "CODE39", label: "CODE39" },
|
|
5030
5058
|
{ value: "ITF14", label: "ITF14" }
|
|
5031
|
-
], (
|
|
5059
|
+
], (F) => r({ barcodeType: F === "CODE128" ? void 0 : F }))),
|
|
5032
5060
|
M(o, "cd-dpi", Ue(o, "打印机分辨率", re, [
|
|
5033
5061
|
{ value: "", label: "不指定(按条宽渲染)" },
|
|
5034
5062
|
{ value: "203", label: "203 dpi(8 点/mm)" },
|
|
5035
5063
|
{ value: "300", label: "300 dpi(11.8 点/mm)" },
|
|
5036
5064
|
{ value: "600", label: "600 dpi(23.6 点/mm)" }
|
|
5037
|
-
], (
|
|
5065
|
+
], (F) => r({ printerDpi: Number(F) > 0 ? Number(F) : void 0 }), void 0, b("printerDpi", "cd-dpi"))),
|
|
5038
5066
|
M(o, "cd-dpi", a("p", {
|
|
5039
5067
|
class: "pd-hint",
|
|
5040
5068
|
text: "填写后条宽吸附到整数打印点(消除出纸「条宽忽宽忽窄」):条码先按条宽渲染,可用宽度够就原样落纸,不够才整体等比缩小"
|
|
5041
5069
|
})),
|
|
5042
|
-
M(o, "cd-bar-width", de(o, "条宽(倍率)", i.barWidth ?? 2, (
|
|
5070
|
+
M(o, "cd-bar-width", de(o, "条宽(倍率)", i.barWidth ?? 2, (F) => r({ barWidth: F }), { min: 2, max: 8, step: 0.5 }, b("barWidth", "cd-bar-width"))),
|
|
5043
5071
|
M(o, "cd-bar-width", a("p", {
|
|
5044
5072
|
class: "pd-hint",
|
|
5045
|
-
text: (re ? "已设置打印机分辨率:条宽会被吸附到最近的整数打印点(DPI 优先于毫米值),元素框放不下时整体等比缩小" : "热敏/针式打印建议 3 及以上:决定条码的落纸尺寸,条越粗出纸后条宽越稳定") + (
|
|
5073
|
+
text: (re ? "已设置打印机分辨率:条宽会被吸附到最近的整数打印点(DPI 优先于毫米值),元素框放不下时整体等比缩小" : "热敏/针式打印建议 3 及以上:决定条码的落纸尺寸,条越粗出纸后条宽越稳定") + (Fe ? `。${Fe}` : "")
|
|
5046
5074
|
})),
|
|
5047
|
-
M(o, "cd-bar-quiet-zone", Ce("静区 (模块)",
|
|
5075
|
+
M(o, "cd-bar-quiet-zone", Ce("静区 (模块)", R({
|
|
5048
5076
|
value: i.barQuietZone,
|
|
5049
5077
|
min: 0,
|
|
5050
5078
|
max: 20,
|
|
5051
5079
|
placeholder: "默认 10",
|
|
5052
|
-
onCommit: (
|
|
5053
|
-
}), fe("cd-bar-quiet-zone"),
|
|
5054
|
-
M(o, "cd-bar-height", Ce("条高 (mm)",
|
|
5080
|
+
onCommit: (F) => r({ barQuietZone: F })
|
|
5081
|
+
}), fe("cd-bar-quiet-zone"), b("barQuietZone", "cd-bar-quiet-zone"))),
|
|
5082
|
+
M(o, "cd-bar-height", Ce("条高 (mm)", R({
|
|
5055
5083
|
value: i.barHeight,
|
|
5056
5084
|
min: 1,
|
|
5057
5085
|
max: 100,
|
|
5058
5086
|
placeholder: "默认 30 模块",
|
|
5059
|
-
onCommit: (
|
|
5060
|
-
}), fe("cd-bar-height"),
|
|
5061
|
-
M(o, "cd-show-text", mt(o, "显示文本", i.hideTitle !== !0, (
|
|
5062
|
-
M(o, "cd-font-size", $("文本字号(相对条高,条高为 30)",
|
|
5087
|
+
onCommit: (F) => r({ barHeight: F ?? void 0 })
|
|
5088
|
+
}), fe("cd-bar-height"), b("barHeight", "cd-bar-height"))),
|
|
5089
|
+
M(o, "cd-show-text", mt(o, "显示文本", i.hideTitle !== !0, (F) => r({ hideTitle: F ? void 0 : !0 }), b("hideTitle", "cd-show-text"))),
|
|
5090
|
+
M(o, "cd-font-size", $("文本字号(相对条高,条高为 30)", R({
|
|
5063
5091
|
value: i.fontSize,
|
|
5064
5092
|
min: 5,
|
|
5065
5093
|
max: 24,
|
|
5066
5094
|
placeholder: "默认 10",
|
|
5067
|
-
onCommit: (
|
|
5068
|
-
}), void 0,
|
|
5095
|
+
onCommit: (F) => r({ fontSize: F || void 0 })
|
|
5096
|
+
}), void 0, b("fontSize", "cd-font-size")))
|
|
5069
5097
|
] : [
|
|
5070
5098
|
M(o, "cd-ec-level", Ue(o, "纠错级别", String(i.qrCodeLevel ?? "M"), [
|
|
5071
5099
|
{ value: "L", label: "L(最低,容量大)" },
|
|
5072
5100
|
{ value: "M", label: "M(推荐)" },
|
|
5073
5101
|
{ value: "Q", label: "Q" },
|
|
5074
5102
|
{ value: "H", label: "H(最高)" }
|
|
5075
|
-
], (
|
|
5076
|
-
M(o, "cd-quiet-zone", Ce("静区 (模块)",
|
|
5103
|
+
], (F) => r({ qrCodeLevel: F }), void 0, b("qrCodeLevel", "cd-ec-level"))),
|
|
5104
|
+
M(o, "cd-quiet-zone", Ce("静区 (模块)", R({
|
|
5077
5105
|
value: i.qrQuietZone,
|
|
5078
5106
|
min: 0,
|
|
5079
5107
|
max: 8,
|
|
5080
5108
|
placeholder: "默认 0",
|
|
5081
|
-
onCommit: (
|
|
5082
|
-
}), fe("cd-quiet-zone"),
|
|
5109
|
+
onCommit: (F) => r({ qrQuietZone: F })
|
|
5110
|
+
}), fe("cd-quiet-zone"), b("qrQuietZone", "cd-quiet-zone")))
|
|
5083
5111
|
],
|
|
5084
|
-
|
|
5112
|
+
Ie("自定义设置"),
|
|
5085
5113
|
v ? a("p", {
|
|
5086
5114
|
class: "pd-hint",
|
|
5087
5115
|
text: "条码尺寸由「条宽」与「打印机分辨率」结算:宽度足够时按条宽原样落纸,不足时整体等比缩小;拉伸会把条宽变成非整数,故条形码不提供缩放模式,可用「最大宽高」限制上限。要放大条码:先加条宽倍率,再收窄静区(左右白边会换成条宽),必要时关掉显示文本以让出文本区高度"
|
|
@@ -5091,32 +5119,32 @@ function Wc(o, e) {
|
|
|
5091
5119
|
"缩放模式",
|
|
5092
5120
|
String(i.fit || "contain"),
|
|
5093
5121
|
ai,
|
|
5094
|
-
(
|
|
5122
|
+
(F) => r({ fit: F || void 0 }),
|
|
5095
5123
|
void 0,
|
|
5096
|
-
|
|
5124
|
+
b("fit", "cd-fit")
|
|
5097
5125
|
)),
|
|
5098
|
-
M(o, "cd-max-width", $("最大宽度 (mm)",
|
|
5126
|
+
M(o, "cd-max-width", $("最大宽度 (mm)", R({
|
|
5099
5127
|
value: i.maxWidth,
|
|
5100
5128
|
min: 1,
|
|
5101
5129
|
max: 200,
|
|
5102
5130
|
placeholder: "默认",
|
|
5103
|
-
onCommit: (
|
|
5104
|
-
}), void 0,
|
|
5105
|
-
M(o, "cd-max-height", $("最大高度 (mm)",
|
|
5131
|
+
onCommit: (F) => r({ maxWidth: F || void 0 })
|
|
5132
|
+
}), void 0, b("maxWidth", "cd-max-width"))),
|
|
5133
|
+
M(o, "cd-max-height", $("最大高度 (mm)", R({
|
|
5106
5134
|
value: i.maxHeight,
|
|
5107
5135
|
min: 1,
|
|
5108
5136
|
max: 200,
|
|
5109
5137
|
placeholder: "默认",
|
|
5110
|
-
onCommit: (
|
|
5111
|
-
}), void 0,
|
|
5138
|
+
onCommit: (F) => r({ maxHeight: F || void 0 })
|
|
5139
|
+
}), void 0, b("maxHeight", "cd-max-height")))
|
|
5112
5140
|
].flat().filter(Boolean))
|
|
5113
5141
|
]));
|
|
5114
5142
|
}
|
|
5115
|
-
if (p && (f.push(
|
|
5116
|
-
const v = po(i.flowColumns), B = ii(i.flowRowHeight), re = oi(i.flowGapX),
|
|
5143
|
+
if (p && (f.push(Lc(o, e)), f.push($c(o, e))), c && f.push(Oc(o, e)), n === "flowList") {
|
|
5144
|
+
const v = po(i.flowColumns), B = ii(i.flowRowHeight), re = oi(i.flowGapX), Fe = Oo(i.flowMaxSpan, v), F = bs(i.width ?? 0, re, i.fontSize ?? 12);
|
|
5117
5145
|
f.push(ye(o, "flowList", "流式列表", "Grid3x3", [
|
|
5118
5146
|
a("form", { class: "pd-form", onSubmit: (ee) => ee.preventDefault() }, [
|
|
5119
|
-
M(o, "fl-columns", Ce("每行列数",
|
|
5147
|
+
M(o, "fl-columns", Ce("每行列数", R({
|
|
5120
5148
|
value: v,
|
|
5121
5149
|
min: 1,
|
|
5122
5150
|
max: 12,
|
|
@@ -5125,14 +5153,14 @@ function Wc(o, e) {
|
|
|
5125
5153
|
flowMaxSpan: Oo(i.flowMaxSpan, po(ee))
|
|
5126
5154
|
})
|
|
5127
5155
|
}), fe("fl-columns"))),
|
|
5128
|
-
M(o, "fl-row-height", Ce("行高 (mm)",
|
|
5156
|
+
M(o, "fl-row-height", Ce("行高 (mm)", R({
|
|
5129
5157
|
value: B,
|
|
5130
5158
|
min: 3,
|
|
5131
5159
|
max: 100,
|
|
5132
5160
|
step: 0.5,
|
|
5133
5161
|
onCommit: (ee) => r({ flowRowHeight: ii(ee) })
|
|
5134
5162
|
}), fe("fl-row-height"))),
|
|
5135
|
-
M(o, "fl-gap-x", Ce("单元横向间距 (mm)",
|
|
5163
|
+
M(o, "fl-gap-x", Ce("单元横向间距 (mm)", R({
|
|
5136
5164
|
value: re,
|
|
5137
5165
|
min: 0,
|
|
5138
5166
|
max: 50,
|
|
@@ -5141,17 +5169,17 @@ function Wc(o, e) {
|
|
|
5141
5169
|
}), fe("fl-gap-x"))),
|
|
5142
5170
|
// 关开关不动 flowMaxSpan:与 canvas onAutoSpanChange 同口径,只开时补钳一次
|
|
5143
5171
|
M(o, "fl-auto-span", mt(o, "内容过长时跨列", i.flowAutoSpan === !0, (ee) => {
|
|
5144
|
-
r(ee ? { flowAutoSpan: ee, flowMaxSpan:
|
|
5172
|
+
r(ee ? { flowAutoSpan: ee, flowMaxSpan: Fe } : { flowAutoSpan: ee });
|
|
5145
5173
|
})),
|
|
5146
|
-
i.flowAutoSpan === !0 ? M(o, "fl-max-span", Ce("最多跨几列",
|
|
5147
|
-
value:
|
|
5174
|
+
i.flowAutoSpan === !0 ? M(o, "fl-max-span", Ce("最多跨几列", R({
|
|
5175
|
+
value: Fe,
|
|
5148
5176
|
min: 1,
|
|
5149
5177
|
max: v,
|
|
5150
5178
|
onCommit: (ee) => r({ flowMaxSpan: Oo(ee, v) })
|
|
5151
5179
|
}), fe("fl-max-span"))) : "",
|
|
5152
|
-
v >
|
|
5180
|
+
v > F ? a("p", {
|
|
5153
5181
|
class: "pd-hint",
|
|
5154
|
-
text: `按当前字号与框宽,${v} 列偏挤(可放约 ${
|
|
5182
|
+
text: `按当前字号与框宽,${v} 列偏挤(可放约 ${F} 列)。数值保持不变,出纸按 ${v} 列排。`
|
|
5155
5183
|
}) : ""
|
|
5156
5184
|
// 单元模板与列表源不在本分组:模板写在「内容」分组的一条完整表达式里({drugs.name} {drugs.spec}),
|
|
5157
5185
|
// 列表源由表达式里出现的数组字段检出(core detectFlowListKey),与出纸同一口径
|
|
@@ -5165,14 +5193,14 @@ function Wc(o, e) {
|
|
|
5165
5193
|
borders: i.borders
|
|
5166
5194
|
}), H = (v) => {
|
|
5167
5195
|
const B = z();
|
|
5168
|
-
ar(B, v,
|
|
5196
|
+
ar(B, v, ks(B)), r(B);
|
|
5169
5197
|
}, se = (v) => {
|
|
5170
5198
|
const B = z();
|
|
5171
5199
|
ei(B, v, !ln(B, v)), r(B);
|
|
5172
|
-
}, j =
|
|
5200
|
+
}, j = xs(i), I = j.style === "mixed", D = typeof j.width == "number" ? j.width : void 0, U = I || j.style === void 0 ? "" : j.style, Y = typeof j.color == "string" ? j.color : void 0, ce = (v, B) => {
|
|
5173
5201
|
const re = z();
|
|
5174
|
-
|
|
5175
|
-
}, Z =
|
|
5202
|
+
Ss(re, v, B), r(re);
|
|
5203
|
+
}, Z = I ? [{ value: "", label: "混合" }, ...ri] : [...ri];
|
|
5176
5204
|
return f.push(ye(o, "border-bg", "边框与背景", "Picture", [
|
|
5177
5205
|
a("form", { class: "pd-form", onSubmit: (v) => v.preventDefault() }, [
|
|
5178
5206
|
M(o, "bb-border-style", Ue(
|
|
@@ -5189,20 +5217,20 @@ function Wc(o, e) {
|
|
|
5189
5217
|
D,
|
|
5190
5218
|
(v) => ce("borderWidth", v),
|
|
5191
5219
|
{ min: 0, max: 20, step: 0.25, placeholder: j.width === "mixed" ? "混合" : void 0 },
|
|
5192
|
-
|
|
5220
|
+
b("borderWidth", "bb-border-width")
|
|
5193
5221
|
)),
|
|
5194
|
-
M(o, "bb-border-color", $("边框颜色", Ae(Y, (v) => ce("borderColor", v), "边框颜色"), void 0,
|
|
5222
|
+
M(o, "bb-border-color", $("边框颜色", Ae(Y, (v) => ce("borderColor", v), "边框颜色"), void 0, b("borderColor", "bb-border-color")))
|
|
5195
5223
|
]),
|
|
5196
5224
|
// rect/oval/hline/vline/table 用 border 画自身本体,写分边不出效果(与出纸 resolveElementBorder 同一排除表)
|
|
5197
5225
|
...ti(n) ? [
|
|
5198
|
-
a("div", { class: "pd-button-group border-presets" },
|
|
5226
|
+
a("div", { class: "pd-button-group border-presets" }, Wc.map((v) => a("button", {
|
|
5199
5227
|
type: "button",
|
|
5200
5228
|
class: "pd-button small",
|
|
5201
5229
|
text: v.label,
|
|
5202
5230
|
disabled: v.value === "inner",
|
|
5203
5231
|
onClick: () => H(v.value)
|
|
5204
5232
|
}))),
|
|
5205
|
-
a("div", { class: "pd-checkbox-group" },
|
|
5233
|
+
a("div", { class: "pd-checkbox-group" }, Uc.map((v) => a("label", { class: "pd-checkbox" }, [
|
|
5206
5234
|
a("input", {
|
|
5207
5235
|
type: "checkbox",
|
|
5208
5236
|
checked: ln(i, v.value),
|
|
@@ -5210,17 +5238,17 @@ function Wc(o, e) {
|
|
|
5210
5238
|
}),
|
|
5211
5239
|
a("span", { text: v.label })
|
|
5212
5240
|
]))),
|
|
5213
|
-
a("p", { class: "pd-hint", text:
|
|
5241
|
+
a("p", { class: "pd-hint", text: vs })
|
|
5214
5242
|
] : [],
|
|
5215
|
-
M(o, "bb-bg-color", $("背景色", Ae(i.backgroundColor, (v) => r({ backgroundColor: v }), "背景颜色"), void 0,
|
|
5243
|
+
M(o, "bb-bg-color", $("背景色", Ae(i.backgroundColor, (v) => r({ backgroundColor: v }), "背景颜色"), void 0, b("backgroundColor", "bb-bg-color")))
|
|
5216
5244
|
])
|
|
5217
|
-
])), f.push(
|
|
5245
|
+
])), f.push(Nc(o, e)), f.push(ye(o, "advanced", "高级设置", "Setting", [
|
|
5218
5246
|
a("form", { class: "pd-form", onSubmit: (v) => v.preventDefault() }, [
|
|
5219
5247
|
a("div", { class: "advanced-row" }, [
|
|
5220
|
-
M(o, "ad-locked", mt(o, "锁定", !!i.locked, (v) => r({ locked: v }),
|
|
5221
|
-
M(o, "ad-fixed", mt(o, "每页重复", !!i.fixed, (v) => r({ fixed: v }),
|
|
5248
|
+
M(o, "ad-locked", mt(o, "锁定", !!i.locked, (v) => r({ locked: v }), b("locked", "ad-locked"))),
|
|
5249
|
+
M(o, "ad-fixed", mt(o, "每页重复", !!i.fixed, (v) => r({ fixed: v }), b("fixed", "ad-fixed")))
|
|
5222
5250
|
]),
|
|
5223
|
-
M(o, "ad-z-index", de(o, "层级", i.zIndex, (v) => r({ zIndex: v }), { min: 0, max: 999 },
|
|
5251
|
+
M(o, "ad-z-index", de(o, "层级", i.zIndex, (v) => r({ zIndex: v }), { min: 0, max: 999 }, b("zIndex", "ad-z-index"))),
|
|
5224
5252
|
M(o, "ad-delete", a("div", { class: "pd-field" }, [
|
|
5225
5253
|
a("button", {
|
|
5226
5254
|
type: "button",
|
|
@@ -5232,11 +5260,11 @@ function Wc(o, e) {
|
|
|
5232
5260
|
])
|
|
5233
5261
|
], !1)), a("div", { class: "property-content" }, f);
|
|
5234
5262
|
}
|
|
5235
|
-
function
|
|
5263
|
+
function Gc(o) {
|
|
5236
5264
|
const e = o.store, t = e.templateData, i = (c) => e.updateTemplateData(c), n = (c) => {
|
|
5237
5265
|
const p = t.tiling, u = (f) => f === 90 || f === 270;
|
|
5238
5266
|
if (p?.enabled && u(c) !== u(t.outputRotation)) {
|
|
5239
|
-
const f =
|
|
5267
|
+
const f = Ir({ ...t, outputRotation: c });
|
|
5240
5268
|
i({ outputRotation: c, tiling: { ...p, columns: Math.max(f, 1) } });
|
|
5241
5269
|
return;
|
|
5242
5270
|
}
|
|
@@ -5249,7 +5277,7 @@ function Uc(o) {
|
|
|
5249
5277
|
}
|
|
5250
5278
|
const s = !St[t.paperSize], l = Ar(t.paperSize);
|
|
5251
5279
|
return a("form", { class: "pd-form", onSubmit: (c) => c.preventDefault() }, [
|
|
5252
|
-
|
|
5280
|
+
Ie("纸张设置"),
|
|
5253
5281
|
$("纸张尺寸", a("select", {
|
|
5254
5282
|
class: "pd-select",
|
|
5255
5283
|
style: { width: "100%" },
|
|
@@ -5263,10 +5291,10 @@ function Uc(o) {
|
|
|
5263
5291
|
a("option", { value: "CUSTOM", text: "自定义宽高", selected: s })
|
|
5264
5292
|
])),
|
|
5265
5293
|
l || s ? $(l ? "纸宽 (mm)" : "自定义宽高 (mm)", a("div", { class: "custom-size-grid" }, [
|
|
5266
|
-
|
|
5294
|
+
R({ value: Number(t.customWidth ?? 0), min: 25, max: 2e3, onCommit: (c) => i({ customWidth: c }) }),
|
|
5267
5295
|
...s ? [
|
|
5268
5296
|
a("span", { class: "custom-size-x", text: "×" }),
|
|
5269
|
-
|
|
5297
|
+
R({ value: Number(t.customHeight ?? 0), min: 25, max: 2e3, onCommit: (c) => i({ customHeight: c }) })
|
|
5270
5298
|
] : []
|
|
5271
5299
|
])) : "",
|
|
5272
5300
|
l ? "" : $(
|
|
@@ -5296,22 +5324,22 @@ function Uc(o) {
|
|
|
5296
5324
|
propKey: "pageBackground",
|
|
5297
5325
|
write: () => i({ pageBackground: void 0 })
|
|
5298
5326
|
})),
|
|
5299
|
-
|
|
5300
|
-
e.pages.length > 1 ? "" :
|
|
5301
|
-
|
|
5327
|
+
gc(o),
|
|
5328
|
+
e.pages.length > 1 ? "" : bc(o),
|
|
5329
|
+
Ie("页边距 (mm)"),
|
|
5302
5330
|
a("div", { class: "margin-grid" }, [
|
|
5303
5331
|
de(o, "上", t.margins.top, (c) => i({ margins: { ...t.margins, top: c } }), { min: 0, max: 50 }),
|
|
5304
5332
|
de(o, "下", t.margins.bottom, (c) => i({ margins: { ...t.margins, bottom: c } }), { min: 0, max: 100 }),
|
|
5305
5333
|
de(o, "左", t.margins.left, (c) => i({ margins: { ...t.margins, left: c } }), { min: 0, max: 50 }),
|
|
5306
5334
|
de(o, "右", t.margins.right, (c) => i({ margins: { ...t.margins, right: c } }), { min: 0, max: 50 })
|
|
5307
5335
|
]),
|
|
5308
|
-
|
|
5336
|
+
Ie("页眉/页脚高度 (mm)"),
|
|
5309
5337
|
de(o, "页眉高度", t.header.height ?? 10, (c) => i({ header: { ...t.header, height: c } }), { min: 0, max: 100, step: 0.1 }),
|
|
5310
5338
|
de(o, "页脚高度", t.footer.height ?? 10, (c) => i({ footer: { ...t.footer, height: c } }), { min: 0, max: 100, step: 0.1 }),
|
|
5311
|
-
|
|
5339
|
+
Hc(o)
|
|
5312
5340
|
].filter(Boolean));
|
|
5313
5341
|
}
|
|
5314
|
-
function
|
|
5342
|
+
function Kc(o) {
|
|
5315
5343
|
const e = o.store, t = o.state, i = e.selectedElement;
|
|
5316
5344
|
if (t.propCollapsed)
|
|
5317
5345
|
return a("div", { class: "property-panel collapsed" }, [
|
|
@@ -5374,12 +5402,12 @@ function Gc(o) {
|
|
|
5374
5402
|
class: "pd-tab-pane",
|
|
5375
5403
|
role: "tabpanel",
|
|
5376
5404
|
style: n === "element" ? "" : { display: "none" }
|
|
5377
|
-
}, i ? [
|
|
5405
|
+
}, i ? [kc(o), qc(o, i)] : [a("p", { class: "pd-empty", text: "请在画布中选择一个元素" })]),
|
|
5378
5406
|
a("div", {
|
|
5379
5407
|
class: "pd-tab-pane",
|
|
5380
5408
|
role: "tabpanel",
|
|
5381
5409
|
style: n === "page" ? "" : { display: "none" }
|
|
5382
|
-
}, [
|
|
5410
|
+
}, [Gc(o)])
|
|
5383
5411
|
])
|
|
5384
5412
|
]);
|
|
5385
5413
|
}
|
|
@@ -5391,13 +5419,13 @@ const Xo = [
|
|
|
5391
5419
|
field: "搜索字段...",
|
|
5392
5420
|
variable: "搜索变量...",
|
|
5393
5421
|
function: "搜索函数..."
|
|
5394
|
-
},
|
|
5422
|
+
}, jc = [
|
|
5395
5423
|
{ name: "SUM", label: "求和", template: "SUM()" },
|
|
5396
5424
|
{ name: "AVG", label: "平均值", template: "AVG()" },
|
|
5397
5425
|
{ name: "COUNT", label: "计数", template: "COUNT()" },
|
|
5398
5426
|
{ name: "MIN", label: "最小值", template: "MIN()" },
|
|
5399
5427
|
{ name: "MAX", label: "最大值", template: "MAX()" }
|
|
5400
|
-
],
|
|
5428
|
+
], Yc = [
|
|
5401
5429
|
{ name: "ADD", label: "相加", template: "ADD()" },
|
|
5402
5430
|
{ name: "SUB", label: "相减", template: "SUB()" },
|
|
5403
5431
|
{ name: "MUL", label: "相乘", template: "MUL()" },
|
|
@@ -5406,26 +5434,26 @@ const Xo = [
|
|
|
5406
5434
|
{ name: "ROUNDUP", label: "进一法", template: "ROUNDUP()" },
|
|
5407
5435
|
{ name: "ROUNDDOWN", label: "去尾法", template: "ROUNDDOWN()" },
|
|
5408
5436
|
{ name: "ROUNDBANK", label: "四舍六入五成双", template: "ROUNDBANK()" }
|
|
5409
|
-
],
|
|
5437
|
+
], Vc = [
|
|
5410
5438
|
{ name: "MONEY", label: "金额格式化", template: "MONEY()" },
|
|
5411
5439
|
{ name: "DATE", label: "日期格式化", template: "DATE()" },
|
|
5412
5440
|
{ name: "UPPER", label: "大写金额", template: "UPPER()" },
|
|
5413
5441
|
{ name: "IF", label: "条件判断", template: "IF()" }
|
|
5414
|
-
],
|
|
5442
|
+
], Xc = [
|
|
5415
5443
|
{ name: "pageIndex", label: "当前页码", template: "{pageIndex}" },
|
|
5416
5444
|
{ name: "totalPages", label: "总页数", template: "{totalPages}" },
|
|
5417
5445
|
{ name: "printDate", label: "打印日期", template: "{printDate}" },
|
|
5418
5446
|
{ name: "printTime", label: "打印时间", template: "{printTime}" }
|
|
5419
|
-
],
|
|
5420
|
-
{ title: "聚合函数", items:
|
|
5421
|
-
{ title: "数值运算", items:
|
|
5422
|
-
{ title: "格式化函数", items:
|
|
5423
|
-
],
|
|
5447
|
+
], Zc = [
|
|
5448
|
+
{ title: "聚合函数", items: jc },
|
|
5449
|
+
{ title: "数值运算", items: Yc },
|
|
5450
|
+
{ title: "格式化函数", items: Vc }
|
|
5451
|
+
], Qc = "(输入表达式后预览)", Jc = "(无法计算)", mi = "(表达式错误)";
|
|
5424
5452
|
function Yn(o, e) {
|
|
5425
|
-
if (!o.trim()) return
|
|
5453
|
+
if (!o.trim()) return Qc;
|
|
5426
5454
|
try {
|
|
5427
|
-
const t = { ...
|
|
5428
|
-
return i == null ?
|
|
5455
|
+
const t = { ...Ge, ...e ?? {}, ...$s() }, i = Ot(o, t);
|
|
5456
|
+
return i == null ? Jc : String(i);
|
|
5429
5457
|
} catch {
|
|
5430
5458
|
return mi;
|
|
5431
5459
|
}
|
|
@@ -5434,11 +5462,11 @@ function Vn(o, e) {
|
|
|
5434
5462
|
const t = e.trim().toLowerCase();
|
|
5435
5463
|
return t ? o.filter((i) => i.label.toLowerCase().includes(t) || i.name.toLowerCase().includes(t)) : o;
|
|
5436
5464
|
}
|
|
5437
|
-
function
|
|
5465
|
+
function ep(o, e) {
|
|
5438
5466
|
const t = o.substring(0, e), i = t.lastIndexOf("{"), n = i !== -1 && !t.slice(i + 1).includes("}"), r = t.lastIndexOf("("), s = r !== -1 && !t.slice(r + 1).includes(")");
|
|
5439
5467
|
return { insideBlock: n, insideParens: s };
|
|
5440
5468
|
}
|
|
5441
|
-
function
|
|
5469
|
+
function tp(o, e) {
|
|
5442
5470
|
const t = /^\{\s*([^{}]+?)\s*\}$/.exec(o.trim());
|
|
5443
5471
|
if (!t) return null;
|
|
5444
5472
|
const i = t[1] ?? "";
|
|
@@ -5462,13 +5490,13 @@ function lo(o, e, t) {
|
|
|
5462
5490
|
a("div", { class: "ee-help-card-content" }, i)
|
|
5463
5491
|
]);
|
|
5464
5492
|
}
|
|
5465
|
-
function
|
|
5493
|
+
function op() {
|
|
5466
5494
|
return a("div", { class: "ee-help-section" }, [
|
|
5467
5495
|
a("div", { class: "ee-help-title", text: "帮助信息" }),
|
|
5468
5496
|
a("div", { class: "ee-help-grid" }, [
|
|
5469
5497
|
lo("ee-help-field", "输入方式", [
|
|
5470
5498
|
"双击左侧字段、变量、函数即可插入到表达式输入框中",
|
|
5471
|
-
"
|
|
5499
|
+
"双击途中按住 Ctrl(Mac 为 ⌘)切换为插入字段名称,当静态文本用",
|
|
5472
5500
|
"静态数据直接输入即可,如:供应商名称",
|
|
5473
5501
|
"动态解析字段、变量、函数必须用 {} 包裹",
|
|
5474
5502
|
"示例:{SUM(supplier.name)}",
|
|
@@ -5497,7 +5525,7 @@ function ep() {
|
|
|
5497
5525
|
])
|
|
5498
5526
|
]);
|
|
5499
5527
|
}
|
|
5500
|
-
function
|
|
5528
|
+
function ip(o, e) {
|
|
5501
5529
|
const t = {
|
|
5502
5530
|
activeTab: "field",
|
|
5503
5531
|
searchText: "",
|
|
@@ -5513,7 +5541,7 @@ function tp(o, e) {
|
|
|
5513
5541
|
S.textContent = k, S.classList.toggle("ee-preview-error", k === mi);
|
|
5514
5542
|
}, r = () => {
|
|
5515
5543
|
if (t.activeTab === "variable")
|
|
5516
|
-
return Vn(
|
|
5544
|
+
return Vn(Xc, t.searchText).map((k) => a("div", {
|
|
5517
5545
|
class: "ee-list-item",
|
|
5518
5546
|
onDblclick: (C) => {
|
|
5519
5547
|
const { insideParens: P } = c(C);
|
|
@@ -5521,7 +5549,7 @@ function tp(o, e) {
|
|
|
5521
5549
|
}
|
|
5522
5550
|
}, [Zo(k.label, k.template)]));
|
|
5523
5551
|
if (t.activeTab === "function")
|
|
5524
|
-
return
|
|
5552
|
+
return Zc.map((k) => a("div", { class: "ee-func-group" }, [
|
|
5525
5553
|
a("div", { class: "ee-func-group-title", text: k.title }),
|
|
5526
5554
|
...Vn(k.items, t.searchText).map((C) => a("div", {
|
|
5527
5555
|
class: "ee-list-item",
|
|
@@ -5531,7 +5559,7 @@ function tp(o, e) {
|
|
|
5531
5559
|
}
|
|
5532
5560
|
}, [Zo(C.label, `${C.name}()`)]))
|
|
5533
5561
|
]));
|
|
5534
|
-
const g =
|
|
5562
|
+
const g = Ts(Er(o.fields ?? []), t.searchText);
|
|
5535
5563
|
if (!g.length) return [a("p", { class: "pd-empty", text: "暂无字段" })];
|
|
5536
5564
|
const S = [];
|
|
5537
5565
|
for (const k of g) {
|
|
@@ -5596,7 +5624,7 @@ function tp(o, e) {
|
|
|
5596
5624
|
}
|
|
5597
5625
|
const c = (g) => {
|
|
5598
5626
|
const k = i(Oe(g), ".ee-textarea")?.selectionStart ?? t.expression.length;
|
|
5599
|
-
return
|
|
5627
|
+
return ep(t.expression, k);
|
|
5600
5628
|
}, p = (g, S, k = S.length) => {
|
|
5601
5629
|
const C = i(g, ".ee-textarea");
|
|
5602
5630
|
if (!C) {
|
|
@@ -5613,7 +5641,7 @@ function tp(o, e) {
|
|
|
5613
5641
|
o.onApply({ formatter: g }), o.onClose();
|
|
5614
5642
|
return;
|
|
5615
5643
|
}
|
|
5616
|
-
const S =
|
|
5644
|
+
const S = tp(g, o.fields ?? []);
|
|
5617
5645
|
o.onApply(S ? { formatter: g, binding: S.fieldKey, title: S.fieldLabel } : { formatter: g }), o.onClose();
|
|
5618
5646
|
}, f = a("div", { class: "ee-nav" }, [
|
|
5619
5647
|
a("div", { class: "ee-nav-title", text: "类型" }),
|
|
@@ -5635,13 +5663,13 @@ function tp(o, e) {
|
|
|
5635
5663
|
})
|
|
5636
5664
|
]),
|
|
5637
5665
|
a("div", { class: "ee-content-list" }, r())
|
|
5638
|
-
]),
|
|
5666
|
+
]), b = Yn(t.expression, o.demoData), w = a("div", { class: "ee-editor" }, [
|
|
5639
5667
|
a("div", { class: "ee-editor-section" }, [
|
|
5640
5668
|
a("div", { class: "ee-editor-title", text: "表达式编辑" }),
|
|
5641
5669
|
a("textarea", {
|
|
5642
5670
|
class: "ee-textarea",
|
|
5643
5671
|
rows: 6,
|
|
5644
|
-
placeholder: "
|
|
5672
|
+
placeholder: "双击左侧字段/变量/函数插入,双击途中按住 Ctrl(Mac 为 ⌘)切换为插入字段名,或直接输入静态内容",
|
|
5645
5673
|
text: t.expression,
|
|
5646
5674
|
onInput: (g) => {
|
|
5647
5675
|
t.expression = g.target.value, n(Oe(g));
|
|
@@ -5651,11 +5679,11 @@ function tp(o, e) {
|
|
|
5651
5679
|
a("div", { class: "ee-editor-section" }, [
|
|
5652
5680
|
a("div", { class: "ee-editor-title", text: "预览结果" }),
|
|
5653
5681
|
a("div", {
|
|
5654
|
-
class: `ee-preview${
|
|
5655
|
-
text:
|
|
5682
|
+
class: `ee-preview${b === mi ? " ee-preview-error" : ""}`,
|
|
5683
|
+
text: b
|
|
5656
5684
|
})
|
|
5657
5685
|
]),
|
|
5658
|
-
|
|
5686
|
+
op()
|
|
5659
5687
|
]);
|
|
5660
5688
|
return a("div", {
|
|
5661
5689
|
class: "pd-dialog-overlay",
|
|
@@ -5681,7 +5709,7 @@ function tp(o, e) {
|
|
|
5681
5709
|
])
|
|
5682
5710
|
]);
|
|
5683
5711
|
}
|
|
5684
|
-
const
|
|
5712
|
+
const np = {
|
|
5685
5713
|
id: "getting-started",
|
|
5686
5714
|
title: "快速入门",
|
|
5687
5715
|
content: `
|
|
@@ -5725,7 +5753,7 @@ const op = {
|
|
|
5725
5753
|
<p><strong>仓库地址:</strong><a href="https://gitee.com/liulong_oschina/worm-vue3-print" target="_blank" rel="noopener noreferrer">https://gitee.com/liulong_oschina/worm-vue3-print</a></p>
|
|
5726
5754
|
<p>基于 Vue 3 的可视化打印模板设计器,支持拖拽式模板编辑、表达式数据绑定和浏览器端打印预览。</p>
|
|
5727
5755
|
`
|
|
5728
|
-
},
|
|
5756
|
+
}, rp = {
|
|
5729
5757
|
id: "features",
|
|
5730
5758
|
title: "功能说明",
|
|
5731
5759
|
content: `
|
|
@@ -5900,7 +5928,7 @@ const op = {
|
|
|
5900
5928
|
<li>水印在画布、浏览器预览、服务端 PDF、静默打印四端渲染一致</li>
|
|
5901
5929
|
</ul>
|
|
5902
5930
|
`
|
|
5903
|
-
},
|
|
5931
|
+
}, ap = {
|
|
5904
5932
|
id: "shortcuts",
|
|
5905
5933
|
title: "快捷键",
|
|
5906
5934
|
content: `
|
|
@@ -5974,7 +6002,7 @@ const op = {
|
|
|
5974
6002
|
<p><strong>注意</strong>:当焦点在输入框、文本框、下拉框内时,快捷键不生效。</p>
|
|
5975
6003
|
</blockquote>
|
|
5976
6004
|
`
|
|
5977
|
-
},
|
|
6005
|
+
}, sp = {
|
|
5978
6006
|
id: "faq",
|
|
5979
6007
|
title: "常见问题",
|
|
5980
6008
|
content: `
|
|
@@ -6112,16 +6140,24 @@ const op = {
|
|
|
6112
6140
|
<p><strong>提示</strong>:水印配置保存在模板 JSON 的 <code>watermark</code> 字段中,仅对当前模板生效。</p>
|
|
6113
6141
|
</blockquote>
|
|
6114
6142
|
`
|
|
6115
|
-
},
|
|
6143
|
+
}, lp = {
|
|
6116
6144
|
id: "changelog",
|
|
6117
6145
|
title: "更新记录",
|
|
6118
6146
|
content: `
|
|
6147
|
+
<h2>V1.4.3<small>(2026-11-01)</small></h2>
|
|
6148
|
+
|
|
6149
|
+
<h3>修复</h3>
|
|
6150
|
+
<ul>
|
|
6151
|
+
<li><strong>导入旧模板不再带进「画布看得见、纸上却空白」的 HTML 元素</strong>:HTML 是占位类型,设计台上画得出来、纸上永远是空的。现在导入含这类元素的旧模板时,正文、页眉、页脚里的它们会被一并剥离,不再留下骗人的空位。素材台的「HTML」按钮本版仍保留,用它新建的元素照旧不会上纸,请改用文本或图片。</li>
|
|
6152
|
+
<li><strong>拖动字段时的 Ctrl / ⌘ 切换在 Mac 与 Windows 上都能用了</strong>:此前按住修饰键拖动常常整次被系统判为无效(松手没反应),或复制徽标根本不出现。现在拖动途中任何时候按住 Ctrl(Mac 为 ⌘)就把本次切成「生成静态文本」,画布上跟着光标显示「+ 取值字段 / + 静态文本 / + 元素」的落点提示,看到什么就生成什么;表达式弹窗里双击字段同样支持途中按住切换。提示语也改成与实际一致的「拖动 / 双击途中按住」。</li>
|
|
6153
|
+
</ul>
|
|
6154
|
+
|
|
6119
6155
|
<h2>V1.4.2<small>(2026-10-30)</small></h2>
|
|
6120
6156
|
|
|
6121
6157
|
<h3>新增</h3>
|
|
6122
6158
|
<ul>
|
|
6123
6159
|
<li><strong>素材台单击字段复制中文名</strong>:单击素材台字段行复制字段名并提示「已复制」(拖拽起手不触发);表达式弹窗里每个字段行右侧新增复制图标,点击后短暂变对勾。字段名需要当静态文本复用时不用再手打。</li>
|
|
6124
|
-
<li><strong>字段名当静态文本的两条 Ctrl 入口</strong
|
|
6160
|
+
<li><strong>字段名当静态文本的两条 Ctrl 入口</strong>:表达式弹窗里双击途中按住 Ctrl(Mac 为 ⌘)切换为插入字段中文名,函数参数内自动加引号;素材台拖动途中按住 Ctrl(Mac 为 ⌘)切换为生成内容为字段中文名的文本元素。不按 Ctrl 仍是原来的取值绑定。</li>
|
|
6125
6161
|
</ul>
|
|
6126
6162
|
|
|
6127
6163
|
<h3>变更</h3>
|
|
@@ -6483,26 +6519,26 @@ const op = {
|
|
|
6483
6519
|
</blockquote>
|
|
6484
6520
|
`
|
|
6485
6521
|
}, ho = [
|
|
6486
|
-
op,
|
|
6487
|
-
ip,
|
|
6488
6522
|
np,
|
|
6489
6523
|
rp,
|
|
6490
|
-
ap
|
|
6491
|
-
|
|
6524
|
+
ap,
|
|
6525
|
+
sp,
|
|
6526
|
+
lp
|
|
6527
|
+
], aa = "worm-print-help-tab", dp = "getting-started";
|
|
6492
6528
|
function Xn(o) {
|
|
6493
6529
|
return ho.some((e) => e.id === o) ? String(o) : "";
|
|
6494
6530
|
}
|
|
6495
|
-
function
|
|
6531
|
+
function cp(o) {
|
|
6496
6532
|
let e = null;
|
|
6497
6533
|
try {
|
|
6498
|
-
e = window.localStorage.getItem(
|
|
6534
|
+
e = window.localStorage.getItem(aa);
|
|
6499
6535
|
} catch {
|
|
6500
6536
|
e = null;
|
|
6501
6537
|
}
|
|
6502
|
-
return Xn(e) || Xn(o) ||
|
|
6538
|
+
return Xn(e) || Xn(o) || dp;
|
|
6503
6539
|
}
|
|
6504
|
-
function
|
|
6505
|
-
const e =
|
|
6540
|
+
function pp(o) {
|
|
6541
|
+
const e = cp(o.initialTab), t = (i, n) => {
|
|
6506
6542
|
const r = i.currentTarget, s = r.closest(".help-modal");
|
|
6507
6543
|
if (!s) return;
|
|
6508
6544
|
for (const c of Array.from(s.querySelectorAll(".help-tab")))
|
|
@@ -6510,7 +6546,7 @@ function dp(o) {
|
|
|
6510
6546
|
const l = s.querySelector(".help-content");
|
|
6511
6547
|
l && (l.innerHTML = ho.find((c) => c.id === n)?.content ?? "");
|
|
6512
6548
|
try {
|
|
6513
|
-
window.localStorage.setItem(
|
|
6549
|
+
window.localStorage.setItem(aa, n);
|
|
6514
6550
|
} catch {
|
|
6515
6551
|
}
|
|
6516
6552
|
};
|
|
@@ -6556,15 +6592,15 @@ function dp(o) {
|
|
|
6556
6592
|
])
|
|
6557
6593
|
]);
|
|
6558
6594
|
}
|
|
6559
|
-
function
|
|
6560
|
-
const t = me(
|
|
6595
|
+
function up(o, e) {
|
|
6596
|
+
const t = me(pp(e), o), i = (n) => {
|
|
6561
6597
|
n.key === "Escape" && e.onClose();
|
|
6562
6598
|
};
|
|
6563
6599
|
return document.addEventListener("keydown", i), t.focus?.(), () => {
|
|
6564
6600
|
document.removeEventListener("keydown", i), t.remove();
|
|
6565
6601
|
};
|
|
6566
6602
|
}
|
|
6567
|
-
const
|
|
6603
|
+
const hp = 2, fp = 74, gi = [
|
|
6568
6604
|
{ id: "clipboard", order: 1, label: "剪贴板" },
|
|
6569
6605
|
{ id: "painter", order: 2, label: "格式刷" },
|
|
6570
6606
|
{ id: "zoom", order: 3, label: "缩放" },
|
|
@@ -6575,7 +6611,7 @@ const pp = 2, up = 74, gi = [
|
|
|
6575
6611
|
{ id: "style", order: 8, label: "文字样式" },
|
|
6576
6612
|
{ id: "font", order: 9, label: "字体与字号" }
|
|
6577
6613
|
];
|
|
6578
|
-
function
|
|
6614
|
+
function mp(o) {
|
|
6579
6615
|
const e = !!o.state.openMore, t = gi.slice().sort((i, n) => i.order - n.order).map((i) => a("div", {
|
|
6580
6616
|
class: "tb-more-item",
|
|
6581
6617
|
dataset: { unit: i.id },
|
|
@@ -6611,7 +6647,7 @@ const Zn = /* @__PURE__ */ new WeakMap();
|
|
|
6611
6647
|
function Qn(o) {
|
|
6612
6648
|
const e = o.querySelector(".designer-toolbar");
|
|
6613
6649
|
if (!e) return { movedIds: [], overflowRemains: !1 };
|
|
6614
|
-
const t = getComputedStyle(e), i = Number.parseFloat(t.gap) ||
|
|
6650
|
+
const t = getComputedStyle(e), i = Number.parseFloat(t.gap) || hp, n = Number.parseFloat(t.paddingLeft) || 0, r = Number.parseFloat(t.paddingRight) || 0, s = /* @__PURE__ */ new Map();
|
|
6615
6651
|
for (const g of Array.from(e.querySelectorAll(".tb-ou[data-unit]"))) {
|
|
6616
6652
|
const S = g.parentElement;
|
|
6617
6653
|
S && !S.classList.contains("tb-more-slot") && Zn.set(g, { parent: S, next: g.nextSibling }), s.set(g.dataset.unit, g);
|
|
@@ -6631,10 +6667,10 @@ function Qn(o) {
|
|
|
6631
6667
|
const k = S.offsetWidth;
|
|
6632
6668
|
k > 0 && c.set(g, k);
|
|
6633
6669
|
}
|
|
6634
|
-
const p = gi.map((g) => ({ id: g.id, order: g.order, width: c.get(g.id) ?? 0 })), u = p.reduce((g, S) => g - S.width - i, l), f = e.clientWidth - n - r, { movedIds: m, overflowRemains:
|
|
6670
|
+
const p = gi.map((g) => ({ id: g.id, order: g.order, width: c.get(g.id) ?? 0 })), u = p.reduce((g, S) => g - S.width - i, l), f = e.clientWidth - n - r, { movedIds: m, overflowRemains: b } = Es({
|
|
6635
6671
|
available: f,
|
|
6636
6672
|
pinned: u,
|
|
6637
|
-
moreTriggerWidth:
|
|
6673
|
+
moreTriggerWidth: fp,
|
|
6638
6674
|
gap: i,
|
|
6639
6675
|
units: p
|
|
6640
6676
|
});
|
|
@@ -6645,9 +6681,9 @@ function Qn(o) {
|
|
|
6645
6681
|
P && C.parentElement !== k && k.appendChild(C), S.style.display = P ? "" : "none";
|
|
6646
6682
|
}
|
|
6647
6683
|
const w = e.querySelector(".tb-more-group");
|
|
6648
|
-
return w && (w.style.display = m.length > 0 ? "" : "none"), e.classList.toggle("is-tight",
|
|
6684
|
+
return w && (w.style.display = m.length > 0 ? "" : "none"), e.classList.toggle("is-tight", b), { movedIds: m, overflowRemains: b };
|
|
6649
6685
|
}
|
|
6650
|
-
function
|
|
6686
|
+
function gp(o, e) {
|
|
6651
6687
|
const t = o.store, i = t.selectedIds.size > 0, n = t.selectedIds.size > 1, r = t.selectedElement, s = !i, l = o.isEdit ? "编辑模板" : "新建模板", c = [
|
|
6652
6688
|
a("div", { class: "tb-menu", dataset: { test: "arrange-panel" } }, [
|
|
6653
6689
|
a("div", { class: "tb-menu-label", text: "对齐 / 分布" }),
|
|
@@ -6682,12 +6718,12 @@ function fp(o, e) {
|
|
|
6682
6718
|
u("吸附", t.snapToGrid, "toggle-snap", "开启/关闭元素吸附到网格")
|
|
6683
6719
|
])
|
|
6684
6720
|
];
|
|
6685
|
-
function u(f, m,
|
|
6721
|
+
function u(f, m, b, w) {
|
|
6686
6722
|
return a("button", {
|
|
6687
6723
|
type: "button",
|
|
6688
6724
|
class: `tb-btn tb-menu-row${m ? " on" : ""}`,
|
|
6689
6725
|
dataset: { tip: w },
|
|
6690
|
-
onClick: () => o.fire(
|
|
6726
|
+
onClick: () => o.fire(b)
|
|
6691
6727
|
}, [a("span", { class: "dot" }), f]);
|
|
6692
6728
|
}
|
|
6693
6729
|
return a("div", { class: "designer-toolbar" }, [
|
|
@@ -6735,7 +6771,7 @@ function fp(o, e) {
|
|
|
6735
6771
|
test: "delete"
|
|
6736
6772
|
})
|
|
6737
6773
|
]),
|
|
6738
|
-
|
|
6774
|
+
mp(o),
|
|
6739
6775
|
a("div", { class: "tb-spacer" }),
|
|
6740
6776
|
o.showHelp ? a("div", { class: "tb-group" }, [
|
|
6741
6777
|
a("button", {
|
|
@@ -6770,7 +6806,7 @@ function Qo(o, e, t) {
|
|
|
6770
6806
|
}
|
|
6771
6807
|
return t;
|
|
6772
6808
|
}
|
|
6773
|
-
function
|
|
6809
|
+
function bp(o, e) {
|
|
6774
6810
|
const t = e.orientation === "horizontal", i = e.geom, n = t ? i.viewW : i.viewH;
|
|
6775
6811
|
o.style.width = `${t ? n : No}px`, o.style.height = `${t ? No : n}px`;
|
|
6776
6812
|
const r = o.getContext("2d");
|
|
@@ -6779,7 +6815,7 @@ function mp(o, e) {
|
|
|
6779
6815
|
o.width = (t ? l : c) * s, o.height = (t ? c : l) * s, r.setTransform(s, 0, 0, s, 0, 0);
|
|
6780
6816
|
const p = getComputedStyle(o), u = Qo(p, ["--pd-ruler-bg"], "#F8F9FC"), f = Qo(p, ["--pd-ruler"], "#9AA1AF"), m = Qo(p, ["--pd-ruler-cursor", "--pd-accent"], "#165DFF");
|
|
6781
6817
|
r.fillStyle = u, r.fillRect(0, 0, t ? l : c, t ? c : l);
|
|
6782
|
-
const
|
|
6818
|
+
const b = e.scale > 0 ? e.scale : i.paperScale > 0 ? i.paperScale : 1, w = gt(1) * b;
|
|
6783
6819
|
if (w <= 0) return;
|
|
6784
6820
|
const g = {
|
|
6785
6821
|
ctx: r,
|
|
@@ -6789,7 +6825,7 @@ function mp(o, e) {
|
|
|
6789
6825
|
originPx: t ? i.originX : i.originY,
|
|
6790
6826
|
pxPerMM: w,
|
|
6791
6827
|
paperLengthMM: e.paperLengthMM
|
|
6792
|
-
}, S = -g.originPx / w, k = (l - g.originPx) / w, C =
|
|
6828
|
+
}, S = -g.originPx / w, k = (l - g.originPx) / w, C = Cs(b), P = As(S, k, C);
|
|
6793
6829
|
Jn(g, P, f, !0), Jn(g, P, f, !1), er(g, 0, m), er(g, e.paperLengthMM, m);
|
|
6794
6830
|
const z = e.cursorPx ?? null;
|
|
6795
6831
|
if (z !== null && z >= 0 && z <= l) {
|
|
@@ -6803,7 +6839,7 @@ function mp(o, e) {
|
|
|
6803
6839
|
r.stroke();
|
|
6804
6840
|
}
|
|
6805
6841
|
}
|
|
6806
|
-
function
|
|
6842
|
+
function sa(o, e) {
|
|
6807
6843
|
return Math.round(o.originPx + e * o.pxPerMM) + 0.5;
|
|
6808
6844
|
}
|
|
6809
6845
|
function Jn(o, e, t, i) {
|
|
@@ -6811,16 +6847,16 @@ function Jn(o, e, t, i) {
|
|
|
6811
6847
|
n.strokeStyle = t, n.fillStyle = t, n.globalAlpha = i ? 0.32 : 1, n.lineWidth = 1, n.font = "9px ui-monospace, Menlo, monospace", n.textBaseline = "top";
|
|
6812
6848
|
for (const l of e) {
|
|
6813
6849
|
if ((l.mm < 0 || l.mm > s) !== i) continue;
|
|
6814
|
-
const p =
|
|
6850
|
+
const p = sa(o, l.mm), u = l.major ? 8 : 4;
|
|
6815
6851
|
n.beginPath(), r ? (n.moveTo(p, 0), n.lineTo(p, u)) : (n.moveTo(0, p), n.lineTo(u, p)), n.stroke(), l.major && l.label && (r ? n.fillText(l.label, p + 2, 11) : (n.save(), n.translate(11, p + 2), n.rotate(-Math.PI / 2), n.fillText(l.label, 0, 0), n.restore()));
|
|
6816
6852
|
}
|
|
6817
6853
|
n.globalAlpha = 1;
|
|
6818
6854
|
}
|
|
6819
6855
|
function er(o, e, t) {
|
|
6820
|
-
const { ctx: i, horizontal: n, thickness: r, viewportPx: s } = o, l =
|
|
6856
|
+
const { ctx: i, horizontal: n, thickness: r, viewportPx: s } = o, l = sa(o, e);
|
|
6821
6857
|
l <= 0 || l >= s || (i.strokeStyle = t, i.globalAlpha = 0.55, i.lineWidth = 1, i.beginPath(), n ? (i.moveTo(l, 0), i.lineTo(l, r)) : (i.moveTo(0, l), i.lineTo(r, l)), i.stroke(), i.globalAlpha = 1);
|
|
6822
6858
|
}
|
|
6823
|
-
const gp = ':host{display:block;width:100%;height:100%}:host{--pd-bg: #f3f5f9;--pd-surface: #ffffff;--pd-field-bg: #f4f6fa;--pd-sidebar: #ffffff;--pd-sidebar-hover: #f0f3f9;--pd-canvas-bg: #e6e9f0;--pd-paper: #FFFFFF;--pd-accent: #165DFF;--pd-accent-2: #3D7BFF;--pd-accent-soft: rgba(22, 93, 255, .09);--pd-accent-secondary: #f56c6c;--pd-danger-soft: rgba(245, 108, 108, .1);--pd-ink-green: #67c23a;--pd-text: #2a2e37;--pd-text-muted: #8b909c;--pd-text-faint: #b4b9c4;--pd-border: #d9dde6;--pd-border-soft: #e9ecf2;--pd-input-bg: #ffffff;--pd-hover-tint: #ecf5ff;--pd-danger: #e53e3e;--pd-danger-bg: #fef2f2;--pd-danger-border: #fecaca;--pd-menu-text: #333;--pd-menu-hover: #f5f7fa;--pd-menu-border: #dcdfe6;--pd-menu-divider: #ebeef5;--pd-menu-muted: #909399;--pd-menu-disabled: #c0c4cc;--pd-scrollbar: rgba(23, 32, 60, .18);--pd-scrollbar-thumb: rgba(23, 32, 60, .16);--pd-scrollbar-thumb-hover: rgba(23, 32, 60, .3);--pd-help-field-bg: #f0f9ff;--pd-help-field-line: #bae6fd;--pd-help-field-ink: #0369a1;--pd-help-function-bg: #f0fdf4;--pd-help-function-line: #bbf7d0;--pd-help-function-ink: #166534;--pd-help-variable-bg: #fefce8;--pd-help-variable-line: #fde68a;--pd-help-variable-ink: #854d0e;--pd-help-conditional-bg: #fdf2f8;--pd-help-conditional-line: #fbcfe8;--pd-help-conditional-ink: #9d174d;--pd-handle: #165DFF;--pd-ruler: #9aa1af;--pd-ruler-bg: #f8f9fc;--pd-ruler-cursor: #165DFF;--pd-radius: 6px;--pd-shadow-sm: 0 1px 2px rgba(23, 32, 60, .05);--pd-shadow-md: 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07);--pd-shadow-paper: 0 0 0 1px rgba(23, 32, 60, .05), 0 1px 2px rgba(23, 32, 60, .06), 0 8px 20px rgba(23, 32, 60, .08), 0 26px 60px rgba(23, 32, 60, .15);height:100%;display:flex;flex-direction:column;background:var(--pd-bg)}.pd-form{display:flex;flex-direction:column;gap:10px;font-size:12px;color:var(--pd-text, #303133)}.pd-field{display:flex;flex-direction:column;gap:4px}.pd-label{font-size:11px;color:var(--pd-text-muted, #909399);display:inline-flex;align-items:center;position:relative;justify-content:space-between;gap:6px}.pd-label-t{display:inline-flex;align-items:center;gap:4px;min-width:0}.pd-reset-btn{flex:none;width:15px;height:15px;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--pd-text-faint, #b4b9c4);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.pd-reset-btn.is-dirty{color:var(--pd-text, #2a2e37)}.pd-reset-btn:hover{color:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.pd-help{position:static;display:inline-flex;align-items:center;justify-content:center;flex:none;width:13px;height:13px;margin-left:4px;padding:0;border:1px solid var(--pd-border, #d9dde6);border-radius:50%;background:transparent;color:var(--pd-text-muted, #909399);font-size:9px;line-height:1;cursor:help}.pd-help:before{content:"?";font-weight:600}.pd-help:hover,.pd-help:focus-visible{border-color:var(--pd-accent, #165DFF);color:var(--pd-accent, #165DFF)}.pd-help:after{content:attr(data-tip);position:absolute;top:calc(100% + 6px);left:0;z-index:120;width:196px;padding:5px 7px;border-radius:4px;background:#1e2330e0;color:#fff;font-size:12px;font-weight:400;line-height:1.45;text-align:left;white-space:normal;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease}.pd-help:hover:after,.pd-help:focus:after{opacity:1;visibility:visible}.pd-hover-tip{position:fixed;z-index:9999;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:#2a2e37eb;color:#fff;font-size:12px;line-height:1.4;width:max-content;max-width:calc(100vw - 16px);box-sizing:border-box;overflow-wrap:anywhere;pointer-events:none}.pd-input,.pd-select,textarea.pd-input{width:100%;height:26px;min-height:26px;padding:3px 6px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-input-bg, #fff);color:inherit;font:inherit;box-sizing:border-box;transition:border-color .14s ease,box-shadow .14s ease}.pd-input:hover,.pd-select:hover{border-color:var(--pd-text-faint, #b4b9c4)}textarea.pd-input{height:auto;min-height:48px;resize:vertical}.pd-input:focus,.pd-select:focus{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.pd-select{appearance:auto}.pd-switch{appearance:none;width:32px;height:18px;margin:0;border:1px solid var(--pd-border, #dcdfe6);border-radius:999px;background:#dcdfe6;position:relative;cursor:pointer;transition:background .2s,border-color .2s}.pd-switch:checked{background:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF)}.pd-switch:after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:transform .2s}.pd-switch:checked:after{transform:translate(14px)}.pd-range{width:100%;accent-color:var(--pd-accent, #165DFF)}.pd-radio-group,.pd-checkbox-group{display:flex;flex-wrap:wrap;gap:6px}.pd-radio-group--2col{display:grid;grid-template-columns:1fr 1fr}.pd-radio-group--2col>.pd-radio{width:60%;justify-content:flex-start}.pd-radio,.pd-checkbox{display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:0 7px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-input-bg, #fff);cursor:pointer;transition:border-color .14s ease,background .14s ease,color .14s ease}.pd-radio:has(input:checked),.pd-checkbox:has(input:checked){color:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);background:#165dff0f}.pd-button-group{display:inline-flex;gap:4px}.pd-button,.pd-tab{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:26px;padding:3px 8px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font:inherit;cursor:pointer;transition:background .14s ease,border-color .14s ease,color .14s ease}.pd-button:hover{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-button.primary{background:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);color:#fff}.pd-button.danger{background:#f56c6c;border-color:#f56c6c;color:#fff}.pd-button.small{min-height:22px;padding:1px 6px;font-size:11px}.pd-button:disabled{opacity:.55;cursor:not-allowed}.pd-tabs{display:flex;flex-direction:column;min-height:0}.pd-tab-bar{display:flex;gap:4px;padding:8px 12px 0;border-bottom:1px solid var(--pd-border-soft, #ebeef5)}.pd-tab{border:0;border-bottom:2px solid transparent;border-radius:5px 5px 0 0;background:transparent;transition:color .14s ease,background .14s ease}.pd-tab-bar .pd-tab:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.pd-tab.active{color:var(--pd-accent, #165DFF);border-bottom-color:var(--pd-accent, #165DFF);background:transparent;font-weight:600}.pd-tab-pane{min-height:0;overflow:auto}.pd-divider{margin:6px 0;font-size:11px;color:var(--pd-text-muted, #909399)}.pd-empty{margin:16px 0;color:var(--pd-text-muted, #909399);text-align:center}.pd-dialog-overlay{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:16px;background:#00000073}.pd-dialog{display:flex;flex-direction:column;width:min(950px,90vw);max-height:90vh;overflow:hidden;background:var(--pd-surface, #fff);border-radius:12px;box-shadow:var(--pd-shadow-md, 0 12px 40px rgba(23, 32, 60, .18))}.pd-dialog-large{width:min(950px,90vw)}.pd-dialog-header,.pd-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px}.pd-dialog-header{border-bottom:1px solid var(--pd-border-soft, #ebeef5)}.pd-dialog-footer{justify-content:flex-end;border-top:1px solid var(--pd-border-soft, #ebeef5)}.pd-close{width:22px;height:22px;border:0;background:transparent;color:var(--pd-text-muted, #909399);font-size:16px;cursor:pointer}.pd-icon{display:inline-flex;width:14px;height:14px}.tb-more-panel{min-width:244px}.designer-container{scrollbar-width:thin;scrollbar-color:var(--pd-scrollbar, rgba(23, 32, 60, .18)) transparent}.designer-container ::-webkit-scrollbar{width:9px;height:9px}.designer-container ::-webkit-scrollbar-track{background:transparent}.designer-container ::-webkit-scrollbar-thumb{background:var(--pd-scrollbar-thumb, rgba(23, 32, 60, .16));border-radius:999px;border:2px solid transparent;background-clip:content-box}.designer-container ::-webkit-scrollbar-thumb:hover{background:var(--pd-scrollbar-thumb-hover, rgba(23, 32, 60, .3));border:2px solid transparent;background-clip:content-box}.designer-container ::-webkit-scrollbar-corner{background:transparent}.designer-container button:focus-visible,.designer-container [tabindex]:focus-visible,.designer-container .pd-tab:focus-visible{outline:2px solid var(--pd-accent, #165DFF);outline-offset:1px}@media(prefers-reduced-motion:reduce){.designer-container *,.designer-container *:before,.designer-container *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.help-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;cursor:pointer;transition:background-color .15s}.help-button:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.help-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--pd-accent, #165DFF);color:#fff;font-size:12px;font-weight:600;line-height:1}.tb-dd{position:relative;display:inline-flex}.tb-dd-trigger{height:28px;min-width:28px;padding:0 5px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:3px;font-size:12px;transition:background .14s ease,color .14s ease}.tb-dd-trigger:hover:not(:disabled){color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.tb-dd-trigger:disabled{opacity:.32;cursor:default}.tb-dd-trigger.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.tb-dd-arrow{opacity:.6;transition:transform .14s ease}.tb-dd-arrow.up{transform:rotate(180deg)}.tb-dd-trigger[data-tip]{position:relative}.tb-dd-trigger[data-tip]:after{content:attr(data-tip);position:absolute;top:34px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}.tb-dd-trigger[data-tip]:hover:after{opacity:1}.tb-dd-panel{position:absolute;top:34px;left:0;background:var(--pd-surface, #fff);border:1px solid var(--pd-border, #d9dde6);border-radius:8px;box-shadow:var(--pd-shadow-md, 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07));z-index:200}.tb-dd-panel.is-hidden{display:none}.tb-more-group{flex-shrink:0}.tb-more-menu{display:flex;flex-direction:column;gap:8px;padding:8px;max-height:min(70vh,520px)}.tb-more-item{display:flex;flex-direction:column;gap:4px}.tb-menu-label{font-size:11px;color:var(--pd-text-muted, #8b909c);padding-left:2px}.tb-more-slot{display:flex;align-items:center}.designer-toolbar{display:flex;align-items:center;gap:2px;padding:0 12px;height:50px;background:var(--pd-surface, #ffffff);border-bottom:1px solid var(--pd-border-soft, #e9ecf2);box-shadow:0 1px 2px #17203c0a,0 6px 16px -12px #17203c40;flex-shrink:0;position:relative;z-index:100}.tb-ou{flex-shrink:0}.designer-toolbar>*{flex-shrink:0}.designer-toolbar>.tb-brand{flex-shrink:1;min-width:0}.tb-title,.tb-title-name,.tb-title-sub,.tb-btn-text,.tb-zoom{white-space:nowrap}.designer-toolbar.is-tight .tb-title{min-width:0;overflow:hidden}.designer-toolbar.is-tight .tb-title-name,.designer-toolbar.is-tight .tb-title-sub{overflow:hidden;text-overflow:ellipsis}.tb-group{display:flex;align-items:center;gap:2px;padding:0 8px}.tb-group+.tb-group{border-left:1px solid var(--pd-border-soft, #e9ecf2)}.tb-btn{height:30px;min-width:30px;padding:0 8px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:5px;transition:background .14s ease,color .14s ease,border-color .14s ease,box-shadow .14s ease}.tb-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.tb-btn:active{background:var(--pd-border-soft, #e9ecf2)}.tb-btn:disabled{opacity:.32;cursor:default;background:transparent;color:var(--pd-text-faint, #b4b9c4)}.tb-btn.danger:hover:not(:disabled){color:var(--pd-accent-secondary, #f56c6c);background:var(--pd-danger-soft, rgba(245, 108, 108, .1))}.tb-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));font-weight:600}.tb-btn .dot{width:6px;height:6px;border-radius:50%;background:var(--pd-text-faint, #b4b9c4);display:inline-block;transition:background .14s ease,box-shadow .14s ease}.tb-btn.on .dot{background:var(--pd-accent, #165DFF);box-shadow:0 0 0 3px #165dff1f}.tb-icon{font-size:15px;line-height:1}[data-tip]{position:relative}[data-tip]:after{content:attr(data-tip);position:absolute;bottom:-32px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}[data-tip]:hover:after{opacity:1}.tb-mark{width:28px;height:28px;margin-right:2px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(150deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF));box-shadow:0 3px 8px #165dff47,inset 0 1px #ffffff38;flex-shrink:0}.tb-mark svg{width:16px;height:16px}.tb-title{display:flex;flex-direction:column;line-height:1.2;padding-left:6px}.tb-title-name{font-size:13px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:.2px}.tb-title-sub{font-size:10px;color:var(--pd-text-muted, #8b909c);letter-spacing:.8px}.tb-zoom{font-size:12px;color:var(--pd-text, #2a2e37);font-variant-numeric:tabular-nums;min-width:46px;text-align:center}.tb-spacer{flex:1}.tb-group .tb-dd-trigger{height:30px;min-width:30px;padding:0 8px}.tb-btn-text{font-size:12px}.tb-menu{padding:8px;display:flex;flex-direction:column;gap:4px}.tb-menu-rows{width:148px}.tb-menu-label{padding:2px 4px;font-size:11px;color:var(--pd-text-muted, #8b909c)}.tb-menu-grid{display:grid;grid-template-columns:repeat(4,32px);gap:2px;margin-bottom:4px}.tb-menu-row{justify-content:flex-start;width:100%}.btn-primary,.btn-secondary{height:32px;padding:0 16px;border-radius:7px;font-size:13px;font-weight:600;cursor:pointer;transition:filter .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease}.btn-secondary{background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text-muted, #606266);border:1px solid var(--pd-border, #d9dde6)}.btn-secondary:hover{border-color:var(--pd-accent, #165DFF);color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .06))}.btn-primary{background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF));color:#fff;border:none;box-shadow:0 3px 10px #165dff47,inset 0 1px #ffffff2e}.btn-primary:hover{filter:brightness(1.07);box-shadow:0 5px 14px #165dff57,inset 0 1px #ffffff2e}.btn-primary:active{filter:brightness(.97)}.font-select{position:relative}.font-select-input{display:block;width:100%}.font-select-list{position:absolute;top:calc(100% + 4px);left:0;width:100%;min-width:150px;z-index:200;margin:0;max-height:200px;overflow-y:auto;padding:2px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-surface, #ffffff);box-shadow:var(--pd-shadow-md, 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07));list-style:none}.font-select-list.is-up{top:auto;bottom:calc(100% + 4px)}.font-select-option{padding:4px 6px;border-radius:4px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.font-select-option.is-active{background:var(--pd-sidebar-hover, #f0f3f9)}.font-select-option.is-muted{color:var(--pd-text-muted, #8b909c)}.pd-stepper{display:flex;align-items:center;width:100%}.pd-step-btn{width:26px;height:26px;flex-shrink:0;border:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .14s ease,border-color .14s ease,color .14s ease}.pd-step-btn:hover:not(:disabled){background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-step-btn:disabled{opacity:.45;cursor:not-allowed}.pd-step-minus{border-radius:6px 0 0 6px;border-right:none}.pd-step-plus{border-radius:0 6px 6px 0;border-left:none}.pd-step-input.pd-input{border-radius:0;min-width:0;flex:1;text-align:center;-moz-appearance:textfield}.pd-step-input.pd-input::-webkit-outer-spin-button,.pd-step-input.pd-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.preset-color-trigger{display:flex;align-items:center;width:100%;min-height:26px;padding:1px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-surface, #fff);cursor:pointer;transition:border-color .14s ease,box-shadow .14s ease}.preset-color-trigger:hover,.preset-color-trigger[aria-expanded=true]{border-color:var(--pd-accent, #165DFF)}.preset-color-trigger:focus-visible{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.preset-color-swatch{width:100%;height:22px;border-radius:4px;background-image:linear-gradient(45deg,#e9ecef 25%,transparent 25%,transparent 75%,#e9ecef 75%);background-size:8px 8px;background-position:0 0,4px 4px}.preset-color-panel{position:fixed;z-index:3000;width:190px;padding:10px;border:1px solid var(--pd-border, #d9dde6);border-radius:8px;background:var(--pd-surface, #fff);box-shadow:0 8px 24px #17203c29}.picker-preview{display:flex;align-items:center;gap:8px;margin-bottom:8px}.picker-current{flex:0 0 26px;height:24px;border:1px solid rgb(0 0 0 / 12%);border-radius:5px;background-image:linear-gradient(45deg,#e9ecef 25%,transparent 25%,transparent 75%,#e9ecef 75%);background-size:8px 8px;background-position:0 0,4px 4px}.picker-current.is-empty{position:relative;background-color:#fff}.picker-current.is-empty:after{content:"";position:absolute;inset:3px;background:linear-gradient(to top right,transparent calc(50% - .7px),#f53f3f calc(50% - .7px),#f53f3f calc(50% + .7px),transparent calc(50% + .7px));border-radius:3px}.picker-hex{flex:1;min-width:0;height:24px;padding:0 6px;border:1px solid var(--pd-border, #d9dde6);border-radius:5px;color:var(--pd-text, #303133);font:inherit;font-size:11px;text-transform:uppercase}.picker-hex:focus{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.picker-area{position:relative;height:100px;border:1px solid rgb(0 0 0 / 12%);border-radius:6px;overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--picker-hue) 100% 50%))}.picker-handle{position:absolute;width:12px;height:12px;border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 3px #00000073;pointer-events:none}.picker-hue{width:100%;height:14px;margin:10px 0 0;appearance:none;border:1px solid rgb(0 0 0 / 12%);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);cursor:pointer}.picker-hue::-webkit-slider-thumb{appearance:none;width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 3px #00000073}.picker-hue::-moz-range-thumb{width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 3px #00000073}.picker-heading{display:flex;align-items:center;justify-content:space-between;margin-top:10px;margin-bottom:6px;font-size:11px;color:var(--pd-text-muted, #909399)}.picker-clear{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border:none;border-radius:4px;background:transparent;font-size:11px;line-height:1;color:var(--pd-text-muted, #909399);cursor:pointer}.picker-clear:hover:not(:disabled){background:#0000000f;color:var(--pd-danger, #f53f3f)}.picker-clear:disabled{opacity:.45;cursor:not-allowed}.preset-color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.preset-color-item{width:22px;height:22px;padding:0;border:1px solid rgb(0 0 0 / 12%);border-radius:5px;cursor:pointer}.preset-color-item.active{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--pd-accent, #165DFF)}.format-toolbar{display:flex;align-items:center;gap:2px;flex-shrink:0;min-width:0}.ft-group{display:flex;align-items:center;gap:2px;padding:0 8px;flex-shrink:0}.ft-group+.ft-group{border-left:1px solid var(--pd-border-soft, #e9ecf2)}.ft-btn{height:28px;min-width:28px;padding:0 5px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:4px;transition:background .14s ease,color .14s ease}.ft-btn:hover:not(:disabled){color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.ft-btn:disabled{opacity:.32;cursor:default}.ft-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.ft-btn-text{font-size:12px}.ft-btn[data-tip]{position:relative}.ft-btn[data-tip]:after{content:attr(data-tip);position:absolute;top:34px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}.ft-btn[data-tip]:hover:after{opacity:1}.ft-font{width:150px}.ft-size{width:96px}.ft-font .font-select-input,.ft-size .pd-input,.ft-size .pd-step-btn{font-size:12px}.ft-color-btn{position:relative;width:28px;height:28px;display:inline-flex;margin-left:2px}.ft-color-btn.dim{opacity:.35}.ft-color-btn .preset-color-trigger{width:100%;height:100%;min-height:0;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;align-items:flex-end;justify-content:center}.ft-color-btn .preset-color-trigger:hover,.ft-color-btn .preset-color-trigger[aria-expanded=true]{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-border-soft, #e9ecf2)}.ft-color-btn .preset-color-swatch{width:16px;height:4px;margin-bottom:3px;border-radius:1px;background-image:none;border-bottom:1px solid var(--pd-text-faint, #b4b9c4)}.ft-glyph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding-bottom:7px;font-size:13px;font-weight:700;color:var(--pd-text, #2a2e37);pointer-events:none}.ft-border-panel{width:196px;padding:10px;display:flex;flex-direction:column;gap:8px}.ft-align-panel{padding:6px;display:flex;flex-direction:column;gap:4px}.ft-align-row{display:grid;grid-template-columns:repeat(3,36px);gap:4px}.ft-border-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ft-cell-btn{height:30px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--pd-text, #2a2e37);cursor:pointer}.ft-cell-btn:hover:not(:disabled){background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-border-soft, #e9ecf2)}.ft-cell-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));border-color:#165dff59}.ft-cell-btn:disabled{opacity:.32;cursor:default}.ft-cell-btn .g-faint{fill:none;stroke:var(--pd-text-faint, #b4b9c4);stroke-width:1;stroke-dasharray:2 2}.ft-cell-btn .g-solid{stroke:currentColor;stroke-width:1.6}.ft-cell-btn[data-tip],.ft-style-btn[data-tip]{position:relative}.ft-cell-btn[data-tip]:after,.ft-style-btn[data-tip]:after{content:attr(data-tip);position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;font-weight:400;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:210}.ft-cell-btn[data-tip]:hover:after,.ft-style-btn[data-tip]:hover:after{opacity:1}.ft-style-row{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ft-style-btn{height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--pd-text, #2a2e37);cursor:pointer}.ft-style-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.ft-style-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));border-color:#165dff59}.ft-style-line{width:100%;height:0}.ft-border-style-row{display:flex;align-items:center;gap:6px}.ft-line-width{width:96px}.ft-edge-label{font-size:12px;color:var(--pd-text-muted, #8b909c);white-space:nowrap;flex-shrink:0}.layer-panel{border-top:1px solid var(--pd-border);padding:8px 12px;height:100%;box-sizing:border-box;overflow-y:auto}.panel-title{font-size:11px;color:var(--pd-text-muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}.layer-item{display:flex;align-items:center;gap:6px;padding:4px 6px;margin-bottom:2px;border-radius:4px;cursor:pointer;font-size:12px;transition:background .1s}.layer-item:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.layer-item.active{background:#165dff1a;color:var(--pd-accent, #165DFF);box-shadow:inset 2px 0 0 var(--pd-accent, #165DFF)}.layer-icon{width:18px;text-align:center;font-size:12px;color:var(--pd-text-muted, #909399)}.layer-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pd-text, #303133)}.layer-zone{flex-shrink:0;padding:0 4px;font-size:10px;line-height:14px;color:var(--pd-ink-green, #67c23a);background:#67c23a1a;border-radius:3px}.layer-zindex{font-size:10px;color:var(--pd-text-muted, #909399);font-variant-numeric:tabular-nums}.layer-actions{display:flex;gap:4px;margin-top:8px}.field-tree-panel{padding:0}.panel-title{font-size:11px;color:var(--pd-text-muted);text-transform:uppercase;letter-spacing:.5px;padding:4px 0 8px;margin-bottom:8px;border-bottom:1px solid var(--pd-border)}.search-input{margin-bottom:8px}.tree-container{overflow-y:auto;min-height:0}.field-group-header{display:flex;align-items:center;gap:4px;padding:5px 8px;border-radius:4px;font-size:13px;color:var(--pd-text, #303133);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .1s}.field-group-header:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.field-group-header.is-list{color:var(--pd-accent, #165DFF);font-weight:500}.expand-icon{width:12px;font-size:8px;flex-shrink:0;color:var(--pd-text-muted, #909399)}.field-row{display:flex;align-items:center;gap:4px;padding:5px 8px;border-radius:4px;font-size:13px;color:var(--pd-text, #303133);cursor:grab;-webkit-user-select:none;user-select:none;transition:background .1s}.field-row:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.node-icon{font-size:14px;flex-shrink:0;filter:saturate(.6);opacity:.9}.node-meta{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;column-gap:4px;row-gap:1px}.node-label{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-key{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--pd-text-muted, #909399)}.group-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.copy-hint{flex-shrink:0;margin-left:auto;font-size:11px;color:var(--pd-accent, #165DFF);white-space:nowrap}.left-panel{width:224px;min-width:224px;background:var(--pd-sidebar, #ffffff);border-right:1px solid var(--pd-border-soft, #e9ecf2);display:flex;flex-direction:column;overflow:hidden;transition:width .18s ease}.left-panel.collapsed{width:36px;min-width:36px;border-right:1px solid var(--pd-border-soft, #e9ecf2)}.left-collapsed{display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:12px;flex:1}.lc-btn{width:26px;height:26px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .14s ease}.lc-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.lc-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.left-head{display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 12px;flex-shrink:0;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.left-title{font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:1.2px;display:inline-flex;align-items:center;gap:7px}.left-title:before{content:"";width:3px;height:12px;border-radius:2px;background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF))}.left-tabs{flex:1;display:flex;flex-direction:column;overflow:hidden}.left-tabs .pd-tab-pane{flex:1;min-height:0;overflow-y:auto;padding:12px}.panel-title{font-size:11px;color:var(--pd-text-muted, #8b909c);letter-spacing:.6px;padding:2px 2px 8px;margin-bottom:10px;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.material-card{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:7px;border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;background:var(--pd-field-bg, #f4f6fa);cursor:grab;-webkit-user-select:none;user-select:none;transition:border-color .14s ease,background .14s ease,transform .14s ease,box-shadow .14s ease}.material-card:hover{border-color:#165dff73;background:var(--pd-surface, #ffffff);transform:translateY(-1px);box-shadow:var(--pd-shadow-sm, 0 1px 2px rgba(23, 32, 60, .05))}.material-card:active{cursor:grabbing;transform:translateY(0)}.material-icon{width:30px;height:24px;border:1px dashed var(--pd-border, #d9dde6);border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--pd-accent, #165DFF);background:var(--pd-surface, #ffffff);flex-shrink:0;transition:border-color .14s ease,background .14s ease}.material-card:hover .material-icon{border-style:solid;border-color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.material-label{font-size:12.5px;color:var(--pd-text, #2a2e37)}.print-image{width:100%;height:100%;overflow:hidden}.print-image img{width:100%;height:100%;display:block}.table-ctx-menu{position:fixed;z-index:3000;min-width:140px;padding:4px 0;background:var(--pd-surface, #fff);border:1px solid var(--pd-menu-border, #dcdfe6);border-radius:4px;box-shadow:0 2px 12px #00000026;font-size:13px}.menu-item{padding:5px 14px;cursor:pointer;color:var(--pd-menu-text, #333)}.menu-item:hover{background:var(--pd-menu-hover, #f5f7fa)}.menu-item.disabled{color:var(--pd-menu-disabled, #c0c4cc);cursor:not-allowed}.menu-item.active{color:var(--pd-accent, #165DFF)}.menu-divider{height:1px;margin:4px 0;background:var(--pd-menu-divider, #ebeef5)}.menu-group-title{padding:4px 14px;font-size:12px;color:var(--pd-menu-muted, #909399)}.cell-barcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.cell-barcode svg{max-width:100%;max-height:100%}.cell-barcode img{max-width:100%;max-height:100%}.cell-barcode-fallback{font-style:italic;opacity:.6}.cell-image{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.cell-image img{max-width:100%;max-height:100%;display:block}.image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#bbb;font-size:12px;border:1px dashed #ddd;box-sizing:border-box}.print-table{position:relative;width:100%;height:100%}.print-table table{border-collapse:collapse;table-layout:fixed;width:100%}.print-table td{box-sizing:border-box;word-break:normal;overflow-wrap:break-word}.cell-selected{outline:2px solid #165DFF;outline-offset:-2px;background-color:#165dff14}.row-data-bg{background-image:repeating-linear-gradient(45deg,rgba(22,93,255,.04) 0 6px,transparent 6px 12px)}.data-placeholder{color:#909399;font-style:italic}.row-badges{position:absolute;left:-16px;top:0;width:14px}.row-badge{position:absolute;width:14px;display:flex;align-items:center;justify-content:center;font-size:10px;color:#909399;background:#f5f7fa;border-radius:2px}.col-resize-layer{position:absolute;inset:0;pointer-events:none;z-index:3}.col-resize-handle{position:absolute;top:0;bottom:0;width:6px;transform:translate(-50%);cursor:col-resize;pointer-events:auto}.col-resize-handle:after{content:"";position:absolute;top:0;bottom:0;left:50%;border-left:1px solid transparent}.col-resize-handle:hover:after,.col-resize-handle.dragging:after{border-left-color:var(--pd-accent, #165DFF)}.print-barcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.print-barcode svg{max-width:100%;max-height:100%}.print-qrcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.print-qrcode img{max-width:100%;max-height:100%}.print-html,.page-number-element{width:100%;height:100%;overflow:hidden}.print-element{box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none}.print-element.design-mode{outline:1px dashed #C3C9D6}.print-element.design-mode.zone-header,.print-element.design-mode.zone-footer{outline:1px dashed var(--pd-ink-green, #67c23a)}.print-element.selected{outline:1.5px solid var(--pd-accent, #165DFF);background:#165dff0a}.print-element.previewed{outline:1.5px solid rgba(22,93,255,.5);background:#165dff1a}.print-element.design-mode:hover{outline:1px dashed var(--pd-accent, #165DFF)}.print-element.locked{cursor:not-allowed}.print-element.locked:not(.selected){outline:1.5px dashed #999}.print-element.hidden{opacity:.3;pointer-events:none}.print-element.drag-ghost{opacity:.4}.drag-preview{position:absolute;inset:0;border:2px dashed var(--pd-accent, #165DFF);pointer-events:none;z-index:1000;box-sizing:border-box}.selected-indicator{position:absolute;top:-18px;left:0;font-size:10px;white-space:nowrap;pointer-events:none;z-index:20}.position-label{background:var(--pd-accent, #165DFF);color:#fff;padding:1px 6px;border-radius:3px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:0;box-shadow:0 2px 6px #00000026}.resize-handles{position:absolute;inset:0;pointer-events:none}.resize-handle{position:absolute;width:7px;height:7px;background:var(--pd-handle, #165DFF);border:1.5px solid #fff;border-radius:2px;box-sizing:border-box;transform:translate(-50%,-50%);box-shadow:0 1px 3px #0000002e;z-index:10;pointer-events:auto}.handle-nw{top:0;left:0;cursor:nw-resize}.handle-n{top:0;left:50%;cursor:n-resize}.handle-ne{top:0;left:100%;cursor:ne-resize}.handle-e{top:50%;left:100%;cursor:e-resize}.handle-se{top:100%;left:100%;cursor:se-resize}.handle-s{top:100%;left:50%;cursor:s-resize}.handle-sw{top:100%;left:0;cursor:sw-resize}.handle-w{top:50%;left:0;cursor:w-resize}.paper-wrapper{display:block}.hiprint-printPaper{transition:transform .15s ease-out}.zone-layer{box-sizing:border-box}.zone-layer.zone-header.design-mode,.zone-layer.zone-footer.design-mode{outline:1px dashed var(--pd-ink-green, #67c23a);background:#67c23a0a}.zone-layer.zone-content.design-mode{outline:1px dashed #C3C9D6}.zone-label{position:absolute;top:2px;right:4px;font-size:9px;color:#909399;pointer-events:none;-webkit-user-select:none;user-select:none}.zone-resize-handle{position:absolute;left:0;width:100%;height:6px;cursor:ns-resize;z-index:5}.zone-resize-handle.handle-bottom{bottom:-3px}.zone-resize-handle.handle-top{top:-3px}.zone-resize-handle:hover{background:#10b98140}.zone-height-tip{position:absolute;right:4px;top:-22px;padding:1px 6px;font-size:11px;color:#fff;background:#10b981;border-radius:3px;white-space:nowrap;pointer-events:none}.design-background{position:absolute;z-index:0;overflow:hidden;pointer-events:none}.design-background img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.grid-bg{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0}.snap-indicator{position:absolute;width:6px;height:6px;background:var(--pd-accent, #165DFF);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:10;animation:snap-pulse-3160f418 .3s ease-out}@keyframes snap-pulse-3160f418{0%{transform:translate(-50%,-50%) scale(2);opacity:.5}to{transform:translate(-50%,-50%) scale(1);opacity:0}}.watermark-layer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;overflow:hidden;pointer-events:none}.watermark-tile{position:absolute;pointer-events:none}.adsorb-guide{position:absolute;pointer-events:none;z-index:9999}.adsorb-guide.guide-vertical{border-left:1px dashed var(--pd-accent-secondary, #f56c6c)}.adsorb-guide.guide-horizontal{border-top:1px dashed var(--pd-accent-secondary, #f56c6c)}.manual-guide{position:absolute;pointer-events:auto;z-index:9998;cursor:move}.manual-guide.guide-vertical{border-left:1px solid #3B82F6;width:0}.manual-guide.guide-horizontal{border-top:1px solid #3B82F6;height:0}.manual-guide:before{content:"";position:absolute;pointer-events:auto}.manual-guide.guide-vertical:before{top:0;bottom:0;left:50%;width:var(--guide-hit, 8px);transform:translate(-50%)}.manual-guide.guide-horizontal:before{left:0;right:0;top:50%;height:var(--guide-hit, 8px);transform:translateY(-50%)}.manual-guide:hover{border-color:#ef4444!important}.pd-ruler{position:absolute;display:block;pointer-events:auto;cursor:crosshair;z-index:1;background:var(--pd-ruler-bg, #f8f9fc)}.pd-ruler.is-horizontal{box-shadow:0 1px 0 var(--pd-border-soft, #e9ecf2)}.pd-ruler.is-vertical{box-shadow:1px 0 0 var(--pd-border-soft, #e9ecf2)}.canvas-area{flex:1;overflow-x:scroll;overflow-y:auto;scrollbar-gutter:stable;display:flex;background-color:var(--pd-canvas-bg, #e6e9f0);background-image:radial-gradient(circle,rgba(23,32,60,.13) 1px,transparent 1.2px);background-size:20px 20px;background-position:center;padding:44px 28px 32px 44px;position:relative}.canvas-scroll{display:flex;flex-direction:column;align-items:center;gap:20px;position:relative;flex:none;margin:auto;width:fit-content}.marquee-selection{position:fixed;border:1.5px solid rgba(22,93,255,.7);background:#165dff14;border-radius:2px;pointer-events:none;z-index:10000}.context-menu{position:fixed;background:var(--pd-surface, #ffffff);border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;box-shadow:var(--pd-shadow-md, 0 10px 28px rgba(23, 32, 60, .12));padding:5px;z-index:10001;min-width:132px}.context-menu-item{padding:7px 12px;border-radius:5px;font-size:12.5px;cursor:pointer;color:var(--pd-text, #2a2e37);-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.context-menu-item:hover{background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF)}.context-menu-item.disabled{color:var(--pd-text-faint, #b4b9c4);cursor:not-allowed}.context-menu-item.disabled:hover{background:transparent;color:var(--pd-text-faint, #b4b9c4)}.context-menu-sep{height:1px;background:var(--pd-border-soft, #e9ecf2);margin:5px 8px}.ruler-overlay{position:absolute;inset:0;pointer-events:none;z-index:60}.ruler-corner{position:absolute;top:0;left:0;width:22px;height:22px;background:var(--pd-ruler-bg, #f8f9fc);box-shadow:1px 1px 0 var(--pd-border-soft, #e9ecf2);z-index:2}.ruler-overlay .pd-ruler.is-horizontal{top:0;left:22px}.ruler-overlay .pd-ruler.is-vertical{top:22px;left:0}.ruler-guide-preview{position:fixed;pointer-events:none;z-index:9997}.ruler-guide-preview.guide-vertical{width:0;border-left:1px dashed var(--pd-accent, #165dff)}.ruler-guide-preview.guide-horizontal{height:0;border-top:1px dashed var(--pd-accent, #165dff)}.property-search{padding:0 0 10px;background:transparent}.property-group{border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;margin-bottom:10px;background:var(--pd-surface, #ffffff);overflow:hidden;transition:border-color .14s ease,box-shadow .14s ease}.property-group:last-child{margin-bottom:2px}.property-group.is-expanded{border-color:var(--pd-border-soft, #e9ecf2)}.group-header{display:flex;align-items:center;padding:9px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;background:var(--pd-field-bg, #f4f6fa);transition:background .14s ease}.group-header:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.property-group.is-expanded .group-header{border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.group-icon{margin-right:8px;color:var(--pd-accent, #165DFF)}.group-title{flex:1;font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:.3px}.expand-icon{color:var(--pd-text-muted, #8b909c);font-size:10px}.group-content{padding:10px 12px 12px;background:var(--pd-surface, #ffffff)}.position-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pd-crop-note{margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--pd-text-faint, #6b7280)}.pd-crop-preview{position:relative;overflow:hidden;margin-bottom:8px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;line-height:0;width:fit-content;max-width:100%}.pd-crop-thumb{max-width:100%;max-height:96px;display:block}.pd-crop-win{position:absolute;border:1px solid #ff5a5a;box-shadow:0 0 0 999px #0000008c;pointer-events:none}.color-row{display:flex;gap:12px}.color-row>.pd-field{flex:1 1 0;min-width:0}.pd-rotate-row{display:flex;align-items:stretch;width:100%}.pd-rotate-btn{width:26px;flex-shrink:0;border:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font-size:14px;line-height:1;cursor:pointer;transition:background .14s ease,border-color .14s ease}.pd-rotate-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-rotate-btn:first-child{border-radius:6px 0 0 6px;border-right:none}.pd-rotate-btn:last-child{border-radius:0 6px 6px 0;border-left:none}.pd-rotate-stepper{flex:1;min-width:0}.pd-rotate-stepper .pd-step-minus,.pd-rotate-stepper .pd-step-plus{display:none}.pd-rotate-stepper .pd-step-input.pd-input{border-radius:0}.expression-editor{display:flex;height:450px;gap:0}.ee-nav{width:100px;background:var(--pd-sidebar);border-right:1px solid var(--pd-border);display:flex;flex-direction:column;flex-shrink:0}.ee-nav-title{padding:10px;border-bottom:1px solid var(--pd-border);font-weight:600;font-size:13px;color:var(--pd-text);text-align:center}.ee-nav-tabs{flex:1;display:flex;flex-direction:column;padding:6px;gap:4px}.ee-nav-tab{padding:8px 10px;border-radius:6px;cursor:pointer;font-size:12px;text-align:center;transition:all .2s}.ee-nav-tab.active{background:var(--pd-accent);color:#fff}.ee-nav-tab:not(.active){background:var(--pd-surface, white);border:1px solid var(--pd-border);color:var(--pd-text)}.ee-nav-tab:hover:not(.active){background:var(--pd-hover-tint, #ecf5ff);border-color:var(--pd-accent)}.ee-content{width:300px;display:flex;flex-direction:column;border-right:1px solid var(--pd-border);flex-shrink:0}.ee-content-search{padding:10px;border-bottom:1px solid var(--pd-border)}.ee-content-list{flex:1;padding:8px;overflow-y:auto;min-height:0}.ee-func-group{margin-bottom:12px}.ee-func-group-title{font-size:11px;font-weight:600;color:var(--pd-text-muted);padding:6px 10px;margin-bottom:2px;letter-spacing:.5px}.ee-field-group{display:flex;align-items:center;gap:4px;padding:6px 10px;font-size:12px;font-weight:600;color:var(--pd-text)}.ee-field-group.is-list{color:var(--pd-accent, #165DFF)}.ee-field-group-icon{font-size:13px;filter:saturate(.6)}.ee-list-item{padding:7px 10px;cursor:pointer;border-radius:4px;margin-bottom:2px;transition:background .15s}.ee-field-info{display:flex;flex-direction:column;gap:1px}.ee-field-info .ee-item-label{font-size:12px;color:var(--pd-text)}.ee-field-info .ee-item-key{font-size:10px;color:var(--pd-text-muted);font-family:monospace}.ee-field-item{display:flex;align-items:center;gap:6px}.ee-field-item .ee-field-info{flex:1;min-width:0}.ee-copy-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--pd-text-muted);cursor:pointer;transition:color .15s,background .15s,border-color .15s}.ee-copy-btn:hover{background:var(--pd-surface, white);border-color:var(--pd-border);color:var(--pd-accent)}.ee-copy-btn.is-copied{color:var(--pd-success, #16a34a)}.ee-list-item:hover{background:var(--pd-hover-tint, #ecf5ff)}.ee-editor{flex:1;display:flex;flex-direction:column;background:var(--pd-sidebar);min-width:0}.ee-editor-section{padding:12px;border-bottom:1px solid var(--pd-border)}.ee-editor-title{font-size:11px;color:var(--pd-text-muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.ee-textarea{width:100%;border:1px solid var(--pd-border);border-radius:6px;padding:10px;font-family:monospace;font-size:13px;resize:vertical;box-sizing:border-box;min-height:100px}.ee-textarea:focus{outline:none;border-color:var(--pd-accent)}.ee-preview{padding:10px;background:var(--pd-bg);border:1px solid var(--pd-border);border-radius:6px;min-height:30px;font-size:13px;color:var(--pd-text);line-height:1.6;white-space:pre-wrap}.ee-preview-error{color:var(--pd-danger, #e53e3e);background:var(--pd-danger-bg, #fef2f2);border-color:var(--pd-danger-border, #fecaca)}.ee-help-section{flex:1;padding:12px;overflow-y:auto;min-height:0}.ee-help-title{font-size:11px;color:var(--pd-text-muted);margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.ee-help-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ee-help-card{border-radius:6px;padding:10px}.ee-help-card-title{font-size:12px;font-weight:600;margin-bottom:4px}.ee-help-card-content{font-size:11px;line-height:1.5;color:var(--pd-text)}.ee-help-field{background:var(--pd-help-field-bg, #f0f9ff);border:1px solid var(--pd-help-field-line, #bae6fd)}.ee-help-field .ee-help-card-title{color:var(--pd-help-field-ink, #0369a1)}.ee-help-function{background:var(--pd-help-function-bg, #f0fdf4);border:1px solid var(--pd-help-function-line, #bbf7d0)}.ee-help-function .ee-help-card-title{color:var(--pd-help-function-ink, #166534)}.ee-help-variable{background:var(--pd-help-variable-bg, #fefce8);border:1px solid var(--pd-help-variable-line, #fde68a)}.ee-help-variable .ee-help-card-title{color:var(--pd-help-variable-ink, #854d0e)}.ee-help-conditional{background:var(--pd-help-conditional-bg, #fdf2f8);border:1px solid var(--pd-help-conditional-line, #fbcfe8)}.ee-help-conditional .ee-help-card-title{color:var(--pd-help-conditional-ink, #9d174d)}.expression-editor{max-height:min(600px,80vh);overflow-y:auto;padding:16px}.col-width-row{display:flex;align-items:center;gap:8px;margin-bottom:4px;width:100%}.border-row{display:flex;gap:10px}.border-row .pd-field{flex:1;min-width:0}.advanced-row{display:flex;gap:16px}.image-content-upload{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:4px}.upload-tip{margin:0;font-size:11px;color:var(--pd-text-muted, #909399)}.cell-style-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.cell-font-field{grid-column:1 / -1;padding-bottom:8px}.border-style-row{display:flex;gap:6px;margin-bottom:8px}.border-presets{margin-bottom:8px}.merge-btns{margin-top:8px;display:flex;gap:8px}.watermark-config{padding:0 4px}.pd-hint{margin-left:8px;font-size:12px;color:#909399;min-width:32px}.design-background-config{padding:0 4px}.design-background-tip{margin:2px 0 6px;font-size:11px;line-height:1.4;color:var(--pd-text-muted, #909399)}.design-background-path{margin-bottom:6px;padding:4px 6px;font-size:11px;color:var(--pd-text-regular, #606266);background:var(--pd-fill-light, #f5f7fa);border-radius:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.design-background-actions{display:flex;gap:6px}.upload-label{cursor:pointer}.upload-label.disabled{opacity:.6;cursor:not-allowed}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.tiling-config{padding:0 4px}.tiling-switch{display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}.tiling-error{color:#f56c6c}.tiling-summary{color:var(--pd-text-regular, #606266)}.property-panel{width:280px;min-width:280px;background:var(--pd-sidebar, #ffffff);border-left:1px solid var(--pd-border-soft, #e9ecf2);display:flex;flex-direction:column;overflow:hidden;transition:width .18s ease}.property-panel.collapsed{width:36px;min-width:36px;border-left:1px solid var(--pd-border-soft, #e9ecf2)}.prop-collapsed{display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:12px;flex:1}.pc-btn{width:26px;height:26px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .14s ease}.pc-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.pc-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.prop-head{display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 12px;flex-shrink:0;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.prop-title{font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:1.2px;display:inline-flex;align-items:center;gap:7px}.prop-title:before{content:"";width:3px;height:12px;border-radius:2px;background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF))}.collapse-btn{border:none;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:14px;cursor:pointer;width:24px;height:24px;border-radius:5px;transition:all .14s ease}.collapse-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.prop-tabs{flex:1;display:flex;flex-direction:column;overflow:hidden}.prop-tabs .pd-tab-pane{flex:1;min-height:0;overflow-y:auto;padding:12px}.property-content{padding:0}.margin-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.custom-size-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px;width:100%}.custom-size-x{color:var(--pd-text-muted, #8b909c);font-size:12px}.pd-hint{margin:2px 0 6px;color:var(--pd-text-muted, #8b909c);font-size:12px;line-height:1.4}.page-bg-row{display:flex;align-items:center;gap:8px}.page-bg-picker{flex:1;min-width:0}.status-bar{position:relative;display:flex;align-items:center;gap:20px;height:30px;padding:0 16px;background:var(--pd-surface, #ffffff);border-top:1px solid var(--pd-border-soft, #e9ecf2);box-shadow:0 -1px 2px #17203c08;font-size:11.5px;color:var(--pd-text-muted, #8b909c);-webkit-user-select:none;user-select:none;flex-shrink:0}.status-item{white-space:nowrap;font-variant-numeric:tabular-nums;display:inline-flex;align-items:center}.coord{font-variant-numeric:tabular-nums;color:var(--pd-text, #2a2e37)}.status-paper{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--pd-accent, #165DFF);font-weight:600}.status-dirty{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:var(--pd-text-muted, #8b909c)}.status-dirty.on{color:var(--pd-accent-secondary, #f56c6c)}.dirty-dot{width:7px;height:7px;border-radius:50%;background:var(--pd-ink-green, #67c23a)}.status-dirty.on .dirty-dot{background:var(--pd-accent-secondary, #f56c6c);box-shadow:0 0 0 3px #f56c6c24;animation:dirty-pulse-a91952ff 1.6s ease-in-out infinite}@keyframes dirty-pulse-a91952ff{0%,to{box-shadow:0 0 0 2px #f56c6c1f}50%{box-shadow:0 0 0 4px #f56c6c0d}}@media(prefers-reduced-motion:reduce){.status-dirty.on .dirty-dot{animation:none}}.help-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.help-modal{width:800px;max-width:90vw;height:600px;max-height:85vh;background:var(--pd-surface, #ffffff);border-radius:8px;box-shadow:0 4px 24px #00000026;display:flex;flex-direction:column;overflow:hidden}.help-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--pd-border, #d9dde6)}.help-modal-title{margin:0;font-size:16px;font-weight:600;color:var(--pd-text, #2a2e37)}.help-modal-title-wrap{display:flex;align-items:center;gap:10px}.help-modal-project{padding:2px 8px;border-radius:4px;background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF);font-size:12px;font-weight:500}.help-modal-close{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:20px;cursor:pointer;transition:all .15s}.help-modal-close:hover{background:var(--pd-sidebar-hover, #f0f3f9);color:var(--pd-text, #2a2e37)}.help-modal-body{flex:1;display:flex;overflow:hidden}.help-modal-sidebar{width:160px;padding:12px;border-right:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);overflow-y:auto}.help-tab{display:block;width:100%;padding:10px 12px;margin-bottom:4px;border:none;border-radius:4px;background:transparent;color:var(--pd-text, #2a2e37);font-size:13px;text-align:left;cursor:pointer;transition:all .15s}.help-tab:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.help-tab.active{background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF);font-weight:500}.help-modal-content{flex:1;padding:20px;overflow-y:auto}.help-content{font-size:14px;line-height:1.6;color:var(--pd-text, #2a2e37)}.help-content h2{margin:0 0 16px;padding-bottom:8px;border-bottom:1px solid var(--pd-border-soft, #e9ecf2);font-size:18px;font-weight:600}.help-content h3{margin:20px 0 12px;font-size:15px;font-weight:600}.help-content p{margin:0 0 12px}.help-content ul,.help-content ol{margin:0 0 12px;padding-left:24px}.help-content li{margin-bottom:4px}.help-content code{padding:2px 6px;border-radius:3px;background:var(--pd-field-bg, #f4f6fa);font-family:SF Mono,Monaco,monospace;font-size:13px}.help-content pre{margin:0 0 12px;padding:12px;border-radius:4px;background:var(--pd-field-bg, #f4f6fa);overflow-x:auto}.help-content pre code{padding:0;background:transparent}.help-content table{width:100%;margin:0 0 12px;border-collapse:collapse}.help-content th,.help-content td{padding:8px 12px;border:1px solid var(--pd-border, #d9dde6);text-align:left}.help-content th{background:var(--pd-field-bg, #f4f6fa);font-weight:600}.help-content blockquote{margin:0 0 12px;padding:12px 16px;border-left:3px solid var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.help-modal-enter-active,.help-modal-leave-active{transition:opacity .2s ease}.help-modal-enter-active .help-modal,.help-modal-leave-active .help-modal{transition:transform .2s ease}.help-modal-enter-from,.help-modal-leave-to{opacity:0}.help-modal-enter-from .help-modal,.help-modal-leave-to .help-modal{transform:scale(.95)}.page-tabs{display:flex;align-items:center;gap:8px;padding:4px 12px;background:var(--pd-sidebar, #fff);border-bottom:1px solid var(--pd-border, #d9dde6);flex-shrink:0}.page-tabs-list{display:flex;gap:4px;overflow-x:auto;align-items:center}.page-tab{padding:4px 12px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;background:transparent;cursor:pointer;white-space:nowrap;color:var(--pd-text, #2a2e37);font-size:12px}.page-tab.active{background:var(--pd-accent, #165DFF);color:#fff}.page-tab-rename{padding:4px 8px;width:96px;border:1px solid var(--pd-accent, #165DFF);border-radius:4px;font-size:12px;color:var(--pd-text, #2a2e37);outline:none}.page-tabs-actions{display:flex;gap:4px;margin-left:auto}.page-tabs-actions button{padding:4px 8px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;background:transparent;cursor:pointer;color:var(--pd-text-muted, #8b909c);font-size:12px;line-height:1}.page-tabs-actions button:disabled{opacity:.4;cursor:not-allowed}.designer-container{--pd-bg: #f3f5f9;--pd-surface: #ffffff;--pd-field-bg: #f4f6fa;--pd-sidebar: #ffffff;--pd-sidebar-hover: #f0f3f9;--pd-canvas-bg: #e6e9f0;--pd-paper: #FFFFFF;--pd-accent: #165DFF;--pd-accent-2: #3D7BFF;--pd-accent-soft: rgba(22, 93, 255, .09);--pd-accent-secondary: #f56c6c;--pd-danger-soft: rgba(245, 108, 108, .1);--pd-ink-green: #67c23a;--pd-text: #2a2e37;--pd-text-muted: #8b909c;--pd-text-faint: #b4b9c4;--pd-border: #d9dde6;--pd-border-soft: #e9ecf2;--pd-input-bg: #ffffff;--pd-hover-tint: #ecf5ff;--pd-danger: #e53e3e;--pd-danger-bg: #fef2f2;--pd-danger-border: #fecaca;--pd-menu-text: #333;--pd-menu-hover: #f5f7fa;--pd-menu-border: #dcdfe6;--pd-menu-divider: #ebeef5;--pd-menu-muted: #909399;--pd-menu-disabled: #c0c4cc;--pd-scrollbar: rgba(23, 32, 60, .18);--pd-scrollbar-thumb: rgba(23, 32, 60, .16);--pd-scrollbar-thumb-hover: rgba(23, 32, 60, .3);--pd-help-field-bg: #f0f9ff;--pd-help-field-line: #bae6fd;--pd-help-field-ink: #0369a1;--pd-help-function-bg: #f0fdf4;--pd-help-function-line: #bbf7d0;--pd-help-function-ink: #166534;--pd-help-variable-bg: #fefce8;--pd-help-variable-line: #fde68a;--pd-help-variable-ink: #854d0e;--pd-help-conditional-bg: #fdf2f8;--pd-help-conditional-line: #fbcfe8;--pd-help-conditional-ink: #9d174d;--pd-handle: #165DFF;--pd-ruler: #9aa1af;--pd-ruler-bg: #f8f9fc;--pd-ruler-cursor: #165DFF;--pd-radius: 6px;--pd-shadow-sm: 0 1px 2px rgba(23, 32, 60, .05);--pd-shadow-md: 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07);--pd-shadow-paper: 0 0 0 1px rgba(23, 32, 60, .05), 0 1px 2px rgba(23, 32, 60, .06), 0 8px 20px rgba(23, 32, 60, .08), 0 26px 60px rgba(23, 32, 60, .15);height:100%;display:flex;flex-direction:column;background:var(--pd-bg)}.designer-body{flex:1;display:flex;overflow:hidden}.designer-container.format-painting .canvas-area,.designer-container.format-painting .canvas-area *{cursor:copy!important}.print-html-preview{width:100%;height:100%;position:relative;background:#e9ebee}.print-html-preview-iframe{width:100%;height:100%;border:0;background:#fff}.print-html-preview-loading,.print-html-preview-error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#909399;font-size:14px}.print-html-preview-error{color:#f56c6c}.print-html-preview-warn{position:absolute;top:8px;left:12px;z-index:2;max-width:62%;padding:4px 8px;border:1px solid #e6a23c;border-radius:4px;background:#faecd1f0;color:#b88230;font-size:12px;line-height:1.5}.print-html-preview-zoom{position:absolute;top:8px;right:12px;z-index:2;display:flex;align-items:center;gap:4px;padding:3px 4px;border:1px solid var(--pd-border-soft, #ebeef5);border-radius:6px;background:#ffffffeb;box-shadow:0 1px 4px #00000014}.print-html-preview-zoom-btn{padding:2px 7px;border:0;border-radius:4px;background:transparent;color:var(--pd-text-muted, #909399);font-size:11px;line-height:18px;cursor:pointer;transition:color .14s ease,background .14s ease}.print-html-preview-zoom-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9);color:var(--pd-text, #2a2e37)}.print-html-preview-zoom-btn.active{background:var(--pd-accent, #165DFF);color:#fff;font-weight:600}.print-html-preview-zoom-note{padding-right:4px;color:var(--pd-text-muted, #909399);font-size:11px}.print-html-preview-zoom-hint{color:#b88230;font-size:11px}.tiling-config .margin-grid,.tiling-config .custom-size-grid{display:block;grid-template-columns:none;gap:normal}.tiling-config .custom-size-x{display:inline;min-width:0;color:inherit}.pd-hint{min-width:auto}.watermark-config .pd-hint{min-width:32px;margin-left:8px;color:#909399}.tiling-config .tiling-error{color:#f56c6c}.tiling-config .tiling-summary{color:var(--pd-text-regular, #606266)}.pd-help{position:static}.pd-help:after{top:calc(100% + 6px);bottom:auto;left:0;transform:none;padding:5px 7px;white-space:normal;z-index:120}.page-tabs [data-tip]:after,.field-tree-panel [data-tip]:after{content:none}', co = 20, bp = ".page-tabs, .field-tree-panel, .pd-dialog-overlay", xp = /* @__PURE__ */ new Set(["z", "y", "a", "c", "x", "v", "d", "g", "1", "l", "r", "e", "t", "b", "0"]), vp = {
|
|
6859
|
+
const xp = ':host{display:block;width:100%;height:100%}:host{--pd-bg: #f3f5f9;--pd-surface: #ffffff;--pd-field-bg: #f4f6fa;--pd-sidebar: #ffffff;--pd-sidebar-hover: #f0f3f9;--pd-canvas-bg: #e6e9f0;--pd-paper: #FFFFFF;--pd-accent: #165DFF;--pd-accent-2: #3D7BFF;--pd-accent-soft: rgba(22, 93, 255, .09);--pd-accent-secondary: #f56c6c;--pd-danger-soft: rgba(245, 108, 108, .1);--pd-ink-green: #67c23a;--pd-text: #2a2e37;--pd-text-muted: #8b909c;--pd-text-faint: #b4b9c4;--pd-border: #d9dde6;--pd-border-soft: #e9ecf2;--pd-input-bg: #ffffff;--pd-hover-tint: #ecf5ff;--pd-danger: #e53e3e;--pd-danger-bg: #fef2f2;--pd-danger-border: #fecaca;--pd-menu-text: #333;--pd-menu-hover: #f5f7fa;--pd-menu-border: #dcdfe6;--pd-menu-divider: #ebeef5;--pd-menu-muted: #909399;--pd-menu-disabled: #c0c4cc;--pd-scrollbar: rgba(23, 32, 60, .18);--pd-scrollbar-thumb: rgba(23, 32, 60, .16);--pd-scrollbar-thumb-hover: rgba(23, 32, 60, .3);--pd-help-field-bg: #f0f9ff;--pd-help-field-line: #bae6fd;--pd-help-field-ink: #0369a1;--pd-help-function-bg: #f0fdf4;--pd-help-function-line: #bbf7d0;--pd-help-function-ink: #166534;--pd-help-variable-bg: #fefce8;--pd-help-variable-line: #fde68a;--pd-help-variable-ink: #854d0e;--pd-help-conditional-bg: #fdf2f8;--pd-help-conditional-line: #fbcfe8;--pd-help-conditional-ink: #9d174d;--pd-handle: #165DFF;--pd-ruler: #9aa1af;--pd-ruler-bg: #f8f9fc;--pd-ruler-cursor: #165DFF;--pd-radius: 6px;--pd-shadow-sm: 0 1px 2px rgba(23, 32, 60, .05);--pd-shadow-md: 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07);--pd-shadow-paper: 0 0 0 1px rgba(23, 32, 60, .05), 0 1px 2px rgba(23, 32, 60, .06), 0 8px 20px rgba(23, 32, 60, .08), 0 26px 60px rgba(23, 32, 60, .15);height:100%;display:flex;flex-direction:column;background:var(--pd-bg)}.pd-form{display:flex;flex-direction:column;gap:10px;font-size:12px;color:var(--pd-text, #303133)}.pd-field{display:flex;flex-direction:column;gap:4px}.pd-label{font-size:11px;color:var(--pd-text-muted, #909399);display:inline-flex;align-items:center;position:relative;justify-content:space-between;gap:6px}.pd-label-t{display:inline-flex;align-items:center;gap:4px;min-width:0}.pd-reset-btn{flex:none;width:15px;height:15px;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--pd-text-faint, #b4b9c4);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .14s ease,border-color .14s ease,background .14s ease}.pd-reset-btn.is-dirty{color:var(--pd-text, #2a2e37)}.pd-reset-btn:hover{color:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.pd-help{position:static;display:inline-flex;align-items:center;justify-content:center;flex:none;width:13px;height:13px;margin-left:4px;padding:0;border:1px solid var(--pd-border, #d9dde6);border-radius:50%;background:transparent;color:var(--pd-text-muted, #909399);font-size:9px;line-height:1;cursor:help}.pd-help:before{content:"?";font-weight:600}.pd-help:hover,.pd-help:focus-visible{border-color:var(--pd-accent, #165DFF);color:var(--pd-accent, #165DFF)}.pd-help:after{content:attr(data-tip);position:absolute;top:calc(100% + 6px);left:0;z-index:120;width:196px;padding:5px 7px;border-radius:4px;background:#1e2330e0;color:#fff;font-size:12px;font-weight:400;line-height:1.45;text-align:left;white-space:normal;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease}.pd-help:hover:after,.pd-help:focus:after{opacity:1;visibility:visible}.pd-hover-tip{position:fixed;z-index:9999;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:#2a2e37eb;color:#fff;font-size:12px;line-height:1.4;width:max-content;max-width:calc(100vw - 16px);box-sizing:border-box;overflow-wrap:anywhere;pointer-events:none}.pd-input,.pd-select,textarea.pd-input{width:100%;height:26px;min-height:26px;padding:3px 6px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-input-bg, #fff);color:inherit;font:inherit;box-sizing:border-box;transition:border-color .14s ease,box-shadow .14s ease}.pd-input:hover,.pd-select:hover{border-color:var(--pd-text-faint, #b4b9c4)}textarea.pd-input{height:auto;min-height:48px;resize:vertical}.pd-input:focus,.pd-select:focus{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.pd-select{appearance:auto}.pd-switch{appearance:none;width:32px;height:18px;margin:0;border:1px solid var(--pd-border, #dcdfe6);border-radius:999px;background:#dcdfe6;position:relative;cursor:pointer;transition:background .2s,border-color .2s}.pd-switch:checked{background:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF)}.pd-switch:after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:transform .2s}.pd-switch:checked:after{transform:translate(14px)}.pd-range{width:100%;accent-color:var(--pd-accent, #165DFF)}.pd-radio-group,.pd-checkbox-group{display:flex;flex-wrap:wrap;gap:6px}.pd-radio-group--2col{display:grid;grid-template-columns:1fr 1fr}.pd-radio-group--2col>.pd-radio{width:60%;justify-content:flex-start}.pd-radio,.pd-checkbox{display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:0 7px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-input-bg, #fff);cursor:pointer;transition:border-color .14s ease,background .14s ease,color .14s ease}.pd-radio:has(input:checked),.pd-checkbox:has(input:checked){color:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);background:#165dff0f}.pd-button-group{display:inline-flex;gap:4px}.pd-button,.pd-tab{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:26px;padding:3px 8px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font:inherit;cursor:pointer;transition:background .14s ease,border-color .14s ease,color .14s ease}.pd-button:hover{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-button.primary{background:var(--pd-accent, #165DFF);border-color:var(--pd-accent, #165DFF);color:#fff}.pd-button.danger{background:#f56c6c;border-color:#f56c6c;color:#fff}.pd-button.small{min-height:22px;padding:1px 6px;font-size:11px}.pd-button:disabled{opacity:.55;cursor:not-allowed}.pd-tabs{display:flex;flex-direction:column;min-height:0}.pd-tab-bar{display:flex;gap:4px;padding:8px 12px 0;border-bottom:1px solid var(--pd-border-soft, #ebeef5)}.pd-tab{border:0;border-bottom:2px solid transparent;border-radius:5px 5px 0 0;background:transparent;transition:color .14s ease,background .14s ease}.pd-tab-bar .pd-tab:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.pd-tab.active{color:var(--pd-accent, #165DFF);border-bottom-color:var(--pd-accent, #165DFF);background:transparent;font-weight:600}.pd-tab-pane{min-height:0;overflow:auto}.pd-divider{margin:6px 0;font-size:11px;color:var(--pd-text-muted, #909399)}.pd-empty{margin:16px 0;color:var(--pd-text-muted, #909399);text-align:center}.pd-dialog-overlay{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:16px;background:#00000073}.pd-dialog{display:flex;flex-direction:column;width:min(950px,90vw);max-height:90vh;overflow:hidden;background:var(--pd-surface, #fff);border-radius:12px;box-shadow:var(--pd-shadow-md, 0 12px 40px rgba(23, 32, 60, .18))}.pd-dialog-large{width:min(950px,90vw)}.pd-dialog-header,.pd-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px}.pd-dialog-header{border-bottom:1px solid var(--pd-border-soft, #ebeef5)}.pd-dialog-footer{justify-content:flex-end;border-top:1px solid var(--pd-border-soft, #ebeef5)}.pd-close{width:22px;height:22px;border:0;background:transparent;color:var(--pd-text-muted, #909399);font-size:16px;cursor:pointer}.pd-icon{display:inline-flex;width:14px;height:14px}.tb-more-panel{min-width:244px}.designer-container{scrollbar-width:thin;scrollbar-color:var(--pd-scrollbar, rgba(23, 32, 60, .18)) transparent}.designer-container ::-webkit-scrollbar{width:9px;height:9px}.designer-container ::-webkit-scrollbar-track{background:transparent}.designer-container ::-webkit-scrollbar-thumb{background:var(--pd-scrollbar-thumb, rgba(23, 32, 60, .16));border-radius:999px;border:2px solid transparent;background-clip:content-box}.designer-container ::-webkit-scrollbar-thumb:hover{background:var(--pd-scrollbar-thumb-hover, rgba(23, 32, 60, .3));border:2px solid transparent;background-clip:content-box}.designer-container ::-webkit-scrollbar-corner{background:transparent}.designer-container button:focus-visible,.designer-container [tabindex]:focus-visible,.designer-container .pd-tab:focus-visible{outline:2px solid var(--pd-accent, #165DFF);outline-offset:1px}@media(prefers-reduced-motion:reduce){.designer-container *,.designer-container *:before,.designer-container *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.help-button{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;cursor:pointer;transition:background-color .15s}.help-button:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.help-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--pd-accent, #165DFF);color:#fff;font-size:12px;font-weight:600;line-height:1}.tb-dd{position:relative;display:inline-flex}.tb-dd-trigger{height:28px;min-width:28px;padding:0 5px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:3px;font-size:12px;transition:background .14s ease,color .14s ease}.tb-dd-trigger:hover:not(:disabled){color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.tb-dd-trigger:disabled{opacity:.32;cursor:default}.tb-dd-trigger.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.tb-dd-arrow{opacity:.6;transition:transform .14s ease}.tb-dd-arrow.up{transform:rotate(180deg)}.tb-dd-trigger[data-tip]{position:relative}.tb-dd-trigger[data-tip]:after{content:attr(data-tip);position:absolute;top:34px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}.tb-dd-trigger[data-tip]:hover:after{opacity:1}.tb-dd-panel{position:absolute;top:34px;left:0;background:var(--pd-surface, #fff);border:1px solid var(--pd-border, #d9dde6);border-radius:8px;box-shadow:var(--pd-shadow-md, 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07));z-index:200}.tb-dd-panel.is-hidden{display:none}.tb-more-group{flex-shrink:0}.tb-more-menu{display:flex;flex-direction:column;gap:8px;padding:8px;max-height:min(70vh,520px)}.tb-more-item{display:flex;flex-direction:column;gap:4px}.tb-menu-label{font-size:11px;color:var(--pd-text-muted, #8b909c);padding-left:2px}.tb-more-slot{display:flex;align-items:center}.designer-toolbar{display:flex;align-items:center;gap:2px;padding:0 12px;height:50px;background:var(--pd-surface, #ffffff);border-bottom:1px solid var(--pd-border-soft, #e9ecf2);box-shadow:0 1px 2px #17203c0a,0 6px 16px -12px #17203c40;flex-shrink:0;position:relative;z-index:100}.tb-ou{flex-shrink:0}.designer-toolbar>*{flex-shrink:0}.designer-toolbar>.tb-brand{flex-shrink:1;min-width:0}.tb-title,.tb-title-name,.tb-title-sub,.tb-btn-text,.tb-zoom{white-space:nowrap}.designer-toolbar.is-tight .tb-title{min-width:0;overflow:hidden}.designer-toolbar.is-tight .tb-title-name,.designer-toolbar.is-tight .tb-title-sub{overflow:hidden;text-overflow:ellipsis}.tb-group{display:flex;align-items:center;gap:2px;padding:0 8px}.tb-group+.tb-group{border-left:1px solid var(--pd-border-soft, #e9ecf2)}.tb-btn{height:30px;min-width:30px;padding:0 8px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:5px;transition:background .14s ease,color .14s ease,border-color .14s ease,box-shadow .14s ease}.tb-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.tb-btn:active{background:var(--pd-border-soft, #e9ecf2)}.tb-btn:disabled{opacity:.32;cursor:default;background:transparent;color:var(--pd-text-faint, #b4b9c4)}.tb-btn.danger:hover:not(:disabled){color:var(--pd-accent-secondary, #f56c6c);background:var(--pd-danger-soft, rgba(245, 108, 108, .1))}.tb-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));font-weight:600}.tb-btn .dot{width:6px;height:6px;border-radius:50%;background:var(--pd-text-faint, #b4b9c4);display:inline-block;transition:background .14s ease,box-shadow .14s ease}.tb-btn.on .dot{background:var(--pd-accent, #165DFF);box-shadow:0 0 0 3px #165dff1f}.tb-icon{font-size:15px;line-height:1}[data-tip]{position:relative}[data-tip]:after{content:attr(data-tip);position:absolute;bottom:-32px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}[data-tip]:hover:after{opacity:1}.tb-mark{width:28px;height:28px;margin-right:2px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(150deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF));box-shadow:0 3px 8px #165dff47,inset 0 1px #ffffff38;flex-shrink:0}.tb-mark svg{width:16px;height:16px}.tb-title{display:flex;flex-direction:column;line-height:1.2;padding-left:6px}.tb-title-name{font-size:13px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:.2px}.tb-title-sub{font-size:10px;color:var(--pd-text-muted, #8b909c);letter-spacing:.8px}.tb-zoom{font-size:12px;color:var(--pd-text, #2a2e37);font-variant-numeric:tabular-nums;min-width:46px;text-align:center}.tb-spacer{flex:1}.tb-group .tb-dd-trigger{height:30px;min-width:30px;padding:0 8px}.tb-btn-text{font-size:12px}.tb-menu{padding:8px;display:flex;flex-direction:column;gap:4px}.tb-menu-rows{width:148px}.tb-menu-label{padding:2px 4px;font-size:11px;color:var(--pd-text-muted, #8b909c)}.tb-menu-grid{display:grid;grid-template-columns:repeat(4,32px);gap:2px;margin-bottom:4px}.tb-menu-row{justify-content:flex-start;width:100%}.btn-primary,.btn-secondary{height:32px;padding:0 16px;border-radius:7px;font-size:13px;font-weight:600;cursor:pointer;transition:filter .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease}.btn-secondary{background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text-muted, #606266);border:1px solid var(--pd-border, #d9dde6)}.btn-secondary:hover{border-color:var(--pd-accent, #165DFF);color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .06))}.btn-primary{background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF));color:#fff;border:none;box-shadow:0 3px 10px #165dff47,inset 0 1px #ffffff2e}.btn-primary:hover{filter:brightness(1.07);box-shadow:0 5px 14px #165dff57,inset 0 1px #ffffff2e}.btn-primary:active{filter:brightness(.97)}.font-select{position:relative}.font-select-input{display:block;width:100%}.font-select-list{position:absolute;top:calc(100% + 4px);left:0;width:100%;min-width:150px;z-index:200;margin:0;max-height:200px;overflow-y:auto;padding:2px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-surface, #ffffff);box-shadow:var(--pd-shadow-md, 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07));list-style:none}.font-select-list.is-up{top:auto;bottom:calc(100% + 4px)}.font-select-option{padding:4px 6px;border-radius:4px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.font-select-option.is-active{background:var(--pd-sidebar-hover, #f0f3f9)}.font-select-option.is-muted{color:var(--pd-text-muted, #8b909c)}.pd-stepper{display:flex;align-items:center;width:100%}.pd-step-btn{width:26px;height:26px;flex-shrink:0;border:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .14s ease,border-color .14s ease,color .14s ease}.pd-step-btn:hover:not(:disabled){background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-step-btn:disabled{opacity:.45;cursor:not-allowed}.pd-step-minus{border-radius:6px 0 0 6px;border-right:none}.pd-step-plus{border-radius:0 6px 6px 0;border-left:none}.pd-step-input.pd-input{border-radius:0;min-width:0;flex:1;text-align:center;-moz-appearance:textfield}.pd-step-input.pd-input::-webkit-outer-spin-button,.pd-step-input.pd-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.preset-color-trigger{display:flex;align-items:center;width:100%;min-height:26px;padding:1px;border:1px solid var(--pd-border, #d9dde6);border-radius:6px;background:var(--pd-surface, #fff);cursor:pointer;transition:border-color .14s ease,box-shadow .14s ease}.preset-color-trigger:hover,.preset-color-trigger[aria-expanded=true]{border-color:var(--pd-accent, #165DFF)}.preset-color-trigger:focus-visible{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.preset-color-swatch{width:100%;height:22px;border-radius:4px;background-image:linear-gradient(45deg,#e9ecef 25%,transparent 25%,transparent 75%,#e9ecef 75%);background-size:8px 8px;background-position:0 0,4px 4px}.preset-color-panel{position:fixed;z-index:3000;width:190px;padding:10px;border:1px solid var(--pd-border, #d9dde6);border-radius:8px;background:var(--pd-surface, #fff);box-shadow:0 8px 24px #17203c29}.picker-preview{display:flex;align-items:center;gap:8px;margin-bottom:8px}.picker-current{flex:0 0 26px;height:24px;border:1px solid rgb(0 0 0 / 12%);border-radius:5px;background-image:linear-gradient(45deg,#e9ecef 25%,transparent 25%,transparent 75%,#e9ecef 75%);background-size:8px 8px;background-position:0 0,4px 4px}.picker-current.is-empty{position:relative;background-color:#fff}.picker-current.is-empty:after{content:"";position:absolute;inset:3px;background:linear-gradient(to top right,transparent calc(50% - .7px),#f53f3f calc(50% - .7px),#f53f3f calc(50% + .7px),transparent calc(50% + .7px));border-radius:3px}.picker-hex{flex:1;min-width:0;height:24px;padding:0 6px;border:1px solid var(--pd-border, #d9dde6);border-radius:5px;color:var(--pd-text, #303133);font:inherit;font-size:11px;text-transform:uppercase}.picker-hex:focus{outline:none;border-color:var(--pd-accent, #165DFF);box-shadow:0 0 0 2px #165dff1f}.picker-area{position:relative;height:100px;border:1px solid rgb(0 0 0 / 12%);border-radius:6px;overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--picker-hue) 100% 50%))}.picker-handle{position:absolute;width:12px;height:12px;border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 3px #00000073;pointer-events:none}.picker-hue{width:100%;height:14px;margin:10px 0 0;appearance:none;border:1px solid rgb(0 0 0 / 12%);border-radius:999px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);cursor:pointer}.picker-hue::-webkit-slider-thumb{appearance:none;width:12px;height:12px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 3px #00000073}.picker-hue::-moz-range-thumb{width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:transparent;box-shadow:0 0 3px #00000073}.picker-heading{display:flex;align-items:center;justify-content:space-between;margin-top:10px;margin-bottom:6px;font-size:11px;color:var(--pd-text-muted, #909399)}.picker-clear{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border:none;border-radius:4px;background:transparent;font-size:11px;line-height:1;color:var(--pd-text-muted, #909399);cursor:pointer}.picker-clear:hover:not(:disabled){background:#0000000f;color:var(--pd-danger, #f53f3f)}.picker-clear:disabled{opacity:.45;cursor:not-allowed}.preset-color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.preset-color-item{width:22px;height:22px;padding:0;border:1px solid rgb(0 0 0 / 12%);border-radius:5px;cursor:pointer}.preset-color-item.active{box-shadow:0 0 0 2px #fff,0 0 0 3px var(--pd-accent, #165DFF)}.format-toolbar{display:flex;align-items:center;gap:2px;flex-shrink:0;min-width:0}.ft-group{display:flex;align-items:center;gap:2px;padding:0 8px;flex-shrink:0}.ft-group+.ft-group{border-left:1px solid var(--pd-border-soft, #e9ecf2)}.ft-btn{height:28px;min-width:28px;padding:0 5px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:4px;transition:background .14s ease,color .14s ease}.ft-btn:hover:not(:disabled){color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.ft-btn:disabled{opacity:.32;cursor:default}.ft-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.ft-btn-text{font-size:12px}.ft-btn[data-tip]{position:relative}.ft-btn[data-tip]:after{content:attr(data-tip);position:absolute;top:34px;left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:100}.ft-btn[data-tip]:hover:after{opacity:1}.ft-font{width:150px}.ft-size{width:96px}.ft-font .font-select-input,.ft-size .pd-input,.ft-size .pd-step-btn{font-size:12px}.ft-color-btn{position:relative;width:28px;height:28px;display:inline-flex;margin-left:2px}.ft-color-btn.dim{opacity:.35}.ft-color-btn .preset-color-trigger{width:100%;height:100%;min-height:0;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;align-items:flex-end;justify-content:center}.ft-color-btn .preset-color-trigger:hover,.ft-color-btn .preset-color-trigger[aria-expanded=true]{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-border-soft, #e9ecf2)}.ft-color-btn .preset-color-swatch{width:16px;height:4px;margin-bottom:3px;border-radius:1px;background-image:none;border-bottom:1px solid var(--pd-text-faint, #b4b9c4)}.ft-glyph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding-bottom:7px;font-size:13px;font-weight:700;color:var(--pd-text, #2a2e37);pointer-events:none}.ft-border-panel{width:196px;padding:10px;display:flex;flex-direction:column;gap:8px}.ft-align-panel{padding:6px;display:flex;flex-direction:column;gap:4px}.ft-align-row{display:grid;grid-template-columns:repeat(3,36px);gap:4px}.ft-border-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ft-cell-btn{height:30px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--pd-text, #2a2e37);cursor:pointer}.ft-cell-btn:hover:not(:disabled){background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-border-soft, #e9ecf2)}.ft-cell-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));border-color:#165dff59}.ft-cell-btn:disabled{opacity:.32;cursor:default}.ft-cell-btn .g-faint{fill:none;stroke:var(--pd-text-faint, #b4b9c4);stroke-width:1;stroke-dasharray:2 2}.ft-cell-btn .g-solid{stroke:currentColor;stroke-width:1.6}.ft-cell-btn[data-tip],.ft-style-btn[data-tip]{position:relative}.ft-cell-btn[data-tip]:after,.ft-style-btn[data-tip]:after{content:attr(data-tip);position:absolute;top:calc(100% + 4px);left:50%;transform:translate(-50%);padding:4px 8px;font-size:12px;font-weight:400;color:#fff;background:#1e2330e0;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease;z-index:210}.ft-cell-btn[data-tip]:hover:after,.ft-style-btn[data-tip]:hover:after{opacity:1}.ft-style-row{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.ft-style-btn{height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--pd-text, #2a2e37);cursor:pointer}.ft-style-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.ft-style-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09));border-color:#165dff59}.ft-style-line{width:100%;height:0}.ft-border-style-row{display:flex;align-items:center;gap:6px}.ft-line-width{width:96px}.ft-edge-label{font-size:12px;color:var(--pd-text-muted, #8b909c);white-space:nowrap;flex-shrink:0}.layer-panel{border-top:1px solid var(--pd-border);padding:8px 12px;height:100%;box-sizing:border-box;overflow-y:auto}.panel-title{font-size:11px;color:var(--pd-text-muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}.layer-item{display:flex;align-items:center;gap:6px;padding:4px 6px;margin-bottom:2px;border-radius:4px;cursor:pointer;font-size:12px;transition:background .1s}.layer-item:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.layer-item.active{background:#165dff1a;color:var(--pd-accent, #165DFF);box-shadow:inset 2px 0 0 var(--pd-accent, #165DFF)}.layer-icon{width:18px;text-align:center;font-size:12px;color:var(--pd-text-muted, #909399)}.layer-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pd-text, #303133)}.layer-zone{flex-shrink:0;padding:0 4px;font-size:10px;line-height:14px;color:var(--pd-ink-green, #67c23a);background:#67c23a1a;border-radius:3px}.layer-zindex{font-size:10px;color:var(--pd-text-muted, #909399);font-variant-numeric:tabular-nums}.layer-actions{display:flex;gap:4px;margin-top:8px}.field-tree-panel{padding:0}.panel-title{font-size:11px;color:var(--pd-text-muted);text-transform:uppercase;letter-spacing:.5px;padding:4px 0 8px;margin-bottom:8px;border-bottom:1px solid var(--pd-border)}.search-input{margin-bottom:8px}.tree-container{overflow-y:auto;min-height:0}.field-group-header{display:flex;align-items:center;gap:4px;padding:5px 8px;border-radius:4px;font-size:13px;color:var(--pd-text, #303133);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .1s}.field-group-header:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.field-group-header.is-list{color:var(--pd-accent, #165DFF);font-weight:500}.expand-icon{width:12px;font-size:8px;flex-shrink:0;color:var(--pd-text-muted, #909399)}.field-row{display:flex;align-items:center;gap:4px;padding:5px 8px;border-radius:4px;font-size:13px;color:var(--pd-text, #303133);cursor:grab;-webkit-user-select:none;user-select:none;transition:background .1s}.field-row:hover{background:var(--pd-sidebar-hover, #f0f2f5)}.node-icon{font-size:14px;flex-shrink:0;filter:saturate(.6);opacity:.9}.node-meta{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;column-gap:4px;row-gap:1px}.node-label{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-key{flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--pd-text-muted, #909399)}.group-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.copy-hint{flex-shrink:0;margin-left:auto;font-size:11px;color:var(--pd-accent, #165DFF);white-space:nowrap}.left-panel{width:224px;min-width:224px;background:var(--pd-sidebar, #ffffff);border-right:1px solid var(--pd-border-soft, #e9ecf2);display:flex;flex-direction:column;overflow:hidden;transition:width .18s ease}.left-panel.collapsed{width:36px;min-width:36px;border-right:1px solid var(--pd-border-soft, #e9ecf2)}.left-collapsed{display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:12px;flex:1}.lc-btn{width:26px;height:26px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .14s ease}.lc-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.lc-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.left-head{display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 12px;flex-shrink:0;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.left-title{font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:1.2px;display:inline-flex;align-items:center;gap:7px}.left-title:before{content:"";width:3px;height:12px;border-radius:2px;background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF))}.left-tabs{flex:1;display:flex;flex-direction:column;overflow:hidden}.left-tabs .pd-tab-pane{flex:1;min-height:0;overflow-y:auto;padding:12px}.panel-title{font-size:11px;color:var(--pd-text-muted, #8b909c);letter-spacing:.6px;padding:2px 2px 8px;margin-bottom:10px;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.material-card{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:7px;border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;background:var(--pd-field-bg, #f4f6fa);cursor:grab;-webkit-user-select:none;user-select:none;transition:border-color .14s ease,background .14s ease,transform .14s ease,box-shadow .14s ease}.material-card:hover{border-color:#165dff73;background:var(--pd-surface, #ffffff);transform:translateY(-1px);box-shadow:var(--pd-shadow-sm, 0 1px 2px rgba(23, 32, 60, .05))}.material-card:active{cursor:grabbing;transform:translateY(0)}.material-icon{width:30px;height:24px;border:1px dashed var(--pd-border, #d9dde6);border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:11px;color:var(--pd-accent, #165DFF);background:var(--pd-surface, #ffffff);flex-shrink:0;transition:border-color .14s ease,background .14s ease}.material-card:hover .material-icon{border-style:solid;border-color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.material-label{font-size:12.5px;color:var(--pd-text, #2a2e37)}.print-image{width:100%;height:100%;overflow:hidden}.print-image img{width:100%;height:100%;display:block}.table-ctx-menu{position:fixed;z-index:3000;min-width:140px;padding:4px 0;background:var(--pd-surface, #fff);border:1px solid var(--pd-menu-border, #dcdfe6);border-radius:4px;box-shadow:0 2px 12px #00000026;font-size:13px}.menu-item{padding:5px 14px;cursor:pointer;color:var(--pd-menu-text, #333)}.menu-item:hover{background:var(--pd-menu-hover, #f5f7fa)}.menu-item.disabled{color:var(--pd-menu-disabled, #c0c4cc);cursor:not-allowed}.menu-item.active{color:var(--pd-accent, #165DFF)}.menu-divider{height:1px;margin:4px 0;background:var(--pd-menu-divider, #ebeef5)}.menu-group-title{padding:4px 14px;font-size:12px;color:var(--pd-menu-muted, #909399)}.cell-barcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.cell-barcode svg{max-width:100%;max-height:100%}.cell-barcode img{max-width:100%;max-height:100%}.cell-barcode-fallback{font-style:italic;opacity:.6}.cell-image{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.cell-image img{max-width:100%;max-height:100%;display:block}.image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#bbb;font-size:12px;border:1px dashed #ddd;box-sizing:border-box}.print-table{position:relative;width:100%;height:100%}.print-table table{border-collapse:collapse;table-layout:fixed;width:100%}.print-table td{box-sizing:border-box;word-break:normal;overflow-wrap:break-word}.cell-selected{outline:2px solid #165DFF;outline-offset:-2px;background-color:#165dff14}.row-data-bg{background-image:repeating-linear-gradient(45deg,rgba(22,93,255,.04) 0 6px,transparent 6px 12px)}.data-placeholder{color:#909399;font-style:italic}.row-badges{position:absolute;left:-16px;top:0;width:14px}.row-badge{position:absolute;width:14px;display:flex;align-items:center;justify-content:center;font-size:10px;color:#909399;background:#f5f7fa;border-radius:2px}.col-resize-layer{position:absolute;inset:0;pointer-events:none;z-index:3}.col-resize-handle{position:absolute;top:0;bottom:0;width:6px;transform:translate(-50%);cursor:col-resize;pointer-events:auto}.col-resize-handle:after{content:"";position:absolute;top:0;bottom:0;left:50%;border-left:1px solid transparent}.col-resize-handle:hover:after,.col-resize-handle.dragging:after{border-left-color:var(--pd-accent, #165DFF)}.print-barcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.print-barcode svg{max-width:100%;max-height:100%}.print-qrcode{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.print-qrcode img{max-width:100%;max-height:100%}.print-html,.page-number-element{width:100%;height:100%;overflow:hidden}.print-element{box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none}.print-element.design-mode{outline:1px dashed #C3C9D6}.print-element.design-mode.zone-header,.print-element.design-mode.zone-footer{outline:1px dashed var(--pd-ink-green, #67c23a)}.print-element.selected{outline:1.5px solid var(--pd-accent, #165DFF);background:#165dff0a}.print-element.previewed{outline:1.5px solid rgba(22,93,255,.5);background:#165dff1a}.print-element.design-mode:hover{outline:1px dashed var(--pd-accent, #165DFF)}.print-element.locked{cursor:not-allowed}.print-element.locked:not(.selected){outline:1.5px dashed #999}.print-element.hidden{opacity:.3;pointer-events:none}.print-element.drag-ghost{opacity:.4}.drag-preview{position:absolute;inset:0;border:2px dashed var(--pd-accent, #165DFF);pointer-events:none;z-index:1000;box-sizing:border-box}.selected-indicator{position:absolute;top:-18px;left:0;font-size:10px;white-space:nowrap;pointer-events:none;z-index:20}.position-label{background:var(--pd-accent, #165DFF);color:#fff;padding:1px 6px;border-radius:3px;font-family:ui-monospace,SF Mono,Menlo,monospace;font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:0;box-shadow:0 2px 6px #00000026}.resize-handles{position:absolute;inset:0;pointer-events:none}.resize-handle{position:absolute;width:7px;height:7px;background:var(--pd-handle, #165DFF);border:1.5px solid #fff;border-radius:2px;box-sizing:border-box;transform:translate(-50%,-50%);box-shadow:0 1px 3px #0000002e;z-index:10;pointer-events:auto}.handle-nw{top:0;left:0;cursor:nw-resize}.handle-n{top:0;left:50%;cursor:n-resize}.handle-ne{top:0;left:100%;cursor:ne-resize}.handle-e{top:50%;left:100%;cursor:e-resize}.handle-se{top:100%;left:100%;cursor:se-resize}.handle-s{top:100%;left:50%;cursor:s-resize}.handle-sw{top:100%;left:0;cursor:sw-resize}.handle-w{top:50%;left:0;cursor:w-resize}.paper-wrapper{display:block}.hiprint-printPaper{transition:transform .15s ease-out}.zone-layer{box-sizing:border-box}.zone-layer.zone-header.design-mode,.zone-layer.zone-footer.design-mode{outline:1px dashed var(--pd-ink-green, #67c23a);background:#67c23a0a}.zone-layer.zone-content.design-mode{outline:1px dashed #C3C9D6}.zone-label{position:absolute;top:2px;right:4px;font-size:9px;color:#909399;pointer-events:none;-webkit-user-select:none;user-select:none}.zone-resize-handle{position:absolute;left:0;width:100%;height:6px;cursor:ns-resize;z-index:5}.zone-resize-handle.handle-bottom{bottom:-3px}.zone-resize-handle.handle-top{top:-3px}.zone-resize-handle:hover{background:#10b98140}.zone-height-tip{position:absolute;right:4px;top:-22px;padding:1px 6px;font-size:11px;color:#fff;background:#10b981;border-radius:3px;white-space:nowrap;pointer-events:none}.design-background{position:absolute;z-index:0;overflow:hidden;pointer-events:none}.design-background img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.grid-bg{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0}.snap-indicator{position:absolute;width:6px;height:6px;background:var(--pd-accent, #165DFF);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:10;animation:snap-pulse-3160f418 .3s ease-out}@keyframes snap-pulse-3160f418{0%{transform:translate(-50%,-50%) scale(2);opacity:.5}to{transform:translate(-50%,-50%) scale(1);opacity:0}}.watermark-layer{position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;overflow:hidden;pointer-events:none}.watermark-tile{position:absolute;pointer-events:none}.adsorb-guide{position:absolute;pointer-events:none;z-index:9999}.adsorb-guide.guide-vertical{border-left:1px dashed var(--pd-accent-secondary, #f56c6c)}.adsorb-guide.guide-horizontal{border-top:1px dashed var(--pd-accent-secondary, #f56c6c)}.manual-guide{position:absolute;pointer-events:auto;z-index:9998;cursor:move}.manual-guide.guide-vertical{border-left:1px solid #3B82F6;width:0}.manual-guide.guide-horizontal{border-top:1px solid #3B82F6;height:0}.manual-guide:before{content:"";position:absolute;pointer-events:auto}.manual-guide.guide-vertical:before{top:0;bottom:0;left:50%;width:var(--guide-hit, 8px);transform:translate(-50%)}.manual-guide.guide-horizontal:before{left:0;right:0;top:50%;height:var(--guide-hit, 8px);transform:translateY(-50%)}.manual-guide:hover{border-color:#ef4444!important}.pd-ruler{position:absolute;display:block;pointer-events:auto;cursor:crosshair;z-index:1;background:var(--pd-ruler-bg, #f8f9fc)}.pd-ruler.is-horizontal{box-shadow:0 1px 0 var(--pd-border-soft, #e9ecf2)}.pd-ruler.is-vertical{box-shadow:1px 0 0 var(--pd-border-soft, #e9ecf2)}.canvas-area{flex:1;overflow-x:scroll;overflow-y:auto;scrollbar-gutter:stable;display:flex;background-color:var(--pd-canvas-bg, #e6e9f0);background-image:radial-gradient(circle,rgba(23,32,60,.13) 1px,transparent 1.2px);background-size:20px 20px;background-position:center;padding:44px 28px 32px 44px;position:relative}.canvas-scroll{display:flex;flex-direction:column;align-items:center;gap:20px;position:relative;flex:none;margin:auto;width:fit-content}.marquee-selection{position:fixed;border:1.5px solid rgba(22,93,255,.7);background:#165dff14;border-radius:2px;pointer-events:none;z-index:10000}.drop-hint{position:fixed;z-index:10002;pointer-events:none;padding:2px 8px;border-radius:10px;background:var(--pd-accent, #165dff);color:#fff;font-size:12px;line-height:18px;white-space:nowrap;box-shadow:0 2px 8px #0000002e}.context-menu{position:fixed;background:var(--pd-surface, #ffffff);border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;box-shadow:var(--pd-shadow-md, 0 10px 28px rgba(23, 32, 60, .12));padding:5px;z-index:10001;min-width:132px}.context-menu-item{padding:7px 12px;border-radius:5px;font-size:12.5px;cursor:pointer;color:var(--pd-text, #2a2e37);-webkit-user-select:none;user-select:none;transition:background .12s ease,color .12s ease}.context-menu-item:hover{background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF)}.context-menu-item.disabled{color:var(--pd-text-faint, #b4b9c4);cursor:not-allowed}.context-menu-item.disabled:hover{background:transparent;color:var(--pd-text-faint, #b4b9c4)}.context-menu-sep{height:1px;background:var(--pd-border-soft, #e9ecf2);margin:5px 8px}.ruler-overlay{position:absolute;inset:0;pointer-events:none;z-index:60}.ruler-corner{position:absolute;top:0;left:0;width:22px;height:22px;background:var(--pd-ruler-bg, #f8f9fc);box-shadow:1px 1px 0 var(--pd-border-soft, #e9ecf2);z-index:2}.ruler-overlay .pd-ruler.is-horizontal{top:0;left:22px}.ruler-overlay .pd-ruler.is-vertical{top:22px;left:0}.ruler-guide-preview{position:fixed;pointer-events:none;z-index:9997}.ruler-guide-preview.guide-vertical{width:0;border-left:1px dashed var(--pd-accent, #165dff)}.ruler-guide-preview.guide-horizontal{height:0;border-top:1px dashed var(--pd-accent, #165dff)}.property-search{padding:0 0 10px;background:transparent}.property-group{border:1px solid var(--pd-border-soft, #e9ecf2);border-radius:8px;margin-bottom:10px;background:var(--pd-surface, #ffffff);overflow:hidden;transition:border-color .14s ease,box-shadow .14s ease}.property-group:last-child{margin-bottom:2px}.property-group.is-expanded{border-color:var(--pd-border-soft, #e9ecf2)}.group-header{display:flex;align-items:center;padding:9px 12px;cursor:pointer;-webkit-user-select:none;user-select:none;background:var(--pd-field-bg, #f4f6fa);transition:background .14s ease}.group-header:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.property-group.is-expanded .group-header{border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.group-icon{margin-right:8px;color:var(--pd-accent, #165DFF)}.group-title{flex:1;font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:.3px}.expand-icon{color:var(--pd-text-muted, #8b909c);font-size:10px}.group-content{padding:10px 12px 12px;background:var(--pd-surface, #ffffff)}.position-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pd-crop-note{margin:0 0 8px;font-size:12px;line-height:1.5;color:var(--pd-text-faint, #6b7280)}.pd-crop-preview{position:relative;overflow:hidden;margin-bottom:8px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;line-height:0;width:fit-content;max-width:100%}.pd-crop-thumb{max-width:100%;max-height:96px;display:block}.pd-crop-win{position:absolute;border:1px solid #ff5a5a;box-shadow:0 0 0 999px #0000008c;pointer-events:none}.color-row{display:flex;gap:12px}.color-row>.pd-field{flex:1 1 0;min-width:0}.pd-rotate-row{display:flex;align-items:stretch;width:100%}.pd-rotate-btn{width:26px;flex-shrink:0;border:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);color:var(--pd-text, #2a2e37);font-size:14px;line-height:1;cursor:pointer;transition:background .14s ease,border-color .14s ease}.pd-rotate-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9);border-color:var(--pd-text-faint, #b4b9c4)}.pd-rotate-btn:first-child{border-radius:6px 0 0 6px;border-right:none}.pd-rotate-btn:last-child{border-radius:0 6px 6px 0;border-left:none}.pd-rotate-stepper{flex:1;min-width:0}.pd-rotate-stepper .pd-step-minus,.pd-rotate-stepper .pd-step-plus{display:none}.pd-rotate-stepper .pd-step-input.pd-input{border-radius:0}.expression-editor{display:flex;height:450px;gap:0}.ee-nav{width:100px;background:var(--pd-sidebar);border-right:1px solid var(--pd-border);display:flex;flex-direction:column;flex-shrink:0}.ee-nav-title{padding:10px;border-bottom:1px solid var(--pd-border);font-weight:600;font-size:13px;color:var(--pd-text);text-align:center}.ee-nav-tabs{flex:1;display:flex;flex-direction:column;padding:6px;gap:4px}.ee-nav-tab{padding:8px 10px;border-radius:6px;cursor:pointer;font-size:12px;text-align:center;transition:all .2s}.ee-nav-tab.active{background:var(--pd-accent);color:#fff}.ee-nav-tab:not(.active){background:var(--pd-surface, white);border:1px solid var(--pd-border);color:var(--pd-text)}.ee-nav-tab:hover:not(.active){background:var(--pd-hover-tint, #ecf5ff);border-color:var(--pd-accent)}.ee-content{width:300px;display:flex;flex-direction:column;border-right:1px solid var(--pd-border);flex-shrink:0}.ee-content-search{padding:10px;border-bottom:1px solid var(--pd-border)}.ee-content-list{flex:1;padding:8px;overflow-y:auto;min-height:0}.ee-func-group{margin-bottom:12px}.ee-func-group-title{font-size:11px;font-weight:600;color:var(--pd-text-muted);padding:6px 10px;margin-bottom:2px;letter-spacing:.5px}.ee-field-group{display:flex;align-items:center;gap:4px;padding:6px 10px;font-size:12px;font-weight:600;color:var(--pd-text)}.ee-field-group.is-list{color:var(--pd-accent, #165DFF)}.ee-field-group-icon{font-size:13px;filter:saturate(.6)}.ee-list-item{padding:7px 10px;cursor:pointer;border-radius:4px;margin-bottom:2px;transition:background .15s}.ee-field-info{display:flex;flex-direction:column;gap:1px}.ee-field-info .ee-item-label{font-size:12px;color:var(--pd-text)}.ee-field-info .ee-item-key{font-size:10px;color:var(--pd-text-muted);font-family:monospace}.ee-field-item{display:flex;align-items:center;gap:6px}.ee-field-item .ee-field-info{flex:1;min-width:0}.ee-copy-btn{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--pd-text-muted);cursor:pointer;transition:color .15s,background .15s,border-color .15s}.ee-copy-btn:hover{background:var(--pd-surface, white);border-color:var(--pd-border);color:var(--pd-accent)}.ee-copy-btn.is-copied{color:var(--pd-success, #16a34a)}.ee-list-item:hover{background:var(--pd-hover-tint, #ecf5ff)}.ee-editor{flex:1;display:flex;flex-direction:column;background:var(--pd-sidebar);min-width:0}.ee-editor-section{padding:12px;border-bottom:1px solid var(--pd-border)}.ee-editor-title{font-size:11px;color:var(--pd-text-muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.ee-textarea{width:100%;border:1px solid var(--pd-border);border-radius:6px;padding:10px;font-family:monospace;font-size:13px;resize:vertical;box-sizing:border-box;min-height:100px}.ee-textarea:focus{outline:none;border-color:var(--pd-accent)}.ee-preview{padding:10px;background:var(--pd-bg);border:1px solid var(--pd-border);border-radius:6px;min-height:30px;font-size:13px;color:var(--pd-text);line-height:1.6;white-space:pre-wrap}.ee-preview-error{color:var(--pd-danger, #e53e3e);background:var(--pd-danger-bg, #fef2f2);border-color:var(--pd-danger-border, #fecaca)}.ee-help-section{flex:1;padding:12px;overflow-y:auto;min-height:0}.ee-help-title{font-size:11px;color:var(--pd-text-muted);margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.ee-help-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ee-help-card{border-radius:6px;padding:10px}.ee-help-card-title{font-size:12px;font-weight:600;margin-bottom:4px}.ee-help-card-content{font-size:11px;line-height:1.5;color:var(--pd-text)}.ee-help-field{background:var(--pd-help-field-bg, #f0f9ff);border:1px solid var(--pd-help-field-line, #bae6fd)}.ee-help-field .ee-help-card-title{color:var(--pd-help-field-ink, #0369a1)}.ee-help-function{background:var(--pd-help-function-bg, #f0fdf4);border:1px solid var(--pd-help-function-line, #bbf7d0)}.ee-help-function .ee-help-card-title{color:var(--pd-help-function-ink, #166534)}.ee-help-variable{background:var(--pd-help-variable-bg, #fefce8);border:1px solid var(--pd-help-variable-line, #fde68a)}.ee-help-variable .ee-help-card-title{color:var(--pd-help-variable-ink, #854d0e)}.ee-help-conditional{background:var(--pd-help-conditional-bg, #fdf2f8);border:1px solid var(--pd-help-conditional-line, #fbcfe8)}.ee-help-conditional .ee-help-card-title{color:var(--pd-help-conditional-ink, #9d174d)}.expression-editor{max-height:min(600px,80vh);overflow-y:auto;padding:16px}.col-width-row{display:flex;align-items:center;gap:8px;margin-bottom:4px;width:100%}.border-row{display:flex;gap:10px}.border-row .pd-field{flex:1;min-width:0}.advanced-row{display:flex;gap:16px}.image-content-upload{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:4px}.upload-tip{margin:0;font-size:11px;color:var(--pd-text-muted, #909399)}.cell-style-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.cell-font-field{grid-column:1 / -1;padding-bottom:8px}.border-style-row{display:flex;gap:6px;margin-bottom:8px}.border-presets{margin-bottom:8px}.merge-btns{margin-top:8px;display:flex;gap:8px}.watermark-config{padding:0 4px}.pd-hint{margin-left:8px;font-size:12px;color:#909399;min-width:32px}.design-background-config{padding:0 4px}.design-background-tip{margin:2px 0 6px;font-size:11px;line-height:1.4;color:var(--pd-text-muted, #909399)}.design-background-path{margin-bottom:6px;padding:4px 6px;font-size:11px;color:var(--pd-text-regular, #606266);background:var(--pd-fill-light, #f5f7fa);border-radius:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.design-background-actions{display:flex;gap:6px}.upload-label{cursor:pointer}.upload-label.disabled{opacity:.6;cursor:not-allowed}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.tiling-config{padding:0 4px}.tiling-switch{display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}.tiling-error{color:#f56c6c}.tiling-summary{color:var(--pd-text-regular, #606266)}.property-panel{width:280px;min-width:280px;background:var(--pd-sidebar, #ffffff);border-left:1px solid var(--pd-border-soft, #e9ecf2);display:flex;flex-direction:column;overflow:hidden;transition:width .18s ease}.property-panel.collapsed{width:36px;min-width:36px;border-left:1px solid var(--pd-border-soft, #e9ecf2)}.prop-collapsed{display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:12px;flex:1}.pc-btn{width:26px;height:26px;border-radius:6px;border:1px solid transparent;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .14s ease}.pc-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.pc-btn.on{color:var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.prop-head{display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 12px;flex-shrink:0;border-bottom:1px solid var(--pd-border-soft, #e9ecf2)}.prop-title{font-size:12px;font-weight:600;color:var(--pd-text, #2a2e37);letter-spacing:1.2px;display:inline-flex;align-items:center;gap:7px}.prop-title:before{content:"";width:3px;height:12px;border-radius:2px;background:linear-gradient(180deg,var(--pd-accent-2, #3D7BFF),var(--pd-accent, #165DFF))}.collapse-btn{border:none;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:14px;cursor:pointer;width:24px;height:24px;border-radius:5px;transition:all .14s ease}.collapse-btn:hover{color:var(--pd-text, #2a2e37);background:var(--pd-sidebar-hover, #f0f3f9)}.prop-tabs{flex:1;display:flex;flex-direction:column;overflow:hidden}.prop-tabs .pd-tab-pane{flex:1;min-height:0;overflow-y:auto;padding:12px}.property-content{padding:0}.margin-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.custom-size-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px;width:100%}.custom-size-x{color:var(--pd-text-muted, #8b909c);font-size:12px}.pd-hint{margin:2px 0 6px;color:var(--pd-text-muted, #8b909c);font-size:12px;line-height:1.4}.page-bg-row{display:flex;align-items:center;gap:8px}.page-bg-picker{flex:1;min-width:0}.status-bar{position:relative;display:flex;align-items:center;gap:20px;height:30px;padding:0 16px;background:var(--pd-surface, #ffffff);border-top:1px solid var(--pd-border-soft, #e9ecf2);box-shadow:0 -1px 2px #17203c08;font-size:11.5px;color:var(--pd-text-muted, #8b909c);-webkit-user-select:none;user-select:none;flex-shrink:0}.status-item{white-space:nowrap;font-variant-numeric:tabular-nums;display:inline-flex;align-items:center}.coord{font-variant-numeric:tabular-nums;color:var(--pd-text, #2a2e37)}.status-paper{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--pd-accent, #165DFF);font-weight:600}.status-dirty{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:var(--pd-text-muted, #8b909c)}.status-dirty.on{color:var(--pd-accent-secondary, #f56c6c)}.dirty-dot{width:7px;height:7px;border-radius:50%;background:var(--pd-ink-green, #67c23a)}.status-dirty.on .dirty-dot{background:var(--pd-accent-secondary, #f56c6c);box-shadow:0 0 0 3px #f56c6c24;animation:dirty-pulse-a91952ff 1.6s ease-in-out infinite}@keyframes dirty-pulse-a91952ff{0%,to{box-shadow:0 0 0 2px #f56c6c1f}50%{box-shadow:0 0 0 4px #f56c6c0d}}@media(prefers-reduced-motion:reduce){.status-dirty.on .dirty-dot{animation:none}}.help-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.help-modal{width:800px;max-width:90vw;height:600px;max-height:85vh;background:var(--pd-surface, #ffffff);border-radius:8px;box-shadow:0 4px 24px #00000026;display:flex;flex-direction:column;overflow:hidden}.help-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--pd-border, #d9dde6)}.help-modal-title{margin:0;font-size:16px;font-weight:600;color:var(--pd-text, #2a2e37)}.help-modal-title-wrap{display:flex;align-items:center;gap:10px}.help-modal-project{padding:2px 8px;border-radius:4px;background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF);font-size:12px;font-weight:500}.help-modal-close{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;color:var(--pd-text-muted, #8b909c);font-size:20px;cursor:pointer;transition:all .15s}.help-modal-close:hover{background:var(--pd-sidebar-hover, #f0f3f9);color:var(--pd-text, #2a2e37)}.help-modal-body{flex:1;display:flex;overflow:hidden}.help-modal-sidebar{width:160px;padding:12px;border-right:1px solid var(--pd-border, #d9dde6);background:var(--pd-field-bg, #f4f6fa);overflow-y:auto}.help-tab{display:block;width:100%;padding:10px 12px;margin-bottom:4px;border:none;border-radius:4px;background:transparent;color:var(--pd-text, #2a2e37);font-size:13px;text-align:left;cursor:pointer;transition:all .15s}.help-tab:hover{background:var(--pd-sidebar-hover, #f0f3f9)}.help-tab.active{background:var(--pd-accent-soft, rgba(22, 93, 255, .09));color:var(--pd-accent, #165DFF);font-weight:500}.help-modal-content{flex:1;padding:20px;overflow-y:auto}.help-content{font-size:14px;line-height:1.6;color:var(--pd-text, #2a2e37)}.help-content h2{margin:0 0 16px;padding-bottom:8px;border-bottom:1px solid var(--pd-border-soft, #e9ecf2);font-size:18px;font-weight:600}.help-content h3{margin:20px 0 12px;font-size:15px;font-weight:600}.help-content p{margin:0 0 12px}.help-content ul,.help-content ol{margin:0 0 12px;padding-left:24px}.help-content li{margin-bottom:4px}.help-content code{padding:2px 6px;border-radius:3px;background:var(--pd-field-bg, #f4f6fa);font-family:SF Mono,Monaco,monospace;font-size:13px}.help-content pre{margin:0 0 12px;padding:12px;border-radius:4px;background:var(--pd-field-bg, #f4f6fa);overflow-x:auto}.help-content pre code{padding:0;background:transparent}.help-content table{width:100%;margin:0 0 12px;border-collapse:collapse}.help-content th,.help-content td{padding:8px 12px;border:1px solid var(--pd-border, #d9dde6);text-align:left}.help-content th{background:var(--pd-field-bg, #f4f6fa);font-weight:600}.help-content blockquote{margin:0 0 12px;padding:12px 16px;border-left:3px solid var(--pd-accent, #165DFF);background:var(--pd-accent-soft, rgba(22, 93, 255, .09))}.help-modal-enter-active,.help-modal-leave-active{transition:opacity .2s ease}.help-modal-enter-active .help-modal,.help-modal-leave-active .help-modal{transition:transform .2s ease}.help-modal-enter-from,.help-modal-leave-to{opacity:0}.help-modal-enter-from .help-modal,.help-modal-leave-to .help-modal{transform:scale(.95)}.page-tabs{display:flex;align-items:center;gap:8px;padding:4px 12px;background:var(--pd-sidebar, #fff);border-bottom:1px solid var(--pd-border, #d9dde6);flex-shrink:0}.page-tabs-list{display:flex;gap:4px;overflow-x:auto;align-items:center}.page-tab{padding:4px 12px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;background:transparent;cursor:pointer;white-space:nowrap;color:var(--pd-text, #2a2e37);font-size:12px}.page-tab.active{background:var(--pd-accent, #165DFF);color:#fff}.page-tab-rename{padding:4px 8px;width:96px;border:1px solid var(--pd-accent, #165DFF);border-radius:4px;font-size:12px;color:var(--pd-text, #2a2e37);outline:none}.page-tabs-actions{display:flex;gap:4px;margin-left:auto}.page-tabs-actions button{padding:4px 8px;border:1px solid var(--pd-border, #d9dde6);border-radius:4px;background:transparent;cursor:pointer;color:var(--pd-text-muted, #8b909c);font-size:12px;line-height:1}.page-tabs-actions button:disabled{opacity:.4;cursor:not-allowed}.designer-container{--pd-bg: #f3f5f9;--pd-surface: #ffffff;--pd-field-bg: #f4f6fa;--pd-sidebar: #ffffff;--pd-sidebar-hover: #f0f3f9;--pd-canvas-bg: #e6e9f0;--pd-paper: #FFFFFF;--pd-accent: #165DFF;--pd-accent-2: #3D7BFF;--pd-accent-soft: rgba(22, 93, 255, .09);--pd-accent-secondary: #f56c6c;--pd-danger-soft: rgba(245, 108, 108, .1);--pd-ink-green: #67c23a;--pd-text: #2a2e37;--pd-text-muted: #8b909c;--pd-text-faint: #b4b9c4;--pd-border: #d9dde6;--pd-border-soft: #e9ecf2;--pd-input-bg: #ffffff;--pd-hover-tint: #ecf5ff;--pd-danger: #e53e3e;--pd-danger-bg: #fef2f2;--pd-danger-border: #fecaca;--pd-menu-text: #333;--pd-menu-hover: #f5f7fa;--pd-menu-border: #dcdfe6;--pd-menu-divider: #ebeef5;--pd-menu-muted: #909399;--pd-menu-disabled: #c0c4cc;--pd-scrollbar: rgba(23, 32, 60, .18);--pd-scrollbar-thumb: rgba(23, 32, 60, .16);--pd-scrollbar-thumb-hover: rgba(23, 32, 60, .3);--pd-help-field-bg: #f0f9ff;--pd-help-field-line: #bae6fd;--pd-help-field-ink: #0369a1;--pd-help-function-bg: #f0fdf4;--pd-help-function-line: #bbf7d0;--pd-help-function-ink: #166534;--pd-help-variable-bg: #fefce8;--pd-help-variable-line: #fde68a;--pd-help-variable-ink: #854d0e;--pd-help-conditional-bg: #fdf2f8;--pd-help-conditional-line: #fbcfe8;--pd-help-conditional-ink: #9d174d;--pd-handle: #165DFF;--pd-ruler: #9aa1af;--pd-ruler-bg: #f8f9fc;--pd-ruler-cursor: #165DFF;--pd-radius: 6px;--pd-shadow-sm: 0 1px 2px rgba(23, 32, 60, .05);--pd-shadow-md: 0 2px 8px rgba(23, 32, 60, .06), 0 10px 28px rgba(23, 32, 60, .07);--pd-shadow-paper: 0 0 0 1px rgba(23, 32, 60, .05), 0 1px 2px rgba(23, 32, 60, .06), 0 8px 20px rgba(23, 32, 60, .08), 0 26px 60px rgba(23, 32, 60, .15);height:100%;display:flex;flex-direction:column;background:var(--pd-bg)}.designer-body{flex:1;display:flex;overflow:hidden}.designer-container.format-painting .canvas-area,.designer-container.format-painting .canvas-area *{cursor:copy!important}.print-html-preview{width:100%;height:100%;position:relative;background:#e9ebee}.print-html-preview-iframe{width:100%;height:100%;border:0;background:#fff}.print-html-preview-loading,.print-html-preview-error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#909399;font-size:14px}.print-html-preview-error{color:#f56c6c}.print-html-preview-warn{position:absolute;top:8px;left:12px;z-index:2;max-width:62%;padding:4px 8px;border:1px solid #e6a23c;border-radius:4px;background:#faecd1f0;color:#b88230;font-size:12px;line-height:1.5}.print-html-preview-zoom{position:absolute;top:8px;right:12px;z-index:2;display:flex;align-items:center;gap:4px;padding:3px 4px;border:1px solid var(--pd-border-soft, #ebeef5);border-radius:6px;background:#ffffffeb;box-shadow:0 1px 4px #00000014}.print-html-preview-zoom-btn{padding:2px 7px;border:0;border-radius:4px;background:transparent;color:var(--pd-text-muted, #909399);font-size:11px;line-height:18px;cursor:pointer;transition:color .14s ease,background .14s ease}.print-html-preview-zoom-btn:hover{background:var(--pd-sidebar-hover, #f0f3f9);color:var(--pd-text, #2a2e37)}.print-html-preview-zoom-btn.active{background:var(--pd-accent, #165DFF);color:#fff;font-weight:600}.print-html-preview-zoom-note{padding-right:4px;color:var(--pd-text-muted, #909399);font-size:11px}.print-html-preview-zoom-hint{color:#b88230;font-size:11px}.tiling-config .margin-grid,.tiling-config .custom-size-grid{display:block;grid-template-columns:none;gap:normal}.tiling-config .custom-size-x{display:inline;min-width:0;color:inherit}.pd-hint{min-width:auto}.watermark-config .pd-hint{min-width:32px;margin-left:8px;color:#909399}.tiling-config .tiling-error{color:#f56c6c}.tiling-config .tiling-summary{color:var(--pd-text-regular, #606266)}.pd-help{position:static}.pd-help:after{top:calc(100% + 6px);bottom:auto;left:0;transform:none;padding:5px 7px;white-space:normal;z-index:120}.page-tabs [data-tip]:after,.field-tree-panel [data-tip]:after{content:none}', co = 20, vp = ".page-tabs, .field-tree-panel, .pd-dialog-overlay", yp = /* @__PURE__ */ new Set(["z", "y", "a", "c", "x", "v", "d", "g", "1", "l", "r", "e", "t", "b", "0"]), wp = {
|
|
6824
6860
|
text: "formatter",
|
|
6825
6861
|
longText: "formatter",
|
|
6826
6862
|
// 流式列表:单元模板就是 options.formatter(列表路径写在模板里),双击任意位置都落在这个元素框上
|
|
@@ -6842,7 +6878,7 @@ function nr(o, e) {
|
|
|
6842
6878
|
} catch {
|
|
6843
6879
|
}
|
|
6844
6880
|
}
|
|
6845
|
-
class
|
|
6881
|
+
class qe extends HTMLElement {
|
|
6846
6882
|
root;
|
|
6847
6883
|
store;
|
|
6848
6884
|
format;
|
|
@@ -6861,6 +6897,7 @@ class Ge extends HTMLElement {
|
|
|
6861
6897
|
/** 接管全局快捷键的实例(同页多设计器时最后一个交互者),见 bindKeys */
|
|
6862
6898
|
static active = null;
|
|
6863
6899
|
docKeydown = null;
|
|
6900
|
+
docDragend = null;
|
|
6864
6901
|
ro = null;
|
|
6865
6902
|
roArea = null;
|
|
6866
6903
|
/** 工具栏收纳的尺寸驱动源:容器宽度变化不触发重绘,需观察器重跑后置遍 */
|
|
@@ -6904,7 +6941,7 @@ class Ge extends HTMLElement {
|
|
|
6904
6941
|
constructor() {
|
|
6905
6942
|
super(), this.root = this.attachShadow({ mode: "open" });
|
|
6906
6943
|
const e = document.createElement("style");
|
|
6907
|
-
e.textContent =
|
|
6944
|
+
e.textContent = xp, this.root.appendChild(e), me(a("div", { class: "designer-container", dataset: { test: "designer-container" } }), this.root);
|
|
6908
6945
|
}
|
|
6909
6946
|
set template(e) {
|
|
6910
6947
|
this.applyTemplate(e);
|
|
@@ -6956,7 +6993,7 @@ class Ge extends HTMLElement {
|
|
|
6956
6993
|
e.initialFields = JSON.parse(i);
|
|
6957
6994
|
} catch {
|
|
6958
6995
|
}
|
|
6959
|
-
this.store = new
|
|
6996
|
+
this.store = new Vs(e), this.format = new Js(this.store), this.store.onSelectionChanged = () => this.format.painterSyncSelection(), this.readChrome(), this.unsub = this.store.subscribe(() => this.repaint()), this.bindPointer(), this.bindKeys(), this.attachDocKeys(), this.applyFontFace(), this.repaint(), requestAnimationFrame(() => this.measureRuler());
|
|
6960
6997
|
}
|
|
6961
6998
|
/** 面板折叠态:与 canvas 的 useStudioChrome 共用 localStorage 键,同一浏览器里两边偏好互通 */
|
|
6962
6999
|
readChrome() {
|
|
@@ -6967,7 +7004,7 @@ class Ge extends HTMLElement {
|
|
|
6967
7004
|
e !== this.chromeKey && (this.chromeKey = e, nr(tr, this.state.leftCollapsed), nr(or, this.state.propCollapsed));
|
|
6968
7005
|
}
|
|
6969
7006
|
disconnectedCallback() {
|
|
6970
|
-
this.unsub?.(), this.unsub = null, this.detachDocKeys(), this.ro?.disconnect(), this.ro = null, this.roArea = null, this.toolbarRo?.disconnect(), this.toolbarRo = null,
|
|
7007
|
+
this.unsub?.(), this.unsub = null, this.detachDocKeys(), this.ro?.disconnect(), this.ro = null, this.roArea = null, this.toolbarRo?.disconnect(), this.toolbarRo = null, qe.active === this && (qe.active = null), Xr(), this.unmountHelp?.(), this.unmountHelp = null, this.hideHoverTip(), this.snapTimer && (clearTimeout(this.snapTimer), this.snapTimer = null);
|
|
6971
7008
|
}
|
|
6972
7009
|
/**
|
|
6973
7010
|
* 注入 @font-face:既进 shadow root(画布文档内),也进宿主文档 head。
|
|
@@ -6975,7 +7012,7 @@ class Ge extends HTMLElement {
|
|
|
6975
7012
|
* 只挂 shadow 会出现「computed font-family 正确但字形回落」。canvas 本身就注到 document。
|
|
6976
7013
|
*/
|
|
6977
7014
|
applyFontFace() {
|
|
6978
|
-
const e =
|
|
7015
|
+
const e = Bs(this._fonts);
|
|
6979
7016
|
if (!e) {
|
|
6980
7017
|
this.fontFaceStyle?.remove(), this.fontFaceStyle = null, this.docFontFaceStyle?.remove(), this.docFontFaceStyle = null;
|
|
6981
7018
|
return;
|
|
@@ -7012,7 +7049,7 @@ ${t.join(`
|
|
|
7012
7049
|
const i = this.templateJsonWithFonts();
|
|
7013
7050
|
if (Array.isArray(i.pages))
|
|
7014
7051
|
try {
|
|
7015
|
-
|
|
7052
|
+
Hs(i);
|
|
7016
7053
|
} catch (r) {
|
|
7017
7054
|
window.alert(r instanceof Error ? r.message : String(r));
|
|
7018
7055
|
return;
|
|
@@ -7030,7 +7067,7 @@ ${t.join(`
|
|
|
7030
7067
|
* 预估口径:编辑期无实测高,自适应行高按设计盒估算 ⇒ 只提示、不阻断保存。
|
|
7031
7068
|
*/
|
|
7032
7069
|
getGeometryWarnings() {
|
|
7033
|
-
return
|
|
7070
|
+
return Ws(this.store.templateData);
|
|
7034
7071
|
}
|
|
7035
7072
|
applyTemplate(e) {
|
|
7036
7073
|
if (!e) return;
|
|
@@ -7055,7 +7092,7 @@ ${t.join(`
|
|
|
7055
7092
|
if (this.exprMountedFor === this.exprTarget) return;
|
|
7056
7093
|
e.forEach((i) => i.remove());
|
|
7057
7094
|
const t = this.exprTarget;
|
|
7058
|
-
me(
|
|
7095
|
+
me(ip({
|
|
7059
7096
|
fields: this.store.fields,
|
|
7060
7097
|
onClose: () => this.closeExpression(),
|
|
7061
7098
|
onApply: (i) => this.applyExpression(t, i)
|
|
@@ -7074,7 +7111,7 @@ ${t.join(`
|
|
|
7074
7111
|
syncHelp() {
|
|
7075
7112
|
const e = this.helpVisible && this.getAttribute("show-help") !== "false";
|
|
7076
7113
|
if (e && !this.unmountHelp)
|
|
7077
|
-
this.unmountHelp =
|
|
7114
|
+
this.unmountHelp = up(this.root, { onClose: () => this.closeHelp() });
|
|
7078
7115
|
else if (!e && this.unmountHelp) {
|
|
7079
7116
|
const t = this.unmountHelp;
|
|
7080
7117
|
this.unmountHelp = null, t();
|
|
@@ -7102,7 +7139,7 @@ ${t.join(`
|
|
|
7102
7139
|
dblEditElement(e) {
|
|
7103
7140
|
const t = this.store.elements.find((n) => n.id === e);
|
|
7104
7141
|
if (!t || (this.store.selectOne(e), this.state.propTab = "element", t.options.locked)) return;
|
|
7105
|
-
const i =
|
|
7142
|
+
const i = wp[t.printElementType.type];
|
|
7106
7143
|
i && this.openExpression({
|
|
7107
7144
|
elementId: t.id,
|
|
7108
7145
|
targetPath: `options.${i}`,
|
|
@@ -7159,20 +7196,20 @@ ${t.join(`
|
|
|
7159
7196
|
const t = this.root.querySelector(".designer-container");
|
|
7160
7197
|
t.classList.toggle("format-painting", this.format.painterActive), Or(t);
|
|
7161
7198
|
const i = this.ctx;
|
|
7162
|
-
me(
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
]), t), me(
|
|
7167
|
-
const n =
|
|
7168
|
-
n && me(n, t),
|
|
7199
|
+
me(gp(i, rc(i)), t), me(uc(i), t), me(a("div", { class: "designer-body" }, [
|
|
7200
|
+
lc(i),
|
|
7201
|
+
Bd(i, this.canvasUi()),
|
|
7202
|
+
Kc(i)
|
|
7203
|
+
]), t), me(hc(i), t), Qn(t), !this.toolbarRo && typeof ResizeObserver < "u" && (this.toolbarRo = new ResizeObserver(() => Qn(t)), this.toolbarRo.observe(t));
|
|
7204
|
+
const n = md(this.store, (r, s) => this.fire(r, s), this.tableMenu);
|
|
7205
|
+
n && me(n, t), Wl(this.root, this.store.elements), oa(this.root, this.state.propSearch), this.applyShrinkFit(), this.syncRulers(), this.persistChrome();
|
|
7169
7206
|
}
|
|
7170
7207
|
/**
|
|
7171
7208
|
* 自动缩小实测遍:与 canvas 的 useShrinkFit 同一算法(core/browser fitTextNode),
|
|
7172
7209
|
* 让「设计态看到的字号」等于「出纸字号」。覆盖元素级与表格单元格级两类探针节点。
|
|
7173
7210
|
*/
|
|
7174
7211
|
applyShrinkFit() {
|
|
7175
|
-
for (const e of Array.from(this.root.querySelectorAll('[data-fit="shrink"]')))
|
|
7212
|
+
for (const e of Array.from(this.root.querySelectorAll('[data-fit="shrink"]'))) Us(e);
|
|
7176
7213
|
for (const e of Array.from(this.root.querySelectorAll("[data-fit-size]"))) {
|
|
7177
7214
|
if (e.getAttribute("data-fit") === "shrink") continue;
|
|
7178
7215
|
e.removeAttribute("data-fit-size");
|
|
@@ -7206,7 +7243,7 @@ ${t.join(`
|
|
|
7206
7243
|
const e = this.store.templateData, t = xt(e), i = this.geom.paperScale;
|
|
7207
7244
|
for (const n of Array.from(this.root.querySelectorAll(".pd-ruler"))) {
|
|
7208
7245
|
const r = n.dataset.ruler === "vertical" ? "vertical" : "horizontal";
|
|
7209
|
-
|
|
7246
|
+
bp(n, {
|
|
7210
7247
|
orientation: r,
|
|
7211
7248
|
geom: this.geom,
|
|
7212
7249
|
scale: i,
|
|
@@ -7391,7 +7428,7 @@ ${t.join(`
|
|
|
7391
7428
|
this.store.addElement(i, {}, s);
|
|
7392
7429
|
else if (n) {
|
|
7393
7430
|
const l = this.store.fields.find((c) => c.fieldKey === n);
|
|
7394
|
-
l && this.store.addFieldElement(l, {}, s, e.ctrlKey || e.metaKey);
|
|
7431
|
+
l && this.store.addFieldElement(l, {}, s, e.ctrlKey || e.metaKey || e.labelIntent === !0);
|
|
7395
7432
|
}
|
|
7396
7433
|
}
|
|
7397
7434
|
/** 纸面 mm 落点(对应 canvas 的 toPaperPoint):不取整,越出纸张左上角即视为无效 */
|
|
@@ -7512,7 +7549,7 @@ ${t.join(`
|
|
|
7512
7549
|
const i = t.elements.find((s) => s.id === e.primary), n = e.movedPositions.get(e.primary);
|
|
7513
7550
|
if (t.discardLive(), !i || !n) return;
|
|
7514
7551
|
const r = JSON.parse(JSON.stringify(i));
|
|
7515
|
-
r.id =
|
|
7552
|
+
r.id = Rt(), r.options.left = n.left, r.options.top = n.top, r.options.groupId = void 0, t.cloneElement(r);
|
|
7516
7553
|
}
|
|
7517
7554
|
/** 吸附闪烁点(对应 canvas CanvasPaper.showSnapIndicator:300ms 后自动消失,重复吸附则重启动画) */
|
|
7518
7555
|
flashSnapIndicator(e, t) {
|
|
@@ -7586,8 +7623,8 @@ ${t.join(`
|
|
|
7586
7623
|
if (!r) return;
|
|
7587
7624
|
const s = Math.round(this.store.scale), l = Math.max(n, Math.round(e));
|
|
7588
7625
|
if (l === s) return;
|
|
7589
|
-
const c = getComputedStyle(r), p = parseFloat(c.paddingLeft) || 0, u = parseFloat(c.paddingTop) || 0, f = r.scrollLeft + t - p, m = r.scrollTop + i - u,
|
|
7590
|
-
this.store.setScale(l, n), r.scrollLeft = f *
|
|
7626
|
+
const c = getComputedStyle(r), p = parseFloat(c.paddingLeft) || 0, u = parseFloat(c.paddingTop) || 0, f = r.scrollLeft + t - p, m = r.scrollTop + i - u, b = l / s;
|
|
7627
|
+
this.store.setScale(l, n), r.scrollLeft = f * b - t + p, r.scrollTop = m * b - i + u;
|
|
7591
7628
|
}
|
|
7592
7629
|
/** 工具栏放大/缩小:与滚轮同一乘性步进,以视口几何中心为锚点 */
|
|
7593
7630
|
zoomByStep(e) {
|
|
@@ -7603,13 +7640,13 @@ ${t.join(`
|
|
|
7603
7640
|
fitToWindow() {
|
|
7604
7641
|
const e = this.root.querySelector(".canvas-area");
|
|
7605
7642
|
if (!e) return;
|
|
7606
|
-
const t = getComputedStyle(e), i = (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0), n = (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0), r = xt(this.store.templateData), s =
|
|
7643
|
+
const t = getComputedStyle(e), i = (parseFloat(t.paddingLeft) || 0) + (parseFloat(t.paddingRight) || 0), n = (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0), r = xt(this.store.templateData), s = Ds(
|
|
7607
7644
|
e.clientWidth - i,
|
|
7608
7645
|
e.clientHeight - n,
|
|
7609
7646
|
gt(r.width),
|
|
7610
7647
|
gt(r.height)
|
|
7611
7648
|
);
|
|
7612
|
-
this.applyZoom(s, e.clientWidth / 2, e.clientHeight / 2,
|
|
7649
|
+
this.applyZoom(s, e.clientWidth / 2, e.clientHeight / 2, Ms);
|
|
7613
7650
|
}
|
|
7614
7651
|
onWheel(e) {
|
|
7615
7652
|
if (!e.ctrlKey && !e.metaKey) return;
|
|
@@ -7643,20 +7680,20 @@ ${t.join(`
|
|
|
7643
7680
|
};
|
|
7644
7681
|
let u = null;
|
|
7645
7682
|
if (p && t.snapToGrid !== !1) {
|
|
7646
|
-
const w = t.elements.filter((k) => !this.drag.ids.includes(k.id) && (k.zone || "content") === this.drag.zone).map((k) => ({ id: k.id, left: k.options.left, top: k.options.top, width: k.options.width, height: k.options.height })), g = pi(t.templateData, t.paperSize)[this.drag.zone], S =
|
|
7683
|
+
const w = t.elements.filter((k) => !this.drag.ids.includes(k.id) && (k.zone || "content") === this.drag.zone).map((k) => ({ id: k.id, left: k.options.left, top: k.options.top, width: k.options.width, height: k.options.height })), g = pi(t.templateData, t.paperSize)[this.drag.zone], S = _s(p, w, this.manualGuides());
|
|
7647
7684
|
u = { left: S.left, top: S.top }, t.adsorbGuides = (S.lines ?? []).filter((k) => k.position >= 0 && k.position <= (k.type === "vertical" ? g.width : g.height)), (u.left !== p.left || u.top !== p.top) && this.flashSnapIndicator(u.left + p.width / 2, u.top + p.height / 2);
|
|
7648
7685
|
} else
|
|
7649
7686
|
t.adsorbGuides = [];
|
|
7650
|
-
const f = c ? this.drag.origin.get(c.id) : void 0, m = u && f ? u.left - f.left : s,
|
|
7687
|
+
const f = c ? this.drag.origin.get(c.id) : void 0, m = u && f ? u.left - f.left : s, b = u && f ? u.top - f.top : l;
|
|
7651
7688
|
for (const w of this.drag.ids) {
|
|
7652
7689
|
const g = this.drag.origin.get(w);
|
|
7653
7690
|
if (!g) continue;
|
|
7654
|
-
const S = { left: g.left + m, top: g.top +
|
|
7691
|
+
const S = { left: g.left + m, top: g.top + b };
|
|
7655
7692
|
this.drag.movedPositions.set(w, S), t.livePatch(w, S);
|
|
7656
7693
|
}
|
|
7657
7694
|
this.patchElementDom(), t.adsorbGuides.length && this.paintGuidesOnly();
|
|
7658
7695
|
} else if (this.resize) {
|
|
7659
|
-
const { dx: s, dy: l } = r(e.clientX - this.resize.startX, e.clientY - this.resize.startY), c =
|
|
7696
|
+
const { dx: s, dy: l } = r(e.clientX - this.resize.startX, e.clientY - this.resize.startY), c = zs(this.resize.point, this.resize.origin, s, l, 3.5, 3.5);
|
|
7660
7697
|
t.livePatch(this.resize.id, c), this.patchElementDom();
|
|
7661
7698
|
}
|
|
7662
7699
|
}), window.addEventListener("mouseup", () => {
|
|
@@ -7673,7 +7710,7 @@ ${t.join(`
|
|
|
7673
7710
|
this.menu.visible && !n && (this.menu.visible = !1, this.repaint());
|
|
7674
7711
|
}), this.root.addEventListener("mouseover", (e) => {
|
|
7675
7712
|
const i = e.target?.closest?.("[data-tip]");
|
|
7676
|
-
!i || !i.closest(
|
|
7713
|
+
!i || !i.closest(vp) || (this.hoverTipTimer && clearTimeout(this.hoverTipTimer), this.hoverTipTimer = setTimeout(() => this.showHoverTip(i), 300));
|
|
7677
7714
|
}), this.root.addEventListener("mouseout", (e) => {
|
|
7678
7715
|
const t = e, i = t.target?.closest?.("[data-tip]");
|
|
7679
7716
|
i && t.relatedTarget?.closest?.("[data-tip]") !== i && this.hideHoverTip();
|
|
@@ -7718,20 +7755,20 @@ ${t.join(`
|
|
|
7718
7755
|
bindKeys() {
|
|
7719
7756
|
this.setAttribute("tabindex", "0");
|
|
7720
7757
|
const e = () => {
|
|
7721
|
-
|
|
7758
|
+
qe.active = this;
|
|
7722
7759
|
};
|
|
7723
|
-
this.addEventListener("pointerdown", e), this.addEventListener("focusin", e),
|
|
7760
|
+
this.addEventListener("pointerdown", e), this.addEventListener("focusin", e), qe.active || (qe.active = this);
|
|
7724
7761
|
}
|
|
7725
7762
|
/** document 级快捷键监听:随挂载/卸载成对增删(重连场景 store 已存在,bindKeys 不再执行) */
|
|
7726
7763
|
attachDocKeys() {
|
|
7727
|
-
this.docKeydown || (this.docKeydown = (e) => this.onGlobalKeydown(e), document.addEventListener("keydown", this.docKeydown));
|
|
7764
|
+
this.docKeydown || (this.docKeydown = (e) => this.onGlobalKeydown(e), document.addEventListener("keydown", this.docKeydown), this.docDragend = () => Qr(this.root?.querySelector(".canvas-area")), document.addEventListener("dragend", this.docDragend, !0));
|
|
7728
7765
|
}
|
|
7729
7766
|
detachDocKeys() {
|
|
7730
|
-
this.docKeydown && (document.removeEventListener("keydown", this.docKeydown), this.docKeydown = null);
|
|
7767
|
+
this.docKeydown && (document.removeEventListener("keydown", this.docKeydown), this.docKeydown = null, this.docDragend && (document.removeEventListener("dragend", this.docDragend, !0), this.docDragend = null));
|
|
7731
7768
|
}
|
|
7732
7769
|
onGlobalKeydown(e) {
|
|
7733
7770
|
const t = this.store;
|
|
7734
|
-
if (!t ||
|
|
7771
|
+
if (!t || qe.active !== this) return;
|
|
7735
7772
|
const n = e.composedPath()[0]?.tagName;
|
|
7736
7773
|
if (n === "INPUT" || n === "TEXTAREA" || n === "SELECT") return;
|
|
7737
7774
|
if (this.format.handlePainterKeydown(e), e.key.startsWith("Arrow")) {
|
|
@@ -7746,22 +7783,22 @@ ${t.join(`
|
|
|
7746
7783
|
}
|
|
7747
7784
|
if (!(e.ctrlKey || e.metaKey)) return;
|
|
7748
7785
|
const r = e.key.toLowerCase();
|
|
7749
|
-
|
|
7786
|
+
yp.has(r) && (e.preventDefault(), r === "z" ? e.shiftKey ? t.redo() : t.undo() : r === "y" ? t.redo() : r === "a" ? t.selectAll() : r === "c" ? t.copy() : r === "x" ? t.cutSelected() : r === "v" ? t.paste() : r === "d" ? t.duplicateSelected() : r === "g" ? e.shiftKey ? t.ungroupSelected() : t.groupSelected() : r === "1" ? t.resetZoom() : r === "l" ? t.alignSelected("left") : r === "r" ? t.alignSelected("right") : r === "e" ? t.alignSelected("vertical") : r === "t" ? t.alignSelected("top") : r === "b" ? t.alignSelected("bottom") : r === "0" && this.fire("fit-window"));
|
|
7750
7787
|
}
|
|
7751
7788
|
}
|
|
7752
|
-
function
|
|
7753
|
-
return customElements.get(o) || customElements.define(o,
|
|
7789
|
+
function Sp(o = "print-designer") {
|
|
7790
|
+
return customElements.get(o) || customElements.define(o, qe), o;
|
|
7754
7791
|
}
|
|
7755
|
-
function
|
|
7756
|
-
return
|
|
7792
|
+
function Ap() {
|
|
7793
|
+
return Sp();
|
|
7757
7794
|
}
|
|
7758
7795
|
export {
|
|
7759
|
-
|
|
7760
|
-
|
|
7796
|
+
Vs as DesignerStore,
|
|
7797
|
+
qe as PrintDesignerElement,
|
|
7761
7798
|
mn as TILING_SINGLE_PAGE_TIP,
|
|
7762
7799
|
mo as createDefaultTemplate,
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7800
|
+
Sp as definePrintDesigner,
|
|
7801
|
+
Ap as registerAll,
|
|
7802
|
+
Ys as serializePage,
|
|
7766
7803
|
Nr as toRuntimePool
|
|
7767
7804
|
};
|