@feedmepos/mf-connect 0.1.85-prod → 0.1.87-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 (96) hide show
  1. package/dist/{Analytic-BjCcva28.js → Analytic-B9s-dPCT.js} +11 -11
  2. package/dist/{App-CJl6tMfn.js → App-Bu9NaLJ4.js} +7 -7
  3. package/dist/{Bin-e4Vwyfbp.js → Bin-BUUuvk8j.js} +8 -8
  4. package/dist/{Broadcast-WWNRyELz.js → Broadcast-VvFRuN2K.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-J3EHIto7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CgA2btmM.js} +7 -6
  6. package/dist/{Card-Doc6LOzs.js → Card--OD7WD_W.js} +19 -19
  7. package/dist/{Collections-DfrqlwGy.js → Collections-DemrIeUs.js} +8 -8
  8. package/dist/{Credit-DfA3WdZT.js → Credit-PFNGAhPj.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cic4vFbP.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DyuJDS7x.js} +33 -33
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-COqzGZHo.js → EffectSheet.vue_vue_type_style_index_0_lang-BLjGHozS.js} +6 -6
  11. package/dist/{Experience-ByuixxAy.js → Experience-BCVsnWYw.js} +8 -8
  12. package/dist/{FileSaver.min-Cb2PeLDd.js → FileSaver.min-BMBGjHQ2.js} +1 -1
  13. package/dist/{Game-Co_u5JSG.js → Game-B3Gxv2v-.js} +9 -9
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Ciq01AFd.js → ImageInput.vue_vue_type_script_setup_true_lang-CyMgFI2D.js} +1 -1
  15. package/dist/{Index-BHT-38Ch.js → Index-R4XrhBHJ.js} +10 -10
  16. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-boR37brc.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DjpZnU4y.js} +1 -1
  17. package/dist/{MainLayout-ONCk7MJK.js → MainLayout-Cd8eCkPV.js} +1 -1
  18. package/dist/{Marketing-BYfDY-zv.js → Marketing-BzBEJgtQ.js} +6 -6
  19. package/dist/{Member-DPA-A6u2.js → Member-CTFEe38e.js} +14 -13
  20. package/dist/{MemberList-CcXEA6on.js → MemberList-oL4hRjbk.js} +27 -27
  21. package/dist/{MemberTransactions-CyTNBdt3.js → MemberTransactions-CUzzrl_F.js} +1 -1
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CiFkbATJ.js → MessageInput.vue_vue_type_script_setup_true_lang-D3X7vfMo.js} +4860 -4833
  23. package/dist/{Mission-BZz-SC9d.js → Mission-C93sLLDp.js} +9 -9
  24. package/dist/{Overview-DnfKpA-t.js → Overview-CANS2hu-.js} +19 -19
  25. package/dist/{Point-BeElhOr-.js → Point-D3Qk09Kr.js} +8 -8
  26. package/dist/{Promotion-Da8BxPFh.js → Promotion-Dtd_dDh4.js} +9 -9
  27. package/dist/{Queue-BfwE5cgy.js → Queue-bAOANEOe.js} +11 -11
  28. package/dist/{Record-DhkDlZ2f.js → Record-7Nsigxg9.js} +9 -9
  29. package/dist/{Reward-Czkm7_oG.js → Reward-BCCSo5Ao.js} +16 -16
  30. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CsM3epgn.js → RewardGroup.vue_vue_type_script_setup_true_lang-sVQ2XtOZ.js} +12 -12
  31. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-3vLz2oFZ.js → RuleGroup.vue_vue_type_script_setup_true_lang-C2ZrTL5p.js} +15 -15
  32. package/dist/{Segment-D0YHmgsJ.js → Segment-BTtsXpEm.js} +31 -31
  33. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DpM5Mglj.js → SelectItems.vue_vue_type_script_setup_true_lang-Etmkc-3s.js} +2 -2
  34. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-2pBfVd1s.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc2_TQiF.js} +31 -30
  35. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CrVxIYv3.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DPDq-Juz.js} +4 -4
  36. package/dist/Setting-D5YbEHxm.js +1982 -0
  37. package/dist/{SettingAdvertisements-DD7-Yg_m.js → SettingAdvertisements-D9Lhamel.js} +12 -12
  38. package/dist/{Store-r6_TrozR.js → Store-VZ8appMT.js} +706 -679
  39. package/dist/{StoreRewards-DT4doSpz.js → StoreRewards-egMoq16P.js} +15 -15
  40. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C_cTJbEf.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bh33_foI.js} +20 -20
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C5jRK0dU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-qWbACUbe.js} +1 -1
  42. package/dist/{Tier-BmoObMNK.js → Tier-IQfhLdUW.js} +22 -22
  43. package/dist/{Title-BL1aP1Pz.js → Title-DAhwskG_.js} +23 -22
  44. package/dist/{Transaction-BoIkA8Ow.js → Transaction-DoYHMx8C.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-WtyCkEnC.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B6SAfZCS.js} +6 -6
  46. package/dist/{Voucher-B_y8WCNE.js → Voucher-CjUzxTj9.js} +12 -12
  47. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DsEUCfQ0.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DjwuuQOy.js} +12 -12
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DEco-KD8.js → ZodTextField.vue_vue_type_script_setup_true_lang-905euk7D.js} +2 -2
  49. package/dist/{app-97PQLirJ.js → app-BQKaKSTN.js} +69 -49
  50. package/dist/app.js +1 -1
  51. package/dist/{business-DM8Ddouf.js → business-D-Y0xqsG.js} +1 -1
  52. package/dist/{campaign-CT932f3F.js → campaign-BO_GMK22.js} +1 -1
  53. package/dist/{campaign-Btb4iifz.js → campaign-C4FU4mF-.js} +8 -8
  54. package/dist/{campaign.enum-CsDJx7Gs.js → campaign.enum-ME5t80SA.js} +1 -1
  55. package/dist/{campaign.fn-BQMZndjC.js → campaign.fn-CpSdTR_Z.js} +3 -3
  56. package/dist/{collectible.enum-DF7kK9FH.js → collectible.enum-BJNC4deW.js} +1 -1
  57. package/dist/{collection.fn-BhN-PqZL.js → collection.fn-BclOhIak.js} +2 -2
  58. package/dist/{dto-h7iFVkWq.js → dto-CeKAIN4F.js} +4 -4
  59. package/dist/{effect-uP1iMZtY.js → effect-C5coTG7j.js} +1 -1
  60. package/dist/{email-addresses-Dqg2mLXX.js → email-addresses-DdpDo4U3.js} +2 -2
  61. package/dist/{export-B-3Bdt9C.js → export-Cd7RMmWF.js} +3 -3
  62. package/dist/{helper-BoId9qqd.js → helper-8QHPhfxd.js} +1 -1
  63. package/dist/{index-MnludiWX.js → index-B2UGAU9v.js} +1 -1
  64. package/dist/{index-BumlxSfY.js → index-BJne3mAB.js} +6 -6
  65. package/dist/{index-Bvbp3blc.js → index-BJuTIPNg.js} +1 -1
  66. package/dist/{index-D8MQmF1t.js → index-CAP90xO7.js} +376 -369
  67. package/dist/{index-Ba9cuHtD.js → index-CdgAq0Pz.js} +1 -1
  68. package/dist/{index-CuK11tsI.js → index-Ch_6nXW4.js} +1 -1
  69. package/dist/{index-Bg4zAuYE.js → index-Csxi8Zcu.js} +3 -3
  70. package/dist/{index-DRuE_qHT.js → index-D8LAuyy5.js} +2 -2
  71. package/dist/{index-CMpR1HzN.js → index-D_b2gjAX.js} +1 -1
  72. package/dist/{index-DIkzKoq5.js → index-DlwlvbrO.js} +1 -1
  73. package/dist/{index-Bq2t_zdK.js → index-M5KI7NIT.js} +1 -1
  74. package/dist/{index-DkPJyXs4.js → index-Rb7s8Lqk.js} +1182 -989
  75. package/dist/{index-BrxGi33h.js → index-e5r6FpSJ.js} +3 -3
  76. package/dist/{index.esm2017-RL-h3I1f.js → index.esm2017-D6CILdWW.js} +1 -1
  77. package/dist/{loading-BeeF8Jj7.js → loading-tl9p27VA.js} +1 -1
  78. package/dist/{lodash-DmWp55y7.js → lodash-fxLQlj7m.js} +1 -1
  79. package/dist/{membership-BUq0y6RI.js → membership-CBpNdC9y.js} +3 -3
  80. package/dist/{money-C4X1MSTz.js → money-CNRljtC1.js} +1 -1
  81. package/dist/{number-DKpaYsjH.js → number-DmTfN_5Y.js} +1 -1
  82. package/dist/{objectid-DFEazwI8.js → objectid-BuanIDxD.js} +8 -8
  83. package/dist/{plugins-Bke3udWH.js → plugins-DvsCeess.js} +3 -3
  84. package/dist/{reward-DffpddMv.js → reward-CW22wI3L.js} +1 -1
  85. package/dist/{rule-DnqP9S9V.js → rule-C_3XR2Zd.js} +3 -3
  86. package/dist/{rule-builder-nJ3DJ_PE.js → rule-builder-DrwCpDKV.js} +1 -1
  87. package/dist/{template-CGZdUvtU.js → template-CBaQ8LLp.js} +7 -7
  88. package/dist/{timezone-CEmNm2CH.js → timezone-DSEM5B5J.js} +2 -2
  89. package/dist/{trigger-BvNAwfbO.js → trigger-3QCLi7tq.js} +5 -5
  90. package/dist/{usePagination-YjYwRlFU.js → usePagination-CZ7RnfzE.js} +1 -1
  91. package/dist/{user-BQyBzZqG.js → user-CY_UexCt.js} +1 -1
  92. package/dist/{vue-i18n-BM_oLuoV.js → vue-i18n-DGcpLn5c.js} +317 -317
  93. package/dist/{xlsx-CZljAb-V.js → xlsx-rSwsIehi.js} +1 -1
  94. package/dist/{zod-D502pprc.js → zod-BD5VYWIO.js} +1 -1
  95. package/package.json +1 -1
  96. package/dist/Setting-CTh46A28.js +0 -1928
@@ -0,0 +1,1982 @@
1
+ import { defineComponent as Ie, ref as O, computed as K, onMounted as Qe, resolveComponent as U, openBlock as x, createBlock as le, withCtx as Y, createElementVNode as h, createVNode as _, unref as c, isRef as We, createElementBlock as oe, Fragment as pe, toDisplayString as F, createTextVNode as Q, renderList as Ct, createCommentVNode as ye } from "vue";
2
+ import { h as Et } from "./moment-D7p2TMB-.js";
3
+ import { Z as Ke } from "./zod-BD5VYWIO.js";
4
+ import { useDialog as Xe } from "@feedmepos/ui-library";
5
+ import { u as At } from "./loading-tl9p27VA.js";
6
+ import { u as Bt } from "./app-wDQR6dpb.js";
7
+ import { u as Be, l as Ze } from "./business-D-Y0xqsG.js";
8
+ import { u as et } from "./membership-CBpNdC9y.js";
9
+ import { P as St } from "./index-Rb7s8Lqk.js";
10
+ import { s as _t, k as Mt } from "./index-CAP90xO7.js";
11
+ import { _ as Pt } from "./ImageInput.vue_vue_type_script_setup_true_lang-CyMgFI2D.js";
12
+ import { a as tt, p as It, f as re } from "./plugins-DvsCeess.js";
13
+ import { _ as Tt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-qWbACUbe.js";
14
+ import { M as Nt, _ as Ut } from "./MessageInput.vue_vue_type_script_setup_true_lang-D3X7vfMo.js";
15
+ import { u as Lt } from "./vue-i18n-DGcpLn5c.js";
16
+ import { useCoreStore as Ft } from "@feedmepos/mf-common";
17
+ import { useRouter as Rt } from "vue-router";
18
+ import { R as kt } from "./app-BQKaKSTN.js";
19
+ import { m as Ye } from "./index-M5KI7NIT.js";
20
+ import { S as je } from "./index-D8LAuyy5.js";
21
+ import { o as Dt } from "./objectId-dwaoBfJX.js";
22
+ import { a as Vt } from "./object-qECH92oz.js";
23
+ var ee = {}, $t = function() {
24
+ return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
25
+ }, nt = {}, L = {};
26
+ let Te;
27
+ const xt = [
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
+ L.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
+ L.getSymbolTotalCodewords = function(e) {
77
+ return xt[e];
78
+ };
79
+ L.getBCHDigit = function(t) {
80
+ let e = 0;
81
+ for (; t !== 0; )
82
+ e++, t >>>= 1;
83
+ return e;
84
+ };
85
+ L.setToSJISFunction = function(e) {
86
+ if (typeof e != "function")
87
+ throw new Error('"toSJISFunc" is not a valid function.');
88
+ Te = e;
89
+ };
90
+ L.isKanjiModeEnabled = function() {
91
+ return typeof Te < "u";
92
+ };
93
+ L.toSJIS = function(e) {
94
+ return Te(e);
95
+ };
96
+ var ce = {};
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
+ })(ce);
131
+ function ot() {
132
+ this.buffer = [], this.length = 0;
133
+ }
134
+ ot.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 Ht = ot;
152
+ function te(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
+ te.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
+ te.prototype.get = function(t, e) {
162
+ return this.data[t * this.size + e];
163
+ };
164
+ te.prototype.xor = function(t, e, i) {
165
+ this.data[t * this.size + e] ^= i;
166
+ };
167
+ te.prototype.isReserved = function(t, e) {
168
+ return this.reservedBit[t * this.size + e];
169
+ };
170
+ var zt = te, rt = {};
171
+ (function(t) {
172
+ const e = L.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, l = [n - 7];
176
+ for (let a = 1; a < o - 1; a++)
177
+ l[a] = l[a - 1] - s;
178
+ return l.push(6), l.reverse();
179
+ }, t.getPositions = function(r) {
180
+ const o = [], n = t.getRowColCoords(r), s = n.length;
181
+ for (let l = 0; l < s; l++)
182
+ for (let a = 0; a < s; a++)
183
+ l === 0 && a === 0 || // top-left
184
+ l === 0 && a === s - 1 || // bottom-left
185
+ l === s - 1 && a === 0 || o.push([n[l], n[a]]);
186
+ return o;
187
+ };
188
+ })(rt);
189
+ var it = {};
190
+ const Ot = L.getSymbolSize, Je = 7;
191
+ it.getPositions = function(e) {
192
+ const i = Ot(e);
193
+ return [
194
+ // top-left
195
+ [0, 0],
196
+ // top-right
197
+ [i - Je, 0],
198
+ // bottom-left
199
+ [0, i - Je]
200
+ ];
201
+ };
202
+ var st = {};
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, l = 0, a = 0, u = null, f = null;
227
+ for (let B = 0; B < n; B++) {
228
+ l = a = 0, u = f = null;
229
+ for (let g = 0; g < n; g++) {
230
+ let m = o.get(B, g);
231
+ m === u ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), u = m, l = 1), m = o.get(g, B), m === f ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), f = m, a = 1);
232
+ }
233
+ l >= 5 && (s += e.N1 + (l - 5)), a >= 5 && (s += e.N1 + (a - 5));
234
+ }
235
+ return s;
236
+ }, t.getPenaltyN2 = function(o) {
237
+ const n = o.size;
238
+ let s = 0;
239
+ for (let l = 0; l < n - 1; l++)
240
+ for (let a = 0; a < n - 1; a++) {
241
+ const u = o.get(l, a) + o.get(l, a + 1) + o.get(l + 1, a) + o.get(l + 1, a + 1);
242
+ (u === 4 || u === 0) && s++;
243
+ }
244
+ return s * e.N2;
245
+ }, t.getPenaltyN3 = function(o) {
246
+ const n = o.size;
247
+ let s = 0, l = 0, a = 0;
248
+ for (let u = 0; u < n; u++) {
249
+ l = a = 0;
250
+ for (let f = 0; f < n; f++)
251
+ l = l << 1 & 2047 | o.get(u, f), f >= 10 && (l === 1488 || l === 93) && s++, a = a << 1 & 2047 | o.get(f, u), f >= 10 && (a === 1488 || a === 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 a = 0; a < s; a++) n += o.data[a];
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 l = 0; l < s; l++)
285
+ for (let a = 0; a < s; a++)
286
+ n.isReserved(a, l) || n.xor(a, l, i(o, a, l));
287
+ }, t.getBestMask = function(o, n) {
288
+ const s = Object.keys(t.Patterns).length;
289
+ let l = 0, a = 1 / 0;
290
+ for (let u = 0; u < s; u++) {
291
+ n(u), t.applyMask(u, o);
292
+ const f = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
293
+ t.applyMask(u, o), f < a && (a = f, l = u);
294
+ }
295
+ return l;
296
+ };
297
+ })(st);
298
+ var de = {};
299
+ const H = ce, ie = [
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
+ ], se = [
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
+ de.getBlocksCount = function(e, i) {
625
+ switch (i) {
626
+ case H.L:
627
+ return ie[(e - 1) * 4 + 0];
628
+ case H.M:
629
+ return ie[(e - 1) * 4 + 1];
630
+ case H.Q:
631
+ return ie[(e - 1) * 4 + 2];
632
+ case H.H:
633
+ return ie[(e - 1) * 4 + 3];
634
+ default:
635
+ return;
636
+ }
637
+ };
638
+ de.getTotalCodewordsCount = function(e, i) {
639
+ switch (i) {
640
+ case H.L:
641
+ return se[(e - 1) * 4 + 0];
642
+ case H.M:
643
+ return se[(e - 1) * 4 + 1];
644
+ case H.Q:
645
+ return se[(e - 1) * 4 + 2];
646
+ case H.H:
647
+ return se[(e - 1) * 4 + 3];
648
+ default:
649
+ return;
650
+ }
651
+ };
652
+ var lt = {}, fe = {};
653
+ const X = new Uint8Array(512), ae = new Uint8Array(256);
654
+ (function() {
655
+ let e = 1;
656
+ for (let i = 0; i < 255; i++)
657
+ X[i] = e, ae[e] = i, e <<= 1, e & 256 && (e ^= 285);
658
+ for (let i = 255; i < 512; i++)
659
+ X[i] = X[i - 255];
660
+ })();
661
+ fe.log = function(e) {
662
+ if (e < 1) throw new Error("log(" + e + ")");
663
+ return ae[e];
664
+ };
665
+ fe.exp = function(e) {
666
+ return X[e];
667
+ };
668
+ fe.mul = function(e, i) {
669
+ return e === 0 || i === 0 ? 0 : X[ae[e] + ae[i]];
670
+ };
671
+ (function(t) {
672
+ const e = fe;
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 l = 0; l < o.length; l++)
677
+ n[s + l] ^= e.mul(r[s], o[l]);
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 a = 0; a < o.length; a++)
684
+ n[a] ^= e.mul(o[a], s);
685
+ let l = 0;
686
+ for (; l < n.length && n[l] === 0; ) l++;
687
+ n = n.slice(l);
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
+ })(lt);
697
+ const at = lt;
698
+ function Ne(t) {
699
+ this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
700
+ }
701
+ Ne.prototype.initialize = function(e) {
702
+ this.degree = e, this.genPoly = at.generateECPolynomial(this.degree);
703
+ };
704
+ Ne.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 = at.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 Kt = Ne, ut = {}, z = {}, Ue = {};
717
+ Ue.isValid = function(e) {
718
+ return !isNaN(e) && e >= 1 && e <= 40;
719
+ };
720
+ var D = {};
721
+ const ct = "[0-9]+", Yt = "[A-Z $%*+\\-./:]+";
722
+ let Z = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
723
+ Z = Z.replace(/u/g, "\\u");
724
+ const jt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Z + `)(?:.|[\r
725
+ ]))+`;
726
+ D.KANJI = new RegExp(Z, "g");
727
+ D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
728
+ D.BYTE = new RegExp(jt, "g");
729
+ D.NUMERIC = new RegExp(ct, "g");
730
+ D.ALPHANUMERIC = new RegExp(Yt, "g");
731
+ const Jt = new RegExp("^" + Z + "$"), Gt = new RegExp("^" + ct + "$"), qt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
732
+ D.testKanji = function(e) {
733
+ return Jt.test(e);
734
+ };
735
+ D.testNumeric = function(e) {
736
+ return Gt.test(e);
737
+ };
738
+ D.testAlphanumeric = function(e) {
739
+ return qt.test(e);
740
+ };
741
+ (function(t) {
742
+ const e = Ue, 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 = L, i = de, r = ce, o = z, n = Ue, s = 7973, l = e.getBCHDigit(s);
802
+ function a(g, m, v) {
803
+ for (let E = 1; E <= 40; E++)
804
+ if (m <= t.getCapacity(E, v, g))
805
+ return E;
806
+ }
807
+ function u(g, m) {
808
+ return o.getCharCountIndicator(g, m) + 4;
809
+ }
810
+ function f(g, m) {
811
+ let v = 0;
812
+ return g.forEach(function(E) {
813
+ const M = u(E.mode, m);
814
+ v += M + E.getBitsLength();
815
+ }), v;
816
+ }
817
+ function B(g, m) {
818
+ for (let v = 1; v <= 40; v++)
819
+ if (f(g, v) <= t.getCapacity(v, m, o.MIXED))
820
+ return v;
821
+ }
822
+ t.from = function(m, v) {
823
+ return n.isValid(m) ? parseInt(m, 10) : v;
824
+ }, t.getCapacity = function(m, v, E) {
825
+ if (!n.isValid(m))
826
+ throw new Error("Invalid QR Code version");
827
+ typeof E > "u" && (E = o.BYTE);
828
+ const M = e.getSymbolTotalCodewords(m), p = i.getTotalCodewordsCount(m, v), b = (M - p) * 8;
829
+ if (E === o.MIXED) return b;
830
+ const w = b - u(E, m);
831
+ switch (E) {
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(m, v) {
843
+ let E;
844
+ const M = r.from(v, r.M);
845
+ if (Array.isArray(m)) {
846
+ if (m.length > 1)
847
+ return B(m, M);
848
+ if (m.length === 0)
849
+ return 1;
850
+ E = m[0];
851
+ } else
852
+ E = m;
853
+ return a(E.mode, E.getLength(), M);
854
+ }, t.getEncodedBits = function(m) {
855
+ if (!n.isValid(m) || m < 7)
856
+ throw new Error("Invalid QR Code version");
857
+ let v = m << 12;
858
+ for (; e.getBCHDigit(v) - l >= 0; )
859
+ v ^= s << e.getBCHDigit(v) - l;
860
+ return m << 12 | v;
861
+ };
862
+ })(ut);
863
+ var dt = {};
864
+ const Se = L, ft = 1335, Qt = 21522, Ge = Se.getBCHDigit(ft);
865
+ dt.getEncodedBits = function(e, i) {
866
+ const r = e.bit << 3 | i;
867
+ let o = r << 10;
868
+ for (; Se.getBCHDigit(o) - Ge >= 0; )
869
+ o ^= ft << Se.getBCHDigit(o) - Ge;
870
+ return (r << 10 | o) ^ Qt;
871
+ };
872
+ var mt = {};
873
+ const Wt = z;
874
+ function j(t) {
875
+ this.mode = Wt.NUMERIC, this.data = t.toString();
876
+ }
877
+ j.getBitsLength = function(e) {
878
+ return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
879
+ };
880
+ j.prototype.getLength = function() {
881
+ return this.data.length;
882
+ };
883
+ j.prototype.getBitsLength = function() {
884
+ return j.getBitsLength(this.data.length);
885
+ };
886
+ j.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 Xt = j;
894
+ const Zt = z, we = [
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 = Zt.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 = we.indexOf(this.data[i]) * 45;
957
+ r += we.indexOf(this.data[i + 1]), e.put(r, 11);
958
+ }
959
+ this.data.length % 2 && e.put(we.indexOf(this.data[i]), 6);
960
+ };
961
+ var en = J, tn = 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 nn = tn, on = z;
989
+ function G(t) {
990
+ this.mode = on.BYTE, typeof t == "string" && (t = nn(t)), this.data = new Uint8Array(t);
991
+ }
992
+ G.getBitsLength = function(e) {
993
+ return e * 8;
994
+ };
995
+ G.prototype.getLength = function() {
996
+ return this.data.length;
997
+ };
998
+ G.prototype.getBitsLength = function() {
999
+ return G.getBitsLength(this.data.length);
1000
+ };
1001
+ G.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 rn = G;
1006
+ const sn = z, ln = L;
1007
+ function q(t) {
1008
+ this.mode = sn.KANJI, this.data = t;
1009
+ }
1010
+ q.getBitsLength = function(e) {
1011
+ return e * 13;
1012
+ };
1013
+ q.prototype.getLength = function() {
1014
+ return this.data.length;
1015
+ };
1016
+ q.prototype.getBitsLength = function() {
1017
+ return q.getBitsLength(this.data.length);
1018
+ };
1019
+ q.prototype.write = function(t) {
1020
+ let e;
1021
+ for (e = 0; e < this.data.length; e++) {
1022
+ let i = ln.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 an = q, gt = { 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 l = e.PriorityQueue.make();
1042
+ l.push(r, 0);
1043
+ for (var a, u, f, B, g, m, v, E, M; !l.empty(); ) {
1044
+ a = l.pop(), u = a.value, B = a.cost, g = i[u] || {};
1045
+ for (f in g)
1046
+ g.hasOwnProperty(f) && (m = g[f], v = B + m, E = s[f], M = typeof s[f] > "u", (M || E > v) && (s[f] = v, l.push(f, v), n[f] = u));
1047
+ }
1048
+ if (typeof o < "u" && typeof s[o] > "u") {
1049
+ var p = ["Could not find a path from ", r, " to ", o, "."].join("");
1050
+ throw new Error(p);
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
+ })(gt);
1101
+ var un = gt.exports;
1102
+ (function(t) {
1103
+ const e = z, i = Xt, r = en, o = rn, n = an, s = D, l = L, a = un;
1104
+ function u(p) {
1105
+ return unescape(encodeURIComponent(p)).length;
1106
+ }
1107
+ function f(p, b, w) {
1108
+ const y = [];
1109
+ let S;
1110
+ for (; (S = p.exec(w)) !== null; )
1111
+ y.push({
1112
+ data: S[0],
1113
+ index: S.index,
1114
+ mode: b,
1115
+ length: S[0].length
1116
+ });
1117
+ return y;
1118
+ }
1119
+ function B(p) {
1120
+ const b = f(s.NUMERIC, e.NUMERIC, p), w = f(s.ALPHANUMERIC, e.ALPHANUMERIC, p);
1121
+ let y, S;
1122
+ return l.isKanjiModeEnabled() ? (y = f(s.BYTE, e.BYTE, p), S = f(s.KANJI, e.KANJI, p)) : (y = f(s.BYTE_KANJI, e.BYTE, p), S = []), b.concat(w, y, S).sort(function(I, N) {
1123
+ return I.index - N.index;
1124
+ }).map(function(I) {
1125
+ return {
1126
+ data: I.data,
1127
+ mode: I.mode,
1128
+ length: I.length
1129
+ };
1130
+ });
1131
+ }
1132
+ function g(p, b) {
1133
+ switch (b) {
1134
+ case e.NUMERIC:
1135
+ return i.getBitsLength(p);
1136
+ case e.ALPHANUMERIC:
1137
+ return r.getBitsLength(p);
1138
+ case e.KANJI:
1139
+ return n.getBitsLength(p);
1140
+ case e.BYTE:
1141
+ return o.getBitsLength(p);
1142
+ }
1143
+ }
1144
+ function m(p) {
1145
+ return p.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 v(p) {
1151
+ const b = [];
1152
+ for (let w = 0; w < p.length; w++) {
1153
+ const y = p[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: u(y.data) }
1172
+ ]);
1173
+ break;
1174
+ case e.BYTE:
1175
+ b.push([
1176
+ { data: y.data, mode: e.BYTE, length: u(y.data) }
1177
+ ]);
1178
+ }
1179
+ }
1180
+ return b;
1181
+ }
1182
+ function E(p, b) {
1183
+ const w = {}, y = { start: {} };
1184
+ let S = ["start"];
1185
+ for (let P = 0; P < p.length; P++) {
1186
+ const I = p[P], N = [];
1187
+ for (let k = 0; k < I.length; k++) {
1188
+ const A = I[k], d = "" + P + k;
1189
+ N.push(d), w[d] = { node: A, lastCount: 0 }, y[d] = {};
1190
+ for (let V = 0; V < S.length; V++) {
1191
+ const T = S[V];
1192
+ w[T] && w[T].node.mode === A.mode ? (y[T][d] = g(w[T].lastCount + A.length, A.mode) - g(w[T].lastCount, A.mode), w[T].lastCount += A.length) : (w[T] && (w[T].lastCount = A.length), y[T][d] = g(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, b));
1193
+ }
1194
+ }
1195
+ S = N;
1196
+ }
1197
+ for (let P = 0; P < S.length; P++)
1198
+ y[S[P]].end = 0;
1199
+ return { map: y, table: w };
1200
+ }
1201
+ function M(p, b) {
1202
+ let w;
1203
+ const y = e.getBestModeForData(p);
1204
+ if (w = e.from(b, y), w !== e.BYTE && w.bit < y.bit)
1205
+ throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(w) + `.
1206
+ Suggested mode is: ` + e.toString(y));
1207
+ switch (w === e.KANJI && !l.isKanjiModeEnabled() && (w = e.BYTE), w) {
1208
+ case e.NUMERIC:
1209
+ return new i(p);
1210
+ case e.ALPHANUMERIC:
1211
+ return new r(p);
1212
+ case e.KANJI:
1213
+ return new n(p);
1214
+ case e.BYTE:
1215
+ return new o(p);
1216
+ }
1217
+ }
1218
+ t.fromArray = function(b) {
1219
+ return b.reduce(function(w, y) {
1220
+ return typeof y == "string" ? w.push(M(y, null)) : y.data && w.push(M(y.data, y.mode)), w;
1221
+ }, []);
1222
+ }, t.fromString = function(b, w) {
1223
+ const y = B(b, l.isKanjiModeEnabled()), S = v(y), P = E(S, w), I = a.find_path(P.map, "start", "end"), N = [];
1224
+ for (let k = 1; k < I.length - 1; k++)
1225
+ N.push(P.table[I[k]].node);
1226
+ return t.fromArray(m(N));
1227
+ }, t.rawSplit = function(b) {
1228
+ return t.fromArray(
1229
+ B(b, l.isKanjiModeEnabled())
1230
+ );
1231
+ };
1232
+ })(mt);
1233
+ const me = L, be = ce, cn = Ht, dn = zt, fn = rt, mn = it, _e = st, Me = de, gn = Kt, ue = ut, hn = dt, pn = z, ve = mt;
1234
+ function yn(t, e) {
1235
+ const i = t.size, r = mn.getPositions(e);
1236
+ for (let o = 0; o < r.length; o++) {
1237
+ const n = r[o][0], s = r[o][1];
1238
+ for (let l = -1; l <= 7; l++)
1239
+ if (!(n + l <= -1 || i <= n + l))
1240
+ for (let a = -1; a <= 7; a++)
1241
+ s + a <= -1 || i <= s + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? t.set(n + l, s + a, !0, !0) : t.set(n + l, s + a, !1, !0));
1242
+ }
1243
+ }
1244
+ function wn(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 bn(t, e) {
1252
+ const i = fn.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 l = -2; l <= 2; l++)
1257
+ s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? t.set(o + s, n + l, !0, !0) : t.set(o + s, n + l, !1, !0);
1258
+ }
1259
+ }
1260
+ function vn(t, e) {
1261
+ const i = t.size, r = ue.getEncodedBits(e);
1262
+ let o, n, s;
1263
+ for (let l = 0; l < 18; l++)
1264
+ o = Math.floor(l / 3), n = l % 3 + i - 8 - 3, s = (r >> l & 1) === 1, t.set(o, n, s, !0), t.set(n, o, s, !0);
1265
+ }
1266
+ function Ce(t, e, i) {
1267
+ const r = t.size, o = hn.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 Cn(t, e) {
1274
+ const i = t.size;
1275
+ let r = -1, o = i - 1, n = 7, s = 0;
1276
+ for (let l = i - 1; l > 0; l -= 2)
1277
+ for (l === 6 && l--; ; ) {
1278
+ for (let a = 0; a < 2; a++)
1279
+ if (!t.isReserved(o, l - a)) {
1280
+ let u = !1;
1281
+ s < e.length && (u = (e[s] >>> n & 1) === 1), t.set(o, l - a, u), 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 En(t, e, i) {
1290
+ const r = new cn();
1291
+ i.forEach(function(a) {
1292
+ r.put(a.mode.bit, 4), r.put(a.getLength(), pn.getCharCountIndicator(a.mode, t)), a.write(r);
1293
+ });
1294
+ const o = me.getSymbolTotalCodewords(t), n = Me.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 l = (s - r.getLengthInBits()) / 8;
1298
+ for (let a = 0; a < l; a++)
1299
+ r.put(a % 2 ? 17 : 236, 8);
1300
+ return An(r, t, e);
1301
+ }
1302
+ function An(t, e, i) {
1303
+ const r = me.getSymbolTotalCodewords(e), o = Me.getTotalCodewordsCount(e, i), n = r - o, s = Me.getBlocksCount(e, i), l = r % s, a = s - l, u = Math.floor(r / s), f = Math.floor(n / s), B = f + 1, g = u - f, m = new gn(g);
1304
+ let v = 0;
1305
+ const E = new Array(s), M = new Array(s);
1306
+ let p = 0;
1307
+ const b = new Uint8Array(t.buffer);
1308
+ for (let I = 0; I < s; I++) {
1309
+ const N = I < a ? f : B;
1310
+ E[I] = b.slice(v, v + N), M[I] = m.encode(E[I]), v += N, p = Math.max(p, N);
1311
+ }
1312
+ const w = new Uint8Array(r);
1313
+ let y = 0, S, P;
1314
+ for (S = 0; S < p; S++)
1315
+ for (P = 0; P < s; P++)
1316
+ S < E[P].length && (w[y++] = E[P][S]);
1317
+ for (S = 0; S < g; S++)
1318
+ for (P = 0; P < s; P++)
1319
+ w[y++] = M[P][S];
1320
+ return w;
1321
+ }
1322
+ function Bn(t, e, i, r) {
1323
+ let o;
1324
+ if (Array.isArray(t))
1325
+ o = ve.fromArray(t);
1326
+ else if (typeof t == "string") {
1327
+ let u = e;
1328
+ if (!u) {
1329
+ const f = ve.rawSplit(t);
1330
+ u = ue.getBestVersionForData(f, i);
1331
+ }
1332
+ o = ve.fromString(t, u || 40);
1333
+ } else
1334
+ throw new Error("Invalid data");
1335
+ const n = ue.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 = En(e, i, o), l = me.getSymbolSize(e), a = new dn(l);
1348
+ return yn(a, e), wn(a), bn(a, e), Ce(a, i, 0), e >= 7 && vn(a, e), Cn(a, s), isNaN(r) && (r = _e.getBestMask(
1349
+ a,
1350
+ Ce.bind(null, a, i)
1351
+ )), _e.applyMask(r, a), Ce(a, i, r), {
1352
+ modules: a,
1353
+ version: e,
1354
+ errorCorrectionLevel: i,
1355
+ maskPattern: r,
1356
+ segments: o
1357
+ };
1358
+ }
1359
+ nt.create = function(e, i) {
1360
+ if (typeof e > "u" || e === "")
1361
+ throw new Error("No input text");
1362
+ let r = be.M, o, n;
1363
+ return typeof i < "u" && (r = be.from(i.errorCorrectionLevel, be.M), o = ue.from(i.version), n = _e.from(i.maskPattern), i.toSJISFunc && me.setToSJISFunction(i.toSJISFunc)), Bn(e, o, r, n);
1364
+ };
1365
+ var ht = {}, Le = {};
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, l = o.modules.data, a = t.getScale(s, n), u = Math.floor((s + n.margin * 2) * a), f = n.margin * a, B = [n.color.light, n.color.dark];
1406
+ for (let g = 0; g < u; g++)
1407
+ for (let m = 0; m < u; m++) {
1408
+ let v = (g * u + m) * 4, E = n.color.light;
1409
+ if (g >= f && m >= f && g < u - f && m < u - f) {
1410
+ const M = Math.floor((g - f) / a), p = Math.floor((m - f) / a);
1411
+ E = B[l[M * s + p] ? 1 : 0];
1412
+ }
1413
+ r[v++] = E.r, r[v++] = E.g, r[v++] = E.b, r[v] = E.a;
1414
+ }
1415
+ };
1416
+ })(Le);
1417
+ (function(t) {
1418
+ const e = Le;
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, l) {
1430
+ let a = l, u = s;
1431
+ typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), s || (u = r()), a = e.getOptions(a);
1432
+ const f = e.getImageWidth(n.modules.size, a), B = u.getContext("2d"), g = B.createImageData(f, f);
1433
+ return e.qrToImageData(g.data, n, a), i(B, u, f), B.putImageData(g, 0, 0), u;
1434
+ }, t.renderToDataURL = function(n, s, l) {
1435
+ let a = l;
1436
+ typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
1437
+ const u = t.render(n, s, a), f = a.type || "image/png", B = a.rendererOpts || {};
1438
+ return u.toDataURL(f, B.quality);
1439
+ };
1440
+ })(ht);
1441
+ var pt = {};
1442
+ const Sn = Le;
1443
+ function qe(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 Ee(t, e, i) {
1448
+ let r = t + e;
1449
+ return typeof i < "u" && (r += " " + i), r;
1450
+ }
1451
+ function _n(t, e, i) {
1452
+ let r = "", o = 0, n = !1, s = 0;
1453
+ for (let l = 0; l < t.length; l++) {
1454
+ const a = Math.floor(l % e), u = Math.floor(l / e);
1455
+ !a && !n && (n = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (r += n ? Ee("M", a + i, 0.5 + u + i) : Ee("m", o, 0), o = 0, n = !1), a + 1 < e && t[l + 1] || (r += Ee("h", s), s = 0)) : o++;
1456
+ }
1457
+ return r;
1458
+ }
1459
+ pt.render = function(e, i, r) {
1460
+ const o = Sn.getOptions(i), n = e.modules.size, s = e.modules.data, l = n + o.margin * 2, a = o.color.light.a ? "<path " + qe(o.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", u = "<path " + qe(o.color.dark, "stroke") + ' d="' + _n(s, n, o.margin) + '"/>', f = 'viewBox="0 0 ' + l + " " + l + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + a + u + `</svg>
1461
+ `;
1462
+ return typeof r == "function" && r(null, g), g;
1463
+ };
1464
+ const Mn = $t, Pe = nt, yt = ht, Pn = pt;
1465
+ function Fe(t, e, i, r, o) {
1466
+ const n = [].slice.call(arguments, 1), s = n.length, l = typeof n[s - 1] == "function";
1467
+ if (!l && !Mn())
1468
+ throw new Error("Callback required as last argument");
1469
+ if (l) {
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(a, u) {
1477
+ try {
1478
+ const f = Pe.create(i, r);
1479
+ a(t(f, e, r));
1480
+ } catch (f) {
1481
+ u(f);
1482
+ }
1483
+ });
1484
+ }
1485
+ try {
1486
+ const a = Pe.create(i, r);
1487
+ o(null, t(a, e, r));
1488
+ } catch (a) {
1489
+ o(a);
1490
+ }
1491
+ }
1492
+ ee.create = Pe.create;
1493
+ ee.toCanvas = Fe.bind(null, yt.render);
1494
+ ee.toDataURL = Fe.bind(null, yt.renderToDataURL);
1495
+ ee.toString = Fe.bind(null, function(t, e, i) {
1496
+ return Pn.render(t, i);
1497
+ });
1498
+ async function In(t, e = 350) {
1499
+ try {
1500
+ return await ee.toDataURL(t, {
1501
+ width: e,
1502
+ margin: 0
1503
+ });
1504
+ } catch (i) {
1505
+ console.error(i);
1506
+ }
1507
+ }
1508
+ var Tn = { 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", voucherAppUrl: "https://voucher.feedme.cc/" };
1509
+ const Nn = { class: "flex items-start" }, Un = { class: "flex flex-col gap-16 mt-16" }, Ln = ["src"], Fn = /* @__PURE__ */ Ie({
1510
+ __name: "LinkDeviceDialog",
1511
+ setup(t) {
1512
+ const e = Be(), i = et(), r = Xe(), o = O(), n = O(), s = Tn.crmUrl, l = O(), a = K(() => i.membership), u = K(() => {
1513
+ var g, m;
1514
+ return `https://${(g = a.value) != null && g.url ? a.value.url : (m = a.value) == null ? void 0 : m.business}.${s}`;
1515
+ });
1516
+ async function f(g) {
1517
+ const m = await Ze.getOtp(g);
1518
+ return `${u.value}?link-device=${m.otp}`;
1519
+ }
1520
+ async function B(g) {
1521
+ const m = await f(g);
1522
+ l.value = m, o.value = await In(m);
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, m) => {
1532
+ const v = U("FmIcon"), E = U("FmSelect"), M = U("FmButton"), p = U("FmCard");
1533
+ return x(), le(p, { class: "p-24 max-w-[350px]" }, {
1534
+ default: Y(() => [
1535
+ h("div", Nn, [
1536
+ m[3] || (m[3] = h("div", null, [
1537
+ h("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1538
+ h("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1539
+ ], -1)),
1540
+ _(v, {
1541
+ name: "close",
1542
+ onClick: m[0] || (m[0] = (b) => c(r).close()),
1543
+ class: "cursor-pointer"
1544
+ })
1545
+ ]),
1546
+ h("div", Un, [
1547
+ _(E, {
1548
+ modelValue: c(n),
1549
+ "onUpdate:modelValue": [
1550
+ m[1] || (m[1] = (b) => We(n) ? n.value = b : null),
1551
+ B
1552
+ ],
1553
+ label: "Select Location",
1554
+ items: c(e).locationItems.filter((b) => !!b.value)
1555
+ }, null, 8, ["modelValue", "items"]),
1556
+ h("img", {
1557
+ src: c(o),
1558
+ class: "aspect-square w-full"
1559
+ }, null, 8, Ln),
1560
+ _(M, {
1561
+ class: "mx-auto",
1562
+ variant: "plain",
1563
+ icon: "content_copy",
1564
+ onClick: m[2] || (m[2] = (b) => c(tt)(c(l)))
1565
+ })
1566
+ ])
1567
+ ]),
1568
+ _: 1
1569
+ });
1570
+ };
1571
+ }
1572
+ }), W = "__ALL__", Rn = /* @__PURE__ */ Ie({
1573
+ __name: "AllowedPhoneCountriesSelect",
1574
+ props: {
1575
+ modelValue: {}
1576
+ },
1577
+ emits: ["update:modelValue"],
1578
+ setup(t, { emit: e }) {
1579
+ const i = t, r = e, o = St.map((u) => ({
1580
+ label: `${u.name} (${u.phoneCode})`,
1581
+ value: u.phoneCode
1582
+ })), n = K(() => [
1583
+ { label: "All location", value: W },
1584
+ ...o
1585
+ ]), s = K(() => {
1586
+ const u = i.modelValue;
1587
+ return Array.isArray(u) && u.length === 0;
1588
+ }), l = K({
1589
+ get() {
1590
+ const u = i.modelValue;
1591
+ return u == null ? [W] : u.length === 0 ? [] : [...u];
1592
+ },
1593
+ set(u) {
1594
+ const f = l.value;
1595
+ if (u.filter((g) => !f.includes(g)).includes(W))
1596
+ r("update:modelValue", null);
1597
+ else {
1598
+ const g = u.filter((m) => m !== W);
1599
+ g.length === 0 && !s.value ? r("update:modelValue", null) : r("update:modelValue", g);
1600
+ }
1601
+ }
1602
+ }), a = K(() => s.value ? "No countries are allowed. Phone registration is disabled." : l.value.includes(W) || l.value.length === 0 ? "All countries are allowed. No restriction applied." : "Only selected countries will be allowed for phone registration.");
1603
+ return (u, f) => {
1604
+ const B = U("FmSelect");
1605
+ return x(), le(B, {
1606
+ modelValue: c(l),
1607
+ "onUpdate:modelValue": f[0] || (f[0] = (g) => We(l) ? l.value = g : null),
1608
+ label: "Allowed countries",
1609
+ items: c(n),
1610
+ multiselect: "",
1611
+ searchable: "",
1612
+ searchTarget: "label",
1613
+ placeholder: "Search and select countries",
1614
+ "helper-text": c(a)
1615
+ }, null, 8, ["modelValue", "items", "helper-text"]);
1616
+ };
1617
+ }
1618
+ });
1619
+ var Ae = { 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", voucherAppUrl: "https://voucher.feedme.cc/" };
1620
+ const kn = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Dn = { class: "fm-typo-en-title-md-800" }, Vn = {
1621
+ key: 0,
1622
+ class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1623
+ }, $n = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, xn = { class: "fm-typo-en-title-sm-800" }, Hn = { class: "space-y-24" }, zn = { class: "space-y-8" }, On = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "fm-typo-body-lg-400" }, Yn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, jn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Jn = { class: "space-y-8" }, Gn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Qn = { class: "space-y-8" }, Wn = { class: "space-y-8" }, Xn = { class: "space-y-8" }, Zn = { class: "space-y-8" }, eo = { class: "space-y-8" }, to = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, no = { class: "space-y-8" }, oo = { class: "space-y-8" }, ro = { class: "flex justify-end pb-24" }, io = { class: "col-span-1 space-y-8 xs:hidden" }, so = { class: "fm-typo-en-body-lg-600" }, lo = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-600" }, uo = { class: "fm-typo-en-body-lg-600" }, Lo = /* @__PURE__ */ Ie({
1624
+ __name: "Setting",
1625
+ setup(t) {
1626
+ const e = Rt(), i = Bt(), r = Ft(), o = Be(), n = et(), { global: s, minor: l } = At, a = Xe(), u = O(), f = O([]), B = O(null), g = _t, m = [
1627
+ (A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1628
+ (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"
1629
+ ], v = Ae.appUrl, E = K(() => {
1630
+ var A;
1631
+ return `https://${(A = u.value) == null ? void 0 : A.business}.${v}`;
1632
+ }), M = O(), { t: p } = Lt(), b = r.currentCountry.value || "MY", w = [
1633
+ "user.name",
1634
+ "user.gender",
1635
+ "user.birthday",
1636
+ "user.phoneNumber",
1637
+ "membership.url"
1638
+ ].filter(
1639
+ (A) => {
1640
+ var d;
1641
+ return !((d = Nt[b]) != null && d.includes(A));
1642
+ }
1643
+ );
1644
+ async function y() {
1645
+ a.open({
1646
+ title: "",
1647
+ dialogComponent: Fn,
1648
+ closeButton: !1
1649
+ });
1650
+ }
1651
+ async function S(A) {
1652
+ await It.remove(
1653
+ "Are you sure you want to unlink this device?",
1654
+ "Unlink device",
1655
+ "Unlink"
1656
+ ) && await l(
1657
+ async () => {
1658
+ await Ze.unregisterDevice(A), await o.readLocationDevices();
1659
+ },
1660
+ {
1661
+ message: "Unlinking device",
1662
+ successMessage: "Unlinked device successfully"
1663
+ }
1664
+ );
1665
+ }
1666
+ async function P() {
1667
+ await l(
1668
+ async () => {
1669
+ var V;
1670
+ const A = Vt(u.value);
1671
+ A.welcomeMessage && !((V = A.welcomeMessage) != null && V.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1672
+ const d = Mt.parse(A);
1673
+ M.value === null && d.image ? await re.delete(re.coverImagePath()) : M.value && (d.image = await re.update(
1674
+ re.coverImagePath(),
1675
+ M.value
1676
+ )), await Ye.update(d), await n.readMembership(), u.value = n.membership;
1677
+ },
1678
+ {
1679
+ message: "Updating membership",
1680
+ successMessage: "Membership updated successfully"
1681
+ }
1682
+ );
1683
+ }
1684
+ async function I() {
1685
+ const A = await Ye.getEmailAddresses();
1686
+ console.log(A), f.value = A, B.value = A.find((d) => d.default.includes("Marketing"));
1687
+ }
1688
+ async function N() {
1689
+ window.open(
1690
+ `${Ae.licensePortalUrl}business/${je.businessId}/settings`,
1691
+ "_blank"
1692
+ );
1693
+ }
1694
+ async function k() {
1695
+ const A = `${Ae.licensePortalUrl}settings?businessId=${je.businessId}`;
1696
+ console.log("Opening", A), window.open(A, "_blank");
1697
+ }
1698
+ return Qe(async () => {
1699
+ await s(async () => {
1700
+ await o.readPremium(), await o.readLocations(), await o.readLocationDevices(), await n.readMembership(), await I(), u.value = n.membership;
1701
+ });
1702
+ }), (A, d) => {
1703
+ var De, Ve, $e, xe, He, ze, Oe;
1704
+ const V = U("FmPageHead"), T = U("FmButton"), ne = U("FmTextField"), ge = U("FmCard"), Re = U("FmPill"), wt = U("FmSelect"), ke = U("FmSwitch"), bt = U("FmMenuDivider");
1705
+ return x(), oe(pe, null, [
1706
+ _(V, {
1707
+ title: c(p)("connect.setting.title"),
1708
+ class: "xs:hidden"
1709
+ }, null, 8, ["title"]),
1710
+ h("div", kn, [
1711
+ h("div", Dn, F(c(p)("connect.setting.basicInfo.title")), 1),
1712
+ _(T, {
1713
+ icon: "info",
1714
+ variant: "tertiary"
1715
+ })
1716
+ ]),
1717
+ c(u) ? (x(), oe("div", Vn, [
1718
+ h("div", $n, [
1719
+ h("div", xn, F(c(p)("connect.setting.basicInfo.title")), 1),
1720
+ h("div", Hn, [
1721
+ _(ne, {
1722
+ label: c(p)("connect.setting.basicInfo.membershipTitle"),
1723
+ modelValue: c(u).name,
1724
+ "onUpdate:modelValue": d[0] || (d[0] = (C) => c(u).name = C)
1725
+ }, null, 8, ["label", "modelValue"]),
1726
+ _(ne, {
1727
+ disabled: !0,
1728
+ "model-value": c(u).business,
1729
+ rules: m,
1730
+ required: !0,
1731
+ label: c(p)("connect.setting.basicInfo.memberAppUrl"),
1732
+ "helper-text": c(E),
1733
+ placeholder: c(u).business.toString(),
1734
+ "onUpdate:modelValue": d[2] || (d[2] = (C) => c(u).url = C)
1735
+ }, {
1736
+ prepend: Y(() => [...d[14] || (d[14] = [
1737
+ Q(" https:// ", -1)
1738
+ ])]),
1739
+ append: Y(() => [
1740
+ Q(" ." + F(c(v)) + " ", 1),
1741
+ _(T, {
1742
+ icon: "content_copy",
1743
+ variant: "tertiary",
1744
+ onClick: d[1] || (d[1] = (C) => c(tt)(c(E)))
1745
+ })
1746
+ ]),
1747
+ _: 1
1748
+ }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1749
+ _(Pt, {
1750
+ label: "Cover image",
1751
+ class: "w-2/3 xs:w-full",
1752
+ "image-fit": "cover",
1753
+ "aspect-ratio": "3/1",
1754
+ thumbnail: c(u).image || void 0,
1755
+ "onUpdate:file": d[3] || (d[3] = async (C) => {
1756
+ M.value = C, C || (c(u).image = null);
1757
+ })
1758
+ }, null, 8, ["thumbnail"]),
1759
+ h("div", zn, [
1760
+ h("div", On, F(c(p)("connect.setting.counterApp.title")), 1),
1761
+ _(T, {
1762
+ variant: "plain",
1763
+ icon: "link",
1764
+ label: c(p)("connect.setting.counterApp.linkDevice"),
1765
+ onClick: y
1766
+ }, null, 8, ["label"]),
1767
+ (x(!0), oe(pe, null, Ct(c(o).locationDevices, (C, R) => (x(), le(ge, {
1768
+ key: R,
1769
+ variant: "outlined",
1770
+ class: "flex items-center justify-between px-16 py-12"
1771
+ }, {
1772
+ default: Y(() => [
1773
+ h("div", null, [
1774
+ h("p", Kn, F(C.name || `Device ${C._id}`), 1),
1775
+ h("p", Yn, " Activation date: " + F(c(Et)(c(Dt)(C._id.toString())).format(
1776
+ "D MMM YYYY"
1777
+ )), 1),
1778
+ h("p", jn, " Linked location: " + F(c(o).locations.find(($) => $._id == C.location).name), 1)
1779
+ ]),
1780
+ _(T, {
1781
+ icon: "link_off",
1782
+ variant: "tertiary",
1783
+ onClick: ($) => S(C._id)
1784
+ }, null, 8, ["onClick"])
1785
+ ]),
1786
+ _: 2
1787
+ }, 1024))), 128))
1788
+ ]),
1789
+ h("div", Jn, [
1790
+ h("div", Gn, [
1791
+ d[15] || (d[15] = Q(" Advertisement ", -1)),
1792
+ _(Re, { variant: "premium" })
1793
+ ]),
1794
+ _(ge, {
1795
+ variant: "outlined",
1796
+ class: "p-16 flex items-center justify-between"
1797
+ }, {
1798
+ default: Y(() => {
1799
+ var C;
1800
+ return [
1801
+ h("div", null, [
1802
+ d[16] || (d[16] = h("div", { class: "fm-typo-en-body-lg-600" }, "Manage Advertisements", -1)),
1803
+ h("div", qn, F(((C = c(u).advertisements) == null ? void 0 : C.length) ?? 0) + " active ad(s) showing on FeedMe ordering app ", 1)
1804
+ ]),
1805
+ _(T, {
1806
+ label: "Manage",
1807
+ icon: "arrow_forward",
1808
+ "icon-position": "right",
1809
+ disabled: !c(o).isPremium,
1810
+ onClick: d[4] || (d[4] = (R) => c(e).push({
1811
+ name: c(kt)["$connect-SETTING_ADVERTISEMENTS"]
1812
+ }))
1813
+ }, null, 8, ["disabled"])
1814
+ ];
1815
+ }),
1816
+ _: 1
1817
+ })
1818
+ ]),
1819
+ h("div", Qn, [
1820
+ d[17] || (d[17] = h("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1821
+ _(ne, {
1822
+ "model-value": ((De = c(u)) == null ? void 0 : De.brand) || "",
1823
+ "max-length": 15,
1824
+ label: "Brand Name",
1825
+ "show-word-count": "",
1826
+ "helper-text": `RM 0 ${((Ve = c(u)) == null ? void 0 : Ve.brand) || ""}: YOUR CUSTOMER MESSAGE`,
1827
+ "onUpdate:modelValue": d[5] || (d[5] = (C) => c(u).brand = C)
1828
+ }, null, 8, ["model-value", "helper-text"]),
1829
+ _(Ut, {
1830
+ modelValue: c(u).welcomeMessage,
1831
+ "onUpdate:modelValue": d[6] || (d[6] = (C) => c(u).welcomeMessage = C),
1832
+ variables: c(w),
1833
+ placeholder: "Hi there, you have been invited to join membership"
1834
+ }, null, 8, ["modelValue", "variables"])
1835
+ ]),
1836
+ h("div", Wn, [
1837
+ d[18] || (d[18] = h("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1838
+ d[19] || (d[19] = h("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Email address that will be used to send email broadcast ", -1)),
1839
+ c(f).length ? ye("", !0) : (x(), le(T, {
1840
+ key: 0,
1841
+ onClick: N,
1842
+ label: "Add new email address"
1843
+ })),
1844
+ c(f).length ? (x(), oe(pe, { key: 1 }, [
1845
+ _(wt, {
1846
+ "model-value": ((xe = ($e = c(u)) == null ? void 0 : $e.email) == null ? void 0 : xe.from) || null,
1847
+ label: "From Address",
1848
+ items: c(f).map((C) => ({
1849
+ label: C.emailAddress,
1850
+ value: C.emailAddress
1851
+ })),
1852
+ placeholder: c(B) ? c(B).emailAddress : "No email address available",
1853
+ "onUpdate:modelValue": d[7] || (d[7] = (C) => {
1854
+ var R, $;
1855
+ (R = c(u)) != null && R.email || (c(u).email = {
1856
+ from: C,
1857
+ name: ($ = c(f).find((he) => he.emailAddress == C)) == null ? void 0 : $.name
1858
+ }), c(u).email.from = C || null;
1859
+ }),
1860
+ rules: [c(Ke).ruleAtPath(c(g), "email.from")]
1861
+ }, null, 8, ["model-value", "items", "placeholder", "rules"]),
1862
+ _(ne, {
1863
+ "model-value": ((ze = (He = c(u)) == null ? void 0 : He.email) == null ? void 0 : ze.name) || null,
1864
+ label: "Sender name",
1865
+ disabled: "",
1866
+ placeholder: ((Oe = c(B)) == null ? void 0 : Oe.name) || null,
1867
+ "onUpdate:modelValue": d[8] || (d[8] = (C) => {
1868
+ var R;
1869
+ (R = c(u)) != null && R.email || (c(u).email = {
1870
+ name: C
1871
+ }), c(u).email.name = C || null;
1872
+ }),
1873
+ rules: [c(Ke).ruleAtPath(c(g), "email.name")]
1874
+ }, null, 8, ["model-value", "placeholder", "rules"])
1875
+ ], 64)) : ye("", !0)
1876
+ ]),
1877
+ h("div", Xn, [
1878
+ d[20] || (d[20] = h("div", { class: "fm-typo-en-title-sm-800" }, "Whatsapp Channel", -1)),
1879
+ d[21] || (d[21] = h("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)),
1880
+ _(T, {
1881
+ label: "Manage Whatsapp Channel",
1882
+ icon: "open_in_new",
1883
+ onClick: d[9] || (d[9] = (C) => k())
1884
+ })
1885
+ ]),
1886
+ h("div", Zn, [
1887
+ d[22] || (d[22] = h("div", { class: "fm-typo-en-title-sm-800" }, [
1888
+ Q(" Free Credit as Discount "),
1889
+ h("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
1890
+ ], -1)),
1891
+ _(ke, {
1892
+ "model-value": c(u).freeCreditAsDiscount ?? !1,
1893
+ "onUpdate:modelValue": d[10] || (d[10] = (C) => c(u).freeCreditAsDiscount = C),
1894
+ label: "Free Credit as Discount",
1895
+ sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
1896
+ "label-placement": "right",
1897
+ value: ""
1898
+ }, null, 8, ["model-value"])
1899
+ ]),
1900
+ h("div", eo, [
1901
+ h("div", to, [
1902
+ d[23] || (d[23] = Q(" Member Card ", -1)),
1903
+ _(Re, { variant: "premium" })
1904
+ ]),
1905
+ _(ke, {
1906
+ "model-value": c(u).cardEnable ?? !1,
1907
+ "onUpdate:modelValue": d[11] || (d[11] = (C) => c(u).cardEnable = C),
1908
+ label: "",
1909
+ sublabel: "Allow member to bind card via member app",
1910
+ "label-placement": "right",
1911
+ value: "",
1912
+ disabled: !c(o).isPremium
1913
+ }, null, 8, ["model-value", "disabled"])
1914
+ ]),
1915
+ h("div", no, [
1916
+ d[24] || (d[24] = h("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
1917
+ _(Tt, {
1918
+ label: "Select restaurant",
1919
+ "model-value": c(u).targetLocation ?? null,
1920
+ "onUpdate:modelValue": d[12] || (d[12] = (C) => c(u).targetLocation = C)
1921
+ }, null, 8, ["model-value"])
1922
+ ]),
1923
+ h("div", oo, [
1924
+ d[25] || (d[25] = h("div", { class: "fm-typo-en-title-sm-800" }, "Allowed Phone Countries", -1)),
1925
+ d[26] || (d[26] = h("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Restricts phone numbers on POS invite/search, member registration, and kiosk membership entry. ", -1)),
1926
+ _(Rn, {
1927
+ modelValue: c(u).allowedPhoneCountries,
1928
+ "onUpdate:modelValue": d[13] || (d[13] = (C) => c(u).allowedPhoneCountries = C)
1929
+ }, null, 8, ["modelValue"])
1930
+ ]),
1931
+ h("div", ro, [
1932
+ _(T, {
1933
+ label: "Update",
1934
+ type: "button",
1935
+ onClick: P,
1936
+ disabled: !!c(i).loadingQueue.length,
1937
+ loading: !!c(i).loadingQueue.length
1938
+ }, null, 8, ["disabled", "loading"])
1939
+ ])
1940
+ ])
1941
+ ]),
1942
+ h("div", io, [
1943
+ _(ge, {
1944
+ variant: "outlined",
1945
+ class: "flex flex-col p-24 gap-8"
1946
+ }, {
1947
+ default: Y(() => {
1948
+ var C, R, $;
1949
+ return [
1950
+ d[31] || (d[31] = h("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
1951
+ _(bt, { class: "my-4" }),
1952
+ h("div", null, [
1953
+ d[27] || (d[27] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
1954
+ h("div", so, F(c(u).name), 1)
1955
+ ]),
1956
+ h("div", null, [
1957
+ d[28] || (d[28] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
1958
+ h("div", lo, F((((C = c(u).advertisements) == null ? void 0 : C.length) ?? 0) || "No advertisments"), 1)
1959
+ ]),
1960
+ h("div", null, [
1961
+ d[29] || (d[29] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
1962
+ h("div", ao, F(c(u).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
1963
+ ]),
1964
+ h("div", null, [
1965
+ d[30] || (d[30] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
1966
+ h("div", uo, F(!c(u).targetLocation || c(u).targetLocation.length == c(Be)().locations.length ? "All locations" : ($ = (R = c(u)) == null ? void 0 : R.targetLocation) == null ? void 0 : $.map(
1967
+ (he) => c(o).locations.find((vt) => vt._id == he).name
1968
+ ).join(", ")), 1)
1969
+ ])
1970
+ ];
1971
+ }),
1972
+ _: 1
1973
+ })
1974
+ ])
1975
+ ])) : ye("", !0)
1976
+ ], 64);
1977
+ };
1978
+ }
1979
+ });
1980
+ export {
1981
+ Lo as default
1982
+ };