template-designer 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-c07992c6.mjs → index-de563dd6.mjs} +4 -4
- package/dist/{index.es-d003d54a.mjs → index.es-497c9945.mjs} +1 -1
- package/dist/{lodop-0160259f.mjs → lodop-037d5d00.mjs} +1 -1
- package/dist/{rfid-edc30ffb.mjs → rfid-579b1765.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-designer.es.js +1 -1
- package/dist/template-designer.umd.js +1 -1
- package/package.json +1 -1
|
@@ -7359,9 +7359,9 @@ const gQ = /* @__PURE__ */ Mt(hQ, [["render", pQ]]), Xg = [
|
|
|
7359
7359
|
], qg = Xg.flatMap((e) => e.components);
|
|
7360
7360
|
async function BQ(e) {
|
|
7361
7361
|
try {
|
|
7362
|
-
return (await ym(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-
|
|
7362
|
+
return (await ym(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-037d5d00.mjs"), "./props/rfid.js": () => import("./rfid-579b1765.mjs") }), `./props/${e}.js`)).default;
|
|
7363
7363
|
} catch {
|
|
7364
|
-
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-
|
|
7364
|
+
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-037d5d00.mjs")).default;
|
|
7365
7365
|
}
|
|
7366
7366
|
}
|
|
7367
7367
|
function mQ(e = {}, A = {}) {
|
|
@@ -14967,7 +14967,7 @@ const IT = { class: "label-designer" }, VT = { class: "toolbar" }, MT = { class:
|
|
|
14967
14967
|
]);
|
|
14968
14968
|
};
|
|
14969
14969
|
}
|
|
14970
|
-
}, FI = /* @__PURE__ */ Mt(yI, [["__scopeId", "data-v-
|
|
14970
|
+
}, FI = /* @__PURE__ */ Mt(yI, [["__scopeId", "data-v-1cb9afe7"]]);
|
|
14971
14971
|
const CI = {
|
|
14972
14972
|
__name: "index",
|
|
14973
14973
|
props: {
|
|
@@ -23076,7 +23076,7 @@ function(e) {
|
|
|
23076
23076
|
*/
|
|
23077
23077
|
function(e) {
|
|
23078
23078
|
function A() {
|
|
23079
|
-
return (de.canvg ? Promise.resolve(de.canvg) : import("./index.es-
|
|
23079
|
+
return (de.canvg ? Promise.resolve(de.canvg) : import("./index.es-497c9945.mjs")).catch(function(t) {
|
|
23080
23080
|
return Promise.reject(new Error("Could not load canvg: " + t));
|
|
23081
23081
|
}).then(function(t) {
|
|
23082
23082
|
return t.default ? t.default : t;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);will-change:transform}.td-text-content{width:100%;min-width:0;box-sizing:border-box;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1}.label[data-v-16072986]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-16072986]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-16072986]:hover{color:var(--el-color-primary)}.property-item[data-v-16072986]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-16072986]{font-size:14px;color:#666}.property-item input[data-v-16072986],.property-item select[data-v-16072986]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-16072986]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-16072986]{width:16px;height:16px}.file-input-container[data-v-16072986]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-16072986]{height:100%!important}.file-url-input[data-v-16072986]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-16072986]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-16072986]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-16072986]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-16072986]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-16072986]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-16072986]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-16072986]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-16072986]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-16072986]:hover{background-color:#fff2f0}.property-item .el-select[data-v-16072986]{width:100%}.property-item .el-select .el-input__wrapper[data-v-16072986]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-16072986]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-16072986]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-16072986]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-16072986]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-16072986]{height:28px;line-height:28px}.property-panel[data-v-4b4a18c5]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-4b4a18c5]{margin-bottom:16px}.property-group-title[data-v-4b4a18c5]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-4b4a18c5]{margin-bottom:12px}.text-property-panel .property-item[data-v-4b4a18c5]:last-child,.barcode-property-panel .property-item[data-v-4b4a18c5]:last-child,.qrcode-property-panel .property-item[data-v-4b4a18c5]:last-child,.image-property-panel .property-item[data-v-4b4a18c5]:last-child,.rectangle-property-panel .property-item[data-v-4b4a18c5]:last-child,.line-property-panel .property-item[data-v-4b4a18c5]:last-child,.verline-property-panel .property-item[data-v-4b4a18c5]:last-child{margin-bottom:0}.property-layout-container[data-v-4b4a18c5]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-4b4a18c5]{margin-bottom:0}.property-item-wrapper.full-width[data-v-4b4a18c5]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-4b4a18c5]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-4b4a18c5]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-4b4a18c5]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-289bd7f0]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-289bd7f0]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-289bd7f0]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:auto;image-rendering:-webkit-optimize-contrast;image-rendering:smooth;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:contain;object-position:center}.component-selection-overlay[data-v-289bd7f0]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-b85fcbca]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-b85fcbca]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-b85fcbca]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-b85fcbca]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-b85fcbca]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-f0df7b80]{position:absolute;z-index:1}.ruler.horizontal[data-v-f0df7b80]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-f0df7b80]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-f0df7b80]{position:absolute}.ruler.horizontal .ruler-unit[data-v-f0df7b80]{height:100%}.ruler.vertical .ruler-unit[data-v-f0df7b80]{width:100%}.ruler-mark[data-v-f0df7b80]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-f0df7b80]{bottom:0}.ruler.vertical .ruler-mark[data-v-f0df7b80]{right:0}.ruler-text[data-v-f0df7b80]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-f0df7b80]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-f0df7b80]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-11f07674]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-11f07674]{display:flex;align-items:center}.tg-title p[data-v-11f07674]{font-size:18px;font-weight:700}.tge-main[data-v-11f07674]{max-height:82vh;padding:0}.tge-text[data-v-11f07674]{font-size:14px;line-height:26px}.tge-content[data-v-11f07674]{display:flex;width:100%}.tge-block[data-v-11f07674]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-11f07674]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-11f07674]{width:100%;height:auto}.table-container[data-v-11f07674]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-11f07674]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-11f07674]{margin-top:10px}.tge-divider[data-v-11f07674]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-141dd6ea]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-141dd6ea]{display:flex;height:100%}.toolbar[data-v-141dd6ea]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-141dd6ea]{width:44px;text-align:center}.zoom-controls[data-v-141dd6ea]{display:flex;align-items:center;gap:8px;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-141dd6ea]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-141dd6ea]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-141dd6ea]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-141dd6ea]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0}.canvas-container[data-v-141dd6ea]{flex:1;padding:0 16px 16px;overflow:auto;position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-141dd6ea]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-141dd6ea]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-141dd6ea]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-141dd6ea]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-141dd6ea]{width:260px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-operate[data-v-141dd6ea]{display:flex;align-items:center;margin-top:10px}.property-panel-title[data-v-141dd6ea]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:0;gap:8px}.property-panel-title .help-icon[data-v-141dd6ea]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-141dd6ea]:hover{color:var(--el-color-primary)}.position-controls[data-v-141dd6ea]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-141dd6ea]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-141dd6ea]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-141dd6ea]{display:flex;align-items:center;gap:4px}.number-input input[data-v-141dd6ea]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-141dd6ea]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.rotation-display[data-v-141dd6ea]{display:flex;align-items:center;justify-content:center;min-width:40px;height:24px;font-size:12px;color:#666;border:1px solid #ddd;background:#f9f9f9;border-radius:4px}.canvas-item[data-v-141dd6ea]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-141dd6ea]{position:absolute;width:4px;height:4px;background:#ffffff;border:.5px solid var(--el-color-primary-light-3);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-141dd6ea]{top:-2px;left:-2px}.resize-handle.top[data-v-141dd6ea]{top:-2px;left:50%;transform:translate(-50%);width:6px;height:3px;border-radius:1px}.resize-handle.top-right[data-v-141dd6ea]{top:-2px;right:-2px}.resize-handle.right[data-v-141dd6ea]{top:50%;right:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1px}.resize-handle.bottom-right[data-v-141dd6ea]{bottom:-2px;right:-2px}.resize-handle.bottom[data-v-141dd6ea]{bottom:-2px;left:50%;transform:translate(-50%);width:6px;height:3px;border-radius:1px}.resize-handle.bottom-left[data-v-141dd6ea]{bottom:-2px;left:-2px}.resize-handle.left[data-v-141dd6ea]{top:50%;left:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1px}.resize-handle.line-anchor[data-v-141dd6ea]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-141dd6ea]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-141dd6ea]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-141dd6ea]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.delete-btn.delete-btn-centered[data-v-141dd6ea]{margin-left:0}.drag-extend-lines[data-v-141dd6ea]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-141dd6ea]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-141dd6ea]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-141dd6ea]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-141dd6ea]{position:absolute;border:1px dashed var(--el-color-primary-light-3);pointer-events:none;z-index:998}.alignment-guides[data-v-141dd6ea]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-141dd6ea]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-141dd6ea]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-141dd6ea]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-141dd6ea]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-141dd6ea]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-141dd6ea]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-141dd6ea]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-141dd6ea]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-141dd6ea]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.alignment-guide.guide-boundary[data-v-141dd6ea]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:3px 1px}.alignment-guide.guide-boundary.vertical[data-v-141dd6ea]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 3px}.number-input input[type=number][data-v-141dd6ea]::-webkit-inner-spin-button,.number-input input[type=number][data-v-141dd6ea]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-141dd6ea]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-141dd6ea]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary-light-3)}.component-selected[data-v-141dd6ea]{outline:1px dashed var(--el-color-info-light-3)!important;outline-offset:0!important}.component-current[data-v-141dd6ea]{outline:1px dashed var(--el-color-primary-light-3)!important;outline-offset:0!important}.component-selected[data-v-141dd6ea],.component-current[data-v-141dd6ea]{box-sizing:border-box}.component-config-missing[data-v-141dd6ea]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-141dd6ea]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-141dd6ea]{font-size:14px;color:#ffc107}.loader-container[data-v-141dd6ea]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-141dd6ea]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-141dd6ea]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-141dd6ea]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-141dd6ea 1s linear infinite}.loader-circle[data-v-141dd6ea]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-141dd6ea 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-141dd6ea{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-141dd6ea{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
|
|
1
|
+
.td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);will-change:transform}.td-text-content{width:100%;min-width:0;box-sizing:border-box;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1}.label[data-v-16072986]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-16072986]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-16072986]:hover{color:var(--el-color-primary)}.property-item[data-v-16072986]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-16072986]{font-size:14px;color:#666}.property-item input[data-v-16072986],.property-item select[data-v-16072986]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-16072986]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-16072986]{width:16px;height:16px}.file-input-container[data-v-16072986]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-16072986]{height:100%!important}.file-url-input[data-v-16072986]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-16072986]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-16072986]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-16072986]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-16072986]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-16072986]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-16072986]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-16072986]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-16072986]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-16072986]:hover{background-color:#fff2f0}.property-item .el-select[data-v-16072986]{width:100%}.property-item .el-select .el-input__wrapper[data-v-16072986]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-16072986]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-16072986]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-16072986]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-16072986]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-16072986]{height:28px;line-height:28px}.property-panel[data-v-4b4a18c5]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-4b4a18c5]{margin-bottom:16px}.property-group-title[data-v-4b4a18c5]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-4b4a18c5]{margin-bottom:12px}.text-property-panel .property-item[data-v-4b4a18c5]:last-child,.barcode-property-panel .property-item[data-v-4b4a18c5]:last-child,.qrcode-property-panel .property-item[data-v-4b4a18c5]:last-child,.image-property-panel .property-item[data-v-4b4a18c5]:last-child,.rectangle-property-panel .property-item[data-v-4b4a18c5]:last-child,.line-property-panel .property-item[data-v-4b4a18c5]:last-child,.verline-property-panel .property-item[data-v-4b4a18c5]:last-child{margin-bottom:0}.property-layout-container[data-v-4b4a18c5]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-4b4a18c5]{margin-bottom:0}.property-item-wrapper.full-width[data-v-4b4a18c5]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-4b4a18c5]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-4b4a18c5]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-4b4a18c5]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-289bd7f0]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-289bd7f0]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-289bd7f0]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:auto;image-rendering:-webkit-optimize-contrast;image-rendering:smooth;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:contain;object-position:center}.component-selection-overlay[data-v-289bd7f0]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-b85fcbca]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-b85fcbca]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-b85fcbca]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-b85fcbca]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-b85fcbca]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-f0df7b80]{position:absolute;z-index:1}.ruler.horizontal[data-v-f0df7b80]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-f0df7b80]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-f0df7b80]{position:absolute}.ruler.horizontal .ruler-unit[data-v-f0df7b80]{height:100%}.ruler.vertical .ruler-unit[data-v-f0df7b80]{width:100%}.ruler-mark[data-v-f0df7b80]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-f0df7b80]{bottom:0}.ruler.vertical .ruler-mark[data-v-f0df7b80]{right:0}.ruler-text[data-v-f0df7b80]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-f0df7b80]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-f0df7b80]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-11f07674]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-11f07674]{display:flex;align-items:center}.tg-title p[data-v-11f07674]{font-size:18px;font-weight:700}.tge-main[data-v-11f07674]{max-height:82vh;padding:0}.tge-text[data-v-11f07674]{font-size:14px;line-height:26px}.tge-content[data-v-11f07674]{display:flex;width:100%}.tge-block[data-v-11f07674]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-11f07674]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-11f07674]{width:100%;height:auto}.table-container[data-v-11f07674]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-11f07674]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-11f07674]{margin-top:10px}.tge-divider[data-v-11f07674]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-1cb9afe7]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-1cb9afe7]{display:flex;height:100%}.toolbar[data-v-1cb9afe7]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-1cb9afe7]{width:44px;text-align:center}.zoom-controls[data-v-1cb9afe7]{display:flex;align-items:center;gap:8px;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-1cb9afe7]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-1cb9afe7]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-1cb9afe7]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-1cb9afe7]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0}.canvas-container[data-v-1cb9afe7]{flex:1;padding:0 16px 16px;overflow:auto;position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-1cb9afe7]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-1cb9afe7]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-1cb9afe7]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-1cb9afe7]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-1cb9afe7]{width:300px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-operate[data-v-1cb9afe7]{display:flex;align-items:center;margin-top:10px}.property-panel-title[data-v-1cb9afe7]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:0;gap:8px}.property-panel-title .help-icon[data-v-1cb9afe7]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-1cb9afe7]:hover{color:var(--el-color-primary)}.position-controls[data-v-1cb9afe7]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-1cb9afe7]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-1cb9afe7]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-1cb9afe7]{display:flex;align-items:center;gap:4px}.number-input input[data-v-1cb9afe7]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-1cb9afe7]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.rotation-display[data-v-1cb9afe7]{display:flex;align-items:center;justify-content:center;min-width:40px;height:24px;font-size:12px;color:#666;border:1px solid #ddd;background:#f9f9f9;border-radius:4px}.canvas-item[data-v-1cb9afe7]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-1cb9afe7]{position:absolute;width:4px;height:4px;background:#ffffff;border:.5px solid var(--el-color-primary-light-3);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-1cb9afe7]{top:-2px;left:-2px}.resize-handle.top[data-v-1cb9afe7]{top:-2px;left:50%;transform:translate(-50%);width:6px;height:3px;border-radius:1px}.resize-handle.top-right[data-v-1cb9afe7]{top:-2px;right:-2px}.resize-handle.right[data-v-1cb9afe7]{top:50%;right:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1px}.resize-handle.bottom-right[data-v-1cb9afe7]{bottom:-2px;right:-2px}.resize-handle.bottom[data-v-1cb9afe7]{bottom:-2px;left:50%;transform:translate(-50%);width:6px;height:3px;border-radius:1px}.resize-handle.bottom-left[data-v-1cb9afe7]{bottom:-2px;left:-2px}.resize-handle.left[data-v-1cb9afe7]{top:50%;left:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1px}.resize-handle.line-anchor[data-v-1cb9afe7]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-1cb9afe7]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-1cb9afe7]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-1cb9afe7]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.delete-btn.delete-btn-centered[data-v-1cb9afe7]{margin-left:0}.drag-extend-lines[data-v-1cb9afe7]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-1cb9afe7]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-1cb9afe7]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-1cb9afe7]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-1cb9afe7]{position:absolute;border:1px dashed var(--el-color-primary-light-3);pointer-events:none;z-index:998}.alignment-guides[data-v-1cb9afe7]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-1cb9afe7]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-1cb9afe7]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-1cb9afe7]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-1cb9afe7]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-1cb9afe7]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-1cb9afe7]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-1cb9afe7]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-1cb9afe7]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-1cb9afe7]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.alignment-guide.guide-boundary[data-v-1cb9afe7]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:3px 1px}.alignment-guide.guide-boundary.vertical[data-v-1cb9afe7]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 3px}.number-input input[type=number][data-v-1cb9afe7]::-webkit-inner-spin-button,.number-input input[type=number][data-v-1cb9afe7]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-1cb9afe7]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-1cb9afe7]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary-light-3)}.component-selected[data-v-1cb9afe7]{outline:1px dashed var(--el-color-info-light-3)!important;outline-offset:0!important}.component-current[data-v-1cb9afe7]{outline:1px dashed var(--el-color-primary-light-3)!important;outline-offset:0!important}.component-selected[data-v-1cb9afe7],.component-current[data-v-1cb9afe7]{box-sizing:border-box}.component-config-missing[data-v-1cb9afe7]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-1cb9afe7]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-1cb9afe7]{font-size:14px;color:#ffc107}.loader-container[data-v-1cb9afe7]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-1cb9afe7]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-1cb9afe7]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-1cb9afe7]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-1cb9afe7 1s linear infinite}.loader-circle[data-v-1cb9afe7]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-1cb9afe7 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-1cb9afe7{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-1cb9afe7{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
|
|
@@ -56,7 +56,7 @@ Minimum version required to store current data is: `+a+`.
|
|
|
56
56
|
content: "" !important;
|
|
57
57
|
display: none !important;
|
|
58
58
|
}`,x8=function(t){R8(t,"."+sp+Q8+Xw+`
|
|
59
|
-
.`+lp+T8+Xw)},R8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},qw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),I8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(up(e)||O8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return Br(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=qw.isSameOrigin(e),r=!cp(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!cp(e)&&!A&&!up(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!cp(e)&&!up(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(k8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),V8=/^data:image\/svg\+xml/i,M8=/^data:image\/.*;base64,/i,L8=/^data:image\/.*/i,O8=function(t){return $A.SUPPORT_SVG_DRAWING||!H8(t)},cp=function(t){return L8.test(t)},k8=function(t){return M8.test(t)},up=function(t){return t.substr(0,4)==="blob"},H8=function(t){return t.substr(-3).toLowerCase()==="svg"||V8.test(t)},Ge=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),xo=function(t,e,A){return new Ge(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Lu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=xo(this.start,this.startControl,e),n=xo(this.startControl,this.endControl,e),a=xo(this.endControl,this.end,e),i=xo(r,n,e),o=xo(n,a,e),s=xo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$r=function(t){return t.type===1},D8=function(){function t(e){var A=e.styles,r=e.bounds,n=sl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=sl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=sl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=sl(A.borderBottomLeftRadius,r.width,r.height),w=h[0],B=h[1],C=[];C.push((a+s)/r.width),C.push((w+d)/r.width),C.push((i+B)/r.height),C.push((l+g)/r.height);var v=Math.max.apply(Math,C);v>1&&(a/=v,i/=v,s/=v,l/=v,d/=v,g/=v,w/=v,B/=v);var y=r.width-s,F=r.height-g,Q=r.width-d,M=r.height-B,L=A.borderTopWidth,V=A.borderRightWidth,k=A.borderBottomWidth,W=A.borderLeftWidth,T=tA(A.paddingTop,e.bounds.width),N=tA(A.paddingRight,e.bounds.width),E=tA(A.paddingBottom,e.bounds.width),x=tA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+W/3,r.top+L/3,a-W/3,i-L/3,Zt.TOP_LEFT):new Ge(r.left+W/3,r.top+L/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+y,r.top+L/3,s-V/3,l-L/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V/3,g-k/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/3,r.top+r.height-k/3),this.bottomLeftBorderDoubleOuterBox=w>0||B>0?uA(r.left+W/3,r.top+M,w-W/3,B-k/3,Zt.BOTTOM_LEFT):new Ge(r.left+W/3,r.top+r.height-k/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+W*2/3,r.top+L*2/3,a-W*2/3,i-L*2/3,Zt.TOP_LEFT):new Ge(r.left+W*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+y,r.top+L*2/3,s-V*2/3,l-L*2/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V*2/3,g-k*2/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+r.height-k*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||B>0?uA(r.left+W*2/3,r.top+M,w-W*2/3,B-k*2/3,Zt.BOTTOM_LEFT):new Ge(r.left+W*2/3,r.top+r.height-k*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+W/2,r.top+L/2,a-W/2,i-L/2,Zt.TOP_LEFT):new Ge(r.left+W/2,r.top+L/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+y,r.top+L/2,s-V/2,l-L/2,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/2,r.top+L/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+Q,r.top+F,d-V/2,g-k/2,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/2,r.top+r.height-k/2),this.bottomLeftBorderStroke=w>0||B>0?uA(r.left+W/2,r.top+M,w-W/2,B-k/2,Zt.BOTTOM_LEFT):new Ge(r.left+W/2,r.top+r.height-k/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Zt.TOP_LEFT):new Ge(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+y,r.top,s,l,Zt.TOP_RIGHT):new Ge(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+Q,r.top+F,d,g,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=w>0||B>0?uA(r.left,r.top+M,w,B,Zt.BOTTOM_LEFT):new Ge(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+W,r.top+L,Math.max(0,a-W),Math.max(0,i-L),Zt.TOP_LEFT):new Ge(r.left+W,r.top+L),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(y,r.width-V),r.top+L,y>r.width+V?0:Math.max(0,s-V),Math.max(0,l-L),Zt.TOP_RIGHT):new Ge(r.left+r.width-V,r.top+L),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-W),r.top+Math.min(F,r.height-k),Math.max(0,d-V),Math.max(0,g-k),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V,r.top+r.height-k),this.bottomLeftPaddingBox=w>0||B>0?uA(r.left+W,r.top+Math.min(M,r.height-k),Math.max(0,w-W),Math.max(0,B-k),Zt.BOTTOM_LEFT):new Ge(r.left+W,r.top+r.height-k),this.topLeftContentBox=a>0||i>0?uA(r.left+W+x,r.top+L+T,Math.max(0,a-(W+x)),Math.max(0,i-(L+T)),Zt.TOP_LEFT):new Ge(r.left+W+x,r.top+L+T),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(y,r.width+W+x),r.top+L+T,y>r.width+W+x?0:s-W+x,l-(L+T),Zt.TOP_RIGHT):new Ge(r.left+r.width-(V+N),r.top+L+T),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-(W+x)),r.top+Math.min(F,r.height+L+T),Math.max(0,d-(V+N)),g-(k+E),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-(V+N),r.top+r.height-(k+E)),this.bottomLeftContentBox=w>0||B>0?uA(r.left+W+x,r.top+M,Math.max(0,w-(W+x)),B-(k+E),Zt.BOTTOM_LEFT):new Ge(r.left+W+x,r.top+r.height-(k+E))}return t}(),Zt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Zt||(Zt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Zt.TOP_LEFT:return new Lu(new Ge(t,l),new Ge(t,l-o),new Ge(s-i,e),new Ge(s,e));case Zt.TOP_RIGHT:return new Lu(new Ge(t,e),new Ge(t+i,e),new Ge(s,l-o),new Ge(s,l));case Zt.BOTTOM_RIGHT:return new Lu(new Ge(s,e),new Ge(s,e+o),new Ge(t+i,l),new Ge(t,l));case Zt.BOTTOM_LEFT:default:return new Lu(new Ge(s,l),new Ge(s-i,l),new Ge(t,e+o),new Ge(t,e))}},Ou=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},P8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},ku=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},W8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Hu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),_8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),Z8=function(t){return t.type===0},$w=function(t){return t.type===1},j8=function(t){return t.type===2},ey=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},J8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},ty=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Ay=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new D8(this.container),this.container.styles.opacity<1&&this.effects.push(new _8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new W8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Ou(this.curves),o=ku(this.curves);ey(i,o)?this.effects.push(new Hu(i,6)):(this.effects.push(new Hu(i,2)),this.effects.push(new Hu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!$w(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Ou(r.curves),o=ku(r.curves);ey(i,o)||n.unshift(new Hu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return WA(s.target,e)})},t}(),fp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=WA(n.flags,4),i=WA(n.flags,2),o=new Ay(n,t);WA(n.styles.display,2048)&&r.push(o);var s=WA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new ty(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(w,B){return d>w.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(w,B){return d>=w.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);fp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),fp(o,e,A,s);WA(n.flags,8)&&ry(n,s)})},ry=function(t,e){for(var A=t instanceof tp?t.start:1,r=t instanceof tp?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Sw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=dl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},K8=function(t){var e=new Ay(t,null),A=new ty(e),r=[];return fp(e,A,A,r),ry(e.container,r),A},ny=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},G8=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return en(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},z8=function(t,e){switch(e){case 0:return en(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},Y8=function(t,e){switch(e){case 0:return Du(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Du(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Du(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Du(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Du=function(t,e){var A=[];return $r(t)?A.push(t.subdivide(.5,!1)):A.push(t),$r(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},en=function(t,e,A,r){var n=[];return $r(t)?n.push(t.subdivide(.5,!1)):n.push(t),$r(A)?n.push(A.subdivide(.5,!0)):n.push(A),$r(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),$r(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ay=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Pu=function(t){var e=t.styles,A=t.bounds,r=tA(e.paddingLeft,A.width),n=tA(e.paddingRight,A.width),a=tA(e.paddingTop,A.width),i=tA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},X8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},q8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},hp=function(t,e,A){var r=X8(Io(t.styles.backgroundOrigin,e),t),n=q8(Io(t.styles.backgroundClip,e),t),a=$8(Io(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=sl(Io(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=eH(Io(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Ro=function(t){return zt(t)&&t.value===No.AUTO},Wu=function(t){return typeof t=="number"},$8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(LA(i)&&o&&LA(o))return[tA(i,A.width),tA(o,A.height)];var s=Wu(a);if(zt(i)&&(i.value===No.CONTAIN||i.value===No.COVER)){if(Wu(a)){var l=A.width/A.height;return l<a!=(i.value===No.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Wu(r),d=Wu(n),g=u||d;if(Ro(i)&&(!o||Ro(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,w=d?n:r/a;return[h,w]}var B=u?r:A.width,C=d?n:A.height;return[B,C]}if(s){var v=0,y=0;return LA(i)?v=tA(i,A.width):LA(o)&&(y=tA(o,A.height)),Ro(i)?v=y*a:(!o||Ro(o))&&(y=v/a),[v,y]}var F=null,Q=null;if(LA(i)?F=tA(i,A.width):o&&LA(o)&&(Q=tA(o,A.height)),F!==null&&(!o||Ro(o))&&(Q=u&&d?F/r*n:A.height),Q!==null&&Ro(i)&&(F=u&&d?Q/n*r:A.width),F!==null&&Q!==null)return[F,Q];throw new Error("Unable to calculate background-size for element")},Io=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},eH=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ge(Math.round(r.left),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ge(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ge(Math.round(r.left+a),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ge(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ge(Math.round(r.left+a),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ge(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ge(Math.round(n.left),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ge(Math.round(n.left),Math.round(n.height+n.top))]}},tH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",iy="Hidden Text",AH=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=tH,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(iy)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(iy)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),oy=function(){function t(e,A){this.context=e,this.options=A}return t}(),rH=1e4,nH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new AH(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),j8(A)&&(this.ctx.globalAlpha=A.opacity),Z8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),$w(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return Br(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(WA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=ep(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=lH(A.fontFamily).join(", "),a=ol(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return Br(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(w){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(w,r.letterSpacing,l);var C=r.textShadow;C.length&&w.text.trim().length&&(C.slice(0).reverse().forEach(function(v){g.ctx.shadowColor=JA(v.color),g.ctx.shadowOffsetX=v.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=v.offsetY.number*g.options.scale,g.ctx.shadowBlur=v.blur.number,g.renderTextWithLetterSpacing(w,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(v){switch(v){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+l),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+u),w.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Pu(A),i=ku(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,y,y,l,u,d,g,Q,h,w,M,B,C,v,y,F,Q,M;return ir(this,function(L){switch(L.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,L.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:L.sent(),L.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof Uw))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof Fw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Nw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Rw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=L.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof Ap&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ge(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ge(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ge(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ge(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ge(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore()):r.type===xu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore())),aH(r)&&r.value.length){switch(g=this.createFontStyle(a),Q=g[0],h=g[1],w=this.fontMetrics.getMetrics(Q,h).baseline,this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=oH(r.styles.textAlign),M=Pu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}C=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new Ge(M.left,M.top),new Ge(M.left+M.width,M.top),new Ge(M.left+M.width,M.top+M.height),new Ge(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fl(r.value,C),a.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!WA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(v=r.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,F=v.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(F)];case 16:return y=L.sent(),this.ctx.drawImage(y,r.bounds.left-(y.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+F),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(Q=this.createFontStyle(a)[0],this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+tA(r.styles.paddingTop,r.bounds.width),r.bounds.width,iw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fl(A.listValue,M),a.letterSpacing,iw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return Br(this,void 0,void 0,function(){var r,n,v,a,i,v,o,s,v,l,u,v,d,g,v,h,w,v,B,C,v;return ir(this,function(y){switch(y.label){case 0:if(WA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:y.sent(),r=0,n=A.negativeZIndex,y.label=2;case 2:return r<n.length?(v=n[r],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:y.sent(),a=0,i=A.nonInlineLevel,y.label=7;case 7:return a<i.length?(v=i[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,y.label=11;case 11:return o<s.length?(v=s[o],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,y.label=19;case 19:return d<g.length?(v=g[d],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return d++,[3,19];case 22:h=0,w=A.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return h<w.length?(v=w[h],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return h++,[3,23];case 26:B=0,C=A.positiveZIndex,y.label=27;case 27:return B<C.length?(v=C[B],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=$r(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),$r(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,T,G,Y,x,O,k,w,T,G,Y,x,O,B,C,v,y,F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z,Z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=hp(A,r,[d.width,d.height,d.width/d.height]),T=h[0],G=h[1],Y=h[2],x=h[3],O=h[4],k=a.ctx.createPattern(a.resizeImage(d,x,O),"repeat"),a.renderRepeat(T,k,G,Y)),[3,6];case 5:ZO(u)?(w=hp(A,r,[null,null,null]),T=w[0],G=w[1],Y=w[2],x=w[3],O=w[4],B=HO(u.angle,x,O),C=B[0],v=B[1],y=B[2],F=B[3],Q=B[4],M=document.createElement("canvas"),M.width=x,M.height=O,L=M.getContext("2d"),V=L.createLinearGradient(v,F,y,Q),zB(u.stops,C).forEach(function(ne){return V.addColorStop(ne.stop,JA(ne.color))}),L.fillStyle=V,L.fillRect(0,0,x,O),x>0&&O>0&&(k=a.ctx.createPattern(M,"repeat"),a.renderRepeat(T,k,G,Y))):jO(u)&&(W=hp(A,r,[null,null,null]),T=W[0],N=W[1],E=W[2],x=W[3],O=W[4],j=u.position.length===0?[H0]:u.position,G=tA(j[0],x),Y=tA(j[j.length-1],O),K=DO(u,G,Y,x,O),q=K[0],ee=K[1],q>0&&ee>0&&(ie=a.ctx.createRadialGradient(N+G,E+Y,0,N+G,E+Y,q),zB(u.stops,q*2).forEach(function(ne){return ie.addColorStop(ne.stop,JA(ne.color))}),a.path(T),a.ctx.fillStyle=ie,q!==ee?(S=A.bounds.left+.5*A.bounds.width,H=A.bounds.top+.5*A.bounds.height,z=ee/q,Z=1/z,a.ctx.save(),a.ctx.translate(S,H),a.ctx.transform(1,0,0,z,0,0),a.ctx.translate(-S,-H),a.ctx.fillRect(N,Z*(E-H)+H,x,O*Z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return Br(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ny(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return Br(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=G8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=z8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Sa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=iH(Io(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Sa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var w=Ou(A.curves),B=h.inset?0:rH,C=J8(w,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(w),d.ctx.clip(),d.mask(C)):(d.mask(w),d.ctx.clip(),d.path(C)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Sa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return Br(this,void 0,void 0,function(){var o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,L,M,L;return ir(this,function(V){return this.ctx.save(),o=Y8(a,n),s=ny(a,n),i===2&&(this.path(s),this.ctx.clip()),$r(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),$r(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),w=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(w=r,B=r),C=!0,h<=w*2?C=!1:h<=w*2+B?(v=h/(2*w+B),w*=v,B*=v):(y=Math.floor((h+B)/(w+B)),F=(h-y*w)/(y-1),Q=(h-(y+1)*w)/y,B=Q<=0||Math.abs(B-F)<Math.abs(B-Q)?F:Q),C&&(i===3?this.ctx.setLineDash([0,w+B]):this.ctx.setLineDash([w,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&($r(s[0])&&(M=s[3],L=s[0],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke()),$r(s[1])&&(M=s[1],L=s[2],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=K8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(oy),aH=function(t){return t instanceof xw||t instanceof Tw?!0:t instanceof Ap&&t.type!==xu&&t.type!==Tu},iH=function(t,e){switch(t){case 0:return Ou(e);case 2:return P8(e);case 1:default:return ku(e)}},oH=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},sH=["-apple-system","system-ui"],lH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return sH.indexOf(e)===-1}):t},cH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=$0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,uH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(oy),uH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},fH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Yc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),hH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new fH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new I8(this,e)}return t.instanceCount=1,t}(),sy=function(t,e){return e===void 0&&(e={}),dH(t,e)};typeof window<"u"&&qw.setContext(window);var dH=function(t,e){return Br(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,V,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z;return ir(this,function(Z){switch(Z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(k=e.allowTaint)!==null&&k!==void 0?k:!1,imageTimeout:(W=e.imageTimeout)!==null&&W!==void 0?W:15e3,proxy:e.proxy,useCORS:(T=e.useCORS)!==null&&T!==void 0?T:!1},a=v0({logging:(N=e.logging)!==null&&N!==void 0?N:!0,cache:e.cache},n),i={windowWidth:(E=e.windowWidth)!==null&&E!==void 0?E:r.innerWidth,windowHeight:(x=e.windowHeight)!==null&&x!==void 0?x:r.innerHeight,scrollX:(O=e.scrollX)!==null&&O!==void 0?O:r.pageXOffset,scrollY:(j=e.scrollY)!==null&&j!==void 0?j:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new hH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(Y=e.allowTaint)!==null&&Y!==void 0?Y:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Yw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=Z.sent(),w=np(g)||g8(g)?JM(g.ownerDocument):Xc(s,g),B=w.width,C=w.height,v=w.left,y=w.top,F=pH(s,g,e.backgroundColor),Q={canvas:e.canvas,backgroundColor:F,scale:(q=(K=e.scale)!==null&&K!==void 0?K:r.devicePixelRatio)!==null&&q!==void 0?q:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+v,y:((ie=e.y)!==null&&ie!==void 0?ie:0)+y,width:(S=e.width)!==null&&S!==void 0?S:Math.ceil(B),height:(H=e.height)!==null&&H!==void 0?H:Math.ceil(C)},l?(s.logger.debug("Document cloned, using foreign object rendering"),V=new cH(s,Q),[4,V.render(g)]):[3,3];case 2:return M=Z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+v+","+y+" with size "+B+"x"+C+" using computed rendering"),s.logger.debug("Starting DOM parsing"),L=Vw(s,g),F===L.styles.backgroundColor&&(L.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),V=new nH(s,Q),[4,V.render(L)];case 4:M=Z.sent(),Z.label=5;case 5:return(!((z=e.removeContainer)!==null&&z!==void 0)||z)&&(Yw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},pH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ll(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?ll(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?ll(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Sa(n)?Sa(a)?i:a:n:i};const ly=Object.freeze(Object.defineProperty({__proto__:null,default:sy},Symbol.toStringTag,{value:"Module"})),i$="",gH={class:"label-designer"},mH={class:"toolbar"},vH={class:"center-container"},BH={key:0,class:"loader-container"},wH={class:"zoom-controls"},yH=["disabled"],bH=["disabled"],CH={class:"ruler-horizontal"},EH={class:"ruler-vertical"},UH={key:0,class:"drag-extend-lines"},FH={key:1,class:"alignment-guides"},NH=["data-item-id","onMousedown"],SH=["onMousedown"],QH=["onMousedown"],TH=["onMousedown"],xH=["onMousedown"],RH=["onMousedown"],IH=["onMousedown"],VH=["onMousedown"],MH=["onMousedown"],LH=["onMousedown"],OH={class:"property-panel",tabindex:"0"},kH={class:"property-panel-operate"},HH={class:"property-panel-title"},DH=["innerHTML"],PH={class:"position-controls"},WH={class:"control-group"},_H={class:"number-input"},ZH=["value"],jH={class:"control-group"},JH={class:"number-input"},KH=["value"],GH={key:0,class:"control-group"},zH={class:"number-input"},YH=["value"],XH={key:1,class:"control-group"},qH={class:"number-input"},$H=["value"],eD={key:2,class:"control-group"},tD={class:"number-input"},AD={class:"rotation-display"},rD={key:3,class:"control-group"},nD={class:"switch-input"},_u=.05,aD=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printWidth)||0}),u=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new hi(dA.CACHE.STYLE_CACHE_SIZE),w=new hi(dA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map($v.map(ae=>[ae.type,ae])),{selectedItems:C,selectItem:v,getCurrentSelected:y,clearSelection:F}=LM(),{dragging:Q,dragItem:M,startDrag:L}=VM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:v,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{x()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),O()},onDragUpdate:()=>{x()}}),{startResize:V,resizing:k,resizeDirection:W,resizeItem:T}=MM(l,u,o,C,()=>{const ae=y();K(ae)}),{alignmentGuides:N,showGuides:E,updateAlignmentGuides:x,clearAlignmentGuides:O}=ZM({items:i,dragItem:M,resizeItem:T,dragging:Q,resizing:k,resizeDirection:W,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:j,adjustRotation:G,adjustComponentToFitCanvas:Y,updateAspectRatio:K}=WM(C,l,u);f.watch(()=>C.value,()=>{h.clear()},{deep:!0}),f.watch(()=>k.value,ae=>{ae?x():O()}),f.watch(()=>{var ae;return(ae=T.value)==null?void 0:ae.props},()=>{k.value&&x()},{deep:!0}),f.watch(()=>M.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>T.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>i.value,()=>{(Q.value||k.value)&&x()},{deep:!0});const q=(ae,Ae)=>{var Be;(!Ae||Number(Ae)<=0&&(ae==="width"||ae==="height"))&&ot((Be=y())==null?void 0:Be.id)},ee=ae=>{const Ae=`${ae.id}_${Ce(ae.props.x,1)}_${Ce(ae.props.y,1)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}`;if(w.has(Ae))return w.get(Ae);const Be=pi(ae.props.x,ae.props.y,ae.props.width,ae.props.height,ae.props.rotation||0);return w.set(Ae,Be),Be},ie=ae=>{const Ae=ee(ae),Be=Gs(Ae);return{minX:Ce(Be.minX,3),maxX:Ce(Be.maxX,3),minY:Ce(Be.minY,3),maxY:Ce(Be.maxY,3),width:Ce(Be.maxX-Be.minX,3),height:Ce(Be.maxY-Be.minY,3),centerX:Ce((Be.minX+Be.maxX)/2,3),centerY:Ce((Be.minY+Be.maxY)/2,3)}},S=(ae,Ae)=>{const Be=ie(ae),it=(lt=>lt.type==="rectangle"?parseFloat(lt.props.LineWidth||"0.5")/3.78:0)(ae),ze=(lt,xe,vt)=>(vt==="rectangle"&&it>0,lt);switch(Ae){case"left":return{left:Ce(ze(Be.minX,Ae,ae.type),3)+"mm"};case"right":return{left:Ce(ze(Be.maxX,Ae,ae.type),3)+"mm"};case"top":return{top:Ce(ze(Be.minY,Ae,ae.type),3)+"mm"};case"bottom":return{top:Ce(ze(Be.maxY,Ae,ae.type),3)+"mm"};default:return{}}},H=()=>{f.nextTick(()=>{const ae=document.querySelector(".canvas-container");if(!ae||!l.value||!u.value)return;const Ae=ae.getBoundingClientRect(),Be=Ba(l.value),At=Ba(u.value),it=16,ze=21,lt=21,xe=20,vt=24,je=24,we=Ae.width-it*2-ze-je,Bt=Ae.height-it-lt-xe-vt;let Ye=we/Be,Ft=Bt/At,Pt=Math.min(Ye,Ft);Pt=Pt*.95;const Wt=Math.min(4,Pt);s=Math.max(.8,Math.min(Wt,Pt)),s=Math.min(3,s),o.value=z(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function z(ae,Ae){ae=ae.toString();let Be=ae.indexOf(".");return Be!==-1?ae=ae.substring(0,Ae+Be+1):ae=ae.substring(0),Number(parseFloat(ae).toFixed(Ae))}const Z=ae=>B.get(ae)||null,re=ae=>{const Ae=C.value.indexOf(ae),Be=Ae===C.value.length-1,At=Ae!==-1,it=`${ae.id}_${Math.round(ae.props.x*10)}_${Math.round(ae.props.y*10)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}_${At}_${Be}`;if(h.has(it))return h.get(it);const ze={width:ae.props.width+"mm",height:ae.props.height+"mm","--item-width":ae.props.width+"mm","--item-height":ae.props.height+"mm",transform:`translate3d(${ae.props.x}mm, ${ae.props.y}mm, 0) rotate(${ae.props.rotation}deg)`,textRendering:"geometricPrecision",WebkitTextRendering:"geometricPrecision",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform",transformOrigin:"center center",WebkitTransformOrigin:"center center"};if(At)Be?ze.zIndex=1e3:ze.zIndex=999;else{const lt=i.value.findIndex(xe=>xe.id===ae.id);ze.zIndex=100+lt}return h.set(it,ze),ze},ne=ae=>{const Ae=C.value.some(At=>At.id===ae.id),Be=y()===ae;return{"component-selected":Ae,"component-current":Ae&&Be}},ue=(ae,Ae)=>{const At=((ae.props.rotation||0)%360+360)%360;if(ae.type==="line"&&(Ae==="left"||Ae==="right")){let xe;const je=((Ae==="left"?270:90)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,top:"50%",transform:"translateY(-50%)"}}if(ae.type==="verline"&&(Ae==="top"||Ae==="bottom")){let xe;const je=((Ae==="top"?0:180)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[Ae]+At)%360;let lt="pointer";return ze>=337.5||ze<22.5?lt="n-resize":ze>=22.5&&ze<67.5?lt="ne-resize":ze>=67.5&&ze<112.5?lt="e-resize":ze>=112.5&&ze<157.5?lt="se-resize":ze>=157.5&&ze<202.5?lt="s-resize":ze>=202.5&&ze<247.5?lt="sw-resize":ze>=247.5&&ze<292.5?lt="w-resize":ze>=292.5&&ze<337.5&&(lt="nw-resize"),{cursor:lt,display:"block",visibility:"visible",opacity:"1"}},ge=()=>{o.value<4&&(o.value+=.1)},Ue=()=>{o.value>.8&&(o.value-=.1)},Ee=()=>{const ae=y();if(!ae)return 0;const{x1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Oe=()=>{const ae=y();if(!ae)return 0;const{y1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Te=()=>{const ae=y();return ae?Number((ae.props.width||0).toFixed(2)):0},Pe=()=>{const ae=y();return ae?Number((ae.props.height||0).toFixed(2)):0},pe=(ae,Ae,Be)=>{let At=0;ae==="x"?At=Ee():ae==="y"?At=Oe():ae==="width"?At=Te():ae==="height"&&(At=Pe());const it=Number(Ae)-Number(At);if(Math.abs(it)<.01){y().props[ae]="",y().props[ae]=Number(At);return}j(null,ae,it)};function $(ae){const Ae=document.activeElement.tagName.toLowerCase();if(Ae==="input"||Ae==="textarea"||!y())return;let At=!1,it=0,ze=0;ae.key==="ArrowLeft"?(it=-_u,At=!0):ae.key==="ArrowRight"?(it=_u,At=!0):ae.key==="ArrowUp"?(ze=-_u,At=!0):ae.key==="ArrowDown"&&(ze=_u,At=!0),At&&(it!==0&&j(null,"x",it),ze!==0&&j(null,"y",ze),ae.preventDefault())}const ut=({e:ae,comp:Ae,previewDiv:Be})=>{var At,it;(At=ae==null?void 0:ae.dataTransfer)==null||At.setData("comp",JSON.stringify(Ae)),document.body.appendChild(Be),(it=ae==null?void 0:ae.dataTransfer)==null||it.setDragImage(Be,0,0),setTimeout(()=>document.body.removeChild(Be),0)},Ke=async ae=>{var $t,sA,dr;ae.preventDefault();const Ae=JSON.parse(((sA=($t=ae==null?void 0:ae.dataTransfer)==null?void 0:$t.getData)==null?void 0:sA.call($t,"comp"))||"{}")||{},Be=(Ae==null?void 0:Ae.type)||"";if(!Be)return;const At=document.querySelector("#design").getBoundingClientRect(),it=(ae.clientX-At.left)/o.value,ze=(ae.clientY-At.top)/o.value,lt=De.value[Be]||{};let xe=fo(it),vt=fo(ze);const je=lt.width,we=lt.height;if(!lt.rotation||lt.rotation===0){const Yt=l.value-je,bA=u.value-we;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA))}else xe=Math.max(0,xe),vt=Math.max(0,vt);const{propertyPanel:Bt,...Ye}=lt;let Ft={...Ye,x:Ce(xe),y:Ce(vt),width:Ce(je),height:Ce(we)};if((dr=De.value[Be])!=null&&dr.propertyPanel){const Yt=di(De.value[Be].propertyPanel)||{};if(Ft={...Ft,...Yt},Be==="line"&&Yt.LineWidth){const CA=parseFloat(Yt.LineWidth)*.3528;Ft.height=Ce(CA,3)}}const Ht=((Yt,bA)=>{const{width:CA,height:Zr,lockAspectRatio:nt}=Yt;let se=CA,Ve=Zr;const _e=l.value-2,Rt=u.value-2;let EA=!1;if(CA>_e&&(se=_e,EA=!0),Zr>Rt&&(Ve=Rt,EA=!0),nt&&EA){const lA=_e/CA,hA=Rt/Zr,Rr=Math.min(lA,hA);se=Ce(CA*Rr,2),Ve=Ce(Zr*Rr,2),se=Math.min(se,_e),Ve=Math.min(Ve,Rt)}return{width:se,height:Ve}})(Ft);if(Ft.width=Ht.width,Ft.height=Ht.height,Ht.width!==je||Ht.height!==we){const Yt=l.value-Ht.width,bA=u.value-Ht.height;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA)),Ft.x=Ce(xe),Ft.y=Ce(vt)}const Wt={id:gA(),type:Be,props:Ft};if(Ft.rotation&&Ft.rotation!==0){const{x1:Yt,y1:bA}=yo(Wt),CA=checkAndAdjustBoundaries(Yt,bA,Ft.width,Ft.height,Ft.rotation,l.value,u.value);(CA.x1!==Yt||CA.y1!==bA)&&g0(Wt,CA.x1,CA.y1)}i.value.push(Wt),v(Wt)};function Se(ae){ae.target.id!=="design"&&(ae.target.closest("#design")||F())}function Re(ae){let Ae=null;try{Ae=He(ae.clientX,ae.clientY)}catch(ze){console.error("坐标检测出错:",ze)}if(Ae){v(Ae);return}let Be=ae.target,At=null;for(;Be&&Be!==document.querySelector("#design");){if(Be.classList&&(Be.classList.contains("canvas-item")||Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle")||Be.classList.contains("property-panel")||Be.tagName==="INPUT"||Be.tagName==="TEXTAREA"||Be.tagName==="BUTTON")){if(Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle"))return;if(Be.classList.contains("canvas-item")){const ze=Be.getAttribute("data-item-id");if(At=i.value.find(lt=>lt.id===ze),At){v(At);return}}if(Be.closest(".canvas-item")){const lt=Be.closest(".canvas-item").getAttribute("data-item-id"),xe=i.value.find(vt=>vt.id===lt);if(xe){v(xe);return}}if(Be.closest(".canvas-item")||Be.classList.contains("td-text-content")||Be.classList.contains("barcode-component")||Be.classList.contains("qr-code-component")||Be.classList.contains("image-component")||Be.classList.contains("rectangle-component")||Be.classList.contains("hor-line-component")){const ze=He(ae.clientX,ae.clientY);if(ze){v(ze);return}}break}Be=Be.parentElement}const it=document.querySelector("#design");if(it&&it.contains(ae.target)){const ze=it.getBoundingClientRect(),lt=o.value,xe=(ae.clientX-ze.left)/lt,vt=(ae.clientY-ze.top)/lt,je=fo(xe),we=fo(vt);for(let Bt=i.value.length-1;Bt>=0;Bt--){const Ye=i.value[Bt],Ft=parseFloat(Ye.props.x||0),Pt=parseFloat(Ye.props.y||0),Ht=parseFloat(Ye.props.width||0),Wt=parseFloat(Ye.props.height||0),$t=1;if(je>=Ft-$t&&je<=Ft+Ht+$t&&we>=Pt-$t&&we<=Pt+Wt+$t){v(Ye);return}}}F()}function He(ae,Ae){const Be=document.querySelector("#design");if(!Be)return null;const At=Be.getBoundingClientRect(),it=o.value,ze=(ae-At.left)/it,lt=(Ae-At.top)/it,xe=fo(ze),vt=fo(lt);for(let je=i.value.length-1;je>=0;je--){const we=i.value[je];if(ke(xe,vt,we)){if(we.type==="rectangle")for(let Ye=je-1;Ye>=0;Ye--){const Ft=i.value[Ye];if(ke(xe,vt,Ft))return Ft}return we}}for(let je=0;je<i.value.length;je++){const we=i.value[je];if(ke(xe,vt,we))return we}return null}function ke(ae,Ae,Be){const At=parseFloat(Be.props.x||0),it=parseFloat(Be.props.y||0),ze=parseFloat(Be.props.width||0),lt=parseFloat(Be.props.height||0),xe=parseFloat(Be.props.rotation||0),vt=AB(ae,Ae,At,it,ze,lt,xe);return vt||AB(ae,Ae,At-1,it-1,ze+2,lt+2,xe)}function We(ae){return ae.preventDefault(),!1}const qe=(ae,Ae)=>{if(ae.stopPropagation(),ae.target.classList.contains("resize-handle")||ae.target.classList.contains("rotate-handle")||ae.target.classList.contains("delete-btn"))return;const At=He(ae.clientX,ae.clientY)||Ae;v(At),f.nextTick(()=>{L(ae,At)})},ot=ae=>{if(h.clear(),w.clear(),i.value.find(Be=>Be.id===ae)&&(i.value=i.value.filter(Be=>Be.id!==ae)),C.value.some(Be=>Be.id===ae)){const Be=C.value.filter(At=>At.id!==ae);C.value=Be}f.nextTick(()=>{})},rt=ae=>{var Be;const Ae=document.activeElement.tagName.toLowerCase();Ae==="input"||Ae==="textarea"||(ae.key==="Delete"||ae.key==="Backspace")&&C.value.length>0&&ot((Be=y())==null?void 0:Be.id)},ft=ae=>{if(C.value.length>0){const Ae=C.value[C.value.length-1];Ae.props.rotation=ae,Y(Ae,ae)}},dt=()=>{setTimeout(()=>{const ae=document.querySelector(".center-container");if(!ae)return;const Ae=ae.getBoundingClientRect();ae.style.height=`calc(100vh - ${Ae==null?void 0:Ae.top}px)`,H()},200)};f.watch(()=>A.templateInfo,(ae,Ae)=>{ae&&Ae&&ae.id!==Ae.id?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&!Ae?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&(r.value=ae||{})},{deep:!0,immediate:!0});const{handleCopy:tt,handlePaste:pt}=_M(i,C,l,u,Y),De=f.ref({}),Mt=f.ref(!1),Et=async ae=>{try{Mt.value=!1,De.value=await rM(ae),Mt.value=!0}catch{De.value={},Mt.value=!0}};f.watch(()=>A.templateType,async ae=>{try{await Et(ae),F(),h.clear(),w.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Mt.value||await Et(A.templateType),window.addEventListener("resize",dt),window.addEventListener("keydown",rt),window.addEventListener("keydown",tt),window.addEventListener("keydown",pt),window.addEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.addEventListener("contextmenu",We),dt(),_A()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",dt),window.removeEventListener("keydown",rt),window.removeEventListener("keydown",tt),window.removeEventListener("keydown",pt),window.removeEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.removeEventListener("contextmenu",We),h.clear(),w.clear()});function gA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ae=>{const Ae=Math.random()*16|0;return(ae==="x"?Ae:Ae&3|8).toString(16)})}const Ut=ae=>{var Be;if(!De.value||!De.value[ae])return{};const Ae=De.value[ae]||{};return ae==="image"&&((Be=A.config)!=null&&Be.image)?{...Ae,image:{...Ae.image,...A.config.image}}:Ae},Tt=ae=>Ut(ae).allowRotation!==!1,AA=()=>OM(i,r.value),St=ae=>{r.value.graphData=ae||{},_A()},_A=()=>{var Ae;const ae=jM(r.value.graphData)||"";ae&&((Ae=document.querySelector("#design"))==null||Ae.appendChild(ae))},Dt=async ae=>{var Be;const Ae=JSON.parse(JSON.stringify(ae));for(const At of Ae)if(At.type==="image"&&((Be=At.props)!=null&&Be.ImageSrc)){const it=At.props.ImageSrc;typeof it=="object"&&it.fileSrc&&it.fileSrc}return Ae},oA=()=>new Promise(async(ae,Ae)=>{try{F();const Be=JSON.parse(JSON.stringify(i.value)),At=await Dt(Be),it=[...i.value];i.value=At;const ze=()=>{var vt;const lt=((vt=document.querySelector("#design"))==null?void 0:vt.querySelectorAll("img"))||[],xe=Array.from(lt).map(je=>je.complete?Promise.resolve():new Promise(we=>{je.onload=je.onerror=we}));return Promise.all(xe)};f.nextTick(async()=>{var je;await new Promise(we=>setTimeout(we,100)),await ze(),(((je=document.querySelector("#design"))==null?void 0:je.querySelectorAll("img"))||[]).forEach((we,Bt)=>{});const xe=document.querySelector("#design");if(!xe){Ae(new Error("找不到要转换的DOM元素"));return}const vt=o.value;ze().then(()=>{sy(xe,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:we=>{const Bt=we.querySelector(".canvas-wrapper");if(Bt){const Ht=Bt.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();Bt.style.transform=Ht||"none",Bt.style.opacity="1"}const Ye=we.querySelector("#design");if(Ye){const Pt=window.getComputedStyle(xe);for(let Ht=0;Ht<Pt.length;Ht++){const Wt=Pt[Ht];Ye.style[Wt]=Pt.getPropertyValue(Wt)}}we.querySelectorAll("img").forEach(Pt=>{Pt.style.imageRendering="high-quality",Pt.style.webkitImageRendering="high-quality",Pt.style.mozImageRendering="high-quality",Pt.style.objectFit="contain",Pt.style.objectPosition="center"})}}).then(we=>{i.value=it;const Bt=we.toDataURL("image/png");ae({data:AA(),image:Bt})}).catch(we=>{i.value=it,Ae(we)})}).catch(we=>{Ae(we)})})}catch(Be){Ae(Be)}}),Jt=()=>new Promise((ae,Ae)=>{i.value.forEach(At=>{if(At.type==="image"&&!At.props.ImageSrc)return Vs.warning("图片控件请选择图片!"),Ae("图片控件请选择图片!")}),ae(!0)});return e({getJson:()=>Jt().then(()=>AA()),clear:()=>{i.value=[],F()},snapshot:()=>Jt().then(()=>oA())}),(ae,Ae)=>{var xe,vt,je;const Be=f.resolveComponent("el-button"),At=f.resolveComponent("el-icon-info-filled"),it=f.resolveComponent("el-icon"),ze=f.resolveComponent("el-tooltip"),lt=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",gH,[f.createElementVNode("div",mH,[f.createVNode(uM,{onDragStart:ut,config:t.config,propsConfig:De.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",vH,[a.value?(f.openBlock(),f.createElementBlock("div",BH,[...Ae[33]||(Ae[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",{class:"center-toolbar",style:f.normalizeStyle(`background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`)},[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(TM,{"graph-data":(xe=r.value)==null?void 0:xe.graphData,onSuccess:St},null,8,["graph-data"]),Ae[34]||(Ae[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",wH,[f.createElementVNode("button",{onClick:Ue,disabled:o.value<=.8},"-",8,yH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:ge,disabled:o.value>=4},"+",8,bH)])],4),f.createElementVNode("div",{class:"canvas-container",style:f.normalizeStyle(`--scale: ${Math.max(0,1/(o.value||1))};background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`),onClick:Se},[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",CH,[f.createVNode(eB,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",EH,[f.createVNode(eB,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Ke,onDragover:Ae[0]||(Ae[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Re,onContextmenu:Ae[1]||(Ae[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(Q)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",UH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(E)?(f.openBlock(),f.createElementBlock("div",FH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).horizontal,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Bt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${we.type}`]),style:f.normalizeStyle({top:`${we.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).vertical,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Bt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${we.type}`]),style:f.normalizeStyle({left:`${we.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,we=>{var Bt;return f.openBlock(),f.createElementBlock("div",{key:we.id,class:f.normalizeClass(["canvas-item",ne(we)]),style:f.normalizeStyle(re(we)),"data-item-id":we.id,onMousedown:Ye=>qe(Ye,we)},[f.unref(y)()===we?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(ue(we,"top")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(ue(we,"bottom")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom"),["stop"])},null,44,TH)):f.createCommentVNode("",!0),we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":we.type==="line"}]),style:f.normalizeStyle(ue(we,"left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"left"),["stop"])},null,46,xH)):f.createCommentVNode("",!0),we.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,RH)):f.createCommentVNode("",!0)],64)),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(ue(we,"top-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-left"),["stop"])},null,44,IH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(ue(we,"top-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-right"),["stop"])},null,44,VH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(ue(we,"bottom-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-right"),["stop"])},null,44,MH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(ue(we,"bottom-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-left"),["stop"])},null,44,LH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),we.props&&Mt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Bt=Z(we.type))==null?void 0:Bt.component)||null),{key:`${we.id}-${we.type}`,modelValue:{...we.props,__selected:f.unref(y)()===we,options:A.options},propsConfig:De.value,"onUpdate:modelValue":Ye=>{const{__selected:Ft,options:Pt,...Ht}=Ye;Object.keys(Ht).forEach(Wt=>{Ht[Wt]!==void 0&&(we.props[Wt]=Ht[Wt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,NH)}),128))],36)],4)],4)]),f.createElementVNode("div",OH,[f.unref(C).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",kH,[f.createVNode(Be,{type:"danger",onClick:Ae[2]||(Ae[2]=we=>ot(f.unref(y)().id))},{default:f.withCtx(()=>[...Ae[35]||(Ae[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",HH,[Ae[36]||(Ae[36]=f.createTextVNode(" 属性设置 ",-1)),(vt=Ut(f.unref(y)().type))!=null&&vt.desc?(f.openBlock(),f.createBlock(ze,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:Ut(f.unref(y)().type).desc},null,8,DH)]),default:f.withCtx(()=>[f.createVNode(it,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(At)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",PH,[f.createElementVNode("div",WH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",_H,[f.createElementVNode("button",{onClick:Ae[3]||(Ae[3]=f.withModifiers(we=>f.unref(j)(we,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ee(),onInput:Ae[4]||(Ae[4]=we=>pe("x",we.target.value)),onClick:Ae[5]||(Ae[5]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[6]||(Ae[6]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[7]||(Ae[7]=f.withModifiers(()=>{},["prevent"]))},null,40,ZH),f.createElementVNode("button",{onClick:Ae[8]||(Ae[8]=f.withModifiers(we=>f.unref(j)(we,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",jH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",JH,[f.createElementVNode("button",{onClick:Ae[9]||(Ae[9]=f.withModifiers(we=>f.unref(j)(we,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:Ae[10]||(Ae[10]=we=>pe("y",we.target.value)),onClick:Ae[11]||(Ae[11]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[12]||(Ae[12]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[13]||(Ae[13]=f.withModifiers(()=>{},["prevent"]))},null,40,KH),f.createElementVNode("button",{onClick:Ae[14]||(Ae[14]=f.withModifiers(we=>f.unref(j)(we,"y",.5),["stop"]))},"+")])]),f.unref(y)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",GH,[Ae[37]||(Ae[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",zH,[f.createElementVNode("button",{onClick:Ae[15]||(Ae[15]=f.withModifiers(we=>f.unref(j)(we,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:Ae[16]||(Ae[16]=we=>pe("width",we.target.value)),onClick:Ae[17]||(Ae[17]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[18]||(Ae[18]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[19]||(Ae[19]=we=>q("width",we.target.value)),onWheel:Ae[20]||(Ae[20]=f.withModifiers(()=>{},["prevent"]))},null,40,YH),f.createElementVNode("button",{onClick:Ae[21]||(Ae[21]=f.withModifiers(we=>f.unref(j)(we,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",XH,[Ae[38]||(Ae[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",qH,[f.createElementVNode("button",{onClick:Ae[22]||(Ae[22]=f.withModifiers(we=>f.unref(j)(we,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Pe(),onInput:Ae[23]||(Ae[23]=we=>pe("height",we.target.value)),onClick:Ae[24]||(Ae[24]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[25]||(Ae[25]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[26]||(Ae[26]=we=>q("height",we.target.value)),onWheel:Ae[27]||(Ae[27]=f.withModifiers(()=>{},["prevent"]))},null,40,$H),f.createElementVNode("button",{onClick:Ae[28]||(Ae[28]=f.withModifiers(we=>f.unref(j)(we,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),Tt(f.unref(y)().type)?(f.openBlock(),f.createElementBlock("div",eD,[Ae[39]||(Ae[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",tD,[f.createElementVNode("button",{onClick:Ae[29]||(Ae[29]=f.withModifiers(we=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",AD,f.toDisplayString(f.unref(y)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:Ae[30]||(Ae[30]=f.withModifiers(we=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",rD,[Ae[40]||(Ae[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",nD,[f.createVNode(lt,{modelValue:f.unref(y)().props.lockAspectRatio,"onUpdate:modelValue":Ae[31]||(Ae[31]=we=>f.unref(y)().props.lockAspectRatio=we),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=Z(f.unref(y)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(y)().props,"onUpdate:modelValue":Ae[32]||(Ae[32]=we=>f.unref(y)().props=we),options:t.options,"props-config":Ut(f.unref(y)().type),onRotationChange:ft},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-141dd6ea"]]),s$="",Vo=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(C,v)=>{let y;return function(...Q){const M=()=>{clearTimeout(y),C(...Q)};clearTimeout(y),y=setTimeout(M,v)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const C=a.value.getBoundingClientRect(),v=g(a.value);let y=0;if(C.top>0)y=C.top;else if(v){const F=h(a.value);y=F>0?F:60}else{const F=a.value.offsetTop;F>0?y=F:y=60}(y!==l.value.rectTop||v!==l.value.isInModal)&&(i.value=y,o.value=v,l.value={rectTop:y,isInModal:v})},d=s(u,100),g=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog")))return!0;v=v.parentElement}return!1},h=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog"))){const y=v.getBoundingClientRect();return y.top>0?y.top:60}v=v.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,C=>{C&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,C=>w(C),{deep:!0,immediate:!0});function w(C){if(r.value=(C==null?void 0:C.width)>0&&(C==null?void 0:C.height)>0,!r.value)return;const v={...C};v.printWidth||Object.assign(v,{printWidth:v.width}),v.printHeight||Object.assign(v,{printHeight:v.height}),v!=null&&v.graphData||Object.assign(v,{graphData:{printList:[{x:0,y:0,width:C.printWidth,height:C.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),v!=null&&v.items||Object.assign(v,{items:[]}),n.value=v}function B(C){e.exposed=C||{},e.exposeProxy=C||{}}return(C,v)=>{const y=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(aD,{...C.$attrs,...A,ref:B},C.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[y,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var sr=Uint8Array,Wr=Uint16Array,dp=Int32Array,Zu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ju=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cy=function(t,e){for(var A=new Wr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new dp(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},uy=cy(Zu,2),fy=uy.b,gp=uy.r;fy[28]=258,gp[258]=28;for(var hy=cy(ju,0),iD=hy.b,dy=hy.r,mp=new Wr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,mp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var kn=function(t,e,A){for(var r=t.length,n=0,a=new Wr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Wr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Wr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[mp[d]>>s]=l}else for(o=new Wr(r),n=0;n<r;++n)t[n]&&(o[n]=mp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var gl=new sr(32),iA=0;iA<32;++iA)gl[iA]=5;var oD=kn(Ia,9,0),sD=kn(Ia,9,1),lD=kn(gl,5,0),cD=kn(gl,5,1),vp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},pn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},Bp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},wp=function(t){return(t+7)/8|0},py=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},uD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],gn=function(t,e,A){var r=new Error(e||uD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,gn),!A)throw r;return r},fD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Ee){var Oe=A.length;if(Ee>Oe){var Te=new sr(Math.max(Oe*2,Ee));Te.set(A),A=Te}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,w=e.d,B=e.m,C=e.n,v=n*8;do{if(!h){u=pn(t,d,1);var y=pn(t,d+1,3);if(d+=3,y)if(y==1)h=sD,w=cD,B=9,C=5;else if(y==2){var L=pn(t,d,31)+257,V=pn(t,d+10,15)+4,k=L+pn(t,d+5,31)+1;d+=14;for(var W=new sr(k),T=new sr(19),N=0;N<V;++N)T[pp[N]]=pn(t,d+N*3,7);d+=V*3;for(var E=vp(T),x=(1<<E)-1,O=kn(T,E,1),N=0;N<k;){var j=O[pn(t,d,x)];d+=j&15;var F=j>>4;if(F<16)W[N++]=F;else{var G=0,Y=0;for(F==16?(Y=3+pn(t,d,3),d+=2,G=W[N-1]):F==17?(Y=3+pn(t,d,7),d+=3):F==18&&(Y=11+pn(t,d,127),d+=7);Y--;)W[N++]=G}}var K=W.subarray(0,L),q=W.subarray(L);B=vp(K),C=vp(q),h=kn(K,B,1),w=kn(q,C,1)}else gn(1);else{var F=wp(d)+4,Q=t[F-4]|t[F-3]<<8,M=F+Q;if(M>n){s&&gn(0);break}o&&l(g+Q),A.set(t.subarray(F,M),g),e.b=g+=Q,e.p=d=M*8,e.f=u;continue}if(d>v){s&&gn(0);break}}o&&l(g+131072);for(var ee=(1<<B)-1,ie=(1<<C)-1,S=d;;S=d){var G=h[Bp(t,d)&ee],H=G>>4;if(d+=G&15,d>v){s&&gn(0);break}if(G||gn(2),H<256)A[g++]=H;else if(H==256){S=d,h=null;break}else{var z=H-254;if(H>264){var N=H-257,Z=Zu[N];z=pn(t,d,(1<<Z)-1)+fy[N],d+=Z}var re=w[Bp(t,d)&ie],ne=re>>4;re||gn(3),d+=re&15;var q=iD[ne];if(ne>3){var Z=ju[ne];q+=Bp(t,d)&(1<<Z)-1,d+=Z}if(d>v){s&&gn(0);break}o&&l(g+131072);var ue=g+z;if(g<q){var ge=a-q,Ue=Math.min(q,ue);for(ge+g<0&&gn(3);g<Ue;++g)A[g]=r[ge+g]}for(;g<ue;++g)A[g]=A[g-q]}}e.l=h,e.p=S,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=w,e.n=C)}while(!u);return g!=A.length&&i?py(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ml=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},yp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:By,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,L){return M.f-L.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Wr(g+1),w=bp(A[u-1],h,0);if(w>e){var r=0,B=0,C=w-e,v=1<<C;for(a.sort(function(L,V){return h[V.s]-h[L.s]||L.f-V.f});r<n;++r){var y=a[r].s;if(h[y]>e)B+=v-(1<<w-h[y]),h[y]=e;else break}for(B>>=C;B>0;){var F=a[r].s;h[F]<e?B-=1<<e-h[F]++-1:++r}for(;r>=0&&B;--r){var Q=a[r].s;h[Q]==e&&(--h[Q],++B)}w=e}return{t:new sr(h),l:w}},bp=function(t,e,A){return t.s==-1?Math.max(bp(t.l,e,A+1),bp(t.r,e,A+1)):e[t.s]=A},gy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Wr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},vl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},my=function(t,e,A){var r=A.length,n=wp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},vy=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=yp(n,15),g=d.t,h=d.l,w=yp(a,15),B=w.t,C=w.l,v=gy(g),y=v.c,F=v.n,Q=gy(B),M=Q.c,L=Q.n,V=new Wr(19),k=0;k<y.length;++k)++V[y[k]&31];for(var k=0;k<M.length;++k)++V[M[k]&31];for(var W=yp(V,7),T=W.t,N=W.l,E=19;E>4&&!T[pp[E-1]];--E);var x=l+5<<3,O=vl(n,Ia)+vl(a,gl)+i,j=vl(n,g)+vl(a,B)+i+14+3*E+vl(V,T)+2*V[16]+3*V[17]+7*V[18];if(s>=0&&x<=O&&x<=j)return my(e,u,t.subarray(s,s+l));var G,Y,K,q;if($n(e,u,1+(j<O)),u+=2,j<O){G=kn(g,h,0),Y=g,K=kn(B,C,0),q=B;var ee=kn(T,N,0);$n(e,u,F-257),$n(e,u+5,L-1),$n(e,u+10,E-4),u+=14;for(var k=0;k<E;++k)$n(e,u+3*k,T[pp[k]]);u+=3*E;for(var ie=[y,M],S=0;S<2;++S)for(var H=ie[S],k=0;k<H.length;++k){var z=H[k]&31;$n(e,u,ee[z]),u+=T[z],z>15&&($n(e,u,H[k]>>5&127),u+=H[k]>>12)}}else G=oD,Y=Ia,K=lD,q=gl;for(var k=0;k<o;++k){var Z=r[k];if(Z>255){var z=Z>>18&31;ml(e,u,G[z+257]),u+=Y[z+257],z>7&&($n(e,u,Z>>23&31),u+=Zu[z]);var re=Z&31;ml(e,u,K[re]),u+=q[re],re>3&&(ml(e,u,Z>>5&8191),u+=ju[re])}else ml(e,u,G[Z]),u+=Y[Z]}return ml(e,u,G[256]),u+Y[256]},hD=new dp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=new sr(0),dD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=hD[e-1],g=d>>13,h=d&8191,w=(1<<A)-1,B=a.p||new Wr(32768),C=a.h||new Wr(w+1),v=Math.ceil(A/3),y=2*v,F=function(Pe){return(t[Pe]^t[Pe+1]<<v^t[Pe+2]<<y)&w},Q=new dp(25e3),M=new Wr(288),L=new Wr(32),V=0,k=0,W=a.i||0,T=0,N=a.w||0,E=0;W+2<i;++W){var x=F(W),O=W&32767,j=C[x];if(B[O]=j,C[x]=O,N<=W){var G=i-W;if((V>7e3||T>24576)&&(G>423||!l)){u=vy(t,s,0,Q,M,L,k,T,E,W-E,u),T=V=k=0,E=W;for(var Y=0;Y<286;++Y)M[Y]=0;for(var Y=0;Y<30;++Y)L[Y]=0}var K=2,q=0,ee=h,ie=O-j&32767;if(G>2&&x==F(W-ie))for(var S=Math.min(g,G)-1,H=Math.min(32767,W),z=Math.min(258,G);ie<=H&&--ee&&O!=j;){if(t[W+K]==t[W+K-ie]){for(var Z=0;Z<z&&t[W+Z]==t[W+Z-ie];++Z);if(Z>K){if(K=Z,q=ie,Z>S)break;for(var re=Math.min(ie,Z-2),ne=0,Y=0;Y<re;++Y){var ue=W-ie+Y&32767,ge=B[ue],Ue=ue-ge&32767;Ue>ne&&(ne=Ue,j=ue)}}}O=j,j=B[O],ie+=O-j&32767}if(q){Q[T++]=268435456|gp[K]<<18|dy[q];var Ee=gp[K]&31,Oe=dy[q]&31;k+=Zu[Ee]+ju[Oe],++M[257+Ee],++L[Oe],N=W+K,++V}else Q[T++]=t[W],++M[t[W]]}}for(W=Math.max(W,N);W<i;++W)Q[T++]=t[W],++M[t[W]];u=vy(t,s,l,Q,M,L,k,T,E,W-E,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=C,a.p=B,a.i=W,a.w=N)}else{for(var W=a.w||0;W<i+l;W+=65535){var Te=W+65535;Te>=i&&(s[u/8|0]=l,Te=i),u=my(s,u+1,t.subarray(W,Te))}a.i=i}return py(o,0,r+wp(u)+n)},wy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},pD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return dD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},yy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},gD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=wy();n.p(e.dictionary),yy(t,2,n.d())}},mD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&gn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&gn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Cp(t,e){e||(e={});var A=wy();A.p(t);var r=pD(t,e,e.dictionary?6:2,4);return gD(r,e),yy(r,r.length-4,A.d()),r}function vD(t,e){return fD(t.subarray(mD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var BD=typeof TextDecoder<"u"&&new TextDecoder,wD=0;try{BD.decode(By,{stream:!0}),wD=1}catch{}/** @license
|
|
59
|
+
.`+lp+T8+Xw)},R8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},qw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),I8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(up(e)||O8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return Br(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=qw.isSameOrigin(e),r=!cp(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!cp(e)&&!A&&!up(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!cp(e)&&!up(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(k8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),V8=/^data:image\/svg\+xml/i,M8=/^data:image\/.*;base64,/i,L8=/^data:image\/.*/i,O8=function(t){return $A.SUPPORT_SVG_DRAWING||!H8(t)},cp=function(t){return L8.test(t)},k8=function(t){return M8.test(t)},up=function(t){return t.substr(0,4)==="blob"},H8=function(t){return t.substr(-3).toLowerCase()==="svg"||V8.test(t)},Ge=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),xo=function(t,e,A){return new Ge(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Lu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=xo(this.start,this.startControl,e),n=xo(this.startControl,this.endControl,e),a=xo(this.endControl,this.end,e),i=xo(r,n,e),o=xo(n,a,e),s=xo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$r=function(t){return t.type===1},D8=function(){function t(e){var A=e.styles,r=e.bounds,n=sl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=sl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=sl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=sl(A.borderBottomLeftRadius,r.width,r.height),w=h[0],B=h[1],C=[];C.push((a+s)/r.width),C.push((w+d)/r.width),C.push((i+B)/r.height),C.push((l+g)/r.height);var v=Math.max.apply(Math,C);v>1&&(a/=v,i/=v,s/=v,l/=v,d/=v,g/=v,w/=v,B/=v);var y=r.width-s,F=r.height-g,Q=r.width-d,M=r.height-B,L=A.borderTopWidth,V=A.borderRightWidth,k=A.borderBottomWidth,W=A.borderLeftWidth,T=tA(A.paddingTop,e.bounds.width),N=tA(A.paddingRight,e.bounds.width),E=tA(A.paddingBottom,e.bounds.width),x=tA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+W/3,r.top+L/3,a-W/3,i-L/3,Zt.TOP_LEFT):new Ge(r.left+W/3,r.top+L/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+y,r.top+L/3,s-V/3,l-L/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V/3,g-k/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/3,r.top+r.height-k/3),this.bottomLeftBorderDoubleOuterBox=w>0||B>0?uA(r.left+W/3,r.top+M,w-W/3,B-k/3,Zt.BOTTOM_LEFT):new Ge(r.left+W/3,r.top+r.height-k/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+W*2/3,r.top+L*2/3,a-W*2/3,i-L*2/3,Zt.TOP_LEFT):new Ge(r.left+W*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+y,r.top+L*2/3,s-V*2/3,l-L*2/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V*2/3,g-k*2/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+r.height-k*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||B>0?uA(r.left+W*2/3,r.top+M,w-W*2/3,B-k*2/3,Zt.BOTTOM_LEFT):new Ge(r.left+W*2/3,r.top+r.height-k*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+W/2,r.top+L/2,a-W/2,i-L/2,Zt.TOP_LEFT):new Ge(r.left+W/2,r.top+L/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+y,r.top+L/2,s-V/2,l-L/2,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/2,r.top+L/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+Q,r.top+F,d-V/2,g-k/2,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/2,r.top+r.height-k/2),this.bottomLeftBorderStroke=w>0||B>0?uA(r.left+W/2,r.top+M,w-W/2,B-k/2,Zt.BOTTOM_LEFT):new Ge(r.left+W/2,r.top+r.height-k/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Zt.TOP_LEFT):new Ge(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+y,r.top,s,l,Zt.TOP_RIGHT):new Ge(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+Q,r.top+F,d,g,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=w>0||B>0?uA(r.left,r.top+M,w,B,Zt.BOTTOM_LEFT):new Ge(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+W,r.top+L,Math.max(0,a-W),Math.max(0,i-L),Zt.TOP_LEFT):new Ge(r.left+W,r.top+L),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(y,r.width-V),r.top+L,y>r.width+V?0:Math.max(0,s-V),Math.max(0,l-L),Zt.TOP_RIGHT):new Ge(r.left+r.width-V,r.top+L),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-W),r.top+Math.min(F,r.height-k),Math.max(0,d-V),Math.max(0,g-k),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V,r.top+r.height-k),this.bottomLeftPaddingBox=w>0||B>0?uA(r.left+W,r.top+Math.min(M,r.height-k),Math.max(0,w-W),Math.max(0,B-k),Zt.BOTTOM_LEFT):new Ge(r.left+W,r.top+r.height-k),this.topLeftContentBox=a>0||i>0?uA(r.left+W+x,r.top+L+T,Math.max(0,a-(W+x)),Math.max(0,i-(L+T)),Zt.TOP_LEFT):new Ge(r.left+W+x,r.top+L+T),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(y,r.width+W+x),r.top+L+T,y>r.width+W+x?0:s-W+x,l-(L+T),Zt.TOP_RIGHT):new Ge(r.left+r.width-(V+N),r.top+L+T),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-(W+x)),r.top+Math.min(F,r.height+L+T),Math.max(0,d-(V+N)),g-(k+E),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-(V+N),r.top+r.height-(k+E)),this.bottomLeftContentBox=w>0||B>0?uA(r.left+W+x,r.top+M,Math.max(0,w-(W+x)),B-(k+E),Zt.BOTTOM_LEFT):new Ge(r.left+W+x,r.top+r.height-(k+E))}return t}(),Zt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Zt||(Zt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Zt.TOP_LEFT:return new Lu(new Ge(t,l),new Ge(t,l-o),new Ge(s-i,e),new Ge(s,e));case Zt.TOP_RIGHT:return new Lu(new Ge(t,e),new Ge(t+i,e),new Ge(s,l-o),new Ge(s,l));case Zt.BOTTOM_RIGHT:return new Lu(new Ge(s,e),new Ge(s,e+o),new Ge(t+i,l),new Ge(t,l));case Zt.BOTTOM_LEFT:default:return new Lu(new Ge(s,l),new Ge(s-i,l),new Ge(t,e+o),new Ge(t,e))}},Ou=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},P8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},ku=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},W8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Hu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),_8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),Z8=function(t){return t.type===0},$w=function(t){return t.type===1},j8=function(t){return t.type===2},ey=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},J8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},ty=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Ay=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new D8(this.container),this.container.styles.opacity<1&&this.effects.push(new _8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new W8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Ou(this.curves),o=ku(this.curves);ey(i,o)?this.effects.push(new Hu(i,6)):(this.effects.push(new Hu(i,2)),this.effects.push(new Hu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!$w(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Ou(r.curves),o=ku(r.curves);ey(i,o)||n.unshift(new Hu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return WA(s.target,e)})},t}(),fp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=WA(n.flags,4),i=WA(n.flags,2),o=new Ay(n,t);WA(n.styles.display,2048)&&r.push(o);var s=WA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new ty(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(w,B){return d>w.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(w,B){return d>=w.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);fp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),fp(o,e,A,s);WA(n.flags,8)&&ry(n,s)})},ry=function(t,e){for(var A=t instanceof tp?t.start:1,r=t instanceof tp?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Sw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=dl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},K8=function(t){var e=new Ay(t,null),A=new ty(e),r=[];return fp(e,A,A,r),ry(e.container,r),A},ny=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},G8=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return en(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},z8=function(t,e){switch(e){case 0:return en(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},Y8=function(t,e){switch(e){case 0:return Du(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Du(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Du(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Du(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Du=function(t,e){var A=[];return $r(t)?A.push(t.subdivide(.5,!1)):A.push(t),$r(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},en=function(t,e,A,r){var n=[];return $r(t)?n.push(t.subdivide(.5,!1)):n.push(t),$r(A)?n.push(A.subdivide(.5,!0)):n.push(A),$r(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),$r(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ay=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Pu=function(t){var e=t.styles,A=t.bounds,r=tA(e.paddingLeft,A.width),n=tA(e.paddingRight,A.width),a=tA(e.paddingTop,A.width),i=tA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},X8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},q8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},hp=function(t,e,A){var r=X8(Io(t.styles.backgroundOrigin,e),t),n=q8(Io(t.styles.backgroundClip,e),t),a=$8(Io(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=sl(Io(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=eH(Io(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Ro=function(t){return zt(t)&&t.value===No.AUTO},Wu=function(t){return typeof t=="number"},$8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(LA(i)&&o&&LA(o))return[tA(i,A.width),tA(o,A.height)];var s=Wu(a);if(zt(i)&&(i.value===No.CONTAIN||i.value===No.COVER)){if(Wu(a)){var l=A.width/A.height;return l<a!=(i.value===No.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Wu(r),d=Wu(n),g=u||d;if(Ro(i)&&(!o||Ro(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,w=d?n:r/a;return[h,w]}var B=u?r:A.width,C=d?n:A.height;return[B,C]}if(s){var v=0,y=0;return LA(i)?v=tA(i,A.width):LA(o)&&(y=tA(o,A.height)),Ro(i)?v=y*a:(!o||Ro(o))&&(y=v/a),[v,y]}var F=null,Q=null;if(LA(i)?F=tA(i,A.width):o&&LA(o)&&(Q=tA(o,A.height)),F!==null&&(!o||Ro(o))&&(Q=u&&d?F/r*n:A.height),Q!==null&&Ro(i)&&(F=u&&d?Q/n*r:A.width),F!==null&&Q!==null)return[F,Q];throw new Error("Unable to calculate background-size for element")},Io=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},eH=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ge(Math.round(r.left),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ge(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ge(Math.round(r.left+a),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ge(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ge(Math.round(r.left+a),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ge(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ge(Math.round(n.left),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ge(Math.round(n.left),Math.round(n.height+n.top))]}},tH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",iy="Hidden Text",AH=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=tH,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(iy)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(iy)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),oy=function(){function t(e,A){this.context=e,this.options=A}return t}(),rH=1e4,nH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new AH(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),j8(A)&&(this.ctx.globalAlpha=A.opacity),Z8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),$w(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return Br(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(WA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=ep(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=lH(A.fontFamily).join(", "),a=ol(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return Br(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(w){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(w,r.letterSpacing,l);var C=r.textShadow;C.length&&w.text.trim().length&&(C.slice(0).reverse().forEach(function(v){g.ctx.shadowColor=JA(v.color),g.ctx.shadowOffsetX=v.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=v.offsetY.number*g.options.scale,g.ctx.shadowBlur=v.blur.number,g.renderTextWithLetterSpacing(w,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(v){switch(v){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+l),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+u),w.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Pu(A),i=ku(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,y,y,l,u,d,g,Q,h,w,M,B,C,v,y,F,Q,M;return ir(this,function(L){switch(L.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,L.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:L.sent(),L.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof Uw))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof Fw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Nw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Rw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=L.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof Ap&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ge(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ge(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ge(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ge(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ge(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore()):r.type===xu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore())),aH(r)&&r.value.length){switch(g=this.createFontStyle(a),Q=g[0],h=g[1],w=this.fontMetrics.getMetrics(Q,h).baseline,this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=oH(r.styles.textAlign),M=Pu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}C=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new Ge(M.left,M.top),new Ge(M.left+M.width,M.top),new Ge(M.left+M.width,M.top+M.height),new Ge(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fl(r.value,C),a.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!WA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(v=r.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,F=v.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(F)];case 16:return y=L.sent(),this.ctx.drawImage(y,r.bounds.left-(y.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+F),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(Q=this.createFontStyle(a)[0],this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+tA(r.styles.paddingTop,r.bounds.width),r.bounds.width,iw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fl(A.listValue,M),a.letterSpacing,iw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return Br(this,void 0,void 0,function(){var r,n,v,a,i,v,o,s,v,l,u,v,d,g,v,h,w,v,B,C,v;return ir(this,function(y){switch(y.label){case 0:if(WA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:y.sent(),r=0,n=A.negativeZIndex,y.label=2;case 2:return r<n.length?(v=n[r],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:y.sent(),a=0,i=A.nonInlineLevel,y.label=7;case 7:return a<i.length?(v=i[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,y.label=11;case 11:return o<s.length?(v=s[o],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,y.label=19;case 19:return d<g.length?(v=g[d],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return d++,[3,19];case 22:h=0,w=A.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return h<w.length?(v=w[h],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return h++,[3,23];case 26:B=0,C=A.positiveZIndex,y.label=27;case 27:return B<C.length?(v=C[B],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=$r(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),$r(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,T,G,Y,x,O,k,w,T,G,Y,x,O,B,C,v,y,F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z,Z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=hp(A,r,[d.width,d.height,d.width/d.height]),T=h[0],G=h[1],Y=h[2],x=h[3],O=h[4],k=a.ctx.createPattern(a.resizeImage(d,x,O),"repeat"),a.renderRepeat(T,k,G,Y)),[3,6];case 5:ZO(u)?(w=hp(A,r,[null,null,null]),T=w[0],G=w[1],Y=w[2],x=w[3],O=w[4],B=HO(u.angle,x,O),C=B[0],v=B[1],y=B[2],F=B[3],Q=B[4],M=document.createElement("canvas"),M.width=x,M.height=O,L=M.getContext("2d"),V=L.createLinearGradient(v,F,y,Q),zB(u.stops,C).forEach(function(ne){return V.addColorStop(ne.stop,JA(ne.color))}),L.fillStyle=V,L.fillRect(0,0,x,O),x>0&&O>0&&(k=a.ctx.createPattern(M,"repeat"),a.renderRepeat(T,k,G,Y))):jO(u)&&(W=hp(A,r,[null,null,null]),T=W[0],N=W[1],E=W[2],x=W[3],O=W[4],j=u.position.length===0?[H0]:u.position,G=tA(j[0],x),Y=tA(j[j.length-1],O),K=DO(u,G,Y,x,O),q=K[0],ee=K[1],q>0&&ee>0&&(ie=a.ctx.createRadialGradient(N+G,E+Y,0,N+G,E+Y,q),zB(u.stops,q*2).forEach(function(ne){return ie.addColorStop(ne.stop,JA(ne.color))}),a.path(T),a.ctx.fillStyle=ie,q!==ee?(S=A.bounds.left+.5*A.bounds.width,H=A.bounds.top+.5*A.bounds.height,z=ee/q,Z=1/z,a.ctx.save(),a.ctx.translate(S,H),a.ctx.transform(1,0,0,z,0,0),a.ctx.translate(-S,-H),a.ctx.fillRect(N,Z*(E-H)+H,x,O*Z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return Br(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ny(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return Br(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=G8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=z8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Sa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=iH(Io(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Sa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var w=Ou(A.curves),B=h.inset?0:rH,C=J8(w,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(w),d.ctx.clip(),d.mask(C)):(d.mask(w),d.ctx.clip(),d.path(C)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Sa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return Br(this,void 0,void 0,function(){var o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,L,M,L;return ir(this,function(V){return this.ctx.save(),o=Y8(a,n),s=ny(a,n),i===2&&(this.path(s),this.ctx.clip()),$r(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),$r(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),w=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(w=r,B=r),C=!0,h<=w*2?C=!1:h<=w*2+B?(v=h/(2*w+B),w*=v,B*=v):(y=Math.floor((h+B)/(w+B)),F=(h-y*w)/(y-1),Q=(h-(y+1)*w)/y,B=Q<=0||Math.abs(B-F)<Math.abs(B-Q)?F:Q),C&&(i===3?this.ctx.setLineDash([0,w+B]):this.ctx.setLineDash([w,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&($r(s[0])&&(M=s[3],L=s[0],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke()),$r(s[1])&&(M=s[1],L=s[2],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=K8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(oy),aH=function(t){return t instanceof xw||t instanceof Tw?!0:t instanceof Ap&&t.type!==xu&&t.type!==Tu},iH=function(t,e){switch(t){case 0:return Ou(e);case 2:return P8(e);case 1:default:return ku(e)}},oH=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},sH=["-apple-system","system-ui"],lH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return sH.indexOf(e)===-1}):t},cH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=$0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,uH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(oy),uH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},fH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Yc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),hH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new fH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new I8(this,e)}return t.instanceCount=1,t}(),sy=function(t,e){return e===void 0&&(e={}),dH(t,e)};typeof window<"u"&&qw.setContext(window);var dH=function(t,e){return Br(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,V,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z;return ir(this,function(Z){switch(Z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(k=e.allowTaint)!==null&&k!==void 0?k:!1,imageTimeout:(W=e.imageTimeout)!==null&&W!==void 0?W:15e3,proxy:e.proxy,useCORS:(T=e.useCORS)!==null&&T!==void 0?T:!1},a=v0({logging:(N=e.logging)!==null&&N!==void 0?N:!0,cache:e.cache},n),i={windowWidth:(E=e.windowWidth)!==null&&E!==void 0?E:r.innerWidth,windowHeight:(x=e.windowHeight)!==null&&x!==void 0?x:r.innerHeight,scrollX:(O=e.scrollX)!==null&&O!==void 0?O:r.pageXOffset,scrollY:(j=e.scrollY)!==null&&j!==void 0?j:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new hH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(Y=e.allowTaint)!==null&&Y!==void 0?Y:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Yw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=Z.sent(),w=np(g)||g8(g)?JM(g.ownerDocument):Xc(s,g),B=w.width,C=w.height,v=w.left,y=w.top,F=pH(s,g,e.backgroundColor),Q={canvas:e.canvas,backgroundColor:F,scale:(q=(K=e.scale)!==null&&K!==void 0?K:r.devicePixelRatio)!==null&&q!==void 0?q:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+v,y:((ie=e.y)!==null&&ie!==void 0?ie:0)+y,width:(S=e.width)!==null&&S!==void 0?S:Math.ceil(B),height:(H=e.height)!==null&&H!==void 0?H:Math.ceil(C)},l?(s.logger.debug("Document cloned, using foreign object rendering"),V=new cH(s,Q),[4,V.render(g)]):[3,3];case 2:return M=Z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+v+","+y+" with size "+B+"x"+C+" using computed rendering"),s.logger.debug("Starting DOM parsing"),L=Vw(s,g),F===L.styles.backgroundColor&&(L.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),V=new nH(s,Q),[4,V.render(L)];case 4:M=Z.sent(),Z.label=5;case 5:return(!((z=e.removeContainer)!==null&&z!==void 0)||z)&&(Yw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},pH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ll(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?ll(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?ll(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Sa(n)?Sa(a)?i:a:n:i};const ly=Object.freeze(Object.defineProperty({__proto__:null,default:sy},Symbol.toStringTag,{value:"Module"})),i$="",gH={class:"label-designer"},mH={class:"toolbar"},vH={class:"center-container"},BH={key:0,class:"loader-container"},wH={class:"zoom-controls"},yH=["disabled"],bH=["disabled"],CH={class:"ruler-horizontal"},EH={class:"ruler-vertical"},UH={key:0,class:"drag-extend-lines"},FH={key:1,class:"alignment-guides"},NH=["data-item-id","onMousedown"],SH=["onMousedown"],QH=["onMousedown"],TH=["onMousedown"],xH=["onMousedown"],RH=["onMousedown"],IH=["onMousedown"],VH=["onMousedown"],MH=["onMousedown"],LH=["onMousedown"],OH={class:"property-panel",tabindex:"0"},kH={class:"property-panel-operate"},HH={class:"property-panel-title"},DH=["innerHTML"],PH={class:"position-controls"},WH={class:"control-group"},_H={class:"number-input"},ZH=["value"],jH={class:"control-group"},JH={class:"number-input"},KH=["value"],GH={key:0,class:"control-group"},zH={class:"number-input"},YH=["value"],XH={key:1,class:"control-group"},qH={class:"number-input"},$H=["value"],eD={key:2,class:"control-group"},tD={class:"number-input"},AD={class:"rotation-display"},rD={key:3,class:"control-group"},nD={class:"switch-input"},_u=.05,aD=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printWidth)||0}),u=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new hi(dA.CACHE.STYLE_CACHE_SIZE),w=new hi(dA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map($v.map(ae=>[ae.type,ae])),{selectedItems:C,selectItem:v,getCurrentSelected:y,clearSelection:F}=LM(),{dragging:Q,dragItem:M,startDrag:L}=VM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:v,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{x()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),O()},onDragUpdate:()=>{x()}}),{startResize:V,resizing:k,resizeDirection:W,resizeItem:T}=MM(l,u,o,C,()=>{const ae=y();K(ae)}),{alignmentGuides:N,showGuides:E,updateAlignmentGuides:x,clearAlignmentGuides:O}=ZM({items:i,dragItem:M,resizeItem:T,dragging:Q,resizing:k,resizeDirection:W,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:j,adjustRotation:G,adjustComponentToFitCanvas:Y,updateAspectRatio:K}=WM(C,l,u);f.watch(()=>C.value,()=>{h.clear()},{deep:!0}),f.watch(()=>k.value,ae=>{ae?x():O()}),f.watch(()=>{var ae;return(ae=T.value)==null?void 0:ae.props},()=>{k.value&&x()},{deep:!0}),f.watch(()=>M.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>T.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>i.value,()=>{(Q.value||k.value)&&x()},{deep:!0});const q=(ae,Ae)=>{var Be;(!Ae||Number(Ae)<=0&&(ae==="width"||ae==="height"))&&ot((Be=y())==null?void 0:Be.id)},ee=ae=>{const Ae=`${ae.id}_${Ce(ae.props.x,1)}_${Ce(ae.props.y,1)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}`;if(w.has(Ae))return w.get(Ae);const Be=pi(ae.props.x,ae.props.y,ae.props.width,ae.props.height,ae.props.rotation||0);return w.set(Ae,Be),Be},ie=ae=>{const Ae=ee(ae),Be=Gs(Ae);return{minX:Ce(Be.minX,3),maxX:Ce(Be.maxX,3),minY:Ce(Be.minY,3),maxY:Ce(Be.maxY,3),width:Ce(Be.maxX-Be.minX,3),height:Ce(Be.maxY-Be.minY,3),centerX:Ce((Be.minX+Be.maxX)/2,3),centerY:Ce((Be.minY+Be.maxY)/2,3)}},S=(ae,Ae)=>{const Be=ie(ae),it=(lt=>lt.type==="rectangle"?parseFloat(lt.props.LineWidth||"0.5")/3.78:0)(ae),ze=(lt,xe,vt)=>(vt==="rectangle"&&it>0,lt);switch(Ae){case"left":return{left:Ce(ze(Be.minX,Ae,ae.type),3)+"mm"};case"right":return{left:Ce(ze(Be.maxX,Ae,ae.type),3)+"mm"};case"top":return{top:Ce(ze(Be.minY,Ae,ae.type),3)+"mm"};case"bottom":return{top:Ce(ze(Be.maxY,Ae,ae.type),3)+"mm"};default:return{}}},H=()=>{f.nextTick(()=>{const ae=document.querySelector(".canvas-container");if(!ae||!l.value||!u.value)return;const Ae=ae.getBoundingClientRect(),Be=Ba(l.value),At=Ba(u.value),it=16,ze=21,lt=21,xe=20,vt=24,je=24,we=Ae.width-it*2-ze-je,Bt=Ae.height-it-lt-xe-vt;let Ye=we/Be,Ft=Bt/At,Pt=Math.min(Ye,Ft);Pt=Pt*.95;const Wt=Math.min(4,Pt);s=Math.max(.8,Math.min(Wt,Pt)),s=Math.min(3,s),o.value=z(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function z(ae,Ae){ae=ae.toString();let Be=ae.indexOf(".");return Be!==-1?ae=ae.substring(0,Ae+Be+1):ae=ae.substring(0),Number(parseFloat(ae).toFixed(Ae))}const Z=ae=>B.get(ae)||null,re=ae=>{const Ae=C.value.indexOf(ae),Be=Ae===C.value.length-1,At=Ae!==-1,it=`${ae.id}_${Math.round(ae.props.x*10)}_${Math.round(ae.props.y*10)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}_${At}_${Be}`;if(h.has(it))return h.get(it);const ze={width:ae.props.width+"mm",height:ae.props.height+"mm","--item-width":ae.props.width+"mm","--item-height":ae.props.height+"mm",transform:`translate3d(${ae.props.x}mm, ${ae.props.y}mm, 0) rotate(${ae.props.rotation}deg)`,textRendering:"geometricPrecision",WebkitTextRendering:"geometricPrecision",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform",transformOrigin:"center center",WebkitTransformOrigin:"center center"};if(At)Be?ze.zIndex=1e3:ze.zIndex=999;else{const lt=i.value.findIndex(xe=>xe.id===ae.id);ze.zIndex=100+lt}return h.set(it,ze),ze},ne=ae=>{const Ae=C.value.some(At=>At.id===ae.id),Be=y()===ae;return{"component-selected":Ae,"component-current":Ae&&Be}},ue=(ae,Ae)=>{const At=((ae.props.rotation||0)%360+360)%360;if(ae.type==="line"&&(Ae==="left"||Ae==="right")){let xe;const je=((Ae==="left"?270:90)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,top:"50%",transform:"translateY(-50%)"}}if(ae.type==="verline"&&(Ae==="top"||Ae==="bottom")){let xe;const je=((Ae==="top"?0:180)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[Ae]+At)%360;let lt="pointer";return ze>=337.5||ze<22.5?lt="n-resize":ze>=22.5&&ze<67.5?lt="ne-resize":ze>=67.5&&ze<112.5?lt="e-resize":ze>=112.5&&ze<157.5?lt="se-resize":ze>=157.5&&ze<202.5?lt="s-resize":ze>=202.5&&ze<247.5?lt="sw-resize":ze>=247.5&&ze<292.5?lt="w-resize":ze>=292.5&&ze<337.5&&(lt="nw-resize"),{cursor:lt,display:"block",visibility:"visible",opacity:"1"}},ge=()=>{o.value<4&&(o.value+=.1)},Ue=()=>{o.value>.8&&(o.value-=.1)},Ee=()=>{const ae=y();if(!ae)return 0;const{x1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Oe=()=>{const ae=y();if(!ae)return 0;const{y1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Te=()=>{const ae=y();return ae?Number((ae.props.width||0).toFixed(2)):0},Pe=()=>{const ae=y();return ae?Number((ae.props.height||0).toFixed(2)):0},pe=(ae,Ae,Be)=>{let At=0;ae==="x"?At=Ee():ae==="y"?At=Oe():ae==="width"?At=Te():ae==="height"&&(At=Pe());const it=Number(Ae)-Number(At);if(Math.abs(it)<.01){y().props[ae]="",y().props[ae]=Number(At);return}j(null,ae,it)};function $(ae){const Ae=document.activeElement.tagName.toLowerCase();if(Ae==="input"||Ae==="textarea"||!y())return;let At=!1,it=0,ze=0;ae.key==="ArrowLeft"?(it=-_u,At=!0):ae.key==="ArrowRight"?(it=_u,At=!0):ae.key==="ArrowUp"?(ze=-_u,At=!0):ae.key==="ArrowDown"&&(ze=_u,At=!0),At&&(it!==0&&j(null,"x",it),ze!==0&&j(null,"y",ze),ae.preventDefault())}const ut=({e:ae,comp:Ae,previewDiv:Be})=>{var At,it;(At=ae==null?void 0:ae.dataTransfer)==null||At.setData("comp",JSON.stringify(Ae)),document.body.appendChild(Be),(it=ae==null?void 0:ae.dataTransfer)==null||it.setDragImage(Be,0,0),setTimeout(()=>document.body.removeChild(Be),0)},Ke=async ae=>{var $t,sA,dr;ae.preventDefault();const Ae=JSON.parse(((sA=($t=ae==null?void 0:ae.dataTransfer)==null?void 0:$t.getData)==null?void 0:sA.call($t,"comp"))||"{}")||{},Be=(Ae==null?void 0:Ae.type)||"";if(!Be)return;const At=document.querySelector("#design").getBoundingClientRect(),it=(ae.clientX-At.left)/o.value,ze=(ae.clientY-At.top)/o.value,lt=De.value[Be]||{};let xe=fo(it),vt=fo(ze);const je=lt.width,we=lt.height;if(!lt.rotation||lt.rotation===0){const Yt=l.value-je,bA=u.value-we;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA))}else xe=Math.max(0,xe),vt=Math.max(0,vt);const{propertyPanel:Bt,...Ye}=lt;let Ft={...Ye,x:Ce(xe),y:Ce(vt),width:Ce(je),height:Ce(we)};if((dr=De.value[Be])!=null&&dr.propertyPanel){const Yt=di(De.value[Be].propertyPanel)||{};if(Ft={...Ft,...Yt},Be==="line"&&Yt.LineWidth){const CA=parseFloat(Yt.LineWidth)*.3528;Ft.height=Ce(CA,3)}}const Ht=((Yt,bA)=>{const{width:CA,height:Zr,lockAspectRatio:nt}=Yt;let se=CA,Ve=Zr;const _e=l.value-2,Rt=u.value-2;let EA=!1;if(CA>_e&&(se=_e,EA=!0),Zr>Rt&&(Ve=Rt,EA=!0),nt&&EA){const lA=_e/CA,hA=Rt/Zr,Rr=Math.min(lA,hA);se=Ce(CA*Rr,2),Ve=Ce(Zr*Rr,2),se=Math.min(se,_e),Ve=Math.min(Ve,Rt)}return{width:se,height:Ve}})(Ft);if(Ft.width=Ht.width,Ft.height=Ht.height,Ht.width!==je||Ht.height!==we){const Yt=l.value-Ht.width,bA=u.value-Ht.height;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA)),Ft.x=Ce(xe),Ft.y=Ce(vt)}const Wt={id:gA(),type:Be,props:Ft};if(Ft.rotation&&Ft.rotation!==0){const{x1:Yt,y1:bA}=yo(Wt),CA=checkAndAdjustBoundaries(Yt,bA,Ft.width,Ft.height,Ft.rotation,l.value,u.value);(CA.x1!==Yt||CA.y1!==bA)&&g0(Wt,CA.x1,CA.y1)}i.value.push(Wt),v(Wt)};function Se(ae){ae.target.id!=="design"&&(ae.target.closest("#design")||F())}function Re(ae){let Ae=null;try{Ae=He(ae.clientX,ae.clientY)}catch(ze){console.error("坐标检测出错:",ze)}if(Ae){v(Ae);return}let Be=ae.target,At=null;for(;Be&&Be!==document.querySelector("#design");){if(Be.classList&&(Be.classList.contains("canvas-item")||Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle")||Be.classList.contains("property-panel")||Be.tagName==="INPUT"||Be.tagName==="TEXTAREA"||Be.tagName==="BUTTON")){if(Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle"))return;if(Be.classList.contains("canvas-item")){const ze=Be.getAttribute("data-item-id");if(At=i.value.find(lt=>lt.id===ze),At){v(At);return}}if(Be.closest(".canvas-item")){const lt=Be.closest(".canvas-item").getAttribute("data-item-id"),xe=i.value.find(vt=>vt.id===lt);if(xe){v(xe);return}}if(Be.closest(".canvas-item")||Be.classList.contains("td-text-content")||Be.classList.contains("barcode-component")||Be.classList.contains("qr-code-component")||Be.classList.contains("image-component")||Be.classList.contains("rectangle-component")||Be.classList.contains("hor-line-component")){const ze=He(ae.clientX,ae.clientY);if(ze){v(ze);return}}break}Be=Be.parentElement}const it=document.querySelector("#design");if(it&&it.contains(ae.target)){const ze=it.getBoundingClientRect(),lt=o.value,xe=(ae.clientX-ze.left)/lt,vt=(ae.clientY-ze.top)/lt,je=fo(xe),we=fo(vt);for(let Bt=i.value.length-1;Bt>=0;Bt--){const Ye=i.value[Bt],Ft=parseFloat(Ye.props.x||0),Pt=parseFloat(Ye.props.y||0),Ht=parseFloat(Ye.props.width||0),Wt=parseFloat(Ye.props.height||0),$t=1;if(je>=Ft-$t&&je<=Ft+Ht+$t&&we>=Pt-$t&&we<=Pt+Wt+$t){v(Ye);return}}}F()}function He(ae,Ae){const Be=document.querySelector("#design");if(!Be)return null;const At=Be.getBoundingClientRect(),it=o.value,ze=(ae-At.left)/it,lt=(Ae-At.top)/it,xe=fo(ze),vt=fo(lt);for(let je=i.value.length-1;je>=0;je--){const we=i.value[je];if(ke(xe,vt,we)){if(we.type==="rectangle")for(let Ye=je-1;Ye>=0;Ye--){const Ft=i.value[Ye];if(ke(xe,vt,Ft))return Ft}return we}}for(let je=0;je<i.value.length;je++){const we=i.value[je];if(ke(xe,vt,we))return we}return null}function ke(ae,Ae,Be){const At=parseFloat(Be.props.x||0),it=parseFloat(Be.props.y||0),ze=parseFloat(Be.props.width||0),lt=parseFloat(Be.props.height||0),xe=parseFloat(Be.props.rotation||0),vt=AB(ae,Ae,At,it,ze,lt,xe);return vt||AB(ae,Ae,At-1,it-1,ze+2,lt+2,xe)}function We(ae){return ae.preventDefault(),!1}const qe=(ae,Ae)=>{if(ae.stopPropagation(),ae.target.classList.contains("resize-handle")||ae.target.classList.contains("rotate-handle")||ae.target.classList.contains("delete-btn"))return;const At=He(ae.clientX,ae.clientY)||Ae;v(At),f.nextTick(()=>{L(ae,At)})},ot=ae=>{if(h.clear(),w.clear(),i.value.find(Be=>Be.id===ae)&&(i.value=i.value.filter(Be=>Be.id!==ae)),C.value.some(Be=>Be.id===ae)){const Be=C.value.filter(At=>At.id!==ae);C.value=Be}f.nextTick(()=>{})},rt=ae=>{var Be;const Ae=document.activeElement.tagName.toLowerCase();Ae==="input"||Ae==="textarea"||(ae.key==="Delete"||ae.key==="Backspace")&&C.value.length>0&&ot((Be=y())==null?void 0:Be.id)},ft=ae=>{if(C.value.length>0){const Ae=C.value[C.value.length-1];Ae.props.rotation=ae,Y(Ae,ae)}},dt=()=>{setTimeout(()=>{const ae=document.querySelector(".center-container");if(!ae)return;const Ae=ae.getBoundingClientRect();ae.style.height=`calc(100vh - ${Ae==null?void 0:Ae.top}px)`,H()},200)};f.watch(()=>A.templateInfo,(ae,Ae)=>{ae&&Ae&&ae.id!==Ae.id?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&!Ae?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&(r.value=ae||{})},{deep:!0,immediate:!0});const{handleCopy:tt,handlePaste:pt}=_M(i,C,l,u,Y),De=f.ref({}),Mt=f.ref(!1),Et=async ae=>{try{Mt.value=!1,De.value=await rM(ae),Mt.value=!0}catch{De.value={},Mt.value=!0}};f.watch(()=>A.templateType,async ae=>{try{await Et(ae),F(),h.clear(),w.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Mt.value||await Et(A.templateType),window.addEventListener("resize",dt),window.addEventListener("keydown",rt),window.addEventListener("keydown",tt),window.addEventListener("keydown",pt),window.addEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.addEventListener("contextmenu",We),dt(),_A()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",dt),window.removeEventListener("keydown",rt),window.removeEventListener("keydown",tt),window.removeEventListener("keydown",pt),window.removeEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.removeEventListener("contextmenu",We),h.clear(),w.clear()});function gA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ae=>{const Ae=Math.random()*16|0;return(ae==="x"?Ae:Ae&3|8).toString(16)})}const Ut=ae=>{var Be;if(!De.value||!De.value[ae])return{};const Ae=De.value[ae]||{};return ae==="image"&&((Be=A.config)!=null&&Be.image)?{...Ae,image:{...Ae.image,...A.config.image}}:Ae},Tt=ae=>Ut(ae).allowRotation!==!1,AA=()=>OM(i,r.value),St=ae=>{r.value.graphData=ae||{},_A()},_A=()=>{var Ae;const ae=jM(r.value.graphData)||"";ae&&((Ae=document.querySelector("#design"))==null||Ae.appendChild(ae))},Dt=async ae=>{var Be;const Ae=JSON.parse(JSON.stringify(ae));for(const At of Ae)if(At.type==="image"&&((Be=At.props)!=null&&Be.ImageSrc)){const it=At.props.ImageSrc;typeof it=="object"&&it.fileSrc&&it.fileSrc}return Ae},oA=()=>new Promise(async(ae,Ae)=>{try{F();const Be=JSON.parse(JSON.stringify(i.value)),At=await Dt(Be),it=[...i.value];i.value=At;const ze=()=>{var vt;const lt=((vt=document.querySelector("#design"))==null?void 0:vt.querySelectorAll("img"))||[],xe=Array.from(lt).map(je=>je.complete?Promise.resolve():new Promise(we=>{je.onload=je.onerror=we}));return Promise.all(xe)};f.nextTick(async()=>{var je;await new Promise(we=>setTimeout(we,100)),await ze(),(((je=document.querySelector("#design"))==null?void 0:je.querySelectorAll("img"))||[]).forEach((we,Bt)=>{});const xe=document.querySelector("#design");if(!xe){Ae(new Error("找不到要转换的DOM元素"));return}const vt=o.value;ze().then(()=>{sy(xe,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:we=>{const Bt=we.querySelector(".canvas-wrapper");if(Bt){const Ht=Bt.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();Bt.style.transform=Ht||"none",Bt.style.opacity="1"}const Ye=we.querySelector("#design");if(Ye){const Pt=window.getComputedStyle(xe);for(let Ht=0;Ht<Pt.length;Ht++){const Wt=Pt[Ht];Ye.style[Wt]=Pt.getPropertyValue(Wt)}}we.querySelectorAll("img").forEach(Pt=>{Pt.style.imageRendering="high-quality",Pt.style.webkitImageRendering="high-quality",Pt.style.mozImageRendering="high-quality",Pt.style.objectFit="contain",Pt.style.objectPosition="center"})}}).then(we=>{i.value=it;const Bt=we.toDataURL("image/png");ae({data:AA(),image:Bt})}).catch(we=>{i.value=it,Ae(we)})}).catch(we=>{Ae(we)})})}catch(Be){Ae(Be)}}),Jt=()=>new Promise((ae,Ae)=>{i.value.forEach(At=>{if(At.type==="image"&&!At.props.ImageSrc)return Vs.warning("图片控件请选择图片!"),Ae("图片控件请选择图片!")}),ae(!0)});return e({getJson:()=>Jt().then(()=>AA()),clear:()=>{i.value=[],F()},snapshot:()=>Jt().then(()=>oA())}),(ae,Ae)=>{var xe,vt,je;const Be=f.resolveComponent("el-button"),At=f.resolveComponent("el-icon-info-filled"),it=f.resolveComponent("el-icon"),ze=f.resolveComponent("el-tooltip"),lt=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",gH,[f.createElementVNode("div",mH,[f.createVNode(uM,{onDragStart:ut,config:t.config,propsConfig:De.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",vH,[a.value?(f.openBlock(),f.createElementBlock("div",BH,[...Ae[33]||(Ae[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",{class:"center-toolbar",style:f.normalizeStyle(`background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`)},[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(TM,{"graph-data":(xe=r.value)==null?void 0:xe.graphData,onSuccess:St},null,8,["graph-data"]),Ae[34]||(Ae[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",wH,[f.createElementVNode("button",{onClick:Ue,disabled:o.value<=.8},"-",8,yH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:ge,disabled:o.value>=4},"+",8,bH)])],4),f.createElementVNode("div",{class:"canvas-container",style:f.normalizeStyle(`--scale: ${Math.max(0,1/(o.value||1))};background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`),onClick:Se},[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",CH,[f.createVNode(eB,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",EH,[f.createVNode(eB,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Ke,onDragover:Ae[0]||(Ae[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Re,onContextmenu:Ae[1]||(Ae[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(Q)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",UH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(E)?(f.openBlock(),f.createElementBlock("div",FH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).horizontal,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Bt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${we.type}`]),style:f.normalizeStyle({top:`${we.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).vertical,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Bt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${we.type}`]),style:f.normalizeStyle({left:`${we.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,we=>{var Bt;return f.openBlock(),f.createElementBlock("div",{key:we.id,class:f.normalizeClass(["canvas-item",ne(we)]),style:f.normalizeStyle(re(we)),"data-item-id":we.id,onMousedown:Ye=>qe(Ye,we)},[f.unref(y)()===we?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(ue(we,"top")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(ue(we,"bottom")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom"),["stop"])},null,44,TH)):f.createCommentVNode("",!0),we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":we.type==="line"}]),style:f.normalizeStyle(ue(we,"left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"left"),["stop"])},null,46,xH)):f.createCommentVNode("",!0),we.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,RH)):f.createCommentVNode("",!0)],64)),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(ue(we,"top-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-left"),["stop"])},null,44,IH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(ue(we,"top-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-right"),["stop"])},null,44,VH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(ue(we,"bottom-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-right"),["stop"])},null,44,MH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(ue(we,"bottom-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-left"),["stop"])},null,44,LH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),we.props&&Mt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Bt=Z(we.type))==null?void 0:Bt.component)||null),{key:`${we.id}-${we.type}`,modelValue:{...we.props,__selected:f.unref(y)()===we,options:A.options},propsConfig:De.value,"onUpdate:modelValue":Ye=>{const{__selected:Ft,options:Pt,...Ht}=Ye;Object.keys(Ht).forEach(Wt=>{Ht[Wt]!==void 0&&(we.props[Wt]=Ht[Wt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,NH)}),128))],36)],4)],4)]),f.createElementVNode("div",OH,[f.unref(C).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",kH,[f.createVNode(Be,{type:"danger",onClick:Ae[2]||(Ae[2]=we=>ot(f.unref(y)().id))},{default:f.withCtx(()=>[...Ae[35]||(Ae[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",HH,[Ae[36]||(Ae[36]=f.createTextVNode(" 属性设置 ",-1)),(vt=Ut(f.unref(y)().type))!=null&&vt.desc?(f.openBlock(),f.createBlock(ze,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:Ut(f.unref(y)().type).desc},null,8,DH)]),default:f.withCtx(()=>[f.createVNode(it,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(At)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",PH,[f.createElementVNode("div",WH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",_H,[f.createElementVNode("button",{onClick:Ae[3]||(Ae[3]=f.withModifiers(we=>f.unref(j)(we,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ee(),onInput:Ae[4]||(Ae[4]=we=>pe("x",we.target.value)),onClick:Ae[5]||(Ae[5]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[6]||(Ae[6]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[7]||(Ae[7]=f.withModifiers(()=>{},["prevent"]))},null,40,ZH),f.createElementVNode("button",{onClick:Ae[8]||(Ae[8]=f.withModifiers(we=>f.unref(j)(we,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",jH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",JH,[f.createElementVNode("button",{onClick:Ae[9]||(Ae[9]=f.withModifiers(we=>f.unref(j)(we,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:Ae[10]||(Ae[10]=we=>pe("y",we.target.value)),onClick:Ae[11]||(Ae[11]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[12]||(Ae[12]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[13]||(Ae[13]=f.withModifiers(()=>{},["prevent"]))},null,40,KH),f.createElementVNode("button",{onClick:Ae[14]||(Ae[14]=f.withModifiers(we=>f.unref(j)(we,"y",.5),["stop"]))},"+")])]),f.unref(y)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",GH,[Ae[37]||(Ae[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",zH,[f.createElementVNode("button",{onClick:Ae[15]||(Ae[15]=f.withModifiers(we=>f.unref(j)(we,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:Ae[16]||(Ae[16]=we=>pe("width",we.target.value)),onClick:Ae[17]||(Ae[17]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[18]||(Ae[18]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[19]||(Ae[19]=we=>q("width",we.target.value)),onWheel:Ae[20]||(Ae[20]=f.withModifiers(()=>{},["prevent"]))},null,40,YH),f.createElementVNode("button",{onClick:Ae[21]||(Ae[21]=f.withModifiers(we=>f.unref(j)(we,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",XH,[Ae[38]||(Ae[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",qH,[f.createElementVNode("button",{onClick:Ae[22]||(Ae[22]=f.withModifiers(we=>f.unref(j)(we,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Pe(),onInput:Ae[23]||(Ae[23]=we=>pe("height",we.target.value)),onClick:Ae[24]||(Ae[24]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[25]||(Ae[25]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[26]||(Ae[26]=we=>q("height",we.target.value)),onWheel:Ae[27]||(Ae[27]=f.withModifiers(()=>{},["prevent"]))},null,40,$H),f.createElementVNode("button",{onClick:Ae[28]||(Ae[28]=f.withModifiers(we=>f.unref(j)(we,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),Tt(f.unref(y)().type)?(f.openBlock(),f.createElementBlock("div",eD,[Ae[39]||(Ae[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",tD,[f.createElementVNode("button",{onClick:Ae[29]||(Ae[29]=f.withModifiers(we=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",AD,f.toDisplayString(f.unref(y)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:Ae[30]||(Ae[30]=f.withModifiers(we=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",rD,[Ae[40]||(Ae[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",nD,[f.createVNode(lt,{modelValue:f.unref(y)().props.lockAspectRatio,"onUpdate:modelValue":Ae[31]||(Ae[31]=we=>f.unref(y)().props.lockAspectRatio=we),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=Z(f.unref(y)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(y)().props,"onUpdate:modelValue":Ae[32]||(Ae[32]=we=>f.unref(y)().props=we),options:t.options,"props-config":Ut(f.unref(y)().type),onRotationChange:ft},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-1cb9afe7"]]),s$="",Vo=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(C,v)=>{let y;return function(...Q){const M=()=>{clearTimeout(y),C(...Q)};clearTimeout(y),y=setTimeout(M,v)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const C=a.value.getBoundingClientRect(),v=g(a.value);let y=0;if(C.top>0)y=C.top;else if(v){const F=h(a.value);y=F>0?F:60}else{const F=a.value.offsetTop;F>0?y=F:y=60}(y!==l.value.rectTop||v!==l.value.isInModal)&&(i.value=y,o.value=v,l.value={rectTop:y,isInModal:v})},d=s(u,100),g=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog")))return!0;v=v.parentElement}return!1},h=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog"))){const y=v.getBoundingClientRect();return y.top>0?y.top:60}v=v.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,C=>{C&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,C=>w(C),{deep:!0,immediate:!0});function w(C){if(r.value=(C==null?void 0:C.width)>0&&(C==null?void 0:C.height)>0,!r.value)return;const v={...C};v.printWidth||Object.assign(v,{printWidth:v.width}),v.printHeight||Object.assign(v,{printHeight:v.height}),v!=null&&v.graphData||Object.assign(v,{graphData:{printList:[{x:0,y:0,width:C.printWidth,height:C.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),v!=null&&v.items||Object.assign(v,{items:[]}),n.value=v}function B(C){e.exposed=C||{},e.exposeProxy=C||{}}return(C,v)=>{const y=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(aD,{...C.$attrs,...A,ref:B},C.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[y,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var sr=Uint8Array,Wr=Uint16Array,dp=Int32Array,Zu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ju=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cy=function(t,e){for(var A=new Wr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new dp(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},uy=cy(Zu,2),fy=uy.b,gp=uy.r;fy[28]=258,gp[258]=28;for(var hy=cy(ju,0),iD=hy.b,dy=hy.r,mp=new Wr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,mp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var kn=function(t,e,A){for(var r=t.length,n=0,a=new Wr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Wr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Wr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[mp[d]>>s]=l}else for(o=new Wr(r),n=0;n<r;++n)t[n]&&(o[n]=mp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var gl=new sr(32),iA=0;iA<32;++iA)gl[iA]=5;var oD=kn(Ia,9,0),sD=kn(Ia,9,1),lD=kn(gl,5,0),cD=kn(gl,5,1),vp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},pn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},Bp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},wp=function(t){return(t+7)/8|0},py=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},uD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],gn=function(t,e,A){var r=new Error(e||uD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,gn),!A)throw r;return r},fD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Ee){var Oe=A.length;if(Ee>Oe){var Te=new sr(Math.max(Oe*2,Ee));Te.set(A),A=Te}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,w=e.d,B=e.m,C=e.n,v=n*8;do{if(!h){u=pn(t,d,1);var y=pn(t,d+1,3);if(d+=3,y)if(y==1)h=sD,w=cD,B=9,C=5;else if(y==2){var L=pn(t,d,31)+257,V=pn(t,d+10,15)+4,k=L+pn(t,d+5,31)+1;d+=14;for(var W=new sr(k),T=new sr(19),N=0;N<V;++N)T[pp[N]]=pn(t,d+N*3,7);d+=V*3;for(var E=vp(T),x=(1<<E)-1,O=kn(T,E,1),N=0;N<k;){var j=O[pn(t,d,x)];d+=j&15;var F=j>>4;if(F<16)W[N++]=F;else{var G=0,Y=0;for(F==16?(Y=3+pn(t,d,3),d+=2,G=W[N-1]):F==17?(Y=3+pn(t,d,7),d+=3):F==18&&(Y=11+pn(t,d,127),d+=7);Y--;)W[N++]=G}}var K=W.subarray(0,L),q=W.subarray(L);B=vp(K),C=vp(q),h=kn(K,B,1),w=kn(q,C,1)}else gn(1);else{var F=wp(d)+4,Q=t[F-4]|t[F-3]<<8,M=F+Q;if(M>n){s&&gn(0);break}o&&l(g+Q),A.set(t.subarray(F,M),g),e.b=g+=Q,e.p=d=M*8,e.f=u;continue}if(d>v){s&&gn(0);break}}o&&l(g+131072);for(var ee=(1<<B)-1,ie=(1<<C)-1,S=d;;S=d){var G=h[Bp(t,d)&ee],H=G>>4;if(d+=G&15,d>v){s&&gn(0);break}if(G||gn(2),H<256)A[g++]=H;else if(H==256){S=d,h=null;break}else{var z=H-254;if(H>264){var N=H-257,Z=Zu[N];z=pn(t,d,(1<<Z)-1)+fy[N],d+=Z}var re=w[Bp(t,d)&ie],ne=re>>4;re||gn(3),d+=re&15;var q=iD[ne];if(ne>3){var Z=ju[ne];q+=Bp(t,d)&(1<<Z)-1,d+=Z}if(d>v){s&&gn(0);break}o&&l(g+131072);var ue=g+z;if(g<q){var ge=a-q,Ue=Math.min(q,ue);for(ge+g<0&&gn(3);g<Ue;++g)A[g]=r[ge+g]}for(;g<ue;++g)A[g]=A[g-q]}}e.l=h,e.p=S,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=w,e.n=C)}while(!u);return g!=A.length&&i?py(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ml=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},yp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:By,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,L){return M.f-L.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Wr(g+1),w=bp(A[u-1],h,0);if(w>e){var r=0,B=0,C=w-e,v=1<<C;for(a.sort(function(L,V){return h[V.s]-h[L.s]||L.f-V.f});r<n;++r){var y=a[r].s;if(h[y]>e)B+=v-(1<<w-h[y]),h[y]=e;else break}for(B>>=C;B>0;){var F=a[r].s;h[F]<e?B-=1<<e-h[F]++-1:++r}for(;r>=0&&B;--r){var Q=a[r].s;h[Q]==e&&(--h[Q],++B)}w=e}return{t:new sr(h),l:w}},bp=function(t,e,A){return t.s==-1?Math.max(bp(t.l,e,A+1),bp(t.r,e,A+1)):e[t.s]=A},gy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Wr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},vl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},my=function(t,e,A){var r=A.length,n=wp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},vy=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=yp(n,15),g=d.t,h=d.l,w=yp(a,15),B=w.t,C=w.l,v=gy(g),y=v.c,F=v.n,Q=gy(B),M=Q.c,L=Q.n,V=new Wr(19),k=0;k<y.length;++k)++V[y[k]&31];for(var k=0;k<M.length;++k)++V[M[k]&31];for(var W=yp(V,7),T=W.t,N=W.l,E=19;E>4&&!T[pp[E-1]];--E);var x=l+5<<3,O=vl(n,Ia)+vl(a,gl)+i,j=vl(n,g)+vl(a,B)+i+14+3*E+vl(V,T)+2*V[16]+3*V[17]+7*V[18];if(s>=0&&x<=O&&x<=j)return my(e,u,t.subarray(s,s+l));var G,Y,K,q;if($n(e,u,1+(j<O)),u+=2,j<O){G=kn(g,h,0),Y=g,K=kn(B,C,0),q=B;var ee=kn(T,N,0);$n(e,u,F-257),$n(e,u+5,L-1),$n(e,u+10,E-4),u+=14;for(var k=0;k<E;++k)$n(e,u+3*k,T[pp[k]]);u+=3*E;for(var ie=[y,M],S=0;S<2;++S)for(var H=ie[S],k=0;k<H.length;++k){var z=H[k]&31;$n(e,u,ee[z]),u+=T[z],z>15&&($n(e,u,H[k]>>5&127),u+=H[k]>>12)}}else G=oD,Y=Ia,K=lD,q=gl;for(var k=0;k<o;++k){var Z=r[k];if(Z>255){var z=Z>>18&31;ml(e,u,G[z+257]),u+=Y[z+257],z>7&&($n(e,u,Z>>23&31),u+=Zu[z]);var re=Z&31;ml(e,u,K[re]),u+=q[re],re>3&&(ml(e,u,Z>>5&8191),u+=ju[re])}else ml(e,u,G[Z]),u+=Y[Z]}return ml(e,u,G[256]),u+Y[256]},hD=new dp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=new sr(0),dD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=hD[e-1],g=d>>13,h=d&8191,w=(1<<A)-1,B=a.p||new Wr(32768),C=a.h||new Wr(w+1),v=Math.ceil(A/3),y=2*v,F=function(Pe){return(t[Pe]^t[Pe+1]<<v^t[Pe+2]<<y)&w},Q=new dp(25e3),M=new Wr(288),L=new Wr(32),V=0,k=0,W=a.i||0,T=0,N=a.w||0,E=0;W+2<i;++W){var x=F(W),O=W&32767,j=C[x];if(B[O]=j,C[x]=O,N<=W){var G=i-W;if((V>7e3||T>24576)&&(G>423||!l)){u=vy(t,s,0,Q,M,L,k,T,E,W-E,u),T=V=k=0,E=W;for(var Y=0;Y<286;++Y)M[Y]=0;for(var Y=0;Y<30;++Y)L[Y]=0}var K=2,q=0,ee=h,ie=O-j&32767;if(G>2&&x==F(W-ie))for(var S=Math.min(g,G)-1,H=Math.min(32767,W),z=Math.min(258,G);ie<=H&&--ee&&O!=j;){if(t[W+K]==t[W+K-ie]){for(var Z=0;Z<z&&t[W+Z]==t[W+Z-ie];++Z);if(Z>K){if(K=Z,q=ie,Z>S)break;for(var re=Math.min(ie,Z-2),ne=0,Y=0;Y<re;++Y){var ue=W-ie+Y&32767,ge=B[ue],Ue=ue-ge&32767;Ue>ne&&(ne=Ue,j=ue)}}}O=j,j=B[O],ie+=O-j&32767}if(q){Q[T++]=268435456|gp[K]<<18|dy[q];var Ee=gp[K]&31,Oe=dy[q]&31;k+=Zu[Ee]+ju[Oe],++M[257+Ee],++L[Oe],N=W+K,++V}else Q[T++]=t[W],++M[t[W]]}}for(W=Math.max(W,N);W<i;++W)Q[T++]=t[W],++M[t[W]];u=vy(t,s,l,Q,M,L,k,T,E,W-E,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=C,a.p=B,a.i=W,a.w=N)}else{for(var W=a.w||0;W<i+l;W+=65535){var Te=W+65535;Te>=i&&(s[u/8|0]=l,Te=i),u=my(s,u+1,t.subarray(W,Te))}a.i=i}return py(o,0,r+wp(u)+n)},wy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},pD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return dD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},yy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},gD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=wy();n.p(e.dictionary),yy(t,2,n.d())}},mD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&gn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&gn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Cp(t,e){e||(e={});var A=wy();A.p(t);var r=pD(t,e,e.dictionary?6:2,4);return gD(r,e),yy(r,r.length-4,A.d()),r}function vD(t,e){return fD(t.subarray(mD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var BD=typeof TextDecoder<"u"&&new TextDecoder,wD=0;try{BD.decode(By,{stream:!0}),wD=1}catch{}/** @license
|
|
60
60
|
*
|
|
61
61
|
* jsPDF - PDF Document creation from JavaScript
|
|
62
62
|
* Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
|