costy-plus 1.1.20-0 → 1.1.22-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
1
  var w = Object.defineProperty, F = Object.defineProperties;
2
2
  var T = Object.getOwnPropertyDescriptors;
3
- var V = Object.getOwnPropertySymbols;
3
+ var x = Object.getOwnPropertySymbols;
4
4
  var C = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
5
5
  var B = (e, t, a) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, u = (e, t) => {
6
6
  for (var a in t || (t = {}))
7
7
  C.call(t, a) && B(e, a, t[a]);
8
- if (V)
9
- for (var a of V(t))
8
+ if (x)
9
+ for (var a of x(t))
10
10
  b.call(t, a) && B(e, a, t[a]);
11
11
  return e;
12
- }, m = (e, t) => F(e, T(t));
12
+ }, y = (e, t) => F(e, T(t));
13
13
  import Q from "vue";
14
- import G from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
14
+ import W from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as h } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
17
  import { Watch as D } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js";
18
- import { AnalysisMode as R, AnalyseParameterTable as W, getLeadpoint as N, getActualY as K, calcDistance as O, calcPRInterval as z, calcPD as H, calcQRSD as X, calcQTAndQTCAndQTD as j, caclTD as E, calcTA as _, toFixedFun as y, calcPstate as k, calcPA as q, calcQRS as $, calcSTJA as Y, clacST as J, calcIaddIIaddIII as U, calcRv5 as Z, calcSv1 as ee, calcPelectricAxis as te, calcQRSelectricAxis as ae, calcTelectricAxis as se, calcMs as ie, LeadNameTexts as ne, getStepForSpeed as re } from "@costy-plus/utils";
18
+ import { AnalysisMode as M, AnalyseParameterTable as G, getLeadpoint as N, getActualY as K, calcDistance as O, calcPRInterval as z, calcPD as H, calcQRSD as X, calcQTAndQTCAndQTD as j, caclTD as E, calcTA as k, toFixedFun as m, calcPstate as _, calcPA as q, calcQRS as $, calcSTJA as Y, clacST as J, calcIaddIIaddIII as U, calcRv5 as Z, calcSv1 as ee, calcPelectricAxis as te, calcQRSelectricAxis as ae, calcTelectricAxis as se, calcMs as ie, LeadNameTexts as ne, getStepForSpeed as re } from "@costy-plus/utils";
19
19
  import { throttleDecorator as le } from "../utils/tool.js";
20
- import { util as M, Polyline as S, Text as P, Group as x, Line as he, Circle as oe } from "zrender";
20
+ import { util as V, Polyline as I, Text as P, Group as S, Line as he, Circle as oe } from "zrender";
21
21
  var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, r = (e, t, a, s) => {
22
22
  for (var i = s > 1 ? void 0 : s ? ue(t, a) : t, l = e.length - 1, o; l >= 0; l--)
23
23
  (o = e[l]) && (i = (s ? o(t, a, i) : o(i)) || i);
@@ -25,7 +25,7 @@ var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, r = (e, t,
25
25
  };
26
26
  let n = class extends Q {
27
27
  constructor() {
28
- super(...arguments), this.AnalysisMode = R, this.AnalyseParameterTable = W, this.sceneIns = Object.freeze(null), this.AssistCtx = Object.freeze(null), this.leadNameIns = Object.freeze(null), this.sensAndSpeedIns = Object.freeze(null), this.waveFromIns = Object.freeze(null), this.waveFromGroup = Object.freeze(null), this.measureGroup = Object.freeze(null), this.leadHeadIns = Object.freeze(null), this.M1 = Object.freeze(null), this.M2 = Object.freeze(null), this.P1 = Object.freeze(null), this.P2 = Object.freeze(null), this.R1 = Object.freeze(null), this.R2 = Object.freeze(null), this.T1 = Object.freeze(null), this.T2 = Object.freeze(null), this.bottomSafeAreaH = Object.freeze(63), this.drawWaveFromX = Object.freeze(0), this.dbClickTime = Object.freeze(0), this.startPos = Object.freeze(0), this.currentGainIdx = Object.freeze(0), this.currentSpeedIdx = Object.freeze(0), this.currentLeadAnalyseValueIdx = Object.freeze(0), this.longdata = Object.freeze(void 0), this.modifyAnalysed = Object.freeze(null), this.measureLineMoveInfo = Object.freeze({
28
+ super(...arguments), this.AnalysisMode = M, this.AnalyseParameterTable = G, this.sceneIns = Object.freeze(null), this.AssistCtx = Object.freeze(null), this.leadNameIns = Object.freeze(null), this.sensAndSpeedIns = Object.freeze(null), this.waveFromIns = Object.freeze(null), this.waveFromGroup = Object.freeze(null), this.measureGroup = Object.freeze(null), this.leadHeadIns = Object.freeze(null), this.M1 = Object.freeze(null), this.M2 = Object.freeze(null), this.P1 = Object.freeze(null), this.P2 = Object.freeze(null), this.R1 = Object.freeze(null), this.R2 = Object.freeze(null), this.T1 = Object.freeze(null), this.T2 = Object.freeze(null), this.bottomSafeAreaH = Object.freeze(63), this.drawWaveFromX = Object.freeze(0), this.dbClickTime = Object.freeze(0), this.startPos = Object.freeze(0), this.currentGainIdx = Object.freeze(0), this.currentSpeedIdx = Object.freeze(0), this.currentLeadAnalyseValueIdx = Object.freeze(0), this.longdata = Object.freeze(void 0), this.modifyAnalysed = Object.freeze(null), this.measureLineMoveInfo = Object.freeze({
29
29
  x: 0,
30
30
  findIdx: 0,
31
31
  name: "",
@@ -94,11 +94,11 @@ let n = class extends Q {
94
94
  this.modifyAnalysed = /* @__PURE__ */ new Map(), this.resetDefaultValue(), this.currentGainIdx = this.enlargeGains.findIndex((e) => e.value === this.sens / this.gridConfig.cellMg), this.currentSpeedIdx = this.enlargeSpeeds.findIndex((e) => e.value === this.speedValue), this.currentLeadAnalyseValueIdx = this.analyseValue.findIndex((e) => {
95
95
  var t;
96
96
  return e.BeatID === ((t = this.activeLeadAnalyseValue) == null ? void 0 : t.BeatID);
97
- }), this.currentSens = this.sens * this.magnification, this.currentSpeedValue = this.speedValue, this.currentStep = this.step * this.magnification, this.currentLeadAnalyseValue = M.clone(this.activeLeadAnalyseValue), this.complexAnalysisvalue = M.clone(this.analyseValue[0]) || null, this.isSyncAnalyseValueCheck && (this.isSyncAnalyseValue = !0), this.processEnlargeAnalysisData();
97
+ }), this.currentSens = this.sens * this.magnification, this.currentSpeedValue = this.speedValue, this.currentStep = this.step * this.magnification, this.currentLeadAnalyseValue = V.clone(this.activeLeadAnalyseValue), this.complexAnalysisvalue = V.clone(this.analyseValue[0]) || null, this.isSyncAnalyseValueCheck && (this.isSyncAnalyseValue = !0), this.processEnlargeAnalysisData();
98
98
  }
99
99
  processEnlargeAnalysisData() {
100
100
  var e, t, a, s, i;
101
- this.enlargeAnalysisData = m(u({}, ((e = this.currentLeadAnalyseValue) == null ? void 0 : e.AnabyBeat) || {}), {
101
+ this.enlargeAnalysisData = y(u({}, ((e = this.currentLeadAnalyseValue) == null ? void 0 : e.AnabyBeat) || {}), {
102
102
  AtrialRate: ((a = (t = this.complexAnalysisvalue) == null ? void 0 : t.AnabyBeat) == null ? void 0 : a.AtrialRate) || 0,
103
103
  VentricularRate: ((i = (s = this.complexAnalysisvalue) == null ? void 0 : s.AnabyBeat) == null ? void 0 : i.VentricularRate) || 0,
104
104
  QTc: ""
@@ -115,7 +115,7 @@ let n = class extends Q {
115
115
  createLeadHead() {
116
116
  var s, i;
117
117
  const t = this.containerWH.height / 2, a = this.leadHeadConfig.leadHedeWidth / 4;
118
- this.leadHeadIns && ((s = this.sceneIns) == null || s.remove(this.leadHeadIns)), this.leadHeadIns = new S({
118
+ this.leadHeadIns && ((s = this.sceneIns) == null || s.remove(this.leadHeadIns)), this.leadHeadIns = new I({
119
119
  cursor: "",
120
120
  shape: {
121
121
  points: [
@@ -180,7 +180,7 @@ let n = class extends Q {
180
180
  }
181
181
  createWaveFrom() {
182
182
  var e;
183
- this.waveFromIns = new S({
183
+ this.waveFromIns = new I({
184
184
  cursor: "",
185
185
  shape: {
186
186
  points: []
@@ -196,13 +196,13 @@ let n = class extends Q {
196
196
  }
197
197
  drawAllLead() {
198
198
  var t, a, s;
199
- (t = this.waveFromIns) == null || t.hide(), this.waveFromGroup ? this.waveFromGroup.removeAll() : this.waveFromGroup = new x({
199
+ (t = this.waveFromIns) == null || t.hide(), this.waveFromGroup ? this.waveFromGroup.removeAll() : this.waveFromGroup = new S({
200
200
  name: "waveFromGroup"
201
201
  }), this.longdata = void 0;
202
202
  const e = this.containerWH.height / 2;
203
203
  for (let i = 0; i < this.leadNames.length - 1; i++) {
204
204
  const { beatData: l, startPos: o } = this.getWaveFrom(((a = this.currentLeadAnalyseValue) == null ? void 0 : a.BeatID) || 0, this.leadNames[i].val);
205
- this.startPos = o, this.waveFromLenPX = l.length * this.currentStep, this.drawWaveFromX = this.containerWH.width / 2 - this.waveFromLenPX / 2 + this.leadHeadConfig.leadHedeWidth, this.waveFromGroup.add(new S({
205
+ this.startPos = o, this.waveFromLenPX = l.length * this.currentStep, this.drawWaveFromX = this.containerWH.width / 2 - this.waveFromLenPX / 2 + this.leadHeadConfig.leadHedeWidth, this.waveFromGroup.add(new I({
206
206
  cursor: "",
207
207
  name: `${i}`,
208
208
  shape: {
@@ -258,42 +258,42 @@ let n = class extends Q {
258
258
  };
259
259
  }
260
260
  drawMeasureLine() {
261
- var a, s, i, l, o, c, d, f, p, A, L, v, g, I;
262
- this.measureGroup ? (this.measureGroup.removeAll(), (a = this.sceneIns) == null || a.remove(this.measureGroup)) : this.measureGroup = new x({
261
+ var t, a, s, i, l, o, c, d, f, p, A, L, v, g;
262
+ this.measureGroup ? (this.measureGroup.removeAll(), (t = this.sceneIns) == null || t.remove(this.measureGroup)) : this.measureGroup = new S({
263
263
  name: "measureGroup"
264
- });
265
- const e = O(this.currentSpeedValue, this.gridConfig.cellMg, this.magnification), t = {
264
+ }), O(this.currentSpeedValue, this.gridConfig.cellMg, this.magnification);
265
+ const e = {
266
266
  stroke: "#FF09FF",
267
267
  lineWidth: 1.5
268
268
  };
269
- this.M1 = this.createMeasureLineGroup("M1", this.drawWaveFromX + 10, t), this.M2 = this.createMeasureLineGroup("M2", this.drawWaveFromX + 10 + e, t), t.stroke = "blue", this.P1 = this.createMeasureLineGroup(
269
+ e.stroke = "blue", this.P1 = this.createMeasureLineGroup(
270
270
  "P1",
271
- ((((i = (s = this.currentLeadAnalyseValue) == null ? void 0 : s.KeyPosByBeat) == null ? void 0 : i.Pstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
272
- t
271
+ ((((s = (a = this.currentLeadAnalyseValue) == null ? void 0 : a.KeyPosByBeat) == null ? void 0 : s.Pstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
272
+ e
273
273
  ), this.P2 = this.createMeasureLineGroup(
274
274
  "P2",
275
- ((((o = (l = this.currentLeadAnalyseValue) == null ? void 0 : l.KeyPosByBeat) == null ? void 0 : o.Pend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
276
- t
275
+ ((((l = (i = this.currentLeadAnalyseValue) == null ? void 0 : i.KeyPosByBeat) == null ? void 0 : l.Pend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
276
+ e
277
277
  ), this.R1 = this.createMeasureLineGroup(
278
278
  "R1",
279
- ((((d = (c = this.currentLeadAnalyseValue) == null ? void 0 : c.KeyPosByBeat) == null ? void 0 : d.QRSstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
280
- t
279
+ ((((c = (o = this.currentLeadAnalyseValue) == null ? void 0 : o.KeyPosByBeat) == null ? void 0 : c.QRSstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
280
+ e
281
281
  ), this.R2 = this.createMeasureLineGroup(
282
282
  "R2",
283
- ((((p = (f = this.currentLeadAnalyseValue) == null ? void 0 : f.KeyPosByBeat) == null ? void 0 : p.QRSend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
284
- t
283
+ ((((f = (d = this.currentLeadAnalyseValue) == null ? void 0 : d.KeyPosByBeat) == null ? void 0 : f.QRSend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
284
+ e
285
285
  ), this.T1 = this.createMeasureLineGroup(
286
286
  "T1",
287
- ((((L = (A = this.currentLeadAnalyseValue) == null ? void 0 : A.KeyPosByBeat) == null ? void 0 : L.Tstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
288
- t
287
+ ((((A = (p = this.currentLeadAnalyseValue) == null ? void 0 : p.KeyPosByBeat) == null ? void 0 : A.Tstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
288
+ e
289
289
  ), this.T2 = this.createMeasureLineGroup(
290
290
  "T2",
291
- ((((g = (v = this.currentLeadAnalyseValue) == null ? void 0 : v.KeyPosByBeat) == null ? void 0 : g.Tend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
292
- t
293
- ), this.measureGroup.add(this.M1), this.measureGroup.add(this.M2), this.measureGroup.add(this.P1), this.measureGroup.add(this.P2), this.measureGroup.add(this.R1), this.measureGroup.add(this.R2), this.measureGroup.add(this.T1), this.measureGroup.add(this.T2), (I = this.sceneIns) == null || I.add(this.measureGroup);
291
+ ((((v = (L = this.currentLeadAnalyseValue) == null ? void 0 : L.KeyPosByBeat) == null ? void 0 : v.Tend) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
292
+ e
293
+ ), this.measureGroup.add(this.P1), this.measureGroup.add(this.P2), this.measureGroup.add(this.R1), this.measureGroup.add(this.R2), this.measureGroup.add(this.T1), this.measureGroup.add(this.T2), (g = this.sceneIns) == null || g.add(this.measureGroup);
294
294
  }
295
295
  createMeasureLineGroup(e, t, a) {
296
- const s = new x({
296
+ const s = new S({
297
297
  name: e,
298
298
  draggable: "horizontal",
299
299
  ondrag: this.measureLineDrag
@@ -393,7 +393,7 @@ let n = class extends Q {
393
393
  }
394
394
  if (this.electricAxisAnalyse(), this.processEnlargeAnalysis(), this.isShowSyncAnalyseValue) {
395
395
  const i = u(u({}, ((t = this.currentLeadAnalyseValue) == null ? void 0 : t.AnabyBeat) || {}), this.enlargeAnalysisData);
396
- this.modifyAnalysed.set(((a = this.currentLeadAnalyseValue) == null ? void 0 : a.BeatID) || 0, m(u({}, this.currentLeadAnalyseValue), {
396
+ this.modifyAnalysed.set(((a = this.currentLeadAnalyseValue) == null ? void 0 : a.BeatID) || 0, y(u({}, this.currentLeadAnalyseValue), {
397
397
  AnabyBeat: i,
398
398
  BeatID: ((s = this.currentLeadAnalyseValue) == null ? void 0 : s.BeatID) || 0
399
399
  }));
@@ -436,32 +436,32 @@ let n = class extends Q {
436
436
  this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
437
437
  this.sampleRate
438
438
  ));
439
- const { TA: l } = _(m(u({}, e), {
439
+ const { TA: l } = k(y(u({}, e), {
440
440
  Tstart: this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
441
441
  Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend,
442
442
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
443
443
  TPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak
444
444
  }));
445
- this.enlargeAnalysisData.TtypeA = y(l || 0, 2);
445
+ this.enlargeAnalysisData.TtypeA = m(l || 0, 2);
446
446
  }
447
- if (this.enlargeAnalysisData.Ptype = k(m(u({}, e), {
447
+ if (this.enlargeAnalysisData.Ptype = _(y(u({}, e), {
448
448
  Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
449
449
  Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
450
450
  data: this.longdata
451
451
  })) || "", this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "P1" || this.measureLineMoveInfo.name === "P2") {
452
- const { PA: l } = q(m(u({}, e), {
452
+ const { PA: l } = q(y(u({}, e), {
453
453
  Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
454
454
  Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
455
455
  PPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak
456
456
  }));
457
- this.enlargeAnalysisData.PtypeA = y(l || 0, 2);
457
+ this.enlargeAnalysisData.PtypeA = m(l || 0, 2);
458
458
  }
459
459
  if (this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "R1" || this.measureLineMoveInfo.name === "R2") {
460
- const { qrs_morph_type: l, QA: o, QD: c, RA: d, RD: f, SD: p, RPD: A, SA: L, RPA: v } = $(m(u({}, e), {
460
+ const { qrs_morph_type: l, QA: o, QD: c, RA: d, RD: f, SD: p, RPD: A, SA: L, RPA: v } = $(y(u({}, e), {
461
461
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
462
462
  QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend
463
463
  }));
464
- this.enlargeAnalysisData.QRStype = l || "", this.enlargeAnalysisData.QtypeA = y(o || 0, 2), this.enlargeAnalysisData.QD = Math.round(c || 0), this.enlargeAnalysisData.RtypeA = y(d || 0, 2), this.enlargeAnalysisData.StypeA = y(L || 0, 2), this.enlargeAnalysisData.RPA = y(v || 0, 2), this.enlargeAnalysisData.RD = y(f || 0, 2), this.enlargeAnalysisData.SD = y(p || 0, 2), this.enlargeAnalysisData.RPD = y(A || 0, 2);
464
+ this.enlargeAnalysisData.QRStype = l || "", this.enlargeAnalysisData.QtypeA = m(o || 0, 2), this.enlargeAnalysisData.QD = Math.round(c || 0), this.enlargeAnalysisData.RtypeA = m(d || 0, 2), this.enlargeAnalysisData.StypeA = m(L || 0, 2), this.enlargeAnalysisData.RPA = m(v || 0, 2), this.enlargeAnalysisData.RD = m(f || 0, 2), this.enlargeAnalysisData.SD = m(p || 0, 2), this.enlargeAnalysisData.RPD = m(A || 0, 2);
465
465
  const g = Y(
466
466
  e.start_pos,
467
467
  this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
@@ -469,8 +469,8 @@ let n = class extends Q {
469
469
  e.Sensitivity,
470
470
  e.longdata
471
471
  );
472
- this.enlargeAnalysisData.STJtypeA = y(g || 0, 2), this.enlargeAnalysisData.STstate = J(g || 0, e.longdata) || "";
473
- const I = U(m(u({}, e), {
472
+ this.enlargeAnalysisData.STJtypeA = m(g || 0, 2), this.enlargeAnalysisData.STstate = J(g || 0, e.longdata) || "";
473
+ const R = U(y(u({}, e), {
474
474
  ComplexData: this.complexData,
475
475
  Data: this.normalData,
476
476
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
@@ -479,7 +479,7 @@ let n = class extends Q {
479
479
  AnalyseValue: this.analyseValue,
480
480
  leadNameList: this.leadNameList
481
481
  }));
482
- this.enlargeAnalysisData.IandIIandIII = y(I, 2), this.enlargeAnalysisData.RV5Amp = y(Z(m(u({}, e), {
482
+ this.enlargeAnalysisData.IandIIandIII = m(R, 2), this.enlargeAnalysisData.RV5Amp = m(Z(y(u({}, e), {
483
483
  ComplexData: this.complexData,
484
484
  Data: this.normalData,
485
485
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
@@ -487,7 +487,7 @@ let n = class extends Q {
487
487
  BeatID: ((s = this.currentLeadAnalyseValue) == null ? void 0 : s.BeatID) || 0,
488
488
  AnalyseValue: this.analyseValue,
489
489
  leadNameList: this.leadNameList
490
- })) || 0, 2) + "", this.enlargeAnalysisData.SV1Amp = y(ee(m(u({}, e), {
490
+ })) || 0, 2) + "", this.enlargeAnalysisData.SV1Amp = m(ee(y(u({}, e), {
491
491
  ComplexData: this.complexData,
492
492
  Data: this.normalData,
493
493
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
@@ -511,10 +511,11 @@ let n = class extends Q {
511
511
  start_pos: this.startPos
512
512
  };
513
513
  if (this.measureLineMoveInfo.name === "P1" || this.measureLineMoveInfo.name === "P2") {
514
- this.enlargeAnalysisData.PAxis = te(m(u({}, e), {
514
+ this.enlargeAnalysisData.PAxis = te(y(u({}, e), {
515
515
  Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
516
- Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend
517
- }));
516
+ Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
517
+ PPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak
518
+ })) || 0;
518
519
  return;
519
520
  }
520
521
  const t = () => {
@@ -524,17 +525,19 @@ let n = class extends Q {
524
525
  s > 180 && (s = 360 - s), this.currentLeadAnalyseValue.AnabyBeat.QRS_T = s;
525
526
  };
526
527
  if (this.measureLineMoveInfo.name === "R1" || this.measureLineMoveInfo.name === "R2") {
527
- this.enlargeAnalysisData.QRSAxis = ae(m(u({}, e), {
528
+ this.enlargeAnalysisData.QRSAxis = ae(y(u({}, e), {
528
529
  QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,
529
530
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart
530
- })), t();
531
+ })) || 0, t();
531
532
  return;
532
533
  }
533
534
  if (this.measureLineMoveInfo.name === "T1" || this.measureLineMoveInfo.name === "T2") {
534
- this.enlargeAnalysisData.TAxis = se(m(u({}, e), {
535
- QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,
536
- Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend
537
- })), t();
535
+ this.enlargeAnalysisData.TAxis = se(y(u({}, e), {
536
+ QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
537
+ Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend,
538
+ Tstart: this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
539
+ TPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak
540
+ })) || 0, t();
538
541
  return;
539
542
  }
540
543
  }
@@ -577,9 +580,9 @@ let n = class extends Q {
577
580
  }
578
581
  toggleBeaadId(e) {
579
582
  var t, a, s, i, l, o;
580
- e ? this.currentLeadAnalyseValueIdx < this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx += 1, this.currentLeadAnalyseValue = m(u({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
583
+ e ? this.currentLeadAnalyseValueIdx < this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx += 1, this.currentLeadAnalyseValue = y(u({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
581
584
  BeatCount: ((t = this.currentLeadAnalyseValue) == null ? void 0 : t.BeatCount) || 0
582
- })) : this.currentLeadAnalyseValueIdx > 1 && this.currentLeadAnalyseValueIdx <= this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx -= 1, this.currentLeadAnalyseValue = m(u({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
585
+ })) : this.currentLeadAnalyseValueIdx > 1 && this.currentLeadAnalyseValueIdx <= this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx -= 1, this.currentLeadAnalyseValue = y(u({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
583
586
  BeatCount: ((a = this.currentLeadAnalyseValue) == null ? void 0 : a.BeatCount) || 0
584
587
  })), this.enlargeAnalysisData.PAxis = ((i = (s = this.currentLeadAnalyseValue) == null ? void 0 : s.AnabyBeat) == null ? void 0 : i.PAxis) || 0, this.enlargeAnalysisData.TAxis = ((o = (l = this.currentLeadAnalyseValue) == null ? void 0 : l.AnabyBeat) == null ? void 0 : o.TAxis) || 0, this.toggleRender();
585
588
  }
@@ -736,7 +739,7 @@ r([
736
739
  ], n.prototype, "leadColors", 2);
737
740
  r([
738
741
  h({
739
- default: R.CompoundWave
742
+ default: M.CompoundWave
740
743
  })
741
744
  ], n.prototype, "enlargeWaveMode", 2);
742
745
  r([
@@ -764,7 +767,7 @@ r([
764
767
  le(500)
765
768
  ], n.prototype, "calcMeasureLineOffx", 1);
766
769
  n = r([
767
- G({
770
+ W({
768
771
  name: "Methods"
769
772
  })
770
773
  ], n);
@@ -1,21 +1,21 @@
1
1
  var F = Object.defineProperty, b = Object.defineProperties;
2
- var C = Object.getOwnPropertyDescriptors;
2
+ var T = Object.getOwnPropertyDescriptors;
3
3
  var D = Object.getOwnPropertySymbols;
4
- var Q = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
4
+ var C = Object.prototype.hasOwnProperty, Q = Object.prototype.propertyIsEnumerable;
5
5
  var M = (e, t, a) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, c = (e, t) => {
6
6
  for (var a in t || (t = {}))
7
- Q.call(t, a) && M(e, a, t[a]);
7
+ C.call(t, a) && M(e, a, t[a]);
8
8
  if (D)
9
9
  for (var a of D(t))
10
- T.call(t, a) && M(e, a, t[a]);
10
+ Q.call(t, a) && M(e, a, t[a]);
11
11
  return e;
12
- }, y = (e, t) => b(e, C(t));
12
+ }, y = (e, t) => b(e, T(t));
13
13
  import N from "vue";
14
14
  import W from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as o } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
17
  import { Watch as R } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js";
18
- import { AnalysisMode as V, getActualY as G, calcDistance as K, calcPRInterval as O, calcPD as z, calcQRSD as H, calcQTAndQTCAndQTD as j, caclTD as X, calcTA as k, toFixedFun as m, calcPstate as _, calcPA as E, calcQRS as $, calcSTJA as q, clacST as Y, calcIaddIIaddIII as J, calcRv5 as U, calcSv1 as Z, calcPelectricAxis as ee, calcQRSelectricAxis as te, calcTelectricAxis as ae, calcMs as se, LeadNameTexts as ie, getStepForSpeed as ne } from "@costy-plus/utils";
18
+ import { AnalysisMode as V, getActualY as K, calcDistance as G, calcPRInterval as O, calcPD as z, calcQRSD as H, calcQTAndQTCAndQTD as j, caclTD as X, calcTA as k, toFixedFun as m, calcPstate as _, calcPA as E, calcQRS as $, calcSTJA as q, clacST as Y, calcIaddIIaddIII as J, calcRv5 as U, calcSv1 as Z, calcPelectricAxis as ee, calcQRSelectricAxis as te, calcTelectricAxis as ae, calcMs as se, LeadNameTexts as ie, getStepForSpeed as ne } from "@costy-plus/utils";
19
19
  import { util as v, Polyline as I, Text as S, Group as P, Line as re, Circle as le } from "zrender";
20
20
  var oe = Object.defineProperty, he = Object.getOwnPropertyDescriptor, l = (e, t, a, s) => {
21
21
  for (var i = s > 1 ? void 0 : s ? he(t, a) : t, n = e.length - 1, h; n >= 0; n--)
@@ -85,8 +85,8 @@ let r = class extends N {
85
85
  };
86
86
  }
87
87
  destroyed() {
88
- var e, t, a, s, i, n, h, u, d, f, p, A;
89
- (e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (a = this.M1) == null || a.removeAll(), (s = this.M2) == null || s.removeAll(), (i = this.P1) == null || i.removeAll(), (n = this.P2) == null || n.removeAll(), (h = this.R1) == null || h.removeAll(), (u = this.RR) == null || u.removeAll(), (d = this.R2) == null || d.removeAll(), (f = this.T1) == null || f.removeAll(), (p = this.T2) == null || p.removeAll();
88
+ var e, t, a, s, i, n, h, d, u, f, p, A;
89
+ (e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (a = this.M1) == null || a.removeAll(), (s = this.M2) == null || s.removeAll(), (i = this.P1) == null || i.removeAll(), (n = this.P2) == null || n.removeAll(), (h = this.R1) == null || h.removeAll(), (d = this.RR) == null || d.removeAll(), (u = this.R2) == null || u.removeAll(), (f = this.T1) == null || f.removeAll(), (p = this.T2) == null || p.removeAll();
90
90
  try {
91
91
  (A = this.sceneIns) == null || A.dispose();
92
92
  } catch (L) {
@@ -228,9 +228,9 @@ let r = class extends N {
228
228
  cursor: "",
229
229
  name: `${i}`,
230
230
  shape: {
231
- points: n.map((u, d) => [
232
- d * this.currentStep + this.drawWaveFromX,
233
- -u + e
231
+ points: n.map((d, u) => [
232
+ u * this.currentStep + this.drawWaveFromX,
233
+ -d + e
234
234
  ])
235
235
  },
236
236
  style: {
@@ -249,9 +249,9 @@ let r = class extends N {
249
249
  const s = this.containerWH.height / 2;
250
250
  (n = this.waveFromIns) == null || n.attr({
251
251
  shape: {
252
- points: e.map((u, d) => [
253
- d * this.currentStep + this.drawWaveFromX,
254
- -u + s
252
+ points: e.map((d, u) => [
253
+ u * this.currentStep + this.drawWaveFromX,
254
+ -d + s
255
255
  ])
256
256
  }
257
257
  }), (h = this.waveFromIns) == null || h.show();
@@ -262,15 +262,15 @@ let r = class extends N {
262
262
  let a = [];
263
263
  return this.enlargeWaveMode === V.CompoundWave ? a = (this.complexData[t || 0] || []).slice(this.currentDisplayLeadInfo.startPos, this.currentDisplayLeadInfo.endPos + 1) : a = (this.normalData[t || 0] || []).slice(this.currentDisplayLeadInfo.startPos, this.currentDisplayLeadInfo.endPos + 1), {
264
264
  originData: a,
265
- beatData: a.map((i) => G(this.sensitivity, i, this.currentSens)),
265
+ beatData: a.map((i) => K(this.sensitivity, i, this.currentSens)),
266
266
  startPos: this.currentDisplayLeadInfo.startPos
267
267
  };
268
268
  }
269
269
  drawMeasureLine() {
270
- var t, a, s, i, n, h, u, d;
270
+ var t, a, s, i, n, h, d, u;
271
271
  this.measureGroup ? (this.measureGroup.removeAll(), (t = this.sceneIns) == null || t.remove(this.measureGroup)) : this.measureGroup = new P({
272
272
  name: "measureGroup"
273
- }), K(this.currentSpeedValue, this.gridConfig.cellMg, this.magnification);
273
+ }), G(this.currentSpeedValue, this.gridConfig.cellMg, this.magnification);
274
274
  const e = {
275
275
  stroke: "#FF09FF",
276
276
  lineWidth: 1.5
@@ -285,9 +285,9 @@ let r = class extends N {
285
285
  e
286
286
  ), this.RR = this.createMeasureLineGroup(
287
287
  "R",
288
- ((((u = (h = this.currentLeadAnalyseValue) == null ? void 0 : h.KeyPosByBeat) == null ? void 0 : u.Rpoint) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
288
+ ((((d = (h = this.currentLeadAnalyseValue) == null ? void 0 : h.KeyPosByBeat) == null ? void 0 : d.Rpoint) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
289
289
  e
290
- ), this.measureGroup.add(this.R1), this.measureGroup.add(this.R2), this.measureGroup.add(this.RR), (d = this.sceneIns) == null || d.add(this.measureGroup);
290
+ ), this.measureGroup.add(this.R1), this.measureGroup.add(this.R2), this.measureGroup.add(this.RR), (u = this.sceneIns) == null || u.add(this.measureGroup);
291
291
  }
292
292
  createMeasureLineGroup(e, t, a) {
293
293
  const s = new P({
@@ -457,19 +457,19 @@ let r = class extends N {
457
457
  this.enlargeAnalysisData.PtypeA = m(n || 0, 2);
458
458
  }
459
459
  if (this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "Q" || this.measureLineMoveInfo.name === "S") {
460
- const { qrs_morph_type: n, QA: h, QD: u, RA: d, RD: f, SD: p, RPD: A, SA: L, RPA: x, main_peak: g } = $(y(c({}, e), {
460
+ const { qrs_morph_type: n, QA: h, QD: d, RA: u, RD: f, SD: p, RPD: A, SA: L, RPA: B, main_peak: g } = $(y(c({}, e), {
461
461
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
462
462
  QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend
463
463
  }));
464
- this.enlargeAnalysisData.main_peak = g !== void 0 ? m(Math.abs(g) || 0, 2) : "", this.enlargeAnalysisData.QRStype = n || "", this.enlargeAnalysisData.QtypeA = m(h || 0, 2), this.enlargeAnalysisData.QD = Math.round(u || 0), this.enlargeAnalysisData.RtypeA = m(d || 0, 2), this.enlargeAnalysisData.StypeA = m(L || 0, 2), this.enlargeAnalysisData.RPA = m(x || 0, 2), this.enlargeAnalysisData.RD = m(f || 0, 2), this.enlargeAnalysisData.SD = m(p || 0, 2), this.enlargeAnalysisData.RPD = m(A || 0, 2);
465
- const B = q(
464
+ this.enlargeAnalysisData.main_peak = g !== void 0 ? m(Math.abs(g) || 0, 2) : "", this.enlargeAnalysisData.QRStype = n || "", this.enlargeAnalysisData.QtypeA = m(h || 0, 2), this.enlargeAnalysisData.QD = Math.round(d || 0), this.enlargeAnalysisData.RtypeA = m(u || 0, 2), this.enlargeAnalysisData.StypeA = m(L || 0, 2), this.enlargeAnalysisData.RPA = m(B || 0, 2), this.enlargeAnalysisData.RD = m(f || 0, 2), this.enlargeAnalysisData.SD = m(p || 0, 2), this.enlargeAnalysisData.RPD = m(A || 0, 2);
465
+ const x = q(
466
466
  e.start_pos,
467
467
  this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
468
468
  this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,
469
469
  e.Sensitivity,
470
470
  e.longdata
471
471
  );
472
- this.enlargeAnalysisData.STJtypeA = m(B || 0, 2), this.enlargeAnalysisData.STstate = Y(B || 0, e.longdata) || "";
472
+ this.enlargeAnalysisData.STJtypeA = m(x || 0, 2), this.enlargeAnalysisData.STstate = Y(x || 0, e.longdata) || "";
473
473
  const w = J(y(c({}, e), {
474
474
  ComplexData: this.complexData,
475
475
  Data: this.normalData,
@@ -513,8 +513,9 @@ let r = class extends N {
513
513
  if (this.measureLineMoveInfo.name === "P1" || this.measureLineMoveInfo.name === "P2") {
514
514
  this.enlargeAnalysisData.PAxis = ee(y(c({}, e), {
515
515
  Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
516
- Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend
517
- }));
516
+ Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
517
+ PPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak
518
+ })) || 0;
518
519
  return;
519
520
  }
520
521
  const t = () => {
@@ -528,14 +529,16 @@ let r = class extends N {
528
529
  this.enlargeAnalysisData.QRSAxis = te(y(c({}, e), {
529
530
  QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,
530
531
  QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart
531
- })), t();
532
+ })) || 0, t();
532
533
  return;
533
534
  }
534
535
  if (this.measureLineMoveInfo.name === "T1" || this.measureLineMoveInfo.name === "T2") {
535
536
  this.enlargeAnalysisData.TAxis = ae(y(c({}, e), {
536
- QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,
537
- Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend
538
- })), t();
537
+ Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend,
538
+ QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
539
+ Tstart: this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
540
+ TPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak
541
+ })) || 0, t();
539
542
  return;
540
543
  }
541
544
  }
@@ -548,12 +551,12 @@ let r = class extends N {
548
551
  this.difference.timeDifference = n;
549
552
  const h = parseInt(
550
553
  `${(a - this.drawWaveFromX) / this.currentStep}`
551
- ), u = parseInt(
554
+ ), d = parseInt(
552
555
  `${(s - this.drawWaveFromX) / this.currentStep}`
553
556
  );
554
- let d = [];
555
- if (this.leadNameActive.val === -1 ? d = ((A = this.waveFromGroup) == null ? void 0 : A.childAt(this.waveFromGroup.childCount() - 1)).shape.points || [] : d = ((L = this.waveFromIns) == null ? void 0 : L.shape.points) || [], u > 0 && h > 0 && u <= d.length - 1 && h <= d.length - 1) {
556
- const g = (Math.abs(d[u][1] - d[h][1]) / this.currentSens).toFixed(2);
557
+ let u = [];
558
+ if (this.leadNameActive.val === -1 ? u = ((A = this.waveFromGroup) == null ? void 0 : A.childAt(this.waveFromGroup.childCount() - 1)).shape.points || [] : u = ((L = this.waveFromIns) == null ? void 0 : L.shape.points) || [], d > 0 && h > 0 && d <= u.length - 1 && h <= u.length - 1) {
559
+ const g = (Math.abs(u[d][1] - u[h][1]) / this.currentSens).toFixed(2);
557
560
  this.difference.amplitudeDifference = g;
558
561
  } else
559
562
  this.difference.amplitudeDifference = "";
@@ -577,12 +580,12 @@ let r = class extends N {
577
580
  this.currentSpeedIdx > 0 && this.currentSpeedIdx <= this.enlargeSpeeds.length - 1 && (this.currentSpeedIdx -= 1, this.currentSpeedValue = this.enlargeSpeeds[this.currentSpeedIdx].value, t(), this.toggleRender());
578
581
  }
579
582
  toggleBeaadId(e) {
580
- var s, i, n, h, u, d, f, p;
583
+ var s, i, n, h, d, u, f, p;
581
584
  e ? this.currentLeadAnalyseValueIdx < this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx += 1, this.currentLeadAnalyseValue = y(c({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
582
585
  BeatCount: ((s = this.currentLeadAnalyseValue) == null ? void 0 : s.BeatCount) || 0
583
586
  })) : this.currentLeadAnalyseValueIdx > 1 && this.currentLeadAnalyseValueIdx <= this.analyseValue.length - 1 && (this.currentLeadAnalyseValueIdx -= 1, this.currentLeadAnalyseValue = y(c({}, this.analyseValue[this.currentLeadAnalyseValueIdx]), {
584
587
  BeatCount: ((i = this.currentLeadAnalyseValue) == null ? void 0 : i.BeatCount) || 0
585
- })), this.enlargeAnalysisData.PAxis = ((h = (n = this.currentLeadAnalyseValue) == null ? void 0 : n.AnabyBeat) == null ? void 0 : h.PAxis) || 0, this.enlargeAnalysisData.TAxis = ((d = (u = this.currentLeadAnalyseValue) == null ? void 0 : u.AnabyBeat) == null ? void 0 : d.TAxis) || 0;
588
+ })), this.enlargeAnalysisData.PAxis = ((h = (n = this.currentLeadAnalyseValue) == null ? void 0 : n.AnabyBeat) == null ? void 0 : h.PAxis) || 0, this.enlargeAnalysisData.TAxis = ((u = (d = this.currentLeadAnalyseValue) == null ? void 0 : d.AnabyBeat) == null ? void 0 : u.TAxis) || 0;
586
589
  const t = parseInt(`${1 * 1e3}`), a = ((p = (f = this.currentLeadAnalyseValue) == null ? void 0 : f.KeyPosByBeat) == null ? void 0 : p.Rpoint) || 0;
587
590
  this.currentDisplayLeadInfo = {
588
591
  startPos: a - t < 0 ? 0 : a - t,
@@ -1 +1 @@
1
- "use strict";var V=Object.defineProperty,B=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,d=(e,t)=>{for(var a in t||(t={}))D.call(t,a)&&S(e,a,t[a]);if(I)for(var a of I(t))F.call(t,a)&&S(e,a,t[a]);return e},m=(e,t)=>B(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("vue"),w=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),x=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),T=require("../utils/tool.js"),y=require("zrender"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},C=b(R);var Q=Object.defineProperty,G=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?G(t,a):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&Q(t,a,i),i};exports.default=class extends C.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData=null,this.difference={timeDifference:0,amplitudeDifference:""}}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,l,h,c,u,f,p;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(l=this.P2)==null||l.removeAll(),(h=this.R1)==null||h.removeAll(),(c=this.R2)==null||c.removeAll(),(u=this.T1)==null||u.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=y.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=y.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=m(d({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new y.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new y.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new y.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new y.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new y.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:l,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.waveFromLenPX=l.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new y.Polyline({cursor:"",name:`${i}`,shape:{points:l.map((c,u)=>[u*this.currentStep+this.drawWaveFromX,-c+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,l,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(l=this.waveFromIns)==null||l.attr({shape:{points:e.map((c,u)=>[u*this.currentStep+this.drawWaveFromX,-c+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(l=>n.getActualY(this.sensitivity,l,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var a,s,i,l,h,c,u,f,p,A,L,g,v,P;this.measureGroup?(this.measureGroup.removeAll(),(a=this.sceneIns)==null||a.remove(this.measureGroup)):this.measureGroup=new y.Group({name:"measureGroup"});const e=n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification),t={stroke:"#FF09FF",lineWidth:1.5};this.M1=this.createMeasureLineGroup("M1",this.drawWaveFromX+10,t),this.M2=this.createMeasureLineGroup("M2",this.drawWaveFromX+10+e,t),t.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.KeyPosByBeat)==null?void 0:i.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.P2=this.createMeasureLineGroup("P2",((((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.KeyPosByBeat)==null?void 0:h.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R1=this.createMeasureLineGroup("R1",((((u=(c=this.currentLeadAnalyseValue)==null?void 0:c.KeyPosByBeat)==null?void 0:u.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R2=this.createMeasureLineGroup("R2",((((p=(f=this.currentLeadAnalyseValue)==null?void 0:f.KeyPosByBeat)==null?void 0:p.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T1=this.createMeasureLineGroup("T1",((((L=(A=this.currentLeadAnalyseValue)==null?void 0:A.KeyPosByBeat)==null?void 0:L.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T2=this.createMeasureLineGroup("T2",((((v=(g=this.currentLeadAnalyseValue)==null?void 0:g.KeyPosByBeat)==null?void 0:v.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.measureGroup.add(this.M1),this.measureGroup.add(this.M2),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(P=this.sceneIns)==null||P.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new y.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new y.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new y.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new y.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((l,h)=>l.x-h.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=d(d({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,m(d({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="R1")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:l,QTC:h}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(l),this.enlargeAnalysisData.QTc=Math.round(h||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:l}=n.calcTA(m(d({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(l||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(m(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:l}=n.calcPA(m(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(l||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:l,QA:h,QD:c,RA:u,RD:f,SD:p,RPD:A,SA:L,RPA:g}=n.calcQRS(m(d({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=l||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(h||0,2),this.enlargeAnalysisData.QD=Math.round(c||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(g||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(f||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const v=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.STstate=n.clacST(v||0,e.longdata)||"";const P=n.calcIaddIIaddIII(m(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(P,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(m(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(m(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(m(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(m(d({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(m(d({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),l=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=l;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),c=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let u=[];if(this.leadNameActive.val===-1?u=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:u=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],c>0&&h>0&&c<=u.length-1&&h<=u.length-1){const v=(Math.abs(u[c][1]-u[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a,s,i,l,h;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=m(d({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=m(d({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.PAxis)||0,this.enlargeAnalysisData.TAxis=((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.AnabyBeat)==null?void 0:h.TAxis)||0,this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};r([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);r([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);r([o.Prop({default:()=>""})],exports.default.prototype,"className",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([o.Prop({default:1})],exports.default.prototype,"sens",2);r([o.Prop({default:1})],exports.default.prototype,"step",2);r([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);r([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);r([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([o.Prop({default:5})],exports.default.prototype,"magnification",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);r([x.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([x.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);r([T.throttleDecorator(500)],exports.default.prototype,"calcMeasureLineOffx",1);exports.default=r([w.default({name:"Methods"})],exports.default);
1
+ "use strict";var V=Object.defineProperty,B=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var I=(e,t,a)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,d=(e,t)=>{for(var a in t||(t={}))M.call(t,a)&&I(e,a,t[a]);if(P)for(var a of P(t))F.call(t,a)&&I(e,a,t[a]);return e},y=(e,t)=>B(e,D(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("vue"),w=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),S=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),T=require("../utils/tool.js"),m=require("zrender"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},C=b(R);var Q=Object.defineProperty,W=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?W(t,a):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&Q(t,a,i),i};exports.default=class extends C.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData=null,this.difference={timeDifference:0,amplitudeDifference:""}}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,l,h,c,u,f,p;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(l=this.P2)==null||l.removeAll(),(h=this.R1)==null||h.removeAll(),(c=this.R2)==null||c.removeAll(),(u=this.T1)==null||u.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=m.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=m.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=y(d({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new m.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new m.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new m.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new m.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new m.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:l,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.waveFromLenPX=l.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new m.Polyline({cursor:"",name:`${i}`,shape:{points:l.map((c,u)=>[u*this.currentStep+this.drawWaveFromX,-c+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,l,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(l=this.waveFromIns)==null||l.attr({shape:{points:e.map((c,u)=>[u*this.currentStep+this.drawWaveFromX,-c+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(l=>n.getActualY(this.sensitivity,l,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var t,a,s,i,l,h,c,u,f,p,A,L,g,v;this.measureGroup?(this.measureGroup.removeAll(),(t=this.sceneIns)==null||t.remove(this.measureGroup)):this.measureGroup=new m.Group({name:"measureGroup"}),n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);const e={stroke:"#FF09FF",lineWidth:1.5};e.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((s=(a=this.currentLeadAnalyseValue)==null?void 0:a.KeyPosByBeat)==null?void 0:s.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.P2=this.createMeasureLineGroup("P2",((((l=(i=this.currentLeadAnalyseValue)==null?void 0:i.KeyPosByBeat)==null?void 0:l.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R1=this.createMeasureLineGroup("R1",((((c=(h=this.currentLeadAnalyseValue)==null?void 0:h.KeyPosByBeat)==null?void 0:c.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R2=this.createMeasureLineGroup("R2",((((f=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:f.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.T1=this.createMeasureLineGroup("T1",((((A=(p=this.currentLeadAnalyseValue)==null?void 0:p.KeyPosByBeat)==null?void 0:A.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.T2=this.createMeasureLineGroup("T2",((((g=(L=this.currentLeadAnalyseValue)==null?void 0:L.KeyPosByBeat)==null?void 0:g.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(v=this.sceneIns)==null||v.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new m.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new m.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new m.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new m.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((l,h)=>l.x-h.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=d(d({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(d({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="R1")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:l,QTC:h}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(l),this.enlargeAnalysisData.QTc=Math.round(h||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:l}=n.calcTA(y(d({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(l||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:l}=n.calcPA(y(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(l||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:l,QA:h,QD:c,RA:u,RD:f,SD:p,RPD:A,SA:L,RPA:g}=n.calcQRS(y(d({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=l||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(h||0,2),this.enlargeAnalysisData.QD=Math.round(c||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(g||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(f||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const v=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.STstate=n.clacST(v||0,e.longdata)||"";const x=n.calcIaddIIaddIII(y(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(x,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(d({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(d({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}))||0;return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(d({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart}))||0,t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(d({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}))||0,t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),l=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=l;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),c=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let u=[];if(this.leadNameActive.val===-1?u=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:u=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],c>0&&h>0&&c<=u.length-1&&h<=u.length-1){const v=(Math.abs(u[c][1]-u[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a,s,i,l,h;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(d({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(d({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.PAxis)||0,this.enlargeAnalysisData.TAxis=((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.AnabyBeat)==null?void 0:h.TAxis)||0,this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};r([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);r([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);r([o.Prop({default:()=>""})],exports.default.prototype,"className",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([o.Prop({default:1})],exports.default.prototype,"sens",2);r([o.Prop({default:1})],exports.default.prototype,"step",2);r([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);r([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);r([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([o.Prop({default:5})],exports.default.prototype,"magnification",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);r([S.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([S.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);r([T.throttleDecorator(500)],exports.default.prototype,"calcMeasureLineOffx",1);exports.default=r([w.default({name:"Methods"})],exports.default);
@@ -1 +1 @@
1
- "use strict";var B=Object.defineProperty,D=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&S(e,a,t[a]);if(P)for(var a of P(t))F.call(t,a)&&S(e,a,t[a]);return e},y=(e,t)=>D(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("vue"),b=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),x=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),f=require("zrender"),C=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=C(w);var T=Object.defineProperty,W=Object.getOwnPropertyDescriptor,l=(e,t,a,s)=>{for(var i=s>1?void 0:s?W(t,a):t,r=e.length-1,u;r>=0;r--)(u=e[r])&&(i=(s?u(t,a,i):u(i))||i);return s&&i&&T(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=[{key:"QRSd",name:"FQRS\u95F4\u671F",unit:"ms"},{key:"main_peak",name:"FQRS\u632F\u5E45",unit:"uV"}],this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.RR=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData={},this.difference={timeDifference:0,amplitudeDifference:""},this.isMeasureRule=!1,this.currentDisplayLeadInfo=null}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,r,u,h,d,m,p,A;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(r=this.P2)==null||r.removeAll(),(u=this.R1)==null||u.removeAll(),(h=this.RR)==null||h.removeAll(),(d=this.R2)==null||d.removeAll(),(m=this.T1)==null||m.removeAll(),(p=this.T2)==null||p.removeAll();try{(A=this.sceneIns)==null||A.dispose()}catch(L){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=f.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=f.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.currentDisplayLeadInfo=f.util.clone(this.DisplayLeadInfo),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i,r;this.enlargeAnalysisData=Object.assign({},y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QRSd:((r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat).qrsd,main_peak:"",QTc:""}))}measureRule(){this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyMeasureRule",{val:this.isMeasureRule,sens:this.currentSens,speed:this.currentSpeedValue})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var e,t;if(this.leadHeadConfig.isShowLeadCalibration!==!1){const s=this.containerWH.height/2,i=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((e=this.sceneIns)==null||e.remove(this.leadHeadIns)),this.leadHeadIns=new f.Polyline({cursor:"",shape:{points:[[0+0,0+s],[i+0,0+s],[i+0,-this.currentSens+s],[3*i+0,-this.currentSens+s],[3*i+0,0+s],[4*i+0,0+s]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(t=this.sceneIns)==null||t.add(this.leadHeadIns)}}createLeadName(){var t;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new f.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new f.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new f.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new f.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:r,startPos:u}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=u,this.waveFromLenPX=r.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new f.Polyline({cursor:"",name:`${i}`,shape:{points:r.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,r,u;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(r=this.waveFromIns)==null||r.attr({shape:{points:e.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+s])}}),(u=this.waveFromIns)==null||u.show()}getWaveFrom(e,t){var s;e=e!==void 0?e:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val;let a=[];return this.enlargeWaveMode===n.AnalysisMode.CompoundWave?a=(this.complexData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1):a=(this.normalData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1),{originData:a,beatData:a.map(i=>n.getActualY(this.sensitivity,i,this.currentSens)),startPos:this.currentDisplayLeadInfo.startPos}}drawMeasureLine(){var t,a,s,i,r,u,h,d;this.measureGroup?(this.measureGroup.removeAll(),(t=this.sceneIns)==null||t.remove(this.measureGroup)):this.measureGroup=new f.Group({name:"measureGroup"}),n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);const e={stroke:"#FF09FF",lineWidth:1.5};e.stroke="blue",this.R1=this.createMeasureLineGroup("Q",((((s=(a=this.currentLeadAnalyseValue)==null?void 0:a.KeyPosByBeat)==null?void 0:s.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R2=this.createMeasureLineGroup("S",((((r=(i=this.currentLeadAnalyseValue)==null?void 0:i.KeyPosByBeat)==null?void 0:r.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.RR=this.createMeasureLineGroup("R",((((h=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:h.Rpoint)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.RR),(d=this.sceneIns)==null||d.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new f.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new f.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new f.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new f.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((r,u)=>r.x-u.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"Q":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R":this.currentLeadAnalyseValue.KeyPosByBeat.Rpoint=e;break;case"S":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="Q")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="T2"){const{QT:r,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(r),this.enlargeAnalysisData.QTc=Math.round(u||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:r}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(r||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:r}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(r||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){const{qrs_morph_type:r,QA:u,QD:h,RA:d,RD:m,SD:p,RPD:A,SA:L,RPA:v,main_peak:g}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.main_peak=g!==void 0?n.toFixedFun(Math.abs(g)||0,2):"",this.enlargeAnalysisData.QRStype=r||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(h||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(d||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(m||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const I=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(I||0,2),this.enlargeAnalysisData.STstate=n.clacST(I||0,e.longdata)||"";const V=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{var i,r;let s=Math.abs((((i=this.enlargeAnalysisData)==null?void 0:i.QRSAxis)||0)-(((r=this.enlargeAnalysisData)==null?void 0:r.TAxis)||0));s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var m,p,A,L;const e=(m=this.M1)==null?void 0:m.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),r=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=r;const u=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),h=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let d=[];if(this.leadNameActive.val===-1?d=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:d=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],h>0&&u>0&&h<=d.length-1&&u<=d.length-1){const g=(Math.abs(d[h][1]-d[u][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=g}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender()),this.$emit("notifyToggleGain",this.currentSens);return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender(),this.$emit("notifyToggleGain",this.currentSens))}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification,this.$emit("notifyToggleSpeeds",this.currentSpeedValue)};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var s,i,r,u,h,d,m,p;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((u=(r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat)==null?void 0:u.PAxis)||0,this.enlargeAnalysisData.TAxis=((d=(h=this.currentLeadAnalyseValue)==null?void 0:h.AnabyBeat)==null?void 0:d.TAxis)||0;const t=parseInt(`${1*1e3}`),a=((p=(m=this.currentLeadAnalyseValue)==null?void 0:m.KeyPosByBeat)==null?void 0:p.Rpoint)||0;this.currentDisplayLeadInfo={startPos:a-t<0?0:a-t,endPos:a+t},this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};l([o.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);l([o.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);l([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);l([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);l([o.Prop({default:()=>""})],exports.default.prototype,"className",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);l([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);l([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);l([o.Prop({default:1})],exports.default.prototype,"sens",2);l([o.Prop({default:1})],exports.default.prototype,"step",2);l([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);l([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);l([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);l([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);l([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);l([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);l([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);l([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);l([o.Prop({default:5})],exports.default.prototype,"magnification",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);l([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);l([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);l([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);l([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);l([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);l([x.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);l([x.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=l([b.default({name:"Methods"})],exports.default);
1
+ "use strict";var B=Object.defineProperty,D=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&S(e,a,t[a]);if(I)for(var a of I(t))F.call(t,a)&&S(e,a,t[a]);return e},y=(e,t)=>D(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("vue"),b=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),x=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),f=require("zrender"),T=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},C=T(w);var Q=Object.defineProperty,W=Object.getOwnPropertyDescriptor,l=(e,t,a,s)=>{for(var i=s>1?void 0:s?W(t,a):t,r=e.length-1,u;r>=0;r--)(u=e[r])&&(i=(s?u(t,a,i):u(i))||i);return s&&i&&Q(t,a,i),i};exports.default=class extends C.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=[{key:"QRSd",name:"FQRS\u95F4\u671F",unit:"ms"},{key:"main_peak",name:"FQRS\u632F\u5E45",unit:"uV"}],this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.RR=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData={},this.difference={timeDifference:0,amplitudeDifference:""},this.isMeasureRule=!1,this.currentDisplayLeadInfo=null}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,r,u,d,h,m,p,A;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(r=this.P2)==null||r.removeAll(),(u=this.R1)==null||u.removeAll(),(d=this.RR)==null||d.removeAll(),(h=this.R2)==null||h.removeAll(),(m=this.T1)==null||m.removeAll(),(p=this.T2)==null||p.removeAll();try{(A=this.sceneIns)==null||A.dispose()}catch(L){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=f.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=f.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.currentDisplayLeadInfo=f.util.clone(this.DisplayLeadInfo),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i,r;this.enlargeAnalysisData=Object.assign({},y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QRSd:((r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat).qrsd,main_peak:"",QTc:""}))}measureRule(){this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyMeasureRule",{val:this.isMeasureRule,sens:this.currentSens,speed:this.currentSpeedValue})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var e,t;if(this.leadHeadConfig.isShowLeadCalibration!==!1){const s=this.containerWH.height/2,i=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((e=this.sceneIns)==null||e.remove(this.leadHeadIns)),this.leadHeadIns=new f.Polyline({cursor:"",shape:{points:[[0+0,0+s],[i+0,0+s],[i+0,-this.currentSens+s],[3*i+0,-this.currentSens+s],[3*i+0,0+s],[4*i+0,0+s]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(t=this.sceneIns)==null||t.add(this.leadHeadIns)}}createLeadName(){var t;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new f.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new f.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new f.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new f.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:r,startPos:u}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=u,this.waveFromLenPX=r.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new f.Polyline({cursor:"",name:`${i}`,shape:{points:r.map((d,h)=>[h*this.currentStep+this.drawWaveFromX,-d+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,r,u;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(r=this.waveFromIns)==null||r.attr({shape:{points:e.map((d,h)=>[h*this.currentStep+this.drawWaveFromX,-d+s])}}),(u=this.waveFromIns)==null||u.show()}getWaveFrom(e,t){var s;e=e!==void 0?e:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val;let a=[];return this.enlargeWaveMode===n.AnalysisMode.CompoundWave?a=(this.complexData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1):a=(this.normalData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1),{originData:a,beatData:a.map(i=>n.getActualY(this.sensitivity,i,this.currentSens)),startPos:this.currentDisplayLeadInfo.startPos}}drawMeasureLine(){var t,a,s,i,r,u,d,h;this.measureGroup?(this.measureGroup.removeAll(),(t=this.sceneIns)==null||t.remove(this.measureGroup)):this.measureGroup=new f.Group({name:"measureGroup"}),n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);const e={stroke:"#FF09FF",lineWidth:1.5};e.stroke="blue",this.R1=this.createMeasureLineGroup("Q",((((s=(a=this.currentLeadAnalyseValue)==null?void 0:a.KeyPosByBeat)==null?void 0:s.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R2=this.createMeasureLineGroup("S",((((r=(i=this.currentLeadAnalyseValue)==null?void 0:i.KeyPosByBeat)==null?void 0:r.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.RR=this.createMeasureLineGroup("R",((((d=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:d.Rpoint)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.RR),(h=this.sceneIns)==null||h.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new f.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new f.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new f.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new f.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((r,u)=>r.x-u.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"Q":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R":this.currentLeadAnalyseValue.KeyPosByBeat.Rpoint=e;break;case"S":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="Q")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="T2"){const{QT:r,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(r),this.enlargeAnalysisData.QTc=Math.round(u||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:r}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(r||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:r}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(r||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){const{qrs_morph_type:r,QA:u,QD:d,RA:h,RD:m,SD:p,RPD:A,SA:L,RPA:v,main_peak:g}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.main_peak=g!==void 0?n.toFixedFun(Math.abs(g)||0,2):"",this.enlargeAnalysisData.QRStype=r||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(d||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(h||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(m||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const P=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(P||0,2),this.enlargeAnalysisData.STstate=n.clacST(P||0,e.longdata)||"";const V=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}))||0;return}const t=()=>{var i,r;let s=Math.abs((((i=this.enlargeAnalysisData)==null?void 0:i.QRSAxis)||0)-(((r=this.enlargeAnalysisData)==null?void 0:r.TAxis)||0));s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart}))||0,t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}))||0,t();return}}calculatedValue(){var m,p,A,L;const e=(m=this.M1)==null?void 0:m.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),r=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=r;const u=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),d=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let h=[];if(this.leadNameActive.val===-1?h=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:h=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],d>0&&u>0&&d<=h.length-1&&u<=h.length-1){const g=(Math.abs(h[d][1]-h[u][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=g}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender()),this.$emit("notifyToggleGain",this.currentSens);return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender(),this.$emit("notifyToggleGain",this.currentSens))}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification,this.$emit("notifyToggleSpeeds",this.currentSpeedValue)};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var s,i,r,u,d,h,m,p;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((u=(r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat)==null?void 0:u.PAxis)||0,this.enlargeAnalysisData.TAxis=((h=(d=this.currentLeadAnalyseValue)==null?void 0:d.AnabyBeat)==null?void 0:h.TAxis)||0;const t=parseInt(`${1*1e3}`),a=((p=(m=this.currentLeadAnalyseValue)==null?void 0:m.KeyPosByBeat)==null?void 0:p.Rpoint)||0;this.currentDisplayLeadInfo={startPos:a-t<0?0:a-t,endPos:a+t},this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};l([o.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);l([o.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);l([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);l([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);l([o.Prop({default:()=>""})],exports.default.prototype,"className",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);l([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);l([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);l([o.Prop({default:1})],exports.default.prototype,"sens",2);l([o.Prop({default:1})],exports.default.prototype,"step",2);l([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);l([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);l([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);l([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);l([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);l([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);l([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);l([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);l([o.Prop({default:5})],exports.default.prototype,"magnification",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);l([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);l([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);l([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);l([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);l([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);l([x.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);l([x.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=l([b.default({name:"Methods"})],exports.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.1.20-0",
3
+ "version": "1.1.22-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "description": "",
21
21
  "typings": "dist/lib/index.d.ts",
22
22
  "dependencies": {
23
- "@costy-plus/utils": "0.0.16-0",
23
+ "@costy-plus/utils": "workspace:*",
24
24
  "element-ui": "~2.15.11",
25
25
  "vuescroll": "4.17.5",
26
26
  "zrender": "^5.5.0"