@agile-team/mach-report 2.14.0 → 2.15.0
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 +16 -11
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-BKH1nGNS.js} +3 -3
- package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-Bs43BGNp.cjs} +1 -1
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-wP9m9Pj1.cjs} +1 -1
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-Sxr3eD0J.cjs} +1 -1
- package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-C_Clasvd.js} +5 -5
- package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-XhGHK8DE.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-D6Bkny59.js} +2 -2
- package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-JTSR53vJ.cjs} +1 -1
- package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-Kx35S0Ql.cjs} +1 -1
- package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-rVuK1kTz.js} +2 -2
- package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-B0ar9_zf.js} +2 -2
- package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dn6X9UmY.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +3 -1
- package/dist/analytics.d.ts +3 -1
- package/dist/analytics.js +154 -60
- package/dist/artifact-integrity.json +135 -0
- package/dist/assets-B9ImAi6_.cjs +1 -0
- package/dist/assets-DEaz4qsp.js +124 -0
- package/dist/batch-BaP6pWDE.cjs +1 -0
- package/dist/batch-BfZHN1do.js +220 -0
- package/dist/batch-CGyt-b2W.js +273 -0
- package/dist/batch-CLpELXBl.cjs +1 -0
- package/dist/capabilities-CAh2Nrue.cjs +1 -0
- package/dist/capabilities-DskCHs3V.js +69 -0
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
- package/dist/config-BVsJXSqS.js +842 -0
- package/dist/config-D10us76d.cjs +1 -0
- package/dist/data-explanation-B8MZRYVS.js +16 -0
- package/dist/data-explanation-DE55G30w.cjs +1 -0
- package/dist/designer-2bDlcNXQ.js +5136 -0
- package/dist/designer-BT7XCdbW.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -16
- package/dist/designer.d.ts +144 -16
- package/dist/designer.js +1 -1
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/{font-loader-vhCT8znW.cjs → font-loader-B_UkxpzC.cjs} +1 -1
- package/dist/{font-loader-DHto6Lra.js → font-loader-Q3bQjmrI.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +785 -820
- package/dist/json-snapshot-DFb2eWkf.js +1416 -0
- package/dist/json-snapshot-WWSGlaHG.cjs +2 -0
- package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
- package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
- package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
- package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
- package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
- package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
- package/dist/licenses/_types_node-14.18.63.txt +22 -0
- package/dist/licenses/_types_pako-2.0.3.txt +22 -0
- package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
- package/dist/licenses/archiver-5.3.2.txt +23 -0
- package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
- package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
- package/dist/licenses/async-3.2.6.txt +20 -0
- package/dist/licenses/balanced-match-1.0.2.txt +22 -0
- package/dist/licenses/base64-js-1.5.1.txt +22 -0
- package/dist/licenses/big-integer-1.6.52.txt +25 -0
- package/dist/licenses/binary-0.3.0.txt +178 -0
- package/dist/licenses/bl-4.1.0.txt +14 -0
- package/dist/licenses/bluebird-3.4.7.txt +22 -0
- package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
- package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
- package/dist/licenses/buffer-5.7.1.txt +22 -0
- package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
- package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
- package/dist/licenses/buffers-0.1.1.txt +140 -0
- package/dist/licenses/chainsaw-0.1.0.txt +184 -0
- package/dist/licenses/compress-commons-4.1.2.txt +23 -0
- package/dist/licenses/concat-map-0.0.1.txt +19 -0
- package/dist/licenses/core-util-is-1.0.3.txt +20 -0
- package/dist/licenses/crc-32-1.2.2.txt +202 -0
- package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
- package/dist/licenses/dayjs-1.11.23.txt +22 -0
- package/dist/licenses/duplexer2-0.1.4.txt +27 -0
- package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
- package/dist/licenses/exceljs-4.4.0.txt +23 -0
- package/dist/licenses/fast-csv-4.3.6.txt +22 -0
- package/dist/licenses/fast-png-6.4.0.txt +22 -0
- package/dist/licenses/fs-constants-1.0.0.txt +22 -0
- package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
- package/dist/licenses/fstream-1.0.12.txt +16 -0
- package/dist/licenses/glob-7.2.3.txt +22 -0
- package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
- package/dist/licenses/ieee754-1.2.1.txt +12 -0
- package/dist/licenses/immediate-3.0.6.txt +21 -0
- package/dist/licenses/inflight-1.0.6.txt +16 -0
- package/dist/licenses/inherits-2.0.4.txt +17 -0
- package/dist/licenses/iobuffer-5.4.0.txt +23 -0
- package/dist/licenses/isarray-1.0.0.txt +61 -0
- package/dist/licenses/jszip-3.10.2.txt +652 -0
- package/dist/licenses/lazystream-1.0.1.txt +24 -0
- package/dist/licenses/lie-3.3.0.txt +8 -0
- package/dist/licenses/listenercount-1.0.1.txt +6 -0
- package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
- package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
- package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
- package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
- package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
- package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
- package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
- package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
- package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
- package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
- package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
- package/dist/licenses/lodash.union-4.6.0.txt +48 -0
- package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
- package/dist/licenses/minimatch-3.1.5.txt +16 -0
- package/dist/licenses/minimatch-5.1.9.txt +16 -0
- package/dist/licenses/minimist-1.2.8.txt +19 -0
- package/dist/licenses/mkdirp-0.5.6.txt +22 -0
- package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
- package/dist/licenses/normalize-path-3.0.0.txt +22 -0
- package/dist/licenses/once-1.4.0.txt +16 -0
- package/dist/licenses/pako-1.0.11.txt +22 -0
- package/dist/licenses/pako-2.2.0.txt +22 -0
- package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
- package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
- package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
- package/dist/licenses/readable-stream-2.3.8.txt +48 -0
- package/dist/licenses/readable-stream-3.6.2.txt +48 -0
- package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
- package/dist/licenses/rimraf-2.7.1.txt +16 -0
- package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
- package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
- package/dist/licenses/saxes-5.0.1.txt +397 -0
- package/dist/licenses/setimmediate-1.0.5.txt +21 -0
- package/dist/licenses/string_decoder-1.1.1.txt +49 -0
- package/dist/licenses/string_decoder-1.3.0.txt +49 -0
- package/dist/licenses/tar-stream-2.2.0.txt +22 -0
- package/dist/licenses/tmp-0.2.7.txt +22 -0
- package/dist/licenses/traverse-0.3.9.txt +25 -0
- package/dist/licenses/tslib-1.14.1.txt +13 -0
- package/dist/licenses/unzipper-0.10.14.txt +26 -0
- package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
- package/dist/licenses/uuid-11.1.1.txt +10 -0
- package/dist/licenses/wrappy-1.0.2.txt +16 -0
- package/dist/licenses/xmlchars-2.2.0.txt +19 -0
- package/dist/licenses/zip-stream-4.1.1.txt +23 -0
- package/dist/matrix-CGRGkn5s.js +112 -0
- package/dist/matrix-gEO7ZM_u.cjs +1 -0
- package/dist/media-B7vnpD8k.cjs +1 -0
- package/dist/media-Y90dHK9z.js +70 -0
- package/dist/param-validation-C3HlcLLO.cjs +1 -0
- package/dist/param-validation-Do7Eg8Zv.js +181 -0
- package/dist/{pdf-8UPQebOE.js → pdf-BwNyeGpt.js} +4385 -4321
- package/dist/{pdf-AyJGb22z.cjs → pdf-CvvrjPQg.cjs} +51 -49
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BGKf-Tqg.js → plugin-Ca_XZG3l.js} +2 -2
- package/dist/{plugin-CktLH_Iy.cjs → plugin-DHO7X8z2.cjs} +1 -1
- package/dist/prepared-CFy9B75C.cjs +1 -0
- package/dist/prepared-ajM-H-9B.js +69 -0
- package/dist/progress-B0ctFpKf.cjs +1 -0
- package/dist/progress-D-OTpEav.js +52 -0
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/record-bindings-Do_b3h4V.js +196 -0
- package/dist/{region-binding-workflow-DEJbhpCv.js → region-binding-workflow-BMhK_TjP.js} +1 -1
- package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-DIYJdCUr.cjs} +1 -1
- package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
- package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
- package/dist/sbom.cdx.json +3982 -0
- package/dist/server/node.d.cts +20 -1
- package/dist/server/node.d.ts +20 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +247 -237
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +772 -4
- package/dist/server.d.ts +772 -4
- package/dist/server.js +885 -645
- package/dist/sha256-ArEYjaTI.cjs +1 -0
- package/dist/sha256-DPEuJ3nh.js +155 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-C2SpvsMU.js +58 -0
- package/dist/template-bindings-CEtWyiLX.cjs +1 -0
- package/dist/template-catalog-FJE_c9Qe.cjs +1 -0
- package/dist/template-catalog-j2B1MJlL.js +414 -0
- package/dist/{template-fragments-CLkGo6To.js → template-fragments-BGbQLGlV.js} +21 -21
- package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-DcKeiylI.cjs} +1 -1
- package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
- package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
- package/dist/{template-registry-COXDEJEM.js → template-registry-BtaKPELV.js} +364 -201
- package/dist/template-registry-Co1zPq5e.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/textwrap-DE1kgcJB.js +110 -0
- package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
- package/dist/vue/async.d.cts +123 -14
- package/dist/vue/async.d.ts +123 -14
- package/dist/vue/index.d.cts +158 -22
- package/dist/vue/index.d.ts +158 -22
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +80 -78
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +20 -1
- package/dist/worker.d.ts +20 -1
- package/dist/worker.js +33 -32
- package/dist/xlsx-node.cjs +34 -34
- package/dist/xlsx-node.js +878 -870
- package/dist/xlsx.cjs +3 -4
- package/dist/xlsx.d.cts +22 -10
- package/dist/xlsx.d.ts +22 -10
- package/dist/xlsx.js +261 -253
- package/package.json +2 -2
- package/dist/ParamEditor-CflQV3eQ.js +0 -526
- package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
- package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
- package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-DzaTNLWI.js +0 -371
- package/dist/batch-xMkqYiTr.cjs +0 -1
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-0UIohTS7.cjs +0 -1
- package/dist/config-Dt9NtCPl.js +0 -566
- package/dist/data-explanation-BktvER5B.cjs +0 -1
- package/dist/data-explanation-C_J6jYNi.js +0 -16
- package/dist/designer-Ci1LizA9.js +0 -5020
- package/dist/designer-rtmVIIdN.cjs +0 -2
- package/dist/json-snapshot-BeFT3Tso.js +0 -1952
- package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
- package/dist/matrix-DVyWiYsd.cjs +0 -1
- package/dist/matrix-yZsGnldA.js +0 -227
- package/dist/page-window-index-CIuT4BAv.js +0 -43
- package/dist/page-window-index-DEjnM6IB.cjs +0 -1
- package/dist/param-validation-BlHHXs6u.js +0 -153
- package/dist/param-validation-DCK039V1.cjs +0 -1
- package/dist/progress-7OSZbFok.js +0 -39
- package/dist/progress-BnLiS5eH.cjs +0 -1
- package/dist/task-events-DQ276fn2.cjs +0 -1
- package/dist/task-events-Dpsvf_t2.js +0 -47
- package/dist/template-bindings-BJR4k7qZ.cjs +0 -1
- package/dist/template-bindings-Daui7hLF.js +0 -252
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-CkQBWCeg.js +0 -163
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
import { ref as x, watch as M, nextTick as B, onMounted as oe, onBeforeUnmount as X, computed as O, shallowRef as de, defineComponent as Y, openBlock as f, createElementBlock as v, createElementVNode as q, normalizeClass as K, createVNode as j, unref as p, toDisplayString as k, createCommentVNode as $, Fragment as N, renderList as U, withModifiers as ue, createTextVNode as Q, createBlock as ce, withKeys as z, inject as Z, provide as fe } from "vue";
|
|
2
|
+
import { ReportParamValidationError as pe, ReportSourceError as ve, validateReportParams as _ } from "@agile-team/mach-report";
|
|
3
|
+
import { w as me } from "./progress-D-OTpEav.js";
|
|
4
|
+
import { a as G, _ as ee } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
import { a as W } from "./injection-keys-e85udZCp.js";
|
|
6
|
+
const ge = {
|
|
7
|
+
printPrepareTimeout: "打印资源准备超时,请检查字体与图片后重试。",
|
|
8
|
+
printImageFailed: "第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",
|
|
9
|
+
printFontFailed: "打印字体 {family} 未能加载,请检查字体资源后重试。",
|
|
10
|
+
printPrepareFailed: "打印准备失败,请检查打印配置或改用 PDF。",
|
|
11
|
+
printCalibration: "打印校准",
|
|
12
|
+
printOffsetX: "水平偏移(mm)",
|
|
13
|
+
printOffsetY: "垂直偏移(mm)",
|
|
14
|
+
printCalibrationTest: "打印校准页",
|
|
15
|
+
printCalibrationHint: "正值向右/向下移动,负值向左/向上。使用同规格纸张及 100% 比例,先试打一张。系统对话框关闭不代表设备已完成。"
|
|
16
|
+
};
|
|
17
|
+
function ia(e) {
|
|
18
|
+
const t = e?.calibration?.offsetXmm ?? 0, r = e?.calibration?.offsetYmm ?? 0;
|
|
19
|
+
if (![t, r].every((n) => Number.isFinite(n) && Math.abs(n) <= 20)) throw new RangeError("Print calibration must be within ±20 mm");
|
|
20
|
+
return { x: t, y: r };
|
|
21
|
+
}
|
|
22
|
+
function sa(e = {}) {
|
|
23
|
+
if (e.fonts && (!Array.isArray(e.fonts) || e.fonts.length > 8)) throw new RangeError("At most eight print font faces are allowed");
|
|
24
|
+
return { ...e, ...e.fonts ? { fonts: e.fonts.map((t) => ({ ...t })) } : {}, ...e.calibration ? { calibration: { ...e.calibration } } : {} };
|
|
25
|
+
}
|
|
26
|
+
function be(e = {}) {
|
|
27
|
+
const t = x(!1), r = x(null), n = x(null), s = x(null);
|
|
28
|
+
function u(i = !1) {
|
|
29
|
+
t.value = !1, i && B(() => n.value?.focus());
|
|
30
|
+
}
|
|
31
|
+
function g(i) {
|
|
32
|
+
i.target instanceof Node && !r.value?.contains(i.target) && u();
|
|
33
|
+
}
|
|
34
|
+
function c(i) {
|
|
35
|
+
i.key !== "Escape" || !t.value || i.isComposing || (i.preventDefault(), i.stopPropagation(), u(!0));
|
|
36
|
+
}
|
|
37
|
+
return M(t, (i) => {
|
|
38
|
+
!i || e.focusOnOpen === !1 || B(() => (s.value?.querySelector("input") ?? s.value?.querySelector("button:not(:disabled)"))?.focus());
|
|
39
|
+
}), oe(() => {
|
|
40
|
+
document.addEventListener("pointerdown", g), document.addEventListener("focusin", g);
|
|
41
|
+
}), X(() => {
|
|
42
|
+
document.removeEventListener("pointerdown", g), document.removeEventListener("focusin", g);
|
|
43
|
+
}), { opened: t, root: r, trigger: n, panel: s, close: u, onKeydown: c };
|
|
44
|
+
}
|
|
45
|
+
class L extends Error {
|
|
46
|
+
constructor(t, r, n) {
|
|
47
|
+
super(r), this.name = "MachReportError", this.code = t, this.cause = n;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function oa(e) {
|
|
51
|
+
return e instanceof L ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
|
|
52
|
+
}
|
|
53
|
+
function da(e) {
|
|
54
|
+
if (e instanceof L) return e;
|
|
55
|
+
if (e instanceof pe) return new L("param", e.message, e);
|
|
56
|
+
if (e instanceof ve) return new L(e.code, e.message, e.cause);
|
|
57
|
+
if (e instanceof Error) {
|
|
58
|
+
const t = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, r = e.code;
|
|
59
|
+
if (typeof r == "string" && Object.prototype.hasOwnProperty.call(t, r)) return new L(t[r], e.message, e);
|
|
60
|
+
}
|
|
61
|
+
return new L("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
62
|
+
}
|
|
63
|
+
let ye = 0;
|
|
64
|
+
function he() {
|
|
65
|
+
return `mrp-params-${++ye}`;
|
|
66
|
+
}
|
|
67
|
+
function ae(e, t, r) {
|
|
68
|
+
const n = (Array.isArray(t) ? t.find((s) => s?.field === e.field)?.label : void 0) ?? e.field;
|
|
69
|
+
return e.code === "required" ? r.paramRequired.replace("{label}", n) : (r.paramInvalid ?? "{label}:{message}").replace("{label}", n).replace("{message}", e.message);
|
|
70
|
+
}
|
|
71
|
+
function ua(e) {
|
|
72
|
+
const t = x({}), r = x(!1);
|
|
73
|
+
function n() {
|
|
74
|
+
const c = {};
|
|
75
|
+
for (const i of Array.isArray(e.defs.value) ? e.defs.value : [])
|
|
76
|
+
typeof i?.field == "string" && Object.defineProperty(c, i.field, { value: e.params()[i.field] ?? i.defaultValue ?? "", writable: !0, enumerable: !0, configurable: !0 });
|
|
77
|
+
t.value = c, r.value = !1;
|
|
78
|
+
}
|
|
79
|
+
n(), M(e.defs, n), M(e.reportIds, n), M(() => JSON.stringify(e.params()), n);
|
|
80
|
+
const s = O(() => _(e.defs.value, { ...e.params(), ...t.value })), u = O(() => !r.value && s.value.issues.length > 0 && s.value.issues.every((c) => c.code === "required"));
|
|
81
|
+
function g() {
|
|
82
|
+
const c = s.value;
|
|
83
|
+
if (!c.ok) {
|
|
84
|
+
const m = c.issues[0];
|
|
85
|
+
return { quiet: u.value, error: new L(m.code === "definition" ? "config" : "param", ae(m, e.defs.value, e.messages()), { issues: c.issues }) };
|
|
86
|
+
}
|
|
87
|
+
const i = { ...c.values }, C = new Set(e.defs.value.filter((m) => m.defaultValue !== void 0).map((m) => m.field));
|
|
88
|
+
for (const [m, h] of Object.entries(i)) h === "" && !C.has(m) && delete i[m];
|
|
89
|
+
return { params: i, quiet: !1 };
|
|
90
|
+
}
|
|
91
|
+
return { values: t, attempted: r, validation: s, pendingRequired: u, reset: n, query: g };
|
|
92
|
+
}
|
|
93
|
+
const te = {
|
|
94
|
+
paramOptionsLoading: "正在搜索选项…",
|
|
95
|
+
paramOptionsEmpty: "没有匹配选项",
|
|
96
|
+
paramOptionsFailed: "选项加载失败,请重试",
|
|
97
|
+
paramOptionsMissingLoader: "尚未配置选项加载服务",
|
|
98
|
+
paramOptionsDependencies: "请先选择上级条件",
|
|
99
|
+
paramOptionsClear: "清除选择"
|
|
100
|
+
}, ne = 100, Ee = 32, we = 6e4, Pe = 15e3;
|
|
101
|
+
function xe(e) {
|
|
102
|
+
if (!Array.isArray(e) || e.length > ne) throw new Error("Invalid option response");
|
|
103
|
+
const t = /* @__PURE__ */ new Set();
|
|
104
|
+
return Object.freeze(e.map((r) => {
|
|
105
|
+
if (!r || typeof r.value != "string" || !r.value || r.value.length > 1024 || typeof r.label != "string" || r.label.length > 1024 || t.has(r.value)) throw new Error("Invalid option response");
|
|
106
|
+
return t.add(r.value), Object.freeze({ label: r.label, value: r.value });
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
function Se(e) {
|
|
110
|
+
const t = x(""), r = de([]), n = x(!1), s = x(!1), u = O(() => Object.fromEntries((Array.isArray(e.def().dependsOn) ? e.def().dependsOn : []).map((E) => [E, e.values()[E] ?? ""]))), g = O(() => Object.values(u.value).some((E) => !E.trim())), c = O(() => !e.loader()), i = /* @__PURE__ */ new Map();
|
|
111
|
+
let C, m, h = 0;
|
|
112
|
+
function A() {
|
|
113
|
+
h++, C?.abort(), C = void 0, clearTimeout(m), n.value = !1;
|
|
114
|
+
}
|
|
115
|
+
async function b() {
|
|
116
|
+
A(), s.value = !1;
|
|
117
|
+
const E = e.loader(), w = e.def();
|
|
118
|
+
if (!E || !w.optionsSource || g.value || e.disabled() || !e.opened()) return;
|
|
119
|
+
const I = { source: w.optionsSource, field: w.field, query: t.value.trim().slice(0, 256), params: Object.freeze({ ...u.value }), limit: ne }, l = JSON.stringify(I), d = i.get(l);
|
|
120
|
+
if (d && Date.now() - d.at < we) {
|
|
121
|
+
i.delete(l), i.set(l, d), r.value = d.options;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const a = h, o = new AbortController();
|
|
125
|
+
C = o, n.value = !0;
|
|
126
|
+
const P = setTimeout(() => o.abort(), Pe);
|
|
127
|
+
try {
|
|
128
|
+
const S = xe(await me(E(Object.freeze({ ...I, signal: o.signal })), o.signal));
|
|
129
|
+
if (a !== h) return;
|
|
130
|
+
for (r.value = S, i.delete(l), i.set(l, { at: Date.now(), options: S }); i.size > Ee; ) i.delete(i.keys().next().value);
|
|
131
|
+
} catch {
|
|
132
|
+
a === h && (s.value = !0);
|
|
133
|
+
} finally {
|
|
134
|
+
clearTimeout(P), a === h && (n.value = !1, C = void 0);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function F() {
|
|
138
|
+
A(), r.value = [], s.value = !1, m = setTimeout(() => {
|
|
139
|
+
b();
|
|
140
|
+
}, 180);
|
|
141
|
+
}
|
|
142
|
+
return M(t, F, { flush: "sync" }), M([() => e.def().field, () => e.def().optionsSource, () => JSON.stringify(u.value), e.loader], () => {
|
|
143
|
+
i.clear(), t.value = "", A(), r.value = [], s.value = !1, e.opened() && b();
|
|
144
|
+
}, { flush: "sync" }), M([e.opened, e.disabled], () => {
|
|
145
|
+
!e.opened() || e.disabled() ? A() : b();
|
|
146
|
+
}), X(() => {
|
|
147
|
+
A(), i.clear();
|
|
148
|
+
}), { query: t, options: r, loading: n, failed: s, waiting: g, missingLoader: c, request: b, cancel: A };
|
|
149
|
+
}
|
|
150
|
+
const Oe = ["id", "value", "aria-labelledby", "aria-invalid", "aria-required", "aria-describedby", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "placeholder"], Ce = ["aria-label", "disabled"], Ae = ["aria-label", "disabled"], ke = ["id"], Me = ["id", "aria-label", "aria-busy"], Fe = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], Re = { key: 0 }, Ie = {
|
|
151
|
+
key: 0,
|
|
152
|
+
role: "status"
|
|
153
|
+
}, De = /* @__PURE__ */ Y({
|
|
154
|
+
__name: "ReportRemoteParamSelect",
|
|
155
|
+
props: {
|
|
156
|
+
def: {},
|
|
157
|
+
value: {},
|
|
158
|
+
values: {},
|
|
159
|
+
loadOptions: { type: Function },
|
|
160
|
+
messages: {},
|
|
161
|
+
disabled: { type: Boolean },
|
|
162
|
+
id: {},
|
|
163
|
+
invalid: { type: Boolean }
|
|
164
|
+
},
|
|
165
|
+
emits: ["change"],
|
|
166
|
+
setup(e, { emit: t }) {
|
|
167
|
+
const r = e, n = t, s = be({ focusOnOpen: !1 }), { root: u, panel: g, opened: c } = s, i = Se({ def: () => r.def, values: () => r.values, loader: () => r.loadOptions, opened: () => c.value, disabled: () => r.disabled === !0 }), { query: C, options: m, loading: h, failed: A, waiting: b, missingLoader: F } = i, E = O(() => ({ ...te, ...r.messages })), w = x(0), I = x(""), l = x(), d = O(() => `${r.id}-options`), a = O(() => b.value ? E.value.paramOptionsDependencies : F.value ? E.value.paramOptionsMissingLoader : A.value ? E.value.paramOptionsFailed : h.value ? E.value.paramOptionsLoading : m.value.length ? "" : E.value.paramOptionsEmpty);
|
|
168
|
+
M(() => r.value, () => {
|
|
169
|
+
I.value = "";
|
|
170
|
+
}), M(m, () => {
|
|
171
|
+
w.value = 0;
|
|
172
|
+
}), M(c, (y) => {
|
|
173
|
+
y && B(() => l.value?.focus());
|
|
174
|
+
});
|
|
175
|
+
function o(y) {
|
|
176
|
+
r.disabled || b.value || h.value || A.value || (n("change", y.value), s.close(), B(() => {
|
|
177
|
+
I.value = y.label, l.value?.focus();
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
180
|
+
function P(y) {
|
|
181
|
+
y.isComposing || (c.value = !0, C.value = y.target.value);
|
|
182
|
+
}
|
|
183
|
+
function S() {
|
|
184
|
+
!r.disabled && !b.value && !F.value && (C.value = "", c.value = !0);
|
|
185
|
+
}
|
|
186
|
+
function le(y) {
|
|
187
|
+
if (!(y.isComposing || y.keyCode === 229)) {
|
|
188
|
+
if (y.key === "Escape") {
|
|
189
|
+
c.value && (y.preventDefault(), y.stopPropagation(), s.close());
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (["ArrowUp", "ArrowDown", "Enter"].includes(y.key)) {
|
|
193
|
+
if (y.preventDefault(), y.stopPropagation(), !c.value) {
|
|
194
|
+
S();
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (y.key === "Enter") {
|
|
198
|
+
const D = m.value[w.value];
|
|
199
|
+
D && o(D);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
m.value.length && (w.value = (w.value + (y.key === "ArrowDown" ? 1 : -1) + m.value.length) % m.value.length, B(() => g.value?.querySelector(`[id="${d.value}-${w.value}"]`)?.scrollIntoView?.({ block: "nearest" })));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function ie() {
|
|
207
|
+
r.disabled || (n("change", ""), I.value = "", s.close());
|
|
208
|
+
}
|
|
209
|
+
return (y, D) => (f(), v("div", {
|
|
210
|
+
ref_key: "root",
|
|
211
|
+
ref: u,
|
|
212
|
+
class: "mrp-remote-param"
|
|
213
|
+
}, [
|
|
214
|
+
q("div", {
|
|
215
|
+
class: K(["mrp-remote-control", { "is-invalid": e.invalid }])
|
|
216
|
+
}, [
|
|
217
|
+
j(G, {
|
|
218
|
+
name: "search",
|
|
219
|
+
size: 14
|
|
220
|
+
}),
|
|
221
|
+
q("input", {
|
|
222
|
+
id: e.id,
|
|
223
|
+
ref_key: "input",
|
|
224
|
+
ref: l,
|
|
225
|
+
type: "text",
|
|
226
|
+
role: "combobox",
|
|
227
|
+
autocomplete: "off",
|
|
228
|
+
value: p(c) ? p(C) : I.value || e.value,
|
|
229
|
+
maxlength: 256,
|
|
230
|
+
"aria-labelledby": `${e.id}-label`,
|
|
231
|
+
"aria-invalid": e.invalid || void 0,
|
|
232
|
+
"aria-required": e.def.required || void 0,
|
|
233
|
+
"aria-describedby": e.invalid ? `${e.id}-error` : p(b) || p(F) ? `${e.id}-remote-status` : void 0,
|
|
234
|
+
"aria-autocomplete": "list",
|
|
235
|
+
"aria-expanded": p(c),
|
|
236
|
+
"aria-controls": p(c) ? d.value : void 0,
|
|
237
|
+
"aria-activedescendant": p(c) && p(m).length ? `${d.value}-${w.value}` : void 0,
|
|
238
|
+
disabled: e.disabled || p(b) || p(F),
|
|
239
|
+
placeholder: e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field),
|
|
240
|
+
onClick: S,
|
|
241
|
+
onInput: P,
|
|
242
|
+
onCompositionend: P,
|
|
243
|
+
onKeydown: le
|
|
244
|
+
}, null, 40, Oe),
|
|
245
|
+
e.value ? (f(), v("button", {
|
|
246
|
+
key: 0,
|
|
247
|
+
type: "button",
|
|
248
|
+
"aria-label": E.value.paramOptionsClear,
|
|
249
|
+
disabled: e.disabled,
|
|
250
|
+
onClick: ie
|
|
251
|
+
}, [
|
|
252
|
+
j(G, {
|
|
253
|
+
name: "close",
|
|
254
|
+
size: 12
|
|
255
|
+
})
|
|
256
|
+
], 8, Ce)) : (f(), v("button", {
|
|
257
|
+
key: 1,
|
|
258
|
+
type: "button",
|
|
259
|
+
"aria-label": e.def.label ?? e.def.field,
|
|
260
|
+
disabled: e.disabled || p(b) || p(F),
|
|
261
|
+
onClick: D[0] || (D[0] = (R) => p(c) ? p(s).close() : S())
|
|
262
|
+
}, [
|
|
263
|
+
j(G, {
|
|
264
|
+
name: "chevron-down",
|
|
265
|
+
size: 12
|
|
266
|
+
})
|
|
267
|
+
], 8, Ae))
|
|
268
|
+
], 2),
|
|
269
|
+
p(b) || p(F) ? (f(), v("small", {
|
|
270
|
+
key: 0,
|
|
271
|
+
id: `${e.id}-remote-status`,
|
|
272
|
+
role: "status"
|
|
273
|
+
}, k(a.value), 9, ke)) : $("", !0),
|
|
274
|
+
p(c) ? (f(), v("div", {
|
|
275
|
+
key: 1,
|
|
276
|
+
ref_key: "panel",
|
|
277
|
+
ref: g,
|
|
278
|
+
class: "mrp-remote-options"
|
|
279
|
+
}, [
|
|
280
|
+
q("div", {
|
|
281
|
+
id: d.value,
|
|
282
|
+
role: "listbox",
|
|
283
|
+
"aria-label": e.def.label ?? e.def.field,
|
|
284
|
+
"aria-busy": p(h)
|
|
285
|
+
}, [
|
|
286
|
+
(f(!0), v(N, null, U(p(m), (R, V) => (f(), v("button", {
|
|
287
|
+
id: `${d.value}-${V}`,
|
|
288
|
+
key: R.value,
|
|
289
|
+
type: "button",
|
|
290
|
+
role: "option",
|
|
291
|
+
tabindex: "-1",
|
|
292
|
+
"aria-selected": e.value === R.value,
|
|
293
|
+
class: K({ active: V === w.value }),
|
|
294
|
+
disabled: p(h),
|
|
295
|
+
onPointermove: (se) => w.value = V,
|
|
296
|
+
onMousedown: D[1] || (D[1] = ue(() => {
|
|
297
|
+
}, ["prevent"])),
|
|
298
|
+
onClick: (se) => o(R)
|
|
299
|
+
}, [
|
|
300
|
+
q("span", null, k(R.label), 1),
|
|
301
|
+
R.label !== R.value ? (f(), v("small", Re, k(R.value), 1)) : $("", !0)
|
|
302
|
+
], 42, Fe))), 128))
|
|
303
|
+
], 8, Me),
|
|
304
|
+
a.value ? (f(), v("p", Ie, [
|
|
305
|
+
Q(k(a.value), 1),
|
|
306
|
+
p(A) ? (f(), v("button", {
|
|
307
|
+
key: 0,
|
|
308
|
+
type: "button",
|
|
309
|
+
onClick: D[2] || (D[2] = //@ts-ignore
|
|
310
|
+
(...R) => p(i).request && p(i).request(...R))
|
|
311
|
+
}, k(e.messages.retry), 1)) : $("", !0)
|
|
312
|
+
])) : $("", !0)
|
|
313
|
+
], 512)) : $("", !0)
|
|
314
|
+
], 512));
|
|
315
|
+
}
|
|
316
|
+
}), qe = /* @__PURE__ */ ee(De, [["__scopeId", "data-v-0e0e3248"]]), $e = {
|
|
317
|
+
key: 0,
|
|
318
|
+
class: "mrp-params-title"
|
|
319
|
+
}, Te = { class: "mrp-params-grid" }, Le = ["id"], Be = {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: "mrp-param-star"
|
|
322
|
+
}, Ne = ["value", "disabled", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], Ue = ["disabled", "hidden"], He = ["value"], Ve = ["aria-labelledby"], je = ["value", "disabled", "min", "max", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onInput"], ze = ["type", "inputmode", "maxlength", "placeholder", "value", "disabled", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], Ge = ["id"], Ke = {
|
|
323
|
+
key: 1,
|
|
324
|
+
class: "mrp-params-actions"
|
|
325
|
+
}, We = ["disabled"], Je = ["disabled"], Xe = /* @__PURE__ */ Y({
|
|
326
|
+
__name: "ReportParamPanel",
|
|
327
|
+
props: {
|
|
328
|
+
defs: {},
|
|
329
|
+
modelValue: {},
|
|
330
|
+
messages: {},
|
|
331
|
+
attempted: { type: Boolean },
|
|
332
|
+
issues: { default: void 0 },
|
|
333
|
+
showActions: { type: Boolean, default: !0 },
|
|
334
|
+
showTitle: { type: Boolean, default: !0 },
|
|
335
|
+
disabled: { type: Boolean, default: !1 },
|
|
336
|
+
loadOptions: { type: Function, default: void 0 }
|
|
337
|
+
},
|
|
338
|
+
emits: ["update:modelValue", "query", "reset"],
|
|
339
|
+
setup(e, { expose: t, emit: r }) {
|
|
340
|
+
const n = e, s = r, u = x({ ...n.modelValue }), g = x(null), c = he();
|
|
341
|
+
M(
|
|
342
|
+
() => n.modelValue,
|
|
343
|
+
(l) => {
|
|
344
|
+
u.value = { ...l };
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
const i = O(() => n.issues ?? _(n.defs, u.value).issues), C = O(
|
|
348
|
+
() => (Array.isArray(n.defs) ? n.defs : []).filter((l) => l && typeof l.field == "string").map((l, d) => ({
|
|
349
|
+
def: l,
|
|
350
|
+
id: `${c}-${d}`,
|
|
351
|
+
label: l.label ?? l.field,
|
|
352
|
+
value: u.value[l.field] ?? "",
|
|
353
|
+
error: n.attempted ? i.value.find((a) => a.field === l.field) : void 0
|
|
354
|
+
}))
|
|
355
|
+
), m = O(() => {
|
|
356
|
+
const l = /* @__PURE__ */ new Map();
|
|
357
|
+
for (const d of n.defs) for (const a of Array.isArray(d.dependsOn) ? d.dependsOn : []) {
|
|
358
|
+
const o = l.get(a) ?? [];
|
|
359
|
+
o.push(d.field), l.set(a, o);
|
|
360
|
+
}
|
|
361
|
+
return l;
|
|
362
|
+
});
|
|
363
|
+
function h(l, d) {
|
|
364
|
+
if (n.disabled || u.value[l] === d) return;
|
|
365
|
+
u.value = { ...u.value, [l]: d };
|
|
366
|
+
const a = /* @__PURE__ */ new Set([l]), o = [l];
|
|
367
|
+
for (let P = 0; P < o.length; P++) for (const S of m.value.get(o[P]) ?? [])
|
|
368
|
+
a.has(S) || (u.value[S] = "", a.add(S), o.push(S));
|
|
369
|
+
s("update:modelValue", { ...u.value });
|
|
370
|
+
}
|
|
371
|
+
function A(l) {
|
|
372
|
+
return l.type === "number" ? "number" : l.type === "date" || l.type === "month" ? l.type : "text";
|
|
373
|
+
}
|
|
374
|
+
function b(l, d) {
|
|
375
|
+
return l.split("/")[d] ?? "";
|
|
376
|
+
}
|
|
377
|
+
function F(l, d, a) {
|
|
378
|
+
return a ? !!b(l, 0) != !!b(l, 1) ? !b(l, d) || void 0 : !0 : void 0;
|
|
379
|
+
}
|
|
380
|
+
function E(l, d, a) {
|
|
381
|
+
const o = [b(u.value[l] ?? "", 0), b(u.value[l] ?? "", 1)];
|
|
382
|
+
o[d] = a, h(l, o.every((P) => !P) ? "" : o.join("/"));
|
|
383
|
+
}
|
|
384
|
+
function w(l) {
|
|
385
|
+
l.isComposing || s("query");
|
|
386
|
+
}
|
|
387
|
+
function I() {
|
|
388
|
+
g.value?.querySelector('[aria-invalid="true"]')?.focus();
|
|
389
|
+
}
|
|
390
|
+
return t({ focusInvalid: I }), (l, d) => (f(), v("div", {
|
|
391
|
+
ref_key: "root",
|
|
392
|
+
ref: g,
|
|
393
|
+
class: "mrp-params"
|
|
394
|
+
}, [
|
|
395
|
+
e.showTitle !== !1 ? (f(), v("span", $e, k(e.messages.paramsTitle), 1)) : $("", !0),
|
|
396
|
+
q("div", Te, [
|
|
397
|
+
(f(!0), v(N, null, U(C.value, (a) => (f(), v("label", {
|
|
398
|
+
key: a.id,
|
|
399
|
+
class: K(["mrp-param", { "mrp-param-missing": !!a.error }])
|
|
400
|
+
}, [
|
|
401
|
+
q("span", {
|
|
402
|
+
id: `${a.id}-label`,
|
|
403
|
+
class: "mrp-param-label"
|
|
404
|
+
}, [
|
|
405
|
+
Q(k(a.label), 1),
|
|
406
|
+
a.def.required ? (f(), v("i", Be, "*")) : $("", !0)
|
|
407
|
+
], 8, Le),
|
|
408
|
+
a.def.optionsSource ? (f(), ce(qe, {
|
|
409
|
+
key: 0,
|
|
410
|
+
id: a.id,
|
|
411
|
+
def: a.def,
|
|
412
|
+
value: a.value,
|
|
413
|
+
values: u.value,
|
|
414
|
+
"load-options": e.loadOptions,
|
|
415
|
+
messages: e.messages,
|
|
416
|
+
disabled: e.disabled,
|
|
417
|
+
invalid: !!a.error,
|
|
418
|
+
onChange: (o) => h(a.def.field, o)
|
|
419
|
+
}, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : (a.def.type ?? "text") === "select" ? (f(), v("select", {
|
|
420
|
+
key: 1,
|
|
421
|
+
class: "mrp-param-input",
|
|
422
|
+
value: a.value,
|
|
423
|
+
disabled: e.disabled,
|
|
424
|
+
"aria-labelledby": `${a.id}-label`,
|
|
425
|
+
"aria-invalid": a.error ? !0 : void 0,
|
|
426
|
+
"aria-describedby": a.error ? `${a.id}-error` : void 0,
|
|
427
|
+
"aria-required": a.def.required || void 0,
|
|
428
|
+
onChange: (o) => h(a.def.field, o.target.value),
|
|
429
|
+
onKeydown: z(w, ["enter"])
|
|
430
|
+
}, [
|
|
431
|
+
q("option", {
|
|
432
|
+
value: "",
|
|
433
|
+
disabled: a.def.required,
|
|
434
|
+
hidden: a.def.required
|
|
435
|
+
}, k(a.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", a.label)), 9, Ue),
|
|
436
|
+
(f(!0), v(N, null, U(a.def.options ?? [], (o) => (f(), v("option", {
|
|
437
|
+
key: o.value,
|
|
438
|
+
value: o.value
|
|
439
|
+
}, k(o.label), 9, He))), 128))
|
|
440
|
+
], 40, Ne)) : a.def.type === "dateRange" ? (f(), v("div", {
|
|
441
|
+
key: 2,
|
|
442
|
+
class: "mrp-param-range",
|
|
443
|
+
role: "group",
|
|
444
|
+
"aria-labelledby": `${a.id}-label`
|
|
445
|
+
}, [
|
|
446
|
+
(f(!0), v(N, null, U([e.messages.paramRangeStart ?? "开始日期", e.messages.paramRangeEnd ?? "结束日期"], (o, P) => (f(), v("input", {
|
|
447
|
+
key: P,
|
|
448
|
+
class: "mrp-param-input",
|
|
449
|
+
type: "date",
|
|
450
|
+
value: b(a.value, P),
|
|
451
|
+
disabled: e.disabled,
|
|
452
|
+
min: a.def.min,
|
|
453
|
+
max: a.def.max,
|
|
454
|
+
"aria-label": `${a.label} · ${o}`,
|
|
455
|
+
"aria-invalid": F(a.value, P, a.error),
|
|
456
|
+
"aria-describedby": a.error ? `${a.id}-error` : void 0,
|
|
457
|
+
"aria-required": a.def.required || void 0,
|
|
458
|
+
onInput: (S) => E(a.def.field, P, S.target.value),
|
|
459
|
+
onKeydown: z(w, ["enter"])
|
|
460
|
+
}, null, 40, je))), 128))
|
|
461
|
+
], 8, Ve)) : (f(), v("input", {
|
|
462
|
+
key: 3,
|
|
463
|
+
class: "mrp-param-input",
|
|
464
|
+
type: A(a.def),
|
|
465
|
+
inputmode: a.def.type === "year" ? "numeric" : void 0,
|
|
466
|
+
maxlength: a.def.type === "year" ? 4 : void 0,
|
|
467
|
+
placeholder: a.def.placeholder ?? (e.messages.paramTextPlaceholder ?? "请输入{label}").replace("{label}", a.label),
|
|
468
|
+
value: a.value,
|
|
469
|
+
disabled: e.disabled,
|
|
470
|
+
min: a.def.min,
|
|
471
|
+
max: a.def.max,
|
|
472
|
+
step: a.def.type === "number" ? "any" : void 0,
|
|
473
|
+
"aria-labelledby": `${a.id}-label`,
|
|
474
|
+
"aria-invalid": a.error ? !0 : void 0,
|
|
475
|
+
"aria-describedby": a.error ? `${a.id}-error` : void 0,
|
|
476
|
+
"aria-required": a.def.required || void 0,
|
|
477
|
+
onInput: (o) => h(a.def.field, o.target.value),
|
|
478
|
+
onKeydown: z(w, ["enter"])
|
|
479
|
+
}, null, 40, ze)),
|
|
480
|
+
a.error ? (f(), v("small", {
|
|
481
|
+
key: 4,
|
|
482
|
+
id: `${a.id}-error`,
|
|
483
|
+
class: "mrp-param-error",
|
|
484
|
+
role: "status"
|
|
485
|
+
}, k(p(ae)(a.error, e.defs, e.messages)), 9, Ge)) : $("", !0)
|
|
486
|
+
], 2))), 128))
|
|
487
|
+
]),
|
|
488
|
+
e.showActions !== !1 ? (f(), v("div", Ke, [
|
|
489
|
+
q("button", {
|
|
490
|
+
class: "mrp-nav mrp-param-query",
|
|
491
|
+
type: "button",
|
|
492
|
+
disabled: e.disabled,
|
|
493
|
+
onClick: d[0] || (d[0] = (a) => l.$emit("query"))
|
|
494
|
+
}, k(e.messages.query), 9, We),
|
|
495
|
+
q("button", {
|
|
496
|
+
class: "mrp-nav",
|
|
497
|
+
type: "button",
|
|
498
|
+
disabled: e.disabled,
|
|
499
|
+
onClick: d[1] || (d[1] = (a) => l.$emit("reset"))
|
|
500
|
+
}, k(e.messages.reset), 9, Je)
|
|
501
|
+
])) : $("", !0)
|
|
502
|
+
], 512));
|
|
503
|
+
}
|
|
504
|
+
}), ca = /* @__PURE__ */ ee(Xe, [["__scopeId", "data-v-6f9fe7a1"]]), re = {
|
|
505
|
+
calculationTitle: "选区计算",
|
|
506
|
+
calculationLocal: "仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",
|
|
507
|
+
calculationHint: "点击起点,Shift + 点击终点或方向键扩选。",
|
|
508
|
+
calculationFormula: "计算方式",
|
|
509
|
+
calculationExpression: "组合公式",
|
|
510
|
+
calculationExpressionHint: "支持 SUM、AVERAGE/AVG、MIN、MAX、COUNT、MEDIAN 及 + - * / 和括号,不执行 Excel 公式;采用浮点数,精度仅用于展示。",
|
|
511
|
+
calculationPrecision: "展示小数位",
|
|
512
|
+
calculationRun: "计算选区",
|
|
513
|
+
calculationCancel: "取消计算",
|
|
514
|
+
calculationResult: "计算结果",
|
|
515
|
+
calculationIncluded: "参与数值",
|
|
516
|
+
calculationExcluded: "排除单元格",
|
|
517
|
+
calculationEmpty: "选区没有可计算数值,计数为 0,其余结果为空。",
|
|
518
|
+
calculationNoSelection: "先关闭设置并选择数据,再从底部工具栏打开选区计算。",
|
|
519
|
+
calculationSum: "求和 SUM",
|
|
520
|
+
calculationAverage: "平均值 AVERAGE",
|
|
521
|
+
calculationMin: "最小值 MIN",
|
|
522
|
+
calculationMax: "最大值 MAX",
|
|
523
|
+
calculationCount: "数值计数 COUNT",
|
|
524
|
+
calculationMedian: "中位数 MEDIAN",
|
|
525
|
+
calculationCustom: "组合公式",
|
|
526
|
+
calculationErrorSelection: "请选择同一明细区域中的数据。",
|
|
527
|
+
calculationErrorLimit: "选区超过计算预算,请缩小范围后重试。",
|
|
528
|
+
calculationErrorExpression: "公式无效,请使用支持的摘要名称、运算符与括号。",
|
|
529
|
+
calculationErrorDivision: "除数不能为 0。",
|
|
530
|
+
calculationErrorOverflow: "结果超出有效数值范围。",
|
|
531
|
+
calculationErrorPrecision: "数值超出安全精度,或展示小数位不是 0 至 12 的整数。"
|
|
532
|
+
};
|
|
533
|
+
function fa(e) {
|
|
534
|
+
const t = { ...re };
|
|
535
|
+
for (const r of Object.keys(t)) {
|
|
536
|
+
const n = e[r];
|
|
537
|
+
typeof n == "string" && (t[r] = n);
|
|
538
|
+
}
|
|
539
|
+
return t;
|
|
540
|
+
}
|
|
541
|
+
const Ye = {
|
|
542
|
+
...te,
|
|
543
|
+
drillActions: "查看关联",
|
|
544
|
+
drillOpening: "正在打开…",
|
|
545
|
+
drillMissingValue: "当前单元格缺少关联参数",
|
|
546
|
+
drillFailed: "关联内容打开失败,请重试",
|
|
547
|
+
...ge,
|
|
548
|
+
...re,
|
|
549
|
+
exportMenu: "导出",
|
|
550
|
+
exportMenuDescription: "选择文件格式",
|
|
551
|
+
clearSearch: "清除搜索",
|
|
552
|
+
searchHint: "Enter 下一个 · Shift+Enter 上一个",
|
|
553
|
+
searchNoMatches: "没有匹配内容",
|
|
554
|
+
pageJump: "跳至页",
|
|
555
|
+
pageJumpInvalid: "请输入有效页码",
|
|
556
|
+
pageJumpHint: "Enter 跳转",
|
|
557
|
+
pagination: "报表分页",
|
|
558
|
+
recordNavigation: "标签记录",
|
|
559
|
+
recordInfo: "记录 {cur} / {total}",
|
|
560
|
+
prevRecord: "上一条记录",
|
|
561
|
+
nextRecord: "下一条记录",
|
|
562
|
+
dataExplanation: "来源数据说明",
|
|
563
|
+
dataExplanationHint: "按字段查看来源与计算说明",
|
|
564
|
+
dataExplanationSearch: "搜索说明、字段或记录",
|
|
565
|
+
dataExplanationEmpty: "没有匹配的数据说明",
|
|
566
|
+
dataMissingSource: "暂无来源",
|
|
567
|
+
dataNotApplicable: "业务不适用",
|
|
568
|
+
dataNotCalculable: "无法计算",
|
|
569
|
+
columnSearchHint: "输入列名或字段标识",
|
|
570
|
+
columnSearchShortcut: "↑ ↓ 选择 · Enter 定位",
|
|
571
|
+
closeColumnDirectory: "关闭字段目录",
|
|
572
|
+
columnResultsMore: "{count} 个匹配字段,显示前 {limit} 个;继续输入可缩小范围",
|
|
573
|
+
columnCount: "{count} 个字段",
|
|
574
|
+
settingsGeneral: "常规",
|
|
575
|
+
settingsTools: "工具",
|
|
576
|
+
settingsAdvanced: "高级",
|
|
577
|
+
settingsAdvancedDescription: "按需开启分析能力,保持日常阅读简洁。",
|
|
578
|
+
settingsCalculations: "启用选区计算",
|
|
579
|
+
settingsCalculationsDescription: "选取数值后计算求和、平均值或组合公式,仅用于本地分析。",
|
|
580
|
+
title: "报表预览",
|
|
581
|
+
prevPage: "‹ 上一页",
|
|
582
|
+
nextPage: "下一页 ›",
|
|
583
|
+
pageInfo: "{cur} / {total}",
|
|
584
|
+
fitWidth: "适宽",
|
|
585
|
+
exportHtml: "导出 HTML",
|
|
586
|
+
exportPdf: "导出 PDF",
|
|
587
|
+
exportExcel: "导出 Excel",
|
|
588
|
+
exportImage: "导出图片",
|
|
589
|
+
exportWord: "导出 Word",
|
|
590
|
+
exporting: "正在生成 {format}…",
|
|
591
|
+
print: "打印",
|
|
592
|
+
pdfWindow: "PDF 窗口",
|
|
593
|
+
loading: "报表渲染中…",
|
|
594
|
+
empty: "暂无预览数据",
|
|
595
|
+
errorPrefix: "",
|
|
596
|
+
retry: "重试",
|
|
597
|
+
pdfFontUnavailable: "PDF 字体尚未就绪,请联系管理员检查字体配置;预览及其它导出仍可使用。",
|
|
598
|
+
searchPlaceholder: "搜索报表内容",
|
|
599
|
+
matchInfo: "{cur}/{total}",
|
|
600
|
+
prevMatch: "‹",
|
|
601
|
+
nextMatch: "›",
|
|
602
|
+
thumbnails: "缩略图",
|
|
603
|
+
paramsTitle: "查询条件",
|
|
604
|
+
query: "查 询",
|
|
605
|
+
reset: "重 置",
|
|
606
|
+
paramRequired: "请填写{label}",
|
|
607
|
+
paramInvalid: "{label}:{message}",
|
|
608
|
+
paramPrompt: "请先完善查询条件",
|
|
609
|
+
paramPromptDescription: "填写必填条件后点击查询,即可生成报表。",
|
|
610
|
+
paramSelectPlaceholder: "请选择{label}",
|
|
611
|
+
paramTextPlaceholder: "请输入{label}",
|
|
612
|
+
paramRangeStart: "开始日期",
|
|
613
|
+
paramRangeEnd: "结束日期",
|
|
614
|
+
searching: "搜索中…",
|
|
615
|
+
importExcel: "导入 Excel 模板",
|
|
616
|
+
importing: "正在导入 Excel…",
|
|
617
|
+
editCell: "编辑单元格",
|
|
618
|
+
editingHint: "双击单元格编辑 · Enter 确认 · Esc 取消",
|
|
619
|
+
saving: "正在保存修改…",
|
|
620
|
+
editInvalidNumber: "请输入有效数字;清空表示无值",
|
|
621
|
+
editInvalidBoolean: "请输入 true / false、是 / 否或 1 / 0",
|
|
622
|
+
editConflict: "该单元格已变化,请重新打开编辑",
|
|
623
|
+
settings: "设置",
|
|
624
|
+
settingsDisplay: "阅读工具",
|
|
625
|
+
settingsExport: "导出与打印",
|
|
626
|
+
settingsData: "数据操作",
|
|
627
|
+
settingsUnavailable: "需由接入方配置启用",
|
|
628
|
+
settingsReset: "恢复默认",
|
|
629
|
+
settingsClose: "关闭设置",
|
|
630
|
+
search: "内容搜索",
|
|
631
|
+
closeSearch: "关闭搜索",
|
|
632
|
+
prevSearchMatch: "上一个匹配",
|
|
633
|
+
nextSearchMatch: "下一个匹配",
|
|
634
|
+
zoom: "缩放工具",
|
|
635
|
+
settingsLocal: "按需启用工具,仅作用于当前预览。",
|
|
636
|
+
editingLocal: "修改为本地草稿;不会自动写入业务数据库。",
|
|
637
|
+
editingSaved: "修改将通过接入方配置的保存回调提交。",
|
|
638
|
+
importLocal: "导入仅生成本地预览,不自动替换业务数据。",
|
|
639
|
+
emptyDescription: "当前查询没有明细,请调整查询条件后重试。",
|
|
640
|
+
undo: "撤销",
|
|
641
|
+
redo: "重做",
|
|
642
|
+
restoreChanges: "恢复来源值",
|
|
643
|
+
changes: "修改明细",
|
|
644
|
+
changesCount: "{count} 处修改",
|
|
645
|
+
changesEmpty: "尚无修改",
|
|
646
|
+
changesBefore: "来源值",
|
|
647
|
+
changesAfter: "当前值",
|
|
648
|
+
editAtomicRequired: "批量保存需要接入方提供原子 saveBatch 回调;本次未写入任何单元格。",
|
|
649
|
+
clipboardLimit: "单次最多粘贴 10000 个单元格,请分批处理。",
|
|
650
|
+
preferencesError: "偏好存储不可用,设置仍在当前预览中生效。",
|
|
651
|
+
freezeHeaders: "冻结表头",
|
|
652
|
+
frozenColumns: "冻结前列",
|
|
653
|
+
sections: "工作表与章节",
|
|
654
|
+
locateField: "定位字段",
|
|
655
|
+
locateFieldPlaceholder: "输入字段标识,Enter 定位",
|
|
656
|
+
locateFieldMissing: "未找到该字段,请核对字段标识。",
|
|
657
|
+
importSummary: "Excel 导入摘要",
|
|
658
|
+
importPreserved: "已导入 {sheets} 个工作表,保留内容、合并和样式。",
|
|
659
|
+
importWarnings: "兼容性提示",
|
|
660
|
+
importReadOnly: "公式、日期及受保护单元格保持只读;公式不重算。",
|
|
661
|
+
conflicts: "保存冲突",
|
|
662
|
+
editReadOnly: "选区包含只读或无权限单元格,本次修改未应用。",
|
|
663
|
+
editMissing: "选区超出报表范围或缺少业务来源,请重新选择。",
|
|
664
|
+
editRecalculationUnavailable: "此报表缺少重算会话或稳定数据来源,暂不支持编辑;请使用 reports/本地数据源重新加载。",
|
|
665
|
+
editDuplicate: "选区包含同一业务字段的重复单元格,请缩小选区。",
|
|
666
|
+
clipboardInvalid: "剪贴板内容无法识别,请使用矩形表格文本重新粘贴。",
|
|
667
|
+
editSaved: "修改已通过保存回调确认",
|
|
668
|
+
settingsPanes: "冻结窗格",
|
|
669
|
+
columnDirectory: "字段目录",
|
|
670
|
+
columnSearch: "搜索列名或字段",
|
|
671
|
+
columnNoMatches: "未找到匹配字段",
|
|
672
|
+
columnResults: "匹配字段",
|
|
673
|
+
columnGroup: "明细区域",
|
|
674
|
+
discardTitle: "保留当前修改?",
|
|
675
|
+
discardDescription: "当前报表有尚未保存的输入或本地草稿,继续操作将替换这些内容。",
|
|
676
|
+
discardKeep: "继续编辑",
|
|
677
|
+
discardProceed: "放弃修改并继续",
|
|
678
|
+
taskQuery: "正在获取数据…",
|
|
679
|
+
taskValidate: "正在校验数据…",
|
|
680
|
+
taskLayout: "正在生成版式…",
|
|
681
|
+
taskAssets: "正在准备图片和字体…",
|
|
682
|
+
taskEncode: "正在生成文件…",
|
|
683
|
+
taskDownload: "正在准备下载…",
|
|
684
|
+
taskPrint: "正在准备打印…",
|
|
685
|
+
taskCancel: "取消任务",
|
|
686
|
+
taskCancelled: "任务已取消,可重新操作。",
|
|
687
|
+
diagnosticsSearch: "搜索提示、错误码或位置",
|
|
688
|
+
diagnosticsMore: "共 {count} 条匹配,当前展示前 100 条;请搜索缩小范围。",
|
|
689
|
+
diagnosticsTitle: "输出兼容性提示",
|
|
690
|
+
diagnosticsLocate: "定位",
|
|
691
|
+
diagnosticsLocation: "第 {page} 页 · 组件 {component}",
|
|
692
|
+
diagnosticsStrict: "当前格式存在已知内容降级,请查看兼容性提示或选择其他输出格式。",
|
|
693
|
+
diagnosticsDetails: "查看技术详情",
|
|
694
|
+
diagnosticMissingImage: "图片或图表资源尚未准备完成,请重试或联系管理员。",
|
|
695
|
+
diagnosticUnsupported: "当前输出格式会省略此内容,建议选择 PDF 或图片格式。",
|
|
696
|
+
diagnosticUnsupportedStyle: "当前格式无法保留部分样式,请查看位置并选择适合的输出格式。",
|
|
697
|
+
diagnosticImageFormat: "当前图片格式无法直接导出,请转换资源后重试。",
|
|
698
|
+
diagnosticRichText: "文字内容会保留,部分字体与段落样式将简化。",
|
|
699
|
+
diagnosticNested: "单元格中的嵌套内容会省略,单元格文字会保留。",
|
|
700
|
+
diagnosticImageAsync: "图片需要完成加载后才能输出。",
|
|
701
|
+
diagnosticImageDecode: "图片加载失败,请检查资源后重试。",
|
|
702
|
+
diagnosticAssetFailed: "图表或图片生成失败,请重试或联系管理员。",
|
|
703
|
+
diagnosticAssetBudget: "图片资源超出处理范围,请减少资源或缩小报表范围。"
|
|
704
|
+
}, Qe = {
|
|
705
|
+
emptyAccent: "#79a7e8",
|
|
706
|
+
shellBg: "#f4f7fc",
|
|
707
|
+
shellFg: "#334155",
|
|
708
|
+
toolbarBg: "#ffffff",
|
|
709
|
+
toolbarBorder: "#e4eaf3",
|
|
710
|
+
toolbarFg: "#334155",
|
|
711
|
+
btnFg: "#526078",
|
|
712
|
+
btnBorder: "#dbe3ef",
|
|
713
|
+
btnHoverBg: "#edf3ff",
|
|
714
|
+
btnHoverFg: "#315fba",
|
|
715
|
+
btnActiveBg: "#3569d4"
|
|
716
|
+
};
|
|
717
|
+
function Ze(e = {}) {
|
|
718
|
+
return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
|
|
719
|
+
}
|
|
720
|
+
function pa(e) {
|
|
721
|
+
return e;
|
|
722
|
+
}
|
|
723
|
+
const T = {
|
|
724
|
+
showExport: !0,
|
|
725
|
+
showPrint: !0,
|
|
726
|
+
showPdfWindow: !0,
|
|
727
|
+
showSettings: !0,
|
|
728
|
+
showParams: !0,
|
|
729
|
+
gapPx: 18,
|
|
730
|
+
pdfFontUrl: "/simhei.ttf",
|
|
731
|
+
logger: console
|
|
732
|
+
}, va = { warn: () => {
|
|
733
|
+
}, info: () => {
|
|
734
|
+
} };
|
|
735
|
+
function _e(e, t) {
|
|
736
|
+
if (!(!e && !t))
|
|
737
|
+
return { ...e, ...t, calibration: { ...e?.calibration, ...t?.calibration } };
|
|
738
|
+
}
|
|
739
|
+
function H(e, t) {
|
|
740
|
+
return {
|
|
741
|
+
...e,
|
|
742
|
+
...t,
|
|
743
|
+
theme: { ...e?.theme, ...t?.theme },
|
|
744
|
+
messages: { ...e?.messages, ...t?.messages },
|
|
745
|
+
preview: { ...e?.preview, ...t?.preview },
|
|
746
|
+
xlsx: { ...e?.xlsx, ...t?.xlsx },
|
|
747
|
+
toolbar: { ...e?.toolbar, ...t?.toolbar },
|
|
748
|
+
interaction: { ...e?.interaction, ...t?.interaction },
|
|
749
|
+
output: { ...e?.output, ...t?.output },
|
|
750
|
+
printOptions: _e(e?.printOptions, t?.printOptions)
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
function ea(e) {
|
|
754
|
+
return {
|
|
755
|
+
showExport: e.showExport ?? T.showExport,
|
|
756
|
+
showPrint: e.showPrint ?? T.showPrint,
|
|
757
|
+
showPdfWindow: e.showPdfWindow ?? T.showPdfWindow,
|
|
758
|
+
showSettings: e.showSettings ?? T.showSettings,
|
|
759
|
+
showParams: e.showParams ?? T.showParams,
|
|
760
|
+
gapPx: e.gapPx ?? T.gapPx
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
function ma(e, t) {
|
|
764
|
+
const r = t ? e?.presets?.[t] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, n = H(e?.defaults, r);
|
|
765
|
+
return {
|
|
766
|
+
drill: n.drill,
|
|
767
|
+
loadParamOptions: n.loadParamOptions,
|
|
768
|
+
...ea(n),
|
|
769
|
+
pdfFontUrl: n.pdfFontUrl ?? T.pdfFontUrl,
|
|
770
|
+
theme: { ...Qe, ...n.theme },
|
|
771
|
+
messages: { ...Ye, ...n.messages },
|
|
772
|
+
logger: n.logger ?? T.logger,
|
|
773
|
+
preview: {
|
|
774
|
+
overscanPages: J(n.preview?.overscanPages, 1, 10, !0),
|
|
775
|
+
searchDebounceMs: J(n.preview?.searchDebounceMs, 200, 2e3)
|
|
776
|
+
},
|
|
777
|
+
xlsx: { ...n.xlsx },
|
|
778
|
+
editable: n.editable ?? !1,
|
|
779
|
+
excelImport: n.excelImport ?? !1,
|
|
780
|
+
toolbar: { ...n.toolbar },
|
|
781
|
+
interaction: { ...n.interaction },
|
|
782
|
+
preferences: n.preferences,
|
|
783
|
+
assets: n.assets,
|
|
784
|
+
guardChanges: n.guardChanges ?? !0,
|
|
785
|
+
beforeDiscard: n.beforeDiscard,
|
|
786
|
+
output: { ...n.output },
|
|
787
|
+
printOptions: n.printOptions
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
function J(e, t, r, n = !1) {
|
|
791
|
+
if (e == null || !Number.isFinite(e)) return t;
|
|
792
|
+
const s = Math.max(0, Math.min(r, e));
|
|
793
|
+
return n ? Math.floor(s) : s;
|
|
794
|
+
}
|
|
795
|
+
function ga(e) {
|
|
796
|
+
const t = {};
|
|
797
|
+
return e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), t;
|
|
798
|
+
}
|
|
799
|
+
function ba(e) {
|
|
800
|
+
const t = Z(W, null), r = O(() => {
|
|
801
|
+
const n = t?.value ?? null, s = "defaults" in e || "presets" in e || "defaultPreset" in e ? Ze(e) : { defaults: e, presets: {} };
|
|
802
|
+
if (!n) return s;
|
|
803
|
+
const u = { ...n.presets, ...s.presets };
|
|
804
|
+
for (const g of Object.keys(u))
|
|
805
|
+
u[g] = H(
|
|
806
|
+
H(n.presets[g], s.defaults),
|
|
807
|
+
s.presets[g]
|
|
808
|
+
);
|
|
809
|
+
return {
|
|
810
|
+
defaults: H(n.defaults, s.defaults),
|
|
811
|
+
presets: u,
|
|
812
|
+
defaultPreset: s.defaultPreset ?? n.defaultPreset
|
|
813
|
+
};
|
|
814
|
+
});
|
|
815
|
+
fe(W, r);
|
|
816
|
+
}
|
|
817
|
+
function ya() {
|
|
818
|
+
return Z(W, O(() => null));
|
|
819
|
+
}
|
|
820
|
+
export {
|
|
821
|
+
re as D,
|
|
822
|
+
L as M,
|
|
823
|
+
te as P,
|
|
824
|
+
ca as R,
|
|
825
|
+
va as S,
|
|
826
|
+
Ye as a,
|
|
827
|
+
ge as b,
|
|
828
|
+
Qe as c,
|
|
829
|
+
Ze as d,
|
|
830
|
+
pa as e,
|
|
831
|
+
ba as f,
|
|
832
|
+
ma as g,
|
|
833
|
+
oa as h,
|
|
834
|
+
be as i,
|
|
835
|
+
ua as j,
|
|
836
|
+
da as n,
|
|
837
|
+
ia as p,
|
|
838
|
+
fa as r,
|
|
839
|
+
sa as s,
|
|
840
|
+
ga as t,
|
|
841
|
+
ya as u
|
|
842
|
+
};
|