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