@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.60

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 (118) hide show
  1. package/dist/Analytic-CXegtSEd.js +427 -0
  2. package/dist/{App-C2616cfr.js → App-m9A9s3wd.js} +445 -420
  3. package/dist/AuditLogs-CpUOkyXq.js +1886 -0
  4. package/dist/Bin-m6mPl3FE.js +166 -0
  5. package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DNjHnlPp.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-cjdNZLkE.js} +6 -8
  7. package/dist/Card-CAvS5aaN.js +896 -0
  8. package/dist/Collections-3C9I2byH.js +459 -0
  9. package/dist/{Credit-CPcLgnsq.js → Credit-DcAmLeMb.js} +36 -34
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-wGFMCV-y.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CIEn1N24.js} +6 -6
  14. package/dist/{Experience-BoBikt-x.js → Experience-GF9yOrlE.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/{Game-DR8PyYZa.js → Game-CzBn_Li3.js} +39 -37
  17. package/dist/Index-Bhmkdb4n.js +259 -0
  18. package/dist/Marketing-DlbcOoiN.js +20071 -0
  19. package/dist/Member-CdXG5uEN.js +317 -0
  20. package/dist/MemberList-xIOXAHJf.js +1598 -0
  21. package/dist/MemberTransactions-CsW9vso0.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-jtjk9NjI.js} +83 -71
  23. package/dist/{Mission-CMpvz9zN.js → Mission-2UjKrmGe.js} +101 -87
  24. package/dist/Overview-ClittdS6.js +1078 -0
  25. package/dist/{Point-DkZn6p9s.js → Point-BON4g7zE.js} +55 -53
  26. package/dist/{Promotion-B7YzwPc_.js → Promotion-qUEZmmm8.js} +65 -57
  27. package/dist/Queue-DA4glGdE.js +244 -0
  28. package/dist/Record-EUAnp1--.js +340 -0
  29. package/dist/Reward-ChbsdQuW.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CUFw56sf.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BKesht7Y.js +1637 -0
  32. package/dist/Segment-DbwFx6vD.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-lwpYOWMR.js +181 -0
  34. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbuOPEGY.js +147 -0
  35. package/dist/Setting-FMTftvlU.js +1931 -0
  36. package/dist/Store-BkUwiBUq.js +1751 -0
  37. package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-Z8uhK0v1.js} +33 -32
  38. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DwFYJ1Iz.js +943 -0
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D6mrJp05.js} +1 -1
  40. package/dist/{Tier-CW-46oJS.js → Tier-COCmcJJF.js} +327 -318
  41. package/dist/{Title-CE9rWVdi.js → Title-7qCjbur9.js} +199 -184
  42. package/dist/{Transaction-B21RrC4M.js → Transaction-9FS_K2hv.js} +2 -2
  43. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Fx-J2gcK.js +130 -0
  44. package/dist/Voucher-Dx70JAgw.js +354 -0
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CECJsKRJ.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bne_nxYS.js} +1 -1
  47. package/dist/{app-CjhXHUQv.js → app-CWKpKW78.js} +1 -1
  48. package/dist/app-q6W6-faT.js +7059 -0
  49. package/dist/app.js +1 -1
  50. package/dist/{business-aHhRUXc0.js → business-D5AQBRGS.js} +1 -1
  51. package/dist/campaign-BGiM8ccX.js +1810 -0
  52. package/dist/{campaign-DH9NUNf_.js → campaign-v8MAkDo-.js} +2 -2
  53. package/dist/campaign.enum-Dro6UEcE.js +20 -0
  54. package/dist/campaign.fn-DsJUr-gE.js +758 -0
  55. package/dist/collectible.enum-BH9pX7PE.js +19 -0
  56. package/dist/{collection.fn-CYlsA-kW.js → collection.fn-CHiRShK_.js} +2 -2
  57. package/dist/dto-CeX9egUp.js +214 -0
  58. package/dist/{effect-LSc9YanX.js → effect-DtJQE1cD.js} +9 -9
  59. package/dist/email-addresses-DKOsgzML.js +705 -0
  60. package/dist/{export-Cf0-C5Ly.js → export-Daiv_zH9.js} +5 -5
  61. package/dist/{helper-CiZpeMCM.js → helper-B5Emawnj.js} +1 -1
  62. package/dist/index-9WBy0L7U.js +54 -0
  63. package/dist/{index-D6cEOHP4.js → index-BSHuLDD0.js} +1501 -1480
  64. package/dist/{index-BVb5-Ht8.js → index-CUl_8M_c.js} +259 -173
  65. package/dist/{index-gxwjKu3-.js → index-CgCcvX_L.js} +2212 -871
  66. package/dist/index-CsaQJMAR.js +66 -0
  67. package/dist/{index-D_83JP2i.js → index-DrWrGAHJ.js} +48 -4
  68. package/dist/index-DteeKoFo.js +115 -0
  69. package/dist/{index-DW3PRjPL.js → index-Dw2RtHKR.js} +1 -1
  70. package/dist/{index-kPhrD63q.js → index-ICbXrXiP.js} +1 -1
  71. package/dist/index-Xwc07I54.js +29000 -0
  72. package/dist/{index-DtsDOuDx.js → index-ZBSI6ViG.js} +24 -21
  73. package/dist/index-g9NNHS8s.js +32 -0
  74. package/dist/index-p6F08hhh.js +44 -0
  75. package/dist/index-vh86FiIQ.js +10 -0
  76. package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-B-SDA6Y2.js} +121 -121
  77. package/dist/loading-CDbkBsRr.js +71 -0
  78. package/dist/{membership-Dw1ylJ9Y.js → membership-B8uwuntJ.js} +54 -46
  79. package/dist/money-DRKB3Rpe.js +15 -0
  80. package/dist/number-DtyC1DJU.js +12 -0
  81. package/dist/objectid-wGrq9P1h.js +145 -0
  82. package/dist/{loading-7yq1tinq.js → plugins-DKNh-lBz.js} +3871 -3943
  83. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  84. package/dist/reward-C2jv5dmJ.js +36 -0
  85. package/dist/{rule-C0Q_SHow.js → rule-C5AMTchR.js} +180 -177
  86. package/dist/{rule-builder-iu17XIof.js → rule-builder-DLOGHT1l.js} +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/{template-CyOanTMu.js → template-C-fz1DXI.js} +5 -5
  89. package/dist/trigger-DTErX60D.js +144 -0
  90. package/dist/user-CVRoQGCF.js +54 -0
  91. package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-CxMxiW_u.js} +366 -366
  92. package/dist/{xlsx-BYO_bB9J.js → xlsx-CARvMJN_.js} +1 -1
  93. package/package.json +10 -6
  94. package/dist/Analytic-muDf0oMG.js +0 -622
  95. package/dist/Card-bhLoK0ZV.js +0 -825
  96. package/dist/Collections-DjtsAiol.js +0 -453
  97. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
  98. package/dist/Marketing-Dny2nMUl.js +0 -316
  99. package/dist/Member-CP_smyk8.js +0 -69
  100. package/dist/MemberList-CR3eYI9p.js +0 -1733
  101. package/dist/MemberTransactions-RTx_lKFb.js +0 -38
  102. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
  103. package/dist/Segment-Bb4gHt5V.js +0 -437
  104. package/dist/Setting-Xj0AVzh3.js +0 -1901
  105. package/dist/Store-BWRHQ6Ie.js +0 -1511
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
  107. package/dist/Voucher-KK9fBI0u.js +0 -490
  108. package/dist/app-Dvf_JNMf.js +0 -5764
  109. package/dist/dto-DArfyZAI.js +0 -2770
  110. package/dist/index-Bi_LGEtY.js +0 -99
  111. package/dist/index-CiQDG7Cm.js +0 -762
  112. package/dist/index-CuvNtC_M.js +0 -61
  113. package/dist/index-DQfjSSMF.js +0 -206
  114. package/dist/index-DcxssxPi.js +0 -29193
  115. package/dist/index-DqJVH2kv.js +0 -298
  116. package/dist/money-CPd0XTNv.js +0 -15
  117. package/dist/number-BgXY4un8.js +0 -12
  118. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,1901 +0,0 @@
1
- import { defineComponent as He, ref as H, computed as se, onMounted as Ke, resolveComponent as R, openBlock as x, createBlock as be, withCtx as W, createElementVNode as b, createVNode as S, unref as c, isRef as Oe, createElementBlock as G, Fragment as me, toDisplayString as F, createTextVNode as Q, renderList as Re, createCommentVNode as De } from "vue";
2
- import { h as dt } from "./moment-BWErdI6_.js";
3
- import { Z as ke } from "./zod-Bg2FbC-D.js";
4
- import { useDialog as Ye } from "@feedmepos/ui-library";
5
- import { a as je, u as ft, p as mt, f as K } from "./loading-7yq1tinq.js";
6
- import { u as gt } from "./app-wDQR6dpb.js";
7
- import { u as ve, l as Je } from "./business-aHhRUXc0.js";
8
- import { u as qe } from "./membership-Dw1ylJ9Y.js";
9
- import { m as ht, l as pt } from "./index-CiQDG7Cm.js";
10
- import { _ as Ve } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
11
- import { _ as yt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js";
12
- import { _ as wt } from "./MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js";
13
- import { u as bt } from "./vue-i18n-B0fLJH7a.js";
14
- import { m as vt } from "./index-D_83JP2i.js";
15
- import { o as Ct } from "./objectId-dwaoBfJX.js";
16
- import { a as Et } from "./object-qECH92oz.js";
17
- var ee = {}, Bt = function() {
18
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
19
- }, Ge = {}, U = {};
20
- let _e;
21
- const At = [
22
- 0,
23
- // Not used
24
- 26,
25
- 44,
26
- 70,
27
- 100,
28
- 134,
29
- 172,
30
- 196,
31
- 242,
32
- 292,
33
- 346,
34
- 404,
35
- 466,
36
- 532,
37
- 581,
38
- 655,
39
- 733,
40
- 815,
41
- 901,
42
- 991,
43
- 1085,
44
- 1156,
45
- 1258,
46
- 1364,
47
- 1474,
48
- 1588,
49
- 1706,
50
- 1828,
51
- 1921,
52
- 2051,
53
- 2185,
54
- 2323,
55
- 2465,
56
- 2611,
57
- 2761,
58
- 2876,
59
- 3034,
60
- 3196,
61
- 3362,
62
- 3532,
63
- 3706
64
- ];
65
- U.getSymbolSize = function(e) {
66
- if (!e) throw new Error('"version" cannot be null or undefined');
67
- if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
68
- return e * 4 + 17;
69
- };
70
- U.getSymbolTotalCodewords = function(e) {
71
- return At[e];
72
- };
73
- U.getBCHDigit = function(t) {
74
- let e = 0;
75
- for (; t !== 0; )
76
- e++, t >>>= 1;
77
- return e;
78
- };
79
- U.setToSJISFunction = function(e) {
80
- if (typeof e != "function")
81
- throw new Error('"toSJISFunc" is not a valid function.');
82
- _e = e;
83
- };
84
- U.isKanjiModeEnabled = function() {
85
- return typeof _e < "u";
86
- };
87
- U.toSJIS = function(e) {
88
- return _e(e);
89
- };
90
- var ue = {};
91
- (function(t) {
92
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
93
- function e(i) {
94
- if (typeof i != "string")
95
- throw new Error("Param is not a string");
96
- switch (i.toLowerCase()) {
97
- case "l":
98
- case "low":
99
- return t.L;
100
- case "m":
101
- case "medium":
102
- return t.M;
103
- case "q":
104
- case "quartile":
105
- return t.Q;
106
- case "h":
107
- case "high":
108
- return t.H;
109
- default:
110
- throw new Error("Unknown EC Level: " + i);
111
- }
112
- }
113
- t.isValid = function(r) {
114
- return r && typeof r.bit < "u" && r.bit >= 0 && r.bit < 4;
115
- }, t.from = function(r, o) {
116
- if (t.isValid(r))
117
- return r;
118
- try {
119
- return e(r);
120
- } catch {
121
- return o;
122
- }
123
- };
124
- })(ue);
125
- function Qe() {
126
- this.buffer = [], this.length = 0;
127
- }
128
- Qe.prototype = {
129
- get: function(t) {
130
- const e = Math.floor(t / 8);
131
- return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
132
- },
133
- put: function(t, e) {
134
- for (let i = 0; i < e; i++)
135
- this.putBit((t >>> e - i - 1 & 1) === 1);
136
- },
137
- getLengthInBits: function() {
138
- return this.length;
139
- },
140
- putBit: function(t) {
141
- const e = Math.floor(this.length / 8);
142
- this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
143
- }
144
- };
145
- var _t = Qe;
146
- function te(t) {
147
- if (!t || t < 1)
148
- throw new Error("BitMatrix size must be defined and greater than 0");
149
- this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
150
- }
151
- te.prototype.set = function(t, e, i, r) {
152
- const o = t * this.size + e;
153
- this.data[o] = i, r && (this.reservedBit[o] = !0);
154
- };
155
- te.prototype.get = function(t, e) {
156
- return this.data[t * this.size + e];
157
- };
158
- te.prototype.xor = function(t, e, i) {
159
- this.data[t * this.size + e] ^= i;
160
- };
161
- te.prototype.isReserved = function(t, e) {
162
- return this.reservedBit[t * this.size + e];
163
- };
164
- var Mt = te, We = {};
165
- (function(t) {
166
- const e = U.getSymbolSize;
167
- t.getRowColCoords = function(r) {
168
- if (r === 1) return [];
169
- const o = Math.floor(r / 7) + 2, n = e(r), l = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, s = [n - 7];
170
- for (let a = 1; a < o - 1; a++)
171
- s[a] = s[a - 1] - l;
172
- return s.push(6), s.reverse();
173
- }, t.getPositions = function(r) {
174
- const o = [], n = t.getRowColCoords(r), l = n.length;
175
- for (let s = 0; s < l; s++)
176
- for (let a = 0; a < l; a++)
177
- s === 0 && a === 0 || // top-left
178
- s === 0 && a === l - 1 || // bottom-left
179
- s === l - 1 && a === 0 || o.push([n[s], n[a]]);
180
- return o;
181
- };
182
- })(We);
183
- var Xe = {};
184
- const St = U.getSymbolSize, xe = 7;
185
- Xe.getPositions = function(e) {
186
- const i = St(e);
187
- return [
188
- // top-left
189
- [0, 0],
190
- // top-right
191
- [i - xe, 0],
192
- // bottom-left
193
- [0, i - xe]
194
- ];
195
- };
196
- var Ze = {};
197
- (function(t) {
198
- t.Patterns = {
199
- PATTERN000: 0,
200
- PATTERN001: 1,
201
- PATTERN010: 2,
202
- PATTERN011: 3,
203
- PATTERN100: 4,
204
- PATTERN101: 5,
205
- PATTERN110: 6,
206
- PATTERN111: 7
207
- };
208
- const e = {
209
- N1: 3,
210
- N2: 3,
211
- N3: 40,
212
- N4: 10
213
- };
214
- t.isValid = function(o) {
215
- return o != null && o !== "" && !isNaN(o) && o >= 0 && o <= 7;
216
- }, t.from = function(o) {
217
- return t.isValid(o) ? parseInt(o, 10) : void 0;
218
- }, t.getPenaltyN1 = function(o) {
219
- const n = o.size;
220
- let l = 0, s = 0, a = 0, m = null, g = null;
221
- for (let B = 0; B < n; B++) {
222
- s = a = 0, m = g = null;
223
- for (let h = 0; h < n; h++) {
224
- let d = o.get(B, h);
225
- d === m ? s++ : (s >= 5 && (l += e.N1 + (s - 5)), m = d, s = 1), d = o.get(h, B), d === g ? a++ : (a >= 5 && (l += e.N1 + (a - 5)), g = d, a = 1);
226
- }
227
- s >= 5 && (l += e.N1 + (s - 5)), a >= 5 && (l += e.N1 + (a - 5));
228
- }
229
- return l;
230
- }, t.getPenaltyN2 = function(o) {
231
- const n = o.size;
232
- let l = 0;
233
- for (let s = 0; s < n - 1; s++)
234
- for (let a = 0; a < n - 1; a++) {
235
- const m = o.get(s, a) + o.get(s, a + 1) + o.get(s + 1, a) + o.get(s + 1, a + 1);
236
- (m === 4 || m === 0) && l++;
237
- }
238
- return l * e.N2;
239
- }, t.getPenaltyN3 = function(o) {
240
- const n = o.size;
241
- let l = 0, s = 0, a = 0;
242
- for (let m = 0; m < n; m++) {
243
- s = a = 0;
244
- for (let g = 0; g < n; g++)
245
- s = s << 1 & 2047 | o.get(m, g), g >= 10 && (s === 1488 || s === 93) && l++, a = a << 1 & 2047 | o.get(g, m), g >= 10 && (a === 1488 || a === 93) && l++;
246
- }
247
- return l * e.N3;
248
- }, t.getPenaltyN4 = function(o) {
249
- let n = 0;
250
- const l = o.data.length;
251
- for (let a = 0; a < l; a++) n += o.data[a];
252
- return Math.abs(Math.ceil(n * 100 / l / 5) - 10) * e.N4;
253
- };
254
- function i(r, o, n) {
255
- switch (r) {
256
- case t.Patterns.PATTERN000:
257
- return (o + n) % 2 === 0;
258
- case t.Patterns.PATTERN001:
259
- return o % 2 === 0;
260
- case t.Patterns.PATTERN010:
261
- return n % 3 === 0;
262
- case t.Patterns.PATTERN011:
263
- return (o + n) % 3 === 0;
264
- case t.Patterns.PATTERN100:
265
- return (Math.floor(o / 2) + Math.floor(n / 3)) % 2 === 0;
266
- case t.Patterns.PATTERN101:
267
- return o * n % 2 + o * n % 3 === 0;
268
- case t.Patterns.PATTERN110:
269
- return (o * n % 2 + o * n % 3) % 2 === 0;
270
- case t.Patterns.PATTERN111:
271
- return (o * n % 3 + (o + n) % 2) % 2 === 0;
272
- default:
273
- throw new Error("bad maskPattern:" + r);
274
- }
275
- }
276
- t.applyMask = function(o, n) {
277
- const l = n.size;
278
- for (let s = 0; s < l; s++)
279
- for (let a = 0; a < l; a++)
280
- n.isReserved(a, s) || n.xor(a, s, i(o, a, s));
281
- }, t.getBestMask = function(o, n) {
282
- const l = Object.keys(t.Patterns).length;
283
- let s = 0, a = 1 / 0;
284
- for (let m = 0; m < l; m++) {
285
- n(m), t.applyMask(m, o);
286
- const g = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
287
- t.applyMask(m, o), g < a && (a = g, s = m);
288
- }
289
- return s;
290
- };
291
- })(Ze);
292
- var ce = {};
293
- const z = ue, re = [
294
- // L M Q H
295
- 1,
296
- 1,
297
- 1,
298
- 1,
299
- 1,
300
- 1,
301
- 1,
302
- 1,
303
- 1,
304
- 1,
305
- 2,
306
- 2,
307
- 1,
308
- 2,
309
- 2,
310
- 4,
311
- 1,
312
- 2,
313
- 4,
314
- 4,
315
- 2,
316
- 4,
317
- 4,
318
- 4,
319
- 2,
320
- 4,
321
- 6,
322
- 5,
323
- 2,
324
- 4,
325
- 6,
326
- 6,
327
- 2,
328
- 5,
329
- 8,
330
- 8,
331
- 4,
332
- 5,
333
- 8,
334
- 8,
335
- 4,
336
- 5,
337
- 8,
338
- 11,
339
- 4,
340
- 8,
341
- 10,
342
- 11,
343
- 4,
344
- 9,
345
- 12,
346
- 16,
347
- 4,
348
- 9,
349
- 16,
350
- 16,
351
- 6,
352
- 10,
353
- 12,
354
- 18,
355
- 6,
356
- 10,
357
- 17,
358
- 16,
359
- 6,
360
- 11,
361
- 16,
362
- 19,
363
- 6,
364
- 13,
365
- 18,
366
- 21,
367
- 7,
368
- 14,
369
- 21,
370
- 25,
371
- 8,
372
- 16,
373
- 20,
374
- 25,
375
- 8,
376
- 17,
377
- 23,
378
- 25,
379
- 9,
380
- 17,
381
- 23,
382
- 34,
383
- 9,
384
- 18,
385
- 25,
386
- 30,
387
- 10,
388
- 20,
389
- 27,
390
- 32,
391
- 12,
392
- 21,
393
- 29,
394
- 35,
395
- 12,
396
- 23,
397
- 34,
398
- 37,
399
- 12,
400
- 25,
401
- 34,
402
- 40,
403
- 13,
404
- 26,
405
- 35,
406
- 42,
407
- 14,
408
- 28,
409
- 38,
410
- 45,
411
- 15,
412
- 29,
413
- 40,
414
- 48,
415
- 16,
416
- 31,
417
- 43,
418
- 51,
419
- 17,
420
- 33,
421
- 45,
422
- 54,
423
- 18,
424
- 35,
425
- 48,
426
- 57,
427
- 19,
428
- 37,
429
- 51,
430
- 60,
431
- 19,
432
- 38,
433
- 53,
434
- 63,
435
- 20,
436
- 40,
437
- 56,
438
- 66,
439
- 21,
440
- 43,
441
- 59,
442
- 70,
443
- 22,
444
- 45,
445
- 62,
446
- 74,
447
- 24,
448
- 47,
449
- 65,
450
- 77,
451
- 25,
452
- 49,
453
- 68,
454
- 81
455
- ], ie = [
456
- // L M Q H
457
- 7,
458
- 10,
459
- 13,
460
- 17,
461
- 10,
462
- 16,
463
- 22,
464
- 28,
465
- 15,
466
- 26,
467
- 36,
468
- 44,
469
- 20,
470
- 36,
471
- 52,
472
- 64,
473
- 26,
474
- 48,
475
- 72,
476
- 88,
477
- 36,
478
- 64,
479
- 96,
480
- 112,
481
- 40,
482
- 72,
483
- 108,
484
- 130,
485
- 48,
486
- 88,
487
- 132,
488
- 156,
489
- 60,
490
- 110,
491
- 160,
492
- 192,
493
- 72,
494
- 130,
495
- 192,
496
- 224,
497
- 80,
498
- 150,
499
- 224,
500
- 264,
501
- 96,
502
- 176,
503
- 260,
504
- 308,
505
- 104,
506
- 198,
507
- 288,
508
- 352,
509
- 120,
510
- 216,
511
- 320,
512
- 384,
513
- 132,
514
- 240,
515
- 360,
516
- 432,
517
- 144,
518
- 280,
519
- 408,
520
- 480,
521
- 168,
522
- 308,
523
- 448,
524
- 532,
525
- 180,
526
- 338,
527
- 504,
528
- 588,
529
- 196,
530
- 364,
531
- 546,
532
- 650,
533
- 224,
534
- 416,
535
- 600,
536
- 700,
537
- 224,
538
- 442,
539
- 644,
540
- 750,
541
- 252,
542
- 476,
543
- 690,
544
- 816,
545
- 270,
546
- 504,
547
- 750,
548
- 900,
549
- 300,
550
- 560,
551
- 810,
552
- 960,
553
- 312,
554
- 588,
555
- 870,
556
- 1050,
557
- 336,
558
- 644,
559
- 952,
560
- 1110,
561
- 360,
562
- 700,
563
- 1020,
564
- 1200,
565
- 390,
566
- 728,
567
- 1050,
568
- 1260,
569
- 420,
570
- 784,
571
- 1140,
572
- 1350,
573
- 450,
574
- 812,
575
- 1200,
576
- 1440,
577
- 480,
578
- 868,
579
- 1290,
580
- 1530,
581
- 510,
582
- 924,
583
- 1350,
584
- 1620,
585
- 540,
586
- 980,
587
- 1440,
588
- 1710,
589
- 570,
590
- 1036,
591
- 1530,
592
- 1800,
593
- 570,
594
- 1064,
595
- 1590,
596
- 1890,
597
- 600,
598
- 1120,
599
- 1680,
600
- 1980,
601
- 630,
602
- 1204,
603
- 1770,
604
- 2100,
605
- 660,
606
- 1260,
607
- 1860,
608
- 2220,
609
- 720,
610
- 1316,
611
- 1950,
612
- 2310,
613
- 750,
614
- 1372,
615
- 2040,
616
- 2430
617
- ];
618
- ce.getBlocksCount = function(e, i) {
619
- switch (i) {
620
- case z.L:
621
- return re[(e - 1) * 4 + 0];
622
- case z.M:
623
- return re[(e - 1) * 4 + 1];
624
- case z.Q:
625
- return re[(e - 1) * 4 + 2];
626
- case z.H:
627
- return re[(e - 1) * 4 + 3];
628
- default:
629
- return;
630
- }
631
- };
632
- ce.getTotalCodewordsCount = function(e, i) {
633
- switch (i) {
634
- case z.L:
635
- return ie[(e - 1) * 4 + 0];
636
- case z.M:
637
- return ie[(e - 1) * 4 + 1];
638
- case z.Q:
639
- return ie[(e - 1) * 4 + 2];
640
- case z.H:
641
- return ie[(e - 1) * 4 + 3];
642
- default:
643
- return;
644
- }
645
- };
646
- var et = {}, de = {};
647
- const X = new Uint8Array(512), le = new Uint8Array(256);
648
- (function() {
649
- let e = 1;
650
- for (let i = 0; i < 255; i++)
651
- X[i] = e, le[e] = i, e <<= 1, e & 256 && (e ^= 285);
652
- for (let i = 255; i < 512; i++)
653
- X[i] = X[i - 255];
654
- })();
655
- de.log = function(e) {
656
- if (e < 1) throw new Error("log(" + e + ")");
657
- return le[e];
658
- };
659
- de.exp = function(e) {
660
- return X[e];
661
- };
662
- de.mul = function(e, i) {
663
- return e === 0 || i === 0 ? 0 : X[le[e] + le[i]];
664
- };
665
- (function(t) {
666
- const e = de;
667
- t.mul = function(r, o) {
668
- const n = new Uint8Array(r.length + o.length - 1);
669
- for (let l = 0; l < r.length; l++)
670
- for (let s = 0; s < o.length; s++)
671
- n[l + s] ^= e.mul(r[l], o[s]);
672
- return n;
673
- }, t.mod = function(r, o) {
674
- let n = new Uint8Array(r);
675
- for (; n.length - o.length >= 0; ) {
676
- const l = n[0];
677
- for (let a = 0; a < o.length; a++)
678
- n[a] ^= e.mul(o[a], l);
679
- let s = 0;
680
- for (; s < n.length && n[s] === 0; ) s++;
681
- n = n.slice(s);
682
- }
683
- return n;
684
- }, t.generateECPolynomial = function(r) {
685
- let o = new Uint8Array([1]);
686
- for (let n = 0; n < r; n++)
687
- o = t.mul(o, new Uint8Array([1, e.exp(n)]));
688
- return o;
689
- };
690
- })(et);
691
- const tt = et;
692
- function Me(t) {
693
- this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
694
- }
695
- Me.prototype.initialize = function(e) {
696
- this.degree = e, this.genPoly = tt.generateECPolynomial(this.degree);
697
- };
698
- Me.prototype.encode = function(e) {
699
- if (!this.genPoly)
700
- throw new Error("Encoder not initialized");
701
- const i = new Uint8Array(e.length + this.degree);
702
- i.set(e);
703
- const r = tt.mod(i, this.genPoly), o = this.degree - r.length;
704
- if (o > 0) {
705
- const n = new Uint8Array(this.degree);
706
- return n.set(r, o), n;
707
- }
708
- return r;
709
- };
710
- var It = Me, nt = {}, $ = {}, Se = {};
711
- Se.isValid = function(e) {
712
- return !isNaN(e) && e >= 1 && e <= 40;
713
- };
714
- var D = {};
715
- const ot = "[0-9]+", Tt = "[A-Z $%*+\\-./:]+";
716
- let Z = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
717
- Z = Z.replace(/u/g, "\\u");
718
- const Pt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Z + `)(?:.|[\r
719
- ]))+`;
720
- D.KANJI = new RegExp(Z, "g");
721
- D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
722
- D.BYTE = new RegExp(Pt, "g");
723
- D.NUMERIC = new RegExp(ot, "g");
724
- D.ALPHANUMERIC = new RegExp(Tt, "g");
725
- const Nt = new RegExp("^" + Z + "$"), Ut = new RegExp("^" + ot + "$"), Lt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
726
- D.testKanji = function(e) {
727
- return Nt.test(e);
728
- };
729
- D.testNumeric = function(e) {
730
- return Ut.test(e);
731
- };
732
- D.testAlphanumeric = function(e) {
733
- return Lt.test(e);
734
- };
735
- (function(t) {
736
- const e = Se, i = D;
737
- t.NUMERIC = {
738
- id: "Numeric",
739
- bit: 1,
740
- ccBits: [10, 12, 14]
741
- }, t.ALPHANUMERIC = {
742
- id: "Alphanumeric",
743
- bit: 2,
744
- ccBits: [9, 11, 13]
745
- }, t.BYTE = {
746
- id: "Byte",
747
- bit: 4,
748
- ccBits: [8, 16, 16]
749
- }, t.KANJI = {
750
- id: "Kanji",
751
- bit: 8,
752
- ccBits: [8, 10, 12]
753
- }, t.MIXED = {
754
- bit: -1
755
- }, t.getCharCountIndicator = function(n, l) {
756
- if (!n.ccBits) throw new Error("Invalid mode: " + n);
757
- if (!e.isValid(l))
758
- throw new Error("Invalid version: " + l);
759
- return l >= 1 && l < 10 ? n.ccBits[0] : l < 27 ? n.ccBits[1] : n.ccBits[2];
760
- }, t.getBestModeForData = function(n) {
761
- return i.testNumeric(n) ? t.NUMERIC : i.testAlphanumeric(n) ? t.ALPHANUMERIC : i.testKanji(n) ? t.KANJI : t.BYTE;
762
- }, t.toString = function(n) {
763
- if (n && n.id) return n.id;
764
- throw new Error("Invalid mode");
765
- }, t.isValid = function(n) {
766
- return n && n.bit && n.ccBits;
767
- };
768
- function r(o) {
769
- if (typeof o != "string")
770
- throw new Error("Param is not a string");
771
- switch (o.toLowerCase()) {
772
- case "numeric":
773
- return t.NUMERIC;
774
- case "alphanumeric":
775
- return t.ALPHANUMERIC;
776
- case "kanji":
777
- return t.KANJI;
778
- case "byte":
779
- return t.BYTE;
780
- default:
781
- throw new Error("Unknown mode: " + o);
782
- }
783
- }
784
- t.from = function(n, l) {
785
- if (t.isValid(n))
786
- return n;
787
- try {
788
- return r(n);
789
- } catch {
790
- return l;
791
- }
792
- };
793
- })($);
794
- (function(t) {
795
- const e = U, i = ce, r = ue, o = $, n = Se, l = 7973, s = e.getBCHDigit(l);
796
- function a(h, d, w) {
797
- for (let C = 1; C <= 40; C++)
798
- if (d <= t.getCapacity(C, w, h))
799
- return C;
800
- }
801
- function m(h, d) {
802
- return o.getCharCountIndicator(h, d) + 4;
803
- }
804
- function g(h, d) {
805
- let w = 0;
806
- return h.forEach(function(C) {
807
- const A = m(C.mode, d);
808
- w += A + C.getBitsLength();
809
- }), w;
810
- }
811
- function B(h, d) {
812
- for (let w = 1; w <= 40; w++)
813
- if (g(h, w) <= t.getCapacity(w, d, o.MIXED))
814
- return w;
815
- }
816
- t.from = function(d, w) {
817
- return n.isValid(d) ? parseInt(d, 10) : w;
818
- }, t.getCapacity = function(d, w, C) {
819
- if (!n.isValid(d))
820
- throw new Error("Invalid QR Code version");
821
- typeof C > "u" && (C = o.BYTE);
822
- const A = e.getSymbolTotalCodewords(d), p = i.getTotalCodewordsCount(d, w), v = (A - p) * 8;
823
- if (C === o.MIXED) return v;
824
- const y = v - m(C, d);
825
- switch (C) {
826
- case o.NUMERIC:
827
- return Math.floor(y / 10 * 3);
828
- case o.ALPHANUMERIC:
829
- return Math.floor(y / 11 * 2);
830
- case o.KANJI:
831
- return Math.floor(y / 13);
832
- case o.BYTE:
833
- default:
834
- return Math.floor(y / 8);
835
- }
836
- }, t.getBestVersionForData = function(d, w) {
837
- let C;
838
- const A = r.from(w, r.M);
839
- if (Array.isArray(d)) {
840
- if (d.length > 1)
841
- return B(d, A);
842
- if (d.length === 0)
843
- return 1;
844
- C = d[0];
845
- } else
846
- C = d;
847
- return a(C.mode, C.getLength(), A);
848
- }, t.getEncodedBits = function(d) {
849
- if (!n.isValid(d) || d < 7)
850
- throw new Error("Invalid QR Code version");
851
- let w = d << 12;
852
- for (; e.getBCHDigit(w) - s >= 0; )
853
- w ^= l << e.getBCHDigit(w) - s;
854
- return d << 12 | w;
855
- };
856
- })(nt);
857
- var rt = {};
858
- const Ce = U, it = 1335, Ft = 21522, ze = Ce.getBCHDigit(it);
859
- rt.getEncodedBits = function(e, i) {
860
- const r = e.bit << 3 | i;
861
- let o = r << 10;
862
- for (; Ce.getBCHDigit(o) - ze >= 0; )
863
- o ^= it << Ce.getBCHDigit(o) - ze;
864
- return (r << 10 | o) ^ Ft;
865
- };
866
- var st = {};
867
- const Rt = $;
868
- function O(t) {
869
- this.mode = Rt.NUMERIC, this.data = t.toString();
870
- }
871
- O.getBitsLength = function(e) {
872
- return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
873
- };
874
- O.prototype.getLength = function() {
875
- return this.data.length;
876
- };
877
- O.prototype.getBitsLength = function() {
878
- return O.getBitsLength(this.data.length);
879
- };
880
- O.prototype.write = function(e) {
881
- let i, r, o;
882
- for (i = 0; i + 3 <= this.data.length; i += 3)
883
- r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
884
- const n = this.data.length - i;
885
- n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
886
- };
887
- var Dt = O;
888
- const kt = $, ge = [
889
- "0",
890
- "1",
891
- "2",
892
- "3",
893
- "4",
894
- "5",
895
- "6",
896
- "7",
897
- "8",
898
- "9",
899
- "A",
900
- "B",
901
- "C",
902
- "D",
903
- "E",
904
- "F",
905
- "G",
906
- "H",
907
- "I",
908
- "J",
909
- "K",
910
- "L",
911
- "M",
912
- "N",
913
- "O",
914
- "P",
915
- "Q",
916
- "R",
917
- "S",
918
- "T",
919
- "U",
920
- "V",
921
- "W",
922
- "X",
923
- "Y",
924
- "Z",
925
- " ",
926
- "$",
927
- "%",
928
- "*",
929
- "+",
930
- "-",
931
- ".",
932
- "/",
933
- ":"
934
- ];
935
- function Y(t) {
936
- this.mode = kt.ALPHANUMERIC, this.data = t;
937
- }
938
- Y.getBitsLength = function(e) {
939
- return 11 * Math.floor(e / 2) + 6 * (e % 2);
940
- };
941
- Y.prototype.getLength = function() {
942
- return this.data.length;
943
- };
944
- Y.prototype.getBitsLength = function() {
945
- return Y.getBitsLength(this.data.length);
946
- };
947
- Y.prototype.write = function(e) {
948
- let i;
949
- for (i = 0; i + 2 <= this.data.length; i += 2) {
950
- let r = ge.indexOf(this.data[i]) * 45;
951
- r += ge.indexOf(this.data[i + 1]), e.put(r, 11);
952
- }
953
- this.data.length % 2 && e.put(ge.indexOf(this.data[i]), 6);
954
- };
955
- var Vt = Y, xt = function(e) {
956
- for (var i = [], r = e.length, o = 0; o < r; o++) {
957
- var n = e.charCodeAt(o);
958
- if (n >= 55296 && n <= 56319 && r > o + 1) {
959
- var l = e.charCodeAt(o + 1);
960
- l >= 56320 && l <= 57343 && (n = (n - 55296) * 1024 + l - 56320 + 65536, o += 1);
961
- }
962
- if (n < 128) {
963
- i.push(n);
964
- continue;
965
- }
966
- if (n < 2048) {
967
- i.push(n >> 6 | 192), i.push(n & 63 | 128);
968
- continue;
969
- }
970
- if (n < 55296 || n >= 57344 && n < 65536) {
971
- i.push(n >> 12 | 224), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
972
- continue;
973
- }
974
- if (n >= 65536 && n <= 1114111) {
975
- i.push(n >> 18 | 240), i.push(n >> 12 & 63 | 128), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
976
- continue;
977
- }
978
- i.push(239, 191, 189);
979
- }
980
- return new Uint8Array(i).buffer;
981
- };
982
- const zt = xt, $t = $;
983
- function j(t) {
984
- this.mode = $t.BYTE, typeof t == "string" && (t = zt(t)), this.data = new Uint8Array(t);
985
- }
986
- j.getBitsLength = function(e) {
987
- return e * 8;
988
- };
989
- j.prototype.getLength = function() {
990
- return this.data.length;
991
- };
992
- j.prototype.getBitsLength = function() {
993
- return j.getBitsLength(this.data.length);
994
- };
995
- j.prototype.write = function(t) {
996
- for (let e = 0, i = this.data.length; e < i; e++)
997
- t.put(this.data[e], 8);
998
- };
999
- var Ht = j;
1000
- const Kt = $, Ot = U;
1001
- function J(t) {
1002
- this.mode = Kt.KANJI, this.data = t;
1003
- }
1004
- J.getBitsLength = function(e) {
1005
- return e * 13;
1006
- };
1007
- J.prototype.getLength = function() {
1008
- return this.data.length;
1009
- };
1010
- J.prototype.getBitsLength = function() {
1011
- return J.getBitsLength(this.data.length);
1012
- };
1013
- J.prototype.write = function(t) {
1014
- let e;
1015
- for (e = 0; e < this.data.length; e++) {
1016
- let i = Ot.toSJIS(this.data[e]);
1017
- if (i >= 33088 && i <= 40956)
1018
- i -= 33088;
1019
- else if (i >= 57408 && i <= 60351)
1020
- i -= 49472;
1021
- else
1022
- throw new Error(
1023
- "Invalid SJIS character: " + this.data[e] + `
1024
- Make sure your charset is UTF-8`
1025
- );
1026
- i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
1027
- }
1028
- };
1029
- var Yt = J, lt = { exports: {} };
1030
- (function(t) {
1031
- var e = {
1032
- single_source_shortest_paths: function(i, r, o) {
1033
- var n = {}, l = {};
1034
- l[r] = 0;
1035
- var s = e.PriorityQueue.make();
1036
- s.push(r, 0);
1037
- for (var a, m, g, B, h, d, w, C, A; !s.empty(); ) {
1038
- a = s.pop(), m = a.value, B = a.cost, h = i[m] || {};
1039
- for (g in h)
1040
- h.hasOwnProperty(g) && (d = h[g], w = B + d, C = l[g], A = typeof l[g] > "u", (A || C > w) && (l[g] = w, s.push(g, w), n[g] = m));
1041
- }
1042
- if (typeof o < "u" && typeof l[o] > "u") {
1043
- var p = ["Could not find a path from ", r, " to ", o, "."].join("");
1044
- throw new Error(p);
1045
- }
1046
- return n;
1047
- },
1048
- extract_shortest_path_from_predecessor_list: function(i, r) {
1049
- for (var o = [], n = r; n; )
1050
- o.push(n), i[n], n = i[n];
1051
- return o.reverse(), o;
1052
- },
1053
- find_path: function(i, r, o) {
1054
- var n = e.single_source_shortest_paths(i, r, o);
1055
- return e.extract_shortest_path_from_predecessor_list(
1056
- n,
1057
- o
1058
- );
1059
- },
1060
- /**
1061
- * A very naive priority queue implementation.
1062
- */
1063
- PriorityQueue: {
1064
- make: function(i) {
1065
- var r = e.PriorityQueue, o = {}, n;
1066
- i = i || {};
1067
- for (n in r)
1068
- r.hasOwnProperty(n) && (o[n] = r[n]);
1069
- return o.queue = [], o.sorter = i.sorter || r.default_sorter, o;
1070
- },
1071
- default_sorter: function(i, r) {
1072
- return i.cost - r.cost;
1073
- },
1074
- /**
1075
- * Add a new item to the queue and ensure the highest priority element
1076
- * is at the front of the queue.
1077
- */
1078
- push: function(i, r) {
1079
- var o = { value: i, cost: r };
1080
- this.queue.push(o), this.queue.sort(this.sorter);
1081
- },
1082
- /**
1083
- * Return the highest priority element in the queue.
1084
- */
1085
- pop: function() {
1086
- return this.queue.shift();
1087
- },
1088
- empty: function() {
1089
- return this.queue.length === 0;
1090
- }
1091
- }
1092
- };
1093
- t.exports = e;
1094
- })(lt);
1095
- var jt = lt.exports;
1096
- (function(t) {
1097
- const e = $, i = Dt, r = Vt, o = Ht, n = Yt, l = D, s = U, a = jt;
1098
- function m(p) {
1099
- return unescape(encodeURIComponent(p)).length;
1100
- }
1101
- function g(p, v, y) {
1102
- const f = [];
1103
- let u;
1104
- for (; (u = p.exec(y)) !== null; )
1105
- f.push({
1106
- data: u[0],
1107
- index: u.index,
1108
- mode: v,
1109
- length: u[0].length
1110
- });
1111
- return f;
1112
- }
1113
- function B(p) {
1114
- const v = g(l.NUMERIC, e.NUMERIC, p), y = g(l.ALPHANUMERIC, e.ALPHANUMERIC, p);
1115
- let f, u;
1116
- return s.isKanjiModeEnabled() ? (f = g(l.BYTE, e.BYTE, p), u = g(l.KANJI, e.KANJI, p)) : (f = g(l.BYTE_KANJI, e.BYTE, p), u = []), v.concat(y, f, u).sort(function(M, I) {
1117
- return M.index - I.index;
1118
- }).map(function(M) {
1119
- return {
1120
- data: M.data,
1121
- mode: M.mode,
1122
- length: M.length
1123
- };
1124
- });
1125
- }
1126
- function h(p, v) {
1127
- switch (v) {
1128
- case e.NUMERIC:
1129
- return i.getBitsLength(p);
1130
- case e.ALPHANUMERIC:
1131
- return r.getBitsLength(p);
1132
- case e.KANJI:
1133
- return n.getBitsLength(p);
1134
- case e.BYTE:
1135
- return o.getBitsLength(p);
1136
- }
1137
- }
1138
- function d(p) {
1139
- return p.reduce(function(v, y) {
1140
- const f = v.length - 1 >= 0 ? v[v.length - 1] : null;
1141
- return f && f.mode === y.mode ? (v[v.length - 1].data += y.data, v) : (v.push(y), v);
1142
- }, []);
1143
- }
1144
- function w(p) {
1145
- const v = [];
1146
- for (let y = 0; y < p.length; y++) {
1147
- const f = p[y];
1148
- switch (f.mode) {
1149
- case e.NUMERIC:
1150
- v.push([
1151
- f,
1152
- { data: f.data, mode: e.ALPHANUMERIC, length: f.length },
1153
- { data: f.data, mode: e.BYTE, length: f.length }
1154
- ]);
1155
- break;
1156
- case e.ALPHANUMERIC:
1157
- v.push([
1158
- f,
1159
- { data: f.data, mode: e.BYTE, length: f.length }
1160
- ]);
1161
- break;
1162
- case e.KANJI:
1163
- v.push([
1164
- f,
1165
- { data: f.data, mode: e.BYTE, length: m(f.data) }
1166
- ]);
1167
- break;
1168
- case e.BYTE:
1169
- v.push([
1170
- { data: f.data, mode: e.BYTE, length: m(f.data) }
1171
- ]);
1172
- }
1173
- }
1174
- return v;
1175
- }
1176
- function C(p, v) {
1177
- const y = {}, f = { start: {} };
1178
- let u = ["start"];
1179
- for (let _ = 0; _ < p.length; _++) {
1180
- const M = p[_], I = [];
1181
- for (let N = 0; N < M.length; N++) {
1182
- const P = M[N], k = "" + _ + N;
1183
- I.push(k), y[k] = { node: P, lastCount: 0 }, f[k] = {};
1184
- for (let q = 0; q < u.length; q++) {
1185
- const L = u[q];
1186
- y[L] && y[L].node.mode === P.mode ? (f[L][k] = h(y[L].lastCount + P.length, P.mode) - h(y[L].lastCount, P.mode), y[L].lastCount += P.length) : (y[L] && (y[L].lastCount = P.length), f[L][k] = h(P.length, P.mode) + 4 + e.getCharCountIndicator(P.mode, v));
1187
- }
1188
- }
1189
- u = I;
1190
- }
1191
- for (let _ = 0; _ < u.length; _++)
1192
- f[u[_]].end = 0;
1193
- return { map: f, table: y };
1194
- }
1195
- function A(p, v) {
1196
- let y;
1197
- const f = e.getBestModeForData(p);
1198
- if (y = e.from(v, f), y !== e.BYTE && y.bit < f.bit)
1199
- throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(y) + `.
1200
- Suggested mode is: ` + e.toString(f));
1201
- switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
1202
- case e.NUMERIC:
1203
- return new i(p);
1204
- case e.ALPHANUMERIC:
1205
- return new r(p);
1206
- case e.KANJI:
1207
- return new n(p);
1208
- case e.BYTE:
1209
- return new o(p);
1210
- }
1211
- }
1212
- t.fromArray = function(v) {
1213
- return v.reduce(function(y, f) {
1214
- return typeof f == "string" ? y.push(A(f, null)) : f.data && y.push(A(f.data, f.mode)), y;
1215
- }, []);
1216
- }, t.fromString = function(v, y) {
1217
- const f = B(v, s.isKanjiModeEnabled()), u = w(f), _ = C(u, y), M = a.find_path(_.map, "start", "end"), I = [];
1218
- for (let N = 1; N < M.length - 1; N++)
1219
- I.push(_.table[M[N]].node);
1220
- return t.fromArray(d(I));
1221
- }, t.rawSplit = function(v) {
1222
- return t.fromArray(
1223
- B(v, s.isKanjiModeEnabled())
1224
- );
1225
- };
1226
- })(st);
1227
- const fe = U, he = ue, Jt = _t, qt = Mt, Gt = We, Qt = Xe, Ee = Ze, Be = ce, Wt = It, ae = nt, Xt = rt, Zt = $, pe = st;
1228
- function en(t, e) {
1229
- const i = t.size, r = Qt.getPositions(e);
1230
- for (let o = 0; o < r.length; o++) {
1231
- const n = r[o][0], l = r[o][1];
1232
- for (let s = -1; s <= 7; s++)
1233
- if (!(n + s <= -1 || i <= n + s))
1234
- for (let a = -1; a <= 7; a++)
1235
- l + a <= -1 || i <= l + a || (s >= 0 && s <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (s === 0 || s === 6) || s >= 2 && s <= 4 && a >= 2 && a <= 4 ? t.set(n + s, l + a, !0, !0) : t.set(n + s, l + a, !1, !0));
1236
- }
1237
- }
1238
- function tn(t) {
1239
- const e = t.size;
1240
- for (let i = 8; i < e - 8; i++) {
1241
- const r = i % 2 === 0;
1242
- t.set(i, 6, r, !0), t.set(6, i, r, !0);
1243
- }
1244
- }
1245
- function nn(t, e) {
1246
- const i = Gt.getPositions(e);
1247
- for (let r = 0; r < i.length; r++) {
1248
- const o = i[r][0], n = i[r][1];
1249
- for (let l = -2; l <= 2; l++)
1250
- for (let s = -2; s <= 2; s++)
1251
- l === -2 || l === 2 || s === -2 || s === 2 || l === 0 && s === 0 ? t.set(o + l, n + s, !0, !0) : t.set(o + l, n + s, !1, !0);
1252
- }
1253
- }
1254
- function on(t, e) {
1255
- const i = t.size, r = ae.getEncodedBits(e);
1256
- let o, n, l;
1257
- for (let s = 0; s < 18; s++)
1258
- o = Math.floor(s / 3), n = s % 3 + i - 8 - 3, l = (r >> s & 1) === 1, t.set(o, n, l, !0), t.set(n, o, l, !0);
1259
- }
1260
- function ye(t, e, i) {
1261
- const r = t.size, o = Xt.getEncodedBits(e, i);
1262
- let n, l;
1263
- for (n = 0; n < 15; n++)
1264
- l = (o >> n & 1) === 1, n < 6 ? t.set(n, 8, l, !0) : n < 8 ? t.set(n + 1, 8, l, !0) : t.set(r - 15 + n, 8, l, !0), n < 8 ? t.set(8, r - n - 1, l, !0) : n < 9 ? t.set(8, 15 - n - 1 + 1, l, !0) : t.set(8, 15 - n - 1, l, !0);
1265
- t.set(r - 8, 8, 1, !0);
1266
- }
1267
- function rn(t, e) {
1268
- const i = t.size;
1269
- let r = -1, o = i - 1, n = 7, l = 0;
1270
- for (let s = i - 1; s > 0; s -= 2)
1271
- for (s === 6 && s--; ; ) {
1272
- for (let a = 0; a < 2; a++)
1273
- if (!t.isReserved(o, s - a)) {
1274
- let m = !1;
1275
- l < e.length && (m = (e[l] >>> n & 1) === 1), t.set(o, s - a, m), n--, n === -1 && (l++, n = 7);
1276
- }
1277
- if (o += r, o < 0 || i <= o) {
1278
- o -= r, r = -r;
1279
- break;
1280
- }
1281
- }
1282
- }
1283
- function sn(t, e, i) {
1284
- const r = new Jt();
1285
- i.forEach(function(a) {
1286
- r.put(a.mode.bit, 4), r.put(a.getLength(), Zt.getCharCountIndicator(a.mode, t)), a.write(r);
1287
- });
1288
- const o = fe.getSymbolTotalCodewords(t), n = Be.getTotalCodewordsCount(t, e), l = (o - n) * 8;
1289
- for (r.getLengthInBits() + 4 <= l && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
1290
- r.putBit(0);
1291
- const s = (l - r.getLengthInBits()) / 8;
1292
- for (let a = 0; a < s; a++)
1293
- r.put(a % 2 ? 17 : 236, 8);
1294
- return ln(r, t, e);
1295
- }
1296
- function ln(t, e, i) {
1297
- const r = fe.getSymbolTotalCodewords(e), o = Be.getTotalCodewordsCount(e, i), n = r - o, l = Be.getBlocksCount(e, i), s = r % l, a = l - s, m = Math.floor(r / l), g = Math.floor(n / l), B = g + 1, h = m - g, d = new Wt(h);
1298
- let w = 0;
1299
- const C = new Array(l), A = new Array(l);
1300
- let p = 0;
1301
- const v = new Uint8Array(t.buffer);
1302
- for (let M = 0; M < l; M++) {
1303
- const I = M < a ? g : B;
1304
- C[M] = v.slice(w, w + I), A[M] = d.encode(C[M]), w += I, p = Math.max(p, I);
1305
- }
1306
- const y = new Uint8Array(r);
1307
- let f = 0, u, _;
1308
- for (u = 0; u < p; u++)
1309
- for (_ = 0; _ < l; _++)
1310
- u < C[_].length && (y[f++] = C[_][u]);
1311
- for (u = 0; u < h; u++)
1312
- for (_ = 0; _ < l; _++)
1313
- y[f++] = A[_][u];
1314
- return y;
1315
- }
1316
- function an(t, e, i, r) {
1317
- let o;
1318
- if (Array.isArray(t))
1319
- o = pe.fromArray(t);
1320
- else if (typeof t == "string") {
1321
- let m = e;
1322
- if (!m) {
1323
- const g = pe.rawSplit(t);
1324
- m = ae.getBestVersionForData(g, i);
1325
- }
1326
- o = pe.fromString(t, m || 40);
1327
- } else
1328
- throw new Error("Invalid data");
1329
- const n = ae.getBestVersionForData(o, i);
1330
- if (!n)
1331
- throw new Error("The amount of data is too big to be stored in a QR Code");
1332
- if (!e)
1333
- e = n;
1334
- else if (e < n)
1335
- throw new Error(
1336
- `
1337
- The chosen QR Code version cannot contain this amount of data.
1338
- Minimum version required to store current data is: ` + n + `.
1339
- `
1340
- );
1341
- const l = sn(e, i, o), s = fe.getSymbolSize(e), a = new qt(s);
1342
- return en(a, e), tn(a), nn(a, e), ye(a, i, 0), e >= 7 && on(a, e), rn(a, l), isNaN(r) && (r = Ee.getBestMask(
1343
- a,
1344
- ye.bind(null, a, i)
1345
- )), Ee.applyMask(r, a), ye(a, i, r), {
1346
- modules: a,
1347
- version: e,
1348
- errorCorrectionLevel: i,
1349
- maskPattern: r,
1350
- segments: o
1351
- };
1352
- }
1353
- Ge.create = function(e, i) {
1354
- if (typeof e > "u" || e === "")
1355
- throw new Error("No input text");
1356
- let r = he.M, o, n;
1357
- return typeof i < "u" && (r = he.from(i.errorCorrectionLevel, he.M), o = ae.from(i.version), n = Ee.from(i.maskPattern), i.toSJISFunc && fe.setToSJISFunction(i.toSJISFunc)), an(e, o, r, n);
1358
- };
1359
- var at = {}, Ie = {};
1360
- (function(t) {
1361
- function e(i) {
1362
- if (typeof i == "number" && (i = i.toString()), typeof i != "string")
1363
- throw new Error("Color should be defined as hex string");
1364
- let r = i.slice().replace("#", "").split("");
1365
- if (r.length < 3 || r.length === 5 || r.length > 8)
1366
- throw new Error("Invalid hex color: " + i);
1367
- (r.length === 3 || r.length === 4) && (r = Array.prototype.concat.apply([], r.map(function(n) {
1368
- return [n, n];
1369
- }))), r.length === 6 && r.push("F", "F");
1370
- const o = parseInt(r.join(""), 16);
1371
- return {
1372
- r: o >> 24 & 255,
1373
- g: o >> 16 & 255,
1374
- b: o >> 8 & 255,
1375
- a: o & 255,
1376
- hex: "#" + r.slice(0, 6).join("")
1377
- };
1378
- }
1379
- t.getOptions = function(r) {
1380
- r || (r = {}), r.color || (r.color = {});
1381
- const o = typeof r.margin > "u" || r.margin === null || r.margin < 0 ? 4 : r.margin, n = r.width && r.width >= 21 ? r.width : void 0, l = r.scale || 4;
1382
- return {
1383
- width: n,
1384
- scale: n ? 4 : l,
1385
- margin: o,
1386
- color: {
1387
- dark: e(r.color.dark || "#000000ff"),
1388
- light: e(r.color.light || "#ffffffff")
1389
- },
1390
- type: r.type,
1391
- rendererOpts: r.rendererOpts || {}
1392
- };
1393
- }, t.getScale = function(r, o) {
1394
- return o.width && o.width >= r + o.margin * 2 ? o.width / (r + o.margin * 2) : o.scale;
1395
- }, t.getImageWidth = function(r, o) {
1396
- const n = t.getScale(r, o);
1397
- return Math.floor((r + o.margin * 2) * n);
1398
- }, t.qrToImageData = function(r, o, n) {
1399
- const l = o.modules.size, s = o.modules.data, a = t.getScale(l, n), m = Math.floor((l + n.margin * 2) * a), g = n.margin * a, B = [n.color.light, n.color.dark];
1400
- for (let h = 0; h < m; h++)
1401
- for (let d = 0; d < m; d++) {
1402
- let w = (h * m + d) * 4, C = n.color.light;
1403
- if (h >= g && d >= g && h < m - g && d < m - g) {
1404
- const A = Math.floor((h - g) / a), p = Math.floor((d - g) / a);
1405
- C = B[s[A * l + p] ? 1 : 0];
1406
- }
1407
- r[w++] = C.r, r[w++] = C.g, r[w++] = C.b, r[w] = C.a;
1408
- }
1409
- };
1410
- })(Ie);
1411
- (function(t) {
1412
- const e = Ie;
1413
- function i(o, n, l) {
1414
- o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = l, n.width = l, n.style.height = l + "px", n.style.width = l + "px";
1415
- }
1416
- function r() {
1417
- try {
1418
- return document.createElement("canvas");
1419
- } catch {
1420
- throw new Error("You need to specify a canvas element");
1421
- }
1422
- }
1423
- t.render = function(n, l, s) {
1424
- let a = s, m = l;
1425
- typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), l || (m = r()), a = e.getOptions(a);
1426
- const g = e.getImageWidth(n.modules.size, a), B = m.getContext("2d"), h = B.createImageData(g, g);
1427
- return e.qrToImageData(h.data, n, a), i(B, m, g), B.putImageData(h, 0, 0), m;
1428
- }, t.renderToDataURL = function(n, l, s) {
1429
- let a = s;
1430
- typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), a || (a = {});
1431
- const m = t.render(n, l, a), g = a.type || "image/png", B = a.rendererOpts || {};
1432
- return m.toDataURL(g, B.quality);
1433
- };
1434
- })(at);
1435
- var ut = {};
1436
- const un = Ie;
1437
- function $e(t, e) {
1438
- const i = t.a / 255, r = e + '="' + t.hex + '"';
1439
- return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
1440
- }
1441
- function we(t, e, i) {
1442
- let r = t + e;
1443
- return typeof i < "u" && (r += " " + i), r;
1444
- }
1445
- function cn(t, e, i) {
1446
- let r = "", o = 0, n = !1, l = 0;
1447
- for (let s = 0; s < t.length; s++) {
1448
- const a = Math.floor(s % e), m = Math.floor(s / e);
1449
- !a && !n && (n = !0), t[s] ? (l++, s > 0 && a > 0 && t[s - 1] || (r += n ? we("M", a + i, 0.5 + m + i) : we("m", o, 0), o = 0, n = !1), a + 1 < e && t[s + 1] || (r += we("h", l), l = 0)) : o++;
1450
- }
1451
- return r;
1452
- }
1453
- ut.render = function(e, i, r) {
1454
- const o = un.getOptions(i), n = e.modules.size, l = e.modules.data, s = n + o.margin * 2, a = o.color.light.a ? "<path " + $e(o.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", m = "<path " + $e(o.color.dark, "stroke") + ' d="' + cn(l, n, o.margin) + '"/>', g = 'viewBox="0 0 ' + s + " " + s + '"', h = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + g + ' shape-rendering="crispEdges">' + a + m + `</svg>
1455
- `;
1456
- return typeof r == "function" && r(null, h), h;
1457
- };
1458
- const dn = Bt, Ae = Ge, ct = at, fn = ut;
1459
- function Te(t, e, i, r, o) {
1460
- const n = [].slice.call(arguments, 1), l = n.length, s = typeof n[l - 1] == "function";
1461
- if (!s && !dn())
1462
- throw new Error("Callback required as last argument");
1463
- if (s) {
1464
- if (l < 2)
1465
- throw new Error("Too few arguments provided");
1466
- l === 2 ? (o = i, i = e, e = r = void 0) : l === 3 && (e.getContext && typeof o > "u" ? (o = r, r = void 0) : (o = r, r = i, i = e, e = void 0));
1467
- } else {
1468
- if (l < 1)
1469
- throw new Error("Too few arguments provided");
1470
- return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(a, m) {
1471
- try {
1472
- const g = Ae.create(i, r);
1473
- a(t(g, e, r));
1474
- } catch (g) {
1475
- m(g);
1476
- }
1477
- });
1478
- }
1479
- try {
1480
- const a = Ae.create(i, r);
1481
- o(null, t(a, e, r));
1482
- } catch (a) {
1483
- o(a);
1484
- }
1485
- }
1486
- ee.create = Ae.create;
1487
- ee.toCanvas = Te.bind(null, ct.render);
1488
- ee.toDataURL = Te.bind(null, ct.renderToDataURL);
1489
- ee.toString = Te.bind(null, function(t, e, i) {
1490
- return fn.render(t, i);
1491
- });
1492
- async function mn(t, e = 350) {
1493
- try {
1494
- return await ee.toDataURL(t, {
1495
- width: e,
1496
- margin: 0
1497
- });
1498
- } catch (i) {
1499
- console.error(i);
1500
- }
1501
- }
1502
- var gn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1503
- const hn = { class: "flex items-start" }, pn = { class: "flex flex-col gap-16 mt-16" }, yn = ["src"], wn = /* @__PURE__ */ He({
1504
- __name: "LinkDeviceDialog",
1505
- setup(t) {
1506
- const e = ve(), i = qe(), r = Ye(), o = H(), n = H(), l = gn.crmUrl, s = H(), a = se(() => i.membership), m = se(() => {
1507
- var h, d;
1508
- return `https://${(h = a.value) != null && h.url ? a.value.url : (d = a.value) == null ? void 0 : d.business}.${l}`;
1509
- });
1510
- async function g(h) {
1511
- const d = await Je.getOtp(h);
1512
- return `${m.value}?link-device=${d.otp}`;
1513
- }
1514
- async function B(h) {
1515
- const d = await g(h);
1516
- s.value = d, o.value = await mn(d);
1517
- }
1518
- return Ke(async () => {
1519
- if (await e.readLocations(), !e.locations.length) {
1520
- r.close();
1521
- return;
1522
- }
1523
- const h = e.locations[0]._id;
1524
- n.value = h, await B(h);
1525
- }), (h, d) => {
1526
- const w = R("FmIcon"), C = R("FmSelect"), A = R("FmButton"), p = R("FmCard");
1527
- return x(), be(p, { class: "p-24 max-w-[350px]" }, {
1528
- default: W(() => [
1529
- b("div", hn, [
1530
- d[3] || (d[3] = b("div", null, [
1531
- b("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1532
- b("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1533
- ], -1)),
1534
- S(w, {
1535
- name: "close",
1536
- onClick: d[0] || (d[0] = (v) => c(r).close()),
1537
- class: "cursor-pointer"
1538
- })
1539
- ]),
1540
- b("div", pn, [
1541
- S(C, {
1542
- modelValue: c(n),
1543
- "onUpdate:modelValue": [
1544
- d[1] || (d[1] = (v) => Oe(n) ? n.value = v : null),
1545
- B
1546
- ],
1547
- label: "Select Location",
1548
- items: c(e).locationItems.filter((v) => !!v.value)
1549
- }, null, 8, ["modelValue", "items"]),
1550
- b("img", {
1551
- src: c(o),
1552
- class: "aspect-square w-full"
1553
- }, null, 8, yn),
1554
- S(A, {
1555
- class: "mx-auto",
1556
- variant: "plain",
1557
- icon: "content_copy",
1558
- onClick: d[2] || (d[2] = (v) => c(je)(c(s)))
1559
- })
1560
- ])
1561
- ]),
1562
- _: 1
1563
- });
1564
- };
1565
- }
1566
- });
1567
- var bn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1568
- const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Cn = { class: "fm-typo-en-title-md-800" }, En = {
1569
- key: 0,
1570
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1571
- }, Bn = { class: "col-span-2 flex flex-col xs:col-span-3" }, An = { class: "fm-typo-en-title-sm-800" }, _n = { class: "space-y-24" }, Mn = { class: "space-y-8" }, Sn = { class: "fm-typo-en-title-sm-800" }, In = { class: "fm-typo-body-lg-400" }, Tn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Pn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Nn = { class: "space-y-8" }, Un = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Ln = { class: "space-y-8" }, Fn = { class: "space-y-8" }, Rn = { class: "space-y-8" }, Dn = { class: "space-y-8" }, kn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Vn = { class: "space-y-8" }, xn = { class: "flex justify-end pb-24" }, zn = { class: "col-span-1 space-y-8 xs:hidden" }, $n = { class: "fm-typo-en-body-lg-600" }, Hn = { class: "fm-typo-en-body-lg-600" }, Kn = { class: "fm-typo-en-body-lg-600" }, On = { class: "fm-typo-en-body-lg-600" }, lo = /* @__PURE__ */ He({
1572
- __name: "Setting",
1573
- setup(t) {
1574
- const e = gt(), i = ve(), r = qe(), { global: o, minor: n } = ft, l = Ye(), s = H(), a = H(!1), m = ht, g = [
1575
- (f) => !f || f.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1576
- (f) => !f || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(f) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
1577
- ], B = bn.appUrl, h = se(() => {
1578
- var f;
1579
- return `https://${(f = s.value) == null ? void 0 : f.business}.${B}`;
1580
- }), d = H(), w = H([]), C = se(() => {
1581
- var f, u;
1582
- return Math.min((((u = (f = s.value) == null ? void 0 : f.advertisements) == null ? void 0 : u.length) ?? 0) + 1, 5);
1583
- }), { t: A } = bt();
1584
- async function p() {
1585
- l.open({
1586
- title: "",
1587
- dialogComponent: wn,
1588
- closeButton: !1
1589
- });
1590
- }
1591
- async function v(f) {
1592
- await mt.remove(
1593
- "Are you sure you want to unlink this device?",
1594
- "Unlink device",
1595
- "Unlink"
1596
- ) && await n(
1597
- async () => {
1598
- await Je.unregisterDevice(f), await i.readLocationDevices();
1599
- },
1600
- {
1601
- message: "Unlinking device",
1602
- successMessage: "Unlinked device successfully"
1603
- }
1604
- );
1605
- }
1606
- async function y() {
1607
- await n(
1608
- async () => {
1609
- var _;
1610
- const f = Et(s.value);
1611
- f.welcomeMessage && !((_ = f.welcomeMessage) != null && _.content) && (f.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1612
- const u = pt.parse(f);
1613
- d.value === null && u.image ? await K.delete(K.coverImagePath()) : d.value && (u.image = await K.update(
1614
- K.coverImagePath(),
1615
- d.value
1616
- )), a.value ? u.advertisements = (await Promise.all(
1617
- new Array(C.value - 1).fill(null).map(async (M, I) => {
1618
- var P;
1619
- const N = w.value[I];
1620
- return N ? await K.update(
1621
- K.advertisementPath(I, N),
1622
- N
1623
- ) : (P = u.advertisements) == null ? void 0 : P[I];
1624
- })
1625
- )).filter((M) => M) : u.advertisements = [], await vt.update(u), await r.readMembership(), s.value = r.membership;
1626
- },
1627
- {
1628
- message: "Updating membership",
1629
- successMessage: "Membership updated successfully"
1630
- }
1631
- );
1632
- }
1633
- return Ke(async () => {
1634
- await o(async () => {
1635
- var f, u;
1636
- await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership, a.value = (((f = s.value.advertisements) == null ? void 0 : f.length) ?? 0) > 0, w.value = ((u = s.value.advertisements) == null ? void 0 : u.map(() => null)) ?? [];
1637
- });
1638
- }), (f, u) => {
1639
- var L, Pe, Ne, Ue, Le, Fe;
1640
- const _ = R("FmPageHead"), M = R("FmButton"), I = R("FmTextField"), N = R("FmCard"), P = R("FmPill"), k = R("FmSwitch"), q = R("FmMenuDivider");
1641
- return x(), G(me, null, [
1642
- S(_, {
1643
- title: c(A)("connect.setting.title"),
1644
- class: "xs:hidden"
1645
- }, null, 8, ["title"]),
1646
- b("div", vn, [
1647
- b("div", Cn, F(c(A)("connect.setting.basicInfo.title")), 1),
1648
- S(M, {
1649
- icon: "info",
1650
- variant: "tertiary"
1651
- })
1652
- ]),
1653
- c(s) ? (x(), G("div", En, [
1654
- b("div", Bn, [
1655
- b("div", An, F(c(A)("connect.setting.basicInfo.title")), 1),
1656
- b("div", _n, [
1657
- S(I, {
1658
- label: c(A)("connect.setting.basicInfo.membershipTitle"),
1659
- modelValue: c(s).name,
1660
- "onUpdate:modelValue": u[0] || (u[0] = (E) => c(s).name = E)
1661
- }, null, 8, ["label", "modelValue"]),
1662
- S(I, {
1663
- disabled: !0,
1664
- "model-value": c(s).business,
1665
- rules: g,
1666
- required: !0,
1667
- label: c(A)("connect.setting.basicInfo.memberAppUrl"),
1668
- "helper-text": c(h),
1669
- placeholder: c(s).business.toString(),
1670
- "onUpdate:modelValue": u[2] || (u[2] = (E) => c(s).url = E)
1671
- }, {
1672
- prepend: W(() => u[12] || (u[12] = [
1673
- Q(" https:// ")
1674
- ])),
1675
- append: W(() => [
1676
- Q(" ." + F(c(B)) + " ", 1),
1677
- S(M, {
1678
- icon: "content_copy",
1679
- variant: "tertiary",
1680
- onClick: u[1] || (u[1] = (E) => c(je)(c(h)))
1681
- })
1682
- ]),
1683
- _: 1
1684
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1685
- S(Ve, {
1686
- label: "Cover image",
1687
- class: "w-2/3 xs:w-full",
1688
- "image-fit": "cover",
1689
- "aspect-ratio": "3/1",
1690
- thumbnail: c(s).image || void 0,
1691
- "onUpdate:file": u[3] || (u[3] = async (E) => {
1692
- d.value = E, E || (c(s).image = null);
1693
- })
1694
- }, null, 8, ["thumbnail"]),
1695
- b("div", Mn, [
1696
- b("div", Sn, F(c(A)("connect.setting.counterApp.title")), 1),
1697
- S(M, {
1698
- variant: "plain",
1699
- icon: "link",
1700
- label: c(A)("connect.setting.counterApp.linkDevice"),
1701
- onClick: p
1702
- }, null, 8, ["label"]),
1703
- (x(!0), G(me, null, Re(c(i).locationDevices, (E, T) => (x(), be(N, {
1704
- key: T,
1705
- variant: "outlined",
1706
- class: "flex items-center justify-between px-16 py-12"
1707
- }, {
1708
- default: W(() => [
1709
- b("div", null, [
1710
- b("p", In, F(E.name || `Device ${E._id}`), 1),
1711
- b("p", Tn, " Activation date: " + F(c(dt)(c(Ct)(E._id.toString())).format(
1712
- "D MMM YYYY"
1713
- )), 1),
1714
- b("p", Pn, " Linked location: " + F(c(i).locations.find((V) => V._id == E.location).name), 1)
1715
- ]),
1716
- S(M, {
1717
- icon: "link_off",
1718
- variant: "tertiary",
1719
- onClick: (V) => v(E._id)
1720
- }, null, 8, ["onClick"])
1721
- ]),
1722
- _: 2
1723
- }, 1024))), 128))
1724
- ]),
1725
- b("div", Nn, [
1726
- b("div", Un, [
1727
- u[13] || (u[13] = Q(" Advertisement ")),
1728
- S(P, { variant: "premium" })
1729
- ]),
1730
- S(k, {
1731
- modelValue: c(a),
1732
- "onUpdate:modelValue": u[4] || (u[4] = (E) => Oe(a) ? a.value = E : null),
1733
- label: "Advertisement",
1734
- sublabel: "This will be show on FeedMe ordering app",
1735
- "label-placement": "right",
1736
- disabled: !c(i).isPremium,
1737
- value: ""
1738
- }, null, 8, ["modelValue", "disabled"]),
1739
- c(a) ? (x(), G("div", {
1740
- class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
1741
- key: c(C)
1742
- }, [
1743
- (x(!0), G(me, null, Re(c(C), (E, T) => {
1744
- var V, ne;
1745
- return x(), be(Ve, {
1746
- class: "w-[200px]",
1747
- "image-fit": "cover",
1748
- label: "",
1749
- "aspect-ratio": "2/3",
1750
- thumbnail: (ne = (V = c(s)) == null ? void 0 : V.advertisements) == null ? void 0 : ne[T],
1751
- accept: ".png, .jpg, .jpeg, .mp4, .gif",
1752
- "recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
1753
- file: c(w)[T] ?? void 0,
1754
- "onUpdate:file": (oe) => {
1755
- c(s).advertisements || (c(s).advertisements = []), oe ? (c(s).advertisements[T] = "", c(w)[T] = oe) : (c(s).advertisements.splice(T, 1), c(w).splice(T, 1));
1756
- }
1757
- }, null, 8, ["thumbnail", "file", "onUpdate:file"]);
1758
- }), 256))
1759
- ])) : De("", !0)
1760
- ]),
1761
- b("div", Ln, [
1762
- u[14] || (u[14] = b("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1763
- S(I, {
1764
- "model-value": ((L = c(s)) == null ? void 0 : L.brand) || "",
1765
- "max-length": 15,
1766
- label: "Brand Name",
1767
- "show-word-count": "",
1768
- "helper-text": `RM 0 ${((Pe = c(s)) == null ? void 0 : Pe.brand) || ""}: YOUR CUSTOMER MESSAGE`,
1769
- "onUpdate:modelValue": u[5] || (u[5] = (E) => c(s).brand = E)
1770
- }, null, 8, ["model-value", "helper-text"]),
1771
- S(wt, {
1772
- modelValue: c(s).welcomeMessage,
1773
- "onUpdate:modelValue": u[6] || (u[6] = (E) => c(s).welcomeMessage = E),
1774
- variables: [
1775
- "user.name",
1776
- "user.gender",
1777
- "user.birthday",
1778
- "user.phoneNumber",
1779
- "membership.url"
1780
- ],
1781
- placeholder: "Hi there, you have been invited to join membership"
1782
- }, null, 8, ["modelValue"])
1783
- ]),
1784
- b("div", Fn, [
1785
- u[15] || (u[15] = b("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1786
- S(I, {
1787
- "model-value": ((Ue = (Ne = c(s)) == null ? void 0 : Ne.email) == null ? void 0 : Ue.from) || null,
1788
- label: "From Address",
1789
- "helper-text": "Will be shown as email of the sender (requires DNS configuration, Contact us to verify your domain.)",
1790
- placeholder: "noreply@feedme.cc",
1791
- disabled: "",
1792
- "onUpdate:modelValue": u[7] || (u[7] = (E) => {
1793
- var T;
1794
- (T = c(s)) != null && T.email || (c(s).email = {
1795
- from: E
1796
- }), c(s).email.from = E || null;
1797
- }),
1798
- rules: [c(ke).ruleAtPath(c(m), "email.from")]
1799
- }, null, 8, ["model-value", "rules"]),
1800
- S(I, {
1801
- "model-value": ((Fe = (Le = c(s)) == null ? void 0 : Le.email) == null ? void 0 : Fe.name) || null,
1802
- label: "Sender name",
1803
- "helper-text": "Will be shown as the name of the sender",
1804
- "onUpdate:modelValue": u[8] || (u[8] = (E) => {
1805
- var T;
1806
- (T = c(s)) != null && T.email || (c(s).email = {
1807
- name: E
1808
- }), c(s).email.name = E || null;
1809
- }),
1810
- rules: [c(ke).ruleAtPath(c(m), "email.name")]
1811
- }, null, 8, ["model-value", "rules"])
1812
- ]),
1813
- b("div", Rn, [
1814
- u[16] || (u[16] = b("div", { class: "fm-typo-en-title-sm-800" }, [
1815
- Q(" Free Credit as Discount "),
1816
- b("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
1817
- ], -1)),
1818
- S(k, {
1819
- "model-value": c(s).freeCreditAsDiscount ?? !1,
1820
- "onUpdate:modelValue": u[9] || (u[9] = (E) => c(s).freeCreditAsDiscount = E),
1821
- label: "Free Credit as Discount",
1822
- sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
1823
- "label-placement": "right",
1824
- value: ""
1825
- }, null, 8, ["model-value"])
1826
- ]),
1827
- b("div", Dn, [
1828
- b("div", kn, [
1829
- u[17] || (u[17] = Q(" Member Card ")),
1830
- S(P, { variant: "premium" })
1831
- ]),
1832
- S(k, {
1833
- "model-value": c(s).cardEnable ?? !1,
1834
- "onUpdate:modelValue": u[10] || (u[10] = (E) => c(s).cardEnable = E),
1835
- label: "",
1836
- sublabel: "Allow member to bind card via member app",
1837
- "label-placement": "right",
1838
- value: "",
1839
- disabled: !c(i).isPremium
1840
- }, null, 8, ["model-value", "disabled"])
1841
- ]),
1842
- b("div", Vn, [
1843
- u[18] || (u[18] = b("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
1844
- S(yt, {
1845
- label: "Select restaurant",
1846
- "model-value": c(s).targetLocation ?? null,
1847
- "onUpdate:modelValue": u[11] || (u[11] = (E) => c(s).targetLocation = E)
1848
- }, null, 8, ["model-value"])
1849
- ]),
1850
- b("div", xn, [
1851
- S(M, {
1852
- label: "Update",
1853
- type: "button",
1854
- onClick: y,
1855
- disabled: !!c(e).loadingQueue.length,
1856
- loading: !!c(e).loadingQueue.length
1857
- }, null, 8, ["disabled", "loading"])
1858
- ])
1859
- ])
1860
- ]),
1861
- b("div", zn, [
1862
- S(N, {
1863
- variant: "outlined",
1864
- class: "flex flex-col p-24 gap-8"
1865
- }, {
1866
- default: W(() => {
1867
- var E, T, V;
1868
- return [
1869
- u[23] || (u[23] = b("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
1870
- S(q, { class: "my-4" }),
1871
- b("div", null, [
1872
- u[19] || (u[19] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
1873
- b("div", $n, F(c(s).name), 1)
1874
- ]),
1875
- b("div", null, [
1876
- u[20] || (u[20] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
1877
- b("div", Hn, F((((E = c(s).advertisements) == null ? void 0 : E.length) ?? 0) || "No advertisments"), 1)
1878
- ]),
1879
- b("div", null, [
1880
- u[21] || (u[21] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
1881
- b("div", Kn, F(c(s).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
1882
- ]),
1883
- b("div", null, [
1884
- u[22] || (u[22] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
1885
- b("div", On, F(!c(s).targetLocation || c(s).targetLocation.length == c(ve)().locations.length ? "All locations" : (V = (T = c(s)) == null ? void 0 : T.targetLocation) == null ? void 0 : V.map(
1886
- (ne) => c(i).locations.find((oe) => oe._id == ne).name
1887
- ).join(", ")), 1)
1888
- ])
1889
- ];
1890
- }),
1891
- _: 1
1892
- })
1893
- ])
1894
- ])) : De("", !0)
1895
- ], 64);
1896
- };
1897
- }
1898
- });
1899
- export {
1900
- lo as default
1901
- };