@feedmepos/mf-connect 0.1.2-prod → 0.1.4-prod

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