@feedmepos/mf-payment 1.9.2-dev → 1.9.3-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-Cj53GO_N.js → Actions.vue_vue_type_script_setup_true_lang-C9cv5yKo.js} +1 -1
  2. package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-wKI4THJI.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-NKO6-sgg.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-F4XF1EBH.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-uhnNKle-.js} +2 -2
  4. package/dist/{Chargeback-Q9TwfBua.js → Chargeback-C5c2ggX9.js} +5 -5
  5. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BoA7oU4w.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DbDKfWJX.js} +1 -1
  6. package/dist/ExternalTerminal-Cd_azqjT.js +502 -0
  7. package/dist/{OnboardForm-BqR1LMiZ.js → OnboardForm-COJfmIJt.js} +6 -6
  8. package/dist/{OnboardForm-JO-C9g8W.js → OnboardForm-CVuu8ixt.js} +6 -6
  9. package/dist/{OnboardSubmission-CHT-P-Ic.js → OnboardSubmission-CuH1DxWt.js} +3 -3
  10. package/dist/{OnboardSubmission-CN5Tj-jX.js → OnboardSubmission-Tl3HQgov.js} +6 -6
  11. package/dist/{PayoutAccount-BWLfwV2s.js → PayoutAccount-CmHNLOdq.js} +5 -5
  12. package/dist/{PayoutAccount-DAhF8-VH.js → PayoutAccount-PXQSHup9.js} +7 -7
  13. package/dist/{PayoutAccountSetting-C0UFWM2S.js → PayoutAccountSetting-cV5Ts_Qq.js} +6 -6
  14. package/dist/{Restaurant-DVMOyNO2.js → Restaurant-LzRSv42P.js} +4 -4
  15. package/dist/{RestaurantSetting-BmUp1cQC.js → RestaurantSetting-CsnW19gh.js} +3 -3
  16. package/dist/{Settlement-C1PNJ1An.js → Settlement-BycHPszE.js} +3 -3
  17. package/dist/{Settlement-D6aPHxlg.js → Settlement-eq9msmbN.js} +4 -4
  18. package/dist/{SettlementTransactions-9T0Bf8En.js → SettlementTransactions-BiDjpqc3.js} +5 -5
  19. package/dist/{SettlementTransactions-DFxZEQ60.js → SettlementTransactions-Ccm_gaYg.js} +5 -5
  20. package/dist/{Status.vue_vue_type_script_setup_true_lang-BFY-fAA2.js → Status.vue_vue_type_script_setup_true_lang-DuVSuCqQ.js} +1 -1
  21. package/dist/{Terminal-C2DGfldl.js → Terminal-ZRi75g3B.js} +386 -387
  22. package/dist/{TerminalSetting-BJNeeFK7.js → TerminalSetting-CpIOhxYF.js} +5 -5
  23. package/dist/{Transaction-DwgWU5Ad.js → Transaction-ClDKUNW6.js} +10 -10
  24. package/dist/{Transaction-CeBgamlO.js → Transaction-Dfty1Pkq.js} +11 -11
  25. package/dist/{TransactionOld-CqyshxAx.js → TransactionOld-CkoAQGox.js} +7 -7
  26. package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-m6NY2_t1.js → TransactionStatus.vue_vue_type_script_setup_true_lang-BU1aDd8a.js} +1 -1
  27. package/dist/api/external-terminal/index.d.ts +13 -0
  28. package/dist/{app-BNOT8745.js → app-BO87oXyA.js} +279 -270
  29. package/dist/app.js +1 -1
  30. package/dist/{assets-DEgje5FK.js → assets-CEy6OF2t.js} +1 -1
  31. package/dist/{grafana-RTLPQTk6.js → grafana-BL6EdH24.js} +1 -1
  32. package/dist/{index-C1Xfilha.js → index--870P92-.js} +2 -2
  33. package/dist/{index-BgHlIItQ.js → index-By1YYoRG.js} +1 -1
  34. package/dist/{index-DE270fHE.js → index-CAd13T_z.js} +1 -1
  35. package/dist/{index-C1quqYTh.js → index-CGfEnp2P.js} +1 -1
  36. package/dist/{index-BisMRIXk.js → index-CXpoEy-p.js} +1 -1
  37. package/dist/{index-CXRxF0Ou.js → index-DEPKBu9W.js} +1 -1
  38. package/dist/{index-BC32-A2y.js → index-NcS-Zyhu.js} +1 -1
  39. package/dist/{index-DbzekTz-.js → index-nn5zFo8I.js} +1 -1
  40. package/dist/{index-Bq9WMucY.js → index-zzOpgyK_.js} +3080 -3021
  41. package/dist/{index.vue_vue_type_script_setup_true_lang-4Dnkhy4y.js → index.vue_vue_type_script_setup_true_lang-DZQR-ukK.js} +1 -1
  42. package/dist/{onboard-submission-CsuFLqQF.js → onboard-submission-29LM4jfB.js} +1 -1
  43. package/dist/package.json +3 -3
  44. package/dist/{payout-account-C1mPet3p.js → payout-account-HS9MHh85.js} +3 -3
  45. package/dist/stores/payoutAccount.d.ts +20 -20
  46. package/dist/style.css +1 -1
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/views/admin/external-terminal/ExternalTerminal.vue.d.ts +2 -0
  49. package/dist/views/admin/external-terminal/ExternalTerminalDialog.vue.d.ts +65 -0
  50. package/dist/views/admin/external-terminal/ExternalTerminalPairDialog.vue.d.ts +67 -0
  51. package/dist/views/admin/external-terminal/cell/Actions.vue.d.ts +14 -0
  52. package/dist/views/admin/external-terminal/cell/ID.vue.d.ts +7 -0
  53. package/dist/views/admin/external-terminal/pair/BRITerminal.vue.d.ts +76 -0
  54. package/dist/views/admin/external-terminal/pair/BeamTerminal.vue.d.ts +76 -0
  55. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +20 -20
  56. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +42 -42
  57. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +42 -42
  58. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +20 -20
  59. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +20 -20
  60. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +42 -42
  61. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
  62. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  63. package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
  64. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
  65. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  66. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  67. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
  68. package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +2 -2
  69. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +2 -2
  70. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  71. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -4
  72. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +2 -2
  73. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -4
  74. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
  75. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +2 -2
  76. package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +2 -2
  77. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +2 -2
  78. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +2 -2
  79. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +18 -20
  80. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +18 -20
  81. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +18 -20
  82. package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +18 -20
  83. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +18 -20
  84. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +18 -20
  85. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +18 -20
  86. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +18 -20
  87. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +18 -20
  88. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +18 -20
  89. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +18 -20
  90. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +18 -20
  91. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +18 -20
  92. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +18 -20
  93. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +18 -20
  94. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +18 -20
  95. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +18 -20
  96. package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +18 -20
  97. package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +18 -20
  98. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +18 -20
  99. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +18 -20
  100. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +18 -20
  101. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +40 -40
  102. package/package.json +2 -2
@@ -1,99 +1,100 @@
1
- import { defineComponent as L, h as E, ref as x, onMounted as pe, watchEffect as Ce, Fragment as ie, computed as D, openBlock as I, createElementBlock as X, createElementVNode as b, createTextVNode as te, toDisplayString as se, createVNode as _, resolveComponent as N, normalizeClass as ye, withCtx as Z, createBlock as U, createCommentVNode as $, unref as T, watch as re, isRef as we } from "vue";
2
- import { e as Ee } from "./index-Bq9WMucY.js";
3
- import { h as Re } from "./moment-h96o7c8I.js";
4
- import { u as Me } from "./index-DE270fHE.js";
5
- import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-4Dnkhy4y.js";
1
+ import { defineComponent as D, h as E, ref as x, onMounted as ge, watchEffect as pe, Fragment as ie, computed as O, openBlock as I, createElementBlock as X, createElementVNode as S, createTextVNode as te, toDisplayString as se, createVNode as N, resolveComponent as F, normalizeClass as Ce, withCtx as Z, createBlock as U, createCommentVNode as $, unref as T, watch as re, isRef as ye } from "vue";
2
+ import { e as we } from "./index-zzOpgyK_.js";
3
+ import { h as Ee } from "./moment-h96o7c8I.js";
4
+ import { u as Re } from "./index-CAd13T_z.js";
5
+ import { _ as Me } from "./index.vue_vue_type_script_setup_true_lang-DZQR-ukK.js";
6
6
  import { _ as Se } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
7
- import { useSnackbar as J, useDialogChild as Pe, useDialog as Ae } from "@feedmepos/ui-library";
8
- import { t as K } from "./index-C1quqYTh.js";
7
+ import { useSnackbar as J, useDialogChild as be, useDialog as Pe } from "@feedmepos/ui-library";
8
+ import { t as K } from "./index-CGfEnp2P.js";
9
9
  import { c as le } from "./clipboard-4jh1WteU.js";
10
- import { useCoreStore as ue } from "@feedmepos/mf-common";
11
- import { g as Te } from "./grafana-RTLPQTk6.js";
10
+ import { useCoreStore as Ae } from "@feedmepos/mf-common";
11
+ import { g as Te } from "./grafana-BL6EdH24.js";
12
12
  import { u as W } from "./error-K1CakhA9.js";
13
- import { z as ne, a as ae } from "./validator-CTlVogBQ.js";
13
+ import { z as ae, a as ne } from "./validator-CTlVogBQ.js";
14
+ import { _ as Ie } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-uhnNKle-.js";
14
15
  import { w as oe } from "./Modal-DB8M9o1T.js";
15
- import { useRouter as Ie } from "vue-router";
16
+ import { useRouter as Ne } from "vue-router";
16
17
  /*!
17
18
  * qrcode.vue v3.8.0
18
19
  * A Vue.js component to generate QRCode. Both support Vue 2 and Vue 3
19
20
  * © 2017-PRESENT @scopewu(https://github.com/scopewu)
20
21
  * MIT License.
21
22
  */
22
- var S = function() {
23
- return S = Object.assign || function(f) {
24
- for (var d, i = 1, v = arguments.length; i < v; i++) {
25
- d = arguments[i];
26
- for (var u in d) Object.prototype.hasOwnProperty.call(d, u) && (f[u] = d[u]);
23
+ var b = function() {
24
+ return b = Object.assign || function(f) {
25
+ for (var d, s = 1, v = arguments.length; s < v; s++) {
26
+ d = arguments[s];
27
+ for (var l in d) Object.prototype.hasOwnProperty.call(d, l) && (f[l] = d[l]);
27
28
  }
28
29
  return f;
29
- }, S.apply(this, arguments);
30
+ }, b.apply(this, arguments);
30
31
  };
31
32
  var Q;
32
33
  (function(o) {
33
34
  var f = (
34
35
  /** @class */
35
36
  function() {
36
- function r(e, t, n, a) {
37
+ function r(e, t, a, n) {
37
38
  if (this.version = e, this.errorCorrectionLevel = t, this.modules = [], this.isFunction = [], e < r.MIN_VERSION || e > r.MAX_VERSION)
38
39
  throw new RangeError("Version value out of range");
39
- if (a < -1 || a > 7)
40
+ if (n < -1 || n > 7)
40
41
  throw new RangeError("Mask value out of range");
41
42
  this.size = e * 4 + 17;
42
- for (var s = [], l = 0; l < this.size; l++)
43
- s.push(!1);
44
- for (var l = 0; l < this.size; l++)
45
- this.modules.push(s.slice()), this.isFunction.push(s.slice());
43
+ for (var i = [], u = 0; u < this.size; u++)
44
+ i.push(!1);
45
+ for (var u = 0; u < this.size; u++)
46
+ this.modules.push(i.slice()), this.isFunction.push(i.slice());
46
47
  this.drawFunctionPatterns();
47
- var h = this.addEccAndInterleave(n);
48
- if (this.drawCodewords(h), a == -1)
49
- for (var C = 1e9, l = 0; l < 8; l++) {
50
- this.applyMask(l), this.drawFormatBits(l);
48
+ var g = this.addEccAndInterleave(a);
49
+ if (this.drawCodewords(g), n == -1)
50
+ for (var C = 1e9, u = 0; u < 8; u++) {
51
+ this.applyMask(u), this.drawFormatBits(u);
51
52
  var c = this.getPenaltyScore();
52
- c < C && (a = l, C = c), this.applyMask(l);
53
+ c < C && (n = u, C = c), this.applyMask(u);
53
54
  }
54
- v(0 <= a && a <= 7), this.mask = a, this.applyMask(a), this.drawFormatBits(a), this.isFunction = [];
55
+ v(0 <= n && n <= 7), this.mask = n, this.applyMask(n), this.drawFormatBits(n), this.isFunction = [];
55
56
  }
56
57
  return r.encodeText = function(e, t) {
57
- var n = o.QrSegment.makeSegments(e);
58
- return r.encodeSegments(n, t);
58
+ var a = o.QrSegment.makeSegments(e);
59
+ return r.encodeSegments(a, t);
59
60
  }, r.encodeBinary = function(e, t) {
60
- var n = o.QrSegment.makeBytes(e);
61
- return r.encodeSegments([n], t);
62
- }, r.encodeSegments = function(e, t, n, a, s, l) {
63
- if (n === void 0 && (n = 1), a === void 0 && (a = 40), s === void 0 && (s = -1), l === void 0 && (l = !0), !(r.MIN_VERSION <= n && n <= a && a <= r.MAX_VERSION) || s < -1 || s > 7)
61
+ var a = o.QrSegment.makeBytes(e);
62
+ return r.encodeSegments([a], t);
63
+ }, r.encodeSegments = function(e, t, a, n, i, u) {
64
+ if (a === void 0 && (a = 1), n === void 0 && (n = 40), i === void 0 && (i = -1), u === void 0 && (u = !0), !(r.MIN_VERSION <= a && a <= n && n <= r.MAX_VERSION) || i < -1 || i > 7)
64
65
  throw new RangeError("Invalid value");
65
- var h, C;
66
- for (h = n; ; h++) {
67
- var c = r.getNumDataCodewords(h, t) * 8, m = u.getTotalBits(e, h);
68
- if (m <= c) {
69
- C = m;
66
+ var g, C;
67
+ for (g = a; ; g++) {
68
+ var c = r.getNumDataCodewords(g, t) * 8, h = l.getTotalBits(e, g);
69
+ if (h <= c) {
70
+ C = h;
70
71
  break;
71
72
  }
72
- if (h >= a)
73
+ if (g >= n)
73
74
  throw new RangeError("Data too long");
74
75
  }
75
76
  for (var p = 0, w = [r.Ecc.MEDIUM, r.Ecc.QUARTILE, r.Ecc.HIGH]; p < w.length; p++) {
76
77
  var y = w[p];
77
- l && C <= r.getNumDataCodewords(h, y) * 8 && (t = y);
78
+ u && C <= r.getNumDataCodewords(g, y) * 8 && (t = y);
78
79
  }
79
- for (var g = [], R = 0, M = e; R < M.length; R++) {
80
+ for (var m = [], R = 0, M = e; R < M.length; R++) {
80
81
  var P = M[R];
81
- d(P.mode.modeBits, 4, g), d(P.numChars, P.mode.numCharCountBits(h), g);
82
- for (var k = 0, A = P.getData(); k < A.length; k++) {
83
- var q = A[k];
84
- g.push(q);
82
+ d(P.mode.modeBits, 4, m), d(P.numChars, P.mode.numCharCountBits(g), m);
83
+ for (var _ = 0, A = P.getData(); _ < A.length; _++) {
84
+ var q = A[_];
85
+ m.push(q);
85
86
  }
86
87
  }
87
- v(g.length == C);
88
- var V = r.getNumDataCodewords(h, t) * 8;
89
- v(g.length <= V), d(0, Math.min(4, V - g.length), g), d(0, (8 - g.length % 8) % 8, g), v(g.length % 8 == 0);
90
- for (var F = 236; g.length < V; F ^= 253)
91
- d(F, 8, g);
92
- for (var z = []; z.length * 8 < g.length; )
93
- z.push(0);
94
- return g.forEach(function(B, O) {
95
- return z[O >>> 3] |= B << 7 - (O & 7);
96
- }), new r(h, t, z, s);
88
+ v(m.length == C);
89
+ var V = r.getNumDataCodewords(g, t) * 8;
90
+ v(m.length <= V), d(0, Math.min(4, V - m.length), m), d(0, (8 - m.length % 8) % 8, m), v(m.length % 8 == 0);
91
+ for (var k = 236; m.length < V; k ^= 253)
92
+ d(k, 8, m);
93
+ for (var L = []; L.length * 8 < m.length; )
94
+ L.push(0);
95
+ return m.forEach(function(B, z) {
96
+ return L[z >>> 3] |= B << 7 - (z & 7);
97
+ }), new r(g, t, L, i);
97
98
  }, r.prototype.getModule = function(e, t) {
98
99
  return 0 <= e && e < this.size && 0 <= t && t < this.size && this.modules[t][e];
99
100
  }, r.prototype.getModules = function() {
@@ -102,74 +103,74 @@ var Q;
102
103
  for (var e = 0; e < this.size; e++)
103
104
  this.setFunctionModule(6, e, e % 2 == 0), this.setFunctionModule(e, 6, e % 2 == 0);
104
105
  this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
105
- for (var t = this.getAlignmentPatternPositions(), n = t.length, e = 0; e < n; e++)
106
- for (var a = 0; a < n; a++)
107
- e == 0 && a == 0 || e == 0 && a == n - 1 || e == n - 1 && a == 0 || this.drawAlignmentPattern(t[e], t[a]);
106
+ for (var t = this.getAlignmentPatternPositions(), a = t.length, e = 0; e < a; e++)
107
+ for (var n = 0; n < a; n++)
108
+ e == 0 && n == 0 || e == 0 && n == a - 1 || e == a - 1 && n == 0 || this.drawAlignmentPattern(t[e], t[n]);
108
109
  this.drawFormatBits(0), this.drawVersion();
109
110
  }, r.prototype.drawFormatBits = function(e) {
110
- for (var t = this.errorCorrectionLevel.formatBits << 3 | e, n = t, a = 0; a < 10; a++)
111
- n = n << 1 ^ (n >>> 9) * 1335;
112
- var s = (t << 10 | n) ^ 21522;
113
- v(s >>> 15 == 0);
114
- for (var a = 0; a <= 5; a++)
115
- this.setFunctionModule(8, a, i(s, a));
116
- this.setFunctionModule(8, 7, i(s, 6)), this.setFunctionModule(8, 8, i(s, 7)), this.setFunctionModule(7, 8, i(s, 8));
117
- for (var a = 9; a < 15; a++)
118
- this.setFunctionModule(14 - a, 8, i(s, a));
119
- for (var a = 0; a < 8; a++)
120
- this.setFunctionModule(this.size - 1 - a, 8, i(s, a));
121
- for (var a = 8; a < 15; a++)
122
- this.setFunctionModule(8, this.size - 15 + a, i(s, a));
111
+ for (var t = this.errorCorrectionLevel.formatBits << 3 | e, a = t, n = 0; n < 10; n++)
112
+ a = a << 1 ^ (a >>> 9) * 1335;
113
+ var i = (t << 10 | a) ^ 21522;
114
+ v(i >>> 15 == 0);
115
+ for (var n = 0; n <= 5; n++)
116
+ this.setFunctionModule(8, n, s(i, n));
117
+ this.setFunctionModule(8, 7, s(i, 6)), this.setFunctionModule(8, 8, s(i, 7)), this.setFunctionModule(7, 8, s(i, 8));
118
+ for (var n = 9; n < 15; n++)
119
+ this.setFunctionModule(14 - n, 8, s(i, n));
120
+ for (var n = 0; n < 8; n++)
121
+ this.setFunctionModule(this.size - 1 - n, 8, s(i, n));
122
+ for (var n = 8; n < 15; n++)
123
+ this.setFunctionModule(8, this.size - 15 + n, s(i, n));
123
124
  this.setFunctionModule(8, this.size - 8, !0);
124
125
  }, r.prototype.drawVersion = function() {
125
126
  if (!(this.version < 7)) {
126
127
  for (var e = this.version, t = 0; t < 12; t++)
127
128
  e = e << 1 ^ (e >>> 11) * 7973;
128
- var n = this.version << 12 | e;
129
- v(n >>> 18 == 0);
129
+ var a = this.version << 12 | e;
130
+ v(a >>> 18 == 0);
130
131
  for (var t = 0; t < 18; t++) {
131
- var a = i(n, t), s = this.size - 11 + t % 3, l = Math.floor(t / 3);
132
- this.setFunctionModule(s, l, a), this.setFunctionModule(l, s, a);
132
+ var n = s(a, t), i = this.size - 11 + t % 3, u = Math.floor(t / 3);
133
+ this.setFunctionModule(i, u, n), this.setFunctionModule(u, i, n);
133
134
  }
134
135
  }
135
136
  }, r.prototype.drawFinderPattern = function(e, t) {
136
- for (var n = -4; n <= 4; n++)
137
- for (var a = -4; a <= 4; a++) {
138
- var s = Math.max(Math.abs(a), Math.abs(n)), l = e + a, h = t + n;
139
- 0 <= l && l < this.size && 0 <= h && h < this.size && this.setFunctionModule(l, h, s != 2 && s != 4);
137
+ for (var a = -4; a <= 4; a++)
138
+ for (var n = -4; n <= 4; n++) {
139
+ var i = Math.max(Math.abs(n), Math.abs(a)), u = e + n, g = t + a;
140
+ 0 <= u && u < this.size && 0 <= g && g < this.size && this.setFunctionModule(u, g, i != 2 && i != 4);
140
141
  }
141
142
  }, r.prototype.drawAlignmentPattern = function(e, t) {
142
- for (var n = -2; n <= 2; n++)
143
- for (var a = -2; a <= 2; a++)
144
- this.setFunctionModule(e + a, t + n, Math.max(Math.abs(a), Math.abs(n)) != 1);
145
- }, r.prototype.setFunctionModule = function(e, t, n) {
146
- this.modules[t][e] = n, this.isFunction[t][e] = !0;
143
+ for (var a = -2; a <= 2; a++)
144
+ for (var n = -2; n <= 2; n++)
145
+ this.setFunctionModule(e + n, t + a, Math.max(Math.abs(n), Math.abs(a)) != 1);
146
+ }, r.prototype.setFunctionModule = function(e, t, a) {
147
+ this.modules[t][e] = a, this.isFunction[t][e] = !0;
147
148
  }, r.prototype.addEccAndInterleave = function(e) {
148
- var t = this.version, n = this.errorCorrectionLevel;
149
- if (e.length != r.getNumDataCodewords(t, n))
149
+ var t = this.version, a = this.errorCorrectionLevel;
150
+ if (e.length != r.getNumDataCodewords(t, a))
150
151
  throw new RangeError("Invalid argument");
151
- for (var a = r.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t], s = r.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t], l = Math.floor(r.getNumRawDataModules(t) / 8), h = a - l % a, C = Math.floor(l / a), c = [], m = r.reedSolomonComputeDivisor(s), p = 0, w = 0; p < a; p++) {
152
- var y = e.slice(w, w + C - s + (p < h ? 0 : 1));
152
+ for (var n = r.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][t], i = r.ECC_CODEWORDS_PER_BLOCK[a.ordinal][t], u = Math.floor(r.getNumRawDataModules(t) / 8), g = n - u % n, C = Math.floor(u / n), c = [], h = r.reedSolomonComputeDivisor(i), p = 0, w = 0; p < n; p++) {
153
+ var y = e.slice(w, w + C - i + (p < g ? 0 : 1));
153
154
  w += y.length;
154
- var g = r.reedSolomonComputeRemainder(y, m);
155
- p < h && y.push(0), c.push(y.concat(g));
155
+ var m = r.reedSolomonComputeRemainder(y, h);
156
+ p < g && y.push(0), c.push(y.concat(m));
156
157
  }
157
158
  for (var R = [], M = function(P) {
158
- c.forEach(function(k, A) {
159
- (P != C - s || A >= h) && R.push(k[P]);
159
+ c.forEach(function(_, A) {
160
+ (P != C - i || A >= g) && R.push(_[P]);
160
161
  });
161
162
  }, p = 0; p < c[0].length; p++)
162
163
  M(p);
163
- return v(R.length == l), R;
164
+ return v(R.length == u), R;
164
165
  }, r.prototype.drawCodewords = function(e) {
165
166
  if (e.length != Math.floor(r.getNumRawDataModules(this.version) / 8))
166
167
  throw new RangeError("Invalid argument");
167
- for (var t = 0, n = this.size - 1; n >= 1; n -= 2) {
168
- n == 6 && (n = 5);
169
- for (var a = 0; a < this.size; a++)
170
- for (var s = 0; s < 2; s++) {
171
- var l = n - s, h = (n + 1 & 2) == 0, C = h ? this.size - 1 - a : a;
172
- !this.isFunction[C][l] && t < e.length * 8 && (this.modules[C][l] = i(e[t >>> 3], 7 - (t & 7)), t++);
168
+ for (var t = 0, a = this.size - 1; a >= 1; a -= 2) {
169
+ a == 6 && (a = 5);
170
+ for (var n = 0; n < this.size; n++)
171
+ for (var i = 0; i < 2; i++) {
172
+ var u = a - i, g = (a + 1 & 2) == 0, C = g ? this.size - 1 - n : n;
173
+ !this.isFunction[C][u] && t < e.length * 8 && (this.modules[C][u] = s(e[t >>> 3], 7 - (t & 7)), t++);
173
174
  }
174
175
  }
175
176
  v(t == e.length * 8);
@@ -177,75 +178,75 @@ var Q;
177
178
  if (e < 0 || e > 7)
178
179
  throw new RangeError("Mask value out of range");
179
180
  for (var t = 0; t < this.size; t++)
180
- for (var n = 0; n < this.size; n++) {
181
- var a = void 0;
181
+ for (var a = 0; a < this.size; a++) {
182
+ var n = void 0;
182
183
  switch (e) {
183
184
  case 0:
184
- a = (n + t) % 2 == 0;
185
+ n = (a + t) % 2 == 0;
185
186
  break;
186
187
  case 1:
187
- a = t % 2 == 0;
188
+ n = t % 2 == 0;
188
189
  break;
189
190
  case 2:
190
- a = n % 3 == 0;
191
+ n = a % 3 == 0;
191
192
  break;
192
193
  case 3:
193
- a = (n + t) % 3 == 0;
194
+ n = (a + t) % 3 == 0;
194
195
  break;
195
196
  case 4:
196
- a = (Math.floor(n / 3) + Math.floor(t / 2)) % 2 == 0;
197
+ n = (Math.floor(a / 3) + Math.floor(t / 2)) % 2 == 0;
197
198
  break;
198
199
  case 5:
199
- a = n * t % 2 + n * t % 3 == 0;
200
+ n = a * t % 2 + a * t % 3 == 0;
200
201
  break;
201
202
  case 6:
202
- a = (n * t % 2 + n * t % 3) % 2 == 0;
203
+ n = (a * t % 2 + a * t % 3) % 2 == 0;
203
204
  break;
204
205
  case 7:
205
- a = ((n + t) % 2 + n * t % 3) % 2 == 0;
206
+ n = ((a + t) % 2 + a * t % 3) % 2 == 0;
206
207
  break;
207
208
  default:
208
209
  throw new Error("Unreachable");
209
210
  }
210
- !this.isFunction[t][n] && a && (this.modules[t][n] = !this.modules[t][n]);
211
+ !this.isFunction[t][a] && n && (this.modules[t][a] = !this.modules[t][a]);
211
212
  }
212
213
  }, r.prototype.getPenaltyScore = function() {
213
214
  for (var e = 0, t = 0; t < this.size; t++) {
214
- for (var n = !1, a = 0, s = [0, 0, 0, 0, 0, 0, 0], l = 0; l < this.size; l++)
215
- this.modules[t][l] == n ? (a++, a == 5 ? e += r.PENALTY_N1 : a > 5 && e++) : (this.finderPenaltyAddHistory(a, s), n || (e += this.finderPenaltyCountPatterns(s) * r.PENALTY_N3), n = this.modules[t][l], a = 1);
216
- e += this.finderPenaltyTerminateAndCount(n, a, s) * r.PENALTY_N3;
215
+ for (var a = !1, n = 0, i = [0, 0, 0, 0, 0, 0, 0], u = 0; u < this.size; u++)
216
+ this.modules[t][u] == a ? (n++, n == 5 ? e += r.PENALTY_N1 : n > 5 && e++) : (this.finderPenaltyAddHistory(n, i), a || (e += this.finderPenaltyCountPatterns(i) * r.PENALTY_N3), a = this.modules[t][u], n = 1);
217
+ e += this.finderPenaltyTerminateAndCount(a, n, i) * r.PENALTY_N3;
217
218
  }
218
- for (var l = 0; l < this.size; l++) {
219
- for (var n = !1, h = 0, s = [0, 0, 0, 0, 0, 0, 0], t = 0; t < this.size; t++)
220
- this.modules[t][l] == n ? (h++, h == 5 ? e += r.PENALTY_N1 : h > 5 && e++) : (this.finderPenaltyAddHistory(h, s), n || (e += this.finderPenaltyCountPatterns(s) * r.PENALTY_N3), n = this.modules[t][l], h = 1);
221
- e += this.finderPenaltyTerminateAndCount(n, h, s) * r.PENALTY_N3;
219
+ for (var u = 0; u < this.size; u++) {
220
+ for (var a = !1, g = 0, i = [0, 0, 0, 0, 0, 0, 0], t = 0; t < this.size; t++)
221
+ this.modules[t][u] == a ? (g++, g == 5 ? e += r.PENALTY_N1 : g > 5 && e++) : (this.finderPenaltyAddHistory(g, i), a || (e += this.finderPenaltyCountPatterns(i) * r.PENALTY_N3), a = this.modules[t][u], g = 1);
222
+ e += this.finderPenaltyTerminateAndCount(a, g, i) * r.PENALTY_N3;
222
223
  }
223
224
  for (var t = 0; t < this.size - 1; t++)
224
- for (var l = 0; l < this.size - 1; l++) {
225
- var C = this.modules[t][l];
226
- C == this.modules[t][l + 1] && C == this.modules[t + 1][l] && C == this.modules[t + 1][l + 1] && (e += r.PENALTY_N2);
225
+ for (var u = 0; u < this.size - 1; u++) {
226
+ var C = this.modules[t][u];
227
+ C == this.modules[t][u + 1] && C == this.modules[t + 1][u] && C == this.modules[t + 1][u + 1] && (e += r.PENALTY_N2);
227
228
  }
228
- for (var c = 0, m = 0, p = this.modules; m < p.length; m++) {
229
- var w = p[m];
229
+ for (var c = 0, h = 0, p = this.modules; h < p.length; h++) {
230
+ var w = p[h];
230
231
  c = w.reduce(function(R, M) {
231
232
  return R + (M ? 1 : 0);
232
233
  }, c);
233
234
  }
234
- var y = this.size * this.size, g = Math.ceil(Math.abs(c * 20 - y * 10) / y) - 1;
235
- return v(0 <= g && g <= 9), e += g * r.PENALTY_N4, v(0 <= e && e <= 2568888), e;
235
+ var y = this.size * this.size, m = Math.ceil(Math.abs(c * 20 - y * 10) / y) - 1;
236
+ return v(0 <= m && m <= 9), e += m * r.PENALTY_N4, v(0 <= e && e <= 2568888), e;
236
237
  }, r.prototype.getAlignmentPatternPositions = function() {
237
238
  if (this.version == 1)
238
239
  return [];
239
- for (var e = Math.floor(this.version / 7) + 2, t = Math.floor((this.version * 8 + e * 3 + 5) / (e * 4 - 4)) * 2, n = [6], a = this.size - 7; n.length < e; a -= t)
240
- n.splice(1, 0, a);
241
- return n;
240
+ for (var e = Math.floor(this.version / 7) + 2, t = Math.floor((this.version * 8 + e * 3 + 5) / (e * 4 - 4)) * 2, a = [6], n = this.size - 7; a.length < e; n -= t)
241
+ a.splice(1, 0, n);
242
+ return a;
242
243
  }, r.getNumRawDataModules = function(e) {
243
244
  if (e < r.MIN_VERSION || e > r.MAX_VERSION)
244
245
  throw new RangeError("Version number out of range");
245
246
  var t = (16 * e + 128) * e + 64;
246
247
  if (e >= 2) {
247
- var n = Math.floor(e / 7) + 2;
248
- t -= (25 * n - 10) * n - 55, e >= 7 && (t -= 36);
248
+ var a = Math.floor(e / 7) + 2;
249
+ t -= (25 * a - 10) * a - 55, e >= 7 && (t -= 36);
249
250
  }
250
251
  return v(208 <= t && t <= 29648), t;
251
252
  }, r.getNumDataCodewords = function(e, t) {
@@ -253,41 +254,41 @@ var Q;
253
254
  }, r.reedSolomonComputeDivisor = function(e) {
254
255
  if (e < 1 || e > 255)
255
256
  throw new RangeError("Degree out of range");
256
- for (var t = [], n = 0; n < e - 1; n++)
257
+ for (var t = [], a = 0; a < e - 1; a++)
257
258
  t.push(0);
258
259
  t.push(1);
259
- for (var a = 1, n = 0; n < e; n++) {
260
- for (var s = 0; s < t.length; s++)
261
- t[s] = r.reedSolomonMultiply(t[s], a), s + 1 < t.length && (t[s] ^= t[s + 1]);
262
- a = r.reedSolomonMultiply(a, 2);
260
+ for (var n = 1, a = 0; a < e; a++) {
261
+ for (var i = 0; i < t.length; i++)
262
+ t[i] = r.reedSolomonMultiply(t[i], n), i + 1 < t.length && (t[i] ^= t[i + 1]);
263
+ n = r.reedSolomonMultiply(n, 2);
263
264
  }
264
265
  return t;
265
266
  }, r.reedSolomonComputeRemainder = function(e, t) {
266
- for (var n = t.map(function(C) {
267
+ for (var a = t.map(function(C) {
267
268
  return 0;
268
- }), a = function(C) {
269
- var c = C ^ n.shift();
270
- n.push(0), t.forEach(function(m, p) {
271
- return n[p] ^= r.reedSolomonMultiply(m, c);
269
+ }), n = function(C) {
270
+ var c = C ^ a.shift();
271
+ a.push(0), t.forEach(function(h, p) {
272
+ return a[p] ^= r.reedSolomonMultiply(h, c);
272
273
  });
273
- }, s = 0, l = e; s < l.length; s++) {
274
- var h = l[s];
275
- a(h);
274
+ }, i = 0, u = e; i < u.length; i++) {
275
+ var g = u[i];
276
+ n(g);
276
277
  }
277
- return n;
278
+ return a;
278
279
  }, r.reedSolomonMultiply = function(e, t) {
279
280
  if (e >>> 8 || t >>> 8)
280
281
  throw new RangeError("Byte out of range");
281
- for (var n = 0, a = 7; a >= 0; a--)
282
- n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> a & 1) * e;
283
- return v(n >>> 8 == 0), n;
282
+ for (var a = 0, n = 7; n >= 0; n--)
283
+ a = a << 1 ^ (a >>> 7) * 285, a ^= (t >>> n & 1) * e;
284
+ return v(a >>> 8 == 0), a;
284
285
  }, r.prototype.finderPenaltyCountPatterns = function(e) {
285
286
  var t = e[1];
286
287
  v(t <= this.size * 3);
287
- var n = t > 0 && e[2] == t && e[3] == t * 3 && e[4] == t && e[5] == t;
288
- return (n && e[0] >= t * 4 && e[6] >= t ? 1 : 0) + (n && e[6] >= t * 4 && e[0] >= t ? 1 : 0);
289
- }, r.prototype.finderPenaltyTerminateAndCount = function(e, t, n) {
290
- return e && (this.finderPenaltyAddHistory(t, n), t = 0), t += this.size, this.finderPenaltyAddHistory(t, n), this.finderPenaltyCountPatterns(n);
288
+ var a = t > 0 && e[2] == t && e[3] == t * 3 && e[4] == t && e[5] == t;
289
+ return (a && e[0] >= t * 4 && e[6] >= t ? 1 : 0) + (a && e[6] >= t * 4 && e[0] >= t ? 1 : 0);
290
+ }, r.prototype.finderPenaltyTerminateAndCount = function(e, t, a) {
291
+ return e && (this.finderPenaltyAddHistory(t, a), t = 0), t += this.size, this.finderPenaltyAddHistory(t, a), this.finderPenaltyCountPatterns(a);
291
292
  }, r.prototype.finderPenaltyAddHistory = function(e, t) {
292
293
  t[0] == 0 && (e += this.size), t.pop(), t.unshift(e);
293
294
  }, r.MIN_VERSION = 1, r.MAX_VERSION = 40, r.PENALTY_N1 = 3, r.PENALTY_N2 = 3, r.PENALTY_N3 = 40, r.PENALTY_N4 = 10, r.ECC_CODEWORDS_PER_BLOCK = [
@@ -319,47 +320,47 @@ var Q;
319
320
  function d(r, e, t) {
320
321
  if (e < 0 || e > 31 || r >>> e)
321
322
  throw new RangeError("Value out of range");
322
- for (var n = e - 1; n >= 0; n--)
323
- t.push(r >>> n & 1);
323
+ for (var a = e - 1; a >= 0; a--)
324
+ t.push(r >>> a & 1);
324
325
  }
325
- function i(r, e) {
326
+ function s(r, e) {
326
327
  return (r >>> e & 1) != 0;
327
328
  }
328
329
  function v(r) {
329
330
  if (!r)
330
331
  throw new Error("Assertion error");
331
332
  }
332
- var u = (
333
+ var l = (
333
334
  /** @class */
334
335
  function() {
335
- function r(e, t, n) {
336
- if (this.mode = e, this.numChars = t, this.bitData = n, t < 0)
336
+ function r(e, t, a) {
337
+ if (this.mode = e, this.numChars = t, this.bitData = a, t < 0)
337
338
  throw new RangeError("Invalid argument");
338
- this.bitData = n.slice();
339
+ this.bitData = a.slice();
339
340
  }
340
341
  return r.makeBytes = function(e) {
341
- for (var t = [], n = 0, a = e; n < a.length; n++) {
342
- var s = a[n];
343
- d(s, 8, t);
342
+ for (var t = [], a = 0, n = e; a < n.length; a++) {
343
+ var i = n[a];
344
+ d(i, 8, t);
344
345
  }
345
346
  return new r(r.Mode.BYTE, e.length, t);
346
347
  }, r.makeNumeric = function(e) {
347
348
  if (!r.isNumeric(e))
348
349
  throw new RangeError("String contains non-numeric characters");
349
- for (var t = [], n = 0; n < e.length; ) {
350
- var a = Math.min(e.length - n, 3);
351
- d(parseInt(e.substring(n, n + a), 10), a * 3 + 1, t), n += a;
350
+ for (var t = [], a = 0; a < e.length; ) {
351
+ var n = Math.min(e.length - a, 3);
352
+ d(parseInt(e.substring(a, a + n), 10), n * 3 + 1, t), a += n;
352
353
  }
353
354
  return new r(r.Mode.NUMERIC, e.length, t);
354
355
  }, r.makeAlphanumeric = function(e) {
355
356
  if (!r.isAlphanumeric(e))
356
357
  throw new RangeError("String contains unencodable characters in alphanumeric mode");
357
- var t = [], n;
358
- for (n = 0; n + 2 <= e.length; n += 2) {
359
- var a = r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n)) * 45;
360
- a += r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n + 1)), d(a, 11, t);
358
+ var t = [], a;
359
+ for (a = 0; a + 2 <= e.length; a += 2) {
360
+ var n = r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a)) * 45;
361
+ n += r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a + 1)), d(n, 11, t);
361
362
  }
362
- return n < e.length && d(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n)), 6, t), new r(r.Mode.ALPHANUMERIC, e.length, t);
363
+ return a < e.length && d(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(a)), 6, t), new r(r.Mode.ALPHANUMERIC, e.length, t);
363
364
  }, r.makeSegments = function(e) {
364
365
  return e == "" ? [] : r.isNumeric(e) ? [r.makeNumeric(e)] : r.isAlphanumeric(e) ? [r.makeAlphanumeric(e)] : [r.makeBytes(r.toUtf8ByteArray(e))];
365
366
  }, r.makeEci = function(e) {
@@ -382,32 +383,32 @@ var Q;
382
383
  }, r.prototype.getData = function() {
383
384
  return this.bitData.slice();
384
385
  }, r.getTotalBits = function(e, t) {
385
- for (var n = 0, a = 0, s = e; a < s.length; a++) {
386
- var l = s[a], h = l.mode.numCharCountBits(t);
387
- if (l.numChars >= 1 << h)
386
+ for (var a = 0, n = 0, i = e; n < i.length; n++) {
387
+ var u = i[n], g = u.mode.numCharCountBits(t);
388
+ if (u.numChars >= 1 << g)
388
389
  return 1 / 0;
389
- n += 4 + h + l.bitData.length;
390
+ a += 4 + g + u.bitData.length;
390
391
  }
391
- return n;
392
+ return a;
392
393
  }, r.toUtf8ByteArray = function(e) {
393
394
  e = encodeURI(e);
394
- for (var t = [], n = 0; n < e.length; n++)
395
- e.charAt(n) != "%" ? t.push(e.charCodeAt(n)) : (t.push(parseInt(e.substring(n + 1, n + 3), 16)), n += 2);
395
+ for (var t = [], a = 0; a < e.length; a++)
396
+ e.charAt(a) != "%" ? t.push(e.charCodeAt(a)) : (t.push(parseInt(e.substring(a + 1, a + 3), 16)), a += 2);
396
397
  return t;
397
398
  }, r.NUMERIC_REGEX = /^[0-9]*$/, r.ALPHANUMERIC_REGEX = /^[A-Z0-9 $%*+.\/:-]*$/, r.ALPHANUMERIC_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", r;
398
399
  }()
399
400
  );
400
- o.QrSegment = u;
401
+ o.QrSegment = l;
401
402
  })(Q || (Q = {}));
402
403
  (function(o) {
403
404
  (function(f) {
404
405
  var d = (
405
406
  /** @class */
406
407
  function() {
407
- function i(v, u) {
408
- this.ordinal = v, this.formatBits = u;
408
+ function s(v, l) {
409
+ this.ordinal = v, this.formatBits = l;
409
410
  }
410
- return i.LOW = new i(0, 1), i.MEDIUM = new i(1, 0), i.QUARTILE = new i(2, 3), i.HIGH = new i(3, 2), i;
411
+ return s.LOW = new s(0, 1), s.MEDIUM = new s(1, 0), s.QUARTILE = new s(2, 3), s.HIGH = new s(3, 2), s;
411
412
  }()
412
413
  );
413
414
  f.Ecc = d;
@@ -418,18 +419,18 @@ var Q;
418
419
  var d = (
419
420
  /** @class */
420
421
  function() {
421
- function i(v, u) {
422
- this.modeBits = v, this.numBitsCharCount = u;
422
+ function s(v, l) {
423
+ this.modeBits = v, this.numBitsCharCount = l;
423
424
  }
424
- return i.prototype.numCharCountBits = function(v) {
425
+ return s.prototype.numCharCountBits = function(v) {
425
426
  return this.numBitsCharCount[Math.floor((v + 7) / 17)];
426
- }, i.NUMERIC = new i(1, [10, 12, 14]), i.ALPHANUMERIC = new i(2, [9, 11, 13]), i.BYTE = new i(4, [8, 16, 16]), i.KANJI = new i(8, [8, 10, 12]), i.ECI = new i(7, [0, 0, 0]), i;
427
+ }, s.NUMERIC = new s(1, [10, 12, 14]), s.ALPHANUMERIC = new s(2, [9, 11, 13]), s.BYTE = new s(4, [8, 16, 16]), s.KANJI = new s(8, [8, 10, 12]), s.ECI = new s(7, [0, 0, 0]), s;
427
428
  }()
428
429
  );
429
430
  f.Mode = d;
430
431
  })(o.QrSegment || (o.QrSegment = {}));
431
432
  })(Q || (Q = {}));
432
- var H = Q, de = "L", Ne = 100, ce = 0, _e = 0.1, ke = 2, fe = {
433
+ var H = Q, ue = "L", _e = 100, de = 0, ke = 0.1, Be = 2, ce = {
433
434
  L: H.QrCode.Ecc.LOW,
434
435
  M: H.QrCode.Ecc.MEDIUM,
435
436
  Q: H.QrCode.Ecc.QUARTILE,
@@ -442,52 +443,52 @@ var H = Q, de = "L", Ne = 100, ce = 0, _e = 0.1, ke = 2, fe = {
442
443
  }
443
444
  return !0;
444
445
  }();
445
- function ve(o) {
446
- return o in fe;
446
+ function fe(o) {
447
+ return o in ce;
447
448
  }
448
- function he(o, f) {
449
+ function ve(o, f) {
449
450
  f === void 0 && (f = 0);
450
451
  var d = "";
451
- return o.forEach(function(i, v) {
452
- var u = null;
453
- i.forEach(function(r, e) {
454
- if (!r && u !== null) {
455
- d += "M".concat(u + f, " ").concat(v + f, "h").concat(e - u, "v1H").concat(u + f, "z"), u = null;
452
+ return o.forEach(function(s, v) {
453
+ var l = null;
454
+ s.forEach(function(r, e) {
455
+ if (!r && l !== null) {
456
+ d += "M".concat(l + f, " ").concat(v + f, "h").concat(e - l, "v1H").concat(l + f, "z"), l = null;
456
457
  return;
457
458
  }
458
- if (e === i.length - 1) {
459
+ if (e === s.length - 1) {
459
460
  if (!r)
460
461
  return;
461
- u === null ? d += "M".concat(e + f, ",").concat(v + f, " h1v1H").concat(e + f, "z") : d += "M".concat(u + f, ",").concat(v + f, " h").concat(e + 1 - u, "v1H").concat(u + f, "z");
462
+ l === null ? d += "M".concat(e + f, ",").concat(v + f, " h1v1H").concat(e + f, "z") : d += "M".concat(l + f, ",").concat(v + f, " h").concat(e + 1 - l, "v1H").concat(l + f, "z");
462
463
  return;
463
464
  }
464
- r && u === null && (u = e);
465
+ r && l === null && (l = e);
465
466
  });
466
467
  }), d;
467
468
  }
468
- function Be(o, f, d, i) {
469
- var v = i.width, u = i.height, r = i.x, e = i.y, t = o.length + d * 2, n = Math.floor(f * _e), a = t / f, s = (v || n) * a, l = (u || n) * a, h = r == null ? o.length / 2 - s / 2 : r * a, C = e == null ? o.length / 2 - l / 2 : e * a, c = (i.borderRadius || 0) * a, m = null;
470
- if (i.excavate) {
471
- var p = Math.floor(h), w = Math.floor(C), y = Math.ceil(s + h - p), g = Math.ceil(l + C - w);
472
- m = { x: p, y: w, w: y, h: g };
469
+ function De(o, f, d, s) {
470
+ var v = s.width, l = s.height, r = s.x, e = s.y, t = o.length + d * 2, a = Math.floor(f * ke), n = t / f, i = (v || a) * n, u = (l || a) * n, g = r == null ? o.length / 2 - i / 2 : r * n, C = e == null ? o.length / 2 - u / 2 : e * n, c = (s.borderRadius || 0) * n, h = null;
471
+ if (s.excavate) {
472
+ var p = Math.floor(g), w = Math.floor(C), y = Math.ceil(i + g - p), m = Math.ceil(u + C - w);
473
+ h = { x: p, y: w, w: y, h: m };
473
474
  }
474
- return { x: h, y: C, h: l, w: s, borderRadius: c, excavation: m };
475
+ return { x: g, y: C, h: u, w: i, borderRadius: c, excavation: h };
475
476
  }
476
- function me(o) {
477
- var f = D(function() {
477
+ function he(o) {
478
+ var f = O(function() {
478
479
  var e;
479
- return ((e = o.margin) !== null && e !== void 0 ? e : ce) >>> 0;
480
- }), d = D(function() {
481
- var e = ve(o.level) ? o.level : de;
482
- return H.QrCode.encodeText(o.value, fe[e]).getModules();
483
- }), i = D(function() {
480
+ return ((e = o.margin) !== null && e !== void 0 ? e : de) >>> 0;
481
+ }), d = O(function() {
482
+ var e = fe(o.level) ? o.level : ue;
483
+ return H.QrCode.encodeText(o.value, ce[e]).getModules();
484
+ }), s = O(function() {
484
485
  return d.value.length + f.value * 2;
485
- }), v = D(function() {
486
- return he(d.value, f.value);
487
- }), u = D(function() {
486
+ }), v = O(function() {
487
+ return ve(d.value, f.value);
488
+ }), l = O(function() {
488
489
  if (!o.imageSettings.src)
489
490
  return { x: 0, y: 0, width: 0, height: 0, borderRadius: 0 };
490
- var e = Be(d.value, o.size, f.value, o.imageSettings);
491
+ var e = De(d.value, o.size, f.value, o.imageSettings);
491
492
  return {
492
493
  x: e.x + f.value,
493
494
  y: e.y + f.value,
@@ -495,19 +496,19 @@ function me(o) {
495
496
  height: e.h,
496
497
  borderRadius: e.borderRadius
497
498
  };
498
- }), r = D(function() {
499
+ }), r = O(function() {
499
500
  if (!o.imageSettings.excavate || !o.imageSettings.src)
500
501
  return null;
501
- var e = ke / (o.size / i.value);
502
+ var e = Be / (o.size / s.value);
502
503
  return {
503
- x: u.value.x - e,
504
- y: u.value.y - e,
505
- width: u.value.width + e * 2,
506
- height: u.value.height + e * 2,
507
- borderRadius: u.value.borderRadius
504
+ x: l.value.x - e,
505
+ y: l.value.y - e,
506
+ width: l.value.width + e * 2,
507
+ height: l.value.height + e * 2,
508
+ borderRadius: l.value.borderRadius
508
509
  };
509
510
  });
510
- return { margin: f, numCells: i, cells: d, fgPath: v, imageProps: u, imageBorderProps: r };
511
+ return { margin: f, numCells: s, cells: d, fgPath: v, imageProps: l, imageBorderProps: r };
511
512
  }
512
513
  var j = {
513
514
  value: {
@@ -517,13 +518,13 @@ var j = {
517
518
  },
518
519
  size: {
519
520
  type: Number,
520
- default: Ne
521
+ default: _e
521
522
  },
522
523
  level: {
523
524
  type: String,
524
- default: de,
525
+ default: ue,
525
526
  validator: function(o) {
526
- return ve(o);
527
+ return fe(o);
527
528
  }
528
529
  },
529
530
  background: {
@@ -537,7 +538,7 @@ var j = {
537
538
  margin: {
538
539
  type: Number,
539
540
  required: !1,
540
- default: ce
541
+ default: de
541
542
  },
542
543
  imageSettings: {
543
544
  type: Object,
@@ -569,21 +570,21 @@ var j = {
569
570
  required: !1,
570
571
  default: "#fff"
571
572
  }
572
- }, De = S(S({}, j), { renderAs: {
573
+ }, Le = b(b({}, j), { renderAs: {
573
574
  type: String,
574
575
  required: !1,
575
576
  default: "canvas",
576
577
  validator: function(o) {
577
578
  return ["canvas", "svg"].indexOf(o) > -1;
578
579
  }
579
- } }), Le = L({
580
+ } }), ze = D({
580
581
  name: "QRCodeSvg",
581
582
  props: j,
582
583
  setup: function(o) {
583
- var f = me(o), d = f.numCells, i = f.fgPath, v = f.imageProps, u = f.imageBorderProps, r = "qrcode.vue-gradient", e = function() {
584
+ var f = he(o), d = f.numCells, s = f.fgPath, v = f.imageProps, l = f.imageBorderProps, r = "qrcode.vue-gradient", e = function() {
584
585
  if (!o.gradient)
585
586
  return null;
586
- var a = o.gradientType === "linear" ? {
587
+ var n = o.gradientType === "linear" ? {
587
588
  x1: "0%",
588
589
  y1: "0%",
589
590
  x2: "100%",
@@ -595,7 +596,7 @@ var j = {
595
596
  fx: "50%",
596
597
  fy: "50%"
597
598
  };
598
- return E(o.gradientType === "linear" ? "linearGradient" : "radialGradient", S({ id: r }, a), [
599
+ return E(o.gradientType === "linear" ? "linearGradient" : "radialGradient", b({ id: r }, n), [
599
600
  E("stop", {
600
601
  offset: "0%",
601
602
  style: { stopColor: o.gradientStartColor }
@@ -605,16 +606,16 @@ var j = {
605
606
  style: { stopColor: o.gradientEndColor }
606
607
  })
607
608
  ]);
608
- }, t = "qrcode.vue-logo-clip-path", n = function() {
609
- var a = v.value.borderRadius;
610
- return !o.imageSettings.src || a <= 0 ? null : E("clipPath", { id: t }, [
609
+ }, t = "qrcode.vue-logo-clip-path", a = function() {
610
+ var n = v.value.borderRadius;
611
+ return !o.imageSettings.src || n <= 0 ? null : E("clipPath", { id: t }, [
611
612
  E("rect", {
612
613
  x: v.value.x,
613
614
  y: v.value.y,
614
615
  width: v.value.width,
615
616
  height: v.value.height,
616
- rx: a,
617
- ry: a
617
+ rx: n,
618
+ ry: n
618
619
  })
619
620
  ]);
620
621
  };
@@ -626,7 +627,7 @@ var j = {
626
627
  xmlns: "http://www.w3.org/2000/svg",
627
628
  viewBox: "0 0 ".concat(d.value, " ").concat(d.value)
628
629
  }, [
629
- E("defs", {}, [e(), n()]),
630
+ E("defs", {}, [e(), a()]),
630
631
  E("rect", {
631
632
  width: "100%",
632
633
  height: "100%",
@@ -634,91 +635,91 @@ var j = {
634
635
  }),
635
636
  E("path", {
636
637
  fill: o.gradient ? "url(#".concat(r, ")") : o.foreground,
637
- d: i.value
638
+ d: s.value
638
639
  }),
639
- u.value && E("rect", {
640
- x: u.value.x,
641
- y: u.value.y,
642
- width: u.value.width,
643
- height: u.value.height,
640
+ l.value && E("rect", {
641
+ x: l.value.x,
642
+ y: l.value.y,
643
+ width: l.value.width,
644
+ height: l.value.height,
644
645
  fill: o.background,
645
- rx: u.value.borderRadius,
646
- ry: u.value.borderRadius
646
+ rx: l.value.borderRadius,
647
+ ry: l.value.borderRadius
647
648
  }),
648
- o.imageSettings.src && E("image", S(S({ href: o.imageSettings.src }, v.value), v.value.borderRadius > 0 ? { "clip-path": "url(#".concat(t, ")") } : {}))
649
+ o.imageSettings.src && E("image", b(b({ href: o.imageSettings.src }, v.value), v.value.borderRadius > 0 ? { "clip-path": "url(#".concat(t, ")") } : {}))
649
650
  ]);
650
651
  };
651
652
  }
652
- }), ze = L({
653
+ }), Oe = D({
653
654
  name: "QRCodeCanvas",
654
655
  props: j,
655
656
  setup: function(o, f) {
656
- var d = me(o), i = d.margin, v = d.cells, u = d.numCells, r = d.imageProps, e = d.imageBorderProps, t = x(null), n = x(null), a = function() {
657
- var l = o.size, h = o.background, C = o.foreground, c = o.gradient, m = o.gradientType, p = o.gradientStartColor, w = o.gradientEndColor, y = t.value;
657
+ var d = he(o), s = d.margin, v = d.cells, l = d.numCells, r = d.imageProps, e = d.imageBorderProps, t = x(null), a = x(null), n = function() {
658
+ var u = o.size, g = o.background, C = o.foreground, c = o.gradient, h = o.gradientType, p = o.gradientStartColor, w = o.gradientEndColor, y = t.value;
658
659
  if (y) {
659
- var g = y.getContext("2d");
660
- if (g) {
661
- var R = v.value, M = n.value, P = typeof window < "u" && window.devicePixelRatio || 1, k = l / u.value * P;
662
- if (y.height = y.width = l * P, g.scale(k, k), g.fillStyle = h, g.fillRect(0, 0, u.value, u.value), c) {
660
+ var m = y.getContext("2d");
661
+ if (m) {
662
+ var R = v.value, M = a.value, P = typeof window < "u" && window.devicePixelRatio || 1, _ = u / l.value * P;
663
+ if (y.height = y.width = u * P, m.scale(_, _), m.fillStyle = g, m.fillRect(0, 0, l.value, l.value), c) {
663
664
  var A = void 0;
664
- m === "linear" ? A = g.createLinearGradient(0, 0, u.value, u.value) : A = g.createRadialGradient(u.value / 2, u.value / 2, 0, u.value / 2, u.value / 2, u.value / 2), A.addColorStop(0, p), A.addColorStop(1, w), g.fillStyle = A;
665
+ h === "linear" ? A = m.createLinearGradient(0, 0, l.value, l.value) : A = m.createRadialGradient(l.value / 2, l.value / 2, 0, l.value / 2, l.value / 2, l.value / 2), A.addColorStop(0, p), A.addColorStop(1, w), m.fillStyle = A;
665
666
  } else
666
- g.fillStyle = C;
667
- Fe ? g.fill(new Path2D(he(R, i.value))) : R.forEach(function(B, O) {
667
+ m.fillStyle = C;
668
+ Fe ? m.fill(new Path2D(ve(R, s.value))) : R.forEach(function(B, z) {
668
669
  B.forEach(function(G, Y) {
669
- G && g.fillRect(Y + i.value, O + i.value, 1, 1);
670
+ G && m.fillRect(Y + s.value, z + s.value, 1, 1);
670
671
  });
671
672
  });
672
673
  var q = o.imageSettings.src && M && M.naturalWidth !== 0 && M.naturalHeight !== 0;
673
674
  if (q) {
674
- var V = function(B, O, G, Y, ee, ge) {
675
- B.beginPath(), B.roundRect ? B.roundRect(O, G, Y, ee, ge) : B.rect(O, G, Y, ee);
675
+ var V = function(B, z, G, Y, ee, me) {
676
+ B.beginPath(), B.roundRect ? B.roundRect(z, G, Y, ee, me) : B.rect(z, G, Y, ee);
676
677
  };
677
678
  if (e.value) {
678
- var F = e.value;
679
- g.fillStyle = o.background, V(g, F.x, F.y, F.width, F.height, F.borderRadius), g.fill();
679
+ var k = e.value;
680
+ m.fillStyle = o.background, V(m, k.x, k.y, k.width, k.height, k.borderRadius), m.fill();
680
681
  }
681
- var z = r.value.borderRadius;
682
- z > 0 ? (g.save(), V(g, r.value.x, r.value.y, r.value.width, r.value.height, z), g.clip(), g.drawImage(M, r.value.x, r.value.y, r.value.width, r.value.height), g.restore()) : g.drawImage(M, r.value.x, r.value.y, r.value.width, r.value.height);
682
+ var L = r.value.borderRadius;
683
+ L > 0 ? (m.save(), V(m, r.value.x, r.value.y, r.value.width, r.value.height, L), m.clip(), m.drawImage(M, r.value.x, r.value.y, r.value.width, r.value.height), m.restore()) : m.drawImage(M, r.value.x, r.value.y, r.value.width, r.value.height);
683
684
  }
684
685
  }
685
686
  }
686
687
  };
687
- pe(a), Ce(a);
688
- var s = f.attrs.style;
688
+ ge(n), pe(n);
689
+ var i = f.attrs.style;
689
690
  return function() {
690
691
  return E(ie, [
691
- E("canvas", S(S({}, f.attrs), { ref: t, style: S(S({}, s), { width: "".concat(o.size, "px"), height: "".concat(o.size, "px") }) })),
692
+ E("canvas", b(b({}, f.attrs), { ref: t, style: b(b({}, i), { width: "".concat(o.size, "px"), height: "".concat(o.size, "px") }) })),
692
693
  o.imageSettings.src && E("img", {
693
- ref: n,
694
+ ref: a,
694
695
  src: o.imageSettings.src,
695
696
  style: { display: "none" },
696
- onLoad: a
697
+ onLoad: n
697
698
  })
698
699
  ]);
699
700
  };
700
701
  }
701
- }), Oe = L({
702
+ }), xe = D({
702
703
  name: "Qrcode",
703
704
  render: function() {
704
- var o = this.$props, f = o.renderAs, d = o.value, i = o.size, v = o.margin, u = o.level, r = o.background, e = o.foreground, t = o.imageSettings, n = o.gradient, a = o.gradientType, s = o.gradientStartColor, l = o.gradientEndColor;
705
- return E(f === "svg" ? Le : ze, {
705
+ var o = this.$props, f = o.renderAs, d = o.value, s = o.size, v = o.margin, l = o.level, r = o.background, e = o.foreground, t = o.imageSettings, a = o.gradient, n = o.gradientType, i = o.gradientStartColor, u = o.gradientEndColor;
706
+ return E(f === "svg" ? ze : Oe, {
706
707
  value: d,
707
- size: i,
708
+ size: s,
708
709
  margin: v,
709
- level: u,
710
+ level: l,
710
711
  background: r,
711
712
  foreground: e,
712
713
  imageSettings: t,
713
- gradient: n,
714
- gradientType: a,
715
- gradientStartColor: s,
716
- gradientEndColor: l
714
+ gradient: a,
715
+ gradientType: n,
716
+ gradientStartColor: i,
717
+ gradientEndColor: u
717
718
  });
718
719
  },
719
- props: De
720
+ props: Le
720
721
  });
721
- const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "my-6 justify-items-center" }, Ve = /* @__PURE__ */ L({
722
+ const Ue = { class: "t-caption" }, Qe = { class: "t-caption" }, Ve = { class: "my-6 justify-items-center" }, Ke = /* @__PURE__ */ D({
722
723
  __name: "TerminalBindCodeDialog",
723
724
  props: {
724
725
  code: {
@@ -727,7 +728,7 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
727
728
  }
728
729
  },
729
730
  setup(o) {
730
- const f = o, d = J(), i = ue();
731
+ const f = o, d = J(), s = Ae();
731
732
  function v() {
732
733
  try {
733
734
  le(f.code), d.open({ title: "Text copied to clipboard." }, 1e3);
@@ -735,31 +736,31 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
735
736
  d.open({ title: "Clipboard API incompatible." }, 1e3);
736
737
  }
737
738
  }
738
- const u = i.namespace.value === "dev" ? "development" : "production", r = D(() => `${u},${(i.currentCountry.value ?? Ee.F_COUNTRY.enum.MY).toLowerCase()},${f.code}`);
739
+ const l = s.namespace.value === "dev" ? "development" : "production", r = O(() => `${l},${(s.currentCountry.value ?? we.F_COUNTRY.enum.MY).toLowerCase()},${f.code}`);
739
740
  return (e, t) => (I(), X(ie, null, [
740
- b("div", xe, [
741
+ S("div", Ue, [
741
742
  t[1] || (t[1] = te(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ", -1)),
742
- b("div", {
743
+ S("div", {
743
744
  class: "my-6 text-center fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
744
- onClick: t[0] || (t[0] = (n) => {
745
- n.stopPropagation(), v();
745
+ onClick: t[0] || (t[0] = (a) => {
746
+ a.stopPropagation(), v();
746
747
  })
747
748
  }, se(o.code), 1)
748
749
  ]),
749
- t[3] || (t[3] = b("div", { class: "flex items-center my-4" }, [
750
- b("div", { class: "flex-grow border-t border-gray-300" }),
751
- b("span", { class: "px-4 text-gray-500 text-sm font-medium" }, "OR"),
752
- b("div", { class: "flex-grow border-t border-gray-300" })
750
+ t[3] || (t[3] = S("div", { class: "flex items-center my-4" }, [
751
+ S("div", { class: "flex-grow border-t border-gray-300" }),
752
+ S("span", { class: "px-4 text-gray-500 text-sm font-medium" }, "OR"),
753
+ S("div", { class: "flex-grow border-t border-gray-300" })
753
754
  ], -1)),
754
- b("div", Ue, [
755
+ S("div", Qe, [
755
756
  t[2] || (t[2] = te(" Scan the binding code below on your device to link it with this terminal and apply the configuration. ", -1)),
756
- b("div", Qe, [
757
- _(Oe, { value: r.value }, null, 8, ["value"])
757
+ S("div", Ve, [
758
+ N(xe, { value: r.value }, null, 8, ["value"])
758
759
  ])
759
760
  ])
760
761
  ], 64));
761
762
  }
762
- }), Ke = /* @__PURE__ */ L({
763
+ }), He = /* @__PURE__ */ D({
763
764
  __name: "ID",
764
765
  props: {
765
766
  row: {},
@@ -767,7 +768,7 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
767
768
  },
768
769
  setup(o) {
769
770
  const f = o, d = J();
770
- function i() {
771
+ function s() {
771
772
  return f.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
772
773
  }
773
774
  function v() {
@@ -778,47 +779,47 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
778
779
  }
779
780
  f.data;
780
781
  }
781
- return (u, r) => {
782
- const e = N("FmBadge");
782
+ return (l, r) => {
783
+ const e = F("FmBadge");
783
784
  return I(), X("div", {
784
785
  onClick: r[0] || (r[0] = (t) => {
785
786
  t.stopPropagation(), v();
786
787
  })
787
788
  }, [
788
- _(e, {
789
+ N(e, {
789
790
  inline: "",
790
- class: ye(i())
791
+ class: Ce(s())
791
792
  }, {
792
793
  default: Z(() => [
793
- b("div", null, se(o.data), 1)
794
+ S("div", null, se(o.data), 1)
794
795
  ]),
795
796
  _: 1
796
797
  }, 8, ["class"])
797
798
  ]);
798
799
  };
799
800
  }
800
- }), He = { class: "flex" }, $e = /* @__PURE__ */ L({
801
+ }), $e = { class: "flex" }, Ge = /* @__PURE__ */ D({
801
802
  __name: "Actions",
802
803
  props: {
803
804
  data: {}
804
805
  },
805
806
  emits: ["link", "unlink", "edit", "delete"],
806
807
  setup(o, { emit: f }) {
807
- const d = o, i = f;
808
+ const d = o, s = f;
808
809
  function v() {
809
- const u = Te([
810
+ const l = Te([
810
811
  {
811
812
  type: "span",
812
813
  queryKey: "terminal.id",
813
814
  queryValue: d.data._id
814
815
  }
815
816
  ]);
816
- window.open(u, "_blank");
817
+ window.open(l, "_blank");
817
818
  }
818
- return (u, r) => {
819
- const e = N("FmButton");
820
- return I(), X("div", He, [
821
- _(e, {
819
+ return (l, r) => {
820
+ const e = F("FmButton");
821
+ return I(), X("div", $e, [
822
+ N(e, {
822
823
  variant: "plain",
823
824
  "prepend-icon": "history",
824
825
  onClick: r[0] || (r[0] = (t) => {
@@ -830,7 +831,7 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
830
831
  variant: "plain",
831
832
  "prepend-icon": "link",
832
833
  onClick: r[1] || (r[1] = (t) => {
833
- t.stopPropagation(), i("link");
834
+ t.stopPropagation(), s("link");
834
835
  })
835
836
  })) : $("", !0),
836
837
  o.data.deviceType === "TERMINAL" && o.data.deviceId ? (I(), U(e, {
@@ -838,27 +839,27 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
838
839
  variant: "plain",
839
840
  "prepend-icon": "link_off",
840
841
  onClick: r[2] || (r[2] = (t) => {
841
- t.stopPropagation(), i("unlink");
842
+ t.stopPropagation(), s("unlink");
842
843
  })
843
844
  })) : $("", !0),
844
- _(e, {
845
+ N(e, {
845
846
  variant: "plain",
846
847
  "prepend-icon": "edit",
847
848
  onClick: r[3] || (r[3] = (t) => {
848
- t.stopPropagation(), i("edit");
849
+ t.stopPropagation(), s("edit");
849
850
  })
850
851
  }),
851
- _(e, {
852
+ N(e, {
852
853
  variant: "plain",
853
854
  "prepend-icon": "delete",
854
855
  onClick: r[4] || (r[4] = (t) => {
855
- t.stopPropagation(), i("delete");
856
+ t.stopPropagation(), s("delete");
856
857
  })
857
858
  })
858
859
  ]);
859
860
  };
860
861
  }
861
- }), Ge = /* @__PURE__ */ L({
862
+ }), Ye = /* @__PURE__ */ D({
862
863
  __name: "TerminalDialog",
863
864
  props: {
864
865
  terminal: {
@@ -866,43 +867,41 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
866
867
  }
867
868
  },
868
869
  setup(o) {
869
- var n, a, s;
870
- const f = o, d = ue(), i = Pe(), v = x(), u = x((n = f.terminal) == null ? void 0 : n.name), r = x((a = f.terminal) == null ? void 0 : a.referenceId), e = x(((s = f.terminal) == null ? void 0 : s.status) === "Active"), t = D(() => d.restaurants.value.map((l) => ({
871
- label: l.profile.name,
872
- value: l._id
873
- })));
874
- return (l, h) => {
875
- const C = N("FmSelect"), c = N("FmTextField"), m = N("FmSwitch"), p = N("FmButton"), w = N("FmForm");
876
- return I(), U(w, {
877
- ref: v.value,
870
+ var e, t, a;
871
+ const f = o, d = be(), s = x(), v = x((e = f.terminal) == null ? void 0 : e.name), l = x(((t = f.terminal) == null ? void 0 : t.referenceId) ?? ""), r = x(((a = f.terminal) == null ? void 0 : a.status) === "Active");
872
+ return (n, i) => {
873
+ const u = F("FmTextField"), g = F("FmSwitch"), C = F("FmButton"), c = F("FmForm");
874
+ return I(), U(c, {
875
+ ref: s.value,
878
876
  class: "flex flex-col gap-16 mb-6",
879
- onValidationSuccess: h[3] || (h[3] = () => {
880
- T(i).emitData({ name: u.value, referenceId: r.value, status: e.value ? "Active" : "Inactive" }), T(i).emitAction("primary");
877
+ onValidationSuccess: i[3] || (i[3] = () => {
878
+ T(d).emitData({ name: v.value, referenceId: l.value, status: r.value ? "Active" : "Inactive" }), T(d).emitAction("primary");
881
879
  })
882
880
  }, {
883
881
  default: Z(() => [
884
- f.terminal ? $("", !0) : (I(), U(C, {
882
+ f.terminal ? $("", !0) : (I(), U(Ie, {
885
883
  key: 0,
886
- modelValue: r.value,
887
- "onUpdate:modelValue": h[0] || (h[0] = (y) => r.value = y),
884
+ modelValue: l.value,
885
+ "onUpdate:modelValue": i[0] || (i[0] = (h) => l.value = h),
888
886
  label: "Restaurant",
889
- "helper-text": "If you can't find the restaurant please change the business to the restaurant's business.",
890
- items: t.value,
891
- rules: T(ne)(T(ae).string())
892
- }, null, 8, ["modelValue", "items", "rules"])),
893
- _(c, {
894
- modelValue: u.value,
895
- "onUpdate:modelValue": h[1] || (h[1] = (y) => u.value = y),
887
+ "label-mark": "required",
888
+ placeholder: "Select restaurant",
889
+ "search-placeholder": "Search restaurants",
890
+ rules: T(ae)(T(ne).string().min(1, "Restaurant is required"))
891
+ }, null, 8, ["modelValue", "rules"])),
892
+ N(u, {
893
+ modelValue: v.value,
894
+ "onUpdate:modelValue": i[1] || (i[1] = (h) => v.value = h),
896
895
  label: "Terminal Name",
897
- rules: T(ne)(T(ae).string())
896
+ rules: T(ae)(T(ne).string())
898
897
  }, null, 8, ["modelValue", "rules"]),
899
- f.terminal ? (I(), U(m, {
898
+ f.terminal ? (I(), U(g, {
900
899
  key: 1,
901
- modelValue: e.value,
902
- "onUpdate:modelValue": h[2] || (h[2] = (y) => e.value = y),
900
+ modelValue: r.value,
901
+ "onUpdate:modelValue": i[2] || (i[2] = (h) => r.value = h),
903
902
  label: "Status"
904
903
  }, null, 8, ["modelValue"])) : $("", !0),
905
- _(p, {
904
+ N(C, {
906
905
  type: "submit",
907
906
  label: "Create"
908
907
  })
@@ -911,13 +910,13 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
911
910
  }, 512);
912
911
  };
913
912
  }
914
- }), Ye = { class: "flex justify-between mb-6 items-center" }, qe = { class: "flex space-x-4" }, We = { class: "flex space-x-4" }, ct = /* @__PURE__ */ L({
913
+ }), qe = { class: "flex justify-between mb-6 items-center" }, We = { class: "flex space-x-4" }, Xe = { class: "flex space-x-4" }, vt = /* @__PURE__ */ D({
915
914
  __name: "Terminal",
916
915
  props: {
917
916
  type: {}
918
917
  },
919
918
  setup(o) {
920
- const f = o, d = x(), { searchKey: i, deviceType: v } = Me({
919
+ const f = o, d = x(), { searchKey: s, deviceType: v } = Re({
921
920
  searchKey: "",
922
921
  deviceType: void 0
923
922
  });
@@ -925,9 +924,9 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
925
924
  var c;
926
925
  return (c = d.value) == null ? void 0 : c.reset();
927
926
  });
928
- let u;
929
- re(i, async () => {
930
- u && clearTimeout(u), u = setTimeout(
927
+ let l;
928
+ re(s, async () => {
929
+ l && clearTimeout(l), l = setTimeout(
931
930
  () => {
932
931
  var c;
933
932
  return (c = d.value) == null ? void 0 : c.reset();
@@ -935,16 +934,16 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
935
934
  700
936
935
  );
937
936
  });
938
- const r = Ie(), e = Ae(), t = J();
939
- async function n(c) {
937
+ const r = Ne(), e = Pe(), t = J();
938
+ async function a(c) {
940
939
  oe(
941
940
  e,
942
941
  "Terminal Unbind",
943
942
  "Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
944
943
  async () => {
945
- var m;
944
+ var h;
946
945
  try {
947
- await K.unbind(c), (m = d.value) == null || m.reset(), t.open({
946
+ await K.unbind(c), (h = d.value) == null || h.reset(), t.open({
948
947
  type: "success",
949
948
  message: "Terminal unbind successfully"
950
949
  });
@@ -958,28 +957,28 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
958
957
  }
959
958
  );
960
959
  }
961
- async function a(c) {
962
- const m = await K.getBindCode(c);
960
+ async function n(c) {
961
+ const h = await K.getBindCode(c);
963
962
  e.open({
964
963
  title: "Terminal Binding",
965
964
  closeButton: !0,
966
965
  overlay: !0,
967
- contentComponent: Ve,
968
- contentComponentProps: { code: m }
966
+ contentComponent: Ke,
967
+ contentComponentProps: { code: h }
969
968
  });
970
969
  }
971
- async function s(c) {
970
+ async function i(c) {
972
971
  e.open({
973
972
  title: c ? "Update Terminal" : "Create New Terminal",
974
973
  closeButton: !0,
975
974
  overlay: !0,
976
- contentComponent: Ge,
975
+ contentComponent: Ye,
977
976
  contentComponentProps: { terminal: c }
978
- }).onPrimary(async (m) => {
977
+ }).onPrimary(async (h) => {
979
978
  var p;
980
979
  e.close();
981
980
  try {
982
- await (c ? K.updateById(c._id, { ...m, ecrs: c.ecrs ?? [], gateways: c.gateways ?? [] }) : K.create(m)), (p = d.value) == null || p.reset(), t.open({
981
+ await (c ? K.updateById(c._id, { ...h, ecrs: c.ecrs ?? [], gateways: c.gateways ?? [] }) : K.create(h)), (p = d.value) == null || p.reset(), t.open({
983
982
  type: "success",
984
983
  message: c ? "Terminal udpated successfully" : "Terminal created successfully."
985
984
  });
@@ -992,15 +991,15 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
992
991
  }
993
992
  });
994
993
  }
995
- async function l(c) {
994
+ async function u(c) {
996
995
  oe(
997
996
  e,
998
997
  "Delete Terminal",
999
998
  "Are you sure to delete terminal? This action cannot be revert and device will be logged out!",
1000
999
  async () => {
1001
- var m;
1000
+ var h;
1002
1001
  try {
1003
- await K.delete(c), (m = d.value) == null || m.reset(), t.open({
1002
+ await K.delete(c), (h = d.value) == null || h.reset(), t.open({
1004
1003
  type: "success",
1005
1004
  message: "Terminal delete successfully"
1006
1005
  });
@@ -1014,17 +1013,17 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
1014
1013
  }
1015
1014
  );
1016
1015
  }
1017
- const h = function(c) {
1016
+ const g = function(c) {
1018
1017
  var p, w;
1019
- let m = c.name;
1020
- return c.deviceType === "POS" && ((p = c.name) != null && p.includes("@")) && (m = c.restaurant.profile.name), c.deviceType === "KIOSK" && ((w = c.name) != null && w.includes("-")) && (m = c.restaurant.profile.name), {
1018
+ let h = c.name;
1019
+ return c.deviceType === "POS" && ((p = c.name) != null && p.includes("@")) && (h = c.restaurant.profile.name), c.deviceType === "KIOSK" && ((w = c.name) != null && w.includes("-")) && (h = c.restaurant.profile.name), {
1021
1020
  id: c._id,
1022
1021
  status: c.status,
1023
1022
  referenceId: c.referenceId,
1024
- name: m,
1023
+ name: h,
1025
1024
  deviceId: c.deviceId,
1026
1025
  deviceType: c.deviceType,
1027
- updatedAt: Re(c.updatedAt).format("YYYY-MM-DD HH:mm:ss"),
1026
+ updatedAt: Ee(c.updatedAt).format("YYYY-MM-DD HH:mm:ss"),
1028
1027
  posVersion: c.restaurant.posVersion,
1029
1028
  gateways: c.gateways,
1030
1029
  ecrs: c.ecrs
@@ -1036,7 +1035,7 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
1036
1035
  meta: {
1037
1036
  textAlign: "right"
1038
1037
  },
1039
- cell: ({ cell: c, row: m }) => E(Ke, { row: m, data: c.getValue() })
1038
+ cell: ({ cell: c, row: h }) => E(He, { row: h, data: c.getValue() })
1040
1039
  },
1041
1040
  {
1042
1041
  accessorKey: "name",
@@ -1074,50 +1073,50 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
1074
1073
  },
1075
1074
  cell: ({ row: c }) => {
1076
1075
  var p;
1077
- const m = (p = d.value) == null ? void 0 : p.pageData().at(c.index);
1078
- return E($e, {
1079
- data: m,
1080
- onLink: () => a(m._id),
1081
- onUnlink: () => n(m._id),
1082
- onEdit: () => s(m),
1083
- onDelete: () => l(m._id)
1076
+ const h = (p = d.value) == null ? void 0 : p.pageData().at(c.index);
1077
+ return E(Ge, {
1078
+ data: h,
1079
+ onLink: () => n(h._id),
1080
+ onUnlink: () => a(h._id),
1081
+ onEdit: () => i(h),
1082
+ onDelete: () => u(h._id)
1084
1083
  });
1085
1084
  }
1086
1085
  }
1087
1086
  ];
1088
- return (c, m) => {
1089
- const p = N("FmSearch"), w = N("FmButton");
1087
+ return (c, h) => {
1088
+ const p = F("FmSearch"), w = F("FmButton");
1090
1089
  return I(), U(Se, {
1091
1090
  title: f.type,
1092
1091
  loading: !1
1093
1092
  }, {
1094
1093
  default: Z(() => [
1095
- b("div", Ye, [
1096
- b("div", qe, [
1097
- _(p, {
1098
- "model-value": T(i),
1099
- "onUpdate:modelValue": m[0] || (m[0] = (y) => we(i) ? i.value = y : null),
1094
+ S("div", qe, [
1095
+ S("div", We, [
1096
+ N(p, {
1097
+ "model-value": T(s),
1098
+ "onUpdate:modelValue": h[0] || (h[0] = (y) => ye(s) ? s.value = y : null),
1100
1099
  class: "mr-8",
1101
1100
  label: "Search",
1102
1101
  placeholder: "Search ..."
1103
1102
  }, null, 8, ["model-value"])
1104
1103
  ]),
1105
- b("div", We, [
1104
+ S("div", Xe, [
1106
1105
  f.type === "TERMINAL" ? (I(), U(w, {
1107
1106
  key: 0,
1108
1107
  label: "Create",
1109
1108
  icon: "add",
1110
- onClick: m[1] || (m[1] = () => s())
1109
+ onClick: h[1] || (h[1] = () => i())
1111
1110
  })) : $("", !0)
1112
1111
  ])
1113
1112
  ]),
1114
- _(be, {
1113
+ N(Me, {
1115
1114
  ref_key: "controller",
1116
1115
  ref: d,
1117
1116
  "column-defs": C,
1118
- "rows-defs": h,
1119
- paginate: (y, g) => T(K).read({ searchKey: T(i), deviceType: f.type, limit: y, cursor: g }),
1120
- onRowClick: m[2] || (m[2] = (y) => T(r).push({
1117
+ "rows-defs": g,
1118
+ paginate: (y, m) => T(K).read({ searchKey: T(s), deviceType: f.type, limit: y, cursor: m }),
1119
+ onRowClick: h[2] || (h[2] = (y) => T(r).push({
1121
1120
  name: `mf-payment-admin.${f.type.toLowerCase()}-setting`,
1122
1121
  params: {
1123
1122
  terminalId: y._id
@@ -1131,5 +1130,5 @@ const xe = { class: "t-caption" }, Ue = { class: "t-caption" }, Qe = { class: "m
1131
1130
  }
1132
1131
  });
1133
1132
  export {
1134
- ct as default
1133
+ vt as default
1135
1134
  };