@witlink/usercenter 1.2.45 → 1.2.46

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.
@@ -8,6 +8,7 @@ import { useI18n } from "vue-i18n";
8
8
  import { defineStore, createPinia } from "pinia";
9
9
  import Axios from "axios";
10
10
  import { notification, message, Modal } from "ant-design-vue";
11
+ import { getUserInfo as getUserInfo$1, hasPermission } from "@witlink/components/utils";
11
12
  import en_US from "ant-design-vue/es/locale/en_US";
12
13
  import zh_CN from "ant-design-vue/es/locale/zh_CN";
13
14
  import fr_FR from "ant-design-vue/es/locale/fr_FR";
@@ -352,64 +353,6 @@ const useUserStore = defineStore({
352
353
  }
353
354
  }
354
355
  });
355
- const U$1 = "", m = "userInfo", g = "menuInfo";
356
- function E$1(t) {
357
- const e = new URL(t);
358
- return e.hash && e.hash.startsWith("#/") ? `/${e.hash.substring(2).split("?")[0]}`.replace(/\/+/g, "/") : e.pathname;
359
- }
360
- function I(t, e = {}) {
361
- const o = Array.isArray(t) ? t : [t];
362
- for (const n of o) {
363
- if (n.path && n.name !== void 0) {
364
- const s2 = n.path.startsWith("/") ? n.path : `/${n.path}`;
365
- e[s2] = n.name.toString();
366
- }
367
- n.children && n.children.length > 0 && I(n.children, e);
368
- }
369
- return e;
370
- }
371
- function r$1(t) {
372
- return U$1 + t;
373
- }
374
- function S(t) {
375
- const e = localStorage.getItem(r$1(m));
376
- if (t) {
377
- if (typeof t == "string")
378
- return (e ? JSON.parse(e) : {})[t] || null;
379
- if (Array.isArray(t)) {
380
- const o = e ? JSON.parse(e) : {}, n = {};
381
- return t.forEach((s2) => {
382
- n[s2] = o[s2] || null;
383
- }), n;
384
- }
385
- }
386
- return e ? JSON.parse(e) : null;
387
- }
388
- function O() {
389
- const t = localStorage.getItem(r$1(g));
390
- return t ? JSON.parse(t) : null;
391
- }
392
- const u = {}, c = {};
393
- function N$1() {
394
- if (Object.keys(u).length === 0) {
395
- const t = O() || [];
396
- I(t, u);
397
- }
398
- return u;
399
- }
400
- function d() {
401
- return Object.keys(c).length === 0 && ((S() || {}).role.permissions || []).forEach((o) => {
402
- var n;
403
- if (o.actionEntitySet != null && ((n = o.actionEntitySet) == null ? void 0 : n.length) > 0) {
404
- const s2 = o.actionEntitySet.map((a) => a.action);
405
- c[o.permissionId] = s2;
406
- }
407
- }), c;
408
- }
409
- function _(t) {
410
- const e = d(), o = E$1(window.location.href), s2 = N$1()[o] || "";
411
- return (e[s2] || []).includes(t);
412
- }
413
356
  createPinia();
414
357
  function changeTheme$1(options) {
415
358
  document.documentElement.style.setProperty(
@@ -1346,7 +1289,7 @@ function useInitUserinfo() {
1346
1289
  var _a;
1347
1290
  const userStore = useUserStore();
1348
1291
  if (((_a = userStore.roles) == null ? void 0 : _a.length) === 0) {
1349
- const userInfo = S();
1292
+ const userInfo = getUserInfo$1();
1350
1293
  if (userInfo) {
1351
1294
  userStore.setUserInfo(userInfo);
1352
1295
  } else {
@@ -1705,8 +1648,8 @@ const index_vue_vue_type_style_index_0_scoped_04710d5f_lang = "";
1705
1648
  const index$8 = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-04710d5f"], ["__file", "D:/inhe-code/1.0.6-js/1.0.6_refactor/witlink-platform-usercenter-web/witlink-usercenter/src/views/sys/functions/index.vue"]]);
1706
1649
  function usePermissionId() {
1707
1650
  const hasPermissionId = (id) => {
1708
- const hasPermission = _(id);
1709
- return hasPermission;
1651
+ const hasPermission$1 = hasPermission(id);
1652
+ return hasPermission$1;
1710
1653
  };
1711
1654
  return { hasPermissionId };
1712
1655
  }
@@ -5406,22 +5349,22 @@ function toArray(msg, enc) {
5406
5349
  if (!enc) {
5407
5350
  var p = 0;
5408
5351
  for (var i = 0; i < msg.length; i++) {
5409
- var c2 = msg.charCodeAt(i);
5410
- if (c2 < 128) {
5411
- res[p++] = c2;
5412
- } else if (c2 < 2048) {
5413
- res[p++] = c2 >> 6 | 192;
5414
- res[p++] = c2 & 63 | 128;
5352
+ var c = msg.charCodeAt(i);
5353
+ if (c < 128) {
5354
+ res[p++] = c;
5355
+ } else if (c < 2048) {
5356
+ res[p++] = c >> 6 | 192;
5357
+ res[p++] = c & 63 | 128;
5415
5358
  } else if (isSurrogatePair(msg, i)) {
5416
- c2 = 65536 + ((c2 & 1023) << 10) + (msg.charCodeAt(++i) & 1023);
5417
- res[p++] = c2 >> 18 | 240;
5418
- res[p++] = c2 >> 12 & 63 | 128;
5419
- res[p++] = c2 >> 6 & 63 | 128;
5420
- res[p++] = c2 & 63 | 128;
5359
+ c = 65536 + ((c & 1023) << 10) + (msg.charCodeAt(++i) & 1023);
5360
+ res[p++] = c >> 18 | 240;
5361
+ res[p++] = c >> 12 & 63 | 128;
5362
+ res[p++] = c >> 6 & 63 | 128;
5363
+ res[p++] = c & 63 | 128;
5421
5364
  } else {
5422
- res[p++] = c2 >> 12 | 224;
5423
- res[p++] = c2 >> 6 & 63 | 128;
5424
- res[p++] = c2 & 63 | 128;
5365
+ res[p++] = c >> 12 | 224;
5366
+ res[p++] = c >> 6 & 63 | 128;
5367
+ res[p++] = c & 63 | 128;
5425
5368
  }
5426
5369
  }
5427
5370
  } else if (enc === "hex") {
@@ -5505,17 +5448,17 @@ utils$9.join32 = join32;
5505
5448
  function split32(msg, endian) {
5506
5449
  var res = new Array(msg.length * 4);
5507
5450
  for (var i = 0, k2 = 0; i < msg.length; i++, k2 += 4) {
5508
- var m2 = msg[i];
5451
+ var m = msg[i];
5509
5452
  if (endian === "big") {
5510
- res[k2] = m2 >>> 24;
5511
- res[k2 + 1] = m2 >>> 16 & 255;
5512
- res[k2 + 2] = m2 >>> 8 & 255;
5513
- res[k2 + 3] = m2 & 255;
5453
+ res[k2] = m >>> 24;
5454
+ res[k2 + 1] = m >>> 16 & 255;
5455
+ res[k2 + 2] = m >>> 8 & 255;
5456
+ res[k2 + 3] = m & 255;
5514
5457
  } else {
5515
- res[k2 + 3] = m2 >>> 24;
5516
- res[k2 + 2] = m2 >>> 16 & 255;
5517
- res[k2 + 1] = m2 >>> 8 & 255;
5518
- res[k2] = m2 & 255;
5458
+ res[k2 + 3] = m >>> 24;
5459
+ res[k2 + 2] = m >>> 16 & 255;
5460
+ res[k2 + 1] = m >>> 8 & 255;
5461
+ res[k2] = m & 255;
5519
5462
  }
5520
5463
  }
5521
5464
  return res;
@@ -5533,16 +5476,16 @@ function sum32$3(a, b) {
5533
5476
  return a + b >>> 0;
5534
5477
  }
5535
5478
  utils$9.sum32 = sum32$3;
5536
- function sum32_3$1(a, b, c2) {
5537
- return a + b + c2 >>> 0;
5479
+ function sum32_3$1(a, b, c) {
5480
+ return a + b + c >>> 0;
5538
5481
  }
5539
5482
  utils$9.sum32_3 = sum32_3$1;
5540
- function sum32_4$2(a, b, c2, d2) {
5541
- return a + b + c2 + d2 >>> 0;
5483
+ function sum32_4$2(a, b, c, d) {
5484
+ return a + b + c + d >>> 0;
5542
5485
  }
5543
5486
  utils$9.sum32_4 = sum32_4$2;
5544
- function sum32_5$2(a, b, c2, d2, e) {
5545
- return a + b + c2 + d2 + e >>> 0;
5487
+ function sum32_5$2(a, b, c, d, e) {
5488
+ return a + b + c + d + e >>> 0;
5546
5489
  }
5547
5490
  utils$9.sum32_5 = sum32_5$2;
5548
5491
  function sum64$1(buf, pos, ah, al) {
@@ -5777,22 +5720,22 @@ SHA1.prototype._update = function _update(msg, start) {
5777
5720
  W[i] = rotl32$1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
5778
5721
  var a = this.h[0];
5779
5722
  var b = this.h[1];
5780
- var c2 = this.h[2];
5781
- var d2 = this.h[3];
5723
+ var c = this.h[2];
5724
+ var d = this.h[3];
5782
5725
  var e = this.h[4];
5783
5726
  for (i = 0; i < W.length; i++) {
5784
5727
  var s2 = ~~(i / 20);
5785
- var t = sum32_5$1(rotl32$1(a, 5), ft_1(s2, b, c2, d2), e, W[i], sha1_K[s2]);
5786
- e = d2;
5787
- d2 = c2;
5788
- c2 = rotl32$1(b, 30);
5728
+ var t = sum32_5$1(rotl32$1(a, 5), ft_1(s2, b, c, d), e, W[i], sha1_K[s2]);
5729
+ e = d;
5730
+ d = c;
5731
+ c = rotl32$1(b, 30);
5789
5732
  b = a;
5790
5733
  a = t;
5791
5734
  }
5792
5735
  this.h[0] = sum32$2(this.h[0], a);
5793
5736
  this.h[1] = sum32$2(this.h[1], b);
5794
- this.h[2] = sum32$2(this.h[2], c2);
5795
- this.h[3] = sum32$2(this.h[3], d2);
5737
+ this.h[2] = sum32$2(this.h[2], c);
5738
+ this.h[3] = sum32$2(this.h[3], d);
5796
5739
  this.h[4] = sum32$2(this.h[4], e);
5797
5740
  };
5798
5741
  SHA1.prototype._digest = function digest2(enc) {
@@ -5912,32 +5855,32 @@ SHA256$1.prototype._update = function _update2(msg, start) {
5912
5855
  W[i] = sum32_4$1(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
5913
5856
  var a = this.h[0];
5914
5857
  var b = this.h[1];
5915
- var c2 = this.h[2];
5916
- var d2 = this.h[3];
5858
+ var c = this.h[2];
5859
+ var d = this.h[3];
5917
5860
  var e = this.h[4];
5918
5861
  var f2 = this.h[5];
5919
- var g2 = this.h[6];
5862
+ var g = this.h[6];
5920
5863
  var h2 = this.h[7];
5921
5864
  assert$2(this.k.length === W.length);
5922
5865
  for (i = 0; i < W.length; i++) {
5923
- var T1 = sum32_5(h2, s1_256(e), ch32(e, f2, g2), this.k[i], W[i]);
5924
- var T2 = sum32$1(s0_256(a), maj32(a, b, c2));
5925
- h2 = g2;
5926
- g2 = f2;
5866
+ var T1 = sum32_5(h2, s1_256(e), ch32(e, f2, g), this.k[i], W[i]);
5867
+ var T2 = sum32$1(s0_256(a), maj32(a, b, c));
5868
+ h2 = g;
5869
+ g = f2;
5927
5870
  f2 = e;
5928
- e = sum32$1(d2, T1);
5929
- d2 = c2;
5930
- c2 = b;
5871
+ e = sum32$1(d, T1);
5872
+ d = c;
5873
+ c = b;
5931
5874
  b = a;
5932
5875
  a = sum32$1(T1, T2);
5933
5876
  }
5934
5877
  this.h[0] = sum32$1(this.h[0], a);
5935
5878
  this.h[1] = sum32$1(this.h[1], b);
5936
- this.h[2] = sum32$1(this.h[2], c2);
5937
- this.h[3] = sum32$1(this.h[3], d2);
5879
+ this.h[2] = sum32$1(this.h[2], c);
5880
+ this.h[3] = sum32$1(this.h[3], d);
5938
5881
  this.h[4] = sum32$1(this.h[4], e);
5939
5882
  this.h[5] = sum32$1(this.h[5], f2);
5940
- this.h[6] = sum32$1(this.h[6], g2);
5883
+ this.h[6] = sum32$1(this.h[6], g);
5941
5884
  this.h[7] = sum32$1(this.h[7], h2);
5942
5885
  };
5943
5886
  SHA256$1.prototype._digest = function digest3(enc) {
@@ -8626,16 +8569,16 @@ function T(t, e, i) {
8626
8569
  return s2;
8627
8570
  }
8628
8571
  function N(t) {
8629
- var e = new DataView(t), i = e.byteLength, s2, r2, o, h2, a, n, c2, l, f2, p;
8572
+ var e = new DataView(t), i = e.byteLength, s2, r2, o, h2, a, n, c, l, f2, p;
8630
8573
  if (e.getUint8(0) === 255 && e.getUint8(1) === 216)
8631
8574
  for (f2 = 2; f2 < i; ) {
8632
8575
  if (e.getUint8(f2) === 255 && e.getUint8(f2 + 1) === 225) {
8633
- c2 = f2;
8576
+ c = f2;
8634
8577
  break;
8635
8578
  }
8636
8579
  f2++;
8637
8580
  }
8638
- if (c2 && (r2 = c2 + 4, o = c2 + 10, T(e, r2, 4) === "Exif" && (n = e.getUint16(o), a = n === 18761, (a || n === 19789) && e.getUint16(o + 2, a) === 42 && (h2 = e.getUint32(o + 4, a), h2 >= 8 && (l = o + h2)))), l) {
8581
+ if (c && (r2 = c + 4, o = c + 10, T(e, r2, 4) === "Exif" && (n = e.getUint16(o), a = n === 18761, (a || n === 19789) && e.getUint16(o + 2, a) === 42 && (h2 = e.getUint32(o + 4, a), h2 >= 8 && (l = o + h2)))), l) {
8639
8582
  for (i = e.getUint16(l, a), p = 0; p < i; p++)
8640
8583
  if (f2 = l + p * 12 + 2, e.getUint16(f2, a) === 274) {
8641
8584
  f2 += 8, s2 = e.getUint16(f2, a);
@@ -8980,9 +8923,9 @@ const $ = (t, e) => {
8980
8923
  Math.pow(i.x - r2.x, 2) + Math.pow(i.y - r2.y, 2)
8981
8924
  ), a = Math.sqrt(
8982
8925
  Math.pow(s2.x - o.x, 2) + Math.pow(s2.y - o.y, 2)
8983
- ), n = a - h2, c2 = 1;
8984
- c2 = c2 / this.trueWidth > c2 / this.trueHeight ? c2 / this.trueHeight : c2 / this.trueWidth, c2 = c2 > 0.1 ? 0.1 : c2;
8985
- var l = c2 * n;
8926
+ ), n = a - h2, c = 1;
8927
+ c = c / this.trueWidth > c / this.trueHeight ? c / this.trueHeight : c / this.trueWidth, c = c > 0.1 ? 0.1 : c;
8928
+ var l = c * n;
8986
8929
  if (!this.touchNow) {
8987
8930
  if (this.touchNow = true, n > 0 ? e += Math.abs(l) : n < 0 && e > Math.abs(l) && (e -= Math.abs(l)), this.touches = t.touches, setTimeout(() => {
8988
8931
  this.touchNow = false;
@@ -9000,19 +8943,19 @@ const $ = (t, e) => {
9000
8943
  let e = "clientX" in t ? t.clientX : t.touches[0].clientX, i = "clientY" in t ? t.clientY : t.touches[0].clientY, s2, r2;
9001
8944
  s2 = e - this.moveX, r2 = i - this.moveY, this.$nextTick(() => {
9002
8945
  if (this.centerBox) {
9003
- let o = this.getImgAxis(s2, r2, this.scale), h2 = this.getCropAxis(), a = this.trueHeight * this.scale, n = this.trueWidth * this.scale, c2, l, f2, p;
8946
+ let o = this.getImgAxis(s2, r2, this.scale), h2 = this.getCropAxis(), a = this.trueHeight * this.scale, n = this.trueWidth * this.scale, c, l, f2, p;
9004
8947
  switch (this.rotate) {
9005
8948
  case 1:
9006
8949
  case -1:
9007
8950
  case 3:
9008
8951
  case -3:
9009
- c2 = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2 + (a - n) / 2, l = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2 + (n - a) / 2, f2 = c2 - a + this.cropW, p = l - n + this.cropH;
8952
+ c = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2 + (a - n) / 2, l = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2 + (n - a) / 2, f2 = c - a + this.cropW, p = l - n + this.cropH;
9010
8953
  break;
9011
8954
  default:
9012
- c2 = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2, l = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2, f2 = c2 - n + this.cropW, p = l - a + this.cropH;
8955
+ c = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2, l = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2, f2 = c - n + this.cropW, p = l - a + this.cropH;
9013
8956
  break;
9014
8957
  }
9015
- o.x1 >= h2.x1 && (s2 = c2), o.y1 >= h2.y1 && (r2 = l), o.x2 <= h2.x2 && (s2 = f2), o.y2 <= h2.y2 && (r2 = p);
8958
+ o.x1 >= h2.x1 && (s2 = c), o.y1 >= h2.y1 && (r2 = l), o.x2 <= h2.x2 && (s2 = f2), o.y2 <= h2.y2 && (r2 = p);
9016
8959
  }
9017
8960
  this.x = s2, this.y = r2, this.$emit("img-moving", {
9018
8961
  moving: true,
@@ -9080,13 +9023,13 @@ const $ = (t, e) => {
9080
9023
  var e = "clientX" in t ? t.clientX : t.touches ? t.touches[0].clientX : 0, i = "clientY" in t ? t.clientY : t.touches ? t.touches[0].clientY : 0;
9081
9024
  let s2 = this.w, r2 = this.h, o = 0, h2 = 0;
9082
9025
  if (this.centerBox) {
9083
- let c2 = this.getImgAxis(), l = c2.x2, f2 = c2.y2;
9084
- o = c2.x1 > 0 ? c2.x1 : 0, h2 = c2.y1 > 0 ? c2.y1 : 0, s2 > l && (s2 = l), r2 > f2 && (r2 = f2);
9026
+ let c = this.getImgAxis(), l = c.x2, f2 = c.y2;
9027
+ o = c.x1 > 0 ? c.x1 : 0, h2 = c.y1 > 0 ? c.y1 : 0, s2 > l && (s2 = l), r2 > f2 && (r2 = f2);
9085
9028
  }
9086
9029
  const [a, n] = this.checkCropLimitSize();
9087
9030
  this.$nextTick(() => {
9088
- var c2 = e - this.cropX, l = i - this.cropY;
9089
- if (this.canChangeX && (this.changeCropTypeX === 1 ? this.cropOldW - c2 < a ? (this.cropW = a, this.cropOffsertX = this.cropOldW + this.cropChangeX - o - a) : this.cropOldW - c2 > 0 ? (this.cropW = s2 - this.cropChangeX - c2 <= s2 - o ? this.cropOldW - c2 : this.cropOldW + this.cropChangeX - o, this.cropOffsertX = s2 - this.cropChangeX - c2 <= s2 - o ? this.cropChangeX + c2 : o) : (this.cropW = Math.abs(c2) + this.cropChangeX <= s2 ? Math.abs(c2) - this.cropOldW : s2 - this.cropOldW - this.cropChangeX, this.cropOffsertX = this.cropChangeX + this.cropOldW) : this.changeCropTypeX === 2 && (this.cropOldW + c2 < a ? this.cropW = a : this.cropOldW + c2 > 0 ? (this.cropW = this.cropOldW + c2 + this.cropOffsertX <= s2 ? this.cropOldW + c2 : s2 - this.cropOffsertX, this.cropOffsertX = this.cropChangeX) : (this.cropW = s2 - this.cropChangeX + Math.abs(c2 + this.cropOldW) <= s2 - o ? Math.abs(c2 + this.cropOldW) : this.cropChangeX - o, this.cropOffsertX = s2 - this.cropChangeX + Math.abs(c2 + this.cropOldW) <= s2 - o ? this.cropChangeX - Math.abs(c2 + this.cropOldW) : o))), this.canChangeY && (this.changeCropTypeY === 1 ? this.cropOldH - l < n ? (this.cropH = n, this.cropOffsertY = this.cropOldH + this.cropChangeY - h2 - n) : this.cropOldH - l > 0 ? (this.cropH = r2 - this.cropChangeY - l <= r2 - h2 ? this.cropOldH - l : this.cropOldH + this.cropChangeY - h2, this.cropOffsertY = r2 - this.cropChangeY - l <= r2 - h2 ? this.cropChangeY + l : h2) : (this.cropH = Math.abs(l) + this.cropChangeY <= r2 ? Math.abs(l) - this.cropOldH : r2 - this.cropOldH - this.cropChangeY, this.cropOffsertY = this.cropChangeY + this.cropOldH) : this.changeCropTypeY === 2 && (this.cropOldH + l < n ? this.cropH = n : this.cropOldH + l > 0 ? (this.cropH = this.cropOldH + l + this.cropOffsertY <= r2 ? this.cropOldH + l : r2 - this.cropOffsertY, this.cropOffsertY = this.cropChangeY) : (this.cropH = r2 - this.cropChangeY + Math.abs(l + this.cropOldH) <= r2 - h2 ? Math.abs(l + this.cropOldH) : this.cropChangeY - h2, this.cropOffsertY = r2 - this.cropChangeY + Math.abs(l + this.cropOldH) <= r2 - h2 ? this.cropChangeY - Math.abs(l + this.cropOldH) : h2))), this.canChangeX && this.fixed) {
9031
+ var c = e - this.cropX, l = i - this.cropY;
9032
+ if (this.canChangeX && (this.changeCropTypeX === 1 ? this.cropOldW - c < a ? (this.cropW = a, this.cropOffsertX = this.cropOldW + this.cropChangeX - o - a) : this.cropOldW - c > 0 ? (this.cropW = s2 - this.cropChangeX - c <= s2 - o ? this.cropOldW - c : this.cropOldW + this.cropChangeX - o, this.cropOffsertX = s2 - this.cropChangeX - c <= s2 - o ? this.cropChangeX + c : o) : (this.cropW = Math.abs(c) + this.cropChangeX <= s2 ? Math.abs(c) - this.cropOldW : s2 - this.cropOldW - this.cropChangeX, this.cropOffsertX = this.cropChangeX + this.cropOldW) : this.changeCropTypeX === 2 && (this.cropOldW + c < a ? this.cropW = a : this.cropOldW + c > 0 ? (this.cropW = this.cropOldW + c + this.cropOffsertX <= s2 ? this.cropOldW + c : s2 - this.cropOffsertX, this.cropOffsertX = this.cropChangeX) : (this.cropW = s2 - this.cropChangeX + Math.abs(c + this.cropOldW) <= s2 - o ? Math.abs(c + this.cropOldW) : this.cropChangeX - o, this.cropOffsertX = s2 - this.cropChangeX + Math.abs(c + this.cropOldW) <= s2 - o ? this.cropChangeX - Math.abs(c + this.cropOldW) : o))), this.canChangeY && (this.changeCropTypeY === 1 ? this.cropOldH - l < n ? (this.cropH = n, this.cropOffsertY = this.cropOldH + this.cropChangeY - h2 - n) : this.cropOldH - l > 0 ? (this.cropH = r2 - this.cropChangeY - l <= r2 - h2 ? this.cropOldH - l : this.cropOldH + this.cropChangeY - h2, this.cropOffsertY = r2 - this.cropChangeY - l <= r2 - h2 ? this.cropChangeY + l : h2) : (this.cropH = Math.abs(l) + this.cropChangeY <= r2 ? Math.abs(l) - this.cropOldH : r2 - this.cropOldH - this.cropChangeY, this.cropOffsertY = this.cropChangeY + this.cropOldH) : this.changeCropTypeY === 2 && (this.cropOldH + l < n ? this.cropH = n : this.cropOldH + l > 0 ? (this.cropH = this.cropOldH + l + this.cropOffsertY <= r2 ? this.cropOldH + l : r2 - this.cropOffsertY, this.cropOffsertY = this.cropChangeY) : (this.cropH = r2 - this.cropChangeY + Math.abs(l + this.cropOldH) <= r2 - h2 ? Math.abs(l + this.cropOldH) : this.cropChangeY - h2, this.cropOffsertY = r2 - this.cropChangeY + Math.abs(l + this.cropOldH) <= r2 - h2 ? this.cropChangeY - Math.abs(l + this.cropOldH) : h2))), this.canChangeX && this.fixed) {
9090
9033
  var f2 = this.cropW / this.fixedNumber[0] * this.fixedNumber[1];
9091
9034
  f2 < n ? (this.cropH = n, this.cropW = this.fixedNumber[0] * n / this.fixedNumber[1], this.changeCropTypeX === 1 && (this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW))) : f2 + this.cropOffsertY > r2 ? (this.cropH = r2 - this.cropOffsertY, this.cropW = this.cropH / this.fixedNumber[1] * this.fixedNumber[0], this.changeCropTypeX === 1 && (this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW))) : this.cropH = f2;
9092
9035
  }
@@ -9201,87 +9144,87 @@ const $ = (t, e) => {
9201
9144
  if (this.cropW !== 0) {
9202
9145
  let p = 1;
9203
9146
  this.high & !this.full && (p = window.devicePixelRatio), this.enlarge !== 1 & !this.full && (p = Math.abs(Number(this.enlarge)));
9204
- let d2 = this.cropW * p, C = this.cropH * p, u2 = o * this.scale * p, g2 = h2 * this.scale * p, m2 = (this.x - a + this.trueWidth * (1 - this.scale) / 2) * p, v = (this.y - n + this.trueHeight * (1 - this.scale) / 2) * p;
9205
- switch (f2(d2, C), i.save(), r2) {
9147
+ let d = this.cropW * p, C = this.cropH * p, u = o * this.scale * p, g = h2 * this.scale * p, m = (this.x - a + this.trueWidth * (1 - this.scale) / 2) * p, v = (this.y - n + this.trueHeight * (1 - this.scale) / 2) * p;
9148
+ switch (f2(d, C), i.save(), r2) {
9206
9149
  case 0:
9207
- this.full ? (f2(d2 / this.scale, C / this.scale), i.drawImage(
9150
+ this.full ? (f2(d / this.scale, C / this.scale), i.drawImage(
9208
9151
  s2,
9209
- m2 / this.scale,
9152
+ m / this.scale,
9210
9153
  v / this.scale,
9211
- u2 / this.scale,
9212
- g2 / this.scale
9213
- )) : i.drawImage(s2, m2, v, u2, g2);
9154
+ u / this.scale,
9155
+ g / this.scale
9156
+ )) : i.drawImage(s2, m, v, u, g);
9214
9157
  break;
9215
9158
  case 1:
9216
9159
  case -3:
9217
- this.full ? (f2(d2 / this.scale, C / this.scale), m2 = m2 / this.scale + (u2 / this.scale - g2 / this.scale) / 2, v = v / this.scale + (g2 / this.scale - u2 / this.scale) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(
9160
+ this.full ? (f2(d / this.scale, C / this.scale), m = m / this.scale + (u / this.scale - g / this.scale) / 2, v = v / this.scale + (g / this.scale - u / this.scale) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(
9218
9161
  s2,
9219
9162
  v,
9220
- -m2 - g2 / this.scale,
9221
- u2 / this.scale,
9222
- g2 / this.scale
9223
- )) : (m2 = m2 + (u2 - g2) / 2, v = v + (g2 - u2) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, v, -m2 - g2, u2, g2));
9163
+ -m - g / this.scale,
9164
+ u / this.scale,
9165
+ g / this.scale
9166
+ )) : (m = m + (u - g) / 2, v = v + (g - u) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, v, -m - g, u, g));
9224
9167
  break;
9225
9168
  case 2:
9226
9169
  case -2:
9227
- this.full ? (f2(d2 / this.scale, C / this.scale), i.rotate(r2 * 90 * Math.PI / 180), m2 = m2 / this.scale, v = v / this.scale, i.drawImage(
9170
+ this.full ? (f2(d / this.scale, C / this.scale), i.rotate(r2 * 90 * Math.PI / 180), m = m / this.scale, v = v / this.scale, i.drawImage(
9228
9171
  s2,
9229
- -m2 - u2 / this.scale,
9230
- -v - g2 / this.scale,
9231
- u2 / this.scale,
9232
- g2 / this.scale
9233
- )) : (i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -m2 - u2, -v - g2, u2, g2));
9172
+ -m - u / this.scale,
9173
+ -v - g / this.scale,
9174
+ u / this.scale,
9175
+ g / this.scale
9176
+ )) : (i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -m - u, -v - g, u, g));
9234
9177
  break;
9235
9178
  case 3:
9236
9179
  case -1:
9237
- this.full ? (f2(d2 / this.scale, C / this.scale), m2 = m2 / this.scale + (u2 / this.scale - g2 / this.scale) / 2, v = v / this.scale + (g2 / this.scale - u2 / this.scale) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(
9180
+ this.full ? (f2(d / this.scale, C / this.scale), m = m / this.scale + (u / this.scale - g / this.scale) / 2, v = v / this.scale + (g / this.scale - u / this.scale) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(
9238
9181
  s2,
9239
- -v - u2 / this.scale,
9240
- m2,
9241
- u2 / this.scale,
9242
- g2 / this.scale
9243
- )) : (m2 = m2 + (u2 - g2) / 2, v = v + (g2 - u2) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -v - u2, m2, u2, g2));
9182
+ -v - u / this.scale,
9183
+ m,
9184
+ u / this.scale,
9185
+ g / this.scale
9186
+ )) : (m = m + (u - g) / 2, v = v + (g - u) / 2, i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -v - u, m, u, g));
9244
9187
  break;
9245
9188
  default:
9246
- this.full ? (f2(d2 / this.scale, C / this.scale), i.drawImage(
9189
+ this.full ? (f2(d / this.scale, C / this.scale), i.drawImage(
9247
9190
  s2,
9248
- m2 / this.scale,
9191
+ m / this.scale,
9249
9192
  v / this.scale,
9250
- u2 / this.scale,
9251
- g2 / this.scale
9252
- )) : i.drawImage(s2, m2, v, u2, g2);
9193
+ u / this.scale,
9194
+ g / this.scale
9195
+ )) : i.drawImage(s2, m, v, u, g);
9253
9196
  }
9254
9197
  i.restore();
9255
9198
  } else {
9256
- let p = o * this.scale, d2 = h2 * this.scale;
9199
+ let p = o * this.scale, d = h2 * this.scale;
9257
9200
  switch (i.save(), r2) {
9258
9201
  case 0:
9259
- f2(p, d2), i.drawImage(s2, 0, 0, p, d2);
9202
+ f2(p, d), i.drawImage(s2, 0, 0, p, d);
9260
9203
  break;
9261
9204
  case 1:
9262
9205
  case -3:
9263
- f2(d2, p), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, 0, -d2, p, d2);
9206
+ f2(d, p), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, 0, -d, p, d);
9264
9207
  break;
9265
9208
  case 2:
9266
9209
  case -2:
9267
- f2(p, d2), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -p, -d2, p, d2);
9210
+ f2(p, d), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -p, -d, p, d);
9268
9211
  break;
9269
9212
  case 3:
9270
9213
  case -1:
9271
- f2(d2, p), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -p, 0, p, d2);
9214
+ f2(d, p), i.rotate(r2 * 90 * Math.PI / 180), i.drawImage(s2, -p, 0, p, d);
9272
9215
  break;
9273
9216
  default:
9274
- f2(p, d2), i.drawImage(s2, 0, 0, p, d2);
9217
+ f2(p, d), i.drawImage(s2, 0, 0, p, d);
9275
9218
  }
9276
9219
  i.restore();
9277
9220
  }
9278
9221
  t(e);
9279
9222
  };
9280
- var c2 = this.img.substr(0, 4);
9281
- c2 !== "data" && (s2.crossOrigin = "Anonymous"), s2.src = this.imgs;
9223
+ var c = this.img.substr(0, 4);
9224
+ c !== "data" && (s2.crossOrigin = "Anonymous"), s2.src = this.imgs;
9282
9225
  const l = this.fillColor;
9283
- function f2(p, d2) {
9284
- e.width = Math.round(p), e.height = Math.round(d2), l && (i.fillStyle = l, i.fillRect(0, 0, e.width, e.height));
9226
+ function f2(p, d) {
9227
+ e.width = Math.round(p), e.height = Math.round(d), l && (i.fillStyle = l, i.fillRect(0, 0, e.width, e.height));
9285
9228
  }
9286
9229
  },
9287
9230
  getCropData(t) {
@@ -9415,8 +9358,8 @@ const $ = (t, e) => {
9415
9358
  if (o >= this.cropW && h2 >= this.cropH)
9416
9359
  this.scale = i;
9417
9360
  else {
9418
- const a = this.cropW / s2, n = this.cropH / r2, c2 = this.cropH <= r2 * a ? a : n;
9419
- this.scale = c2, o = s2 * c2, h2 = r2 * c2;
9361
+ const a = this.cropW / s2, n = this.cropH / r2, c = this.cropH <= r2 * a ? a : n;
9362
+ this.scale = c, o = s2 * c, h2 = r2 * c;
9420
9363
  }
9421
9364
  this.imgIsQqualCrop || (t.x1 >= e.x1 && (this.isRotateRightOrLeft ? this.x = e.x1 - (s2 - o) / 2 - (o - h2) / 2 : this.x = e.x1 - (s2 - o) / 2), t.x2 <= e.x2 && (this.isRotateRightOrLeft ? this.x = e.x1 - (s2 - o) / 2 - (o - h2) / 2 - h2 + this.cropW : this.x = e.x2 - (s2 - o) / 2 - o), t.y1 >= e.y1 && (this.isRotateRightOrLeft ? this.y = e.y1 - (r2 - h2) / 2 - (h2 - o) / 2 : this.y = e.y1 - (r2 - h2) / 2), t.y2 <= e.y2 && (this.isRotateRightOrLeft ? this.y = e.y2 - (r2 - h2) / 2 - (h2 - o) / 2 - o : this.y = e.y2 - (r2 - h2) / 2 - h2)), (o < this.cropW || h2 < this.cropH) && (this.imgIsQqualCrop = true);
9422
9365
  }