hzzt-kfb-slide 1.0.0 → 1.0.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.
Files changed (132) hide show
  1. package/dist/components/{annotateC3OVdLbw.js → annotateBOHyE-BS.js} +12 -11
  2. package/dist/components/annotateBiwRHJDN.js +1 -0
  3. package/dist/components/{annotateBXULk5a3.js → annotateBzzswUfv.js} +1 -1
  4. package/dist/components/{annotatefXNCoYLu.js → annotateCK6hezNo.js} +1 -1
  5. package/dist/components/{arrowCirclev1KayThM.js → arrowCircleCWgZY2Gf.js} +1 -1
  6. package/dist/components/{arrowCircleDb7gdIQS.js → arrowCircleDJR-9OCD.js} +1 -1
  7. package/dist/components/{arrowDowncYTpkFcN.js → arrowDownBvce0u9c.js} +1 -1
  8. package/dist/components/{arrowDownCm-5KDAU.js → arrowDownWhFOaN2S.js} +1 -1
  9. package/dist/components/{arrowLeft9SPBOHcg.js → arrowLeftBfOo4tCy.js} +1 -1
  10. package/dist/components/{arrowLeftD65JAYbD.js → arrowLeftDdScm86H.js} +1 -1
  11. package/dist/components/{arrowRightpIgnyZh6.js → arrowRight7DRwBLb2.js} +1 -1
  12. package/dist/components/{arrowRightCIWfQMbL.js → arrowRightktODfALk.js} +1 -1
  13. package/dist/components/{arrowUpJpl1g1-G.js → arrowUpBFgKhHLD.js} +1 -1
  14. package/dist/components/{arrowUpCq7z0mry.js → arrowUpDuBQjmLC.js} +1 -1
  15. package/dist/components/{arrowD55SnzAO.js → arrowcQaNYOk_.js} +1 -1
  16. package/dist/components/{arrowBebrxyVJ.js → arrowxlJNC3Xd.js} +1 -1
  17. package/dist/components/{bilaterallYvfjpCQ.js → bilateralBx31Pt_f.js} +1 -1
  18. package/dist/components/{bilateralCyZAkzPD.js → bilateralCMUeHEqO.js} +1 -1
  19. package/dist/components/{channelB2Intm6x.js → channel4txfMGOK.js} +1 -1
  20. package/dist/components/{channellCmZ9Sjy.js → channelDykWApvs.js} +1 -1
  21. package/dist/components/{checkapiu6iX2.js → checkBXocVg_N.js} +1 -1
  22. package/dist/components/{checkCH14v3q4.js → checkCip_EEpj.js} +1 -1
  23. package/dist/components/{config6zfrNiYP.js → configChIS6jY0.js} +1 -1
  24. package/dist/components/{configCJrkE1Ba.js → configD5z_wcFp.js} +1 -1
  25. package/dist/components/{customC1eYwvra.js → customBkwNWgIG.js} +1 -1
  26. package/dist/components/{customBt3sPDiX.js → customDClB-7OW.js} +1 -1
  27. package/dist/components/{deleteBh2jjS8Q.js → deleteBql6MXmA.js} +1 -1
  28. package/dist/components/{deleteB4TBexlb.js → deleteDEV1CXd_.js} +1 -1
  29. package/dist/components/dotBKMhhwQJ.js +1 -0
  30. package/dist/components/{dotDywcPhQw.js → dotCkxO2y2_.js} +1 -1
  31. package/dist/components/dotD7t1uU2Y.js +124 -0
  32. package/dist/components/{dotDwG_BTC2.js → dotDFv5ULkE.js} +1 -1
  33. package/dist/components/{dotOFGGA5wO.js → dotDbRony31.js} +1 -1
  34. package/dist/components/{dotDASJOh6f.js → dotDsZ1hxaO.js} +1 -1
  35. package/dist/components/{downloadBO0s85Tq.js → download-j1kbLvu.js} +1 -1
  36. package/dist/components/{downloadBMzWastU.js → downloadB5Rtk_Ec.js} +3 -3
  37. package/dist/components/{downloadD2OeK4ct.js → downloadCE7-kbWE.js} +1 -1
  38. package/dist/components/{downloadB1Jo3FS4.js → downloadDyg64yHi.js} +1 -1
  39. package/dist/components/{ellipselcNlqp5Y.js → ellipseXLAly11X.js} +1 -1
  40. package/dist/components/{ellipseCBentgzl.js → ellipsez5glo58z.js} +1 -1
  41. package/dist/components/{expandLeftuIBH2ofC.js → expandLeftDZGxiOkV.js} +1 -1
  42. package/dist/components/{expandLeftCnZGNy5v.js → expandLeftDzbIVQMl.js} +1 -1
  43. package/dist/components/{expandRightCT0BIMZm.js → expandRightBcFL2opk.js} +1 -1
  44. package/dist/components/{expandRightBdoWM3Vs.js → expandRightDPL4kKOR.js} +1 -1
  45. package/dist/components/{flagJtLMNwHY.js → flagCEblUCIq.js} +1 -1
  46. package/dist/components/{flagGISC_b3y.js → flagDp5OHCjv.js} +1 -1
  47. package/dist/components/{flipB-qXP6Q9.js → flipBFbQcb03.js} +1 -1
  48. package/dist/components/{flipCZl2lxAO.js → flipBQ0Xod0L.js} +1 -1
  49. package/dist/components/{fontW5MHoBzB.js → fontB4y8mhGP.js} +1 -1
  50. package/dist/components/{font4igYIYsf.js → fontDl6_nSTg.js} +1 -1
  51. package/dist/components/{fullscreenBIdxrxXK.js → fullscreenCH9ZzQyZ.js} +1 -1
  52. package/dist/components/{fullscreenCm761DtW.js → fullscreenCZBMHIF7.js} +1 -1
  53. package/dist/components/{fullscreen2dVSJWVp.js → fullscreenD_TY5Nj-.js} +2 -2
  54. package/dist/components/{fullscreenC-tKkjV4.js → fullscreenw73vtLHZ.js} +1 -1
  55. package/dist/components/indexChPoAAH8.js +3558 -0
  56. package/dist/components/indexD0Afmk2w.js +4 -0
  57. package/dist/components/{infoDMVJP1Cd.js → infoCGV0Ckdj.js} +1 -1
  58. package/dist/components/{infoD2IMFQXk.js → infoCcN2ke9s.js} +1 -1
  59. package/dist/components/{levelCFVX6z4i.js → levelBoZTrlWY.js} +1 -1
  60. package/dist/components/{levelB_QTp4Xi.js → levelSLHseJUd.js} +1 -1
  61. package/dist/components/{lineBxZOdVfy.js → lineB4tlEhOz.js} +1 -1
  62. package/dist/components/{lineBycx0Mkw.js → lineai7PmGoN.js} +1 -1
  63. package/dist/components/measureBhI4DO7U.js +25 -0
  64. package/dist/components/measureP6lTvt_p.js +1 -0
  65. package/dist/components/{microscopeDUHq8JL3.js → microscopeBMbzVPf5.js} +1 -1
  66. package/dist/components/{microscopeDUesGOn_.js → microscopeBMmZiutB.js} +1 -1
  67. package/dist/components/{microscopeCZTM_ehn.js → microscopeBuHGpte5.js} +1 -1
  68. package/dist/components/{microscopeD8MUHQWQ.js → microscopeDlizQREt.js} +3 -3
  69. package/dist/components/{moveDwZgrTRP.js → moveBN48Eruo.js} +1 -1
  70. package/dist/components/{moveBUITB2ja.js → moveBORYuNEh.js} +3 -3
  71. package/dist/components/{movecYGcerAL.js → moveD5fPz3_o.js} +1 -1
  72. package/dist/components/{moveBIuTguMD.js → moveDMtTFV7a.js} +1 -1
  73. package/dist/components/{nextBQVQnvyy.js → nextBH47Byfp.js} +1 -1
  74. package/dist/components/{nextCeh2jgS4.js → nextCnqehpYc.js} +1 -1
  75. package/dist/components/{polygonC4iKaYgF.js → polygonCNoWnb2M.js} +1 -1
  76. package/dist/components/{polygonCamQnBtA.js → polygonvNsuSZr2.js} +1 -1
  77. package/dist/components/{prevCjZKY243.js → prevBX_D_1FN.js} +1 -1
  78. package/dist/components/{prevDDHoj_LV.js → previeYap8xB.js} +1 -1
  79. package/dist/components/{processCFBw9FJP.js → process7Wnp-DLW.js} +1 -1
  80. package/dist/components/{processDYjuD83F.js → processCN8_do68.js} +3 -3
  81. package/dist/components/{processOHQJqtQo.js → processDOlJ_YFV.js} +1 -1
  82. package/dist/components/{processChbrioTG.js → processDS-q-T9u.js} +1 -1
  83. package/dist/components/{rectangleXf-LTs1a.js → rectangleBZTD1YG5.js} +1 -1
  84. package/dist/components/{rectangleD5ywA0Ta.js → rectangleDD23CZRf.js} +1 -1
  85. package/dist/components/{rotateBsz3FJqm.js → rotateBGZgayTz.js} +1 -1
  86. package/dist/components/{rotatet8o3SDAN.js → rotateBR4JOMZq.js} +1 -1
  87. package/dist/components/{rotateDST5eMiU.js → rotateDQ7H7OQH.js} +1 -1
  88. package/dist/components/{rotateCrWxL6Ps.js → rotateDoqVfopB.js} +4 -4
  89. package/dist/components/{settingCV0rULKk.js → setting2e5gN6yv.js} +1 -1
  90. package/dist/components/{settingNVWoLUmP.js → settingB1Lh8oPl.js} +1 -1
  91. package/dist/components/{settingBmAPoxv1.js → settingB8WACAuV.js} +3 -3
  92. package/dist/components/{settingDYBf7fLa.js → settingDVLfrSX6.js} +1 -1
  93. package/dist/components/{starC15qlFU3.js → starB8Jj8B7G.js} +1 -1
  94. package/dist/components/{starjhiRCzFS.js → starBzvIjo3q.js} +1 -1
  95. package/dist/components/{tailorOTm6dE6E.js → tailorCg8ygNd0.js} +1 -1
  96. package/dist/components/{tailorDbgY1KsK.js → tailorLoKadwnW.js} +1 -1
  97. package/dist/components/useCommonBBvTTBdi.js +1 -0
  98. package/dist/components/useCommonCzBK1cvQ.js +22 -0
  99. package/dist/components/{voiceq0Td6sML.js → voiceBCkA6RrA.js} +1 -1
  100. package/dist/components/{voiceCtNb1pEe.js → voiceCKZjRzRM.js} +1 -1
  101. package/dist/components/zoomDImPX6s2.js +65 -0
  102. package/dist/components/{zoomInCkyk_ved.js → zoomInBltposUo.js} +1 -1
  103. package/dist/components/{zoomInCtgL2ac0.js → zoomInCy_C3q6n.js} +1 -1
  104. package/dist/components/{zoomOutBnHVu9RJ.js → zoomOutBSqsR8_b.js} +1 -1
  105. package/dist/components/{zoomOutDMP5lyit.js → zoomOutCRXlTIS0.js} +1 -1
  106. package/dist/components/zoomU5MDBf57.js +1 -0
  107. package/dist/index.cjs.js +1 -1
  108. package/dist/index.css +1 -1
  109. package/dist/index.es.js +1 -1
  110. package/package.json +3 -2
  111. package/types/components/HzztKfbSlide.vue.d.ts +8 -2
  112. package/types/components/KfbIcon.vue.d.ts +9 -0
  113. package/types/components/KfbSlideList.vue.d.ts +8 -6
  114. package/types/components/KfbToolbox.vue.d.ts +1 -0
  115. package/types/components/KfbView/KfbChannel.vue.d.ts +1 -1
  116. package/types/components/KfbView/index.d.ts +7 -2
  117. package/types/components/KfbView/index.vue.d.ts +87 -2
  118. package/types/components/KfbView/useLabel.d.ts +1 -1
  119. package/types/components/KfbView/useTailor.d.ts +4 -4
  120. package/types/components/ai/list.vue.d.ts +13 -1
  121. package/types/components/icon/mark/measure.vue.d.ts +2 -0
  122. package/types/instances.d.ts +24 -2
  123. package/web-types.json +162 -0
  124. package/dist/components/annotateBSSh0B_7.js +0 -1
  125. package/dist/components/dotD5koTegE.js +0 -115
  126. package/dist/components/dotDKdIht2m.js +0 -1
  127. package/dist/components/indexDiimdCX-.js +0 -4
  128. package/dist/components/indexmnZKfggK.js +0 -3142
  129. package/dist/components/useCommonQ8kVZUfg.js +0 -1
  130. package/dist/components/useCommonSGwHyBmU.js +0 -22
  131. package/dist/components/zoomBTmGL5gY.js +0 -1
  132. package/dist/components/zoomBcZDj6BA.js +0 -63
@@ -0,0 +1,3558 @@
1
+ var ll = Object.defineProperty, ol = Object.defineProperties;
2
+ var al = Object.getOwnPropertyDescriptors;
3
+ var Vt = Object.getOwnPropertySymbols;
4
+ var nl = Object.prototype.hasOwnProperty, sl = Object.prototype.propertyIsEnumerable;
5
+ var Et = (c, o, t) => o in c ? ll(c, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[o] = t, Q = (c, o) => {
6
+ for (var t in o || (o = {}))
7
+ nl.call(o, t) && Et(c, t, o[t]);
8
+ if (Vt)
9
+ for (var t of Vt(o))
10
+ sl.call(o, t) && Et(c, t, o[t]);
11
+ return c;
12
+ }, ke = (c, o) => ol(c, al(o));
13
+ var Ne = (c, o, t) => new Promise((n, g) => {
14
+ var f = (w) => {
15
+ try {
16
+ v(t.next(w));
17
+ } catch (y) {
18
+ g(y);
19
+ }
20
+ }, m = (w) => {
21
+ try {
22
+ v(t.throw(w));
23
+ } catch (y) {
24
+ g(y);
25
+ }
26
+ }, v = (w) => w.done ? n(w.value) : Promise.resolve(w.value).then(f, m);
27
+ v((t = t.apply(c, o)).next());
28
+ });
29
+ import { inject as J, ref as V, markRaw as R, defineAsyncComponent as M, defineComponent as le, createBlock as A, openBlock as _, unref as e, normalizeProps as il, guardReactiveProps as rl, withCtx as $, resolveDynamicComponent as Be, useModel as Je, computed as D, createElementBlock as E, createVNode as k, createElementVNode as h, Fragment as re, renderList as ue, toDisplayString as L, isRef as be, createTextVNode as Z, watch as ie, h as Ze, renderSlot as se, mergeProps as lt, createCommentVNode as N, reactive as mt, onMounted as Le, onBeforeUnmount as je, normalizeStyle as te, mergeDefaults as ul, withDirectives as De, vShow as Ye, getCurrentInstance as dl, mergeModels as Pe, normalizeClass as He, useCssVars as cl, provide as me, Teleport as tt, withModifiers as Qe } from "vue";
30
+ import { ElIcon as Ce, ElTabs as vl, ElTabPane as St, ElRow as Fe, ElCol as ze, ElSwitch as pe, ElRadioGroup as fl, ElRadio as It, ElCheckbox as xe, ElInput as qe, ElDialog as ot, ElForm as dt, ElFormItem as ce, ElButton as Me, ElMessage as ct, ElLoading as Ht, ElSlider as ml, ElTag as Rt, ElTooltip as Mt, ElPopover as pl, ElCheckboxGroup as hl, ElPagination as gl } from "element-plus";
31
+ import { useStorage as Ie } from "@vueuse/core";
32
+ import { KfbView as ve, OpenSeadragon as Ue } from "kfb-view";
33
+ import Pt from "dayjs";
34
+ import yl from "v-lazy-image";
35
+ const At = Symbol("I18N_INJECT_KEY");
36
+ function he() {
37
+ const c = J(At), o = (t) => t;
38
+ return {
39
+ locale: c == null ? void 0 : c.locale,
40
+ t: (c == null ? void 0 : c.t) || o
41
+ };
42
+ }
43
+ const wl = {
44
+ install(c, o) {
45
+ c.provide(At, o == null ? void 0 : o.global);
46
+ }
47
+ }, q = V({
48
+ annotate: R(M(() => import("./annotateCK6hezNo.js"))),
49
+ arrowCircle: R(M(() => import("./arrowCircleDJR-9OCD.js"))),
50
+ check: R(M(() => import("./checkBXocVg_N.js"))),
51
+ dot: R(M(() => import("./dotDFv5ULkE.js"))),
52
+ flip: R(M(() => import("./flipBFbQcb03.js"))),
53
+ info: R(M(() => import("./infoCGV0Ckdj.js"))),
54
+ microscope: R(M(() => import("./microscopeBMbzVPf5.js"))),
55
+ move: R(M(() => import("./moveD5fPz3_o.js"))),
56
+ next: R(M(() => import("./nextCnqehpYc.js"))),
57
+ prev: R(M(() => import("./previeYap8xB.js"))),
58
+ process: R(M(() => import("./processDS-q-T9u.js"))),
59
+ rotate: R(M(() => import("./rotateBGZgayTz.js"))),
60
+ fullscreen: R(M(() => import("./fullscreenw73vtLHZ.js"))),
61
+ setting: R(M(() => import("./settingDVLfrSX6.js"))),
62
+ tailor: R(M(() => import("./tailorLoKadwnW.js"))),
63
+ fulltailor: R(M(() => import("./tailorLoKadwnW.js"))),
64
+ download: R(M(() => import("./downloadDyg64yHi.js"))),
65
+ config: R(M(() => import("./configChIS6jY0.js"))),
66
+ arrowDown: R(M(() => import("./arrowDownWhFOaN2S.js"))),
67
+ arrowUp: R(M(() => import("./arrowUpBFgKhHLD.js"))),
68
+ arrowLeft: R(M(() => import("./arrowLeftBfOo4tCy.js"))),
69
+ arrowRight: R(M(() => import("./arrowRight7DRwBLb2.js"))),
70
+ zoomIn: R(M(() => import("./zoomInBltposUo.js"))),
71
+ zoomOut: R(M(() => import("./zoomOutBSqsR8_b.js"))),
72
+ level: R(M(() => import("./levelSLHseJUd.js"))),
73
+ channel: R(M(() => import("./channelDykWApvs.js"))),
74
+ delete: R(M(() => import("./deleteDEV1CXd_.js"))),
75
+ expandLeft: R(M(() => import("./expandLeftDzbIVQMl.js"))),
76
+ expandRight: R(M(() => import("./expandRightDPL4kKOR.js"))),
77
+ markMeasure: R(M(() => import("./measureBhI4DO7U.js"))),
78
+ markLine: R(M(() => import("./lineB4tlEhOz.js"))),
79
+ markArrow: R(M(() => import("./arrowcQaNYOk_.js"))),
80
+ markBilateral: R(M(() => import("./bilateralCMUeHEqO.js"))),
81
+ markRectangle: R(M(() => import("./rectangleDD23CZRf.js"))),
82
+ markEllipse: R(M(() => import("./ellipseXLAly11X.js"))),
83
+ markPolygon: R(M(() => import("./polygonCNoWnb2M.js"))),
84
+ markFlag: R(M(() => import("./flagCEblUCIq.js"))),
85
+ markStar: R(M(() => import("./starB8Jj8B7G.js"))),
86
+ markDot: R(M(() => import("./dotDbRony31.js"))),
87
+ markFont: R(M(() => import("./fontB4y8mhGP.js"))),
88
+ markVoice: R(M(() => import("./voiceCKZjRzRM.js")))
89
+ }), X = /* @__PURE__ */ le({
90
+ __name: "KfbIcon",
91
+ props: {
92
+ name: {
93
+ type: [String, Number],
94
+ required: !0
95
+ },
96
+ component: {
97
+ type: Object,
98
+ required: !1
99
+ }
100
+ },
101
+ setup(c) {
102
+ return (o, t) => (_(), A(e(Ce), il(rl(o.$attrs)), {
103
+ default: $(() => [
104
+ (_(), A(Be(c.component || e(q)[c.name])))
105
+ ]),
106
+ _: 1
107
+ }, 16));
108
+ }
109
+ }), _l = { class: "hzzt-kfb-tool-config" }, bl = { class: "tabs-item-box" }, kl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, zl = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, Cl = { class: "margin-l-4 flex-1" }, $l = {
110
+ class: "tabs-item-box",
111
+ style: { "padding-left": "32px" }
112
+ }, Tl = { class: "flex align-items-center" }, xl = {
113
+ class: "margin-t-2 margin-b-2",
114
+ style: { width: "150px" }
115
+ }, Ll = { class: "flex align-items-center" }, Vl = {
116
+ class: "margin-t-2 margin-b-2",
117
+ style: { width: "150px" }
118
+ }, El = { class: "flex align-items-center" }, Sl = {
119
+ class: "margin-t-2 margin-b-2",
120
+ style: { width: "150px" }
121
+ }, Il = { class: "flex align-items-center" }, Ml = {
122
+ class: "margin-t-2 margin-b-2",
123
+ style: { width: "150px" }
124
+ }, Pl = { class: "flex align-items-center" }, Hl = {
125
+ class: "margin-t-2 margin-b-2",
126
+ style: { width: "150px" }
127
+ }, Rl = { class: "flex align-items-center" }, Al = {
128
+ class: "margin-t-2 margin-b-2",
129
+ style: { width: "150px" }
130
+ }, Nl = { class: "flex align-items-center" }, Fl = {
131
+ class: "margin-t-2 margin-b-2",
132
+ style: { width: "150px" }
133
+ }, Ul = { class: "flex align-items-center" }, Dl = {
134
+ class: "margin-t-2 margin-b-2",
135
+ style: { width: "150px" }
136
+ }, Bl = /* @__PURE__ */ le({
137
+ name: "KfbToolConfig",
138
+ __name: "KfbToolConfig",
139
+ props: {
140
+ menus: {
141
+ default: () => []
142
+ },
143
+ menusModifiers: {}
144
+ },
145
+ emits: ["update:menus"],
146
+ setup(c) {
147
+ const o = Je(c, "menus"), { t } = he(), n = D(() => o.value.filter((r) => r.name !== "line" && r.name !== "config" && r.name !== "zoom" && r.props.name !== "config")), g = V("operate"), f = (r, l) => {
148
+ console.log(r, l);
149
+ }, m = {
150
+ fullscreen: t("全屏"),
151
+ next: t("上一张"),
152
+ prev: t("上一张"),
153
+ flip: t("镜像翻转"),
154
+ setting: t("工具"),
155
+ rotate: t("旋转"),
156
+ dot: t("打点"),
157
+ annotate: t("标注"),
158
+ tailor: t("截图"),
159
+ process: t("图像处理"),
160
+ microscope: t("镜下"),
161
+ move: t("快速移动"),
162
+ info: t("信息"),
163
+ download: t("下载")
164
+ }, v = J("show-keyboard", V(!1)), w = J("show-watermark", V(!1)), y = J("show-menu-text", V(!0)), z = Ie("default-open-ai", !1), i = J(
165
+ "menu-config-other-setting",
166
+ {
167
+ screenshotLocally: !1,
168
+ screenshotFormat: "image/jpeg",
169
+ screenshotWatermark: { time: !1, mac: !1, scale: !1, ratio: !1 },
170
+ screenshotSize: { w: 200, h: 200 }
171
+ }
172
+ );
173
+ function p(r) {
174
+ return r in m;
175
+ }
176
+ function s(r) {
177
+ var l;
178
+ return ((l = r.props) == null ? void 0 : l.text) || (p(r.name) ? m[r.name] : "");
179
+ }
180
+ return (r, l) => (_(), E("div", _l, [
181
+ k(e(vl), {
182
+ modelValue: g.value,
183
+ "onUpdate:modelValue": l[12] || (l[12] = (u) => g.value = u),
184
+ class: "demo-tabs",
185
+ onTabClick: f
186
+ }, {
187
+ default: $(() => [
188
+ k(e(St), {
189
+ label: e(t)("操作设置"),
190
+ name: "operate"
191
+ }, {
192
+ default: $(() => [
193
+ h("div", bl, [
194
+ k(e(Fe), { gutter: 10 }, {
195
+ default: $(() => [
196
+ (_(!0), E(re, null, ue(n.value, (u) => (_(), A(e(ze), {
197
+ key: u.name,
198
+ span: 8
199
+ }, {
200
+ default: $(() => {
201
+ var d, b;
202
+ return [
203
+ h("div", kl, [
204
+ h("div", zl, [
205
+ (d = u.props) != null && d.component ? (_(), A(Be((b = u.props) == null ? void 0 : b.component), {
206
+ key: 1,
207
+ size: 24
208
+ })) : (_(), A(X, {
209
+ key: 0,
210
+ size: 24,
211
+ name: u.name
212
+ }, null, 8, ["name"]))
213
+ ]),
214
+ h("p", Cl, L(s(u)), 1),
215
+ k(e(pe), {
216
+ modelValue: u.show,
217
+ "onUpdate:modelValue": (a) => u.show = a,
218
+ "active-text": "",
219
+ "inactive-text": ""
220
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
221
+ ])
222
+ ];
223
+ }),
224
+ _: 2
225
+ }, 1024))), 128))
226
+ ]),
227
+ _: 1
228
+ })
229
+ ])
230
+ ]),
231
+ _: 1
232
+ }, 8, ["label"]),
233
+ k(e(St), {
234
+ label: e(t)("其他设置"),
235
+ name: "other"
236
+ }, {
237
+ default: $(() => [
238
+ h("div", $l, [
239
+ k(e(Fe), { gutter: 10 }, {
240
+ default: $(() => [
241
+ k(e(ze), { span: 11 }, {
242
+ default: $(() => [
243
+ h("div", Tl, [
244
+ h("p", xl, L(e(t)("工具列表显示切换")) + ": ", 1),
245
+ k(e(pe), {
246
+ modelValue: e(y),
247
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => be(y) ? y.value = u : null),
248
+ "inactive-text": e(t)("隐藏"),
249
+ "active-text": e(t)("显示"),
250
+ class: "margin-r-2"
251
+ }, null, 8, ["modelValue", "inactive-text", "active-text"])
252
+ ])
253
+ ]),
254
+ _: 1
255
+ }),
256
+ k(e(ze), { span: 11 }, {
257
+ default: $(() => [
258
+ h("div", Ll, [
259
+ h("p", Vl, L(e(t)("小键盘显示切换")) + ": ", 1),
260
+ k(e(pe), {
261
+ modelValue: e(v),
262
+ "onUpdate:modelValue": l[1] || (l[1] = (u) => be(v) ? v.value = u : null),
263
+ "inactive-text": e(t)("隐藏"),
264
+ "active-text": e(t)("显示"),
265
+ class: "margin-r-2"
266
+ }, null, 8, ["modelValue", "inactive-text", "active-text"])
267
+ ])
268
+ ]),
269
+ _: 1
270
+ })
271
+ ]),
272
+ _: 1
273
+ }),
274
+ k(e(Fe), { gutter: 10 }, {
275
+ default: $(() => [
276
+ k(e(ze), { span: 11 }, {
277
+ default: $(() => [
278
+ h("div", El, [
279
+ h("p", Sl, L(e(t)("默认开启AI分析")) + ": ", 1),
280
+ k(e(pe), {
281
+ modelValue: e(z),
282
+ "onUpdate:modelValue": l[2] || (l[2] = (u) => be(z) ? z.value = u : null),
283
+ "inactive-text": e(t)("禁用"),
284
+ "active-text": e(t)("启用"),
285
+ class: "margin-r-2"
286
+ }, null, 8, ["modelValue", "inactive-text", "active-text"])
287
+ ])
288
+ ]),
289
+ _: 1
290
+ }),
291
+ k(e(ze), { span: 11 }, {
292
+ default: $(() => [
293
+ h("div", Il, [
294
+ h("p", Ml, L(e(t)("水印文字")) + ": ", 1),
295
+ k(e(pe), {
296
+ modelValue: e(w),
297
+ "onUpdate:modelValue": l[3] || (l[3] = (u) => be(w) ? w.value = u : null),
298
+ "inactive-text": e(t)("禁用"),
299
+ "active-text": e(t)("启用"),
300
+ class: "margin-r-2"
301
+ }, null, 8, ["modelValue", "inactive-text", "active-text"])
302
+ ])
303
+ ]),
304
+ _: 1
305
+ })
306
+ ]),
307
+ _: 1
308
+ }),
309
+ k(e(Fe), { gutter: 10 }, {
310
+ default: $(() => [
311
+ k(e(ze), { span: 11 }, {
312
+ default: $(() => [
313
+ h("div", Pl, [
314
+ h("p", Hl, L(e(t)("截图本地下载")) + ": ", 1),
315
+ k(e(pe), {
316
+ modelValue: e(i).screenshotLocally,
317
+ "onUpdate:modelValue": l[4] || (l[4] = (u) => e(i).screenshotLocally = u),
318
+ "inactive-text": e(t)("禁用"),
319
+ "active-text": e(t)("启用"),
320
+ class: "margin-r-2"
321
+ }, null, 8, ["modelValue", "inactive-text", "active-text"])
322
+ ])
323
+ ]),
324
+ _: 1
325
+ }),
326
+ k(e(ze), { span: 11 }, {
327
+ default: $(() => [
328
+ h("div", Rl, [
329
+ h("p", Al, L(e(t)("下载图片格式设置")) + ": ", 1),
330
+ k(e(fl), {
331
+ modelValue: e(i).screenshotFormat,
332
+ "onUpdate:modelValue": l[5] || (l[5] = (u) => e(i).screenshotFormat = u)
333
+ }, {
334
+ default: $(() => [
335
+ k(e(It), { value: "image/png" }, {
336
+ default: $(() => [
337
+ Z(L(e(t)("PNG")), 1)
338
+ ]),
339
+ _: 1
340
+ }),
341
+ k(e(It), { value: "image/jpeg" }, {
342
+ default: $(() => [
343
+ Z(L(e(t)("JPG")), 1)
344
+ ]),
345
+ _: 1
346
+ })
347
+ ]),
348
+ _: 1
349
+ }, 8, ["modelValue"])
350
+ ])
351
+ ]),
352
+ _: 1
353
+ })
354
+ ]),
355
+ _: 1
356
+ }),
357
+ k(e(Fe), { gutter: 10 }, {
358
+ default: $(() => [
359
+ k(e(ze), { span: 20 }, {
360
+ default: $(() => [
361
+ h("div", Nl, [
362
+ h("p", Fl, L(e(t)("截图水印")) + ": ", 1),
363
+ k(e(xe), {
364
+ modelValue: e(i).screenshotWatermark.time,
365
+ "onUpdate:modelValue": l[6] || (l[6] = (u) => e(i).screenshotWatermark.time = u)
366
+ }, {
367
+ default: $(() => [
368
+ Z(L(e(t)("时间")), 1)
369
+ ]),
370
+ _: 1
371
+ }, 8, ["modelValue"]),
372
+ k(e(xe), {
373
+ modelValue: e(i).screenshotWatermark.mac,
374
+ "onUpdate:modelValue": l[7] || (l[7] = (u) => e(i).screenshotWatermark.mac = u)
375
+ }, {
376
+ default: $(() => [
377
+ Z(L(e(t)("设备编码")), 1)
378
+ ]),
379
+ _: 1
380
+ }, 8, ["modelValue"]),
381
+ k(e(xe), {
382
+ modelValue: e(i).screenshotWatermark.scale,
383
+ "onUpdate:modelValue": l[8] || (l[8] = (u) => e(i).screenshotWatermark.scale = u)
384
+ }, {
385
+ default: $(() => [
386
+ Z(L(e(t)("放大倍数")), 1)
387
+ ]),
388
+ _: 1
389
+ }, 8, ["modelValue"]),
390
+ k(e(xe), {
391
+ modelValue: e(i).screenshotWatermark.ratio,
392
+ "onUpdate:modelValue": l[9] || (l[9] = (u) => e(i).screenshotWatermark.ratio = u)
393
+ }, {
394
+ default: $(() => [
395
+ Z(L(e(t)("比例尺")), 1)
396
+ ]),
397
+ _: 1
398
+ }, 8, ["modelValue"])
399
+ ])
400
+ ]),
401
+ _: 1
402
+ })
403
+ ]),
404
+ _: 1
405
+ }),
406
+ k(e(Fe), { gutter: 10 }, {
407
+ default: $(() => [
408
+ k(e(ze), { span: 20 }, {
409
+ default: $(() => [
410
+ h("div", Ul, [
411
+ h("p", Dl, L(e(t)("截图初始化大小")) + ": ", 1),
412
+ h("div", null, [
413
+ k(e(qe), {
414
+ type: "number",
415
+ modelValue: e(i).screenshotSize.w,
416
+ "onUpdate:modelValue": l[10] || (l[10] = (u) => e(i).screenshotSize.w = u),
417
+ style: { width: "150px" }
418
+ }, {
419
+ prepend: $(() => [
420
+ Z(L(e(t)("宽")), 1)
421
+ ]),
422
+ _: 1
423
+ }, 8, ["modelValue"]),
424
+ k(e(qe), {
425
+ type: "number",
426
+ modelValue: e(i).screenshotSize.h,
427
+ "onUpdate:modelValue": l[11] || (l[11] = (u) => e(i).screenshotSize.h = u),
428
+ style: { width: "150px", "margin-left": "24px" }
429
+ }, {
430
+ prepend: $(() => [
431
+ Z(L(e(t)("高")), 1)
432
+ ]),
433
+ _: 1
434
+ }, 8, ["modelValue"])
435
+ ])
436
+ ])
437
+ ]),
438
+ _: 1
439
+ })
440
+ ]),
441
+ _: 1
442
+ })
443
+ ])
444
+ ]),
445
+ _: 1
446
+ }, 8, ["label"])
447
+ ]),
448
+ _: 1
449
+ }, 8, ["modelValue"])
450
+ ]));
451
+ }
452
+ }), jl = { class: "hzzt-kfb-toolbox" }, Kl = { class: "hzzt-kfb-toolbox__component" }, at = /* @__PURE__ */ le({
453
+ name: "KfbToolbox",
454
+ __name: "KfbToolbox",
455
+ props: {
456
+ menu: {},
457
+ process: {},
458
+ microscope: {},
459
+ divideMode: { type: Boolean }
460
+ },
461
+ emits: ["tool"],
462
+ setup(c, { emit: o }) {
463
+ const t = c, n = o, { t: g } = he(), f = {
464
+ prev: g("上一张"),
465
+ next: g("下一张"),
466
+ config: g("配置"),
467
+ info: g("信息"),
468
+ flip: g("镜像"),
469
+ tailor: g("区域截图")
470
+ }, m = J("kfbViewRef"), v = V(!1), w = V([]), y = {
471
+ fullscreen: M(() => import("./fullscreenD_TY5Nj-.js")),
472
+ line: M(() => import("./lineBNwqZbqu.js")),
473
+ setting: M(() => import("./settingB8WACAuV.js")),
474
+ rotate: M(() => import("./rotateDoqVfopB.js")),
475
+ dot: M(() => import("./dotD7t1uU2Y.js")),
476
+ annotate: M(() => import("./annotateBOHyE-BS.js")),
477
+ process: M(() => import("./processCN8_do68.js")),
478
+ microscope: M(() => import("./microscopeDlizQREt.js")),
479
+ move: M(() => import("./moveBORYuNEh.js")),
480
+ custom: M(() => import("./customBkwNWgIG.js")),
481
+ zoom: M(() => import("./zoomDImPX6s2.js")),
482
+ download: M(() => import("./downloadB5Rtk_Ec.js"))
483
+ }, z = D(() => w.value.filter((s) => s.show !== !1).map((s) => ({
484
+ component: y[s.name],
485
+ props: s.props,
486
+ slots: s.slots
487
+ })));
488
+ ie(
489
+ () => [t.menu, t.divideMode],
490
+ ([s, r]) => {
491
+ let l = r ? [
492
+ {
493
+ name: "custom",
494
+ props: {
495
+ name: "full-tailor",
496
+ text: "单屏截图",
497
+ component: Ze(
498
+ X,
499
+ {
500
+ name: "tailor"
501
+ }
502
+ )
503
+ }
504
+ },
505
+ {
506
+ name: "custom",
507
+ props: {
508
+ name: "multi-tailor",
509
+ text: "分屏截图",
510
+ component: Ze(
511
+ X,
512
+ {
513
+ name: "tailor"
514
+ }
515
+ )
516
+ }
517
+ }
518
+ ] : [
519
+ {
520
+ name: "custom",
521
+ props: {
522
+ name: "full-tailor",
523
+ text: "全屏截图",
524
+ component: Ze(
525
+ X,
526
+ {
527
+ name: "tailor"
528
+ }
529
+ )
530
+ }
531
+ }
532
+ ];
533
+ const u = s.findIndex((b) => b === "tailor");
534
+ let d;
535
+ u > -1 ? d = [
536
+ ...s.slice(0, u + 1),
537
+ ...l,
538
+ ...s.slice(u + 1)
539
+ ] : d = [...s], w.value = i(d);
540
+ },
541
+ { immediate: !0 }
542
+ );
543
+ function i(s) {
544
+ return s.map((r) => {
545
+ var u, d;
546
+ const l = typeof r == "string" ? r : r.name;
547
+ return f[l] ? {
548
+ name: "custom",
549
+ show: typeof r == "string" ? !0 : r.show !== !1,
550
+ props: ke(Q({
551
+ text: f[l],
552
+ component: Ze(X, {
553
+ name: l
554
+ })
555
+ }, typeof r == "string" ? {} : r.props), {
556
+ name: l
557
+ })
558
+ } : l == "custom" && !f[l] && typeof r != "string" ? {
559
+ name: "custom",
560
+ show: typeof r == "string" ? !0 : r.show !== !1,
561
+ props: ke(Q({}, typeof r == "string" ? {} : r.props), {
562
+ component: Ze(X, {
563
+ name: (u = r.props) == null ? void 0 : u.name,
564
+ component: (d = r.props) == null ? void 0 : d.component
565
+ })
566
+ }),
567
+ slots: typeof r == "string" ? void 0 : r.slots
568
+ } : l === "process" ? {
569
+ name: l,
570
+ props: typeof r == "string" ? {
571
+ process: t.process
572
+ } : Q({
573
+ process: t.process
574
+ }, r.props),
575
+ slots: typeof r == "string" ? void 0 : r.slots,
576
+ show: typeof r == "string" ? !0 : r.show !== !1
577
+ } : l === "microscope" ? {
578
+ name: l,
579
+ props: typeof r == "string" ? {
580
+ process: t.process
581
+ } : Q({
582
+ microscope: t.microscope
583
+ }, r.props),
584
+ slots: typeof r == "string" ? void 0 : r.slots,
585
+ show: typeof r == "string" ? !0 : r.show !== !1
586
+ } : {
587
+ name: l,
588
+ props: typeof r == "string" ? {} : r.props,
589
+ slots: typeof r == "string" ? void 0 : r.slots,
590
+ show: typeof r == "string" ? !0 : r.show !== !1
591
+ };
592
+ });
593
+ }
594
+ function p(s, r) {
595
+ const l = {
596
+ annotate: () => m.value.startDraw(r),
597
+ process: () => m.value.forceRedraw(r),
598
+ microscope: () => m.value.scopeChange(r),
599
+ move: () => m.value.fastMove(r),
600
+ endDraw: () => m.value.endDraw(),
601
+ info: () => m.value.info(),
602
+ zoom: () => m.value.zoomTo(r),
603
+ flip: () => m.value.toggleFlip(r),
604
+ config: () => v.value = !0,
605
+ grid: () => m.value.updateGrid(r),
606
+ ruler: () => m.value.updateGrid(r),
607
+ graduation: () => m.value.updateGraduation(r),
608
+ navigator: () => m.value.updateNavigator(r),
609
+ tool: () => {
610
+ m.value.updateGrid({
611
+ show: r
612
+ }), m.value.updateGraduation({
613
+ show: r
614
+ }), m.value.updateGrid({
615
+ ruler: r
616
+ }), m.value.updateNavigator(r);
617
+ }
618
+ };
619
+ l[s] ? l[s]() : n("tool", s, r);
620
+ }
621
+ return (s, r) => (_(), E("div", jl, [
622
+ se(s.$slots, "left"),
623
+ h("div", Kl, [
624
+ (_(!0), E(re, null, ue(z.value, (l, u) => (_(), A(Be(l.component), lt({ ref_for: !0 }, l.props, {
625
+ key: u,
626
+ onTool: p
627
+ }), {
628
+ default: $(() => [
629
+ l.slots ? (_(!0), E(re, { key: 0 }, ue(l.slots, (d) => (_(), A(Be(d)))), 256)) : N("", !0)
630
+ ]),
631
+ _: 2
632
+ }, 1040))), 128))
633
+ ]),
634
+ se(s.$slots, "right"),
635
+ k(e(ot), {
636
+ modelValue: v.value,
637
+ "onUpdate:modelValue": r[1] || (r[1] = (l) => v.value = l),
638
+ top: "5vh",
639
+ width: "800px",
640
+ title: e(g)("用户偏好配置")
641
+ }, {
642
+ default: $(() => [
643
+ k(Bl, {
644
+ menus: w.value,
645
+ "onUpdate:menus": r[0] || (r[0] = (l) => w.value = l)
646
+ }, null, 8, ["menus"])
647
+ ]),
648
+ _: 1
649
+ }, 8, ["modelValue", "title"])
650
+ ]));
651
+ }
652
+ }), nt = "data:image/svg+xml,%3csvg%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%3e%3cpath%20d='M556.45%20126.8H904.7c31.31%200%2056.26%2025.47%2057.3%2056.78v656.85c-0.68%2031.26-26.03%2056.35-57.3%2056.72H617.28l74.32-291.24-77.38-56.14%2032.3-27.32c8.28-6.66%2015.51-11.46%2025.7-11.46%209.96%200.24%2019.33%204.77%2025.7%2012.45h-0.06l198.87%20214.09-0.58-522.46c-0.75-13.7-12.21-24.35-25.93-24.08H542.45l14-64.19z%20m-118.47%200l-14.01%2064.24H152.41c-13.6%200-24.31%209.84-26.22%2023.44v522.63l242.33-292.28-13.08%2060.14%20204.6%20148.46-62.22%20243.77H118.15a56.398%2056.398%200%200%201-39.86-16.73A56.35%2056.35%200%200%201%2062%20840.43V183.57c0-31.25%2024.89-56.72%2056.14-56.72h319.83v-0.05z%20m203.67%20224.68c-0.86-34.98%2017.31-67.68%2047.47-85.42%2030.16-17.74%2067.56-17.74%2097.73%200%2030.16%2017.74%2048.33%2050.44%2047.47%2085.42%200%2053.22-43.15%2096.37-96.37%2096.37-53.22%200-96.37-43.14-96.37-96.37h0.07z%20m0%200'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e", vt = {
653
+ shape: "50%",
654
+ width: 0.3,
655
+ color: "#FA0404",
656
+ borderWidth: 5
657
+ }, Nt = {
658
+ r: 0,
659
+ g: 0,
660
+ b: 0,
661
+ c: 0,
662
+ s: 0,
663
+ l: 0,
664
+ ga: 1
665
+ };
666
+ function Ol(c) {
667
+ const o = mt(Q(Q({}, Nt), c.process));
668
+ ie(() => c.process, (f) => {
669
+ g(f);
670
+ });
671
+ const t = D(() => {
672
+ const f = [
673
+ 1 + o.r + o.l + 0.5 * o.c,
674
+ 0,
675
+ 0,
676
+ 0,
677
+ -0.25 * o.c
678
+ ], m = [
679
+ 0,
680
+ 1 + o.g + o.l + 0.5 * o.c,
681
+ 0,
682
+ 0,
683
+ -0.25 * o.c
684
+ ], v = [
685
+ 0,
686
+ 0,
687
+ 1 + o.b + o.l + 0.5 * o.c,
688
+ 0,
689
+ -0.25 * o.c
690
+ ], w = [0, 0, 0, 1, 0];
691
+ return `${f.join(" ")}
692
+ ${m.join(" ")}
693
+ ${v.join(" ")}
694
+ ${w.join(" ")}`;
695
+ }), n = D(() => String(1 + o.s));
696
+ function g(f) {
697
+ f && Object.assign(o, f);
698
+ }
699
+ return {
700
+ imageProcess: o,
701
+ matrixValues: t,
702
+ saturateValues: n,
703
+ forceRedraw: g
704
+ };
705
+ }
706
+ function Wl(c, o, t, n, g) {
707
+ const f = J(
708
+ "menu-config-other-setting",
709
+ {
710
+ screenshotLocally: !1,
711
+ screenshotFormat: "image/jpeg",
712
+ screenshotWatermark: { time: !1, mac: !1, scale: !1, ratio: !1 },
713
+ screenshotSize: { w: 200, h: 200 }
714
+ }
715
+ );
716
+ function m() {
717
+ t.value.$on(ve.events.EVENT_TAILORING_SCREENSHOT, v);
718
+ }
719
+ function v({ base64: s }) {
720
+ const r = Pt().format("YYYY_MM_DD_hh_mm_ss"), l = new Image();
721
+ l.src = s, l.onload = () => {
722
+ const u = document.createElement("canvas"), d = u.getContext("2d");
723
+ u.width = l.width, u.height = l.height, d && (d.drawImage(l, 0, 0, l.width, l.height), p(d, u, r));
724
+ const b = u.toDataURL(f.screenshotFormat);
725
+ f.screenshotLocally && z(b, r), c("tool", "screen-shot", { imgUrl: b, timeStr: r, format: f.screenshotFormat });
726
+ };
727
+ }
728
+ function w(s, r) {
729
+ const l = window.devicePixelRatio || 1, { width: u, height: d } = t.value.$options, b = u > d ? (u - d) / 2 : 0, a = u > d ? 0 : (d - u) / 2, x = u > d ? d : u;
730
+ if (s === "full-tailor")
731
+ t.value.tailoring.init(
732
+ {
733
+ left: b,
734
+ top: a,
735
+ height: x,
736
+ width: x,
737
+ now: !0
738
+ }
739
+ );
740
+ else if (s === "multi-tailor") {
741
+ const S = [];
742
+ r.value.forEach((F) => {
743
+ const B = document.createElement("canvas");
744
+ B.width = x, B.height = x;
745
+ const j = B.getContext("2d");
746
+ j && (j.fillStyle = "#FFFFFF", j.fillRect(0, 0, B.width, B.height));
747
+ const K = F.kfbView.viewer.drawer.canvas;
748
+ j == null || j.drawImage(K, b * l, a * l, x * l, x * l, 0, 0, x, x);
749
+ const oe = B.toDataURL();
750
+ B.remove(), S.push(oe);
751
+ });
752
+ const H = document.createElement("canvas"), P = [], O = [];
753
+ for (let F = 0; F < S.length; F++) {
754
+ const B = new Image();
755
+ P.push(B);
756
+ const j = new Promise((K, oe) => {
757
+ B.onload = () => {
758
+ K();
759
+ }, B.onerror = oe, B.src = S[F];
760
+ });
761
+ O.push(j);
762
+ }
763
+ Promise.all(O).then(() => {
764
+ const F = P.length > 4 ? 3 : 2, B = y(P, F), j = x * F;
765
+ H.width = j, H.height = j;
766
+ const K = H.getContext("2d");
767
+ K && (K.fillStyle = "#FFFFFF", K.fillRect(0, 0, H.width, H.height));
768
+ const oe = P.length === 2 || P.length >= 5 && P.length <= 6, $e = B.length * x, ge = oe ? (H.height - $e) / 2 : 0;
769
+ B.forEach((Ke, Ee) => {
770
+ Ke.forEach((Se, Oe) => {
771
+ const We = Oe * x, T = ge + Ee * x;
772
+ K == null || K.drawImage(Se, We, T, x, x);
773
+ });
774
+ });
775
+ const ye = Pt().format("YYYY_MM_DD_hh_mm_ss");
776
+ K && p(K, H, ye);
777
+ const Re = H.toDataURL(f.screenshotFormat);
778
+ f.screenshotLocally && z(Re, ye), c("tool", "screen-shot", { imgUrl: Re, timeStr: ye, format: f.screenshotFormat }), H.remove();
779
+ });
780
+ } else {
781
+ const S = Number(f.screenshotSize.w) / 1, H = Number(f.screenshotSize.h) / 1;
782
+ t.value.tailoring.init(
783
+ {
784
+ left: u / 2 - S / 2,
785
+ top: d / 2 - H / 2,
786
+ height: H,
787
+ width: S,
788
+ color: "#ff0000",
789
+ contents: [
790
+ o("双击区域内表示完成截图"),
791
+ o("双击区域外或按ESC表示取消截图"),
792
+ (P, O) => `${o("区域大小为")}${P}*${O},${o("可拉动缩放")}`
793
+ ]
794
+ }
795
+ );
796
+ }
797
+ }
798
+ function y(s, r) {
799
+ const l = [];
800
+ for (let u = 0; u < s.length; u += r)
801
+ l.push(s.slice(u, u + r));
802
+ return l;
803
+ }
804
+ function z(s, r) {
805
+ const l = document.createElement("a");
806
+ l.href = s, l.download = r, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(l.href);
807
+ }
808
+ function i(s) {
809
+ if (t.value.area) {
810
+ const r = t.value.area.imageToViewerElementCoordinates(0, 0), l = t.value.area.imageToViewerElementCoordinates(s, 0);
811
+ return Math.abs(l.x - r.x);
812
+ }
813
+ return 0;
814
+ }
815
+ function p(s, r, l) {
816
+ var u, d, b, a, x;
817
+ if (s.font = "16px Arial", s.fillStyle = "rgba(0, 0, 0, 0.9)", s.textAlign = "left", f.screenshotWatermark.mac) {
818
+ const S = (b = (d = (u = g.value) == null ? void 0 : u.ext) == null ? void 0 : d.machineNum) != null ? b : "未知设备号";
819
+ s.fillText(S, 5, 15);
820
+ }
821
+ if (f.screenshotWatermark.time && s.fillText(l, r.width - 180, 15), f.screenshotWatermark.scale && s.fillText(`${n.value}x`, 5, r.height - 10), f.screenshotWatermark.ratio) {
822
+ const S = [0.1, 0.4, 0.6, 1, 2, 4, 8, 10, 20, 40, 60, 100, 140, 200], H = [5e3, 2e3, 1250, 1e3, 500, 250, 200, 100, 50, 25, 20, 10, 5, 2], P = S.findIndex((ye) => ye >= n.value);
823
+ let O = 8, F = "";
824
+ ~P ? (F = H[P].toString(), O = i(H[P] / (((x = g.value) == null ? void 0 : x.scanResolution) || 1))) : (F = H[H.length - 1].toString(), O = i(H[H.length - 1] / (((a = g.value) == null ? void 0 : a.scanResolution) || 1))), s.beginPath();
825
+ const B = r.width, j = r.height, K = B - 10 - O, oe = j - 24;
826
+ s.beginPath(), s.strokeStyle = "#000000", s.lineWidth = 3, s.moveTo(K, oe - 8), s.lineTo(K, oe), s.lineTo(K + O, oe), s.lineTo(K + O, oe - 8), s.stroke(), s.beginPath(), s.fillStyle = "#000000", s.font = "bold 12px Arial";
827
+ const $e = parseFloat(F).toFixed(0) + "um", ge = s.measureText($e).width;
828
+ s.fillText($e, K + O / 2 - ge / 2, r.height - 5);
829
+ }
830
+ }
831
+ return {
832
+ tailorEvent: m,
833
+ shotScreen: w
834
+ };
835
+ }
836
+ const Gl = ["onClick"], Zl = ["src"], Yl = {
837
+ key: 2,
838
+ style: { width: "18px" },
839
+ class: "margin-r-3"
840
+ }, ql = {
841
+ key: 1,
842
+ class: "hzzt-kfb-sub-menu"
843
+ }, Xl = ["onClick"], Jl = { class: "flex align-items-center" }, Ql = ["src"], eo = {
844
+ key: 2,
845
+ style: { width: "18px" },
846
+ class: "margin-r-2"
847
+ }, to = /* @__PURE__ */ le({
848
+ __name: "KfbMenu",
849
+ props: {
850
+ menus: {}
851
+ },
852
+ emits: ["tool"],
853
+ setup(c, { emit: o }) {
854
+ const t = V({
855
+ top: "0",
856
+ left: "0",
857
+ display: "none"
858
+ }), n = J("kfbView", V({})), g = J("currentLabel"), f = c, m = o, { t: v } = he(), w = J("divide", {
859
+ value: !1
860
+ }), y = [
861
+ {
862
+ label: v("测量"),
863
+ value: "line",
864
+ icon: q.value.markMeasure
865
+ },
866
+ {
867
+ label: v("直线"),
868
+ value: "line",
869
+ icon: q.value.markLine
870
+ },
871
+ {
872
+ label: v("箭头"),
873
+ value: "arrow",
874
+ icon: q.value.markArrow
875
+ },
876
+ {
877
+ label: v("双箭头"),
878
+ value: "bilateral",
879
+ icon: q.value.markBilateral
880
+ },
881
+ {
882
+ label: v("矩形"),
883
+ value: "rectangle",
884
+ icon: q.value.markRectangle
885
+ },
886
+ {
887
+ label: v("圆形"),
888
+ value: "ellipse",
889
+ icon: q.value.markEllipse
890
+ },
891
+ {
892
+ label: v("曲线"),
893
+ value: "polygon",
894
+ icon: q.value.markPolygon
895
+ },
896
+ {
897
+ label: v("星星"),
898
+ value: "star",
899
+ icon: q.value.markStar
900
+ },
901
+ {
902
+ label: v("旗帜"),
903
+ value: "flag",
904
+ icon: q.value.markFlag
905
+ },
906
+ {
907
+ label: v("点"),
908
+ value: "dot",
909
+ icon: q.value.markDot
910
+ },
911
+ {
912
+ label: v("文字"),
913
+ value: "font",
914
+ icon: q.value.markFont
915
+ },
916
+ {
917
+ label: v("语音"),
918
+ value: "voice",
919
+ icon: q.value.markVoice
920
+ }
921
+ ], z = D(() => {
922
+ var l;
923
+ return g != null && g.value ? [{
924
+ label: v("删除"),
925
+ value: "delete",
926
+ icon: q.value.delete
927
+ }] : (l = f.menus) != null && l.length ? f.menus.map((u) => u.value === "annotate" ? ke(Q({}, u), {
928
+ children: y
929
+ }) : ke(Q({}, u), {
930
+ icon: u.icon || q.value[u.value]
931
+ })) : [
932
+ {
933
+ label: v("上一张"),
934
+ value: "prev"
935
+ },
936
+ {
937
+ label: v("下一张"),
938
+ value: "next"
939
+ },
940
+ {
941
+ label: v("标注"),
942
+ value: "annotate",
943
+ icon: q.value.annotate,
944
+ children: y
945
+ },
946
+ ...w.value ? [{
947
+ label: v("单屏截图"),
948
+ value: "full-tailor",
949
+ icon: q.value.tailor
950
+ }, {
951
+ label: v("分屏截图"),
952
+ value: "multi-tailor"
953
+ }] : [{
954
+ label: v("全屏截图"),
955
+ value: "full-tailor",
956
+ icon: q.value.tailor
957
+ }],
958
+ {
959
+ label: v("区域截图"),
960
+ value: "tailor"
961
+ },
962
+ {
963
+ label: v("镜像翻转"),
964
+ value: "flip",
965
+ icon: q.value.flip
966
+ },
967
+ {
968
+ label: v("切片信息"),
969
+ value: "info",
970
+ icon: q.value.info
971
+ }
972
+ ];
973
+ });
974
+ ie(() => n.value, (l, u) => {
975
+ u != null && u.viewer && (u.viewer.removeHandler("canvas-contextmenu", i), u.viewer.removeHandler("canvas-click", p)), l != null && l.viewer && (l.viewer.addHandler("canvas-contextmenu", i), l.viewer.addHandler("canvas-click", p));
976
+ }), Le(() => {
977
+ var l;
978
+ (l = n.value) != null && l.viewer && (n.value.viewer.addHandler("canvas-contextmenu", i), n.value.viewer.addHandler("canvas-click", p)), document.body.addEventListener("click", p);
979
+ }), je(() => {
980
+ var l;
981
+ (l = n.value) != null && l.viewer && (n.value.viewer.removeHandler("canvas-contextmenu", i), n.value.viewer.removeHandler("canvas-click", p)), document.body.removeEventListener("click", p);
982
+ });
983
+ function i(l) {
984
+ l.preventDefault = !0, t.value.top = `${l.position.y}px`, t.value.left = `${l.position.x}px`, t.value.display === "block" ? t.value.display = "none" : t.value.display = "block";
985
+ }
986
+ function p() {
987
+ t.value.display = "none";
988
+ }
989
+ function s(l, u) {
990
+ l.children || ((u == null ? void 0 : u.value) === "annotate" ? m("tool", "annotate", {
991
+ tool: l.value.substring(0, 1).toLocaleUpperCase() + l.value.substring(1),
992
+ once: !0
993
+ }) : m("tool", l.value), p());
994
+ }
995
+ function r(l) {
996
+ return l == null || typeof l != "object" && typeof l != "function" ? !1 : (
997
+ // 函数式组件
998
+ typeof l == "function" || // 对象式组件
999
+ "render" in l || "setup" in l
1000
+ );
1001
+ }
1002
+ return (l, u) => (_(), E("div", {
1003
+ class: "hzzt-kfb-menu",
1004
+ style: te(t.value)
1005
+ }, [
1006
+ (_(!0), E(re, null, ue(z.value, (d, b) => (_(), E("div", {
1007
+ key: b,
1008
+ class: "hzzt-kfb-menu-item"
1009
+ }, [
1010
+ h("div", {
1011
+ class: "flex align-items-center",
1012
+ onClick: (a) => s(d)
1013
+ }, [
1014
+ r(d.icon) ? (_(), A(e(Ce), {
1015
+ key: 0,
1016
+ class: "margin-r-3",
1017
+ size: 18
1018
+ }, {
1019
+ default: $(() => [
1020
+ (_(), A(Be(d.icon)))
1021
+ ]),
1022
+ _: 2
1023
+ }, 1024)) : d.icon ? (_(), E("img", {
1024
+ key: 1,
1025
+ style: { width: "18px" },
1026
+ class: "margin-r-2",
1027
+ src: d.icon
1028
+ }, null, 8, Zl)) : (_(), E("div", Yl)),
1029
+ h("span", null, L(d.label), 1)
1030
+ ], 8, Gl),
1031
+ d.children ? (_(), A(X, {
1032
+ key: 0,
1033
+ name: "arrowRight",
1034
+ class: "margin-r-2",
1035
+ size: 14
1036
+ })) : N("", !0),
1037
+ d.children ? (_(), E("div", ql, [
1038
+ (_(!0), E(re, null, ue(d.children, (a, x) => (_(), E("div", {
1039
+ key: x,
1040
+ class: "hzzt-kfb-menu-item",
1041
+ onClick: (S) => s(a, d)
1042
+ }, [
1043
+ h("div", Jl, [
1044
+ r(a.icon) ? (_(), A(e(Ce), {
1045
+ key: 0,
1046
+ class: "margin-r-2",
1047
+ size: 18
1048
+ }, {
1049
+ default: $(() => [
1050
+ (_(), A(Be(a.icon)))
1051
+ ]),
1052
+ _: 2
1053
+ }, 1024)) : a.icon ? (_(), E("img", {
1054
+ key: 1,
1055
+ style: { width: "18px" },
1056
+ class: "margin-r-2",
1057
+ src: a.icon
1058
+ }, null, 8, Ql)) : (_(), E("div", eo)),
1059
+ h("span", null, L(a.label), 1)
1060
+ ])
1061
+ ], 8, Xl))), 128))
1062
+ ])) : N("", !0)
1063
+ ]))), 128))
1064
+ ], 4));
1065
+ }
1066
+ }), Ve = (c, o) => {
1067
+ const t = c.__vccOpts || c;
1068
+ for (const [n, g] of o)
1069
+ t[n] = g;
1070
+ return t;
1071
+ }, lo = /* @__PURE__ */ Ve(to, [["__scopeId", "data-v-4c0f1539"]]), oo = {
1072
+ key: 0,
1073
+ class: "hzzt-kfb-microscope"
1074
+ }, ao = /* @__PURE__ */ le({
1075
+ __name: "KfbMicroscope",
1076
+ props: /* @__PURE__ */ ul({
1077
+ shape: {},
1078
+ width: {},
1079
+ color: {},
1080
+ borderWidth: {}
1081
+ }, Q({}, vt)),
1082
+ setup(c, { expose: o }) {
1083
+ const t = c, n = mt(Q(Q({}, vt), t));
1084
+ ie(() => t, (i) => {
1085
+ z({ name: "change", value: i });
1086
+ });
1087
+ const g = V("200px"), f = V(!1), m = D(() => ({
1088
+ borderRadius: n.shape,
1089
+ borderColor: n.color,
1090
+ borderWidth: n.borderWidth + "px",
1091
+ width: g.value,
1092
+ height: g.value
1093
+ })), v = J("kfbView", V({}));
1094
+ ie(() => v.value, (i, p) => {
1095
+ p != null && p.viewer && p.viewer.removeHandler("zoom", w), i != null && i.viewer && i.viewer.addHandler("zoom", w);
1096
+ }), Le(() => {
1097
+ var i;
1098
+ (i = v.value) != null && i.viewer && v.value.viewer.addHandler("zoom", w);
1099
+ }), je(() => {
1100
+ var i;
1101
+ (i = v.value) != null && i.viewer && v.value.viewer.removeHandler("zoom", w);
1102
+ });
1103
+ function w() {
1104
+ setTimeout(() => {
1105
+ z({ name: "change", value: n });
1106
+ }, 100);
1107
+ }
1108
+ function y(i) {
1109
+ let { x: p, y: s } = v.value.viewer.viewport.getCenter(!0);
1110
+ i === "top" ? s -= 6e-3 : i === "bottom" ? s += 6e-3 : i === "left" ? p -= 6e-3 : i === "right" && (p += 6e-3), v.value.area.moveToLabel({ x: p, y: s });
1111
+ }
1112
+ function z({ name: i, value: p }) {
1113
+ var r, l;
1114
+ const s = (l = (r = v.value.$options) == null ? void 0 : r.pxConversion) == null ? void 0 : l.imageCapRes;
1115
+ if (i === "visible") {
1116
+ if (f.value = p, p) {
1117
+ const u = v.value.area.imageToViewerElementRectangle(
1118
+ {
1119
+ x: 0,
1120
+ y: 0,
1121
+ width: n.width * 1e3 / s,
1122
+ height: n.width * 1e3 / s
1123
+ }
1124
+ );
1125
+ g.value = u.width + "px";
1126
+ }
1127
+ } else if (i === "change") {
1128
+ Object.assign(n, p);
1129
+ const u = v.value.area.imageToViewerElementRectangle(
1130
+ {
1131
+ x: 0,
1132
+ y: 0,
1133
+ width: n.width * 1e3 / s,
1134
+ height: n.width * 1e3 / s
1135
+ }
1136
+ );
1137
+ g.value = u.width + "px";
1138
+ }
1139
+ }
1140
+ return o({
1141
+ scopeChange: z
1142
+ }), (i, p) => f.value ? (_(), E("div", oo, [
1143
+ h("div", {
1144
+ class: "hzzt-kfb-microscope__container",
1145
+ style: te(m.value)
1146
+ }, null, 4),
1147
+ h("div", {
1148
+ class: "hzzt-kfb-microscope__top",
1149
+ onClick: p[0] || (p[0] = (s) => y("top"))
1150
+ }, [
1151
+ k(X, {
1152
+ size: "24",
1153
+ name: "arrowUp"
1154
+ })
1155
+ ]),
1156
+ h("div", {
1157
+ class: "hzzt-kfb-microscope__bottom",
1158
+ onClick: p[1] || (p[1] = (s) => y("bottom"))
1159
+ }, [
1160
+ k(X, {
1161
+ size: "24",
1162
+ name: "arrowDown"
1163
+ })
1164
+ ]),
1165
+ h("div", {
1166
+ class: "hzzt-kfb-microscope__left",
1167
+ onClick: p[2] || (p[2] = (s) => y("left"))
1168
+ }, [
1169
+ k(X, {
1170
+ size: "24",
1171
+ name: "arrowLeft"
1172
+ })
1173
+ ]),
1174
+ h("div", {
1175
+ class: "hzzt-kfb-microscope__right",
1176
+ onClick: p[3] || (p[3] = (s) => y("right"))
1177
+ }, [
1178
+ k(X, {
1179
+ size: "24",
1180
+ name: "arrowRight"
1181
+ })
1182
+ ])
1183
+ ])) : N("", !0);
1184
+ }
1185
+ }), no = /* @__PURE__ */ Ve(ao, [["__scopeId", "data-v-cf5949b8"]]), so = { class: "hzzt-kfb-label flex column" }, io = { class: "hzzt-kfb-label__img flex justify-content-center" }, ro = ["src"], uo = { class: "ellipsis flex-1" }, co = {
1186
+ class: "flex margin-b-4",
1187
+ style: { width: "100%" }
1188
+ }, vo = {
1189
+ class: "flex margin overflow-hidden",
1190
+ style: { height: "132px" }
1191
+ }, fo = ["src"], mo = ["src"], po = /* @__PURE__ */ le({
1192
+ __name: "KfbLabel",
1193
+ props: {
1194
+ visible: { type: Boolean },
1195
+ info: {},
1196
+ slide: {},
1197
+ pathologyHandle: { type: Function }
1198
+ },
1199
+ emits: ["tool"],
1200
+ setup(c, { emit: o }) {
1201
+ var i;
1202
+ const { t } = he(), n = c, g = o, f = V((i = n.visible) != null ? i : !0), m = V(!1), v = D(() => n.slide.pathology_id ? t("修改病理号") : t("绑定病理号"));
1203
+ function w() {
1204
+ n.slide.angle || (n.slide.angle = 0), n.slide.angle += 90, n.slide.angle > 360 && (n.slide.angle = n.slide.angle % 360), g("tool", "rotate", n.slide.angle);
1205
+ }
1206
+ function y() {
1207
+ m.value = !0;
1208
+ }
1209
+ function z() {
1210
+ n.pathologyHandle && n.pathologyHandle(n.slide).then(() => {
1211
+ m.value = !1;
1212
+ });
1213
+ }
1214
+ return (p, s) => (_(), E("div", so, [
1215
+ De(h("div", { class: "hzzt-kfb-label__title" }, L(e(t)(`点击标签旋转${p.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
1216
+ [Ye, f.value]
1217
+ ]),
1218
+ De(h("div", io, [
1219
+ h("img", {
1220
+ src: p.info.labelImg,
1221
+ style: te({ transform: `rotate(${p.slide.angle}deg)` }),
1222
+ onClick: w
1223
+ }, null, 12, ro)
1224
+ ], 512), [
1225
+ [Ye, f.value]
1226
+ ]),
1227
+ p.pathologyHandle ? De((_(), E("div", {
1228
+ key: 0,
1229
+ class: "hzzt-kfb-label__pathology flex align-items-center justify-content-between",
1230
+ onClick: y
1231
+ }, [
1232
+ h("span", uo, L(p.slide.pathology_number), 1),
1233
+ k(X, {
1234
+ size: "14",
1235
+ name: "annotate"
1236
+ })
1237
+ ], 512)), [
1238
+ [Ye, f.value]
1239
+ ]) : N("", !0),
1240
+ h("span", {
1241
+ onClick: s[0] || (s[0] = (r) => f.value = !f.value),
1242
+ style: te({
1243
+ transform: `translateY(${f.value ? "-50%" : 0})`
1244
+ }),
1245
+ class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
1246
+ }, [
1247
+ f.value ? (_(), A(X, {
1248
+ key: 0,
1249
+ size: "10",
1250
+ name: "arrowLeft"
1251
+ })) : (_(), A(X, {
1252
+ key: 1,
1253
+ size: "10",
1254
+ name: "arrowRight"
1255
+ }))
1256
+ ], 4),
1257
+ k(e(ot), {
1258
+ modelValue: m.value,
1259
+ "onUpdate:modelValue": s[5] || (s[5] = (r) => m.value = r),
1260
+ "append-to-body": !0,
1261
+ title: v.value,
1262
+ width: "450px"
1263
+ }, {
1264
+ footer: $(() => [
1265
+ k(e(Me), {
1266
+ onClick: s[4] || (s[4] = (r) => m.value = !1)
1267
+ }, {
1268
+ default: $(() => [
1269
+ Z(L(e(t)("取消")), 1)
1270
+ ]),
1271
+ _: 1
1272
+ }),
1273
+ k(e(Me), {
1274
+ type: "primary",
1275
+ onClick: z
1276
+ }, {
1277
+ default: $(() => [
1278
+ Z(L(e(t)("确认")), 1)
1279
+ ]),
1280
+ _: 1
1281
+ })
1282
+ ]),
1283
+ default: $(() => [
1284
+ h("div", co, [
1285
+ h("div", vo, [
1286
+ h("img", {
1287
+ src: p.slide.labelImg
1288
+ }, null, 8, fo),
1289
+ h("img", {
1290
+ src: p.slide.previewImg
1291
+ }, null, 8, mo)
1292
+ ])
1293
+ ]),
1294
+ k(e(dt), { class: "margin-t-2" }, {
1295
+ default: $(() => [
1296
+ k(e(ce), {
1297
+ label: e(t)("病理号")
1298
+ }, {
1299
+ default: $(() => [
1300
+ k(e(qe), {
1301
+ modelValue: p.slide.pathology_number,
1302
+ "onUpdate:modelValue": s[1] || (s[1] = (r) => p.slide.pathology_number = r),
1303
+ placeholder: e(t)("输入病理号"),
1304
+ clearable: ""
1305
+ }, null, 8, ["modelValue", "placeholder"])
1306
+ ]),
1307
+ _: 1
1308
+ }, 8, ["label"]),
1309
+ k(e(ce), {
1310
+ label: e(t)("蜡块号")
1311
+ }, {
1312
+ default: $(() => [
1313
+ k(e(qe), {
1314
+ modelValue: p.slide.paraffin_block_number,
1315
+ "onUpdate:modelValue": s[2] || (s[2] = (r) => p.slide.paraffin_block_number = r),
1316
+ placeholder: e(t)("输入蜡块号"),
1317
+ clearable: ""
1318
+ }, null, 8, ["modelValue", "placeholder"])
1319
+ ]),
1320
+ _: 1
1321
+ }, 8, ["label"]),
1322
+ p.slide.slide_id ? N("", !0) : (_(), A(e(ce), {
1323
+ key: 0,
1324
+ label: e(t)("试剂")
1325
+ }, {
1326
+ default: $(() => [
1327
+ k(e(qe), {
1328
+ modelValue: p.slide.reagent,
1329
+ "onUpdate:modelValue": s[3] || (s[3] = (r) => p.slide.reagent = r),
1330
+ placeholder: e(t)("输入试剂"),
1331
+ clearable: ""
1332
+ }, null, 8, ["modelValue", "placeholder"])
1333
+ ]),
1334
+ _: 1
1335
+ }, 8, ["label"]))
1336
+ ]),
1337
+ _: 1
1338
+ })
1339
+ ]),
1340
+ _: 1
1341
+ }, 8, ["modelValue", "title"])
1342
+ ]));
1343
+ }
1344
+ }), ho = /* @__PURE__ */ Ve(po, [["__scopeId", "data-v-e1475ef3"]]);
1345
+ function go(c, o) {
1346
+ const t = V(1), n = V(null), g = V(null);
1347
+ function f() {
1348
+ c.value.viewer.addHandler("canvas-drag", (v) => {
1349
+ n.value || (n.value = v.position);
1350
+ }), c.value.viewer.addHandler("canvas-drag-end", (v) => {
1351
+ if (t.value !== 1) {
1352
+ g.value = v.position;
1353
+ const w = c.value.viewer.viewport.containerSize.x, y = c.value.viewer.viewport.containerSize.y, z = (g.value.x - n.value.x) / (w * o.value) * (t.value - 1), i = (g.value.y - n.value.y) / (y * o.value) * (t.value - 1), p = c.value.viewer.viewport.getCenter(), s = new Ue.Point(p.x - z, p.y - i);
1354
+ c.value.viewer.viewport.panTo(s), n.value = null;
1355
+ }
1356
+ });
1357
+ }
1358
+ function m({ name: v, value: w }) {
1359
+ v === "ratio" && (t.value = w / 1);
1360
+ }
1361
+ return {
1362
+ moveEvent: f,
1363
+ fastMove: m
1364
+ };
1365
+ }
1366
+ function yo(c, o, t, n, g) {
1367
+ const f = V(void 0), m = V([]), v = V([]);
1368
+ ie(() => c.aiLabelList, i);
1369
+ function w() {
1370
+ t.value.$on(ve.events.EVENT_INIT_COMPLETE, y("init-complete")), t.value.$on(ve.events.EVENT_UPDATE_ZRENDER, y("update-zrender")), t.value.$on(ve.events.EVENT_END_PAINTING, y("add")), t.value.$on(ve.events.EVENT_AREA_MOVE_END, y("move")), t.value.$on(ve.events.EVENT_ADD_POLYGON_POINT, y("add-point")), t.value.$on(ve.events.EVENT_DELETE_POLYGON_POINT, y("delete-point")), t.value.$on(ve.events.EVENT_DELETE_LABEL, y("delete")), t.value.$on(ve.events.EVENT_SELECT_LABEL, (l) => {
1371
+ f.value = l, r(), o("tool", "select-label", f.value);
1372
+ }), t.value.$on(ve.events.EVENT_CANCEL_SELECT_LABEL, () => {
1373
+ f.value = void 0, o("tool", "cancel-select-label", f.value);
1374
+ }), y("list")();
1375
+ }
1376
+ function y(l) {
1377
+ return (u) => z(l, u);
1378
+ }
1379
+ function z(l, u) {
1380
+ var d, b;
1381
+ if (l === "add" && u && ((u == null ? void 0 : u.subType) || ((d = u == null ? void 0 : u.__data__) == null ? void 0 : d.subType)) === "voice")
1382
+ n(u);
1383
+ else if (l === "add" && u && ((u == null ? void 0 : u.subType) || ((b = u == null ? void 0 : u.__data__) == null ? void 0 : b.subType)) === "measure")
1384
+ u.id = (/* @__PURE__ */ new Date()).getTime(), v.value.push(u), i();
1385
+ else if (l === "init-complete")
1386
+ c.initHandle && c.initHandle();
1387
+ else if (l === "update-zrender")
1388
+ c.zrenderUpdateHandle && c.zrenderUpdateHandle(t);
1389
+ else
1390
+ return c.labelHandle(l, c.slide, u, m.value).then((a) => {
1391
+ m.value = a, i();
1392
+ }).catch(() => {
1393
+ i();
1394
+ });
1395
+ }
1396
+ function i(l) {
1397
+ var u;
1398
+ if (l != null && l.length && (m.value = l), (u = t.value) != null && u.initLabelList) {
1399
+ const d = [...m.value, ...v.value, ...c.aiLabelList || []];
1400
+ d.find(({ id: b }) => {
1401
+ var a;
1402
+ return b === ((a = f.value) == null ? void 0 : a.id);
1403
+ }) || (f.value = void 0), t.value.initLabelList(d);
1404
+ }
1405
+ }
1406
+ function p(l, u) {
1407
+ var b, a;
1408
+ f.value && (f.value.select = !1, f.value = void 0);
1409
+ const d = (t.value.labelList || []).findIndex((x) => x.id === l.id);
1410
+ if (d > -1) {
1411
+ f.value = (b = t.value.labelList) == null ? void 0 : b[d], f.value.select = !0;
1412
+ const x = t.value.area.getCenterPoint(l.region);
1413
+ t.value.area.moveToLabel(x), (a = t.value.viewer) != null && a.canvas && t.value.viewer.canvas.focus(), r();
1414
+ }
1415
+ u && g(u);
1416
+ }
1417
+ function s(l) {
1418
+ return c.labelHandle("add", c.slide, l, m.value).then((u) => {
1419
+ m.value = u, i();
1420
+ }).catch(() => {
1421
+ i();
1422
+ });
1423
+ }
1424
+ function r() {
1425
+ var u, d, b, a;
1426
+ (((u = f.value) == null ? void 0 : u.subType) || ((b = (d = f.value) == null ? void 0 : d.__data__) == null ? void 0 : b.subType)) === "voice" && ((a = f.value) != null && a.src) && new Audio(f.value.src).play();
1427
+ }
1428
+ return {
1429
+ currentLabel: f,
1430
+ localLabelList: m,
1431
+ initLabel: w,
1432
+ jumpToLabel: p,
1433
+ reloadLabelList: i,
1434
+ eventHandel: y,
1435
+ addHandle: s
1436
+ };
1437
+ }
1438
+ function wo() {
1439
+ function c(o, t) {
1440
+ o.save(), o.strokeStyle = "rgba(0,0,0,0)", o.miterLimit = 4, o.font = "15px", o.fillStyle = t, o.font = "15px", o.scale(0.02734375, 0.02734375), o.save(), o.font = "15px", o.beginPath(), o.moveTo(512, 427.023), o.moveTo(422, 427.023), o.translate(512, 427.023), o.rotate(0), o.arc(0, 0, 90, 3.141592653589793, 6.283185307179586, !0), o.rotate(0), o.translate(-512, -427.023), o.translate(512, 427.023), o.rotate(0), o.arc(0, 0, 90, 0, 3.141592653589793, !0), o.rotate(0), o.translate(-512, -427.023), o.fill(), o.stroke(), o.restore(), o.save(), o.font = "15px", o.beginPath(), o.moveTo(512, 910.402), o.bezierCurveTo(492.86, 910.402, 474.51800000000003, 904.548, 458.95799999999997, 893.4730000000001), o.bezierCurveTo(444.895, 883.4630000000001, 434.032, 869.8770000000001, 427.36899999999997, 854.013), o.lineTo(255.043, 585.177), o.lineTo(254.889, 584.927), o.bezierCurveTo(225.522, 537.209, 210, 482.605, 210, 427.021), o.bezierCurveTo(210, 346.35400000000004, 241.414, 270.515, 298.454, 213.47500000000002), o.bezierCurveTo(355.494, 156.43500000000006, 431.333, 125.021, 512, 125.021), o.bezierCurveTo(592.6669999999999, 125.021, 668.506, 156.435, 725.546, 213.475), o.bezierCurveTo(782.587, 270.515, 814, 346.354, 814, 427.021), o.bezierCurveTo(814, 482.87, 798.345, 537.692, 768.726, 585.56), o.lineTo(768.462, 585.9789999999999), o.lineTo(596.381, 854.6949999999999), o.bezierCurveTo(589.626, 870.4209999999999, 578.721, 883.871, 564.677, 893.7499999999999), o.bezierCurveTo(549.192, 904.6449999999999, 530.977, 910.4019999999999, 512, 910.4019999999999), o.closePath(), o.moveTo(309.246, 551.141), o.lineTo(484.74, 824.9209999999999), o.lineTo(485.934, 828.1179999999999), o.bezierCurveTo(490.083, 839.2249999999999, 500.31500000000005, 846.4019999999999, 512, 846.4019999999999), o.bezierCurveTo(523.584, 846.4019999999999, 533.791, 839.3309999999999, 538.004, 828.387), o.lineTo(539.169, 825.3589999999999), o.lineTo(714.43, 551.678), o.bezierCurveTo(737.701, 513.983, 750, 470.884, 750, 427.021), o.bezierCurveTo(750, 363.449, 725.244, 303.682, 680.2909999999999, 258.72900000000004), o.bezierCurveTo(635.3389999999999, 213.77800000000005, 575.5719999999999, 189.02100000000004, 511.99999999999994, 189.02100000000004), o.bezierCurveTo(448.428, 189.02100000000004, 388.66099999999994, 213.77700000000004, 343.70799999999997, 258.72900000000004), o.bezierCurveTo(298.755, 303.68100000000004, 274, 363.449, 274, 427.021), o.bezierCurveTo(274, 470.661, 286.186, 513.573, 309.246, 551.1410000000001), o.closePath(), o.fill(), o.stroke(), o.restore(), o.restore();
1441
+ }
1442
+ return {
1443
+ drawDot: c
1444
+ };
1445
+ }
1446
+ function _o(c, o) {
1447
+ const { t } = he(), n = V(!1), g = V();
1448
+ let f = null;
1449
+ const m = V(!1), v = V(0);
1450
+ let w = 0;
1451
+ const y = V([]), z = V(void 0);
1452
+ let i = !1;
1453
+ function p(a, x) {
1454
+ a.save(), a.strokeStyle = "rgba(0,0,0,0)", a.miterLimit = 4, a.font = "15px ''", a.fillStyle = x, a.font = " 15px ''", a.scale(0.03125, 0.03125), a.save(), a.font = " 15px ''", a.beginPath(), a.moveTo(515.041727, 670.617766), a.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), a.lineTo(681.137374, 229.350568), a.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), a.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), a.lineTo(348.93885600000004, 504.52212), a.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), a.closePath(), a.fill(), a.stroke(), a.restore(), a.save(), a.font = " 15px ''", a.beginPath(), a.moveTo(801.643237, 874.001665), a.lineTo(558.391759, 874.001665), a.lineTo(558.391759, 828.578057), a.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), a.translate(801.643237, 501.55986699999994), a.rotate(0), a.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), a.rotate(0), a.translate(-801.643237, -501.55986699999994), a.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), a.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), a.translate(228.44021750000013, 501.5664510740879), a.rotate(0), a.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), a.rotate(0), a.translate(-228.44021750000013, -501.5664510740879), a.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), a.lineTo(471.69169500000015, 874.001665), a.lineTo(228.440217, 874.001665), a.translate(228.440217, 917.3516970000001), a.rotate(0), a.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), a.rotate(0), a.translate(-228.440217, -917.3516970000001), a.lineTo(801.643237, 960.701729), a.translate(801.643237, 917.3516970000001), a.rotate(0), a.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), a.rotate(0), a.translate(-801.643237, -917.3516970000001), a.closePath(), a.fill(), a.stroke(), a.restore(), a.restore();
1455
+ }
1456
+ function s() {
1457
+ return Ne(this, null, function* () {
1458
+ try {
1459
+ g.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), f = new MediaRecorder(g.value), y.value = [], f.addEventListener("dataavailable", (a) => {
1460
+ y.value.push(a.data);
1461
+ }), f.addEventListener("stop", () => Ne(this, null, function* () {
1462
+ if (z.value) {
1463
+ const a = new Blob(y.value, { type: c.audioType || "audio/wav" });
1464
+ z.value.src = URL.createObjectURL(a);
1465
+ }
1466
+ m.value = !1, i && (yield b());
1467
+ })), f.start(), m.value = !0, w = window.setInterval(() => {
1468
+ v.value++;
1469
+ }, 1e3);
1470
+ } catch (a) {
1471
+ ct.error(t("麦克风启用失败,请确认是否开启麦克风权限"));
1472
+ }
1473
+ });
1474
+ }
1475
+ function r() {
1476
+ g.value && f ? (f.stop(), g.value.getTracks().forEach((a) => a.stop()), f = null, g.value = void 0) : (f = null, g.value = void 0), m.value = !1, w && (clearInterval(w), w = 0), v.value = 0;
1477
+ }
1478
+ function l(a) {
1479
+ n.value = !0, z.value = a, y.value = [], i = !1;
1480
+ }
1481
+ function u() {
1482
+ m.value && r(), n.value = !1, m.value = !1, i = !1;
1483
+ }
1484
+ function d() {
1485
+ return Ne(this, null, function* () {
1486
+ if (!m.value && !y.value.length) {
1487
+ ct.error(t("请先录音"));
1488
+ return;
1489
+ }
1490
+ m.value && r(), m.value = !1, i = !0, y.value.length && (yield b()), n.value = !1;
1491
+ });
1492
+ }
1493
+ function b() {
1494
+ return Ne(this, null, function* () {
1495
+ if (c.uploadHandle && z.value) {
1496
+ const a = Ht.service({
1497
+ text: t("录音上传中")
1498
+ }), x = new Blob(y.value, { type: c.audioType || "audio/wav" });
1499
+ y.value = [];
1500
+ try {
1501
+ yield c.uploadHandle(c.slide, z.value, x).then((S) => {
1502
+ z.value.src = S;
1503
+ }), a.close(), o(z.value);
1504
+ } catch (S) {
1505
+ a.close();
1506
+ }
1507
+ }
1508
+ });
1509
+ }
1510
+ return {
1511
+ voiceVisible: n,
1512
+ voiceForm: z,
1513
+ recordTime: v,
1514
+ isRecording: m,
1515
+ drawVoice: p,
1516
+ startRecording: s,
1517
+ stopRecording: r,
1518
+ initVoice: l,
1519
+ cancelRecord: u,
1520
+ confirmRecord: d
1521
+ };
1522
+ }
1523
+ function bo(c, o, t) {
1524
+ const n = V([]), g = V(0), f = V(!1);
1525
+ let m = null;
1526
+ ie(() => {
1527
+ var s;
1528
+ return (s = c.analysis) == null ? void 0 : s.hotmap_path;
1529
+ }, (s) => {
1530
+ var r, l, u;
1531
+ if ((l = (r = o.value) == null ? void 0 : r.viewer) != null && l.world) {
1532
+ g.value = 0;
1533
+ const d = o.value.viewer.world.getItemAt(0);
1534
+ d && (d.tilesMatrix = {}, d.draw());
1535
+ }
1536
+ s && ((u = c.analysis) != null && u.zoom_roi) && t({
1537
+ x: c.analysis.zoom_roi.x,
1538
+ y: c.analysis.zoom_roi.y,
1539
+ width: c.analysis.zoom_roi.w,
1540
+ height: c.analysis.zoom_roi.h
1541
+ }, 5);
1542
+ }), Le(() => {
1543
+ window.addEventListener("mousemove", y), window.addEventListener("mouseup", i);
1544
+ }), je(() => {
1545
+ window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", i);
1546
+ });
1547
+ function v(s, r, l) {
1548
+ var d, b, a, x;
1549
+ const u = ke(Q({}, r), {
1550
+ file: (d = c.analysis) == null ? void 0 : d.hotmap_path
1551
+ });
1552
+ if ((b = c.analysis) != null && b.hotmap_info) {
1553
+ if (l[r.x + "_" + r.y + "_" + Number(r.scale)])
1554
+ if (((a = c.analysis) == null ? void 0 : a.hotmap_type) === "drag")
1555
+ w(s, u);
1556
+ else
1557
+ return c.tileHandle(u, c.slide);
1558
+ } else if (((x = c.analysis) == null ? void 0 : x.hotmap_type) === "drag")
1559
+ w(s, u);
1560
+ else
1561
+ return c.tileHandle(u, c.slide);
1562
+ return s;
1563
+ }
1564
+ function w(s, r) {
1565
+ const l = n.value.find((u) => u.url === s) || {
1566
+ url: s,
1567
+ x: r.x,
1568
+ y: r.y,
1569
+ img: void 0,
1570
+ load: ""
1571
+ };
1572
+ if (!(l != null && l.img) && (n.value.push(l), l.load !== "success")) {
1573
+ const u = new Image();
1574
+ u.src = c.tileHandle(r, c.slide), u.onload = () => {
1575
+ l.load = "success";
1576
+ }, l.img = u;
1577
+ }
1578
+ }
1579
+ function y(s) {
1580
+ f.value && m && (g.value += s.x - m.x, g.value < 0 ? g.value = 0 : g.value > o.value.$options.width && (g.value = o.value.$options.width, f.value = !1), o.value.viewer.forceRedraw()), m = { x: s.x, y: s.y };
1581
+ }
1582
+ function z(s) {
1583
+ const { x: r, y: l } = s;
1584
+ f.value = !0, m = { x: r, y: l };
1585
+ }
1586
+ function i() {
1587
+ f.value = !1, m = null;
1588
+ }
1589
+ function p(s) {
1590
+ const {
1591
+ context: r,
1592
+ sourceWidth: l,
1593
+ sourceHeight: u,
1594
+ position: d,
1595
+ size: b,
1596
+ initRendered: a,
1597
+ tile: x,
1598
+ pixelDensityRatio: S
1599
+ } = s, H = x.getUrl(), P = g.value * S, O = d.original.x;
1600
+ if (O < P && O + b.x > P) {
1601
+ const F = P - O, B = b.x - F, j = n.value.find((oe) => oe.url === H), K = (j == null ? void 0 : j.load) === "success" ? j.img : a.canvas;
1602
+ r.drawImage(
1603
+ K,
1604
+ 0,
1605
+ 0,
1606
+ l * F / b.x,
1607
+ u,
1608
+ d.x,
1609
+ d.y,
1610
+ F,
1611
+ b.y
1612
+ ), r.drawImage(
1613
+ a.canvas,
1614
+ l * F / b.x,
1615
+ 0,
1616
+ l * B / b.x,
1617
+ u,
1618
+ d.x + F,
1619
+ d.y,
1620
+ B,
1621
+ b.y
1622
+ );
1623
+ } else if (O + b.x <= P) {
1624
+ const F = n.value.find((j) => j.url === H), B = (F == null ? void 0 : F.load) === "success" ? F.img : a.canvas;
1625
+ r.drawImage(
1626
+ B,
1627
+ 0,
1628
+ 0,
1629
+ l,
1630
+ u,
1631
+ d.x,
1632
+ d.y,
1633
+ b.x,
1634
+ b.y
1635
+ );
1636
+ } else O >= P && r.drawImage(
1637
+ a.canvas,
1638
+ 0,
1639
+ 0,
1640
+ l,
1641
+ u,
1642
+ d.x,
1643
+ d.y,
1644
+ b.x,
1645
+ b.y
1646
+ );
1647
+ }
1648
+ return {
1649
+ getHotmapUrl: v,
1650
+ hotmapImgs: n,
1651
+ handlerImage: p,
1652
+ hotmapLine: g,
1653
+ lineMouseDown: z
1654
+ };
1655
+ }
1656
+ function ko(c, o, t) {
1657
+ const n = dl(), g = V(!1), f = new BroadcastChannel("sync_kfb_view");
1658
+ f.onmessage = (i) => {
1659
+ const p = i.data;
1660
+ y(p);
1661
+ }, Le(() => {
1662
+ var i, p, s;
1663
+ (i = t.value) == null || i.addEventListener("mouseenter", m), (p = t.value) == null || p.addEventListener("mousemove", m), (s = t.value) == null || s.addEventListener("mouseleave", v);
1664
+ }), je(() => {
1665
+ var i, p, s;
1666
+ (i = t.value) == null || i.removeEventListener("mouseenter", m), (p = t.value) == null || p.removeEventListener("mousemove", m), (s = t.value) == null || s.removeEventListener("mouseleave", v), f.close();
1667
+ });
1668
+ function m() {
1669
+ g.value = !0;
1670
+ }
1671
+ function v() {
1672
+ g.value = !1;
1673
+ }
1674
+ function w() {
1675
+ let i;
1676
+ o.value.viewer.addHandler("pan", (p) => {
1677
+ var l, u, d, b;
1678
+ if (!i) {
1679
+ i = (u = (l = p.center) == null ? void 0 : l.clone) == null ? void 0 : u.call(l);
1680
+ return;
1681
+ }
1682
+ const s = p.center, r = (d = s == null ? void 0 : s.minus) == null ? void 0 : d.call(s, i);
1683
+ i = (b = s == null ? void 0 : s.clone) == null ? void 0 : b.call(s), c.syncPosition && z({
1684
+ position: r,
1685
+ type: "sync_position"
1686
+ });
1687
+ }), o.value.viewer.addHandler("zoom", (p) => {
1688
+ c.syncZoom && z({
1689
+ zoom: p.zoom,
1690
+ type: "sync_zoom"
1691
+ });
1692
+ }), o.value.viewer.addHandler("animation-finish", () => {
1693
+ var r;
1694
+ if (c.syncZoom && z({
1695
+ zoom: o.value.viewer.viewport.getZoom(!0),
1696
+ type: "sync_zoom"
1697
+ }), !i)
1698
+ return;
1699
+ const p = o.value.viewer.viewport.getCenter(!0), s = (r = p == null ? void 0 : p.minus) == null ? void 0 : r.call(p, i);
1700
+ i = void 0, c.syncPosition && z({
1701
+ position: s,
1702
+ type: "sync_position"
1703
+ });
1704
+ });
1705
+ }
1706
+ function y(i) {
1707
+ i.uuid && i.type === "sync_position" && i.uuid !== (n == null ? void 0 : n.uid) ? o.value && o.value.viewer.viewport.panBy(i.position, !0) : i.uuid && i.type === "sync_zoom" && i.uuid !== (n == null ? void 0 : n.uid) && o.value && o.value.viewer.viewport.zoomTo(i.zoom);
1708
+ }
1709
+ function z(i) {
1710
+ var p;
1711
+ g.value && f.postMessage(ke(Q({}, i), {
1712
+ uuid: n == null ? void 0 : n.uid,
1713
+ fileName: (p = c.slide) == null ? void 0 : p.file
1714
+ }));
1715
+ }
1716
+ return {
1717
+ initSync: w
1718
+ };
1719
+ }
1720
+ const zo = { class: "hzzt-kfb-keyword flex wrap" }, Co = ["onMouseenter"], $o = /* @__PURE__ */ le({
1721
+ __name: "KfbKeyword",
1722
+ setup(c) {
1723
+ const o = V([
1724
+ { code: "Q", icon: "zoomIn" },
1725
+ { code: "W", icon: "arrowUp" },
1726
+ { code: "E", icon: "zoomOut" },
1727
+ { code: "A", icon: "arrowLeft" },
1728
+ { code: "S", icon: "arrowDown" },
1729
+ { code: "D", icon: "arrowRight" }
1730
+ ]), t = J("kfbView", V({}));
1731
+ let n = null;
1732
+ function g(m, v) {
1733
+ m.preventDefault(), n && clearTimeout(n), n = setInterval(() => {
1734
+ v === "E" && (t.value.viewer.viewport.zoomBy(1.1), t.value.viewer.viewport.applyConstraints()), v === "Q" && (t.value.viewer.viewport.zoomBy(0.9), t.value.viewer.viewport.applyConstraints()), v === "W" && (t.value.viewer.viewport.panBy(t.value.viewer.viewport.deltaPointsFromPixels(new Ue.Point(0, -40))), t.value.viewer.viewport.applyConstraints()), v === "S" && (t.value.viewer.viewport.panBy(t.value.viewer.viewport.deltaPointsFromPixels(new Ue.Point(0, 40))), t.value.viewer.viewport.applyConstraints()), v === "A" && (t.value.viewer.viewport.panBy(t.value.viewer.viewport.deltaPointsFromPixels(new Ue.Point(-40, 0))), t.value.viewer.viewport.applyConstraints()), v === "D" && (t.value.viewer.viewport.panBy(t.value.viewer.viewport.deltaPointsFromPixels(new Ue.Point(40, 0))), t.value.viewer.viewport.applyConstraints());
1735
+ }, 120);
1736
+ }
1737
+ function f() {
1738
+ n && (clearInterval(n), n = null);
1739
+ }
1740
+ return je(() => {
1741
+ clearTimeout(n);
1742
+ }), (m, v) => (_(), E("div", zo, [
1743
+ (_(!0), E(re, null, ue(o.value, (w) => (_(), E("div", {
1744
+ key: w.code,
1745
+ class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
1746
+ onMouseenter: (y) => g(y, w.code),
1747
+ onMouseleave: f
1748
+ }, [
1749
+ h("p", null, L(w.code), 1),
1750
+ k(X, {
1751
+ size: "14",
1752
+ name: w.icon
1753
+ }, null, 8, ["name"])
1754
+ ], 40, Co))), 128))
1755
+ ]));
1756
+ }
1757
+ }), To = /* @__PURE__ */ Ve($o, [["__scopeId", "data-v-c8d940f0"]]);
1758
+ function xo(c, o, t = {}) {
1759
+ const {
1760
+ panSensitivity: n = 0.2,
1761
+ // 值越大,鼠标移动时图像移动越快
1762
+ zoomSensitivity: g = 1.1,
1763
+ // 值越大,滚轮缩放幅度越大
1764
+ damping: f = 0.6,
1765
+ // 值越大,惯性滑动时间越长
1766
+ minThreshold: m = 0.05
1767
+ // 值越小,停止移动时的精度越高
1768
+ } = t;
1769
+ let v = !1, w = null, y = 0, z = 0, i = !1;
1770
+ const p = () => {
1771
+ v = document.pointerLockElement === o.value, v || s();
1772
+ }, s = () => {
1773
+ y = 0, z = 0, w && (cancelAnimationFrame(w), w = null), i = !1;
1774
+ }, r = (a) => Ne(this, null, function* () {
1775
+ try {
1776
+ a.key === "l" && o.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield o.value.requestPointerLock(), console.log("鼠标已锁定!")));
1777
+ } catch (x) {
1778
+ console.error("无法锁定鼠标:", x);
1779
+ }
1780
+ }), l = (a) => {
1781
+ if (v) {
1782
+ a.preventDefault();
1783
+ const x = Math.pow(g, Math.sign(a.deltaY) * -1);
1784
+ c.value.viewer.viewport.zoomBy(x), c.value.viewer.viewport.applyConstraints();
1785
+ }
1786
+ }, u = (a) => {
1787
+ v && (y += a.movementX * n, z += a.movementY * n, !i && (Math.abs(y) > 1 || Math.abs(z) > 1) && (i = !0, w = requestAnimationFrame(d)));
1788
+ }, d = () => {
1789
+ const a = c.value.viewer.viewport;
1790
+ if (Math.abs(y) > m || Math.abs(z) > m) {
1791
+ const x = a.deltaPointsFromPixels(
1792
+ new Ue.Point(y, z)
1793
+ );
1794
+ a.panBy(x), a.applyConstraints();
1795
+ }
1796
+ y *= f, z *= f, Math.abs(y) > m || Math.abs(z) > m ? w = requestAnimationFrame(d) : s();
1797
+ }, b = () => {
1798
+ v && document.exitPointerLock();
1799
+ };
1800
+ return Le(() => {
1801
+ var a;
1802
+ (a = o.value) == null || a.addEventListener("keydown", r), document.addEventListener("wheel", l, { passive: !1 }), document.addEventListener("click", b), document.addEventListener("mousemove", u), document.addEventListener("pointerlockchange", p);
1803
+ }), je(() => {
1804
+ var a;
1805
+ (a = o.value) == null || a.removeEventListener("keydown", r), document.removeEventListener("click", b), document.removeEventListener("wheel", l), document.removeEventListener("mousemove", u), document.removeEventListener("pointerlockchange", p), s();
1806
+ }), {
1807
+ setConfig: (a) => {
1808
+ Object.assign(t, a);
1809
+ }
1810
+ };
1811
+ }
1812
+ const Lo = /* @__PURE__ */ le({
1813
+ __name: "KfbLevel",
1814
+ props: /* @__PURE__ */ Pe({
1815
+ slides: { default: () => [] }
1816
+ }, {
1817
+ "model-value": {
1818
+ default: 0
1819
+ },
1820
+ "model-valueModifiers": {}
1821
+ }),
1822
+ emits: ["update:model-value"],
1823
+ setup(c) {
1824
+ const o = c, t = Je(c, "model-value"), n = J("kfbView", V({})), g = D(() => Array.from(new Array(o.slides.length + 1)).map((m, v) => v));
1825
+ function f() {
1826
+ const m = n.value.viewer.world.getItemAt(0), v = Object.keys(m.tilesMatrix);
1827
+ v.forEach((w, y) => {
1828
+ y > v.length - 4 && (m.tilesMatrix[w] = {});
1829
+ }), m.draw();
1830
+ }
1831
+ return (m, v) => (_(), E("div", {
1832
+ class: He(["hzzt-kfb-level flex column align-items-center", m.slides.length > 5 ? "hzzt-kfb-level--large" : ""])
1833
+ }, [
1834
+ k(X, {
1835
+ name: "level",
1836
+ size: "24",
1837
+ class: "margin-b-4 margin-t-2"
1838
+ }),
1839
+ k(e(ml), {
1840
+ modelValue: t.value,
1841
+ "onUpdate:modelValue": v[0] || (v[0] = (w) => t.value = w),
1842
+ vertical: "",
1843
+ min: g.value[0],
1844
+ step: 1,
1845
+ max: g.value[g.value.length - 1],
1846
+ "show-stops": "",
1847
+ "show-tooltip": !0,
1848
+ placement: "left",
1849
+ height: m.slides.length > 5 ? "180px" : "130px",
1850
+ onInput: f
1851
+ }, null, 8, ["modelValue", "min", "max", "height"])
1852
+ ], 2));
1853
+ }
1854
+ }), Vo = {
1855
+ key: 0,
1856
+ class: "flex hzzt-kfb-channel"
1857
+ }, Eo = ["onClick"], So = /* @__PURE__ */ le({
1858
+ __name: "KfbChannel",
1859
+ props: /* @__PURE__ */ Pe({
1860
+ info: {}
1861
+ }, {
1862
+ "model-value": {
1863
+ default: () => []
1864
+ },
1865
+ "model-valueModifiers": {}
1866
+ }),
1867
+ emits: /* @__PURE__ */ Pe(["load"], ["update:model-value"]),
1868
+ setup(c, { emit: o }) {
1869
+ const t = c, n = o, g = Je(c, "model-value"), f = [
1870
+ { key: "DAPI", color: "#4A6CF7" },
1871
+ { key: "480", color: "#00BFFF" },
1872
+ { key: "520", color: "#32CD32" },
1873
+ { key: "570", color: "#FFAA33" },
1874
+ { key: "620", color: "#FF6347" },
1875
+ { key: "670", color: "#DC143C" },
1876
+ { key: "780", color: "#4B0082" }
1877
+ ], m = D(() => {
1878
+ var w;
1879
+ return (((w = t.info) == null ? void 0 : w.channel) || []).map((y) => {
1880
+ const z = f.find((i) => i.key === y.eqt_num);
1881
+ return {
1882
+ label: y.eqt_num,
1883
+ color: y.r ? `rgb(${y.r}, ${y.g}, ${y.b})` : z == null ? void 0 : z.color
1884
+ };
1885
+ });
1886
+ });
1887
+ function v(w) {
1888
+ g.value.includes(w) ? g.value = g.value.filter((y) => y !== w) : g.value.push(w), n("load");
1889
+ }
1890
+ return (w, y) => m.value.length > 0 ? (_(), E("div", Vo, [
1891
+ k(X, {
1892
+ name: "channel",
1893
+ size: "32"
1894
+ }),
1895
+ (_(!0), E(re, null, ue(m.value, (z) => (_(), E("div", {
1896
+ key: z.label,
1897
+ style: te({ background: z.color }),
1898
+ class: He(["hzzt-kfb-channel__box", g.value.includes(z.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
1899
+ onClick: (i) => v(z.label)
1900
+ }, L(z.label), 15, Eo))), 128))
1901
+ ])) : N("", !0);
1902
+ }
1903
+ }), Io = { class: "flex align-items-center justify-content-between" }, Mo = { class: "hzzt-kfb-title" }, Po = { class: "hzzt-kfb-annotation__container flex-1" }, Ho = ["onClick"], Ro = /* @__PURE__ */ le({
1904
+ __name: "KfbAnnotation",
1905
+ props: /* @__PURE__ */ Pe({
1906
+ annotation: {},
1907
+ annotations: {}
1908
+ }, {
1909
+ expand: { type: Boolean },
1910
+ expandModifiers: {}
1911
+ }),
1912
+ emits: /* @__PURE__ */ Pe(["select"], ["update:expand"]),
1913
+ setup(c, { emit: o }) {
1914
+ const t = Je(c, "expand"), n = o, { t: g } = he();
1915
+ function f(v) {
1916
+ let w = "";
1917
+ return v.subType === "count" ? w = v.tool || "" : w = v.subType || v.tool || "", `mark${w.substring(0, 1).toLocaleUpperCase()}${w.substring(1)}`;
1918
+ }
1919
+ function m(v) {
1920
+ n("select", v);
1921
+ }
1922
+ return (v, w) => (_(), E("div", {
1923
+ class: He(["hzzt-kfb-annotation flex column", t.value ? "hzzt-kfb-annotation--expand" : ""])
1924
+ }, [
1925
+ h("div", Io, [
1926
+ De(h("div", Mo, [
1927
+ h("span", null, L(e(g)("标注列表")), 1)
1928
+ ], 512), [
1929
+ [Ye, t.value]
1930
+ ]),
1931
+ k(X, {
1932
+ class: "hzzt-kfb-annotation__icon",
1933
+ name: t.value ? "expandLeft" : "expandRight",
1934
+ onClick: w[0] || (w[0] = (y) => t.value = !t.value)
1935
+ }, null, 8, ["name"])
1936
+ ]),
1937
+ De(h("div", Po, [
1938
+ (_(!0), E(re, null, ue(v.annotations, (y, z) => {
1939
+ var i;
1940
+ return _(), E("div", {
1941
+ class: He(["hzzt-kfb-annotation__item", ((i = v.annotation) == null ? void 0 : i.id) === y.id ? "hzzt-kfb-annotation__item--active" : ""]),
1942
+ key: z,
1943
+ onClick: (p) => m(y)
1944
+ }, [
1945
+ k(X, {
1946
+ size: "16",
1947
+ color: y.subType === "count" ? y.strokeStyle : void 0,
1948
+ name: f(y)
1949
+ }, null, 8, ["color", "name"]),
1950
+ h("span", null, L(e(g)("标注")) + L(z + 1), 1)
1951
+ ], 10, Ho);
1952
+ }), 128))
1953
+ ], 512), [
1954
+ [Ye, t.value]
1955
+ ])
1956
+ ], 2));
1957
+ }
1958
+ }), Ao = /* @__PURE__ */ Ve(Ro, [["__scopeId", "data-v-3dcc059f"]]);
1959
+ function Ft(c) {
1960
+ const { t: o } = he();
1961
+ return D(() => {
1962
+ var g;
1963
+ const n = ((g = c == null ? void 0 : c.analysis) == null ? void 0 : g.result) || "";
1964
+ return n.indexOf("疑似阳性") > -1 ? {
1965
+ type: "warning",
1966
+ name: n
1967
+ } : n.indexOf("阳性") > -1 ? {
1968
+ type: "danger",
1969
+ name: n
1970
+ } : n.indexOf("阴性") > -1 ? {
1971
+ type: "success",
1972
+ name: n
1973
+ } : n.indexOf("不合格") > -1 ? {
1974
+ type: "danger",
1975
+ name: n
1976
+ } : n.indexOf("合格") > -1 ? {
1977
+ type: "success",
1978
+ name: n
1979
+ } : {
1980
+ type: "info",
1981
+ name: n || o("未知")
1982
+ };
1983
+ });
1984
+ }
1985
+ const No = ["element-loading-text"], Fo = {
1986
+ key: 1,
1987
+ class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
1988
+ }, Uo = {
1989
+ class: "hzzt-kfb-view__filter",
1990
+ height: "0",
1991
+ width: "0"
1992
+ }, Do = { id: "colorMatrixFilter" }, Bo = ["values"], jo = ["values"], Ko = ["exponent"], Oo = ["exponent"], Wo = ["exponent"], Go = { class: "flex nowrap justify-content-center overflow-hidden" }, Zo = ["src"], Yo = ["src"], qo = { class: "flex-1" }, Xo = { class: "flex-1" }, Jo = { class: "flex-1" }, Qo = { class: "flex-1" }, ea = { class: "flex-1" }, ta = { class: "flex-1" }, la = ["src"], oa = {
1993
+ key: 2,
1994
+ class: "margin-l-2"
1995
+ }, aa = {
1996
+ key: 9,
1997
+ class: "hzzt-kfb-view__watermark"
1998
+ }, Xe = /* @__PURE__ */ le({
1999
+ name: "HzztKfbView",
2000
+ __name: "index",
2001
+ props: {
2002
+ slide: {},
2003
+ fileHandle: {},
2004
+ labelHandle: {},
2005
+ tileHandle: {},
2006
+ initHandle: {},
2007
+ zrenderUpdateHandle: {},
2008
+ navigatorHandle: {},
2009
+ pathologyHandle: {},
2010
+ uploadHandle: {},
2011
+ options: {},
2012
+ labelDrawing: {},
2013
+ process: { default: () => Q({}, Nt) },
2014
+ microscope: { default: () => Q({}, vt) },
2015
+ menus: {},
2016
+ syncPosition: { type: Boolean },
2017
+ syncZoom: { type: Boolean },
2018
+ audioType: {},
2019
+ watermark: {},
2020
+ analysis: {},
2021
+ aiLabelList: {},
2022
+ showLabel: { type: Boolean },
2023
+ showZrender: { type: Boolean }
2024
+ },
2025
+ emits: ["tool"],
2026
+ setup(c, { expose: o, emit: t }) {
2027
+ cl((C) => ({
2028
+ e85cbde0: O.value
2029
+ }));
2030
+ const n = c, g = t, { t: f, locale: m } = he(), v = V(), w = V(), y = V(), z = V(!1), i = V({}), p = V(!1), s = V(0), r = V(0), l = V(0), u = V([]), d = V({
2031
+ width: 0,
2032
+ height: 0,
2033
+ fileNum: 0,
2034
+ scanScale: 1,
2035
+ fileName: "",
2036
+ ratiomap: {}
2037
+ }), b = J("show-kfb-label", V(!0)), a = J("show-keyboard", V(!1)), x = J("show-watermark", V(!1)), S = V(!1), H = Ht.directive;
2038
+ ie(() => {
2039
+ var C;
2040
+ return (C = n.slide) == null ? void 0 : C.file;
2041
+ }, () => {
2042
+ Jt(), setTimeout(() => {
2043
+ yt();
2044
+ }, 100);
2045
+ }), Le(() => {
2046
+ yt();
2047
+ });
2048
+ const P = Ft(n), O = D(() => {
2049
+ var C, I;
2050
+ return `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='100'><text x='30' y='80' font-family='Arial' font-size='16' fill='${((C = n.watermark) == null ? void 0 : C.color) || "rgba(0,0,0,0.2)"}' transform='rotate(-30)' text-anchor='middle'>${((I = n.watermark) == null ? void 0 : I.text) || "水印文字"}</text></svg>")`;
2051
+ }), {
2052
+ imageProcess: F,
2053
+ matrixValues: B,
2054
+ saturateValues: j,
2055
+ forceRedraw: K
2056
+ } = Ol(n), {
2057
+ tailorEvent: oe,
2058
+ shotScreen: $e
2059
+ } = Wl(g, f, i, r, d), {
2060
+ moveEvent: ge,
2061
+ fastMove: ye
2062
+ } = go(i, r), { initSync: Re } = ko(n, i, v);
2063
+ xo(i, v);
2064
+ const { drawDot: Ke } = wo(), {
2065
+ voiceVisible: Ee,
2066
+ voiceForm: Se,
2067
+ drawVoice: Oe,
2068
+ recordTime: We,
2069
+ isRecording: T,
2070
+ startRecording: U,
2071
+ stopRecording: W,
2072
+ initVoice: we,
2073
+ cancelRecord: pt,
2074
+ confirmRecord: Ut
2075
+ } = _o(n, Ot), {
2076
+ currentLabel: st,
2077
+ localLabelList: it,
2078
+ initLabel: Dt,
2079
+ jumpToLabel: ht,
2080
+ reloadLabelList: Bt,
2081
+ eventHandel: jt,
2082
+ addHandle: Kt
2083
+ } = yo(n, g, i, we, rt);
2084
+ function Ot(C) {
2085
+ Kt(C);
2086
+ }
2087
+ const {
2088
+ getHotmapUrl: Wt,
2089
+ handlerImage: Gt,
2090
+ hotmapLine: Zt,
2091
+ lineMouseDown: gt,
2092
+ hotmapImgs: Yt
2093
+ } = bo(n, i, ut);
2094
+ function yt() {
2095
+ var C;
2096
+ (C = n.slide) != null && C.file && n.fileHandle && (p.value || (p.value = !0, n.fileHandle(n.slide).then((I) => {
2097
+ var ae, de, Te, ee, Y;
2098
+ d.value = I, u.value = (((ae = d.value) == null ? void 0 : ae.channel) || []).map((ne) => ne.eqt_num), i.value = new ve(ke(Q({
2099
+ el: w.value,
2100
+ fileName: (de = n.slide) == null ? void 0 : de.file,
2101
+ showZrender: n.showZrender,
2102
+ scale: d.value.scanScale,
2103
+ lang: (m == null ? void 0 : m.value) === "en-US" ? "en" : m == null ? void 0 : m.value,
2104
+ navigator: {
2105
+ style: "left: 0;bottom: 0",
2106
+ thumbnail: d.value.thumbnailImg,
2107
+ width: 200,
2108
+ height: 180
2109
+ },
2110
+ grid: {
2111
+ show: !1,
2112
+ ruler: !1,
2113
+ pxConversion: !0
2114
+ },
2115
+ thumb: {
2116
+ bgColor: "rgba(0,0,0,0)"
2117
+ },
2118
+ graduation: {
2119
+ show: !0,
2120
+ right: 120,
2121
+ bottom: (ee = (Te = d.value) == null ? void 0 : Te.channel) != null && ee.length ? 120 : 30,
2122
+ tick: {
2123
+ number: 3,
2124
+ height: 8
2125
+ }
2126
+ },
2127
+ pxConversion: {
2128
+ units: ["um", "mm"],
2129
+ binary: 1e3,
2130
+ imageCapRes: d.value.imageCapRes || d.value.scanResolution || 1
2131
+ },
2132
+ openSeadragonOptions: {
2133
+ maxZoomLevel: d.value.scanScale * 20,
2134
+ pixelsPerArrowPress: 200,
2135
+ animationTime: 0,
2136
+ tileSources: wt()
2137
+ },
2138
+ tileDrawing: Gt,
2139
+ label: {
2140
+ drawing: (ne, G, Ae) => {
2141
+ var _e;
2142
+ if (G != null && G.custom) {
2143
+ const fe = ne.getContext("2d");
2144
+ fe.save(), fe.beginPath();
2145
+ const Ge = (G == null ? void 0 : G.subType) || ((_e = G == null ? void 0 : G.__data__) == null ? void 0 : _e.subType);
2146
+ Ge === "count" ? (fe.translate(Ae.x - 14, Ae.y - 22), Ke(fe, (G == null ? void 0 : G.strokeStyle) || "")) : Ge === "voice" ? (fe.translate(Ae.x - 16, Ae.y - 18), Oe(fe, (G == null ? void 0 : G.strokeStyle) || "")) : n.labelDrawing && n.labelDrawing(fe, G), fe.restore();
2147
+ }
2148
+ }
2149
+ }
2150
+ }, n.options || {}), {
2151
+ measure: Q({ defaultShow: !0, scale: 0.1, handler: (ne, G) => G.subType === "measure" ? [...ne] : [] }, ((Y = n.options) == null ? void 0 : Y.measure) || {})
2152
+ })), i.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", Dt(), Xt(), Re(), setTimeout(() => {
2153
+ var ne, G;
2154
+ (ne = n.analysis) != null && ne.hotmap_path && ((G = n.analysis) != null && G.zoom_roi) && ut({
2155
+ x: n.analysis.zoom_roi.x,
2156
+ y: n.analysis.zoom_roi.y,
2157
+ width: n.analysis.zoom_roi.w,
2158
+ height: n.analysis.zoom_roi.h
2159
+ }, 5);
2160
+ }, 200);
2161
+ }).finally(() => {
2162
+ p.value = !1, b.value || (zt({
2163
+ show: !1,
2164
+ ruler: !1
2165
+ }), Ct({
2166
+ show: !1
2167
+ }), setTimeout(() => {
2168
+ $t(!1);
2169
+ }, 100));
2170
+ })));
2171
+ }
2172
+ function qt() {
2173
+ const C = i.value.viewer;
2174
+ if (C.world) {
2175
+ const I = C.world.getItemAt(0), ae = C.viewport.getZoom(), de = C.viewport.getCenter();
2176
+ C.world.removeItem(I), C.addTiledImage({
2177
+ tileSource: wt(),
2178
+ success: function() {
2179
+ C.viewport.zoomTo(ae), C.viewport.panTo(de);
2180
+ }
2181
+ });
2182
+ }
2183
+ }
2184
+ function wt() {
2185
+ var Te, ee;
2186
+ const C = d.value.tileWidth || d.value.imageBlockLen || 256, I = d.value.tileHeight || d.value.imageBlockLen || 256, ae = {};
2187
+ (Te = n.analysis) != null && Te.hotmap_path && (((ee = n.analysis) == null ? void 0 : ee.hotmap_info) || []).forEach((Y) => {
2188
+ ae[Y[0] / C + "_" + Y[1] / I + "_" + Y[2]] = !0;
2189
+ });
2190
+ let de = 10;
2191
+ return Object.keys(d.value.ratiomap).forEach((Y) => {
2192
+ const ne = d.value.fileNum - Math.sqrt(d.value.scanScale / Number(Y));
2193
+ ne > 0 && (de = de ? Math.min(de, ne) : ne);
2194
+ }), {
2195
+ height: d.value.height,
2196
+ width: d.value.width,
2197
+ tileWidth: C,
2198
+ tileHeight: I,
2199
+ minLevel: Math.floor(de || 8),
2200
+ getTileUrl: (Y, ne, G) => {
2201
+ var Ge, Tt, xt, Lt;
2202
+ const Ae = Y, _e = {
2203
+ file: ((Ge = n.slide) == null ? void 0 : Ge.file) || "",
2204
+ x: ne,
2205
+ y: G,
2206
+ scale: "0",
2207
+ level: Y,
2208
+ channel: JSON.stringify(u.value)
2209
+ };
2210
+ d.value.fileNum === Y ? (Y = d.value.scanScale, _e.scale = Y.toFixed(6)) : (Y = d.value.scanScale / Math.pow(2, d.value.fileNum - Y), _e.scale = Y.toFixed(6)), _e.level = Ae, _e.file = l.value === 0 ? _e.file : ((xt = (Tt = n.slide) == null ? void 0 : Tt.children) == null ? void 0 : xt[l.value - 1]) || "";
2211
+ const fe = n.tileHandle(_e, n.slide);
2212
+ return (Lt = n.analysis) != null && Lt.hotmap_path ? Wt(fe, _e, ae) : fe;
2213
+ }
2214
+ };
2215
+ }
2216
+ function Xt() {
2217
+ i.value.viewer.addHandler("rotate", (C) => {
2218
+ s.value = C.degrees || 0;
2219
+ }), i.value.viewer.addHandler("zoom", (C) => {
2220
+ const I = i.value.viewer.viewport.viewportToImageZoom(
2221
+ C.zoom || 0
2222
+ ) * Number(i.value.$options.scale);
2223
+ r.value = Number(I.toFixed(2));
2224
+ }), i.value.$on(ve.events.EVENT_NAVIGATOR_VESTIGE, (C) => {
2225
+ n.navigatorHandle && n.navigatorHandle("add", n.slide, C);
2226
+ }), n.navigatorHandle && n.navigatorHandle("list", n.slide).then((C) => {
2227
+ var I, ae;
2228
+ (ae = (I = i.value.navigator) == null ? void 0 : I.drawPointList) == null || ae.call(I, C);
2229
+ }), oe(), ge();
2230
+ }
2231
+ function Jt() {
2232
+ var C;
2233
+ (C = i.value) != null && C.destroy && (i.value.destroy(), i.value = {}, d.value = {
2234
+ width: 0,
2235
+ height: 0,
2236
+ fileNum: 0,
2237
+ scanScale: 1,
2238
+ fileName: "",
2239
+ ratiomap: {}
2240
+ }, Yt.value = [], u.value = [], r.value = 0, s.value = 0, l.value = 0);
2241
+ }
2242
+ function _t(C, I) {
2243
+ C === "annotate" ? bt(I) : C === "info" ? z.value = !0 : C === "flip" ? kt() : C === "delete" ? jt("delete")(st.value) : g("tool", C, I);
2244
+ }
2245
+ function bt(C) {
2246
+ C.tool === "Voice" && (C.subType = "voice", C.tool = "Dot", C.custom = !0), C.tool === "Measure" && (C.subType = "measure", C.tool = "Line"), i.value.board.startDraw(C);
2247
+ }
2248
+ function Qt() {
2249
+ i.value.board.endDraw();
2250
+ }
2251
+ function kt() {
2252
+ i.value.viewer.viewport.toggleFlip();
2253
+ }
2254
+ function el(C) {
2255
+ var I, ae;
2256
+ (ae = (I = y.value) == null ? void 0 : I.scopeChange) == null || ae.call(I, C);
2257
+ }
2258
+ function tl() {
2259
+ z.value = !0;
2260
+ }
2261
+ function zt(C) {
2262
+ var I;
2263
+ (I = i.value) != null && I.grid && i.value.grid.updated(C);
2264
+ }
2265
+ function Ct(C) {
2266
+ var I;
2267
+ (I = i.value) != null && I.graduation && i.value.graduation.updated(C);
2268
+ }
2269
+ function $t(C) {
2270
+ var I;
2271
+ (I = i.value) != null && I.navigator && (i.value.navigator.element.style.display = C ? "flex" : "none");
2272
+ }
2273
+ function rt(C) {
2274
+ const I = i.value.viewer.viewport.imageToViewportZoom(Number(C / i.value.$options.scale));
2275
+ i.value.viewer.viewport.zoomTo(I);
2276
+ }
2277
+ function ut(C, I) {
2278
+ i.value.area && (i.value.area.moveToLabel(i.value.viewer.viewport.imageToViewportCoordinates(
2279
+ C.x + C.width / 2,
2280
+ C.y + C.height / 2
2281
+ )), rt(I));
2282
+ }
2283
+ return me("kfbView", i), me("currentLabel", st), o({
2284
+ kfbView: i,
2285
+ degrees: s,
2286
+ zoom: r,
2287
+ localLabelList: it,
2288
+ forceRedraw: K,
2289
+ toggleFlip: kt,
2290
+ startDraw: bt,
2291
+ endDraw: Qt,
2292
+ shotScreen: $e,
2293
+ info: tl,
2294
+ scopeChange: el,
2295
+ updateGrid: zt,
2296
+ updateGraduation: Ct,
2297
+ updateNavigator: $t,
2298
+ fastMove: ye,
2299
+ zoomTo: rt,
2300
+ jumpToLabel: ht,
2301
+ jumpToPosition: ut,
2302
+ reloadLabelList: Bt
2303
+ }), (C, I) => {
2304
+ var ae, de, Te;
2305
+ return _(), E("div", {
2306
+ ref_key: "mainKfbViewRef",
2307
+ ref: v,
2308
+ class: "hzzt-kfb-view"
2309
+ }, [
2310
+ C.slide.file ? De((_(), E("div", {
2311
+ key: 0,
2312
+ ref_key: "kfbViewMainRef",
2313
+ ref: w,
2314
+ class: "hzzt-kfb-view__main",
2315
+ "element-loading-text": e(f)("加载中"),
2316
+ "element-loading-background": "rgba(0, 0, 0, 0.8)"
2317
+ }, null, 8, No)), [
2318
+ [e(H), p.value]
2319
+ ]) : (_(), E("div", Fo, I[5] || (I[5] = [
2320
+ h("img", {
2321
+ style: { width: "50%" },
2322
+ src: nt
2323
+ }, null, -1)
2324
+ ]))),
2325
+ C.analysis && C.analysis.result ? (_(), A(e(Rt), {
2326
+ key: 2,
2327
+ class: "hzzt-kfb-view__tag",
2328
+ type: e(P).type
2329
+ }, {
2330
+ default: $(() => [
2331
+ Z(L(e(P).name), 1)
2332
+ ]),
2333
+ _: 1
2334
+ }, 8, ["type"])) : N("", !0),
2335
+ (_(), E("svg", Uo, [
2336
+ h("filter", Do, [
2337
+ h("feColorMatrix", {
2338
+ values: e(B),
2339
+ type: "matrix"
2340
+ }, null, 8, Bo),
2341
+ h("feColorMatrix", {
2342
+ values: e(j),
2343
+ type: "saturate"
2344
+ }, null, 8, jo),
2345
+ h("feComponentTransfer", null, [
2346
+ h("feFuncR", {
2347
+ id: "feFuncR",
2348
+ type: "gamma",
2349
+ exponent: e(F).ga,
2350
+ amplitude: "1",
2351
+ offset: "0"
2352
+ }, null, 8, Ko),
2353
+ h("feFuncG", {
2354
+ id: "feFuncG",
2355
+ type: "gamma",
2356
+ exponent: e(F).ga,
2357
+ amplitude: "1",
2358
+ offset: "0"
2359
+ }, null, 8, Oo),
2360
+ h("feFuncB", {
2361
+ id: "feFuncB",
2362
+ type: "gamma",
2363
+ exponent: e(F).ga,
2364
+ amplitude: "1",
2365
+ offset: "0"
2366
+ }, null, 8, Wo)
2367
+ ])
2368
+ ])
2369
+ ])),
2370
+ k(lo, {
2371
+ menus: C.menus,
2372
+ onTool: _t
2373
+ }, null, 8, ["menus"]),
2374
+ k(no, lt(C.microscope, {
2375
+ ref_key: "microscopeRef",
2376
+ ref: y
2377
+ }), null, 16),
2378
+ e(b) && C.slide.file && d.value.labelImg ? (_(), A(ho, {
2379
+ key: 3,
2380
+ visible: C.showLabel,
2381
+ info: d.value,
2382
+ slide: C.slide,
2383
+ pathologyHandle: C.pathologyHandle,
2384
+ onTool: _t
2385
+ }, null, 8, ["visible", "info", "slide", "pathologyHandle"])) : N("", !0),
2386
+ e(a) ? (_(), A(To, { key: 4 })) : N("", !0),
2387
+ (ae = C.slide.children) != null && ae.length ? (_(), A(Lo, {
2388
+ key: 5,
2389
+ modelValue: l.value,
2390
+ "onUpdate:modelValue": I[0] || (I[0] = (ee) => l.value = ee),
2391
+ slides: C.slide.children
2392
+ }, null, 8, ["modelValue", "slides"])) : N("", !0),
2393
+ (Te = (de = d.value) == null ? void 0 : de.channel) != null && Te.length ? (_(), A(So, {
2394
+ key: 6,
2395
+ modelValue: u.value,
2396
+ "onUpdate:modelValue": I[1] || (I[1] = (ee) => u.value = ee),
2397
+ info: d.value,
2398
+ onLoad: qt
2399
+ }, null, 8, ["modelValue", "info"])) : N("", !0),
2400
+ e(it).length ? (_(), A(Ao, {
2401
+ key: 7,
2402
+ expand: S.value,
2403
+ "onUpdate:expand": I[2] || (I[2] = (ee) => S.value = ee),
2404
+ style: te({
2405
+ top: C.analysis && C.analysis.result ? "24px" : "4px"
2406
+ }),
2407
+ annotation: e(st),
2408
+ annotations: e(it),
2409
+ onSelect: e(ht)
2410
+ }, null, 8, ["expand", "style", "annotation", "annotations", "onSelect"])) : N("", !0),
2411
+ k(e(ot), {
2412
+ modelValue: z.value,
2413
+ "onUpdate:modelValue": I[3] || (I[3] = (ee) => z.value = ee),
2414
+ "append-to-body": !0,
2415
+ title: e(f)("图像信息"),
2416
+ width: "700px",
2417
+ top: "5vh"
2418
+ }, {
2419
+ default: $(() => [
2420
+ k(e(dt), { "label-position": "left" }, {
2421
+ default: $(() => [
2422
+ k(e(ce), {
2423
+ class: "flex",
2424
+ "label-width": "0px"
2425
+ }, {
2426
+ default: $(() => [
2427
+ h("div", Go, [
2428
+ h("img", {
2429
+ src: d.value.labelImg,
2430
+ style: { height: "180px" }
2431
+ }, null, 8, Zo),
2432
+ h("img", {
2433
+ src: d.value.previewImg,
2434
+ style: { height: "180px" },
2435
+ class: "flex-1"
2436
+ }, null, 8, Yo)
2437
+ ])
2438
+ ]),
2439
+ _: 1
2440
+ }),
2441
+ k(e(ce), {
2442
+ label: e(f)("文件名")
2443
+ }, {
2444
+ default: $(() => [
2445
+ h("span", qo, L(d.value.fileName), 1)
2446
+ ]),
2447
+ _: 1
2448
+ }, 8, ["label"]),
2449
+ k(e(ce), {
2450
+ label: e(f)("图像像素")
2451
+ }, {
2452
+ default: $(() => [
2453
+ h("span", Xo, L(d.value.width) + "Pixel - " + L(d.value.height) + "Pixel", 1)
2454
+ ]),
2455
+ _: 1
2456
+ }, 8, ["label"]),
2457
+ k(e(ce), {
2458
+ label: e(f)("扫描倍率")
2459
+ }, {
2460
+ default: $(() => [
2461
+ h("span", Jo, L(d.value.scanScale), 1)
2462
+ ]),
2463
+ _: 1
2464
+ }, 8, ["label"]),
2465
+ k(e(ce), {
2466
+ label: e(f)("扫描时刻")
2467
+ }, {
2468
+ default: $(() => [
2469
+ h("span", Qo, L(d.value.scanTime), 1)
2470
+ ]),
2471
+ _: 1
2472
+ }, 8, ["label"]),
2473
+ k(e(ce), {
2474
+ label: e(f)("扫描时间")
2475
+ }, {
2476
+ default: $(() => [
2477
+ h("span", ea, L(d.value.scanDuration || 0) + "s", 1)
2478
+ ]),
2479
+ _: 1
2480
+ }, 8, ["label"]),
2481
+ d.value.ext ? (_(), A(e(ce), {
2482
+ key: 0,
2483
+ label: e(f)("扫描设备")
2484
+ }, {
2485
+ default: $(() => [
2486
+ h("span", ta, L(d.value.ext.machineNum || ""), 1)
2487
+ ]),
2488
+ _: 1
2489
+ }, 8, ["label"])) : N("", !0)
2490
+ ]),
2491
+ _: 1
2492
+ })
2493
+ ]),
2494
+ _: 1
2495
+ }, 8, ["modelValue", "title"]),
2496
+ k(e(ot), {
2497
+ modelValue: e(Ee),
2498
+ "onUpdate:modelValue": I[4] || (I[4] = (ee) => be(Ee) ? Ee.value = ee : null),
2499
+ "append-to-body": !0,
2500
+ title: e(f)("语音输入"),
2501
+ width: "500px",
2502
+ top: "5vh"
2503
+ }, {
2504
+ footer: $(() => [
2505
+ k(e(Me), { onClick: e(pt) }, {
2506
+ default: $(() => [
2507
+ Z(L(e(f)("取消")), 1)
2508
+ ]),
2509
+ _: 1
2510
+ }, 8, ["onClick"]),
2511
+ k(e(Me), {
2512
+ type: "primary",
2513
+ onClick: e(Ut)
2514
+ }, {
2515
+ default: $(() => [
2516
+ Z(L(e(f)("确定")), 1)
2517
+ ]),
2518
+ _: 1
2519
+ }, 8, ["onClick"])
2520
+ ]),
2521
+ default: $(() => [
2522
+ k(e(dt), { "label-position": "left" }, {
2523
+ default: $(() => {
2524
+ var ee;
2525
+ return [
2526
+ k(e(ce), null, {
2527
+ default: $(() => {
2528
+ var Y;
2529
+ return [
2530
+ (Y = e(Se)) != null && Y.src ? (_(), E("audio", {
2531
+ key: 0,
2532
+ class: "width-100%",
2533
+ src: e(Se).src,
2534
+ controls: "",
2535
+ preload: "auto"
2536
+ }, null, 8, la)) : N("", !0)
2537
+ ];
2538
+ }),
2539
+ _: 1
2540
+ }),
2541
+ (ee = e(Se)) != null && ee.src ? N("", !0) : (_(), A(e(ce), { key: 0 }, {
2542
+ default: $(() => [
2543
+ e(T) ? (_(), A(e(Me), {
2544
+ key: 1,
2545
+ type: "danger",
2546
+ onClick: e(W)
2547
+ }, {
2548
+ default: $(() => [
2549
+ Z(L(e(f)("结束录音")), 1)
2550
+ ]),
2551
+ _: 1
2552
+ }, 8, ["onClick"])) : (_(), A(e(Me), {
2553
+ key: 0,
2554
+ type: "primary",
2555
+ onClick: e(U)
2556
+ }, {
2557
+ default: $(() => [
2558
+ Z(L(e(f)("开始录音")), 1)
2559
+ ]),
2560
+ _: 1
2561
+ }, 8, ["onClick"])),
2562
+ e(T) ? (_(), E("span", oa, L(e(f)("录音时长")) + ":" + L(e(We)) + "s", 1)) : N("", !0)
2563
+ ]),
2564
+ _: 1
2565
+ }))
2566
+ ];
2567
+ }),
2568
+ _: 1
2569
+ })
2570
+ ]),
2571
+ _: 1
2572
+ }, 8, ["modelValue", "title"]),
2573
+ C.analysis && C.analysis.hotmap_path && C.analysis.hotmap_type !== "switch" ? (_(), E("div", {
2574
+ key: 8,
2575
+ class: "hzzt-kfb-view__hotmap",
2576
+ style: te({ left: e(Zt) + "px" })
2577
+ }, [
2578
+ k(e(Ce), {
2579
+ class: "icon-caret-left",
2580
+ size: "30",
2581
+ onMousedown: e(gt)
2582
+ }, {
2583
+ default: $(() => I[6] || (I[6] = [
2584
+ h("svg", {
2585
+ xmlns: "http://www.w3.org/2000/svg",
2586
+ viewBox: "0 0 1024 1024"
2587
+ }, [
2588
+ h("path", {
2589
+ fill: "currentColor",
2590
+ d: "M672 192 288 511.936 672 832z"
2591
+ })
2592
+ ], -1)
2593
+ ])),
2594
+ _: 1,
2595
+ __: [6]
2596
+ }, 8, ["onMousedown"]),
2597
+ k(e(Ce), {
2598
+ class: "icon-caret-right",
2599
+ size: "30",
2600
+ onMousedown: e(gt)
2601
+ }, {
2602
+ default: $(() => I[7] || (I[7] = [
2603
+ h("svg", {
2604
+ xmlns: "http://www.w3.org/2000/svg",
2605
+ viewBox: "0 0 1024 1024"
2606
+ }, [
2607
+ h("path", {
2608
+ fill: "currentColor",
2609
+ d: "M384 192v640l384-320.064z"
2610
+ })
2611
+ ], -1)
2612
+ ])),
2613
+ _: 1,
2614
+ __: [7]
2615
+ }, 8, ["onMousedown"])
2616
+ ], 4)) : N("", !0),
2617
+ e(x) ? (_(), E("div", aa)) : N("", !0),
2618
+ se(C.$slots, "default")
2619
+ ], 512);
2620
+ };
2621
+ }
2622
+ });
2623
+ function na(c, o) {
2624
+ var d;
2625
+ const t = Ie("default-open-ai", !!((d = c.ai) != null && d.default)), n = V(t.value), g = V(t.value), f = V([]), m = D(
2626
+ () => {
2627
+ var b, a, x, S;
2628
+ return (b = o.value) != null && b.analysis ? Object.prototype.toString.call((a = o.value) == null ? void 0 : a.analysis) === "[object Array]" ? (x = o.value) == null ? void 0 : x.analysis : [(S = o.value) == null ? void 0 : S.analysis] : [];
2629
+ }
2630
+ ), v = D(() => m.value.find((b) => (b == null ? void 0 : b.class) === "IQC")), w = D(() => !!v.value), y = D(() => m.value.find((b) => (b == null ? void 0 : b.class) !== "IQC")), z = D(() => !!y.value), i = D(() => n.value ? y.value : g.value ? v.value : void 0);
2631
+ ie(() => {
2632
+ var b;
2633
+ return (b = o == null ? void 0 : o.value) == null ? void 0 : b.id;
2634
+ }, () => {
2635
+ p(), s();
2636
+ }), Le(() => {
2637
+ p(), s();
2638
+ });
2639
+ function p() {
2640
+ z.value && n.value && (g.value = !1), w.value && g.value && (n.value = !1);
2641
+ }
2642
+ function s() {
2643
+ var b;
2644
+ (b = o.value) != null && b.id && m.value.length ? z.value && n.value || w.value && g.value ? r() : f.value = [] : f.value = [];
2645
+ }
2646
+ function r() {
2647
+ c.ai.handle(o.value, i.value).then((b) => {
2648
+ f.value = b;
2649
+ }).catch(() => {
2650
+ f.value = [];
2651
+ });
2652
+ }
2653
+ function l() {
2654
+ g.value = !1, s();
2655
+ }
2656
+ function u() {
2657
+ n.value = !1, s();
2658
+ }
2659
+ return {
2660
+ hasAi: z,
2661
+ hasIqc: w,
2662
+ currentAnalysis: i,
2663
+ aiLabelList: f,
2664
+ enableAi: n,
2665
+ enableIqc: g,
2666
+ toggleIqc: u,
2667
+ toggleAi: l
2668
+ };
2669
+ }
2670
+ var sa = /* @__PURE__ */ le({
2671
+ name: "Edit",
2672
+ __name: "edit",
2673
+ setup(c) {
2674
+ return (o, t) => (_(), E("svg", {
2675
+ xmlns: "http://www.w3.org/2000/svg",
2676
+ viewBox: "0 0 1024 1024"
2677
+ }, [
2678
+ h("path", {
2679
+ fill: "currentColor",
2680
+ d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
2681
+ }),
2682
+ h("path", {
2683
+ fill: "currentColor",
2684
+ d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
2685
+ })
2686
+ ]));
2687
+ }
2688
+ }), ia = sa, ra = /* @__PURE__ */ le({
2689
+ name: "View",
2690
+ __name: "view",
2691
+ setup(c) {
2692
+ return (o, t) => (_(), E("svg", {
2693
+ xmlns: "http://www.w3.org/2000/svg",
2694
+ viewBox: "0 0 1024 1024"
2695
+ }, [
2696
+ h("path", {
2697
+ fill: "currentColor",
2698
+ d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
2699
+ })
2700
+ ]));
2701
+ }
2702
+ }), ua = ra;
2703
+ const da = ["src", "fit"], ca = ["src", "fit"], et = /* @__PURE__ */ le({
2704
+ name: "KfbImage",
2705
+ __name: "KfbImage",
2706
+ props: {
2707
+ src: {
2708
+ type: String,
2709
+ required: !0,
2710
+ default: ""
2711
+ },
2712
+ fit: {
2713
+ type: String,
2714
+ validator: (c) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(c),
2715
+ default: ""
2716
+ },
2717
+ retryTimes: {
2718
+ type: Number,
2719
+ default: 0
2720
+ },
2721
+ load: {
2722
+ type: Function,
2723
+ default: () => ({})
2724
+ },
2725
+ hover: {
2726
+ type: Boolean,
2727
+ default: !1
2728
+ }
2729
+ },
2730
+ setup(c) {
2731
+ const o = c;
2732
+ let t = 0;
2733
+ const n = V(!1), g = mt({
2734
+ x: 0,
2735
+ y: 0
2736
+ }), f = D(() => ({
2737
+ top: `${g.y + 10}px`,
2738
+ left: `${g.x}px`,
2739
+ transform: "translateY(-50%)",
2740
+ width: `${4 * 300 / 3}px`,
2741
+ height: "300px",
2742
+ background: "rgba(0,0,0,0.8)",
2743
+ zIndex: "10000"
2744
+ }));
2745
+ function m(z) {
2746
+ const i = z.target;
2747
+ t < o.retryTimes ? (i.src = o.src, t++) : i.src = nt;
2748
+ }
2749
+ function v(z) {
2750
+ if (!o.hover) return;
2751
+ if (z.target) {
2752
+ const l = z.target, u = l.tagName;
2753
+ let d = "";
2754
+ if (l.tagName === "IMG" ? d = l.src || "" : u === "DIV" && (d = l.children[0].src || ""), d.indexOf(nt) > -1)
2755
+ return;
2756
+ }
2757
+ const { x: i, y: p } = w(z), s = 4 * 300 / 3, r = 300;
2758
+ g.x = Math.min(Math.max(i, s / 2), window.innerWidth - s / 2), g.y = Math.min(Math.max(p, r / 2), window.innerHeight - r / 2), n.value = !0;
2759
+ }
2760
+ function w(z) {
2761
+ const i = z.target, p = z.offsetX, s = z.offsetY, r = i.clientWidth, l = i.clientHeight;
2762
+ return {
2763
+ x: z.clientX + r - p,
2764
+ y: z.clientY - s + l / 2
2765
+ };
2766
+ }
2767
+ function y() {
2768
+ n.value = !1;
2769
+ }
2770
+ return (z, i) => (_(), E("div", {
2771
+ class: "relative",
2772
+ onMouseenter: v,
2773
+ onMouseleave: y
2774
+ }, [
2775
+ h("img", {
2776
+ src: c.src,
2777
+ fit: c.fit,
2778
+ onError: m,
2779
+ style: {
2780
+ height: "100%",
2781
+ width: "100%"
2782
+ }
2783
+ }, null, 40, da),
2784
+ (_(), A(tt, { to: "body" }, [
2785
+ n.value ? (_(), E("div", {
2786
+ key: 0,
2787
+ class: "fixed hzzt-kfb-img-triangle-left",
2788
+ style: te(f.value)
2789
+ }, [
2790
+ h("img", {
2791
+ src: c.src,
2792
+ fit: c.fit,
2793
+ style: {
2794
+ objectFit: "contain",
2795
+ height: "100%",
2796
+ width: "100%"
2797
+ },
2798
+ onMouseenter: i[0] || (i[0] = () => {
2799
+ n.value = !0;
2800
+ }),
2801
+ onMouseleave: y
2802
+ }, null, 40, ca)
2803
+ ], 4)) : N("", !0)
2804
+ ]))
2805
+ ], 32));
2806
+ }
2807
+ }), va = {}, fa = {
2808
+ xmlns: "http://www.w3.org/2000/svg",
2809
+ viewBox: "0 0 1024 1024"
2810
+ };
2811
+ function ma(c, o) {
2812
+ return _(), E("svg", fa, o[0] || (o[0] = [
2813
+ h("path", {
2814
+ fill: "currentColor",
2815
+ d: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"
2816
+ }, null, -1)
2817
+ ]));
2818
+ }
2819
+ const pa = /* @__PURE__ */ Ve(va, [["render", ma]]), ha = {}, ga = {
2820
+ width: "16",
2821
+ height: "16",
2822
+ viewBox: "0 0 16 16",
2823
+ fill: "none",
2824
+ xmlns: "http://www.w3.org/2000/svg"
2825
+ };
2826
+ function ya(c, o) {
2827
+ return _(), E("svg", ga, o[0] || (o[0] = [
2828
+ h("g", { id: "Frame" }, [
2829
+ h("path", {
2830
+ id: "Vector",
2831
+ d: "M5.33333 2.66659H14V3.99992H5.33333V2.66659ZM2 2.33325H4V4.33325H2V2.33325ZM2 6.99992H4V8.99992H2V6.99992ZM2 11.6666H4V13.6666H2V11.6666ZM5.33333 7.33325H14V8.66659H5.33333V7.33325ZM5.33333 11.9999H14V13.3333H5.33333V11.9999Z",
2832
+ fill: "currentColor",
2833
+ "fill-opacity": "0.9"
2834
+ })
2835
+ ], -1)
2836
+ ]));
2837
+ }
2838
+ const wa = /* @__PURE__ */ Ve(ha, [["render", ya]]), _a = { class: "hzzt-kfb-slides" }, ba = { class: "hzzt-kfb-slides__row" }, ka = { class: "hzzt-kfb-slides__top" }, za = {
2839
+ key: 0,
2840
+ class: "flex align-items-center"
2841
+ }, Ca = { class: "text-primary" }, $a = { key: 1 }, Ta = { class: "text-primary" }, xa = { class: "flex align-items-center" }, La = { key: 0 }, Va = ["data-index", "onClick"], Ea = { class: "hzzt-kfb-slides__gallery" }, Sa = ["onClick"], Ia = {
2842
+ key: 0,
2843
+ class: "hzzt-kfb-slides__read"
2844
+ }, Ma = ["onClick"], Pa = {
2845
+ key: 1,
2846
+ class: "flex column"
2847
+ }, Ha = { class: "hzzt-kfb-slides__header" }, Ra = { class: "w-30%" }, Aa = { class: "w-40%" }, Na = { class: "w-20%" }, Fa = ["data-index", "onClick"], Ua = { class: "w-30% flex" }, Da = { class: "hzzt-kfb-slides__gallery" }, Ba = {
2848
+ key: 1,
2849
+ class: "hzzt-kfb-slides__read"
2850
+ }, ja = { class: "w-40% flex" }, Ka = ["onClick"], Oa = ["onClick"], Wa = { class: "flex column py-2" }, Ga = { class: "flex align-items-center justify-content-center" }, Za = { class: "margin-r-1" }, Ya = { class: "margin-r-1 margin-l-2" }, qa = /* @__PURE__ */ le({
2851
+ __name: "KfbSlideList",
2852
+ props: {
2853
+ slides: {},
2854
+ editPathology: { type: Boolean },
2855
+ pathologyNumber: {}
2856
+ },
2857
+ emits: ["select", "tool"],
2858
+ setup(c, { expose: o, emit: t }) {
2859
+ const n = c, g = t, f = J("file-index", {
2860
+ value: 0
2861
+ }), m = J("divide", {
2862
+ value: !1
2863
+ }), v = J("sync", {
2864
+ value: !1
2865
+ }), w = V(!1), y = V(), z = D(() => n.slides.filter(({ read: d }) => d)), i = D(() => n.slides.filter(({ check: d }) => d)), { t: p } = he();
2866
+ function s(d) {
2867
+ f.value = d, g("select", d);
2868
+ }
2869
+ function r(d) {
2870
+ d.check = !d.check;
2871
+ }
2872
+ function l(d) {
2873
+ var a, x, S;
2874
+ const b = ((S = (x = (a = y.value.querySelector('[data-index="0"]')) == null ? void 0 : a.getBoundingClientRect) == null ? void 0 : x.call(a)) == null ? void 0 : S.y) || 0;
2875
+ y.value.scrollTop = y.value.querySelector(`[data-index="${d}"]`).getBoundingClientRect().y - b;
2876
+ }
2877
+ function u() {
2878
+ return i.value.length < 2 ? (ct.warning(p("至少选择2张切片")), !1) : !0;
2879
+ }
2880
+ return o({
2881
+ jumpToSlide: l
2882
+ }), (d, b) => (_(), E("div", _a, [
2883
+ h("div", ba, [
2884
+ h("div", ka, [
2885
+ d.editPathology ? (_(), E("div", za, [
2886
+ k(e(Ce), {
2887
+ class: "margin-r-2 pointer text-primary",
2888
+ size: "16",
2889
+ onClick: b[0] || (b[0] = (a) => g("tool", "edit-pathology"))
2890
+ }, {
2891
+ default: $(() => [
2892
+ k(e(ia))
2893
+ ]),
2894
+ _: 1
2895
+ }),
2896
+ h("span", Ca, L(d.pathologyNumber || e(p)("未知")) + "(" + L(z.value.length) + "/" + L(d.slides.length) + ")", 1)
2897
+ ])) : (_(), E("span", $a, [
2898
+ b[6] || (b[6] = Z("已读:")),
2899
+ h("span", Ta, L(z.value.length), 1),
2900
+ Z("/" + L(d.slides.length), 1)
2901
+ ])),
2902
+ h("div", xa, [
2903
+ d.editPathology ? (_(), A(e(Ce), {
2904
+ key: 0,
2905
+ class: "margin-r-2 pointer",
2906
+ size: "16",
2907
+ onClick: b[1] || (b[1] = (a) => g("tool", "view-all"))
2908
+ }, {
2909
+ default: $(() => [
2910
+ k(e(ua))
2911
+ ]),
2912
+ _: 1
2913
+ })) : N("", !0),
2914
+ k(e(Ce), {
2915
+ class: "margin-r-2 pointer",
2916
+ size: "16",
2917
+ color: w.value ? "#999" : "#000",
2918
+ onClick: b[2] || (b[2] = (a) => w.value = !w.value)
2919
+ }, {
2920
+ default: $(() => [
2921
+ k(pa)
2922
+ ]),
2923
+ _: 1
2924
+ }, 8, ["color"]),
2925
+ k(e(Ce), {
2926
+ class: "pointer",
2927
+ name: "cus-list",
2928
+ size: "16",
2929
+ color: w.value ? "#000" : "#999",
2930
+ onClick: b[3] || (b[3] = (a) => w.value = !w.value)
2931
+ }, {
2932
+ default: $(() => [
2933
+ k(wa)
2934
+ ]),
2935
+ _: 1
2936
+ }, 8, ["color"])
2937
+ ])
2938
+ ]),
2939
+ h("div", {
2940
+ class: "flex-1 overflow-auto",
2941
+ style: { width: "100%", padding: "0 8px" },
2942
+ ref_key: "slidesRef",
2943
+ ref: y
2944
+ }, [
2945
+ w.value ? (_(), E("ul", Pa, [
2946
+ h("li", Ha, [
2947
+ b[7] || (b[7] = h("div", { class: "w-10%" }, null, -1)),
2948
+ h("div", Ra, L(e(p)("缩略图")), 1),
2949
+ h("div", Aa, L(e(p)("切片名")), 1),
2950
+ h("div", Na, L(e(p)("评分")), 1)
2951
+ ]),
2952
+ (_(!0), E(re, null, ue(d.slides, (a, x) => (_(), E("li", {
2953
+ key: x,
2954
+ "data-index": x,
2955
+ class: "flex align-items-center overflow-hidden",
2956
+ style: te({
2957
+ backgroundColor: e(f) === x ? "rgba(6, 85, 195, 0.1)" : "#fff"
2958
+ }),
2959
+ onClick: (S) => s(x)
2960
+ }, [
2961
+ h("div", {
2962
+ class: "w-10% text-center",
2963
+ onClick: Qe(() => {
2964
+ }, ["stop"])
2965
+ }, [
2966
+ k(e(xe), {
2967
+ modelValue: a.check,
2968
+ "onUpdate:modelValue": (S) => a.check = S,
2969
+ style: { width: "14px", height: "16px" }
2970
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2971
+ ]),
2972
+ h("div", Ua, [
2973
+ h("div", Da, [
2974
+ a.labelImg ? (_(), A(et, {
2975
+ key: 0,
2976
+ style: te([{ transform: `rotate(${a.angle}deg)` }, { height: "45px" }]),
2977
+ "retry-times": 1,
2978
+ src: a.labelImg,
2979
+ fit: "cover",
2980
+ class: "flex-1"
2981
+ }, null, 8, ["style", "src"])) : N("", !0),
2982
+ k(et, {
2983
+ "retry-times": 1,
2984
+ fit: "cover",
2985
+ src: a.previewImg,
2986
+ style: { height: "45px" },
2987
+ class: "flex-1"
2988
+ }, null, 8, ["src"]),
2989
+ a.read ? N("", !0) : (_(), E("div", Ba, L(e(p)("未读")), 1))
2990
+ ])
2991
+ ]),
2992
+ h("div", ja, [
2993
+ k(e(Mt), {
2994
+ effect: "dark",
2995
+ placement: "bottom",
2996
+ content: `${a.name}`
2997
+ }, {
2998
+ default: $(() => [
2999
+ h("span", {
3000
+ style: { "line-height": "16px" },
3001
+ class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
3002
+ dir: "rtl",
3003
+ onClick: Qe((S) => r(a), ["stop"])
3004
+ }, L(a.name), 9, Ka)
3005
+ ]),
3006
+ _: 2
3007
+ }, 1032, ["content"])
3008
+ ]),
3009
+ h("div", {
3010
+ class: "w-20% flex text-center pointer",
3011
+ style: te({
3012
+ color: a.gradeColor
3013
+ }),
3014
+ onClick: (S) => g("tool", "grade", a)
3015
+ }, L(a.grade), 13, Oa)
3016
+ ], 12, Fa))), 128))
3017
+ ])) : (_(), E("div", La, [
3018
+ (_(!0), E(re, null, ue(d.slides, (a, x) => (_(), E("div", {
3019
+ key: x,
3020
+ class: He(["hzzt-kfb-slides__box", e(f) === x ? "hzzt-kfb-slides__box--active" : ""]),
3021
+ "data-index": x,
3022
+ onClick: (S) => s(x)
3023
+ }, [
3024
+ h("div", Ea, [
3025
+ a.labelImg ? (_(), A(et, {
3026
+ key: 0,
3027
+ style: te({ transform: `rotate(${a.angle}deg)` }),
3028
+ "retry-times": 1,
3029
+ src: a.labelImg,
3030
+ class: "hzzt-kfb-slides__img",
3031
+ fit: "cover",
3032
+ hover: ""
3033
+ }, null, 8, ["style", "src"])) : N("", !0),
3034
+ k(et, {
3035
+ "retry-times": 1,
3036
+ src: a.previewImg,
3037
+ class: "flex-1 hzzt-kfb-slides__img1",
3038
+ fit: "cover"
3039
+ }, null, 8, ["src"])
3040
+ ]),
3041
+ h("div", {
3042
+ class: "flex justify-content-between align-items-center",
3043
+ onClick: Qe(() => {
3044
+ }, ["stop"])
3045
+ }, [
3046
+ k(e(xe), {
3047
+ modelValue: a.check,
3048
+ "onUpdate:modelValue": (S) => a.check = S,
3049
+ style: { width: "14px", height: "16px" }
3050
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
3051
+ k(e(Mt), {
3052
+ effect: "dark",
3053
+ placement: "bottom",
3054
+ content: `${a.name}`
3055
+ }, {
3056
+ default: $(() => [
3057
+ h("span", {
3058
+ style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
3059
+ class: "margin-l-1 ellipsis",
3060
+ onClick: Qe((S) => r(a), ["stop"])
3061
+ }, L(a.name), 9, Sa)
3062
+ ]),
3063
+ _: 2
3064
+ }, 1032, ["content"])
3065
+ ]),
3066
+ a.read ? N("", !0) : (_(), E("div", Ia, L(e(p)("未读")), 1)),
3067
+ a.grade ? (_(), E("div", {
3068
+ key: 1,
3069
+ class: "hzzt-kfb-slides__grade",
3070
+ style: te({
3071
+ background: a.gradeColor
3072
+ }),
3073
+ onClick: (S) => g("tool", "grade", a)
3074
+ }, L(a.grade), 13, Ma)) : N("", !0),
3075
+ se(d.$slots, "slide", { slide: a }, void 0, !0)
3076
+ ], 10, Va))), 128))
3077
+ ]))
3078
+ ], 512),
3079
+ se(d.$slots, "footer", {}, void 0, !0),
3080
+ h("div", Wa, [
3081
+ h("div", Ga, [
3082
+ h("span", Za, L(e(p)("分屏")), 1),
3083
+ k(e(pe), {
3084
+ "before-change": u,
3085
+ modelValue: e(m),
3086
+ "onUpdate:modelValue": b[4] || (b[4] = (a) => be(m) ? m.value = a : null)
3087
+ }, null, 8, ["modelValue"]),
3088
+ h("span", Ya, L(e(p)("同步")), 1),
3089
+ k(e(pe), {
3090
+ disabled: !e(m),
3091
+ modelValue: e(v),
3092
+ "onUpdate:modelValue": b[5] || (b[5] = (a) => be(v) ? v.value = a : null)
3093
+ }, null, 8, ["disabled", "modelValue"])
3094
+ ])
3095
+ ])
3096
+ ])
3097
+ ]));
3098
+ }
3099
+ }), Xa = /* @__PURE__ */ Ve(qa, [["__scopeId", "data-v-622c6a9e"]]), Ja = { class: "hzzt-kfb-ai overflow-hidden" }, Qa = { class: "flex align-items-center margin-t-1" }, en = ["onClick"], tn = { style: { color: "var(--el-color-success)" } }, ln = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, on = ["onClick"], an = {
3100
+ key: 0,
3101
+ style: { "margin-left": "2px" }
3102
+ }, nn = /* @__PURE__ */ le({
3103
+ name: "KfbAiList",
3104
+ __name: "list",
3105
+ props: {
3106
+ data: { default: () => [] },
3107
+ analysis: {}
3108
+ },
3109
+ setup(c, { expose: o }) {
3110
+ const t = c, { t: n } = he(), g = J("kfbViewRef"), f = V(-1), m = V(1), v = V(100), w = V(!0), y = V([]), z = D(() => t.data.filter((S) => y.value.includes(S.cls || ""))), i = D(() => z.value.slice((m.value - 1) * v.value, m.value * v.value)), p = D(() => {
3111
+ const S = /* @__PURE__ */ new Set();
3112
+ return t.data.forEach((H) => {
3113
+ const P = H.cls || "";
3114
+ P && !S.has(P) && S.add(P);
3115
+ }), Array.from(S);
3116
+ }), s = D(() => y.value.length !== 0 && y.value.length !== p.value.length), r = Ft(t);
3117
+ ie(() => p.value, (S) => {
3118
+ l(), y.value = [...S];
3119
+ }), Le(() => {
3120
+ y.value = [...p.value];
3121
+ });
3122
+ function l() {
3123
+ f.value = -1, m.value = 1, v.value = 100, w.value = !0;
3124
+ }
3125
+ function u(S) {
3126
+ const H = z.value.findIndex((P) => P.id === S.id);
3127
+ f.value = H, g.value.jumpToLabel(S, 5);
3128
+ }
3129
+ function d(S) {
3130
+ const H = t.data.filter((P) => P.cls === S);
3131
+ return H.length ? `(${H.length})` : "";
3132
+ }
3133
+ function b() {
3134
+ f.value = -1, w.value = y.value.length == p.value.length;
3135
+ }
3136
+ function a(S) {
3137
+ y.value = S ? [...p.value] : [], f.value = -1;
3138
+ }
3139
+ function x(S, H) {
3140
+ S.stopPropagation(), S.preventDefault(), y.value = [H], b();
3141
+ }
3142
+ return o({
3143
+ labelList: z
3144
+ }), (S, H) => (_(), E("div", Ja, [
3145
+ h("div", Qa, [
3146
+ k(e(pl), {
3147
+ placement: "bottom",
3148
+ trigger: "click",
3149
+ width: "160"
3150
+ }, {
3151
+ reference: $(() => [
3152
+ k(e(Me), {
3153
+ class: "margin-r-1",
3154
+ type: "primary"
3155
+ }, {
3156
+ default: $(() => [
3157
+ Z(L(e(n)("分类")) + " ", 1),
3158
+ k(X, { name: "arrowDown" })
3159
+ ]),
3160
+ _: 1
3161
+ })
3162
+ ]),
3163
+ default: $(() => [
3164
+ h("div", null, [
3165
+ k(e(xe), {
3166
+ modelValue: w.value,
3167
+ "onUpdate:modelValue": H[0] || (H[0] = (P) => w.value = P),
3168
+ indeterminate: s.value,
3169
+ onChange: a
3170
+ }, {
3171
+ default: $(() => [
3172
+ Z(L(e(n)("全选")), 1)
3173
+ ]),
3174
+ _: 1
3175
+ }, 8, ["modelValue", "indeterminate"]),
3176
+ k(e(hl), {
3177
+ modelValue: y.value,
3178
+ "onUpdate:modelValue": H[1] || (H[1] = (P) => y.value = P),
3179
+ class: "flex column",
3180
+ onChange: b
3181
+ }, {
3182
+ default: $(() => [
3183
+ (_(!0), E(re, null, ue(p.value, (P) => (_(), A(e(xe), {
3184
+ key: P,
3185
+ value: P
3186
+ }, {
3187
+ default: $(() => [
3188
+ h("p", {
3189
+ onClick: (O) => x(O, P)
3190
+ }, [
3191
+ Z(L(P), 1),
3192
+ h("span", tn, L(d(P)), 1)
3193
+ ], 8, en)
3194
+ ]),
3195
+ _: 2
3196
+ }, 1032, ["value"]))), 128))
3197
+ ]),
3198
+ _: 1
3199
+ }, 8, ["modelValue"])
3200
+ ])
3201
+ ]),
3202
+ _: 1
3203
+ }),
3204
+ k(e(Rt), {
3205
+ type: e(r).type,
3206
+ class: "margin-l-1"
3207
+ }, {
3208
+ default: $(() => [
3209
+ Z(L(e(r).name), 1)
3210
+ ]),
3211
+ _: 1
3212
+ }, 8, ["type"])
3213
+ ]),
3214
+ se(S.$slots, "default", { analysis: S.analysis }),
3215
+ h("div", ln, [
3216
+ (_(!0), E(re, null, ue(i.value, (P, O) => (_(), E("div", {
3217
+ key: O + (m.value - 1) * v.value,
3218
+ class: He(`hzzt-kfb-ai__img ${f.value === O + (m.value - 1) * v.value ? "hzzt-kfb-ai__img--active" : ""}`),
3219
+ onClick: (F) => u(P)
3220
+ }, [
3221
+ k(e(yl), {
3222
+ "retry-times": 1,
3223
+ src: P.imageUrl,
3224
+ "error-src": e(nt)
3225
+ }, null, 8, ["src", "error-src"]),
3226
+ h("div", {
3227
+ style: te({ color: P.strokeStyle }),
3228
+ class: "ellipsis"
3229
+ }, [
3230
+ Z(L(P.cls) + " ", 1),
3231
+ P.score ? (_(), E("span", an, L(P.score), 1)) : N("", !0)
3232
+ ], 4)
3233
+ ], 10, on))), 128))
3234
+ ]),
3235
+ k(e(gl), {
3236
+ class: "wrap",
3237
+ "current-page": m.value,
3238
+ "onUpdate:currentPage": H[2] || (H[2] = (P) => m.value = P),
3239
+ "page-size": v.value,
3240
+ "onUpdate:pageSize": H[3] || (H[3] = (P) => v.value = P),
3241
+ "page-sizes": [100, 200, 300, 400],
3242
+ layout: "total, sizes, prev, pager, next",
3243
+ total: z.value.length
3244
+ }, null, 8, ["current-page", "page-size", "total"])
3245
+ ]));
3246
+ }
3247
+ }), sn = { class: "hzzt-kfb-slide" }, rn = { class: "flex flex-1 overflow-hidden" }, un = { class: "flex flex-1" }, dn = {
3248
+ key: 0,
3249
+ style: { height: "100%", width: "100%" },
3250
+ class: "flex wrap"
3251
+ }, cn = ["onClick"], ft = /* @__PURE__ */ le({
3252
+ name: "HzztKfbSlide",
3253
+ __name: "HzztKfbSlide",
3254
+ props: /* @__PURE__ */ Pe({
3255
+ menus: { default: () => [] },
3256
+ kfb: {},
3257
+ slides: { default: () => [] },
3258
+ ai: {},
3259
+ teleport: { type: Boolean, default: !1 },
3260
+ watermark: {},
3261
+ process: {},
3262
+ microscope: {},
3263
+ showList: { type: Boolean, default: !0 },
3264
+ showKfbLabel: { type: Boolean, default: !0 },
3265
+ showKeyboard: { type: Boolean, default: !1 },
3266
+ showMenuText: { type: Boolean, default: !0 },
3267
+ showWatermark: { type: Boolean, default: !1 },
3268
+ showZrender: { type: Boolean, default: !1 },
3269
+ editPathology: { type: Boolean, default: !1 },
3270
+ pathologyNumber: {}
3271
+ }, {
3272
+ index: {
3273
+ default: 0
3274
+ },
3275
+ indexModifiers: {}
3276
+ }),
3277
+ emits: /* @__PURE__ */ Pe(["tool"], ["update:index"]),
3278
+ setup(c, { expose: o, emit: t }) {
3279
+ const n = c, g = t, f = Je(c, "index"), m = D(() => n.slides[f.value]), v = D(() => n.slides.filter(({ check: T }) => T)), w = V(), y = V(), z = V(), i = V(), p = Ie("kfb-showKeyboard", n.showKeyboard), s = Ie("kfb-showKfbLabel", n.showKfbLabel), r = Ie("kfb-showWatermark", n.showWatermark), l = Ie("kfb-showMenuText", n.showMenuText), u = Ie(
3280
+ "kfb-menuConfigOtherSetting",
3281
+ {
3282
+ screenshotLocally: !1,
3283
+ screenshotFormat: "image/jpeg",
3284
+ screenshotWatermark: { time: !1, mac: !1, scale: !1, ratio: !1 },
3285
+ screenshotSize: { w: 200, h: 200 }
3286
+ }
3287
+ ).value, d = V(!1), b = V(!1), { t: a } = he(), x = D(() => {
3288
+ var T;
3289
+ if (d.value) {
3290
+ const U = v.value.findIndex(({ id: W }) => {
3291
+ var we;
3292
+ return W === ((we = m.value) == null ? void 0 : we.id);
3293
+ });
3294
+ return ((T = z.value) == null ? void 0 : T[U]) || y.value;
3295
+ } else
3296
+ return y.value;
3297
+ }), S = D(() => v.value.length <= 1 ? {
3298
+ height: "100%",
3299
+ width: "100%"
3300
+ } : v.value.length <= 2 ? {
3301
+ height: "100%",
3302
+ width: "calc((100% - 4px) / 2)"
3303
+ } : v.value.length <= 4 ? {
3304
+ height: "calc((100% - 4px) / 2)",
3305
+ width: "calc((100% - 4px) / 2)"
3306
+ } : v.value.length <= 6 ? {
3307
+ height: "calc((100% - 4px) / 2)",
3308
+ width: "calc((100% - 4px * 2) / 3)"
3309
+ } : v.value.length <= 9 ? {
3310
+ height: "calc((100% - 4px * 2) / 3)",
3311
+ width: "calc((100% - 4px * 2) / 3)"
3312
+ } : {
3313
+ height: "100%",
3314
+ width: "100%"
3315
+ });
3316
+ ie(() => v.value, (T) => {
3317
+ d.value && T.length <= 1 && (d.value = !1);
3318
+ }), ie(() => m.value, (T) => {
3319
+ if (T) {
3320
+ const U = T.read;
3321
+ T.read = !0, g("tool", "choose", {
3322
+ slide: T,
3323
+ read: U
3324
+ });
3325
+ }
3326
+ }), Object.entries({
3327
+ keyboard: p,
3328
+ kfbLabel: s,
3329
+ watermark: r,
3330
+ menuText: l
3331
+ }).forEach(([T, U]) => {
3332
+ ie(() => U.value, (W) => {
3333
+ g("tool", T, W);
3334
+ });
3335
+ });
3336
+ const {
3337
+ hasAi: P,
3338
+ hasIqc: O,
3339
+ currentAnalysis: F,
3340
+ aiLabelList: B,
3341
+ enableAi: j,
3342
+ enableIqc: K,
3343
+ toggleIqc: oe,
3344
+ toggleAi: $e
3345
+ } = na(n, m);
3346
+ function ge(T, U) {
3347
+ if (T === "next" && n.slides[f.value + 1] && f.value++, T === "prev" && n.slides[f.value - 1] && f.value--, (T === "label" || T === "tool") && (s.value = U), T.includes("tailor")) {
3348
+ x.value.shotScreen(T, z);
3349
+ return;
3350
+ }
3351
+ g("tool", T, U);
3352
+ }
3353
+ function ye(T) {
3354
+ var W, we;
3355
+ const U = ke(Q({}, n.kfb), {
3356
+ showZrender: n.showZrender,
3357
+ watermark: n.watermark,
3358
+ process: n.process,
3359
+ microscope: n.microscope,
3360
+ slide: T,
3361
+ aiLabelList: m.value.id === T.id ? ((W = i.value) == null ? void 0 : W.labelList) || [] : [],
3362
+ syncPosition: b.value,
3363
+ syncZoom: b.value,
3364
+ handle: void 0,
3365
+ analysis: m.value.id === T.id ? F.value : void 0
3366
+ });
3367
+ return (we = n.kfb) != null && we.handle ? n.kfb.handle(T, U) : U;
3368
+ }
3369
+ function Re(T) {
3370
+ f.value = n.slides.findIndex((U) => U.id === T.id);
3371
+ }
3372
+ function Ke(T) {
3373
+ d.value && (n.slides[T].check = !0);
3374
+ }
3375
+ function Ee() {
3376
+ var T;
3377
+ (T = d.value ? z.value : [y.value]) == null || T.forEach((U) => {
3378
+ s.value || (U.updateGrid({
3379
+ show: s.value,
3380
+ ruler: s.value
3381
+ }), p.value = s.value), U.updateGraduation({
3382
+ show: s.value
3383
+ }), U.updateNavigator(s.value);
3384
+ });
3385
+ }
3386
+ function Se(T) {
3387
+ f.value = T, w.value && w.value.jumpToSlide(T);
3388
+ }
3389
+ function Oe(T, U) {
3390
+ x.value && x.value.jumpToLabel(T, U);
3391
+ }
3392
+ function We(T, U) {
3393
+ x.value && x.value.jumpToPosition(T, U);
3394
+ }
3395
+ return me("kfbViewRef", x), me("show-keyboard", p), me("show-kfb-label", s), me("show-menu-text", l), me("show-watermark", r), me("file-index", f), me("divide", d), me("sync", b), me("menu-config-other-setting", u), o({
3396
+ divide: d,
3397
+ slide: m,
3398
+ kfbViewRef: x,
3399
+ jumpToSlide: Se,
3400
+ jumpToLabel: Oe,
3401
+ jumpToPosition: We,
3402
+ analysis: F,
3403
+ enableAi: j,
3404
+ enableIqc: K,
3405
+ showAiList: D(() => {
3406
+ var T;
3407
+ return !!((T = n.ai) != null && T.enable) && B.value.length;
3408
+ })
3409
+ }), (T, U) => (_(), E("div", sn, [
3410
+ T.menus.length ? (_(), A(at, {
3411
+ key: 0,
3412
+ menu: T.menus,
3413
+ divideMode: d.value,
3414
+ process: T.process,
3415
+ microscope: T.microscope,
3416
+ onTool: ge
3417
+ }, {
3418
+ left: $(() => [
3419
+ se(T.$slots, "left")
3420
+ ]),
3421
+ right: $(() => [
3422
+ k(e(pe), {
3423
+ modelValue: e(s),
3424
+ "onUpdate:modelValue": U[0] || (U[0] = (W) => be(s) ? s.value = W : null),
3425
+ "active-text": e(a)("隐藏标签"),
3426
+ "active-value": !1,
3427
+ "inactive-value": !0,
3428
+ class: "margin-r-2",
3429
+ onChange: Ee
3430
+ }, null, 8, ["modelValue", "active-text"]),
3431
+ T.ai && T.ai.enable && e(O) ? (_(), A(e(pe), {
3432
+ key: 0,
3433
+ modelValue: e(K),
3434
+ "onUpdate:modelValue": U[1] || (U[1] = (W) => be(K) ? K.value = W : null),
3435
+ "active-text": e(a)("AI质控"),
3436
+ class: "margin-r-2",
3437
+ onChange: e(oe)
3438
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : N("", !0),
3439
+ T.ai && T.ai.enable && e(P) ? (_(), A(e(pe), {
3440
+ key: 1,
3441
+ modelValue: e(j),
3442
+ "onUpdate:modelValue": U[2] || (U[2] = (W) => be(j) ? j.value = W : null),
3443
+ "active-text": e(a)("AI分析"),
3444
+ class: "margin-r-2",
3445
+ onChange: e($e)
3446
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : N("", !0),
3447
+ se(T.$slots, "right")
3448
+ ]),
3449
+ _: 3
3450
+ }, 8, ["menu", "divideMode", "process", "microscope"])) : N("", !0),
3451
+ h("div", rn, [
3452
+ T.showList ? (_(), A(tt, {
3453
+ key: 0,
3454
+ defer: "",
3455
+ to: "#kfb-slide-list",
3456
+ disabled: !T.teleport
3457
+ }, [
3458
+ k(Xa, {
3459
+ ref_key: "slidesRef",
3460
+ ref: w,
3461
+ style: te(T.teleport ? "" : "width: 250px"),
3462
+ editPathology: T.editPathology,
3463
+ pathologyNumber: T.pathologyNumber,
3464
+ slides: T.slides,
3465
+ onSelect: Ke,
3466
+ onTool: ge
3467
+ }, {
3468
+ slide: $(({ slide: W }) => [
3469
+ se(T.$slots, "list", { slide: W })
3470
+ ]),
3471
+ footer: $(() => [
3472
+ se(T.$slots, "listFooter")
3473
+ ]),
3474
+ _: 3
3475
+ }, 8, ["style", "editPathology", "pathologyNumber", "slides"])
3476
+ ], 8, ["disabled"])) : N("", !0),
3477
+ (_(), A(tt, {
3478
+ defer: "",
3479
+ to: "#kfb-slide-view",
3480
+ disabled: !T.teleport
3481
+ }, [
3482
+ h("div", un, [
3483
+ v.value.length && d.value ? (_(), E("ul", dn, [
3484
+ (_(!0), E(re, null, ue(v.value, (W, we) => (_(), E("li", {
3485
+ key: we,
3486
+ style: te(S.value),
3487
+ class: He(m.value.id === W.id ? "hzzt-kfb-view-screen-active" : ""),
3488
+ onClick: (pt) => Re(W)
3489
+ }, [
3490
+ (_(), A(Xe, lt({
3491
+ ref_for: !0,
3492
+ ref_key: "kfbViewRefs",
3493
+ ref: z,
3494
+ key: `kfb-${we}`
3495
+ }, { ref_for: !0 }, ye(W), { onTool: ge }), {
3496
+ default: $(() => [
3497
+ se(T.$slots, "kfb", { slide: W })
3498
+ ]),
3499
+ _: 2
3500
+ }, 1040))
3501
+ ], 14, cn))), 128))
3502
+ ])) : m.value ? (_(), A(Xe, lt({
3503
+ key: 1,
3504
+ ref_key: "kfbViewRef",
3505
+ ref: y
3506
+ }, ye(m.value), { onTool: ge }), {
3507
+ default: $(() => [
3508
+ se(T.$slots, "kfb", { slide: m.value })
3509
+ ]),
3510
+ _: 3
3511
+ }, 16)) : N("", !0)
3512
+ ])
3513
+ ], 8, ["disabled"])),
3514
+ T.ai && T.ai.enable && e(B).length ? (_(), A(tt, {
3515
+ key: 1,
3516
+ defer: "",
3517
+ to: "#kfb-slide-ai",
3518
+ disabled: !T.teleport
3519
+ }, [
3520
+ k(nn, {
3521
+ style: te(T.teleport ? "" : "width: 350px"),
3522
+ ref_key: "kfbAiRef",
3523
+ ref: i,
3524
+ data: e(B),
3525
+ slide: m.value,
3526
+ analysis: e(F)
3527
+ }, {
3528
+ default: $(({ analysis: W }) => [
3529
+ se(T.$slots, "analysis", { analysis: W })
3530
+ ]),
3531
+ _: 3
3532
+ }, 8, ["style", "data", "slide", "analysis"])
3533
+ ], 8, ["disabled"])) : N("", !0),
3534
+ se(T.$slots, "default")
3535
+ ])
3536
+ ]));
3537
+ }
3538
+ });
3539
+ ft.name = "HzztKfbSlide";
3540
+ Xe.name = "HzztKfbView";
3541
+ at.name = "HzztKfbToolbox";
3542
+ const vn = (c, o) => {
3543
+ c.use(wl, o == null ? void 0 : o.i18n), c.component(ft.name, ft), c.component(Xe.name, Xe), c.component(at.name, at);
3544
+ }, _n = {
3545
+ install: vn
3546
+ };
3547
+ export {
3548
+ Nt as D,
3549
+ At as I,
3550
+ Ve as _,
3551
+ X as a,
3552
+ vt as b,
3553
+ ft as c,
3554
+ Xe as d,
3555
+ at as e,
3556
+ _n as i,
3557
+ he as u
3558
+ };