hzzt-kfb-slide 0.1.1 → 0.1.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 (129) hide show
  1. package/dist/components/{annotateDa-PLWsY.js → annotateCMJGbBLj.js} +1 -1
  2. package/dist/components/{annotateCLaAaHN_.js → annotateCgNFZFGe.js} +1 -1
  3. package/dist/components/{annotateB3lFxMEo.js → annotateDJFMTHXi.js} +3 -3
  4. package/dist/components/{annotateB8zoDimf.js → annotatejOG4ozNZ.js} +1 -1
  5. package/dist/components/{arrowDjWPvUqv.js → arrowBD2-xgIB.js} +1 -1
  6. package/dist/components/{arrowCircleCiliVlpQ.js → arrowCircleCAfdy8wW.js} +1 -1
  7. package/dist/components/{arrowCircleD-pOtQNL.js → arrowCircleCf_nzJuW.js} +1 -1
  8. package/dist/components/{arrowCmICz6PS.js → arrowD30w6-6J.js} +1 -1
  9. package/dist/components/{arrowDownCLuKnhgC.js → arrowDownDbjXJahP.js} +1 -1
  10. package/dist/components/{arrowDownBiQp1p0i.js → arrowDownmXw2RWeL.js} +1 -1
  11. package/dist/components/{arrowLeftCBSwbPg8.js → arrowLeftBwpF3loy.js} +1 -1
  12. package/dist/components/{arrowLeftC5Xn0ZKF.js → arrowLeftRbPGsfKL.js} +1 -1
  13. package/dist/components/{arrowRightC-gQEqoF.js → arrowRightBwD1sc8e.js} +1 -1
  14. package/dist/components/{arrowRightDxs4lV9Z.js → arrowRightD3iq1e3c.js} +1 -1
  15. package/dist/components/{arrowUpBfRL3fhE.js → arrowUpB1vQJOJG.js} +1 -1
  16. package/dist/components/{arrowUpCs2jBl9R.js → arrowUpB5adayIQ.js} +1 -1
  17. package/dist/components/{bilateral1NHhlA6z.js → bilateralBKbIltDO.js} +1 -1
  18. package/dist/components/{bilateralxnj69N0V.js → bilateralBV_xkHx0.js} +1 -1
  19. package/dist/components/{channelChBho3_o.js → channelB1SrYJDW.js} +1 -1
  20. package/dist/components/{channelD9KcPJ4H.js → channelH1BojppK.js} +1 -1
  21. package/dist/components/{checkDJiCkpCP.js → checkBD6gH0q_.js} +1 -1
  22. package/dist/components/{checkPjfQU2X-.js → checkBY8nYbfd.js} +1 -1
  23. package/dist/components/{configBoVZz6t_.js → configBcEj_8AB.js} +1 -1
  24. package/dist/components/{configBVvJPXEW.js → configCLkyNyEP.js} +1 -1
  25. package/dist/components/{customCuFCEEmf.js → customBdoSDhjH.js} +1 -1
  26. package/dist/components/{customBqUoJeja.js → customDNmdytIO.js} +1 -1
  27. package/dist/components/{deleteBK4VaII7.js → deleteCCGds9UX.js} +1 -1
  28. package/dist/components/{deleteBbL8JyJH.js → deleteDG___Ydm.js} +1 -1
  29. package/dist/components/{dotCZFwvsGJ.js → dotBWzkPfEe.js} +4 -4
  30. package/dist/components/{dotCZmc5XHw.js → dotCAK1gSEZ.js} +1 -1
  31. package/dist/components/{dotDf3m-ZtS.js → dotCog1e5Lr.js} +1 -1
  32. package/dist/components/{dotDdB7hEiU.js → dotDUHWjeT6.js} +1 -1
  33. package/dist/components/{dotD0RUyAOF.js → dotDeD0p4h3.js} +1 -1
  34. package/dist/components/{dotC3ho5Naw.js → dotDhfq1ngT.js} +1 -1
  35. package/dist/components/{downloadC9SBQxWS.js → downloadBZfVn0zc.js} +1 -1
  36. package/dist/components/{downloadBPbhAwsC.js → downloadBd_Cujel.js} +1 -1
  37. package/dist/components/{downloadi5H6HjoE.js → downloadBmt1pNrx.js} +1 -1
  38. package/dist/components/{downloadGVNhdAbp.js → downloadD849T2y9.js} +3 -3
  39. package/dist/components/{ellipseBBwG5L6y.js → ellipseDQW2p8r2.js} +1 -1
  40. package/dist/components/{ellipseGq_BKpIA.js → ellipsei0WMn5o1.js} +1 -1
  41. package/dist/components/{expandLeftCWohfvHq.js → expandLeftBv_okPlY.js} +1 -1
  42. package/dist/components/{expandLeftBVBh6iI1.js → expandLeftDmUFkh2d.js} +1 -1
  43. package/dist/components/{expandRight-KeLeoCw.js → expandRightBsKPjotO.js} +1 -1
  44. package/dist/components/{expandRightCuU0Ktmj.js → expandRightDs1uCp6s.js} +1 -1
  45. package/dist/components/{flagDNqPx5NT.js → flagBKJwm8DA.js} +1 -1
  46. package/dist/components/{flagCNdHcaOr.js → flagC4kAWLMv.js} +1 -1
  47. package/dist/components/{flipBJRiEs27.js → flipDVfGi2qG.js} +1 -1
  48. package/dist/components/{flip2i6pDnun.js → fliprd-6cbtm.js} +1 -1
  49. package/dist/components/{fontCsdG88OT.js → fontBhLyULEE.js} +1 -1
  50. package/dist/components/{fontBvWU1Zty.js → fontPyP8n1pb.js} +1 -1
  51. package/dist/components/{fullscreenCfE6L14I.js → fullscreenBT9qKvk2.js} +1 -1
  52. package/dist/components/{fullscreenilcy7g6R.js → fullscreenBjnoUXEr.js} +2 -2
  53. package/dist/components/{fullscreenkPWhn6hX.js → fullscreenC0sJWM1b.js} +1 -1
  54. package/dist/components/{fullscreenB7VOC9nF.js → fullscreenDGVwmkgF.js} +1 -1
  55. package/dist/components/index3jvwVv4H.js +4 -0
  56. package/dist/components/indexCNC1g25E.js +3092 -0
  57. package/dist/components/{infoDD1pEfcw.js → infoDHGaQ92c.js} +1 -1
  58. package/dist/components/{infoBKGJei_W.js → infoDniQzKU5.js} +1 -1
  59. package/dist/components/{levelCkmf3f6J.js → levelCWEo4E8o.js} +1 -1
  60. package/dist/components/{level0LJ8aEMv.js → levelDged-DD8.js} +1 -1
  61. package/dist/components/lineBNwqZbqu.js +11 -0
  62. package/dist/components/{lineCFav17ki.js → lineCAnsgtDB.js} +1 -1
  63. package/dist/components/linej48TZYKp.js +1 -0
  64. package/dist/components/{linerlsB9JL7.js → linenA1Sbb0z.js} +1 -1
  65. package/dist/components/{microscopeCq6kF8bY.js → microscopeCXgA1RNg.js} +1 -1
  66. package/dist/components/{microscopeCLmgCovH.js → microscopeDxei39qJ.js} +3 -3
  67. package/dist/components/{microscopeBBz0yD7E.js → microscopeI_67Zvi_.js} +1 -1
  68. package/dist/components/{microscopeCgg0Ym67.js → microscopeM3B9tem3.js} +1 -1
  69. package/dist/components/{moveB41ZcoNK.js → moveB-6xS2dU.js} +1 -1
  70. package/dist/components/{moveBGpoQ1-D.js → moveB0MjN8ns.js} +3 -3
  71. package/dist/components/{moveB8_22tie.js → moveCyESuupp.js} +1 -1
  72. package/dist/components/{moveCkVAoMeQ.js → moveDWuEFnzY.js} +1 -1
  73. package/dist/components/{nextDRedCGZe.js → nextBP6jYEfR.js} +1 -1
  74. package/dist/components/{nextD5Z4bZnT.js → nextCmL8I293.js} +1 -1
  75. package/dist/components/{polygonCp9oWQ3l.js → polygonDAJzvnQG.js} +1 -1
  76. package/dist/components/{polygongm9CHAwB.js → polygondICyAF92.js} +1 -1
  77. package/dist/components/{prevgL7_Qz0_.js → prevDADkZRjt.js} +1 -1
  78. package/dist/components/{prevCPX6EC1A.js → prevGutMlHdh.js} +1 -1
  79. package/dist/components/{processDgdAEClC.js → processBJa4jfKx.js} +1 -1
  80. package/dist/components/{processMgvhvblB.js → processD6VCGhpy.js} +1 -1
  81. package/dist/components/{processBAq39ThA.js → processD8Wa4hOW.js} +1 -1
  82. package/dist/components/{processnL7rVPu0.js → processDprLKUHQ.js} +3 -3
  83. package/dist/components/{rectangleqZeguu3p.js → rectangleC08rVGjN.js} +1 -1
  84. package/dist/components/{rectangleDDWXtsEU.js → rectangleDUCBCBPE.js} +1 -1
  85. package/dist/components/{rotateb49G-Q8z.js → rotateB4aIQveS.js} +1 -1
  86. package/dist/components/{rotateCEBfde_V.js → rotateB7TupsDC.js} +4 -4
  87. package/dist/components/{rotate7bzyW-OB.js → rotateCiAoG6uz.js} +1 -1
  88. package/dist/components/{rotateCUUn3DGL.js → rotateDcAKg0Ly.js} +1 -1
  89. package/dist/components/{settingB3EwckOT.js → settingBo2jK0Dr.js} +1 -1
  90. package/dist/components/{settingh3PMi-mk.js → settingC52gqdUZ.js} +1 -1
  91. package/dist/components/{settingDFygEEDe.js → settingCPRrk8ML.js} +1 -1
  92. package/dist/components/{settingDWDMPbdO.js → settingC_K-RcOZ.js} +3 -3
  93. package/dist/components/{starBXSy-NoI.js → starCWnNtX4T.js} +1 -1
  94. package/dist/components/{starCx7mYpn2.js → starD4ECjoeD.js} +1 -1
  95. package/dist/components/{tailorBzcPtJBg.js → tailorB4WI6Umx.js} +1 -1
  96. package/dist/components/{tailorCvYJnrbK.js → tailormZu5rnh-.js} +1 -1
  97. package/dist/components/useCommonBTTzsGT6.js +1 -0
  98. package/dist/components/{useCommonBT6Pfwp3.js → useCommoncwGp0w86.js} +2 -2
  99. package/dist/components/{voiceDJghWoc3.js → voiceCE58JuHB.js} +1 -1
  100. package/dist/components/{voiceCCipOfTa.js → voiceCykEd0Hn.js} +1 -1
  101. package/dist/components/{zoomDePdFm9E.js → zoomDT5Z2mH5.js} +1 -1
  102. package/dist/components/{zoomqK-uW5RK.js → zoomDoOddf7F.js} +1 -1
  103. package/dist/components/{zoomInDzq-DbIa.js → zoomInCQ1hHcFV.js} +1 -1
  104. package/dist/components/{zoomInC4xFE1uN.js → zoomInDIq1CbWp.js} +1 -1
  105. package/dist/components/{zoomOutDnt66Lz5.js → zoomOutDMbifalR.js} +1 -1
  106. package/dist/components/{zoomOutBQz07s5R.js → zoomOutvL8Qk5cc.js} +1 -1
  107. package/dist/index.cjs.js +1 -1
  108. package/dist/index.css +1 -1
  109. package/dist/index.es.js +2 -1
  110. package/package.json +8 -4
  111. package/types/{index.vue.d.ts → components/HzztKfbSlide.vue.d.ts} +3 -2
  112. package/types/components/KfbImage.vue.d.ts +1 -1
  113. package/types/components/KfbToolConfig.vue.d.ts +0 -3
  114. package/types/components/KfbView/index.d.ts +8 -9
  115. package/types/components/KfbView/useHotmap.d.ts +3 -3
  116. package/types/components/ai/list.vue.d.ts +2 -3
  117. package/types/components/ai/useAi.d.ts +4 -2
  118. package/types/components/ai/useAiResult.d.ts +2 -2
  119. package/types/components/icon/zoomOut.vue.d.ts +2 -0
  120. package/types/components/toolbox/line.vue.d.ts +2 -0
  121. package/types/const/index.d.ts +1 -0
  122. package/types/index.d.ts +4 -950
  123. package/types/instances.d.ts +19 -13
  124. package/types/plugins/index.d.ts +10 -0
  125. package/dist/components/indexBk8PrnQT.js +0 -3021
  126. package/dist/components/indexh_hCt-Tc.js +0 -4
  127. package/dist/components/lineBIoJpzbf.js +0 -12
  128. package/dist/components/lineCzuS7Giu.js +0 -1
  129. package/dist/components/useCommonBRWUFIsx.js +0 -1
@@ -0,0 +1,3092 @@
1
+ var Xt = Object.defineProperty, Qt = Object.defineProperties;
2
+ var Jt = Object.getOwnPropertyDescriptors;
3
+ var $t = Object.getOwnPropertySymbols;
4
+ var el = Object.prototype.hasOwnProperty, tl = Object.prototype.propertyIsEnumerable;
5
+ var Tt = (u, e, l) => e in u ? Xt(u, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : u[e] = l, W = (u, e) => {
6
+ for (var l in e || (e = {}))
7
+ el.call(e, l) && Tt(u, l, e[l]);
8
+ if ($t)
9
+ for (var l of $t(e))
10
+ tl.call(e, l) && Tt(u, l, e[l]);
11
+ return u;
12
+ }, we = (u, e) => Qt(u, Jt(e));
13
+ var $e = (u, e, l) => new Promise((t, y) => {
14
+ var v = (m) => {
15
+ try {
16
+ s(l.next(m));
17
+ } catch (_) {
18
+ y(_);
19
+ }
20
+ }, r = (m) => {
21
+ try {
22
+ s(l.throw(m));
23
+ } catch (_) {
24
+ y(_);
25
+ }
26
+ }, s = (m) => m.done ? t(m.value) : Promise.resolve(m.value).then(v, r);
27
+ s((l = l.apply(u, e)).next());
28
+ });
29
+ import { inject as Z, ref as T, markRaw as S, defineAsyncComponent as I, defineComponent as J, createBlock as H, openBlock as w, unref as o, normalizeProps as ll, guardReactiveProps as ol, withCtx as x, resolveDynamicComponent as Ve, useModel as Be, computed as N, createElementBlock as L, createElementVNode as k, createVNode as C, toDisplayString as E, Fragment as le, renderList as oe, isRef as pe, createTextVNode as K, watch as ee, h as al, renderSlot as fe, mergeProps as Oe, createCommentVNode as R, reactive as rt, onMounted as he, onBeforeUnmount as Ie, normalizeStyle as q, mergeDefaults as nl, withDirectives as Le, vShow as Ae, getCurrentInstance as sl, mergeModels as be, normalizeClass as ke, useCssVars as il, provide as de, Teleport as je, withModifiers as Fe } from "vue";
30
+ import { ElIcon as ze, ElRow as rl, ElCol as ul, ElSwitch as Ee, ElRadioGroup as ot, ElRadio as Te, ElDialog as Ge, ElForm as nt, ElFormItem as se, ElInput as at, ElButton as _e, ElMessage as xt, ElLoading as Et, ElSlider as cl, ElTag as Vt, ElCheckbox as We, ElTooltip as Lt, ElPopover as dl, ElCheckboxGroup as vl, ElPagination as fl } from "element-plus";
31
+ import { KfbView as ve, OpenSeadragon as xe } from "kfb-view";
32
+ import ml from "v-lazy-image";
33
+ const It = Symbol("I18N_INJECT_KEY");
34
+ function re() {
35
+ const u = Z(It), e = (l) => l;
36
+ return {
37
+ locale: u == null ? void 0 : u.locale,
38
+ t: (u == null ? void 0 : u.t) || e
39
+ };
40
+ }
41
+ const pl = {
42
+ install(u, e) {
43
+ u.provide(It, e == null ? void 0 : e.global);
44
+ }
45
+ }, G = T({
46
+ annotate: S(I(() => import("./annotateCMJGbBLj.js"))),
47
+ arrowCircle: S(I(() => import("./arrowCircleCAfdy8wW.js"))),
48
+ check: S(I(() => import("./checkBY8nYbfd.js"))),
49
+ dot: S(I(() => import("./dotCAK1gSEZ.js"))),
50
+ flip: S(I(() => import("./fliprd-6cbtm.js"))),
51
+ info: S(I(() => import("./infoDniQzKU5.js"))),
52
+ microscope: S(I(() => import("./microscopeM3B9tem3.js"))),
53
+ move: S(I(() => import("./moveB-6xS2dU.js"))),
54
+ next: S(I(() => import("./nextCmL8I293.js"))),
55
+ prev: S(I(() => import("./prevGutMlHdh.js"))),
56
+ process: S(I(() => import("./processD8Wa4hOW.js"))),
57
+ rotate: S(I(() => import("./rotateDcAKg0Ly.js"))),
58
+ fullscreen: S(I(() => import("./fullscreenC0sJWM1b.js"))),
59
+ setting: S(I(() => import("./settingCPRrk8ML.js"))),
60
+ tailor: S(I(() => import("./tailorB4WI6Umx.js"))),
61
+ download: S(I(() => import("./downloadBd_Cujel.js"))),
62
+ config: S(I(() => import("./configCLkyNyEP.js"))),
63
+ arrowDown: S(I(() => import("./arrowDownmXw2RWeL.js"))),
64
+ arrowUp: S(I(() => import("./arrowUpB1vQJOJG.js"))),
65
+ arrowLeft: S(I(() => import("./arrowLeftBwpF3loy.js"))),
66
+ arrowRight: S(I(() => import("./arrowRightD3iq1e3c.js"))),
67
+ zoomIn: S(I(() => import("./zoomInCQ1hHcFV.js"))),
68
+ zoomOut: S(I(() => import("./zoomOutDMbifalR.js"))),
69
+ level: S(I(() => import("./levelDged-DD8.js"))),
70
+ channel: S(I(() => import("./channelH1BojppK.js"))),
71
+ delete: S(I(() => import("./deleteCCGds9UX.js"))),
72
+ expandLeft: S(I(() => import("./expandLeftBv_okPlY.js"))),
73
+ expandRight: S(I(() => import("./expandRightBsKPjotO.js"))),
74
+ markLine: S(I(() => import("./linenA1Sbb0z.js"))),
75
+ markArrow: S(I(() => import("./arrowBD2-xgIB.js"))),
76
+ markBilateral: S(I(() => import("./bilateralBV_xkHx0.js"))),
77
+ markRectangle: S(I(() => import("./rectangleC08rVGjN.js"))),
78
+ markEllipse: S(I(() => import("./ellipsei0WMn5o1.js"))),
79
+ markPolygon: S(I(() => import("./polygonDAJzvnQG.js"))),
80
+ markFlag: S(I(() => import("./flagC4kAWLMv.js"))),
81
+ markStar: S(I(() => import("./starCWnNtX4T.js"))),
82
+ markDot: S(I(() => import("./dotCog1e5Lr.js"))),
83
+ markFont: S(I(() => import("./fontPyP8n1pb.js"))),
84
+ markVoice: S(I(() => import("./voiceCE58JuHB.js")))
85
+ }), Q = /* @__PURE__ */ J({
86
+ __name: "KfbIcon",
87
+ props: {
88
+ name: {
89
+ type: [String, Number],
90
+ required: !0
91
+ }
92
+ },
93
+ setup(u) {
94
+ return (e, l) => (w(), H(o(ze), ll(ol(e.$attrs)), {
95
+ default: x(() => [
96
+ (w(), H(Ve(o(G)[u.name])))
97
+ ]),
98
+ _: 1
99
+ }, 16));
100
+ }
101
+ }), hl = { class: "hzzt-kfb-tool-config" }, gl = { class: "hzzt-kfb-tool-config__title margin-b-2" }, yl = { class: "hzzt-kfb-tool-config__block flex align-items-center" }, wl = { class: "hzzt-kfb-tool-config__icon flex align-items-center justify-content-center" }, _l = { class: "margin-l-4 flex-1" }, bl = { class: "hzzt-kfb-tool-config__title" }, kl = { class: "flex align-items-center" }, zl = {
102
+ class: "margin-t-2 margin-b-2",
103
+ style: { width: "160px" }
104
+ }, Cl = { class: "flex align-items-center" }, $l = {
105
+ class: "margin-t-2 margin-b-2",
106
+ style: { width: "160px" }
107
+ }, Tl = { class: "flex align-items-center" }, xl = {
108
+ class: "margin-t-2 margin-b-2",
109
+ style: { width: "160px" }
110
+ }, Ll = /* @__PURE__ */ J({
111
+ name: "KfbToolConfig",
112
+ __name: "KfbToolConfig",
113
+ props: {
114
+ menus: {
115
+ default: () => []
116
+ },
117
+ menusModifiers: {}
118
+ },
119
+ emits: ["update:menus"],
120
+ setup(u) {
121
+ const e = Be(u, "menus"), { t: l } = re(), t = N(() => e.value.filter((h) => h.name !== "line" && h.name !== "config" && h.name !== "zoom")), y = {
122
+ fullscreen: l("全屏"),
123
+ next: l("上一张"),
124
+ prev: l("上一张"),
125
+ flip: l("镜像翻转"),
126
+ setting: l("工具"),
127
+ rotate: l("旋转"),
128
+ dot: l("打点"),
129
+ annotate: l("标注"),
130
+ tailor: l("截图"),
131
+ process: l("图像处理"),
132
+ microscope: l("镜下"),
133
+ move: l("快速移动"),
134
+ info: l("信息"),
135
+ download: l("下载")
136
+ }, v = Z("show-keyboard", T(!1)), r = Z("show-watermark", T(!1)), s = Z("show-menu-text", T(!0));
137
+ function m(h) {
138
+ return h in y;
139
+ }
140
+ function _(h) {
141
+ var a;
142
+ return ((a = h.props) == null ? void 0 : a.text) || (m(h.name) ? y[h.name] : "");
143
+ }
144
+ return (h, a) => (w(), L("div", hl, [
145
+ k("h3", gl, E(o(l)("显示管理")), 1),
146
+ C(o(rl), { gutter: 10 }, {
147
+ default: x(() => [
148
+ (w(!0), L(le, null, oe(t.value, (d) => (w(), H(o(ul), {
149
+ key: d.name,
150
+ span: 8
151
+ }, {
152
+ default: x(() => {
153
+ var c, n;
154
+ return [
155
+ k("div", yl, [
156
+ k("div", wl, [
157
+ (c = d.props) != null && c.component ? (w(), H(Ve((n = d.props) == null ? void 0 : n.component), {
158
+ key: 1,
159
+ size: 24
160
+ })) : (w(), H(Q, {
161
+ key: 0,
162
+ size: 24,
163
+ name: d.name
164
+ }, null, 8, ["name"]))
165
+ ]),
166
+ k("p", _l, E(_(d)), 1),
167
+ C(o(Ee), {
168
+ modelValue: d.show,
169
+ "onUpdate:modelValue": (f) => d.show = f,
170
+ "active-text": "",
171
+ "inactive-text": ""
172
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
173
+ ])
174
+ ];
175
+ }),
176
+ _: 2
177
+ }, 1024))), 128))
178
+ ]),
179
+ _: 1
180
+ }),
181
+ k("div", null, [
182
+ k("h3", bl, E(o(l)("其他设置")), 1),
183
+ k("div", kl, [
184
+ k("p", zl, E(o(l)("工具列表显示切换")), 1),
185
+ C(o(ot), {
186
+ modelValue: o(s),
187
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => pe(s) ? s.value = d : null)
188
+ }, {
189
+ default: x(() => [
190
+ C(o(Te), { value: !0 }, {
191
+ default: x(() => [
192
+ K(E(o(l)("显示工具名称")), 1)
193
+ ]),
194
+ _: 1
195
+ }),
196
+ C(o(Te), { value: !1 }, {
197
+ default: x(() => [
198
+ K(E(o(l)("隐藏工具名称")), 1)
199
+ ]),
200
+ _: 1
201
+ })
202
+ ]),
203
+ _: 1
204
+ }, 8, ["modelValue"])
205
+ ]),
206
+ k("div", Cl, [
207
+ k("p", $l, E(o(l)("小键盘显示切换")), 1),
208
+ C(o(ot), {
209
+ modelValue: o(v),
210
+ "onUpdate:modelValue": a[1] || (a[1] = (d) => pe(v) ? v.value = d : null)
211
+ }, {
212
+ default: x(() => [
213
+ C(o(Te), { value: !0 }, {
214
+ default: x(() => [
215
+ K(E(o(l)("显示小键盘")), 1)
216
+ ]),
217
+ _: 1
218
+ }),
219
+ C(o(Te), { value: !1 }, {
220
+ default: x(() => [
221
+ K(E(o(l)("隐藏小键盘")), 1)
222
+ ]),
223
+ _: 1
224
+ })
225
+ ]),
226
+ _: 1
227
+ }, 8, ["modelValue"])
228
+ ]),
229
+ k("div", Tl, [
230
+ k("p", xl, E(o(l)("水印文字")), 1),
231
+ C(o(ot), {
232
+ modelValue: o(r),
233
+ "onUpdate:modelValue": a[2] || (a[2] = (d) => pe(r) ? r.value = d : null)
234
+ }, {
235
+ default: x(() => [
236
+ C(o(Te), { value: !0 }, {
237
+ default: x(() => [
238
+ K(E(o(l)("启用")), 1)
239
+ ]),
240
+ _: 1
241
+ }),
242
+ C(o(Te), { value: !1 }, {
243
+ default: x(() => [
244
+ K(E(o(l)("禁用")), 1)
245
+ ]),
246
+ _: 1
247
+ })
248
+ ]),
249
+ _: 1
250
+ }, 8, ["modelValue"])
251
+ ])
252
+ ])
253
+ ]));
254
+ }
255
+ }), El = { class: "hzzt-kfb-toolbox" }, Vl = { class: "hzzt-kfb-toolbox__component" }, qe = /* @__PURE__ */ J({
256
+ name: "KfbToolbox",
257
+ __name: "KfbToolbox",
258
+ props: {
259
+ menu: {},
260
+ process: {},
261
+ microscope: {},
262
+ showMenuText: { type: Boolean }
263
+ },
264
+ emits: ["tool"],
265
+ setup(u, { emit: e }) {
266
+ const l = u, t = e, { t: y } = re(), v = {
267
+ prev: y("上一张"),
268
+ next: y("下一张"),
269
+ config: y("配置"),
270
+ info: y("信息"),
271
+ flip: y("镜像"),
272
+ tailor: y("截图")
273
+ }, r = Z("kfbViewRef"), s = T(!1), m = T(a(l.menu)), _ = {
274
+ fullscreen: I(() => import("./fullscreenBjnoUXEr.js")),
275
+ line: I(() => import("./lineBNwqZbqu.js")),
276
+ setting: I(() => import("./settingC_K-RcOZ.js")),
277
+ rotate: I(() => import("./rotateB7TupsDC.js")),
278
+ dot: I(() => import("./dotBWzkPfEe.js")),
279
+ annotate: I(() => import("./annotateDJFMTHXi.js")),
280
+ process: I(() => import("./processDprLKUHQ.js")),
281
+ microscope: I(() => import("./microscopeDxei39qJ.js")),
282
+ move: I(() => import("./moveB0MjN8ns.js")),
283
+ custom: I(() => import("./customDNmdytIO.js")),
284
+ zoom: I(() => import("./zoomDoOddf7F.js")),
285
+ download: I(() => import("./downloadD849T2y9.js"))
286
+ }, h = N(() => m.value.filter((c) => c.show !== !1).map((c) => ({
287
+ component: _[c.name],
288
+ props: c.props,
289
+ slots: c.slots
290
+ })));
291
+ ee(() => l.menu, (c) => {
292
+ m.value = a(c);
293
+ });
294
+ function a(c) {
295
+ return c.map((n) => {
296
+ const f = typeof n == "string" ? n : n.name;
297
+ return v[f] ? {
298
+ name: "custom",
299
+ show: typeof n == "string" ? !0 : n.show !== !1,
300
+ props: we(W({
301
+ text: v[f]
302
+ }, typeof n == "string" ? {} : n.props), {
303
+ name: f,
304
+ component: al(Q, {
305
+ name: f
306
+ })
307
+ })
308
+ } : f === "process" ? {
309
+ name: f,
310
+ props: typeof n == "string" ? {
311
+ process: l.process
312
+ } : W({
313
+ process: l.process
314
+ }, n.props),
315
+ slots: typeof n == "string" ? void 0 : n.slots,
316
+ show: typeof n == "string" ? !0 : n.show !== !1
317
+ } : f === "microscope" ? {
318
+ name: f,
319
+ props: typeof n == "string" ? {
320
+ process: l.process
321
+ } : W({
322
+ microscope: l.microscope
323
+ }, n.props),
324
+ slots: typeof n == "string" ? void 0 : n.slots,
325
+ show: typeof n == "string" ? !0 : n.show !== !1
326
+ } : {
327
+ name: f,
328
+ props: typeof n == "string" ? {} : n.props,
329
+ slots: typeof n == "string" ? void 0 : n.slots,
330
+ show: typeof n == "string" ? !0 : n.show !== !1
331
+ };
332
+ });
333
+ }
334
+ function d(c, n) {
335
+ const f = {
336
+ annotate: () => r.value.startDraw(n),
337
+ tailor: () => r.value.shotScreen(n),
338
+ process: () => r.value.forceRedraw(n),
339
+ microscope: () => r.value.scopeChange(n),
340
+ move: () => r.value.fastMove(n),
341
+ endDraw: () => r.value.endDraw(),
342
+ info: () => r.value.info(),
343
+ zoom: () => r.value.zoomTo(n),
344
+ flip: () => r.value.toggleFlip(n),
345
+ config: () => s.value = !0,
346
+ grid: () => r.value.updateGrid(n),
347
+ ruler: () => r.value.updateGrid(n),
348
+ graduation: () => r.value.updateGraduation(n),
349
+ navigator: () => r.value.updateNavigator(n),
350
+ tool: () => {
351
+ r.value.updateGrid({
352
+ show: n
353
+ }), r.value.updateGraduation({
354
+ show: n
355
+ }), r.value.updateGrid({
356
+ ruler: n
357
+ }), r.value.updateNavigator(n);
358
+ }
359
+ };
360
+ f[c] ? f[c]() : t("tool", c, n);
361
+ }
362
+ return (c, n) => (w(), L("div", El, [
363
+ fe(c.$slots, "left"),
364
+ k("div", Vl, [
365
+ (w(!0), L(le, null, oe(h.value, (f, b) => (w(), H(Ve(f.component), Oe({ ref_for: !0 }, f.props, {
366
+ key: b,
367
+ onTool: d
368
+ }), {
369
+ default: x(() => [
370
+ f.slots ? (w(!0), L(le, { key: 0 }, oe(f.slots, (g) => (w(), H(Ve(g)))), 256)) : R("", !0)
371
+ ]),
372
+ _: 2
373
+ }, 1040))), 128))
374
+ ]),
375
+ fe(c.$slots, "right"),
376
+ C(o(Ge), {
377
+ modelValue: s.value,
378
+ "onUpdate:modelValue": n[1] || (n[1] = (f) => s.value = f),
379
+ width: "800px",
380
+ title: o(y)("阅片工具设置中心")
381
+ }, {
382
+ default: x(() => [
383
+ C(Ll, {
384
+ menus: m.value,
385
+ "onUpdate:menus": n[0] || (n[0] = (f) => m.value = f)
386
+ }, null, 8, ["menus"])
387
+ ]),
388
+ _: 1
389
+ }, 8, ["modelValue", "title"])
390
+ ]));
391
+ }
392
+ }), Ze = "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", st = {
393
+ shape: "50%",
394
+ width: 0.3,
395
+ color: "#FA0404",
396
+ borderWidth: 5
397
+ }, Mt = {
398
+ r: 0,
399
+ g: 0,
400
+ b: 0,
401
+ c: 0,
402
+ s: 0,
403
+ l: 0,
404
+ ga: 1
405
+ };
406
+ function Il(u) {
407
+ const e = rt(W(W({}, Mt), u.process));
408
+ ee(() => u.process, (v) => {
409
+ y(v);
410
+ });
411
+ const l = N(() => {
412
+ const v = [
413
+ 1 + e.r + e.l + 0.5 * e.c,
414
+ 0,
415
+ 0,
416
+ 0,
417
+ -0.25 * e.c
418
+ ], r = [
419
+ 0,
420
+ 1 + e.g + e.l + 0.5 * e.c,
421
+ 0,
422
+ 0,
423
+ -0.25 * e.c
424
+ ], s = [
425
+ 0,
426
+ 0,
427
+ 1 + e.b + e.l + 0.5 * e.c,
428
+ 0,
429
+ -0.25 * e.c
430
+ ], m = [0, 0, 0, 1, 0];
431
+ return `${v.join(" ")}
432
+ ${r.join(" ")}
433
+ ${s.join(" ")}
434
+ ${m.join(" ")}`;
435
+ }), t = N(() => String(1 + e.s));
436
+ function y(v) {
437
+ v && Object.assign(e, v);
438
+ }
439
+ return {
440
+ imageProcess: e,
441
+ matrixValues: l,
442
+ saturateValues: t,
443
+ forceRedraw: y
444
+ };
445
+ }
446
+ function Ml(u, e) {
447
+ function l() {
448
+ e.value.$on(ve.events.EVENT_TAILORING_SCREENSHOT, t);
449
+ }
450
+ function t({ base64: r, region: s }) {
451
+ if (window.ClipboardItem && (navigator != null && navigator.clipboard)) {
452
+ const m = y(r, "image/png");
453
+ navigator.clipboard.write([
454
+ new window.ClipboardItem({
455
+ [m.type]: m
456
+ })
457
+ ]);
458
+ }
459
+ u("tool", "screen-shot", { base64: r, region: s });
460
+ }
461
+ function y(r, s) {
462
+ var d, c;
463
+ const m = r.split(",");
464
+ (c = (d = m[0]) == null ? void 0 : d.match(/:(.*?);/)) == null || c[1];
465
+ const _ = atob(m == null ? void 0 : m[1]);
466
+ let h = _.length;
467
+ const a = new Uint8Array(h);
468
+ for (; h--; )
469
+ a[h] = _.charCodeAt(h);
470
+ return new Blob([a], { type: s });
471
+ }
472
+ function v(r) {
473
+ const { width: s, height: m } = e.value.$options;
474
+ r ? s > m ? e.value.tailoring.init(
475
+ {
476
+ left: (s - m) / 2,
477
+ top: 0,
478
+ height: m,
479
+ width: m,
480
+ now: !0
481
+ }
482
+ ) : e.value.tailoring.init(
483
+ {
484
+ left: 0,
485
+ top: (m - s) / 2,
486
+ height: s,
487
+ width: s,
488
+ now: !0
489
+ }
490
+ ) : e.value.tailoring.init(
491
+ {
492
+ left: s / 2 - 100,
493
+ top: m / 2 - 100,
494
+ height: 200,
495
+ width: 200,
496
+ color: "#ff0000"
497
+ }
498
+ );
499
+ }
500
+ return {
501
+ tailorEvent: l,
502
+ shotScreen: v
503
+ };
504
+ }
505
+ const Sl = ["onClick"], Hl = ["src"], Pl = {
506
+ key: 2,
507
+ style: { width: "18px" },
508
+ class: "margin-r-3"
509
+ }, Rl = {
510
+ key: 1,
511
+ class: "hzzt-kfb-sub-menu"
512
+ }, Al = ["onClick"], Nl = { class: "flex align-items-center" }, Bl = ["src"], Dl = {
513
+ key: 2,
514
+ style: { width: "18px" },
515
+ class: "margin-r-2"
516
+ }, Ul = /* @__PURE__ */ J({
517
+ __name: "KfbMenu",
518
+ props: {
519
+ menus: {}
520
+ },
521
+ emits: ["tool"],
522
+ setup(u, { emit: e }) {
523
+ const l = T({
524
+ top: "0",
525
+ left: "0",
526
+ display: "none"
527
+ }), t = Z("kfbView", T({})), y = Z("currentLabel"), v = u, r = e, { t: s } = re(), m = [
528
+ {
529
+ label: s("直线"),
530
+ value: "line",
531
+ icon: G.value.markLine
532
+ },
533
+ {
534
+ label: s("箭头"),
535
+ value: "arrow",
536
+ icon: G.value.markArrow
537
+ },
538
+ {
539
+ label: s("双箭头"),
540
+ value: "bilateral",
541
+ icon: G.value.markBilateral
542
+ },
543
+ {
544
+ label: s("矩形"),
545
+ value: "rectangle",
546
+ icon: G.value.markRectangle
547
+ },
548
+ {
549
+ label: s("圆形"),
550
+ value: "ellipse",
551
+ icon: G.value.markEllipse
552
+ },
553
+ {
554
+ label: s("曲线"),
555
+ value: "polygon",
556
+ icon: G.value.markPolygon
557
+ },
558
+ {
559
+ label: s("星星"),
560
+ value: "star",
561
+ icon: G.value.markStar
562
+ },
563
+ {
564
+ label: s("旗帜"),
565
+ value: "flag",
566
+ icon: G.value.markFlag
567
+ },
568
+ {
569
+ label: s("点"),
570
+ value: "dot",
571
+ icon: G.value.markDot
572
+ },
573
+ {
574
+ label: s("文字"),
575
+ value: "font",
576
+ icon: G.value.markFont
577
+ },
578
+ {
579
+ label: s("语音"),
580
+ value: "voice",
581
+ icon: G.value.markVoice
582
+ }
583
+ ], _ = N(() => {
584
+ var n;
585
+ return y != null && y.value ? [{
586
+ label: s("删除"),
587
+ value: "delete",
588
+ icon: G.value.delete
589
+ }] : (n = v.menus) != null && n.length ? v.menus.map((f) => f.value === "annotate" ? we(W({}, f), {
590
+ children: m
591
+ }) : we(W({}, f), {
592
+ icon: f.icon || G.value[f.value]
593
+ })) : [
594
+ {
595
+ label: s("上一张"),
596
+ value: "prev"
597
+ },
598
+ {
599
+ label: s("下一张"),
600
+ value: "next"
601
+ },
602
+ {
603
+ label: s("标注"),
604
+ value: "annotate",
605
+ icon: G.value.annotate,
606
+ children: m
607
+ },
608
+ {
609
+ label: s("一键截图"),
610
+ value: "tailor_now",
611
+ icon: G.value.tailor
612
+ },
613
+ {
614
+ label: s("区域截图"),
615
+ value: "tailor"
616
+ },
617
+ {
618
+ label: s("镜像翻转"),
619
+ value: "flip",
620
+ icon: G.value.flip
621
+ },
622
+ {
623
+ label: s("切片信息"),
624
+ value: "info",
625
+ icon: G.value.info
626
+ }
627
+ ];
628
+ });
629
+ ee(() => t.value, (n, f) => {
630
+ f != null && f.viewer && (f.viewer.removeHandler("canvas-contextmenu", h), f.viewer.removeHandler("canvas-click", a)), n != null && n.viewer && (n.viewer.addHandler("canvas-contextmenu", h), n.viewer.addHandler("canvas-click", a));
631
+ }), he(() => {
632
+ var n;
633
+ (n = t.value) != null && n.viewer && (t.value.viewer.addHandler("canvas-contextmenu", h), t.value.viewer.addHandler("canvas-click", a)), document.body.addEventListener("click", a);
634
+ }), Ie(() => {
635
+ var n;
636
+ (n = t.value) != null && n.viewer && (t.value.viewer.removeHandler("canvas-contextmenu", h), t.value.viewer.removeHandler("canvas-click", a)), document.body.removeEventListener("click", a);
637
+ });
638
+ function h(n) {
639
+ n.preventDefault = !0, l.value.top = `${n.position.y}px`, l.value.left = `${n.position.x}px`, l.value.display === "block" ? l.value.display = "none" : l.value.display = "block";
640
+ }
641
+ function a() {
642
+ l.value.display = "none";
643
+ }
644
+ function d(n, f) {
645
+ n.children || ((f == null ? void 0 : f.value) === "annotate" ? r("tool", "annotate", {
646
+ tool: n.value.substring(0, 1).toLocaleUpperCase() + n.value.substring(1),
647
+ once: !0
648
+ }) : n.value === "tailor_now" ? r("tool", "tailor", !0) : r("tool", n.value), a());
649
+ }
650
+ function c(n) {
651
+ return n == null || typeof n != "object" && typeof n != "function" ? !1 : (
652
+ // 函数式组件
653
+ typeof n == "function" || // 对象式组件
654
+ "render" in n || "setup" in n
655
+ );
656
+ }
657
+ return (n, f) => (w(), L("div", {
658
+ class: "hzzt-kfb-menu",
659
+ style: q(l.value)
660
+ }, [
661
+ (w(!0), L(le, null, oe(_.value, (b, g) => (w(), L("div", {
662
+ key: g,
663
+ class: "hzzt-kfb-menu-item"
664
+ }, [
665
+ k("div", {
666
+ class: "flex align-items-center",
667
+ onClick: (p) => d(b)
668
+ }, [
669
+ c(b.icon) ? (w(), H(o(ze), {
670
+ key: 0,
671
+ class: "margin-r-3",
672
+ size: 18
673
+ }, {
674
+ default: x(() => [
675
+ (w(), H(Ve(b.icon)))
676
+ ]),
677
+ _: 2
678
+ }, 1024)) : b.icon ? (w(), L("img", {
679
+ key: 1,
680
+ style: { width: "18px" },
681
+ class: "margin-r-2",
682
+ src: b.icon
683
+ }, null, 8, Hl)) : (w(), L("div", Pl)),
684
+ k("span", null, E(b.label), 1)
685
+ ], 8, Sl),
686
+ b.children ? (w(), H(Q, {
687
+ key: 0,
688
+ name: "arrowRight",
689
+ class: "margin-r-2",
690
+ size: 14
691
+ })) : R("", !0),
692
+ b.children ? (w(), L("div", Rl, [
693
+ (w(!0), L(le, null, oe(b.children, (p, i) => (w(), L("div", {
694
+ key: i,
695
+ class: "hzzt-kfb-menu-item",
696
+ onClick: (V) => d(p, b)
697
+ }, [
698
+ k("div", Nl, [
699
+ c(p.icon) ? (w(), H(o(ze), {
700
+ key: 0,
701
+ class: "margin-r-2",
702
+ size: 18
703
+ }, {
704
+ default: x(() => [
705
+ (w(), H(Ve(p.icon)))
706
+ ]),
707
+ _: 2
708
+ }, 1024)) : p.icon ? (w(), L("img", {
709
+ key: 1,
710
+ style: { width: "18px" },
711
+ class: "margin-r-2",
712
+ src: p.icon
713
+ }, null, 8, Bl)) : (w(), L("div", Dl)),
714
+ k("span", null, E(p.label), 1)
715
+ ])
716
+ ], 8, Al))), 128))
717
+ ])) : R("", !0)
718
+ ]))), 128))
719
+ ], 4));
720
+ }
721
+ }), ge = (u, e) => {
722
+ const l = u.__vccOpts || u;
723
+ for (const [t, y] of e)
724
+ l[t] = y;
725
+ return l;
726
+ }, Fl = /* @__PURE__ */ ge(Ul, [["__scopeId", "data-v-414722d0"]]), Kl = {
727
+ key: 0,
728
+ class: "hzzt-kfb-microscope"
729
+ }, jl = /* @__PURE__ */ J({
730
+ __name: "KfbMicroscope",
731
+ props: /* @__PURE__ */ nl({
732
+ shape: {},
733
+ width: {},
734
+ color: {},
735
+ borderWidth: {}
736
+ }, W({}, st)),
737
+ setup(u, { expose: e }) {
738
+ const l = u, t = rt(W(W({}, st), l));
739
+ ee(() => l, (a) => {
740
+ h({ name: "change", value: a });
741
+ });
742
+ const y = T("200px"), v = T(!1), r = N(() => ({
743
+ borderRadius: t.shape,
744
+ borderColor: t.color,
745
+ borderWidth: t.borderWidth + "px",
746
+ width: y.value,
747
+ height: y.value
748
+ })), s = Z("kfbView", T({}));
749
+ ee(() => s.value, (a, d) => {
750
+ d != null && d.viewer && d.viewer.removeHandler("zoom", m), a != null && a.viewer && a.viewer.addHandler("zoom", m);
751
+ }), he(() => {
752
+ var a;
753
+ (a = s.value) != null && a.viewer && s.value.viewer.addHandler("zoom", m);
754
+ }), Ie(() => {
755
+ var a;
756
+ (a = s.value) != null && a.viewer && s.value.viewer.removeHandler("zoom", m);
757
+ });
758
+ function m() {
759
+ setTimeout(() => {
760
+ h({ name: "change", value: t });
761
+ }, 100);
762
+ }
763
+ function _(a) {
764
+ let { x: d, y: c } = s.value.viewer.viewport.getCenter(!0);
765
+ a === "top" ? c -= 6e-3 : a === "bottom" ? c += 6e-3 : a === "left" ? d -= 6e-3 : a === "right" && (d += 6e-3), s.value.area.moveToLabel({ x: d, y: c });
766
+ }
767
+ function h({ name: a, value: d }) {
768
+ var n, f;
769
+ const c = (f = (n = s.value.$options) == null ? void 0 : n.pxConversion) == null ? void 0 : f.imageCapRes;
770
+ if (a === "visible") {
771
+ if (v.value = d, d) {
772
+ const b = s.value.area.imageToViewerElementRectangle(
773
+ {
774
+ x: 0,
775
+ y: 0,
776
+ width: t.width * 1e3 / c,
777
+ height: t.width * 1e3 / c
778
+ }
779
+ );
780
+ y.value = b.width + "px";
781
+ }
782
+ } else if (a === "change") {
783
+ Object.assign(t, d);
784
+ const b = s.value.area.imageToViewerElementRectangle(
785
+ {
786
+ x: 0,
787
+ y: 0,
788
+ width: t.width * 1e3 / c,
789
+ height: t.width * 1e3 / c
790
+ }
791
+ );
792
+ y.value = b.width + "px";
793
+ }
794
+ }
795
+ return e({
796
+ scopeChange: h
797
+ }), (a, d) => v.value ? (w(), L("div", Kl, [
798
+ k("div", {
799
+ class: "hzzt-kfb-microscope__container",
800
+ style: q(r.value)
801
+ }, null, 4),
802
+ k("div", {
803
+ class: "hzzt-kfb-microscope__top",
804
+ onClick: d[0] || (d[0] = (c) => _("top"))
805
+ }, [
806
+ C(Q, {
807
+ size: "24",
808
+ name: "arrowUp"
809
+ })
810
+ ]),
811
+ k("div", {
812
+ class: "hzzt-kfb-microscope__bottom",
813
+ onClick: d[1] || (d[1] = (c) => _("bottom"))
814
+ }, [
815
+ C(Q, {
816
+ size: "24",
817
+ name: "arrowDown"
818
+ })
819
+ ]),
820
+ k("div", {
821
+ class: "hzzt-kfb-microscope__left",
822
+ onClick: d[2] || (d[2] = (c) => _("left"))
823
+ }, [
824
+ C(Q, {
825
+ size: "24",
826
+ name: "arrowLeft"
827
+ })
828
+ ]),
829
+ k("div", {
830
+ class: "hzzt-kfb-microscope__right",
831
+ onClick: d[3] || (d[3] = (c) => _("right"))
832
+ }, [
833
+ C(Q, {
834
+ size: "24",
835
+ name: "arrowRight"
836
+ })
837
+ ])
838
+ ])) : R("", !0);
839
+ }
840
+ }), Ol = /* @__PURE__ */ ge(jl, [["__scopeId", "data-v-e8b36101"]]), Gl = { class: "hzzt-kfb-label flex column" }, Wl = { class: "hzzt-kfb-label__img flex justify-content-center" }, ql = ["src"], Zl = { class: "ellipsis flex-1" }, Yl = {
841
+ class: "flex margin-b-4",
842
+ style: { width: "100%" }
843
+ }, Xl = {
844
+ class: "flex margin overflow-hidden",
845
+ style: { height: "132px" }
846
+ }, Ql = ["src"], Jl = ["src"], eo = /* @__PURE__ */ J({
847
+ __name: "KfbLabel",
848
+ props: {
849
+ info: {},
850
+ slide: {},
851
+ pathologyHandle: { type: Function }
852
+ },
853
+ emits: ["tool"],
854
+ setup(u, { emit: e }) {
855
+ const { t: l } = re(), t = u, y = e, v = T(!0), r = T(!1), s = N(() => t.slide.pathology_id ? l("修改病理号") : l("绑定病理号"));
856
+ function m() {
857
+ t.slide.angle || (t.slide.angle = 0), t.slide.angle += 90, t.slide.angle > 360 && (t.slide.angle = t.slide.angle % 360), y("tool", "rotate", t.slide.angle);
858
+ }
859
+ function _() {
860
+ r.value = !0;
861
+ }
862
+ function h() {
863
+ t.pathologyHandle && t.pathologyHandle(t.slide).then(() => {
864
+ r.value = !1;
865
+ });
866
+ }
867
+ return (a, d) => (w(), L("div", Gl, [
868
+ Le(k("div", { class: "hzzt-kfb-label__title" }, E(o(l)(`点击标签旋转${a.pathologyHandle ? ",点击病理号重绑" : ""}`)), 513), [
869
+ [Ae, v.value]
870
+ ]),
871
+ Le(k("div", Wl, [
872
+ k("img", {
873
+ src: a.info.labelImg,
874
+ style: q({ transform: `rotate(${a.slide.angle}deg)` }),
875
+ onClick: m
876
+ }, null, 12, ql)
877
+ ], 512), [
878
+ [Ae, v.value]
879
+ ]),
880
+ a.pathologyHandle ? Le((w(), L("div", {
881
+ key: 0,
882
+ class: "hzzt-kfb-label__pathology flex align-items-center justify-content-between",
883
+ onClick: _
884
+ }, [
885
+ k("span", Zl, E(a.slide.pathology_number), 1),
886
+ C(Q, {
887
+ size: "14",
888
+ name: "annotate"
889
+ })
890
+ ], 512)), [
891
+ [Ae, v.value]
892
+ ]) : R("", !0),
893
+ k("span", {
894
+ onClick: d[0] || (d[0] = (c) => v.value = !v.value),
895
+ style: q({
896
+ transform: `translateY(${v.value ? "-50%" : 0})`
897
+ }),
898
+ class: "hzzt-kfb-label__expend flex align-items-center justify-content-center"
899
+ }, [
900
+ v.value ? (w(), H(Q, {
901
+ key: 0,
902
+ size: "10",
903
+ name: "arrowLeft"
904
+ })) : (w(), H(Q, {
905
+ key: 1,
906
+ size: "10",
907
+ name: "arrowRight"
908
+ }))
909
+ ], 4),
910
+ C(o(Ge), {
911
+ modelValue: r.value,
912
+ "onUpdate:modelValue": d[5] || (d[5] = (c) => r.value = c),
913
+ "append-to-body": !0,
914
+ title: s.value,
915
+ width: "450px"
916
+ }, {
917
+ footer: x(() => [
918
+ C(o(_e), {
919
+ onClick: d[4] || (d[4] = (c) => r.value = !1)
920
+ }, {
921
+ default: x(() => [
922
+ K(E(o(l)("取消")), 1)
923
+ ]),
924
+ _: 1
925
+ }),
926
+ C(o(_e), {
927
+ type: "primary",
928
+ onClick: h
929
+ }, {
930
+ default: x(() => [
931
+ K(E(o(l)("确认")), 1)
932
+ ]),
933
+ _: 1
934
+ })
935
+ ]),
936
+ default: x(() => [
937
+ k("div", Yl, [
938
+ k("div", Xl, [
939
+ k("img", {
940
+ src: a.slide.labelImg
941
+ }, null, 8, Ql),
942
+ k("img", {
943
+ src: a.slide.previewImg
944
+ }, null, 8, Jl)
945
+ ])
946
+ ]),
947
+ C(o(nt), { class: "margin-t-2" }, {
948
+ default: x(() => [
949
+ C(o(se), {
950
+ label: o(l)("病理号")
951
+ }, {
952
+ default: x(() => [
953
+ C(o(at), {
954
+ modelValue: a.slide.pathology_number,
955
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => a.slide.pathology_number = c),
956
+ placeholder: o(l)("输入病理号"),
957
+ clearable: ""
958
+ }, null, 8, ["modelValue", "placeholder"])
959
+ ]),
960
+ _: 1
961
+ }, 8, ["label"]),
962
+ C(o(se), {
963
+ label: o(l)("蜡块号")
964
+ }, {
965
+ default: x(() => [
966
+ C(o(at), {
967
+ modelValue: a.slide.paraffin_block_number,
968
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => a.slide.paraffin_block_number = c),
969
+ placeholder: o(l)("输入蜡块号"),
970
+ clearable: ""
971
+ }, null, 8, ["modelValue", "placeholder"])
972
+ ]),
973
+ _: 1
974
+ }, 8, ["label"]),
975
+ a.slide.slide_id ? R("", !0) : (w(), H(o(se), {
976
+ key: 0,
977
+ label: o(l)("试剂")
978
+ }, {
979
+ default: x(() => [
980
+ C(o(at), {
981
+ modelValue: a.slide.reagent,
982
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => a.slide.reagent = c),
983
+ placeholder: o(l)("输入试剂"),
984
+ clearable: ""
985
+ }, null, 8, ["modelValue", "placeholder"])
986
+ ]),
987
+ _: 1
988
+ }, 8, ["label"]))
989
+ ]),
990
+ _: 1
991
+ })
992
+ ]),
993
+ _: 1
994
+ }, 8, ["modelValue", "title"])
995
+ ]));
996
+ }
997
+ }), to = /* @__PURE__ */ ge(eo, [["__scopeId", "data-v-7397de48"]]);
998
+ function lo(u, e) {
999
+ const l = T(1), t = T(null), y = T(null);
1000
+ function v() {
1001
+ u.value.viewer.addHandler("canvas-drag", (s) => {
1002
+ t.value || (t.value = s.position);
1003
+ }), u.value.viewer.addHandler("canvas-drag-end", (s) => {
1004
+ if (l.value !== 1) {
1005
+ y.value = s.position;
1006
+ const m = u.value.viewer.viewport.containerSize.x, _ = u.value.viewer.viewport.containerSize.y, h = (y.value.x - t.value.x) / (m * e.value) * (l.value - 1), a = (y.value.y - t.value.y) / (_ * e.value) * (l.value - 1), d = u.value.viewer.viewport.getCenter(), c = new xe.Point(d.x - h, d.y - a);
1007
+ u.value.viewer.viewport.panTo(c), t.value = null;
1008
+ }
1009
+ });
1010
+ }
1011
+ function r({ name: s, value: m }) {
1012
+ s === "ratio" && (l.value = m / 1);
1013
+ }
1014
+ return {
1015
+ moveEvent: v,
1016
+ fastMove: r
1017
+ };
1018
+ }
1019
+ function oo(u, e, l, t, y) {
1020
+ const v = T(void 0), r = T([]);
1021
+ ee(() => u.aiLabelList, h);
1022
+ function s() {
1023
+ l.value.$on(ve.events.EVENT_END_PAINTING, m("add")), l.value.$on(ve.events.EVENT_AREA_MOVE_END, m("move")), l.value.$on(ve.events.EVENT_ADD_POLYGON_POINT, m("add-point")), l.value.$on(ve.events.EVENT_DELETE_POLYGON_POINT, m("delete-point")), l.value.$on(ve.events.EVENT_DELETE_LABEL, m("delete")), l.value.$on(ve.events.EVENT_SELECT_LABEL, (n) => {
1024
+ v.value = n, c(), e("tool", "select-label", v.value);
1025
+ }), l.value.$on(ve.events.EVENT_CANCEL_SELECT_LABEL, () => {
1026
+ v.value = void 0, e("tool", "cancel-select-label", v.value);
1027
+ }), m("list")();
1028
+ }
1029
+ function m(n) {
1030
+ return (f) => _(n, f);
1031
+ }
1032
+ function _(n, f) {
1033
+ var b;
1034
+ if (n === "add" && f && ((f == null ? void 0 : f.subType) || ((b = f == null ? void 0 : f.__data__) == null ? void 0 : b.subType)) === "voice")
1035
+ t(f);
1036
+ else
1037
+ return u.labelHandle(n, u.slide, f).then((g) => {
1038
+ r.value = g, h();
1039
+ }).catch(() => {
1040
+ h();
1041
+ });
1042
+ }
1043
+ function h() {
1044
+ var n;
1045
+ if ((n = l.value) != null && n.initLabelList) {
1046
+ const f = [...r.value, ...u.aiLabelList || []];
1047
+ f.find(({ id: b }) => {
1048
+ var g;
1049
+ return b === ((g = v.value) == null ? void 0 : g.id);
1050
+ }) || (v.value = void 0), l.value.initLabelList(f);
1051
+ }
1052
+ }
1053
+ function a(n, f) {
1054
+ var g, p;
1055
+ v.value && (v.value.select = !1, v.value = void 0);
1056
+ const b = (l.value.labelList || []).findIndex((i) => i.id === n.id);
1057
+ if (b > -1) {
1058
+ v.value = (g = l.value.labelList) == null ? void 0 : g[b], v.value.select = !0;
1059
+ const i = l.value.area.getCenterPoint(n.region);
1060
+ l.value.area.moveToLabel(i), (p = l.value.viewer) != null && p.canvas && l.value.viewer.canvas.focus(), c();
1061
+ }
1062
+ f && y(f);
1063
+ }
1064
+ function d(n) {
1065
+ return u.labelHandle("add", u.slide, n).then((f) => {
1066
+ r.value = f, h();
1067
+ }).catch(() => {
1068
+ h();
1069
+ });
1070
+ }
1071
+ function c() {
1072
+ var f, b, g, p;
1073
+ (((f = v.value) == null ? void 0 : f.subType) || ((g = (b = v.value) == null ? void 0 : b.__data__) == null ? void 0 : g.subType)) === "voice" && ((p = v.value) != null && p.src) && new Audio(v.value.src).play();
1074
+ }
1075
+ return {
1076
+ currentLabel: v,
1077
+ localLabelList: r,
1078
+ initLabel: s,
1079
+ jumpToLabel: a,
1080
+ reloadLabelList: h,
1081
+ eventHandel: m,
1082
+ addHandle: d
1083
+ };
1084
+ }
1085
+ function ao() {
1086
+ function u(e, l) {
1087
+ e.save(), e.strokeStyle = "rgba(0,0,0,0)", e.miterLimit = 4, e.font = "15px", e.fillStyle = l, e.font = "15px", e.scale(0.02734375, 0.02734375), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 427.023), e.moveTo(422, 427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 3.141592653589793, 6.283185307179586, !0), e.rotate(0), e.translate(-512, -427.023), e.translate(512, 427.023), e.rotate(0), e.arc(0, 0, 90, 0, 3.141592653589793, !0), e.rotate(0), e.translate(-512, -427.023), e.fill(), e.stroke(), e.restore(), e.save(), e.font = "15px", e.beginPath(), e.moveTo(512, 910.402), e.bezierCurveTo(492.86, 910.402, 474.51800000000003, 904.548, 458.95799999999997, 893.4730000000001), e.bezierCurveTo(444.895, 883.4630000000001, 434.032, 869.8770000000001, 427.36899999999997, 854.013), e.lineTo(255.043, 585.177), e.lineTo(254.889, 584.927), e.bezierCurveTo(225.522, 537.209, 210, 482.605, 210, 427.021), e.bezierCurveTo(210, 346.35400000000004, 241.414, 270.515, 298.454, 213.47500000000002), e.bezierCurveTo(355.494, 156.43500000000006, 431.333, 125.021, 512, 125.021), e.bezierCurveTo(592.6669999999999, 125.021, 668.506, 156.435, 725.546, 213.475), e.bezierCurveTo(782.587, 270.515, 814, 346.354, 814, 427.021), e.bezierCurveTo(814, 482.87, 798.345, 537.692, 768.726, 585.56), e.lineTo(768.462, 585.9789999999999), e.lineTo(596.381, 854.6949999999999), e.bezierCurveTo(589.626, 870.4209999999999, 578.721, 883.871, 564.677, 893.7499999999999), e.bezierCurveTo(549.192, 904.6449999999999, 530.977, 910.4019999999999, 512, 910.4019999999999), e.closePath(), e.moveTo(309.246, 551.141), e.lineTo(484.74, 824.9209999999999), e.lineTo(485.934, 828.1179999999999), e.bezierCurveTo(490.083, 839.2249999999999, 500.31500000000005, 846.4019999999999, 512, 846.4019999999999), e.bezierCurveTo(523.584, 846.4019999999999, 533.791, 839.3309999999999, 538.004, 828.387), e.lineTo(539.169, 825.3589999999999), e.lineTo(714.43, 551.678), e.bezierCurveTo(737.701, 513.983, 750, 470.884, 750, 427.021), e.bezierCurveTo(750, 363.449, 725.244, 303.682, 680.2909999999999, 258.72900000000004), e.bezierCurveTo(635.3389999999999, 213.77800000000005, 575.5719999999999, 189.02100000000004, 511.99999999999994, 189.02100000000004), e.bezierCurveTo(448.428, 189.02100000000004, 388.66099999999994, 213.77700000000004, 343.70799999999997, 258.72900000000004), e.bezierCurveTo(298.755, 303.68100000000004, 274, 363.449, 274, 427.021), e.bezierCurveTo(274, 470.661, 286.186, 513.573, 309.246, 551.1410000000001), e.closePath(), e.fill(), e.stroke(), e.restore(), e.restore();
1088
+ }
1089
+ return {
1090
+ drawDot: u
1091
+ };
1092
+ }
1093
+ function no(u, e) {
1094
+ const { t: l } = re(), t = T(!1), y = T();
1095
+ let v = null;
1096
+ const r = T(!1), s = T(0);
1097
+ let m = 0;
1098
+ const _ = T([]), h = T(void 0);
1099
+ let a = !1;
1100
+ function d(i, V) {
1101
+ i.save(), i.strokeStyle = "rgba(0,0,0,0)", i.miterLimit = 4, i.font = "15px ''", i.fillStyle = V, i.font = " 15px ''", i.scale(0.03125, 0.03125), i.save(), i.font = " 15px ''", i.beginPath(), i.moveTo(515.041727, 670.617766), i.bezierCurveTo(606.625894, 670.617766, 681.137374, 596.113511, 681.137374, 504.52212), i.lineTo(681.137374, 229.350568), i.bezierCurveTo(681.137374, 137.76640100000003, 606.625894, 63.254920999999996, 515.041727, 63.254920999999996), i.bezierCurveTo(423.44311000000005, 63.254920999999996, 348.93885500000005, 137.766401, 348.93885600000004, 229.350568), i.lineTo(348.93885600000004, 504.52212), i.bezierCurveTo(348.93885600000004, 596.113512, 423.44311100000004, 670.617767, 515.041727, 670.617766), i.closePath(), i.fill(), i.stroke(), i.restore(), i.save(), i.font = " 15px ''", i.beginPath(), i.moveTo(801.643237, 874.001665), i.lineTo(558.391759, 874.001665), i.lineTo(558.391759, 828.578057), i.bezierCurveTo(719.899527, 807.264291, 844.993269, 668.7898399999999, 844.993269, 501.55986699999994), i.translate(801.643237, 501.55986699999994), i.rotate(0), i.arc(0, 0, 43.350032, 0, 3.141592653589793, !0), i.rotate(0), i.translate(-801.643237, -501.55986699999994), i.bezierCurveTo(758.2932050000001, 635.684865, 649.166725, 744.811345, 515.0345020000001, 744.811346), i.bezierCurveTo(380.9095040000001, 744.811346, 271.79024900000013, 635.6848659999999, 271.79024900000013, 501.55986699999994), i.translate(228.44021750000013, 501.5664510740879), i.rotate(0), i.arc(0, 0, 43.350032, -15188164315591997e-20, -3.1414407719461273, !0), i.rotate(0), i.translate(-228.44021750000013, -501.5664510740879), i.bezierCurveTo(185.09018600000013, 668.7898389999999, 310.1911530000001, 807.271516, 471.69169500000015, 828.578057), i.lineTo(471.69169500000015, 874.001665), i.lineTo(228.440217, 874.001665), i.translate(228.440217, 917.3516970000001), i.rotate(0), i.arc(0, 0, 43.350032, -1.5707963267948966, 1.5707963267948966, !0), i.rotate(0), i.translate(-228.440217, -917.3516970000001), i.lineTo(801.643237, 960.701729), i.translate(801.643237, 917.3516970000001), i.rotate(0), i.arc(0, 0, 43.350032, 1.5707963267948966, 4.71238898038469, !0), i.rotate(0), i.translate(-801.643237, -917.3516970000001), i.closePath(), i.fill(), i.stroke(), i.restore(), i.restore();
1102
+ }
1103
+ function c() {
1104
+ return $e(this, null, function* () {
1105
+ try {
1106
+ y.value = yield navigator.mediaDevices.getUserMedia({ audio: !0 }), v = new MediaRecorder(y.value), _.value = [], v.addEventListener("dataavailable", (i) => {
1107
+ _.value.push(i.data);
1108
+ }), v.addEventListener("stop", () => $e(this, null, function* () {
1109
+ if (h.value) {
1110
+ const i = new Blob(_.value, { type: u.audioType || "audio/wav" });
1111
+ h.value.src = URL.createObjectURL(i);
1112
+ }
1113
+ r.value = !1, a && (yield p());
1114
+ })), v.start(), r.value = !0, m = window.setInterval(() => {
1115
+ s.value++;
1116
+ }, 1e3);
1117
+ } catch (i) {
1118
+ xt.error(l("麦克风启用失败,请确认是否开启麦克风权限"));
1119
+ }
1120
+ });
1121
+ }
1122
+ function n() {
1123
+ y.value && v ? (v.stop(), y.value.getTracks().forEach((i) => i.stop()), v = null, y.value = void 0) : (v = null, y.value = void 0), r.value = !1, m && (clearInterval(m), m = 0), s.value = 0;
1124
+ }
1125
+ function f(i) {
1126
+ t.value = !0, h.value = i, _.value = [], a = !1;
1127
+ }
1128
+ function b() {
1129
+ r.value && n(), t.value = !1, r.value = !1, a = !1;
1130
+ }
1131
+ function g() {
1132
+ return $e(this, null, function* () {
1133
+ if (!r.value && !_.value.length) {
1134
+ xt.error(l("请先录音"));
1135
+ return;
1136
+ }
1137
+ r.value && n(), r.value = !1, a = !0, _.value.length && (yield p()), t.value = !1;
1138
+ });
1139
+ }
1140
+ function p() {
1141
+ return $e(this, null, function* () {
1142
+ if (u.uploadHandle && h.value) {
1143
+ const i = Et.service({
1144
+ text: l("录音上传中")
1145
+ }), V = new Blob(_.value, { type: u.audioType || "audio/wav" });
1146
+ _.value = [];
1147
+ try {
1148
+ yield u.uploadHandle(u.slide, h.value, V).then((B) => {
1149
+ h.value.src = B;
1150
+ }), i.close(), e(h.value);
1151
+ } catch (B) {
1152
+ i.close();
1153
+ }
1154
+ }
1155
+ });
1156
+ }
1157
+ return {
1158
+ voiceVisible: t,
1159
+ voiceForm: h,
1160
+ recordTime: s,
1161
+ isRecording: r,
1162
+ drawVoice: d,
1163
+ startRecording: c,
1164
+ stopRecording: n,
1165
+ initVoice: f,
1166
+ cancelRecord: b,
1167
+ confirmRecord: g
1168
+ };
1169
+ }
1170
+ function so(u, e, l) {
1171
+ const t = T([]), y = T(0), v = T(!1);
1172
+ let r = null;
1173
+ ee(() => {
1174
+ var c;
1175
+ return (c = u.analysis) == null ? void 0 : c.hotmap_path;
1176
+ }, (c) => {
1177
+ var n, f, b;
1178
+ if ((f = (n = e.value) == null ? void 0 : n.viewer) != null && f.world) {
1179
+ y.value = 0;
1180
+ const g = e.value.viewer.world.getItemAt(0);
1181
+ g && (g.tilesMatrix = {}, g.draw());
1182
+ }
1183
+ c && ((b = u.analysis) != null && b.zoom_roi) && l({
1184
+ x: u.analysis.zoom_roi.x,
1185
+ y: u.analysis.zoom_roi.y,
1186
+ width: u.analysis.zoom_roi.w,
1187
+ height: u.analysis.zoom_roi.h
1188
+ }, 5);
1189
+ }), he(() => {
1190
+ window.addEventListener("mousemove", _), window.addEventListener("mouseup", a);
1191
+ }), Ie(() => {
1192
+ window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", a);
1193
+ });
1194
+ function s(c, n, f) {
1195
+ var g, p, i, V;
1196
+ const b = we(W({}, n), {
1197
+ file: (g = u.analysis) == null ? void 0 : g.hotmap_path
1198
+ });
1199
+ if ((p = u.analysis) != null && p.hotmap_info) {
1200
+ if (f[n.x + "_" + n.y + "_" + Number(n.scale)])
1201
+ if (((i = u.analysis) == null ? void 0 : i.hotmap_type) === "drag")
1202
+ m(c, b);
1203
+ else
1204
+ return u.tileHandle(b);
1205
+ } else if (((V = u.analysis) == null ? void 0 : V.hotmap_type) === "drag")
1206
+ m(c, b);
1207
+ else
1208
+ return u.tileHandle(b);
1209
+ return c;
1210
+ }
1211
+ function m(c, n) {
1212
+ const f = t.value.find((b) => b.url === c) || {
1213
+ url: c,
1214
+ x: n.x,
1215
+ y: n.y,
1216
+ img: void 0,
1217
+ load: ""
1218
+ };
1219
+ if (!(f != null && f.img) && (t.value.push(f), f.load !== "success")) {
1220
+ const b = new Image();
1221
+ b.src = u.tileHandle(n), b.onload = () => {
1222
+ f.load = "success";
1223
+ }, f.img = b;
1224
+ }
1225
+ }
1226
+ function _(c) {
1227
+ v.value && r && (y.value += c.x - r.x, y.value < 0 ? y.value = 0 : y.value > e.value.$options.width && (y.value = e.value.$options.width, v.value = !1), e.value.viewer.forceRedraw()), r = { x: c.x, y: c.y };
1228
+ }
1229
+ function h(c) {
1230
+ const { x: n, y: f } = c;
1231
+ v.value = !0, r = { x: n, y: f };
1232
+ }
1233
+ function a() {
1234
+ v.value = !1, r = null;
1235
+ }
1236
+ function d(c) {
1237
+ const {
1238
+ context: n,
1239
+ sourceWidth: f,
1240
+ sourceHeight: b,
1241
+ position: g,
1242
+ size: p,
1243
+ initRendered: i,
1244
+ tile: V,
1245
+ pixelDensityRatio: B
1246
+ } = c, P = V.getUrl(), te = y.value * B, ie = g.original.x;
1247
+ if (ie < te && ie + p.x > te) {
1248
+ const j = te - ie, ue = p.x - j, ae = t.value.find((Se) => Se.url === P), Me = (ae == null ? void 0 : ae.load) === "success" ? ae.img : i.canvas;
1249
+ n.drawImage(
1250
+ Me,
1251
+ 0,
1252
+ 0,
1253
+ f * j / p.x,
1254
+ b,
1255
+ g.x,
1256
+ g.y,
1257
+ j,
1258
+ p.y
1259
+ ), n.drawImage(
1260
+ i.canvas,
1261
+ f * j / p.x,
1262
+ 0,
1263
+ f * ue / p.x,
1264
+ b,
1265
+ g.x + j,
1266
+ g.y,
1267
+ ue,
1268
+ p.y
1269
+ );
1270
+ } else if (ie + p.x <= te) {
1271
+ const j = t.value.find((ae) => ae.url === P), ue = (j == null ? void 0 : j.load) === "success" ? j.img : i.canvas;
1272
+ n.drawImage(
1273
+ ue,
1274
+ 0,
1275
+ 0,
1276
+ f,
1277
+ b,
1278
+ g.x,
1279
+ g.y,
1280
+ p.x,
1281
+ p.y
1282
+ );
1283
+ } else ie >= te && n.drawImage(
1284
+ i.canvas,
1285
+ 0,
1286
+ 0,
1287
+ f,
1288
+ b,
1289
+ g.x,
1290
+ g.y,
1291
+ p.x,
1292
+ p.y
1293
+ );
1294
+ }
1295
+ return {
1296
+ getHotmapUrl: s,
1297
+ hotmapImgs: t,
1298
+ handlerImage: d,
1299
+ hotmapLine: y,
1300
+ lineMouseDown: h
1301
+ };
1302
+ }
1303
+ function io(u, e, l) {
1304
+ const t = sl(), y = T(!1), v = new BroadcastChannel("sync_kfb_view");
1305
+ v.onmessage = (a) => {
1306
+ const d = a.data;
1307
+ _(d);
1308
+ }, he(() => {
1309
+ var a, d, c;
1310
+ (a = l.value) == null || a.addEventListener("mouseenter", r), (d = l.value) == null || d.addEventListener("mousemove", r), (c = l.value) == null || c.addEventListener("mouseleave", s);
1311
+ }), Ie(() => {
1312
+ var a, d, c;
1313
+ (a = l.value) == null || a.removeEventListener("mouseenter", r), (d = l.value) == null || d.removeEventListener("mousemove", r), (c = l.value) == null || c.removeEventListener("mouseleave", s), v.close();
1314
+ });
1315
+ function r() {
1316
+ y.value = !0;
1317
+ }
1318
+ function s() {
1319
+ y.value = !1;
1320
+ }
1321
+ function m() {
1322
+ let a;
1323
+ e.value.viewer.addHandler("pan", (d) => {
1324
+ var f, b, g, p;
1325
+ if (!a) {
1326
+ a = (b = (f = d.center) == null ? void 0 : f.clone) == null ? void 0 : b.call(f);
1327
+ return;
1328
+ }
1329
+ const c = d.center, n = (g = c == null ? void 0 : c.minus) == null ? void 0 : g.call(c, a);
1330
+ a = (p = c == null ? void 0 : c.clone) == null ? void 0 : p.call(c), u.syncPosition && h({
1331
+ position: n,
1332
+ type: "sync_position"
1333
+ });
1334
+ }), e.value.viewer.addHandler("zoom", (d) => {
1335
+ u.syncZoom && h({
1336
+ zoom: d.zoom,
1337
+ type: "sync_zoom"
1338
+ });
1339
+ }), e.value.viewer.addHandler("animation-finish", () => {
1340
+ var n;
1341
+ if (u.syncZoom && h({
1342
+ zoom: e.value.viewer.viewport.getZoom(!0),
1343
+ type: "sync_zoom"
1344
+ }), !a)
1345
+ return;
1346
+ const d = e.value.viewer.viewport.getCenter(!0), c = (n = d == null ? void 0 : d.minus) == null ? void 0 : n.call(d, a);
1347
+ a = void 0, u.syncPosition && h({
1348
+ position: c,
1349
+ type: "sync_position"
1350
+ });
1351
+ });
1352
+ }
1353
+ function _(a) {
1354
+ a.uuid && a.type === "sync_position" && a.uuid !== (t == null ? void 0 : t.uid) ? e.value && e.value.viewer.viewport.panBy(a.position, !0) : a.uuid && a.type === "sync_zoom" && a.uuid !== (t == null ? void 0 : t.uid) && e.value && e.value.viewer.viewport.zoomTo(a.zoom);
1355
+ }
1356
+ function h(a) {
1357
+ var d;
1358
+ y.value && v.postMessage(we(W({}, a), {
1359
+ uuid: t == null ? void 0 : t.uid,
1360
+ fileName: (d = u.slide) == null ? void 0 : d.file
1361
+ }));
1362
+ }
1363
+ return {
1364
+ initSync: m
1365
+ };
1366
+ }
1367
+ const ro = { class: "hzzt-kfb-keyword flex wrap" }, uo = ["onMouseenter"], co = /* @__PURE__ */ J({
1368
+ __name: "KfbKeyword",
1369
+ setup(u) {
1370
+ const e = T([
1371
+ { code: "Q", icon: "zoomIn" },
1372
+ { code: "W", icon: "arrowUp" },
1373
+ { code: "E", icon: "zoomOut" },
1374
+ { code: "A", icon: "arrowLeft" },
1375
+ { code: "S", icon: "arrowDown" },
1376
+ { code: "D", icon: "arrowRight" }
1377
+ ]), l = Z("kfbView", T({}));
1378
+ let t = null;
1379
+ function y(r, s) {
1380
+ r.preventDefault(), t && clearTimeout(t), t = setInterval(() => {
1381
+ s === "E" && (l.value.viewer.viewport.zoomBy(1.1), l.value.viewer.viewport.applyConstraints()), s === "Q" && (l.value.viewer.viewport.zoomBy(0.9), l.value.viewer.viewport.applyConstraints()), s === "W" && (l.value.viewer.viewport.panBy(l.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(0, -40))), l.value.viewer.viewport.applyConstraints()), s === "S" && (l.value.viewer.viewport.panBy(l.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(0, 40))), l.value.viewer.viewport.applyConstraints()), s === "A" && (l.value.viewer.viewport.panBy(l.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(-40, 0))), l.value.viewer.viewport.applyConstraints()), s === "D" && (l.value.viewer.viewport.panBy(l.value.viewer.viewport.deltaPointsFromPixels(new xe.Point(40, 0))), l.value.viewer.viewport.applyConstraints());
1382
+ }, 120);
1383
+ }
1384
+ function v() {
1385
+ t && (clearInterval(t), t = null);
1386
+ }
1387
+ return Ie(() => {
1388
+ clearTimeout(t);
1389
+ }), (r, s) => (w(), L("div", ro, [
1390
+ (w(!0), L(le, null, oe(e.value, (m) => (w(), L("div", {
1391
+ key: m.code,
1392
+ class: "hzzt-kfb-keyword__code flex column align-items-center justify-content-center",
1393
+ onMouseenter: (_) => y(_, m.code),
1394
+ onMouseleave: v
1395
+ }, [
1396
+ k("p", null, E(m.code), 1),
1397
+ C(Q, {
1398
+ size: "14",
1399
+ name: m.icon
1400
+ }, null, 8, ["name"])
1401
+ ], 40, uo))), 128))
1402
+ ]));
1403
+ }
1404
+ }), vo = /* @__PURE__ */ ge(co, [["__scopeId", "data-v-c8d940f0"]]);
1405
+ function fo(u, e, l = {}) {
1406
+ const {
1407
+ panSensitivity: t = 0.2,
1408
+ // 值越大,鼠标移动时图像移动越快
1409
+ zoomSensitivity: y = 1.1,
1410
+ // 值越大,滚轮缩放幅度越大
1411
+ damping: v = 0.6,
1412
+ // 值越大,惯性滑动时间越长
1413
+ minThreshold: r = 0.05
1414
+ // 值越小,停止移动时的精度越高
1415
+ } = l;
1416
+ let s = !1, m = null, _ = 0, h = 0, a = !1;
1417
+ const d = () => {
1418
+ s = document.pointerLockElement === e.value, s || c();
1419
+ }, c = () => {
1420
+ _ = 0, h = 0, m && (cancelAnimationFrame(m), m = null), a = !1;
1421
+ }, n = (i) => $e(this, null, function* () {
1422
+ try {
1423
+ i.key === "l" && e.value && (document.pointerLockElement ? (document.exitPointerLock(), console.log("鼠标已解锁!")) : (yield e.value.requestPointerLock(), console.log("鼠标已锁定!")));
1424
+ } catch (V) {
1425
+ console.error("无法锁定鼠标:", V);
1426
+ }
1427
+ }), f = (i) => {
1428
+ if (s) {
1429
+ i.preventDefault();
1430
+ const V = Math.pow(y, Math.sign(i.deltaY) * -1);
1431
+ u.value.viewer.viewport.zoomBy(V), u.value.viewer.viewport.applyConstraints();
1432
+ }
1433
+ }, b = (i) => {
1434
+ s && (_ += i.movementX * t, h += i.movementY * t, !a && (Math.abs(_) > 1 || Math.abs(h) > 1) && (a = !0, m = requestAnimationFrame(g)));
1435
+ }, g = () => {
1436
+ const i = u.value.viewer.viewport;
1437
+ if (Math.abs(_) > r || Math.abs(h) > r) {
1438
+ const V = i.deltaPointsFromPixels(
1439
+ new xe.Point(_, h)
1440
+ );
1441
+ i.panBy(V), i.applyConstraints();
1442
+ }
1443
+ _ *= v, h *= v, Math.abs(_) > r || Math.abs(h) > r ? m = requestAnimationFrame(g) : c();
1444
+ }, p = () => {
1445
+ s && document.exitPointerLock();
1446
+ };
1447
+ return he(() => {
1448
+ var i;
1449
+ (i = e.value) == null || i.addEventListener("keydown", n), document.addEventListener("wheel", f, { passive: !1 }), document.addEventListener("click", p), document.addEventListener("mousemove", b), document.addEventListener("pointerlockchange", d);
1450
+ }), Ie(() => {
1451
+ var i;
1452
+ (i = e.value) == null || i.removeEventListener("keydown", n), document.removeEventListener("click", p), document.removeEventListener("wheel", f), document.removeEventListener("mousemove", b), document.removeEventListener("pointerlockchange", d), c();
1453
+ }), {
1454
+ setConfig: (i) => {
1455
+ Object.assign(l, i);
1456
+ }
1457
+ };
1458
+ }
1459
+ const mo = /* @__PURE__ */ J({
1460
+ __name: "KfbLevel",
1461
+ props: /* @__PURE__ */ be({
1462
+ slides: { default: () => [] }
1463
+ }, {
1464
+ "model-value": {
1465
+ default: 0
1466
+ },
1467
+ "model-valueModifiers": {}
1468
+ }),
1469
+ emits: ["update:model-value"],
1470
+ setup(u) {
1471
+ const e = u, l = Be(u, "model-value"), t = Z("kfbView", T({})), y = N(() => Array.from(new Array(e.slides.length + 1)).map((r, s) => s));
1472
+ function v() {
1473
+ const r = t.value.viewer.world.getItemAt(0), s = Object.keys(r.tilesMatrix);
1474
+ s.forEach((m, _) => {
1475
+ _ > s.length - 4 && (r.tilesMatrix[m] = {});
1476
+ }), r.draw();
1477
+ }
1478
+ return (r, s) => (w(), L("div", {
1479
+ class: ke(["hzzt-kfb-level flex column align-items-center", r.slides.length > 5 ? "hzzt-kfb-level--large" : ""])
1480
+ }, [
1481
+ C(Q, {
1482
+ name: "level",
1483
+ size: "24",
1484
+ class: "margin-b-4 margin-t-2"
1485
+ }),
1486
+ C(o(cl), {
1487
+ modelValue: l.value,
1488
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => l.value = m),
1489
+ vertical: "",
1490
+ min: y.value[0],
1491
+ step: 1,
1492
+ max: y.value[y.value.length - 1],
1493
+ "show-stops": "",
1494
+ "show-tooltip": !0,
1495
+ placement: "left",
1496
+ height: r.slides.length > 5 ? "180px" : "130px",
1497
+ onInput: v
1498
+ }, null, 8, ["modelValue", "min", "max", "height"])
1499
+ ], 2));
1500
+ }
1501
+ }), po = {
1502
+ key: 0,
1503
+ class: "flex hzzt-kfb-channel"
1504
+ }, ho = ["onClick"], go = /* @__PURE__ */ J({
1505
+ __name: "KfbChannel",
1506
+ props: /* @__PURE__ */ be({
1507
+ info: {}
1508
+ }, {
1509
+ "model-value": {
1510
+ default: () => []
1511
+ },
1512
+ "model-valueModifiers": {}
1513
+ }),
1514
+ emits: /* @__PURE__ */ be(["load"], ["update:model-value"]),
1515
+ setup(u, { emit: e }) {
1516
+ const l = u, t = e, y = Be(u, "model-value"), v = [
1517
+ { key: "DAPI", color: "#4A6CF7" },
1518
+ { key: "480", color: "#00BFFF" },
1519
+ { key: "520", color: "#32CD32" },
1520
+ { key: "570", color: "#FFAA33" },
1521
+ { key: "620", color: "#FF6347" },
1522
+ { key: "670", color: "#DC143C" },
1523
+ { key: "780", color: "#4B0082" }
1524
+ ], r = N(() => {
1525
+ var m;
1526
+ return (((m = l.info) == null ? void 0 : m.channel) || []).map((_) => {
1527
+ const h = v.find((a) => a.key === _.eqt_num);
1528
+ return {
1529
+ label: _.eqt_num,
1530
+ color: _.r ? `rgb(${_.r}, ${_.g}, ${_.b})` : h == null ? void 0 : h.color
1531
+ };
1532
+ });
1533
+ });
1534
+ function s(m) {
1535
+ y.value.includes(m) ? y.value = y.value.filter((_) => _ !== m) : y.value.push(m), t("load");
1536
+ }
1537
+ return (m, _) => r.value.length > 0 ? (w(), L("div", po, [
1538
+ C(Q, {
1539
+ name: "channel",
1540
+ size: "32"
1541
+ }),
1542
+ (w(!0), L(le, null, oe(r.value, (h) => (w(), L("div", {
1543
+ key: h.label,
1544
+ style: q({ background: h.color }),
1545
+ class: ke(["hzzt-kfb-channel__box", y.value.includes(h.label) ? "" : "hzzt-kfb-channel__box--unactive"]),
1546
+ onClick: (a) => s(h.label)
1547
+ }, E(h.label), 15, ho))), 128))
1548
+ ])) : R("", !0);
1549
+ }
1550
+ }), yo = { class: "flex align-items-center justify-content-between" }, wo = { class: "hzzt-kfb-title" }, _o = { class: "hzzt-kfb-annotation__container flex-1" }, bo = ["onClick"], ko = /* @__PURE__ */ J({
1551
+ __name: "KfbAnnotation",
1552
+ props: /* @__PURE__ */ be({
1553
+ annotation: {},
1554
+ annotations: {}
1555
+ }, {
1556
+ expand: { type: Boolean },
1557
+ expandModifiers: {}
1558
+ }),
1559
+ emits: /* @__PURE__ */ be(["select"], ["update:expand"]),
1560
+ setup(u, { emit: e }) {
1561
+ const l = Be(u, "expand"), t = e, { t: y } = re();
1562
+ function v(s) {
1563
+ const m = s.subType || s.tool || "";
1564
+ return `mark${m.substring(0, 1).toLocaleUpperCase()}${m.substring(1)}`;
1565
+ }
1566
+ function r(s) {
1567
+ t("select", s);
1568
+ }
1569
+ return (s, m) => (w(), L("div", {
1570
+ class: ke(["hzzt-kfb-annotation flex column", l.value ? "hzzt-kfb-annotation--expand" : ""])
1571
+ }, [
1572
+ k("div", yo, [
1573
+ Le(k("div", wo, [
1574
+ k("span", null, E(o(y)("标注列表")), 1)
1575
+ ], 512), [
1576
+ [Ae, l.value]
1577
+ ]),
1578
+ C(Q, {
1579
+ class: "hzzt-kfb-annotation__icon",
1580
+ name: l.value ? "expandLeft" : "expandRight",
1581
+ onClick: m[0] || (m[0] = (_) => l.value = !l.value)
1582
+ }, null, 8, ["name"])
1583
+ ]),
1584
+ Le(k("div", _o, [
1585
+ (w(!0), L(le, null, oe(s.annotations, (_, h) => {
1586
+ var a;
1587
+ return w(), L("div", {
1588
+ class: ke(["hzzt-kfb-annotation__item", ((a = s.annotation) == null ? void 0 : a.id) === _.id ? "hzzt-kfb-annotation__item--active" : ""]),
1589
+ key: h,
1590
+ onClick: (d) => r(_)
1591
+ }, [
1592
+ C(Q, {
1593
+ size: "16",
1594
+ name: v(_)
1595
+ }, null, 8, ["name"]),
1596
+ k("span", null, E(o(y)("标注")) + E(h + 1), 1)
1597
+ ], 10, bo);
1598
+ }), 128))
1599
+ ], 512), [
1600
+ [Ae, l.value]
1601
+ ])
1602
+ ], 2));
1603
+ }
1604
+ }), zo = /* @__PURE__ */ ge(ko, [["__scopeId", "data-v-bfc56a3e"]]);
1605
+ function St(u) {
1606
+ const { t: e } = re();
1607
+ return N(() => {
1608
+ var y;
1609
+ const t = ((y = u == null ? void 0 : u.analysis) == null ? void 0 : y.result) || "";
1610
+ return t.indexOf("疑似阳性") > -1 ? {
1611
+ type: "warning",
1612
+ name: t
1613
+ } : t.indexOf("阳性") > -1 ? {
1614
+ type: "danger",
1615
+ name: t
1616
+ } : t.indexOf("阴性") > -1 ? {
1617
+ type: "success",
1618
+ name: t
1619
+ } : t.indexOf("不合格") > -1 ? {
1620
+ type: "danger",
1621
+ name: t
1622
+ } : t.indexOf("合格") > -1 ? {
1623
+ type: "success",
1624
+ name: t
1625
+ } : {
1626
+ type: "info",
1627
+ name: t || e("未知")
1628
+ };
1629
+ });
1630
+ }
1631
+ const Co = ["element-loading-text"], $o = {
1632
+ key: 1,
1633
+ class: "hzzt-kfb-view__main flex align-items-center justify-content-center"
1634
+ }, To = {
1635
+ class: "hzzt-kfb-view__filter",
1636
+ height: "0",
1637
+ width: "0"
1638
+ }, xo = { id: "colorMatrixFilter" }, Lo = ["values"], Eo = ["values"], Vo = ["exponent"], Io = ["exponent"], Mo = ["exponent"], So = { class: "flex nowrap justify-content-center overflow-hidden" }, Ho = ["src"], Po = ["src"], Ro = { class: "flex-1" }, Ao = { class: "flex-1" }, No = { class: "flex-1" }, Bo = { class: "flex-1" }, Do = { class: "flex-1" }, Uo = { class: "flex-1" }, Fo = ["src"], Ko = {
1639
+ key: 2,
1640
+ class: "margin-l-2"
1641
+ }, jo = {
1642
+ key: 9,
1643
+ class: "hzzt-kfb-view__watermark"
1644
+ }, Ne = /* @__PURE__ */ J({
1645
+ name: "HzztKfbView",
1646
+ __name: "index",
1647
+ props: {
1648
+ slide: {},
1649
+ fileHandle: {},
1650
+ labelHandle: {},
1651
+ tileHandle: {},
1652
+ navigatorHandle: {},
1653
+ pathologyHandle: {},
1654
+ uploadHandle: {},
1655
+ options: {},
1656
+ labelDrawing: {},
1657
+ process: { default: () => W({}, Mt) },
1658
+ microscope: { default: () => W({}, st) },
1659
+ menus: {},
1660
+ syncPosition: { type: Boolean },
1661
+ syncZoom: { type: Boolean },
1662
+ audioType: {},
1663
+ watermark: {},
1664
+ analysis: {},
1665
+ aiLabelList: {}
1666
+ },
1667
+ emits: ["tool"],
1668
+ setup(u, { expose: e, emit: l }) {
1669
+ il((z) => ({
1670
+ "7ea95e8e": ie.value
1671
+ }));
1672
+ const t = u, y = l, { t: v, locale: r } = re(), s = T(), m = T(), _ = T(), h = T(!1), a = T({}), d = T(!1), c = T(0), n = T(0), f = T(0), b = T([]), g = T({
1673
+ width: 0,
1674
+ height: 0,
1675
+ fileNum: 0,
1676
+ scanScale: 1,
1677
+ fileName: "",
1678
+ ratiomap: {}
1679
+ }), p = Z("show-kfb-label", T(!0)), i = Z("show-keyboard", T(!1)), V = Z("show-watermark", T(!1)), B = T(!1), P = Et.directive;
1680
+ ee(() => {
1681
+ var z;
1682
+ return (z = t.slide) == null ? void 0 : z.file;
1683
+ }, () => {
1684
+ Wt(), setTimeout(() => {
1685
+ ft();
1686
+ }, 100);
1687
+ }), he(() => {
1688
+ ft();
1689
+ });
1690
+ const te = St(t), ie = N(() => {
1691
+ var z, M;
1692
+ 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='${((z = t.watermark) == null ? void 0 : z.color) || "rgba(0,0,0,0.2)"}' transform='rotate(-30)' text-anchor='middle'>${((M = t.watermark) == null ? void 0 : M.text) || "水印文字"}</text></svg>")`;
1693
+ }), {
1694
+ imageProcess: j,
1695
+ matrixValues: ue,
1696
+ saturateValues: ae,
1697
+ forceRedraw: Me
1698
+ } = Il(t), {
1699
+ tailorEvent: Se,
1700
+ shotScreen: ye
1701
+ } = Ml(y, a), {
1702
+ moveEvent: De,
1703
+ fastMove: Ye
1704
+ } = lo(a, n), { initSync: Xe } = io(t, a, s);
1705
+ fo(a, s);
1706
+ const { drawDot: Qe } = ao(), {
1707
+ voiceVisible: He,
1708
+ voiceForm: Pe,
1709
+ drawVoice: Je,
1710
+ recordTime: $,
1711
+ isRecording: A,
1712
+ startRecording: F,
1713
+ stopRecording: ce,
1714
+ initVoice: ut,
1715
+ cancelRecord: Ht,
1716
+ confirmRecord: Pt
1717
+ } = no(t, Dt), {
1718
+ currentLabel: et,
1719
+ localLabelList: ct,
1720
+ initLabel: Rt,
1721
+ jumpToLabel: dt,
1722
+ reloadLabelList: At,
1723
+ eventHandel: Nt,
1724
+ addHandle: Bt
1725
+ } = oo(t, y, a, ut, tt);
1726
+ function Dt(z) {
1727
+ Bt(z);
1728
+ }
1729
+ const {
1730
+ getHotmapUrl: Ut,
1731
+ handlerImage: Ft,
1732
+ hotmapLine: Kt,
1733
+ lineMouseDown: vt,
1734
+ hotmapImgs: jt
1735
+ } = so(t, a, lt);
1736
+ function ft() {
1737
+ var z;
1738
+ (z = t.slide) != null && z.file && t.fileHandle && (d.value || (d.value = !0, t.fileHandle(t.slide).then((M) => {
1739
+ var Y, ne, me, O;
1740
+ g.value = M, b.value = (((Y = g.value) == null ? void 0 : Y.channel) || []).map((U) => U.eqt_num), a.value = new ve(W({
1741
+ el: m.value,
1742
+ fileName: (ne = t.slide) == null ? void 0 : ne.file,
1743
+ scale: g.value.scanScale,
1744
+ lang: (r == null ? void 0 : r.value) === "en-US" ? "en" : r == null ? void 0 : r.value,
1745
+ navigator: {
1746
+ style: "left: 0;bottom: 0",
1747
+ thumbnail: g.value.thumbnailImg,
1748
+ width: 200,
1749
+ height: 180
1750
+ },
1751
+ grid: {
1752
+ show: !1,
1753
+ ruler: !1,
1754
+ pxConversion: !0
1755
+ },
1756
+ thumb: {
1757
+ bgColor: "rgba(0,0,0,0)"
1758
+ },
1759
+ graduation: {
1760
+ show: !0,
1761
+ right: 120,
1762
+ bottom: (O = (me = g.value) == null ? void 0 : me.channel) != null && O.length ? 120 : 30,
1763
+ tick: {
1764
+ number: 3,
1765
+ height: 8
1766
+ }
1767
+ },
1768
+ pxConversion: {
1769
+ units: ["um", "mm"],
1770
+ binary: 1e3,
1771
+ imageCapRes: g.value.imageCapRes || g.value.scanResolution || 1
1772
+ },
1773
+ openSeadragonOptions: {
1774
+ maxZoomLevel: g.value.scanScale * 20,
1775
+ pixelsPerArrowPress: 200,
1776
+ animationTime: 0,
1777
+ tileSources: mt()
1778
+ },
1779
+ tileDrawing: Ft,
1780
+ label: {
1781
+ drawing: (U, D, Ce) => {
1782
+ var Ue;
1783
+ if (D != null && D.custom) {
1784
+ const X = U.getContext("2d");
1785
+ X.save(), X.beginPath();
1786
+ const Re = (D == null ? void 0 : D.subType) || ((Ue = D == null ? void 0 : D.__data__) == null ? void 0 : Ue.subType);
1787
+ Re === "count" ? (X.translate(Ce.x - 14, Ce.y - 22), Qe(X, (D == null ? void 0 : D.strokeStyle) || "")) : Re === "voice" ? (X.translate(Ce.x - 16, Ce.y - 18), Je(X, (D == null ? void 0 : D.strokeStyle) || "")) : t.labelDrawing && t.labelDrawing(X, D), X.restore();
1788
+ }
1789
+ }
1790
+ }
1791
+ }, t.options || {})), a.value.viewer.drawer.canvas.style.filter = "url(#colorMatrixFilter)", Rt(), Gt(), Xe(), setTimeout(() => {
1792
+ var U, D;
1793
+ (U = t.analysis) != null && U.hotmap_path && ((D = t.analysis) != null && D.zoom_roi) && lt({
1794
+ x: t.analysis.zoom_roi.x,
1795
+ y: t.analysis.zoom_roi.y,
1796
+ width: t.analysis.zoom_roi.w,
1797
+ height: t.analysis.zoom_roi.h
1798
+ }, 5);
1799
+ }, 200);
1800
+ }).finally(() => {
1801
+ d.value = !1, p.value || (yt({
1802
+ show: !1,
1803
+ ruler: !1
1804
+ }), wt({
1805
+ show: !1
1806
+ }), setTimeout(() => {
1807
+ _t(!1);
1808
+ }, 100));
1809
+ })));
1810
+ }
1811
+ function Ot() {
1812
+ const z = a.value.viewer;
1813
+ if (z.world) {
1814
+ const M = z.world.getItemAt(0), Y = z.viewport.getZoom(), ne = z.viewport.getCenter();
1815
+ z.world.removeItem(M), z.addTiledImage({
1816
+ tileSource: mt(),
1817
+ success: function() {
1818
+ z.viewport.zoomTo(Y), z.viewport.panTo(ne);
1819
+ }
1820
+ });
1821
+ }
1822
+ }
1823
+ function mt() {
1824
+ var me, O;
1825
+ const z = g.value.tileWidth || g.value.imageBlockLen || 256, M = g.value.tileHeight || g.value.imageBlockLen || 256, Y = {};
1826
+ (me = t.analysis) != null && me.hotmap_path && (((O = t.analysis) == null ? void 0 : O.hotmap_info) || []).forEach((U) => {
1827
+ Y[U[0] / z + "_" + U[1] / M + "_" + U[2]] = !0;
1828
+ });
1829
+ let ne = 10;
1830
+ return Object.keys(g.value.ratiomap).forEach((U) => {
1831
+ const D = g.value.fileNum - Math.sqrt(g.value.scanScale / Number(U));
1832
+ D > 0 && (ne = ne ? Math.min(ne, D) : D);
1833
+ }), {
1834
+ height: g.value.height,
1835
+ width: g.value.width,
1836
+ tileWidth: z,
1837
+ tileHeight: M,
1838
+ minLevel: Math.floor(ne || 8),
1839
+ getTileUrl: (U, D, Ce) => {
1840
+ var bt, kt, zt, Ct;
1841
+ const Ue = U, X = {
1842
+ file: ((bt = t.slide) == null ? void 0 : bt.file) || "",
1843
+ x: D,
1844
+ y: Ce,
1845
+ scale: "0",
1846
+ level: U,
1847
+ channel: JSON.stringify(b.value)
1848
+ };
1849
+ g.value.fileNum === U ? (U = g.value.scanScale, X.scale = U.toFixed(6)) : (U = g.value.scanScale / Math.pow(2, g.value.fileNum - U), X.scale = U.toFixed(6)), X.level = Ue, X.file = f.value === 0 ? X.file : ((zt = (kt = t.slide) == null ? void 0 : kt.children) == null ? void 0 : zt[f.value - 1]) || "";
1850
+ const Re = t.tileHandle(X);
1851
+ return (Ct = t.analysis) != null && Ct.hotmap_path ? Ut(Re, X, Y) : Re;
1852
+ }
1853
+ };
1854
+ }
1855
+ function Gt() {
1856
+ a.value.viewer.addHandler("rotate", (z) => {
1857
+ c.value = z.degrees || 0;
1858
+ }), a.value.viewer.addHandler("zoom", (z) => {
1859
+ const M = a.value.viewer.viewport.viewportToImageZoom(
1860
+ z.zoom || 0
1861
+ ) * Number(a.value.$options.scale);
1862
+ n.value = Number(M.toFixed(2));
1863
+ }), a.value.$on(ve.events.EVENT_NAVIGATOR_VESTIGE, (z) => {
1864
+ t.navigatorHandle && t.navigatorHandle("add", t.slide, z);
1865
+ }), t.navigatorHandle && t.navigatorHandle("list", t.slide).then((z) => {
1866
+ var M, Y;
1867
+ (Y = (M = a.value.navigator) == null ? void 0 : M.drawPointList) == null || Y.call(M, z);
1868
+ }), Se(), De();
1869
+ }
1870
+ function Wt() {
1871
+ var z;
1872
+ (z = a.value) != null && z.destroy && (a.value.destroy(), a.value = {}, g.value = {
1873
+ width: 0,
1874
+ height: 0,
1875
+ fileNum: 0,
1876
+ scanScale: 1,
1877
+ fileName: "",
1878
+ ratiomap: {}
1879
+ }, jt.value = [], b.value = [], n.value = 0, c.value = 0, f.value = 0);
1880
+ }
1881
+ function pt(z, M) {
1882
+ z === "annotate" ? ht(M) : z === "tailor" ? ye(M) : z === "info" ? h.value = !0 : z === "flip" ? gt() : z === "delete" ? Nt("delete")(et.value) : y("tool", z, M);
1883
+ }
1884
+ function ht(z) {
1885
+ z.tool === "Voice" && (z.subType = "voice", z.tool = "Dot", z.custom = !0), a.value.board.startDraw(z);
1886
+ }
1887
+ function qt() {
1888
+ a.value.board.endDraw();
1889
+ }
1890
+ function gt() {
1891
+ a.value.viewer.viewport.toggleFlip();
1892
+ }
1893
+ function Zt(z) {
1894
+ var M, Y;
1895
+ (Y = (M = _.value) == null ? void 0 : M.scopeChange) == null || Y.call(M, z);
1896
+ }
1897
+ function Yt() {
1898
+ h.value = !0;
1899
+ }
1900
+ function yt(z) {
1901
+ a.value.grid.updated(z);
1902
+ }
1903
+ function wt(z) {
1904
+ a.value.graduation.updated(z);
1905
+ }
1906
+ function _t(z) {
1907
+ a.value.navigator.element.style.display = z ? "flex" : "none";
1908
+ }
1909
+ function tt(z) {
1910
+ const M = a.value.viewer.viewport.imageToViewportZoom(Number(z / a.value.$options.scale));
1911
+ a.value.viewer.viewport.zoomTo(M);
1912
+ }
1913
+ function lt(z, M) {
1914
+ a.value.area && (a.value.area.moveToLabel(a.value.viewer.viewport.imageToViewportCoordinates(
1915
+ z.x + z.width / 2,
1916
+ z.y + z.height / 2
1917
+ )), tt(M));
1918
+ }
1919
+ return de("kfbView", a), de("currentLabel", et), e({
1920
+ kfbView: a,
1921
+ degrees: c,
1922
+ zoom: n,
1923
+ forceRedraw: Me,
1924
+ toggleFlip: gt,
1925
+ startDraw: ht,
1926
+ endDraw: qt,
1927
+ shotScreen: ye,
1928
+ info: Yt,
1929
+ scopeChange: Zt,
1930
+ updateGrid: yt,
1931
+ updateGraduation: wt,
1932
+ updateNavigator: _t,
1933
+ fastMove: Ye,
1934
+ zoomTo: tt,
1935
+ jumpToLabel: dt,
1936
+ jumpToPosition: lt,
1937
+ reloadLabelList: At
1938
+ }), (z, M) => {
1939
+ var Y, ne, me;
1940
+ return w(), L("div", {
1941
+ ref_key: "mainKfbViewRef",
1942
+ ref: s,
1943
+ class: "hzzt-kfb-view"
1944
+ }, [
1945
+ z.slide.file ? Le((w(), L("div", {
1946
+ key: 0,
1947
+ ref_key: "kfbViewMainRef",
1948
+ ref: m,
1949
+ class: "hzzt-kfb-view__main",
1950
+ "element-loading-text": o(v)("加载中"),
1951
+ "element-loading-background": "rgba(0, 0, 0, 0.8)"
1952
+ }, null, 8, Co)), [
1953
+ [o(P), d.value]
1954
+ ]) : (w(), L("div", $o, M[5] || (M[5] = [
1955
+ k("img", {
1956
+ style: { width: "50%" },
1957
+ src: Ze
1958
+ }, null, -1)
1959
+ ]))),
1960
+ z.analysis && z.analysis.result ? (w(), H(o(Vt), {
1961
+ key: 2,
1962
+ class: "hzzt-kfb-view__tag",
1963
+ type: o(te).type
1964
+ }, {
1965
+ default: x(() => [
1966
+ K(E(o(te).name), 1)
1967
+ ]),
1968
+ _: 1
1969
+ }, 8, ["type"])) : R("", !0),
1970
+ (w(), L("svg", To, [
1971
+ k("filter", xo, [
1972
+ k("feColorMatrix", {
1973
+ values: o(ue),
1974
+ type: "matrix"
1975
+ }, null, 8, Lo),
1976
+ k("feColorMatrix", {
1977
+ values: o(ae),
1978
+ type: "saturate"
1979
+ }, null, 8, Eo),
1980
+ k("feComponentTransfer", null, [
1981
+ k("feFuncR", {
1982
+ id: "feFuncR",
1983
+ type: "gamma",
1984
+ exponent: o(j).ga,
1985
+ amplitude: "1",
1986
+ offset: "0"
1987
+ }, null, 8, Vo),
1988
+ k("feFuncG", {
1989
+ id: "feFuncG",
1990
+ type: "gamma",
1991
+ exponent: o(j).ga,
1992
+ amplitude: "1",
1993
+ offset: "0"
1994
+ }, null, 8, Io),
1995
+ k("feFuncB", {
1996
+ id: "feFuncB",
1997
+ type: "gamma",
1998
+ exponent: o(j).ga,
1999
+ amplitude: "1",
2000
+ offset: "0"
2001
+ }, null, 8, Mo)
2002
+ ])
2003
+ ])
2004
+ ])),
2005
+ C(Fl, {
2006
+ menus: z.menus,
2007
+ onTool: pt
2008
+ }, null, 8, ["menus"]),
2009
+ C(Ol, Oe(z.microscope, {
2010
+ ref_key: "microscopeRef",
2011
+ ref: _
2012
+ }), null, 16),
2013
+ o(p) && z.slide.file ? (w(), H(to, {
2014
+ key: 3,
2015
+ info: g.value,
2016
+ slide: z.slide,
2017
+ pathologyHandle: z.pathologyHandle,
2018
+ onTool: pt
2019
+ }, null, 8, ["info", "slide", "pathologyHandle"])) : R("", !0),
2020
+ o(i) ? (w(), H(vo, { key: 4 })) : R("", !0),
2021
+ (Y = z.slide.children) != null && Y.length ? (w(), H(mo, {
2022
+ key: 5,
2023
+ modelValue: f.value,
2024
+ "onUpdate:modelValue": M[0] || (M[0] = (O) => f.value = O),
2025
+ slides: z.slide.children
2026
+ }, null, 8, ["modelValue", "slides"])) : R("", !0),
2027
+ (me = (ne = g.value) == null ? void 0 : ne.channel) != null && me.length ? (w(), H(go, {
2028
+ key: 6,
2029
+ modelValue: b.value,
2030
+ "onUpdate:modelValue": M[1] || (M[1] = (O) => b.value = O),
2031
+ info: g.value,
2032
+ onLoad: Ot
2033
+ }, null, 8, ["modelValue", "info"])) : R("", !0),
2034
+ o(ct).length ? (w(), H(zo, {
2035
+ key: 7,
2036
+ expand: B.value,
2037
+ "onUpdate:expand": M[2] || (M[2] = (O) => B.value = O),
2038
+ style: q({
2039
+ top: z.analysis && z.analysis.result ? "24px" : "4px"
2040
+ }),
2041
+ annotation: o(et),
2042
+ annotations: o(ct),
2043
+ onSelect: o(dt)
2044
+ }, null, 8, ["expand", "style", "annotation", "annotations", "onSelect"])) : R("", !0),
2045
+ C(o(Ge), {
2046
+ modelValue: h.value,
2047
+ "onUpdate:modelValue": M[3] || (M[3] = (O) => h.value = O),
2048
+ "append-to-body": !0,
2049
+ title: o(v)("图像信息"),
2050
+ width: "700px",
2051
+ top: "5vh"
2052
+ }, {
2053
+ default: x(() => [
2054
+ C(o(nt), { "label-position": "left" }, {
2055
+ default: x(() => [
2056
+ C(o(se), {
2057
+ class: "flex",
2058
+ "label-width": "0px"
2059
+ }, {
2060
+ default: x(() => [
2061
+ k("div", So, [
2062
+ k("img", {
2063
+ src: g.value.labelImg,
2064
+ style: { height: "180px" }
2065
+ }, null, 8, Ho),
2066
+ k("img", {
2067
+ src: g.value.previewImg,
2068
+ style: { height: "180px" },
2069
+ class: "flex-1"
2070
+ }, null, 8, Po)
2071
+ ])
2072
+ ]),
2073
+ _: 1
2074
+ }),
2075
+ C(o(se), {
2076
+ label: o(v)("文件名")
2077
+ }, {
2078
+ default: x(() => [
2079
+ k("span", Ro, E(g.value.fileName), 1)
2080
+ ]),
2081
+ _: 1
2082
+ }, 8, ["label"]),
2083
+ C(o(se), {
2084
+ label: o(v)("图像像素")
2085
+ }, {
2086
+ default: x(() => [
2087
+ k("span", Ao, E(g.value.width) + "Pixel - " + E(g.value.height) + "Pixel", 1)
2088
+ ]),
2089
+ _: 1
2090
+ }, 8, ["label"]),
2091
+ C(o(se), {
2092
+ label: o(v)("扫描倍率")
2093
+ }, {
2094
+ default: x(() => [
2095
+ k("span", No, E(g.value.scanScale), 1)
2096
+ ]),
2097
+ _: 1
2098
+ }, 8, ["label"]),
2099
+ C(o(se), {
2100
+ label: o(v)("扫描时刻")
2101
+ }, {
2102
+ default: x(() => [
2103
+ k("span", Bo, E(g.value.scanTime), 1)
2104
+ ]),
2105
+ _: 1
2106
+ }, 8, ["label"]),
2107
+ C(o(se), {
2108
+ label: o(v)("扫描时间")
2109
+ }, {
2110
+ default: x(() => [
2111
+ k("span", Do, E(g.value.scanDuration || 0) + "s", 1)
2112
+ ]),
2113
+ _: 1
2114
+ }, 8, ["label"]),
2115
+ g.value.ext ? (w(), H(o(se), {
2116
+ key: 0,
2117
+ label: o(v)("扫描设备")
2118
+ }, {
2119
+ default: x(() => [
2120
+ k("span", Uo, E(g.value.ext.machineNum || ""), 1)
2121
+ ]),
2122
+ _: 1
2123
+ }, 8, ["label"])) : R("", !0)
2124
+ ]),
2125
+ _: 1
2126
+ })
2127
+ ]),
2128
+ _: 1
2129
+ }, 8, ["modelValue", "title"]),
2130
+ C(o(Ge), {
2131
+ modelValue: o(He),
2132
+ "onUpdate:modelValue": M[4] || (M[4] = (O) => pe(He) ? He.value = O : null),
2133
+ "append-to-body": !0,
2134
+ title: o(v)("语音输入"),
2135
+ width: "500px",
2136
+ top: "5vh"
2137
+ }, {
2138
+ footer: x(() => [
2139
+ C(o(_e), { onClick: o(Ht) }, {
2140
+ default: x(() => [
2141
+ K(E(o(v)("取消")), 1)
2142
+ ]),
2143
+ _: 1
2144
+ }, 8, ["onClick"]),
2145
+ C(o(_e), {
2146
+ type: "primary",
2147
+ onClick: o(Pt)
2148
+ }, {
2149
+ default: x(() => [
2150
+ K(E(o(v)("确定")), 1)
2151
+ ]),
2152
+ _: 1
2153
+ }, 8, ["onClick"])
2154
+ ]),
2155
+ default: x(() => [
2156
+ C(o(nt), { "label-position": "left" }, {
2157
+ default: x(() => {
2158
+ var O;
2159
+ return [
2160
+ C(o(se), null, {
2161
+ default: x(() => {
2162
+ var U;
2163
+ return [
2164
+ (U = o(Pe)) != null && U.src ? (w(), L("audio", {
2165
+ key: 0,
2166
+ class: "width-100%",
2167
+ src: o(Pe).src,
2168
+ controls: "",
2169
+ preload: "auto"
2170
+ }, null, 8, Fo)) : R("", !0)
2171
+ ];
2172
+ }),
2173
+ _: 1
2174
+ }),
2175
+ (O = o(Pe)) != null && O.src ? R("", !0) : (w(), H(o(se), { key: 0 }, {
2176
+ default: x(() => [
2177
+ o(A) ? (w(), H(o(_e), {
2178
+ key: 1,
2179
+ type: "danger",
2180
+ onClick: o(ce)
2181
+ }, {
2182
+ default: x(() => [
2183
+ K(E(o(v)("结束录音")), 1)
2184
+ ]),
2185
+ _: 1
2186
+ }, 8, ["onClick"])) : (w(), H(o(_e), {
2187
+ key: 0,
2188
+ type: "primary",
2189
+ onClick: o(F)
2190
+ }, {
2191
+ default: x(() => [
2192
+ K(E(o(v)("开始录音")), 1)
2193
+ ]),
2194
+ _: 1
2195
+ }, 8, ["onClick"])),
2196
+ o(A) ? (w(), L("span", Ko, E(o(v)("录音时长")) + ":" + E(o($)) + "s", 1)) : R("", !0)
2197
+ ]),
2198
+ _: 1
2199
+ }))
2200
+ ];
2201
+ }),
2202
+ _: 1
2203
+ })
2204
+ ]),
2205
+ _: 1
2206
+ }, 8, ["modelValue", "title"]),
2207
+ z.analysis && z.analysis.hotmap_path && z.analysis.hotmap_type !== "switch" ? (w(), L("div", {
2208
+ key: 8,
2209
+ class: "hzzt-kfb-view__hotmap",
2210
+ style: q({ left: o(Kt) + "px" })
2211
+ }, [
2212
+ C(o(ze), {
2213
+ class: "icon-caret-left",
2214
+ size: "30",
2215
+ onMousedown: o(vt)
2216
+ }, {
2217
+ default: x(() => M[6] || (M[6] = [
2218
+ k("svg", {
2219
+ xmlns: "http://www.w3.org/2000/svg",
2220
+ viewBox: "0 0 1024 1024"
2221
+ }, [
2222
+ k("path", {
2223
+ fill: "currentColor",
2224
+ d: "M672 192 288 511.936 672 832z"
2225
+ })
2226
+ ], -1)
2227
+ ])),
2228
+ _: 1,
2229
+ __: [6]
2230
+ }, 8, ["onMousedown"]),
2231
+ C(o(ze), {
2232
+ class: "icon-caret-right",
2233
+ size: "30",
2234
+ onMousedown: o(vt)
2235
+ }, {
2236
+ default: x(() => M[7] || (M[7] = [
2237
+ k("svg", {
2238
+ xmlns: "http://www.w3.org/2000/svg",
2239
+ viewBox: "0 0 1024 1024"
2240
+ }, [
2241
+ k("path", {
2242
+ fill: "currentColor",
2243
+ d: "M384 192v640l384-320.064z"
2244
+ })
2245
+ ], -1)
2246
+ ])),
2247
+ _: 1,
2248
+ __: [7]
2249
+ }, 8, ["onMousedown"])
2250
+ ], 4)) : R("", !0),
2251
+ o(V) ? (w(), L("div", jo)) : R("", !0),
2252
+ fe(z.$slots, "default")
2253
+ ], 512);
2254
+ };
2255
+ }
2256
+ });
2257
+ function Oo(u, e) {
2258
+ var b, g;
2259
+ const l = T(!!((b = u.ai) != null && b.default)), t = T(!!((g = u.ai) != null && g.default)), y = T([]), v = N(
2260
+ () => {
2261
+ var p, i, V, B;
2262
+ return (p = e.value) != null && p.analysis ? Object.prototype.toString.call((i = e.value) == null ? void 0 : i.analysis) === "[object Array]" ? (V = e.value) == null ? void 0 : V.analysis : [(B = e.value) == null ? void 0 : B.analysis] : [];
2263
+ }
2264
+ ), r = N(() => v.value.find((p) => (p == null ? void 0 : p.class) === "IQC")), s = N(() => !!r.value), m = N(() => v.value.find((p) => (p == null ? void 0 : p.class) !== "IQC")), _ = N(() => !!m.value), h = N(() => l.value ? m.value : t.value ? r.value : void 0);
2265
+ ee(() => {
2266
+ var p;
2267
+ return (p = u.ai) == null ? void 0 : p.default;
2268
+ }, (p) => {
2269
+ l.value = !!p, t.value = !!p, a();
2270
+ }), ee(() => {
2271
+ var p;
2272
+ return (p = e == null ? void 0 : e.value) == null ? void 0 : p.id;
2273
+ }, () => {
2274
+ a(), d();
2275
+ }), he(() => {
2276
+ var p, i;
2277
+ l.value = !!((p = u.ai) != null && p.default), t.value = !!((i = u.ai) != null && i.default), a(), d();
2278
+ });
2279
+ function a() {
2280
+ _.value && l.value ? t.value = !1 : _.value || (l.value = !1), s.value && t.value ? l.value = !1 : s.value || (t.value = !1);
2281
+ }
2282
+ function d() {
2283
+ var p;
2284
+ (p = e.value) != null && p.id && v.value.length ? l.value || t.value ? c() : y.value = [] : y.value = [];
2285
+ }
2286
+ function c() {
2287
+ u.ai.handle(e.value, h.value).then((p) => {
2288
+ y.value = p;
2289
+ }).catch(() => {
2290
+ y.value = [];
2291
+ });
2292
+ }
2293
+ function n() {
2294
+ t.value = !1, d();
2295
+ }
2296
+ function f() {
2297
+ l.value = !1, d();
2298
+ }
2299
+ return {
2300
+ hasAi: _,
2301
+ hasIqc: s,
2302
+ currentAnalysis: h,
2303
+ aiLabelList: y,
2304
+ enableAi: l,
2305
+ enableIqc: t,
2306
+ toggleIqc: f,
2307
+ toggleAi: n
2308
+ };
2309
+ }
2310
+ const Go = ["src", "fit"], Wo = ["src", "fit"], Ke = /* @__PURE__ */ J({
2311
+ name: "KfbImage",
2312
+ __name: "KfbImage",
2313
+ props: {
2314
+ src: {
2315
+ type: String,
2316
+ required: !0,
2317
+ default: ""
2318
+ },
2319
+ fit: {
2320
+ type: String,
2321
+ validator: (u) => ["", "contain", "cover", "fill", "none", "scale-down"].includes(u),
2322
+ default: ""
2323
+ },
2324
+ retryTimes: {
2325
+ type: Number,
2326
+ default: 0
2327
+ },
2328
+ load: {
2329
+ type: Function,
2330
+ default: () => ({})
2331
+ }
2332
+ },
2333
+ setup(u) {
2334
+ const e = u;
2335
+ let l = 0;
2336
+ const t = T(!1), y = rt({
2337
+ x: 0,
2338
+ y: 0
2339
+ }), v = N(() => ({
2340
+ top: `${y.y + 10}px`,
2341
+ left: `${y.x}px`,
2342
+ transform: "translateY(-50%)",
2343
+ width: `${4 * 300 / 3}px`,
2344
+ height: "300px",
2345
+ background: "rgba(0,0,0,0.8)",
2346
+ zIndex: "10000"
2347
+ }));
2348
+ function r(h) {
2349
+ const a = h.target;
2350
+ l < e.retryTimes ? (a.src = e.src, l++) : a.src = Ze;
2351
+ }
2352
+ function s(h) {
2353
+ if (h.target) {
2354
+ const f = h.target, b = f.tagName;
2355
+ let g = "";
2356
+ if (f.tagName === "IMG" ? g = f.src || "" : b === "DIV" && (g = f.children[0].src || ""), g.indexOf(Ze) > -1)
2357
+ return;
2358
+ }
2359
+ const { x: a, y: d } = m(h), c = 4 * 300 / 3, n = 300;
2360
+ y.x = Math.min(Math.max(a, c / 2), window.innerWidth - c / 2), y.y = Math.min(Math.max(d, n / 2), window.innerHeight - n / 2), t.value = !0;
2361
+ }
2362
+ function m(h) {
2363
+ const a = h.target, d = h.offsetX, c = h.offsetY, n = a.clientWidth, f = a.clientHeight;
2364
+ return {
2365
+ x: h.clientX + n - d,
2366
+ y: h.clientY - c + f / 2
2367
+ };
2368
+ }
2369
+ function _() {
2370
+ t.value = !1;
2371
+ }
2372
+ return (h, a) => (w(), L("div", {
2373
+ class: "relative",
2374
+ onMouseenter: s,
2375
+ onMouseleave: _
2376
+ }, [
2377
+ k("img", {
2378
+ src: u.src,
2379
+ fit: u.fit,
2380
+ onError: r,
2381
+ style: {
2382
+ height: "100%",
2383
+ width: "100%"
2384
+ }
2385
+ }, null, 40, Go),
2386
+ (w(), H(je, { to: "body" }, [
2387
+ t.value ? (w(), L("div", {
2388
+ key: 0,
2389
+ class: "fixed hzzt-kfb-img-triangle-left",
2390
+ style: q(v.value)
2391
+ }, [
2392
+ k("img", {
2393
+ src: u.src,
2394
+ fit: u.fit,
2395
+ style: {
2396
+ objectFit: "contain",
2397
+ height: "100%",
2398
+ width: "100%"
2399
+ },
2400
+ onMouseenter: a[0] || (a[0] = () => {
2401
+ t.value = !0;
2402
+ }),
2403
+ onMouseleave: _
2404
+ }, null, 40, Wo)
2405
+ ], 4)) : R("", !0)
2406
+ ]))
2407
+ ], 32));
2408
+ }
2409
+ }), qo = {}, Zo = {
2410
+ xmlns: "http://www.w3.org/2000/svg",
2411
+ viewBox: "0 0 1024 1024"
2412
+ };
2413
+ function Yo(u, e) {
2414
+ return w(), L("svg", Zo, e[0] || (e[0] = [
2415
+ k("path", {
2416
+ fill: "currentColor",
2417
+ 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"
2418
+ }, null, -1)
2419
+ ]));
2420
+ }
2421
+ const Xo = /* @__PURE__ */ ge(qo, [["render", Yo]]), Qo = {}, Jo = {
2422
+ width: "16",
2423
+ height: "16",
2424
+ viewBox: "0 0 16 16",
2425
+ fill: "none",
2426
+ xmlns: "http://www.w3.org/2000/svg"
2427
+ };
2428
+ function ea(u, e) {
2429
+ return w(), L("svg", Jo, e[0] || (e[0] = [
2430
+ k("g", { id: "Frame" }, [
2431
+ k("path", {
2432
+ id: "Vector",
2433
+ 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",
2434
+ fill: "currentColor",
2435
+ "fill-opacity": "0.9"
2436
+ })
2437
+ ], -1)
2438
+ ]));
2439
+ }
2440
+ const ta = /* @__PURE__ */ ge(Qo, [["render", ea]]), la = { class: "hzzt-kfb-slides" }, oa = { class: "hzzt-kfb-slides__row" }, aa = { class: "hzzt-kfb-slides__top" }, na = { class: "text-primary" }, sa = { class: "flex align-items-center" }, ia = { key: 0 }, ra = ["data-index", "onClick"], ua = { class: "hzzt-kfb-slides__gallery" }, ca = ["onClick"], da = {
2441
+ key: 0,
2442
+ class: "hzzt-kfb-slides__read"
2443
+ }, va = ["onClick"], fa = {
2444
+ key: 1,
2445
+ class: "flex column"
2446
+ }, ma = { class: "hzzt-kfb-slides__header" }, pa = { class: "w-30%" }, ha = { class: "w-40%" }, ga = { class: "w-20%" }, ya = ["data-index", "onClick"], wa = { class: "w-30% flex" }, _a = { class: "hzzt-kfb-slides__gallery" }, ba = {
2447
+ key: 0,
2448
+ class: "hzzt-kfb-slides__read"
2449
+ }, ka = { class: "w-40% flex" }, za = ["onClick"], Ca = ["onClick"], $a = {
2450
+ key: 0,
2451
+ class: "flex column py-2"
2452
+ }, Ta = { class: "flex align-items-center justify-content-center" }, xa = { class: "margin-r-1" }, La = {
2453
+ key: 0,
2454
+ class: "margin-r-1 margin-l-2"
2455
+ }, Ea = /* @__PURE__ */ J({
2456
+ __name: "KfbSlideList",
2457
+ props: {
2458
+ slides: {}
2459
+ },
2460
+ emits: ["select", "tool"],
2461
+ setup(u, { expose: e, emit: l }) {
2462
+ const t = u, y = l, v = Z("file-index", {
2463
+ value: 0
2464
+ }), r = Z("divide", {
2465
+ value: !1
2466
+ }), s = Z("sync", {
2467
+ value: !1
2468
+ }), m = T(!1), _ = T(), h = N(() => t.slides.filter(({ read: b }) => b)), a = N(() => t.slides.filter(({ check: b }) => b)), { t: d } = re();
2469
+ function c(b) {
2470
+ v.value = b, y("select", b);
2471
+ }
2472
+ function n(b) {
2473
+ b.check = !b.check;
2474
+ }
2475
+ function f(b) {
2476
+ var p, i, V;
2477
+ const g = ((V = (i = (p = _.value.querySelector('[data-index="0"]')) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : i.call(p)) == null ? void 0 : V.y) || 0;
2478
+ _.value.scrollTop = _.value.querySelector(`[data-index="${b}"]`).getBoundingClientRect().y - g;
2479
+ }
2480
+ return e({
2481
+ jumpToSlide: f
2482
+ }), (b, g) => (w(), L("div", la, [
2483
+ k("div", oa, [
2484
+ k("div", aa, [
2485
+ k("span", null, [
2486
+ g[4] || (g[4] = K("已读:")),
2487
+ k("span", na, E(h.value.length), 1),
2488
+ K("/" + E(b.slides.length), 1)
2489
+ ]),
2490
+ k("div", sa, [
2491
+ C(o(ze), {
2492
+ class: "margin-r-2 pointer",
2493
+ size: "16",
2494
+ color: m.value ? "#999" : "#000",
2495
+ onClick: g[0] || (g[0] = (p) => m.value = !m.value)
2496
+ }, {
2497
+ default: x(() => [
2498
+ C(Xo)
2499
+ ]),
2500
+ _: 1
2501
+ }, 8, ["color"]),
2502
+ C(o(ze), {
2503
+ class: "pointer",
2504
+ name: "cus-list",
2505
+ size: "16",
2506
+ color: m.value ? "#000" : "#999",
2507
+ onClick: g[1] || (g[1] = (p) => m.value = !m.value)
2508
+ }, {
2509
+ default: x(() => [
2510
+ C(ta)
2511
+ ]),
2512
+ _: 1
2513
+ }, 8, ["color"])
2514
+ ])
2515
+ ]),
2516
+ k("div", {
2517
+ class: "flex-1 overflow-auto",
2518
+ style: { width: "100%" },
2519
+ ref_key: "slidesRef",
2520
+ ref: _
2521
+ }, [
2522
+ m.value ? (w(), L("ul", fa, [
2523
+ k("li", ma, [
2524
+ g[5] || (g[5] = k("div", { class: "w-10%" }, null, -1)),
2525
+ k("div", pa, E(o(d)("缩略图")), 1),
2526
+ k("div", ha, E(o(d)("切片名")), 1),
2527
+ k("div", ga, E(o(d)("评分")), 1)
2528
+ ]),
2529
+ (w(!0), L(le, null, oe(b.slides, (p, i) => (w(), L("li", {
2530
+ key: i,
2531
+ "data-index": i,
2532
+ class: "flex align-items-center overflow-hidden",
2533
+ style: q({
2534
+ backgroundColor: o(v) === i ? "rgba(6, 85, 195, 0.1)" : "#fff"
2535
+ }),
2536
+ onClick: (V) => c(i)
2537
+ }, [
2538
+ k("div", {
2539
+ class: "w-10% text-center",
2540
+ onClick: Fe(() => {
2541
+ }, ["stop"])
2542
+ }, [
2543
+ C(o(We), {
2544
+ modelValue: p.check,
2545
+ "onUpdate:modelValue": (V) => p.check = V,
2546
+ style: { width: "14px", height: "16px" }
2547
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
2548
+ ]),
2549
+ k("div", wa, [
2550
+ k("div", _a, [
2551
+ C(Ke, {
2552
+ style: q([{ transform: `rotate(${p.angle}deg)` }, { height: "45px" }]),
2553
+ "retry-times": 1,
2554
+ src: p.labelImg,
2555
+ fit: "cover",
2556
+ class: "flex-1"
2557
+ }, null, 8, ["style", "src"]),
2558
+ C(Ke, {
2559
+ "retry-times": 1,
2560
+ fit: "cover",
2561
+ src: p.previewImg,
2562
+ style: { height: "45px" },
2563
+ class: "flex-1"
2564
+ }, null, 8, ["src"]),
2565
+ p.read ? R("", !0) : (w(), L("div", ba, E(o(d)("未读")), 1))
2566
+ ])
2567
+ ]),
2568
+ k("div", ka, [
2569
+ C(o(Lt), {
2570
+ effect: "dark",
2571
+ placement: "bottom",
2572
+ content: `${p.name}`
2573
+ }, {
2574
+ default: x(() => [
2575
+ k("span", {
2576
+ style: { "line-height": "16px" },
2577
+ class: "margin-l-1 ellipsis hzzt-kfb-slides__text",
2578
+ dir: "rtl",
2579
+ onClick: Fe((V) => n(p), ["stop"])
2580
+ }, E(p.name), 9, za)
2581
+ ]),
2582
+ _: 2
2583
+ }, 1032, ["content"])
2584
+ ]),
2585
+ k("div", {
2586
+ class: "w-20% flex text-center pointer",
2587
+ style: q({
2588
+ color: p.gradeColor
2589
+ }),
2590
+ onClick: (V) => y("tool", "grade", p)
2591
+ }, E(p.grade), 13, Ca)
2592
+ ], 12, ya))), 128))
2593
+ ])) : (w(), L("div", ia, [
2594
+ (w(!0), L(le, null, oe(b.slides, (p, i) => (w(), L("div", {
2595
+ key: i,
2596
+ class: ke(["hzzt-kfb-slides__box", o(v) === i ? "hzzt-kfb-slides__box--active" : ""]),
2597
+ "data-index": i,
2598
+ onClick: (V) => c(i)
2599
+ }, [
2600
+ k("div", ua, [
2601
+ C(Ke, {
2602
+ style: q({ transform: `rotate(${p.angle}deg)` }),
2603
+ "retry-times": 1,
2604
+ src: p.labelImg,
2605
+ class: "hzzt-kfb-slides__img",
2606
+ fit: "cover"
2607
+ }, null, 8, ["style", "src"]),
2608
+ C(Ke, {
2609
+ "retry-times": 1,
2610
+ src: p.previewImg,
2611
+ class: "flex-1 hzzt-kfb-slides__img1",
2612
+ fit: "cover"
2613
+ }, null, 8, ["src"])
2614
+ ]),
2615
+ k("div", {
2616
+ class: "flex justify-content-between align-items-center",
2617
+ onClick: Fe(() => {
2618
+ }, ["stop"])
2619
+ }, [
2620
+ C(o(We), {
2621
+ modelValue: p.check,
2622
+ "onUpdate:modelValue": (V) => p.check = V,
2623
+ style: { width: "14px", height: "16px" }
2624
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
2625
+ C(o(Lt), {
2626
+ effect: "dark",
2627
+ placement: "bottom",
2628
+ content: `${p.name}`
2629
+ }, {
2630
+ default: x(() => [
2631
+ k("span", {
2632
+ style: { "line-height": "16px", "text-align": "center", width: "calc(100% - 14px)" },
2633
+ class: "margin-l-1 ellipsis",
2634
+ onClick: Fe((V) => n(p), ["stop"])
2635
+ }, E(p.name), 9, ca)
2636
+ ]),
2637
+ _: 2
2638
+ }, 1032, ["content"])
2639
+ ]),
2640
+ p.read ? R("", !0) : (w(), L("div", da, E(o(d)("未读")), 1)),
2641
+ p.grade ? (w(), L("div", {
2642
+ key: 1,
2643
+ class: "hzzt-kfb-slides__grade",
2644
+ style: q({
2645
+ background: p.gradeColor
2646
+ }),
2647
+ onClick: (V) => y("tool", "grade", p)
2648
+ }, E(p.grade), 13, va)) : R("", !0),
2649
+ fe(b.$slots, "slide", { slide: p }, void 0, !0)
2650
+ ], 10, ra))), 128))
2651
+ ]))
2652
+ ], 512),
2653
+ a.value.length > 1 ? (w(), L("div", $a, [
2654
+ k("div", Ta, [
2655
+ k("span", xa, E(o(d)("分屏")), 1),
2656
+ C(o(Ee), {
2657
+ modelValue: o(r),
2658
+ "onUpdate:modelValue": g[2] || (g[2] = (p) => pe(r) ? r.value = p : null)
2659
+ }, null, 8, ["modelValue"]),
2660
+ o(r) ? (w(), L("span", La, E(o(d)("同步")), 1)) : R("", !0),
2661
+ o(r) ? (w(), H(o(Ee), {
2662
+ key: 1,
2663
+ modelValue: o(s),
2664
+ "onUpdate:modelValue": g[3] || (g[3] = (p) => pe(s) ? s.value = p : null)
2665
+ }, null, 8, ["modelValue"])) : R("", !0)
2666
+ ])
2667
+ ])) : R("", !0)
2668
+ ])
2669
+ ]));
2670
+ }
2671
+ }), Va = /* @__PURE__ */ ge(Ea, [["__scopeId", "data-v-d3cde57c"]]), Ia = { class: "hzzt-kfb-ai overflow-hidden" }, Ma = { class: "flex align-items-center margin-t-1" }, Sa = { style: { color: "var(--el-color-success)" } }, Ha = { class: "flex-1 flex overflow-auto wrap margin-t-1" }, Pa = ["onClick"], Ra = {
2672
+ key: 0,
2673
+ style: { "margin-left": "2px" }
2674
+ }, Aa = /* @__PURE__ */ J({
2675
+ name: "KfbAiList",
2676
+ __name: "list",
2677
+ props: {
2678
+ data: { default: () => [] },
2679
+ analysis: {}
2680
+ },
2681
+ setup(u, { expose: e }) {
2682
+ const l = u, { t } = re(), y = Z("kfbViewRef"), v = T(-1), r = T(1), s = T(100), m = T(!0), _ = T([]), h = N(() => l.data.filter((V) => _.value.includes(V.cls || ""))), a = N(() => h.value.slice((r.value - 1) * s.value, r.value * s.value)), d = N(() => {
2683
+ const V = /* @__PURE__ */ new Set();
2684
+ return l.data.forEach((B) => {
2685
+ const P = B.cls || "";
2686
+ P && !V.has(P) && V.add(P);
2687
+ }), Array.from(V);
2688
+ }), c = N(() => _.value.length !== 0 && _.value.length !== d.value.length), n = St(l);
2689
+ ee(() => d.value, (V) => {
2690
+ f(), _.value = [...V];
2691
+ }), he(() => {
2692
+ _.value = [...d.value];
2693
+ });
2694
+ function f() {
2695
+ v.value = -1, r.value = 1, s.value = 100, m.value = !0;
2696
+ }
2697
+ function b(V) {
2698
+ const B = h.value.findIndex((P) => P.id === V.id);
2699
+ v.value = B, y.value.jumpToLabel(V, 5);
2700
+ }
2701
+ function g(V) {
2702
+ const B = l.data.filter((P) => P.cls === V);
2703
+ return B.length ? `(${B.length})` : "";
2704
+ }
2705
+ function p() {
2706
+ v.value = -1, m.value = _.value.length == d.value.length;
2707
+ }
2708
+ function i(V) {
2709
+ _.value = V ? [...d.value] : [], v.value = -1;
2710
+ }
2711
+ return e({
2712
+ labelList: h
2713
+ }), (V, B) => (w(), L("div", Ia, [
2714
+ k("div", Ma, [
2715
+ C(o(dl), {
2716
+ placement: "bottom",
2717
+ trigger: "click",
2718
+ width: "160"
2719
+ }, {
2720
+ reference: x(() => [
2721
+ C(o(_e), {
2722
+ class: "margin-r-1",
2723
+ type: "primary"
2724
+ }, {
2725
+ default: x(() => [
2726
+ K(E(o(t)("分类")) + " ", 1),
2727
+ C(Q, { name: "arrowDown" })
2728
+ ]),
2729
+ _: 1
2730
+ })
2731
+ ]),
2732
+ default: x(() => [
2733
+ k("div", null, [
2734
+ C(o(We), {
2735
+ modelValue: m.value,
2736
+ "onUpdate:modelValue": B[0] || (B[0] = (P) => m.value = P),
2737
+ indeterminate: c.value,
2738
+ onChange: i
2739
+ }, {
2740
+ default: x(() => [
2741
+ K(E(o(t)("全选")), 1)
2742
+ ]),
2743
+ _: 1
2744
+ }, 8, ["modelValue", "indeterminate"]),
2745
+ C(o(vl), {
2746
+ modelValue: _.value,
2747
+ "onUpdate:modelValue": B[1] || (B[1] = (P) => _.value = P),
2748
+ class: "flex column",
2749
+ onChange: p
2750
+ }, {
2751
+ default: x(() => [
2752
+ (w(!0), L(le, null, oe(d.value, (P) => (w(), H(o(We), {
2753
+ key: P,
2754
+ value: P
2755
+ }, {
2756
+ default: x(() => [
2757
+ K(E(P) + " ", 1),
2758
+ k("span", Sa, E(g(P)), 1)
2759
+ ]),
2760
+ _: 2
2761
+ }, 1032, ["value"]))), 128))
2762
+ ]),
2763
+ _: 1
2764
+ }, 8, ["modelValue"])
2765
+ ])
2766
+ ]),
2767
+ _: 1
2768
+ }),
2769
+ C(o(Vt), {
2770
+ type: o(n).type,
2771
+ class: "margin-l-1"
2772
+ }, {
2773
+ default: x(() => [
2774
+ K(E(o(n).name), 1)
2775
+ ]),
2776
+ _: 1
2777
+ }, 8, ["type"])
2778
+ ]),
2779
+ k("div", Ha, [
2780
+ (w(!0), L(le, null, oe(a.value, (P, te) => (w(), L("div", {
2781
+ key: te + (r.value - 1) * s.value,
2782
+ class: ke(`hzzt-kfb-ai__img ${v.value === te + (r.value - 1) * s.value ? "hzzt-kfb-ai__img--active" : ""}`),
2783
+ onClick: (ie) => b(P)
2784
+ }, [
2785
+ C(o(ml), {
2786
+ "retry-times": 1,
2787
+ src: P.imageUrl,
2788
+ "error-src": o(Ze)
2789
+ }, null, 8, ["src", "error-src"]),
2790
+ k("div", {
2791
+ style: q({ color: P.strokeStyle }),
2792
+ class: "ellipsis"
2793
+ }, [
2794
+ K(E(P.cls) + " ", 1),
2795
+ P.score ? (w(), L("span", Ra, E(P.score), 1)) : R("", !0)
2796
+ ], 4)
2797
+ ], 10, Pa))), 128))
2798
+ ]),
2799
+ C(o(fl), {
2800
+ class: "wrap",
2801
+ "current-page": r.value,
2802
+ "onUpdate:currentPage": B[2] || (B[2] = (P) => r.value = P),
2803
+ "page-size": s.value,
2804
+ "onUpdate:pageSize": B[3] || (B[3] = (P) => s.value = P),
2805
+ "page-sizes": [100, 200, 300, 400],
2806
+ layout: "total, sizes, prev, pager, next",
2807
+ total: h.value.length
2808
+ }, null, 8, ["current-page", "page-size", "total"])
2809
+ ]));
2810
+ }
2811
+ }), Na = { class: "hzzt-kfb-slide" }, Ba = { class: "flex flex-1 overflow-hidden" }, Da = { class: "flex flex-1" }, Ua = {
2812
+ key: 0,
2813
+ style: { height: "100%", width: "100%" },
2814
+ class: "flex wrap"
2815
+ }, Fa = ["onClick"], it = /* @__PURE__ */ J({
2816
+ name: "HzztKfbSlide",
2817
+ __name: "HzztKfbSlide",
2818
+ props: /* @__PURE__ */ be({
2819
+ menus: { default: () => [] },
2820
+ kfb: {},
2821
+ slides: { default: () => [] },
2822
+ ai: {},
2823
+ teleport: { type: Boolean, default: !1 },
2824
+ watermark: {},
2825
+ process: {},
2826
+ microscope: {},
2827
+ showList: { type: Boolean, default: !0 },
2828
+ showKfbLabel: { type: Boolean, default: !0 },
2829
+ showKeyboard: { type: Boolean, default: !1 },
2830
+ showMenuText: { type: Boolean, default: !0 },
2831
+ showWatermark: { type: Boolean, default: !1 }
2832
+ }, {
2833
+ index: {
2834
+ default: 0
2835
+ },
2836
+ indexModifiers: {}
2837
+ }),
2838
+ emits: /* @__PURE__ */ be(["tool"], ["update:index"]),
2839
+ setup(u, { expose: e, emit: l }) {
2840
+ const t = u, y = l, v = Be(u, "index"), r = N(() => t.slides[v.value]), s = N(() => t.slides.filter(({ check: $ }) => $)), m = T(), _ = T(), h = T(), a = T(), d = T(t.showKeyboard), c = T(t.showKfbLabel), n = T(t.showWatermark), f = T(t.showMenuText), b = T(!1), g = T(!1), { t: p } = re(), i = N(() => {
2841
+ var $;
2842
+ if (b.value) {
2843
+ const A = s.value.findIndex(({ id: F }) => {
2844
+ var ce;
2845
+ return F === ((ce = r.value) == null ? void 0 : ce.id);
2846
+ });
2847
+ return (($ = h.value) == null ? void 0 : $[A]) || _.value;
2848
+ } else
2849
+ return _.value;
2850
+ }), V = N(() => s.value.length <= 1 ? {
2851
+ height: "100%",
2852
+ width: "100%"
2853
+ } : s.value.length <= 2 ? {
2854
+ height: "100%",
2855
+ width: "calc((100% - 4px) / 2)"
2856
+ } : s.value.length <= 4 ? {
2857
+ height: "calc((100% - 4px) / 2)",
2858
+ width: "calc((100% - 4px) / 2)"
2859
+ } : s.value.length <= 6 ? {
2860
+ height: "calc((100% - 4px) / 2)",
2861
+ width: "calc((100% - 4px * 2) / 3)"
2862
+ } : s.value.length <= 9 ? {
2863
+ height: "calc((100% - 4px * 2) / 3)",
2864
+ width: "calc((100% - 4px * 2) / 3)"
2865
+ } : {
2866
+ height: "100%",
2867
+ width: "100%"
2868
+ });
2869
+ ee(() => s.value, ($) => {
2870
+ b.value && $.length <= 1 && (b.value = !1);
2871
+ }), ee(() => r.value, ($) => {
2872
+ if ($) {
2873
+ const A = $.read;
2874
+ $.read = !0, y("tool", "choose", {
2875
+ slide: $,
2876
+ read: A
2877
+ });
2878
+ }
2879
+ }), Object.entries({
2880
+ keyboard: d,
2881
+ kfbLabel: c,
2882
+ watermark: n,
2883
+ menuText: f
2884
+ }).forEach(([$, A]) => {
2885
+ ee(() => A.value, (F) => {
2886
+ y("tool", $, F);
2887
+ });
2888
+ });
2889
+ const {
2890
+ hasAi: P,
2891
+ hasIqc: te,
2892
+ currentAnalysis: ie,
2893
+ aiLabelList: j,
2894
+ enableAi: ue,
2895
+ enableIqc: ae,
2896
+ toggleIqc: Me,
2897
+ toggleAi: Se
2898
+ } = Oo(t, r);
2899
+ function ye($, A) {
2900
+ $ === "next" && t.slides[v.value + 1] && v.value++, $ === "prev" && t.slides[v.value - 1] && v.value--, ($ === "label" || $ === "tool") && (c.value = A), y("tool", $, A);
2901
+ }
2902
+ function De($) {
2903
+ var F, ce;
2904
+ const A = we(W({}, t.kfb), {
2905
+ watermark: t.watermark,
2906
+ process: t.process,
2907
+ microscope: t.microscope,
2908
+ slide: $,
2909
+ aiLabelList: r.value.id === $.id ? ((F = a.value) == null ? void 0 : F.labelList) || [] : [],
2910
+ syncPosition: g.value,
2911
+ syncZoom: g.value,
2912
+ handle: void 0,
2913
+ analysis: r.value.id === $.id ? ie.value : void 0
2914
+ });
2915
+ return (ce = t.kfb) != null && ce.handle ? t.kfb.handle($, A) : A;
2916
+ }
2917
+ function Ye($) {
2918
+ v.value = t.slides.findIndex((A) => A.id === $.id);
2919
+ }
2920
+ function Xe($) {
2921
+ b.value && (t.slides[$].check = !0);
2922
+ }
2923
+ function Qe() {
2924
+ var $;
2925
+ ($ = b.value ? h.value : [_.value]) == null || $.forEach((A) => {
2926
+ c.value || (A.updateGrid({
2927
+ show: c.value,
2928
+ ruler: c.value
2929
+ }), d.value = c.value), A.updateGraduation({
2930
+ show: c.value
2931
+ }), A.updateNavigator(c.value);
2932
+ });
2933
+ }
2934
+ function He($) {
2935
+ v.value = $, m.value && m.value.jumpToSlide($);
2936
+ }
2937
+ function Pe($, A) {
2938
+ i.value && i.value.jumpToLabel($, A);
2939
+ }
2940
+ function Je($, A) {
2941
+ i.value && i.value.jumpToPosition($, A);
2942
+ }
2943
+ return de("kfbViewRef", i), de("show-keyboard", d), de("show-kfb-label", c), de("show-menu-text", f), de("show-watermark", n), de("file-index", v), de("divide", b), de("sync", g), e({
2944
+ divide: b,
2945
+ slide: r,
2946
+ kfbViewRef: i,
2947
+ jumpToSlide: He,
2948
+ jumpToLabel: Pe,
2949
+ jumpToPosition: Je,
2950
+ enableAI: N(() => {
2951
+ var $;
2952
+ return (($ = t.ai) == null ? void 0 : $.enable) && j.value.length;
2953
+ })
2954
+ }), ($, A) => (w(), L("div", Na, [
2955
+ $.menus.length ? (w(), H(qe, {
2956
+ key: 0,
2957
+ menu: $.menus,
2958
+ process: $.process,
2959
+ microscope: $.microscope,
2960
+ onTool: ye
2961
+ }, {
2962
+ left: x(() => [
2963
+ fe($.$slots, "left")
2964
+ ]),
2965
+ right: x(() => [
2966
+ C(o(Ee), {
2967
+ modelValue: c.value,
2968
+ "onUpdate:modelValue": A[0] || (A[0] = (F) => c.value = F),
2969
+ "active-text": o(p)("隐藏标签"),
2970
+ "true-value": !1,
2971
+ "false-value": !0,
2972
+ class: "margin-r-2",
2973
+ onChange: Qe
2974
+ }, null, 8, ["modelValue", "active-text"]),
2975
+ $.ai && $.ai.enable && o(te) ? (w(), H(o(Ee), {
2976
+ key: 0,
2977
+ modelValue: o(ae),
2978
+ "onUpdate:modelValue": A[1] || (A[1] = (F) => pe(ae) ? ae.value = F : null),
2979
+ "active-text": o(p)("AI质控"),
2980
+ class: "margin-r-2",
2981
+ onChange: o(Me)
2982
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : R("", !0),
2983
+ $.ai && $.ai.enable && o(P) ? (w(), H(o(Ee), {
2984
+ key: 1,
2985
+ modelValue: o(ue),
2986
+ "onUpdate:modelValue": A[2] || (A[2] = (F) => pe(ue) ? ue.value = F : null),
2987
+ "active-text": o(p)("AI分析"),
2988
+ class: "margin-r-2",
2989
+ onChange: o(Se)
2990
+ }, null, 8, ["modelValue", "active-text", "onChange"])) : R("", !0),
2991
+ fe($.$slots, "right")
2992
+ ]),
2993
+ _: 3
2994
+ }, 8, ["menu", "process", "microscope"])) : R("", !0),
2995
+ k("div", Ba, [
2996
+ $.showList ? (w(), H(je, {
2997
+ key: 0,
2998
+ defer: "",
2999
+ to: "#kfb-slide-list",
3000
+ disabled: !$.teleport
3001
+ }, [
3002
+ C(Va, {
3003
+ ref_key: "slidesRef",
3004
+ ref: m,
3005
+ style: q($.teleport ? "" : "width: 250px"),
3006
+ slides: $.slides,
3007
+ onSelect: Xe,
3008
+ onTool: ye
3009
+ }, {
3010
+ slide: x(({ slide: F }) => [
3011
+ fe($.$slots, "list", { slide: F })
3012
+ ]),
3013
+ _: 3
3014
+ }, 8, ["style", "slides"])
3015
+ ], 8, ["disabled"])) : R("", !0),
3016
+ (w(), H(je, {
3017
+ defer: "",
3018
+ to: "#kfb-slide-view",
3019
+ disabled: !$.teleport
3020
+ }, [
3021
+ k("div", Da, [
3022
+ s.value.length && b.value ? (w(), L("ul", Ua, [
3023
+ (w(!0), L(le, null, oe(s.value, (F, ce) => (w(), L("li", {
3024
+ key: ce,
3025
+ style: q(V.value),
3026
+ class: ke(r.value.id === F.id ? "hzzt-kfb-view-screen-active" : ""),
3027
+ onClick: (ut) => Ye(F)
3028
+ }, [
3029
+ (w(), H(Ne, Oe({
3030
+ ref_for: !0,
3031
+ ref_key: "kfbViewRefs",
3032
+ ref: h,
3033
+ key: `kfb-${ce}`
3034
+ }, { ref_for: !0 }, De(F), { onTool: ye }), {
3035
+ default: x(() => [
3036
+ fe($.$slots, "kfb", { slide: F })
3037
+ ]),
3038
+ _: 2
3039
+ }, 1040))
3040
+ ], 14, Fa))), 128))
3041
+ ])) : r.value ? (w(), H(Ne, Oe({
3042
+ key: 1,
3043
+ ref_key: "kfbViewRef",
3044
+ ref: _
3045
+ }, De(r.value), { onTool: ye }), {
3046
+ default: x(() => [
3047
+ fe($.$slots, "kfb", { slide: r.value })
3048
+ ]),
3049
+ _: 3
3050
+ }, 16)) : R("", !0)
3051
+ ])
3052
+ ], 8, ["disabled"])),
3053
+ $.ai && $.ai.enable && o(j).length ? (w(), H(je, {
3054
+ key: 1,
3055
+ defer: "",
3056
+ to: "#kfb-slide-ai",
3057
+ disabled: !$.teleport
3058
+ }, [
3059
+ C(Aa, {
3060
+ style: q($.teleport ? "" : "width: 350px"),
3061
+ ref_key: "kfbAiRef",
3062
+ ref: a,
3063
+ data: o(j),
3064
+ slide: r.value,
3065
+ analysis: o(ie)
3066
+ }, null, 8, ["style", "data", "slide", "analysis"])
3067
+ ], 8, ["disabled"])) : R("", !0),
3068
+ fe($.$slots, "default")
3069
+ ])
3070
+ ]));
3071
+ }
3072
+ });
3073
+ it.name = "HzztKfbSlide";
3074
+ Ne.name = "HzztKfbView";
3075
+ qe.name = "HzztKfbToolbox";
3076
+ const Ka = (u, e) => {
3077
+ u.use(pl, e == null ? void 0 : e.i18n), u.component(it.name, it), u.component(Ne.name, Ne), u.component(qe.name, qe);
3078
+ }, Za = {
3079
+ install: Ka
3080
+ };
3081
+ export {
3082
+ Mt as D,
3083
+ It as I,
3084
+ ge as _,
3085
+ Q as a,
3086
+ st as b,
3087
+ it as c,
3088
+ Ne as d,
3089
+ qe as e,
3090
+ Za as i,
3091
+ re as u
3092
+ };