@feedmepos/mf-connect 0.0.12-beta.1 → 0.0.12-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.
- package/dist/{Analytic-DCypPSCk.js → Analytic-BM9j4mcq.js} +66 -67
- package/dist/{Broadcast-BiXJ08OV.js → Broadcast-5a7_nlK2.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CG-T97J3.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_Qo6Zw4.js} +8 -8
- package/dist/{Card-BWA16Yvc.js → Card-D2KXsf6D.js} +121 -121
- package/dist/{Collections-CeOCRniu.js → Collections-rsGMKAaE.js} +129 -141
- package/dist/{Credit-yiXs0edD.js → Credit-BnHW4aAx.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C8jMdyF8.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CBbNUBWX.js} +22 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DZ8DT8XN.js → EffectSheet.vue_vue_type_style_index_0_lang-Bj3dHqjH.js} +6 -6
- package/dist/{Experience-zOzaxMlr.js → Experience-DZ3QmVqZ.js} +7 -7
- package/dist/{Game-BO2phNz6.js → Game-DKCrkTue.js} +7 -7
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BksWmv66.js → ImageInput.vue_vue_type_script_setup_true_lang-ChLUJK77.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-rKwqVIRl.js → MainLayout-C4tOUQYb.js} +53 -20
- package/dist/{Marketing-IUflGjY9.js → Marketing-CgOPXO0b.js} +25 -25
- package/dist/{Member-B1g0QDuZ.js → Member-DgJzz-qV.js} +2 -2
- package/dist/MemberList-BNIpWj0x.js +1718 -0
- package/dist/{MemberTransactions-DeUgZhWj.js → MemberTransactions-BEYEel4q.js} +2 -2
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BJ1wLWMO.js +203 -0
- package/dist/{Mission-BbBIzoSj.js → Mission-V53rL7XT.js} +7 -7
- package/dist/{Point-BoWE9-OF.js → Point-BE7sbUpv.js} +7 -7
- package/dist/{Promotion-CEKdy76f.js → Promotion-A23HHyAW.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-fXEWwI4A.js → RuleGroup.vue_vue_type_script_setup_true_lang-CzOiRmO3.js} +14 -14
- package/dist/{Segment-DcvfWqAn.js → Segment-OjThR8-l.js} +18 -19
- package/dist/{Setting-BANOT6SA.js → Setting-Cv5FJWCG.js} +541 -571
- package/dist/Store-DQoSb0vC.js +1442 -0
- package/dist/{StoreRewards-CCvwfnOm.js → StoreRewards-DHdtRsdr.js} +74 -75
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CmrTA4-4.js → StoreTransactions.vue_vue_type_script_setup_true_lang-8BxMxOgb.js} +6 -6
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DEzXVza9.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B6DvQL2O.js} +1 -1
- package/dist/{Tier-ZdU-11IW.js → Tier-BWbAvEvT.js} +68 -71
- package/dist/{Title-blrd1TJo.js → Title-DuMvJSeo.js} +75 -78
- package/dist/{Transaction-DQAULKi7.js → Transaction-Dh9hUxxn.js} +1 -1
- package/dist/{Voucher-CYNCWSMT.js → Voucher-CDj33EVW.js} +37 -37
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/{app-tsDuwC_C.js → app-C-JARJOh.js} +1 -1
- package/dist/{app-DF3bTQH0.js → app-CJmGoLdT.js} +46 -46
- package/dist/app.js +1 -1
- package/dist/{campaign-c02TRgUx.js → campaign-0ym0cymh.js} +11 -13
- package/dist/{collection.fn-B6B0oNGr.js → collection.fn-DHlfGYAC.js} +2 -4
- package/dist/{dto-DWMeu-Hm.js → dto-DHLYS7Rm.js} +239 -239
- package/dist/{effect-CaLNCyhR.js → effect-lIau3gAr.js} +1 -1
- package/dist/{export-Bz6PLxJ9.js → export-C2z8mAAK.js} +3 -3
- package/dist/{helper-B2o3ew7J.js → helper-Dk7nQLD9.js} +1 -1
- package/dist/{index-BxtNSMK4.js → index-BacICqbE.js} +217 -232
- package/dist/{index-DPo8jwQP.js → index-BiKKeruN.js} +1 -1
- package/dist/{index-DTd_z4wT.js → index-BifZnXOd.js} +7 -7
- package/dist/{index-DaQFDFz-.js → index-BuYuArTc.js} +2 -2
- package/dist/{index-BToo2gFr.js → index-CoNWSPv-.js} +1 -1
- package/dist/{index-BChayEiC.js → index-CwRopfKJ.js} +68 -105
- package/dist/{index-CCfSx-gc.js → index-DBs-f_OF.js} +27 -28
- package/dist/{index-CTGAvDfj.js → index-DrekSEPv.js} +36 -43
- package/dist/{index-D0Ya3m-m.js → index-Dy-njFA-.js} +1 -1
- package/dist/{index-nmfbRO9K.js → index-jXbGzZIZ.js} +1 -1
- package/dist/{loading-CZwfD-e9.js → loading-C0Im7NLc.js} +4 -4
- package/dist/{lodash-Cc_bj1bL.js → lodash-DRiB9OLu.js} +1 -1
- package/dist/{membership-qjZf5wAq.js → membership-BWDFt2D0.js} +3 -3
- package/dist/{money-3UQ9c3mO.js → money-CgXcfonm.js} +1 -1
- package/dist/{number-WEVutPPD.js → number-B0SphtT-.js} +3 -3
- package/dist/{rule-D0BranxC.js → rule-CWGFyRio.js} +2 -2
- package/dist/{rule-builder-YrjEqgOu.js → rule-builder-C484wKRf.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CiXPt8Gv.js → template-DDHe5agw.js} +6 -6
- package/dist/{usePagination-D-zzWGQR.js → usePagination-D0-ih-vZ.js} +1 -1
- package/dist/{xlsx-CEATNjcT.js → xlsx-D9dXZPK6.js} +309 -309
- package/package.json +1 -1
- package/dist/MainLayout-q19w--ta.js +0 -41
- package/dist/MemberList-DxfLply-.js +0 -1729
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bd8FRdKw.js +0 -432
- package/dist/Store-LIm_vhSQ.js +0 -1456
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
- package/dist/zod-W_PvIofQ.js +0 -90
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
var ee = {}, Ct = function() {
|
|
1
|
+
import { defineComponent as Re, ref as z, computed as ie, onMounted as De, resolveComponent as U, openBlock as V, createBlock as we, withCtx as G, createElementVNode as b, createVNode as M, unref as m, isRef as ke, createElementBlock as q, Fragment as fe, createTextVNode as Q, toDisplayString as k, renderList as Ie, createCommentVNode as Pe } from "vue";
|
|
2
|
+
import { h as rt } from "./moment-BWErdI6_.js";
|
|
3
|
+
import { useDialog as Ve } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as xe, u as it, p as st, f as K } from "./loading-C0Im7NLc.js";
|
|
5
|
+
import { a as be, l as $e, u as at } from "./app-CJmGoLdT.js";
|
|
6
|
+
import { u as ze } from "./membership-BWDFt2D0.js";
|
|
7
|
+
import { l as lt } from "./index-DrekSEPv.js";
|
|
8
|
+
import { _ as Ne } from "./ImageInput.vue_vue_type_script_setup_true_lang-ChLUJK77.js";
|
|
9
|
+
import { _ as ct } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-B6DvQL2O.js";
|
|
10
|
+
import { _ as ut } from "./MessageInput.vue_vue_type_script_setup_true_lang-BJ1wLWMO.js";
|
|
11
|
+
import { m as dt } from "./index-BiKKeruN.js";
|
|
12
|
+
import { o as ft } from "./objectId-dwaoBfJX.js";
|
|
13
|
+
import { a as gt } from "./object-qECH92oz.js";
|
|
14
|
+
var Z = {}, ht = function() {
|
|
16
15
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
17
|
-
},
|
|
18
|
-
let
|
|
19
|
-
const
|
|
16
|
+
}, He = {}, I = {};
|
|
17
|
+
let Be;
|
|
18
|
+
const mt = [
|
|
20
19
|
0,
|
|
21
20
|
// Not used
|
|
22
21
|
26,
|
|
@@ -60,32 +59,32 @@ const _t = [
|
|
|
60
59
|
3532,
|
|
61
60
|
3706
|
|
62
61
|
];
|
|
63
|
-
|
|
62
|
+
I.getSymbolSize = function(e) {
|
|
64
63
|
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
65
64
|
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
66
65
|
return e * 4 + 17;
|
|
67
66
|
};
|
|
68
|
-
|
|
69
|
-
return
|
|
67
|
+
I.getSymbolTotalCodewords = function(e) {
|
|
68
|
+
return mt[e];
|
|
70
69
|
};
|
|
71
|
-
|
|
70
|
+
I.getBCHDigit = function(t) {
|
|
72
71
|
let e = 0;
|
|
73
72
|
for (; t !== 0; )
|
|
74
73
|
e++, t >>>= 1;
|
|
75
74
|
return e;
|
|
76
75
|
};
|
|
77
|
-
|
|
76
|
+
I.setToSJISFunction = function(e) {
|
|
78
77
|
if (typeof e != "function")
|
|
79
78
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
80
|
-
|
|
79
|
+
Be = e;
|
|
81
80
|
};
|
|
82
|
-
|
|
83
|
-
return typeof
|
|
81
|
+
I.isKanjiModeEnabled = function() {
|
|
82
|
+
return typeof Be < "u";
|
|
84
83
|
};
|
|
85
|
-
|
|
86
|
-
return
|
|
84
|
+
I.toSJIS = function(e) {
|
|
85
|
+
return Be(e);
|
|
87
86
|
};
|
|
88
|
-
var
|
|
87
|
+
var le = {};
|
|
89
88
|
(function(t) {
|
|
90
89
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
91
90
|
function e(i) {
|
|
@@ -119,11 +118,11 @@ var ce = {};
|
|
|
119
118
|
return o;
|
|
120
119
|
}
|
|
121
120
|
};
|
|
122
|
-
})(
|
|
123
|
-
function
|
|
121
|
+
})(le);
|
|
122
|
+
function Ke() {
|
|
124
123
|
this.buffer = [], this.length = 0;
|
|
125
124
|
}
|
|
126
|
-
|
|
125
|
+
Ke.prototype = {
|
|
127
126
|
get: function(t) {
|
|
128
127
|
const e = Math.floor(t / 8);
|
|
129
128
|
return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
|
|
@@ -140,28 +139,28 @@ Ge.prototype = {
|
|
|
140
139
|
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
141
140
|
}
|
|
142
141
|
};
|
|
143
|
-
var
|
|
144
|
-
function
|
|
142
|
+
var pt = Ke;
|
|
143
|
+
function ee(t) {
|
|
145
144
|
if (!t || t < 1)
|
|
146
145
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
147
146
|
this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
|
|
148
147
|
}
|
|
149
|
-
|
|
148
|
+
ee.prototype.set = function(t, e, i, r) {
|
|
150
149
|
const o = t * this.size + e;
|
|
151
150
|
this.data[o] = i, r && (this.reservedBit[o] = !0);
|
|
152
151
|
};
|
|
153
|
-
|
|
152
|
+
ee.prototype.get = function(t, e) {
|
|
154
153
|
return this.data[t * this.size + e];
|
|
155
154
|
};
|
|
156
|
-
|
|
155
|
+
ee.prototype.xor = function(t, e, i) {
|
|
157
156
|
this.data[t * this.size + e] ^= i;
|
|
158
157
|
};
|
|
159
|
-
|
|
158
|
+
ee.prototype.isReserved = function(t, e) {
|
|
160
159
|
return this.reservedBit[t * this.size + e];
|
|
161
160
|
};
|
|
162
|
-
var
|
|
161
|
+
var yt = ee, Oe = {};
|
|
163
162
|
(function(t) {
|
|
164
|
-
const e =
|
|
163
|
+
const e = I.getSymbolSize;
|
|
165
164
|
t.getRowColCoords = function(r) {
|
|
166
165
|
if (r === 1) return [];
|
|
167
166
|
const o = Math.floor(r / 7) + 2, n = e(r), a = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, s = [n - 7];
|
|
@@ -177,21 +176,21 @@ var Bt = te, Qe = {};
|
|
|
177
176
|
s === a - 1 && l === 0 || o.push([n[s], n[l]]);
|
|
178
177
|
return o;
|
|
179
178
|
};
|
|
180
|
-
})(
|
|
181
|
-
var
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
const i =
|
|
179
|
+
})(Oe);
|
|
180
|
+
var Ye = {};
|
|
181
|
+
const wt = I.getSymbolSize, Le = 7;
|
|
182
|
+
Ye.getPositions = function(e) {
|
|
183
|
+
const i = wt(e);
|
|
185
184
|
return [
|
|
186
185
|
// top-left
|
|
187
186
|
[0, 0],
|
|
188
187
|
// top-right
|
|
189
|
-
[i -
|
|
188
|
+
[i - Le, 0],
|
|
190
189
|
// bottom-left
|
|
191
|
-
[0, i -
|
|
190
|
+
[0, i - Le]
|
|
192
191
|
];
|
|
193
192
|
};
|
|
194
|
-
var
|
|
193
|
+
var je = {};
|
|
195
194
|
(function(t) {
|
|
196
195
|
t.Patterns = {
|
|
197
196
|
PATTERN000: 0,
|
|
@@ -215,12 +214,12 @@ var Xe = {};
|
|
|
215
214
|
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
216
215
|
}, t.getPenaltyN1 = function(o) {
|
|
217
216
|
const n = o.size;
|
|
218
|
-
let a = 0, s = 0, l = 0,
|
|
217
|
+
let a = 0, s = 0, l = 0, f = null, g = null;
|
|
219
218
|
for (let B = 0; B < n; B++) {
|
|
220
|
-
s = l = 0,
|
|
219
|
+
s = l = 0, f = g = null;
|
|
221
220
|
for (let h = 0; h < n; h++) {
|
|
222
|
-
let
|
|
223
|
-
|
|
221
|
+
let u = o.get(B, h);
|
|
222
|
+
u === f ? s++ : (s >= 5 && (a += e.N1 + (s - 5)), f = u, s = 1), u = o.get(h, B), u === g ? l++ : (l >= 5 && (a += e.N1 + (l - 5)), g = u, l = 1);
|
|
224
223
|
}
|
|
225
224
|
s >= 5 && (a += e.N1 + (s - 5)), l >= 5 && (a += e.N1 + (l - 5));
|
|
226
225
|
}
|
|
@@ -230,17 +229,17 @@ var Xe = {};
|
|
|
230
229
|
let a = 0;
|
|
231
230
|
for (let s = 0; s < n - 1; s++)
|
|
232
231
|
for (let l = 0; l < n - 1; l++) {
|
|
233
|
-
const
|
|
234
|
-
(
|
|
232
|
+
const f = o.get(s, l) + o.get(s, l + 1) + o.get(s + 1, l) + o.get(s + 1, l + 1);
|
|
233
|
+
(f === 4 || f === 0) && a++;
|
|
235
234
|
}
|
|
236
235
|
return a * e.N2;
|
|
237
236
|
}, t.getPenaltyN3 = function(o) {
|
|
238
237
|
const n = o.size;
|
|
239
238
|
let a = 0, s = 0, l = 0;
|
|
240
|
-
for (let
|
|
239
|
+
for (let f = 0; f < n; f++) {
|
|
241
240
|
s = l = 0;
|
|
242
241
|
for (let g = 0; g < n; g++)
|
|
243
|
-
s = s << 1 & 2047 | o.get(
|
|
242
|
+
s = s << 1 & 2047 | o.get(f, g), g >= 10 && (s === 1488 || s === 93) && a++, l = l << 1 & 2047 | o.get(g, f), g >= 10 && (l === 1488 || l === 93) && a++;
|
|
244
243
|
}
|
|
245
244
|
return a * e.N3;
|
|
246
245
|
}, t.getPenaltyN4 = function(o) {
|
|
@@ -279,16 +278,16 @@ var Xe = {};
|
|
|
279
278
|
}, t.getBestMask = function(o, n) {
|
|
280
279
|
const a = Object.keys(t.Patterns).length;
|
|
281
280
|
let s = 0, l = 1 / 0;
|
|
282
|
-
for (let
|
|
283
|
-
n(
|
|
281
|
+
for (let f = 0; f < a; f++) {
|
|
282
|
+
n(f), t.applyMask(f, o);
|
|
284
283
|
const g = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
|
|
285
|
-
t.applyMask(
|
|
284
|
+
t.applyMask(f, o), g < l && (l = g, s = f);
|
|
286
285
|
}
|
|
287
286
|
return s;
|
|
288
287
|
};
|
|
289
|
-
})(
|
|
290
|
-
var
|
|
291
|
-
const x =
|
|
288
|
+
})(je);
|
|
289
|
+
var ce = {};
|
|
290
|
+
const x = le, oe = [
|
|
292
291
|
// L M Q H
|
|
293
292
|
1,
|
|
294
293
|
1,
|
|
@@ -450,7 +449,7 @@ const x = ce, re = [
|
|
|
450
449
|
49,
|
|
451
450
|
68,
|
|
452
451
|
81
|
|
453
|
-
],
|
|
452
|
+
], re = [
|
|
454
453
|
// L M Q H
|
|
455
454
|
7,
|
|
456
455
|
10,
|
|
@@ -613,55 +612,55 @@ const x = ce, re = [
|
|
|
613
612
|
2040,
|
|
614
613
|
2430
|
|
615
614
|
];
|
|
616
|
-
|
|
615
|
+
ce.getBlocksCount = function(e, i) {
|
|
617
616
|
switch (i) {
|
|
618
617
|
case x.L:
|
|
619
|
-
return
|
|
618
|
+
return oe[(e - 1) * 4 + 0];
|
|
620
619
|
case x.M:
|
|
621
|
-
return
|
|
620
|
+
return oe[(e - 1) * 4 + 1];
|
|
622
621
|
case x.Q:
|
|
623
|
-
return
|
|
622
|
+
return oe[(e - 1) * 4 + 2];
|
|
624
623
|
case x.H:
|
|
625
|
-
return
|
|
624
|
+
return oe[(e - 1) * 4 + 3];
|
|
626
625
|
default:
|
|
627
626
|
return;
|
|
628
627
|
}
|
|
629
628
|
};
|
|
630
|
-
|
|
629
|
+
ce.getTotalCodewordsCount = function(e, i) {
|
|
631
630
|
switch (i) {
|
|
632
631
|
case x.L:
|
|
633
|
-
return
|
|
632
|
+
return re[(e - 1) * 4 + 0];
|
|
634
633
|
case x.M:
|
|
635
|
-
return
|
|
634
|
+
return re[(e - 1) * 4 + 1];
|
|
636
635
|
case x.Q:
|
|
637
|
-
return
|
|
636
|
+
return re[(e - 1) * 4 + 2];
|
|
638
637
|
case x.H:
|
|
639
|
-
return
|
|
638
|
+
return re[(e - 1) * 4 + 3];
|
|
640
639
|
default:
|
|
641
640
|
return;
|
|
642
641
|
}
|
|
643
642
|
};
|
|
644
|
-
var
|
|
645
|
-
const X = new Uint8Array(512),
|
|
643
|
+
var Je = {}, ue = {};
|
|
644
|
+
const X = new Uint8Array(512), se = new Uint8Array(256);
|
|
646
645
|
(function() {
|
|
647
646
|
let e = 1;
|
|
648
647
|
for (let i = 0; i < 255; i++)
|
|
649
|
-
X[i] = e,
|
|
648
|
+
X[i] = e, se[e] = i, e <<= 1, e & 256 && (e ^= 285);
|
|
650
649
|
for (let i = 255; i < 512; i++)
|
|
651
650
|
X[i] = X[i - 255];
|
|
652
651
|
})();
|
|
653
|
-
|
|
652
|
+
ue.log = function(e) {
|
|
654
653
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
655
|
-
return
|
|
654
|
+
return se[e];
|
|
656
655
|
};
|
|
657
|
-
|
|
656
|
+
ue.exp = function(e) {
|
|
658
657
|
return X[e];
|
|
659
658
|
};
|
|
660
|
-
|
|
661
|
-
return e === 0 || i === 0 ? 0 : X[
|
|
659
|
+
ue.mul = function(e, i) {
|
|
660
|
+
return e === 0 || i === 0 ? 0 : X[se[e] + se[i]];
|
|
662
661
|
};
|
|
663
662
|
(function(t) {
|
|
664
|
-
const e =
|
|
663
|
+
const e = ue;
|
|
665
664
|
t.mul = function(r, o) {
|
|
666
665
|
const n = new Uint8Array(r.length + o.length - 1);
|
|
667
666
|
for (let a = 0; a < r.length; a++)
|
|
@@ -685,53 +684,53 @@ de.mul = function(e, i) {
|
|
|
685
684
|
o = t.mul(o, new Uint8Array([1, e.exp(n)]));
|
|
686
685
|
return o;
|
|
687
686
|
};
|
|
688
|
-
})(
|
|
689
|
-
const
|
|
690
|
-
function
|
|
687
|
+
})(Je);
|
|
688
|
+
const qe = Je;
|
|
689
|
+
function Ae(t) {
|
|
691
690
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
692
691
|
}
|
|
693
|
-
|
|
694
|
-
this.degree = e, this.genPoly =
|
|
692
|
+
Ae.prototype.initialize = function(e) {
|
|
693
|
+
this.degree = e, this.genPoly = qe.generateECPolynomial(this.degree);
|
|
695
694
|
};
|
|
696
|
-
|
|
695
|
+
Ae.prototype.encode = function(e) {
|
|
697
696
|
if (!this.genPoly)
|
|
698
697
|
throw new Error("Encoder not initialized");
|
|
699
698
|
const i = new Uint8Array(e.length + this.degree);
|
|
700
699
|
i.set(e);
|
|
701
|
-
const r =
|
|
700
|
+
const r = qe.mod(i, this.genPoly), o = this.degree - r.length;
|
|
702
701
|
if (o > 0) {
|
|
703
702
|
const n = new Uint8Array(this.degree);
|
|
704
703
|
return n.set(r, o), n;
|
|
705
704
|
}
|
|
706
705
|
return r;
|
|
707
706
|
};
|
|
708
|
-
var
|
|
709
|
-
|
|
707
|
+
var bt = Ae, Ge = {}, $ = {}, Me = {};
|
|
708
|
+
Me.isValid = function(e) {
|
|
710
709
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
711
710
|
};
|
|
712
|
-
var
|
|
713
|
-
const
|
|
714
|
-
let
|
|
715
|
-
|
|
716
|
-
const
|
|
711
|
+
var F = {};
|
|
712
|
+
const Qe = "[0-9]+", vt = "[A-Z $%*+\\-./:]+";
|
|
713
|
+
let W = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
714
|
+
W = W.replace(/u/g, "\\u");
|
|
715
|
+
const Ct = "(?:(?![A-Z0-9 $%*+\\-./:]|" + W + `)(?:.|[\r
|
|
717
716
|
]))+`;
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
return
|
|
717
|
+
F.KANJI = new RegExp(W, "g");
|
|
718
|
+
F.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
719
|
+
F.BYTE = new RegExp(Ct, "g");
|
|
720
|
+
F.NUMERIC = new RegExp(Qe, "g");
|
|
721
|
+
F.ALPHANUMERIC = new RegExp(vt, "g");
|
|
722
|
+
const _t = new RegExp("^" + W + "$"), Et = new RegExp("^" + Qe + "$"), Bt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
723
|
+
F.testKanji = function(e) {
|
|
724
|
+
return _t.test(e);
|
|
726
725
|
};
|
|
727
|
-
|
|
728
|
-
return
|
|
726
|
+
F.testNumeric = function(e) {
|
|
727
|
+
return Et.test(e);
|
|
729
728
|
};
|
|
730
|
-
|
|
731
|
-
return
|
|
729
|
+
F.testAlphanumeric = function(e) {
|
|
730
|
+
return Bt.test(e);
|
|
732
731
|
};
|
|
733
732
|
(function(t) {
|
|
734
|
-
const e =
|
|
733
|
+
const e = Me, i = F;
|
|
735
734
|
t.NUMERIC = {
|
|
736
735
|
id: "Numeric",
|
|
737
736
|
bit: 1,
|
|
@@ -790,100 +789,100 @@ R.testAlphanumeric = function(e) {
|
|
|
790
789
|
};
|
|
791
790
|
})($);
|
|
792
791
|
(function(t) {
|
|
793
|
-
const e =
|
|
794
|
-
function l(h,
|
|
792
|
+
const e = I, i = ce, r = le, o = $, n = Me, a = 7973, s = e.getBCHDigit(a);
|
|
793
|
+
function l(h, u, w) {
|
|
795
794
|
for (let v = 1; v <= 40; v++)
|
|
796
|
-
if (
|
|
795
|
+
if (u <= t.getCapacity(v, w, h))
|
|
797
796
|
return v;
|
|
798
797
|
}
|
|
799
|
-
function
|
|
800
|
-
return o.getCharCountIndicator(h,
|
|
798
|
+
function f(h, u) {
|
|
799
|
+
return o.getCharCountIndicator(h, u) + 4;
|
|
801
800
|
}
|
|
802
|
-
function g(h,
|
|
803
|
-
let
|
|
801
|
+
function g(h, u) {
|
|
802
|
+
let w = 0;
|
|
804
803
|
return h.forEach(function(v) {
|
|
805
|
-
const S =
|
|
806
|
-
|
|
807
|
-
}),
|
|
804
|
+
const S = f(v.mode, u);
|
|
805
|
+
w += S + v.getBitsLength();
|
|
806
|
+
}), w;
|
|
808
807
|
}
|
|
809
|
-
function B(h,
|
|
810
|
-
for (let
|
|
811
|
-
if (g(h,
|
|
812
|
-
return
|
|
808
|
+
function B(h, u) {
|
|
809
|
+
for (let w = 1; w <= 40; w++)
|
|
810
|
+
if (g(h, w) <= t.getCapacity(w, u, o.MIXED))
|
|
811
|
+
return w;
|
|
813
812
|
}
|
|
814
|
-
t.from = function(
|
|
815
|
-
return n.isValid(
|
|
816
|
-
}, t.getCapacity = function(
|
|
817
|
-
if (!n.isValid(
|
|
813
|
+
t.from = function(u, w) {
|
|
814
|
+
return n.isValid(u) ? parseInt(u, 10) : w;
|
|
815
|
+
}, t.getCapacity = function(u, w, v) {
|
|
816
|
+
if (!n.isValid(u))
|
|
818
817
|
throw new Error("Invalid QR Code version");
|
|
819
818
|
typeof v > "u" && (v = o.BYTE);
|
|
820
|
-
const S = e.getSymbolTotalCodewords(
|
|
821
|
-
if (v === o.MIXED) return
|
|
822
|
-
const
|
|
819
|
+
const S = e.getSymbolTotalCodewords(u), y = i.getTotalCodewordsCount(u, w), d = (S - y) * 8;
|
|
820
|
+
if (v === o.MIXED) return d;
|
|
821
|
+
const c = d - f(v, u);
|
|
823
822
|
switch (v) {
|
|
824
823
|
case o.NUMERIC:
|
|
825
|
-
return Math.floor(
|
|
824
|
+
return Math.floor(c / 10 * 3);
|
|
826
825
|
case o.ALPHANUMERIC:
|
|
827
|
-
return Math.floor(
|
|
826
|
+
return Math.floor(c / 11 * 2);
|
|
828
827
|
case o.KANJI:
|
|
829
|
-
return Math.floor(
|
|
828
|
+
return Math.floor(c / 13);
|
|
830
829
|
case o.BYTE:
|
|
831
830
|
default:
|
|
832
|
-
return Math.floor(
|
|
831
|
+
return Math.floor(c / 8);
|
|
833
832
|
}
|
|
834
|
-
}, t.getBestVersionForData = function(
|
|
833
|
+
}, t.getBestVersionForData = function(u, w) {
|
|
835
834
|
let v;
|
|
836
|
-
const S = r.from(
|
|
837
|
-
if (Array.isArray(
|
|
838
|
-
if (
|
|
839
|
-
return B(
|
|
840
|
-
if (
|
|
835
|
+
const S = r.from(w, r.M);
|
|
836
|
+
if (Array.isArray(u)) {
|
|
837
|
+
if (u.length > 1)
|
|
838
|
+
return B(u, S);
|
|
839
|
+
if (u.length === 0)
|
|
841
840
|
return 1;
|
|
842
|
-
v =
|
|
841
|
+
v = u[0];
|
|
843
842
|
} else
|
|
844
|
-
v =
|
|
843
|
+
v = u;
|
|
845
844
|
return l(v.mode, v.getLength(), S);
|
|
846
|
-
}, t.getEncodedBits = function(
|
|
847
|
-
if (!n.isValid(
|
|
845
|
+
}, t.getEncodedBits = function(u) {
|
|
846
|
+
if (!n.isValid(u) || u < 7)
|
|
848
847
|
throw new Error("Invalid QR Code version");
|
|
849
|
-
let
|
|
850
|
-
for (; e.getBCHDigit(
|
|
851
|
-
|
|
852
|
-
return
|
|
848
|
+
let w = u << 12;
|
|
849
|
+
for (; e.getBCHDigit(w) - s >= 0; )
|
|
850
|
+
w ^= a << e.getBCHDigit(w) - s;
|
|
851
|
+
return u << 12 | w;
|
|
853
852
|
};
|
|
854
|
-
})(
|
|
855
|
-
var
|
|
856
|
-
const
|
|
857
|
-
|
|
853
|
+
})(Ge);
|
|
854
|
+
var Xe = {};
|
|
855
|
+
const ve = I, We = 1335, At = 21522, Ue = ve.getBCHDigit(We);
|
|
856
|
+
Xe.getEncodedBits = function(e, i) {
|
|
858
857
|
const r = e.bit << 3 | i;
|
|
859
858
|
let o = r << 10;
|
|
860
|
-
for (;
|
|
861
|
-
o ^=
|
|
862
|
-
return (r << 10 | o) ^
|
|
859
|
+
for (; ve.getBCHDigit(o) - Ue >= 0; )
|
|
860
|
+
o ^= We << ve.getBCHDigit(o) - Ue;
|
|
861
|
+
return (r << 10 | o) ^ At;
|
|
863
862
|
};
|
|
864
|
-
var
|
|
865
|
-
const
|
|
866
|
-
function
|
|
867
|
-
this.mode =
|
|
863
|
+
var Ze = {};
|
|
864
|
+
const Mt = $;
|
|
865
|
+
function O(t) {
|
|
866
|
+
this.mode = Mt.NUMERIC, this.data = t.toString();
|
|
868
867
|
}
|
|
869
|
-
|
|
868
|
+
O.getBitsLength = function(e) {
|
|
870
869
|
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
871
870
|
};
|
|
872
|
-
|
|
871
|
+
O.prototype.getLength = function() {
|
|
873
872
|
return this.data.length;
|
|
874
873
|
};
|
|
875
|
-
|
|
876
|
-
return
|
|
874
|
+
O.prototype.getBitsLength = function() {
|
|
875
|
+
return O.getBitsLength(this.data.length);
|
|
877
876
|
};
|
|
878
|
-
|
|
877
|
+
O.prototype.write = function(e) {
|
|
879
878
|
let i, r, o;
|
|
880
879
|
for (i = 0; i + 3 <= this.data.length; i += 3)
|
|
881
880
|
r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
|
|
882
881
|
const n = this.data.length - i;
|
|
883
882
|
n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
|
|
884
883
|
};
|
|
885
|
-
var
|
|
886
|
-
const
|
|
884
|
+
var St = O;
|
|
885
|
+
const Tt = $, ge = [
|
|
887
886
|
"0",
|
|
888
887
|
"1",
|
|
889
888
|
"2",
|
|
@@ -930,19 +929,19 @@ const Rt = $, ge = [
|
|
|
930
929
|
"/",
|
|
931
930
|
":"
|
|
932
931
|
];
|
|
933
|
-
function
|
|
934
|
-
this.mode =
|
|
932
|
+
function Y(t) {
|
|
933
|
+
this.mode = Tt.ALPHANUMERIC, this.data = t;
|
|
935
934
|
}
|
|
936
|
-
|
|
935
|
+
Y.getBitsLength = function(e) {
|
|
937
936
|
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
938
937
|
};
|
|
939
|
-
|
|
938
|
+
Y.prototype.getLength = function() {
|
|
940
939
|
return this.data.length;
|
|
941
940
|
};
|
|
942
|
-
|
|
943
|
-
return
|
|
941
|
+
Y.prototype.getBitsLength = function() {
|
|
942
|
+
return Y.getBitsLength(this.data.length);
|
|
944
943
|
};
|
|
945
|
-
|
|
944
|
+
Y.prototype.write = function(e) {
|
|
946
945
|
let i;
|
|
947
946
|
for (i = 0; i + 2 <= this.data.length; i += 2) {
|
|
948
947
|
let r = ge.indexOf(this.data[i]) * 45;
|
|
@@ -950,7 +949,7 @@ j.prototype.write = function(e) {
|
|
|
950
949
|
}
|
|
951
950
|
this.data.length % 2 && e.put(ge.indexOf(this.data[i]), 6);
|
|
952
951
|
};
|
|
953
|
-
var
|
|
952
|
+
var It = Y, Pt = function(e) {
|
|
954
953
|
for (var i = [], r = e.length, o = 0; o < r; o++) {
|
|
955
954
|
var n = e.charCodeAt(o);
|
|
956
955
|
if (n >= 55296 && n <= 56319 && r > o + 1) {
|
|
@@ -977,41 +976,41 @@ var Dt = j, kt = function(e) {
|
|
|
977
976
|
}
|
|
978
977
|
return new Uint8Array(i).buffer;
|
|
979
978
|
};
|
|
980
|
-
const
|
|
981
|
-
function
|
|
982
|
-
this.mode =
|
|
979
|
+
const Nt = Pt, Lt = $;
|
|
980
|
+
function j(t) {
|
|
981
|
+
this.mode = Lt.BYTE, typeof t == "string" && (t = Nt(t)), this.data = new Uint8Array(t);
|
|
983
982
|
}
|
|
984
|
-
|
|
983
|
+
j.getBitsLength = function(e) {
|
|
985
984
|
return e * 8;
|
|
986
985
|
};
|
|
987
|
-
|
|
986
|
+
j.prototype.getLength = function() {
|
|
988
987
|
return this.data.length;
|
|
989
988
|
};
|
|
990
|
-
|
|
991
|
-
return
|
|
989
|
+
j.prototype.getBitsLength = function() {
|
|
990
|
+
return j.getBitsLength(this.data.length);
|
|
992
991
|
};
|
|
993
|
-
|
|
992
|
+
j.prototype.write = function(t) {
|
|
994
993
|
for (let e = 0, i = this.data.length; e < i; e++)
|
|
995
994
|
t.put(this.data[e], 8);
|
|
996
995
|
};
|
|
997
|
-
var
|
|
998
|
-
const
|
|
999
|
-
function
|
|
1000
|
-
this.mode =
|
|
996
|
+
var Ut = j;
|
|
997
|
+
const Ft = $, Rt = I;
|
|
998
|
+
function J(t) {
|
|
999
|
+
this.mode = Ft.KANJI, this.data = t;
|
|
1001
1000
|
}
|
|
1002
|
-
|
|
1001
|
+
J.getBitsLength = function(e) {
|
|
1003
1002
|
return e * 13;
|
|
1004
1003
|
};
|
|
1005
|
-
|
|
1004
|
+
J.prototype.getLength = function() {
|
|
1006
1005
|
return this.data.length;
|
|
1007
1006
|
};
|
|
1008
|
-
|
|
1009
|
-
return
|
|
1007
|
+
J.prototype.getBitsLength = function() {
|
|
1008
|
+
return J.getBitsLength(this.data.length);
|
|
1010
1009
|
};
|
|
1011
|
-
|
|
1010
|
+
J.prototype.write = function(t) {
|
|
1012
1011
|
let e;
|
|
1013
1012
|
for (e = 0; e < this.data.length; e++) {
|
|
1014
|
-
let i =
|
|
1013
|
+
let i = Rt.toSJIS(this.data[e]);
|
|
1015
1014
|
if (i >= 33088 && i <= 40956)
|
|
1016
1015
|
i -= 33088;
|
|
1017
1016
|
else if (i >= 57408 && i <= 60351)
|
|
@@ -1024,7 +1023,7 @@ Make sure your charset is UTF-8`
|
|
|
1024
1023
|
i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
|
|
1025
1024
|
}
|
|
1026
1025
|
};
|
|
1027
|
-
var
|
|
1026
|
+
var Dt = J, et = { exports: {} };
|
|
1028
1027
|
(function(t) {
|
|
1029
1028
|
var e = {
|
|
1030
1029
|
single_source_shortest_paths: function(i, r, o) {
|
|
@@ -1032,14 +1031,14 @@ var Kt = q, st = { exports: {} };
|
|
|
1032
1031
|
a[r] = 0;
|
|
1033
1032
|
var s = e.PriorityQueue.make();
|
|
1034
1033
|
s.push(r, 0);
|
|
1035
|
-
for (var l,
|
|
1036
|
-
l = s.pop(),
|
|
1034
|
+
for (var l, f, g, B, h, u, w, v, S; !s.empty(); ) {
|
|
1035
|
+
l = s.pop(), f = l.value, B = l.cost, h = i[f] || {};
|
|
1037
1036
|
for (g in h)
|
|
1038
|
-
h.hasOwnProperty(g) && (
|
|
1037
|
+
h.hasOwnProperty(g) && (u = h[g], w = B + u, v = a[g], S = typeof a[g] > "u", (S || v > w) && (a[g] = w, s.push(g, w), n[g] = f));
|
|
1039
1038
|
}
|
|
1040
1039
|
if (typeof o < "u" && typeof a[o] > "u") {
|
|
1041
|
-
var
|
|
1042
|
-
throw new Error(
|
|
1040
|
+
var y = ["Could not find a path from ", r, " to ", o, "."].join("");
|
|
1041
|
+
throw new Error(y);
|
|
1043
1042
|
}
|
|
1044
1043
|
return n;
|
|
1045
1044
|
},
|
|
@@ -1089,29 +1088,29 @@ var Kt = q, st = { exports: {} };
|
|
|
1089
1088
|
}
|
|
1090
1089
|
};
|
|
1091
1090
|
t.exports = e;
|
|
1092
|
-
})(
|
|
1093
|
-
var
|
|
1091
|
+
})(et);
|
|
1092
|
+
var kt = et.exports;
|
|
1094
1093
|
(function(t) {
|
|
1095
|
-
const e = $, i =
|
|
1096
|
-
function
|
|
1097
|
-
return unescape(encodeURIComponent(
|
|
1094
|
+
const e = $, i = St, r = It, o = Ut, n = Dt, a = F, s = I, l = kt;
|
|
1095
|
+
function f(y) {
|
|
1096
|
+
return unescape(encodeURIComponent(y)).length;
|
|
1098
1097
|
}
|
|
1099
|
-
function g(
|
|
1100
|
-
const
|
|
1098
|
+
function g(y, d, c) {
|
|
1099
|
+
const p = [];
|
|
1101
1100
|
let _;
|
|
1102
|
-
for (; (_ =
|
|
1103
|
-
|
|
1101
|
+
for (; (_ = y.exec(c)) !== null; )
|
|
1102
|
+
p.push({
|
|
1104
1103
|
data: _[0],
|
|
1105
1104
|
index: _.index,
|
|
1106
|
-
mode:
|
|
1105
|
+
mode: d,
|
|
1107
1106
|
length: _[0].length
|
|
1108
1107
|
});
|
|
1109
|
-
return
|
|
1108
|
+
return p;
|
|
1110
1109
|
}
|
|
1111
|
-
function B(
|
|
1112
|
-
const
|
|
1113
|
-
let
|
|
1114
|
-
return s.isKanjiModeEnabled() ? (
|
|
1110
|
+
function B(y) {
|
|
1111
|
+
const d = g(a.NUMERIC, e.NUMERIC, y), c = g(a.ALPHANUMERIC, e.ALPHANUMERIC, y);
|
|
1112
|
+
let p, _;
|
|
1113
|
+
return s.isKanjiModeEnabled() ? (p = g(a.BYTE, e.BYTE, y), _ = g(a.KANJI, e.KANJI, y)) : (p = g(a.BYTE_KANJI, e.BYTE, y), _ = []), d.concat(c, p, _).sort(function(A, T) {
|
|
1115
1114
|
return A.index - T.index;
|
|
1116
1115
|
}).map(function(A) {
|
|
1117
1116
|
return {
|
|
@@ -1121,110 +1120,110 @@ var Ot = st.exports;
|
|
|
1121
1120
|
};
|
|
1122
1121
|
});
|
|
1123
1122
|
}
|
|
1124
|
-
function h(
|
|
1125
|
-
switch (
|
|
1123
|
+
function h(y, d) {
|
|
1124
|
+
switch (d) {
|
|
1126
1125
|
case e.NUMERIC:
|
|
1127
|
-
return i.getBitsLength(
|
|
1126
|
+
return i.getBitsLength(y);
|
|
1128
1127
|
case e.ALPHANUMERIC:
|
|
1129
|
-
return r.getBitsLength(
|
|
1128
|
+
return r.getBitsLength(y);
|
|
1130
1129
|
case e.KANJI:
|
|
1131
|
-
return n.getBitsLength(
|
|
1130
|
+
return n.getBitsLength(y);
|
|
1132
1131
|
case e.BYTE:
|
|
1133
|
-
return o.getBitsLength(
|
|
1132
|
+
return o.getBitsLength(y);
|
|
1134
1133
|
}
|
|
1135
1134
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
1138
|
-
const
|
|
1139
|
-
return
|
|
1135
|
+
function u(y) {
|
|
1136
|
+
return y.reduce(function(d, c) {
|
|
1137
|
+
const p = d.length - 1 >= 0 ? d[d.length - 1] : null;
|
|
1138
|
+
return p && p.mode === c.mode ? (d[d.length - 1].data += c.data, d) : (d.push(c), d);
|
|
1140
1139
|
}, []);
|
|
1141
1140
|
}
|
|
1142
|
-
function y
|
|
1143
|
-
const
|
|
1144
|
-
for (let
|
|
1145
|
-
const
|
|
1146
|
-
switch (
|
|
1141
|
+
function w(y) {
|
|
1142
|
+
const d = [];
|
|
1143
|
+
for (let c = 0; c < y.length; c++) {
|
|
1144
|
+
const p = y[c];
|
|
1145
|
+
switch (p.mode) {
|
|
1147
1146
|
case e.NUMERIC:
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
{ data:
|
|
1151
|
-
{ data:
|
|
1147
|
+
d.push([
|
|
1148
|
+
p,
|
|
1149
|
+
{ data: p.data, mode: e.ALPHANUMERIC, length: p.length },
|
|
1150
|
+
{ data: p.data, mode: e.BYTE, length: p.length }
|
|
1152
1151
|
]);
|
|
1153
1152
|
break;
|
|
1154
1153
|
case e.ALPHANUMERIC:
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
{ data:
|
|
1154
|
+
d.push([
|
|
1155
|
+
p,
|
|
1156
|
+
{ data: p.data, mode: e.BYTE, length: p.length }
|
|
1158
1157
|
]);
|
|
1159
1158
|
break;
|
|
1160
1159
|
case e.KANJI:
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
{ data:
|
|
1160
|
+
d.push([
|
|
1161
|
+
p,
|
|
1162
|
+
{ data: p.data, mode: e.BYTE, length: f(p.data) }
|
|
1164
1163
|
]);
|
|
1165
1164
|
break;
|
|
1166
1165
|
case e.BYTE:
|
|
1167
|
-
|
|
1168
|
-
{ data:
|
|
1166
|
+
d.push([
|
|
1167
|
+
{ data: p.data, mode: e.BYTE, length: f(p.data) }
|
|
1169
1168
|
]);
|
|
1170
1169
|
}
|
|
1171
1170
|
}
|
|
1172
|
-
return
|
|
1171
|
+
return d;
|
|
1173
1172
|
}
|
|
1174
|
-
function v(
|
|
1175
|
-
const
|
|
1173
|
+
function v(y, d) {
|
|
1174
|
+
const c = {}, p = { start: {} };
|
|
1176
1175
|
let _ = ["start"];
|
|
1177
|
-
for (let E = 0; E <
|
|
1178
|
-
const A =
|
|
1179
|
-
for (let
|
|
1180
|
-
const N = A[
|
|
1181
|
-
T.push(
|
|
1182
|
-
for (let
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1176
|
+
for (let E = 0; E < y.length; E++) {
|
|
1177
|
+
const A = y[E], T = [];
|
|
1178
|
+
for (let P = 0; P < A.length; P++) {
|
|
1179
|
+
const N = A[P], R = "" + E + P;
|
|
1180
|
+
T.push(R), c[R] = { node: N, lastCount: 0 }, p[R] = {};
|
|
1181
|
+
for (let H = 0; H < _.length; H++) {
|
|
1182
|
+
const C = _[H];
|
|
1183
|
+
c[C] && c[C].node.mode === N.mode ? (p[C][R] = h(c[C].lastCount + N.length, N.mode) - h(c[C].lastCount, N.mode), c[C].lastCount += N.length) : (c[C] && (c[C].lastCount = N.length), p[C][R] = h(N.length, N.mode) + 4 + e.getCharCountIndicator(N.mode, d));
|
|
1185
1184
|
}
|
|
1186
1185
|
}
|
|
1187
1186
|
_ = T;
|
|
1188
1187
|
}
|
|
1189
1188
|
for (let E = 0; E < _.length; E++)
|
|
1190
|
-
|
|
1191
|
-
return { map:
|
|
1189
|
+
p[_[E]].end = 0;
|
|
1190
|
+
return { map: p, table: c };
|
|
1192
1191
|
}
|
|
1193
|
-
function S(
|
|
1194
|
-
let
|
|
1195
|
-
const
|
|
1196
|
-
if (
|
|
1197
|
-
throw new Error('"' +
|
|
1198
|
-
Suggested mode is: ` + e.toString(
|
|
1199
|
-
switch (
|
|
1192
|
+
function S(y, d) {
|
|
1193
|
+
let c;
|
|
1194
|
+
const p = e.getBestModeForData(y);
|
|
1195
|
+
if (c = e.from(d, p), c !== e.BYTE && c.bit < p.bit)
|
|
1196
|
+
throw new Error('"' + y + '" cannot be encoded with mode ' + e.toString(c) + `.
|
|
1197
|
+
Suggested mode is: ` + e.toString(p));
|
|
1198
|
+
switch (c === e.KANJI && !s.isKanjiModeEnabled() && (c = e.BYTE), c) {
|
|
1200
1199
|
case e.NUMERIC:
|
|
1201
|
-
return new i(
|
|
1200
|
+
return new i(y);
|
|
1202
1201
|
case e.ALPHANUMERIC:
|
|
1203
|
-
return new r(
|
|
1202
|
+
return new r(y);
|
|
1204
1203
|
case e.KANJI:
|
|
1205
|
-
return new n(
|
|
1204
|
+
return new n(y);
|
|
1206
1205
|
case e.BYTE:
|
|
1207
|
-
return new o(
|
|
1206
|
+
return new o(y);
|
|
1208
1207
|
}
|
|
1209
1208
|
}
|
|
1210
|
-
t.fromArray = function(
|
|
1211
|
-
return
|
|
1212
|
-
return typeof
|
|
1209
|
+
t.fromArray = function(d) {
|
|
1210
|
+
return d.reduce(function(c, p) {
|
|
1211
|
+
return typeof p == "string" ? c.push(S(p, null)) : p.data && c.push(S(p.data, p.mode)), c;
|
|
1213
1212
|
}, []);
|
|
1214
|
-
}, t.fromString = function(
|
|
1215
|
-
const
|
|
1216
|
-
for (let
|
|
1217
|
-
T.push(E.table[A[
|
|
1218
|
-
return t.fromArray(
|
|
1219
|
-
}, t.rawSplit = function(
|
|
1213
|
+
}, t.fromString = function(d, c) {
|
|
1214
|
+
const p = B(d, s.isKanjiModeEnabled()), _ = w(p), E = v(_, c), A = l.find_path(E.map, "start", "end"), T = [];
|
|
1215
|
+
for (let P = 1; P < A.length - 1; P++)
|
|
1216
|
+
T.push(E.table[A[P]].node);
|
|
1217
|
+
return t.fromArray(u(T));
|
|
1218
|
+
}, t.rawSplit = function(d) {
|
|
1220
1219
|
return t.fromArray(
|
|
1221
|
-
B(
|
|
1220
|
+
B(d, s.isKanjiModeEnabled())
|
|
1222
1221
|
);
|
|
1223
1222
|
};
|
|
1224
|
-
})(
|
|
1225
|
-
const
|
|
1226
|
-
function
|
|
1227
|
-
const i = t.size, r =
|
|
1223
|
+
})(Ze);
|
|
1224
|
+
const de = I, he = le, Vt = pt, xt = yt, $t = Oe, zt = Ye, Ce = je, _e = ce, Ht = bt, ae = Ge, Kt = Xe, Ot = $, me = Ze;
|
|
1225
|
+
function Yt(t, e) {
|
|
1226
|
+
const i = t.size, r = zt.getPositions(e);
|
|
1228
1227
|
for (let o = 0; o < r.length; o++) {
|
|
1229
1228
|
const n = r[o][0], a = r[o][1];
|
|
1230
1229
|
for (let s = -1; s <= 7; s++)
|
|
@@ -1233,15 +1232,15 @@ function Xt(t, e) {
|
|
|
1233
1232
|
a + l <= -1 || i <= a + l || (s >= 0 && s <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (s === 0 || s === 6) || s >= 2 && s <= 4 && l >= 2 && l <= 4 ? t.set(n + s, a + l, !0, !0) : t.set(n + s, a + l, !1, !0));
|
|
1234
1233
|
}
|
|
1235
1234
|
}
|
|
1236
|
-
function
|
|
1235
|
+
function jt(t) {
|
|
1237
1236
|
const e = t.size;
|
|
1238
1237
|
for (let i = 8; i < e - 8; i++) {
|
|
1239
1238
|
const r = i % 2 === 0;
|
|
1240
1239
|
t.set(i, 6, r, !0), t.set(6, i, r, !0);
|
|
1241
1240
|
}
|
|
1242
1241
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const i =
|
|
1242
|
+
function Jt(t, e) {
|
|
1243
|
+
const i = $t.getPositions(e);
|
|
1245
1244
|
for (let r = 0; r < i.length; r++) {
|
|
1246
1245
|
const o = i[r][0], n = i[r][1];
|
|
1247
1246
|
for (let a = -2; a <= 2; a++)
|
|
@@ -1249,28 +1248,28 @@ function en(t, e) {
|
|
|
1249
1248
|
a === -2 || a === 2 || s === -2 || s === 2 || a === 0 && s === 0 ? t.set(o + a, n + s, !0, !0) : t.set(o + a, n + s, !1, !0);
|
|
1250
1249
|
}
|
|
1251
1250
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const i = t.size, r =
|
|
1251
|
+
function qt(t, e) {
|
|
1252
|
+
const i = t.size, r = ae.getEncodedBits(e);
|
|
1254
1253
|
let o, n, a;
|
|
1255
1254
|
for (let s = 0; s < 18; s++)
|
|
1256
1255
|
o = Math.floor(s / 3), n = s % 3 + i - 8 - 3, a = (r >> s & 1) === 1, t.set(o, n, a, !0), t.set(n, o, a, !0);
|
|
1257
1256
|
}
|
|
1258
|
-
function
|
|
1259
|
-
const r = t.size, o =
|
|
1257
|
+
function pe(t, e, i) {
|
|
1258
|
+
const r = t.size, o = Kt.getEncodedBits(e, i);
|
|
1260
1259
|
let n, a;
|
|
1261
1260
|
for (n = 0; n < 15; n++)
|
|
1262
1261
|
a = (o >> n & 1) === 1, n < 6 ? t.set(n, 8, a, !0) : n < 8 ? t.set(n + 1, 8, a, !0) : t.set(r - 15 + n, 8, a, !0), n < 8 ? t.set(8, r - n - 1, a, !0) : n < 9 ? t.set(8, 15 - n - 1 + 1, a, !0) : t.set(8, 15 - n - 1, a, !0);
|
|
1263
1262
|
t.set(r - 8, 8, 1, !0);
|
|
1264
1263
|
}
|
|
1265
|
-
function
|
|
1264
|
+
function Gt(t, e) {
|
|
1266
1265
|
const i = t.size;
|
|
1267
1266
|
let r = -1, o = i - 1, n = 7, a = 0;
|
|
1268
1267
|
for (let s = i - 1; s > 0; s -= 2)
|
|
1269
1268
|
for (s === 6 && s--; ; ) {
|
|
1270
1269
|
for (let l = 0; l < 2; l++)
|
|
1271
1270
|
if (!t.isReserved(o, s - l)) {
|
|
1272
|
-
let
|
|
1273
|
-
a < e.length && (
|
|
1271
|
+
let f = !1;
|
|
1272
|
+
a < e.length && (f = (e[a] >>> n & 1) === 1), t.set(o, s - l, f), n--, n === -1 && (a++, n = 7);
|
|
1274
1273
|
}
|
|
1275
1274
|
if (o += r, o < 0 || i <= o) {
|
|
1276
1275
|
o -= r, r = -r;
|
|
@@ -1278,53 +1277,53 @@ function nn(t, e) {
|
|
|
1278
1277
|
}
|
|
1279
1278
|
}
|
|
1280
1279
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const r = new
|
|
1280
|
+
function Qt(t, e, i) {
|
|
1281
|
+
const r = new Vt();
|
|
1283
1282
|
i.forEach(function(l) {
|
|
1284
|
-
r.put(l.mode.bit, 4), r.put(l.getLength(),
|
|
1283
|
+
r.put(l.mode.bit, 4), r.put(l.getLength(), Ot.getCharCountIndicator(l.mode, t)), l.write(r);
|
|
1285
1284
|
});
|
|
1286
|
-
const o =
|
|
1285
|
+
const o = de.getSymbolTotalCodewords(t), n = _e.getTotalCodewordsCount(t, e), a = (o - n) * 8;
|
|
1287
1286
|
for (r.getLengthInBits() + 4 <= a && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
|
|
1288
1287
|
r.putBit(0);
|
|
1289
1288
|
const s = (a - r.getLengthInBits()) / 8;
|
|
1290
1289
|
for (let l = 0; l < s; l++)
|
|
1291
1290
|
r.put(l % 2 ? 17 : 236, 8);
|
|
1292
|
-
return
|
|
1291
|
+
return Xt(r, t, e);
|
|
1293
1292
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const r =
|
|
1296
|
-
let
|
|
1293
|
+
function Xt(t, e, i) {
|
|
1294
|
+
const r = de.getSymbolTotalCodewords(e), o = _e.getTotalCodewordsCount(e, i), n = r - o, a = _e.getBlocksCount(e, i), s = r % a, l = a - s, f = Math.floor(r / a), g = Math.floor(n / a), B = g + 1, h = f - g, u = new Ht(h);
|
|
1295
|
+
let w = 0;
|
|
1297
1296
|
const v = new Array(a), S = new Array(a);
|
|
1298
|
-
let
|
|
1299
|
-
const
|
|
1297
|
+
let y = 0;
|
|
1298
|
+
const d = new Uint8Array(t.buffer);
|
|
1300
1299
|
for (let A = 0; A < a; A++) {
|
|
1301
1300
|
const T = A < l ? g : B;
|
|
1302
|
-
v[A] =
|
|
1301
|
+
v[A] = d.slice(w, w + T), S[A] = u.encode(v[A]), w += T, y = Math.max(y, T);
|
|
1303
1302
|
}
|
|
1304
|
-
const
|
|
1305
|
-
let
|
|
1306
|
-
for (_ = 0; _ <
|
|
1303
|
+
const c = new Uint8Array(r);
|
|
1304
|
+
let p = 0, _, E;
|
|
1305
|
+
for (_ = 0; _ < y; _++)
|
|
1307
1306
|
for (E = 0; E < a; E++)
|
|
1308
|
-
_ < v[E].length && (
|
|
1307
|
+
_ < v[E].length && (c[p++] = v[E][_]);
|
|
1309
1308
|
for (_ = 0; _ < h; _++)
|
|
1310
1309
|
for (E = 0; E < a; E++)
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1310
|
+
c[p++] = S[E][_];
|
|
1311
|
+
return c;
|
|
1313
1312
|
}
|
|
1314
|
-
function
|
|
1313
|
+
function Wt(t, e, i, r) {
|
|
1315
1314
|
let o;
|
|
1316
1315
|
if (Array.isArray(t))
|
|
1317
|
-
o =
|
|
1316
|
+
o = me.fromArray(t);
|
|
1318
1317
|
else if (typeof t == "string") {
|
|
1319
|
-
let
|
|
1320
|
-
if (!
|
|
1321
|
-
const g =
|
|
1322
|
-
|
|
1318
|
+
let f = e;
|
|
1319
|
+
if (!f) {
|
|
1320
|
+
const g = me.rawSplit(t);
|
|
1321
|
+
f = ae.getBestVersionForData(g, i);
|
|
1323
1322
|
}
|
|
1324
|
-
o =
|
|
1323
|
+
o = me.fromString(t, f || 40);
|
|
1325
1324
|
} else
|
|
1326
1325
|
throw new Error("Invalid data");
|
|
1327
|
-
const n =
|
|
1326
|
+
const n = ae.getBestVersionForData(o, i);
|
|
1328
1327
|
if (!n)
|
|
1329
1328
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1330
1329
|
if (!e)
|
|
@@ -1336,11 +1335,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1336
1335
|
Minimum version required to store current data is: ` + n + `.
|
|
1337
1336
|
`
|
|
1338
1337
|
);
|
|
1339
|
-
const a =
|
|
1340
|
-
return
|
|
1338
|
+
const a = Qt(e, i, o), s = de.getSymbolSize(e), l = new xt(s);
|
|
1339
|
+
return Yt(l, e), jt(l), Jt(l, e), pe(l, i, 0), e >= 7 && qt(l, e), Gt(l, a), isNaN(r) && (r = Ce.getBestMask(
|
|
1341
1340
|
l,
|
|
1342
|
-
|
|
1343
|
-
)),
|
|
1341
|
+
pe.bind(null, l, i)
|
|
1342
|
+
)), Ce.applyMask(r, l), pe(l, i, r), {
|
|
1344
1343
|
modules: l,
|
|
1345
1344
|
version: e,
|
|
1346
1345
|
errorCorrectionLevel: i,
|
|
@@ -1348,13 +1347,13 @@ Minimum version required to store current data is: ` + n + `.
|
|
|
1348
1347
|
segments: o
|
|
1349
1348
|
};
|
|
1350
1349
|
}
|
|
1351
|
-
|
|
1350
|
+
He.create = function(e, i) {
|
|
1352
1351
|
if (typeof e > "u" || e === "")
|
|
1353
1352
|
throw new Error("No input text");
|
|
1354
1353
|
let r = he.M, o, n;
|
|
1355
|
-
return typeof i < "u" && (r = he.from(i.errorCorrectionLevel, he.M), o =
|
|
1354
|
+
return typeof i < "u" && (r = he.from(i.errorCorrectionLevel, he.M), o = ae.from(i.version), n = Ce.from(i.maskPattern), i.toSJISFunc && de.setToSJISFunction(i.toSJISFunc)), Wt(e, o, r, n);
|
|
1356
1355
|
};
|
|
1357
|
-
var
|
|
1356
|
+
var tt = {}, Se = {};
|
|
1358
1357
|
(function(t) {
|
|
1359
1358
|
function e(i) {
|
|
1360
1359
|
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
@@ -1394,20 +1393,20 @@ var at = {}, Te = {};
|
|
|
1394
1393
|
const n = t.getScale(r, o);
|
|
1395
1394
|
return Math.floor((r + o.margin * 2) * n);
|
|
1396
1395
|
}, t.qrToImageData = function(r, o, n) {
|
|
1397
|
-
const a = o.modules.size, s = o.modules.data, l = t.getScale(a, n),
|
|
1398
|
-
for (let h = 0; h <
|
|
1399
|
-
for (let
|
|
1400
|
-
let
|
|
1401
|
-
if (h >= g &&
|
|
1402
|
-
const S = Math.floor((h - g) / l),
|
|
1403
|
-
v = B[s[S * a +
|
|
1396
|
+
const a = o.modules.size, s = o.modules.data, l = t.getScale(a, n), f = Math.floor((a + n.margin * 2) * l), g = n.margin * l, B = [n.color.light, n.color.dark];
|
|
1397
|
+
for (let h = 0; h < f; h++)
|
|
1398
|
+
for (let u = 0; u < f; u++) {
|
|
1399
|
+
let w = (h * f + u) * 4, v = n.color.light;
|
|
1400
|
+
if (h >= g && u >= g && h < f - g && u < f - g) {
|
|
1401
|
+
const S = Math.floor((h - g) / l), y = Math.floor((u - g) / l);
|
|
1402
|
+
v = B[s[S * a + y] ? 1 : 0];
|
|
1404
1403
|
}
|
|
1405
|
-
r[
|
|
1404
|
+
r[w++] = v.r, r[w++] = v.g, r[w++] = v.b, r[w] = v.a;
|
|
1406
1405
|
}
|
|
1407
1406
|
};
|
|
1408
|
-
})(
|
|
1407
|
+
})(Se);
|
|
1409
1408
|
(function(t) {
|
|
1410
|
-
const e =
|
|
1409
|
+
const e = Se;
|
|
1411
1410
|
function i(o, n, a) {
|
|
1412
1411
|
o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = a, n.width = a, n.style.height = a + "px", n.style.width = a + "px";
|
|
1413
1412
|
}
|
|
@@ -1419,44 +1418,44 @@ var at = {}, Te = {};
|
|
|
1419
1418
|
}
|
|
1420
1419
|
}
|
|
1421
1420
|
t.render = function(n, a, s) {
|
|
1422
|
-
let l = s,
|
|
1423
|
-
typeof l > "u" && (!a || !a.getContext) && (l = a, a = void 0), a || (
|
|
1424
|
-
const g = e.getImageWidth(n.modules.size, l), B =
|
|
1425
|
-
return e.qrToImageData(h.data, n, l), i(B,
|
|
1421
|
+
let l = s, f = a;
|
|
1422
|
+
typeof l > "u" && (!a || !a.getContext) && (l = a, a = void 0), a || (f = r()), l = e.getOptions(l);
|
|
1423
|
+
const g = e.getImageWidth(n.modules.size, l), B = f.getContext("2d"), h = B.createImageData(g, g);
|
|
1424
|
+
return e.qrToImageData(h.data, n, l), i(B, f, g), B.putImageData(h, 0, 0), f;
|
|
1426
1425
|
}, t.renderToDataURL = function(n, a, s) {
|
|
1427
1426
|
let l = s;
|
|
1428
1427
|
typeof l > "u" && (!a || !a.getContext) && (l = a, a = void 0), l || (l = {});
|
|
1429
|
-
const
|
|
1430
|
-
return
|
|
1428
|
+
const f = t.render(n, a, l), g = l.type || "image/png", B = l.rendererOpts || {};
|
|
1429
|
+
return f.toDataURL(g, B.quality);
|
|
1431
1430
|
};
|
|
1432
|
-
})(
|
|
1433
|
-
var
|
|
1434
|
-
const
|
|
1435
|
-
function
|
|
1431
|
+
})(tt);
|
|
1432
|
+
var nt = {};
|
|
1433
|
+
const Zt = Se;
|
|
1434
|
+
function Fe(t, e) {
|
|
1436
1435
|
const i = t.a / 255, r = e + '="' + t.hex + '"';
|
|
1437
1436
|
return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
|
|
1438
1437
|
}
|
|
1439
|
-
function
|
|
1438
|
+
function ye(t, e, i) {
|
|
1440
1439
|
let r = t + e;
|
|
1441
1440
|
return typeof i < "u" && (r += " " + i), r;
|
|
1442
1441
|
}
|
|
1443
|
-
function
|
|
1442
|
+
function en(t, e, i) {
|
|
1444
1443
|
let r = "", o = 0, n = !1, a = 0;
|
|
1445
1444
|
for (let s = 0; s < t.length; s++) {
|
|
1446
|
-
const l = Math.floor(s % e),
|
|
1447
|
-
!l && !n && (n = !0), t[s] ? (a++, s > 0 && l > 0 && t[s - 1] || (r += n ?
|
|
1445
|
+
const l = Math.floor(s % e), f = Math.floor(s / e);
|
|
1446
|
+
!l && !n && (n = !0), t[s] ? (a++, s > 0 && l > 0 && t[s - 1] || (r += n ? ye("M", l + i, 0.5 + f + i) : ye("m", o, 0), o = 0, n = !1), l + 1 < e && t[s + 1] || (r += ye("h", a), a = 0)) : o++;
|
|
1448
1447
|
}
|
|
1449
1448
|
return r;
|
|
1450
1449
|
}
|
|
1451
|
-
|
|
1452
|
-
const o =
|
|
1450
|
+
nt.render = function(e, i, r) {
|
|
1451
|
+
const o = Zt.getOptions(i), n = e.modules.size, a = e.modules.data, s = n + o.margin * 2, l = o.color.light.a ? "<path " + Fe(o.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", f = "<path " + Fe(o.color.dark, "stroke") + ' d="' + en(a, n, o.margin) + '"/>', g = 'viewBox="0 0 ' + s + " " + s + '"', h = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + g + ' shape-rendering="crispEdges">' + l + f + `</svg>
|
|
1453
1452
|
`;
|
|
1454
1453
|
return typeof r == "function" && r(null, h), h;
|
|
1455
1454
|
};
|
|
1456
|
-
const
|
|
1457
|
-
function
|
|
1455
|
+
const tn = ht, Ee = He, ot = tt, nn = nt;
|
|
1456
|
+
function Te(t, e, i, r, o) {
|
|
1458
1457
|
const n = [].slice.call(arguments, 1), a = n.length, s = typeof n[a - 1] == "function";
|
|
1459
|
-
if (!s && !
|
|
1458
|
+
if (!s && !tn())
|
|
1460
1459
|
throw new Error("Callback required as last argument");
|
|
1461
1460
|
if (s) {
|
|
1462
1461
|
if (a < 2)
|
|
@@ -1465,31 +1464,31 @@ function Pe(t, e, i, r, o) {
|
|
|
1465
1464
|
} else {
|
|
1466
1465
|
if (a < 1)
|
|
1467
1466
|
throw new Error("Too few arguments provided");
|
|
1468
|
-
return a === 1 ? (i = e, e = r = void 0) : a === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(l,
|
|
1467
|
+
return a === 1 ? (i = e, e = r = void 0) : a === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(l, f) {
|
|
1469
1468
|
try {
|
|
1470
|
-
const g =
|
|
1469
|
+
const g = Ee.create(i, r);
|
|
1471
1470
|
l(t(g, e, r));
|
|
1472
1471
|
} catch (g) {
|
|
1473
|
-
|
|
1472
|
+
f(g);
|
|
1474
1473
|
}
|
|
1475
1474
|
});
|
|
1476
1475
|
}
|
|
1477
1476
|
try {
|
|
1478
|
-
const l =
|
|
1477
|
+
const l = Ee.create(i, r);
|
|
1479
1478
|
o(null, t(l, e, r));
|
|
1480
1479
|
} catch (l) {
|
|
1481
1480
|
o(l);
|
|
1482
1481
|
}
|
|
1483
1482
|
}
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
return
|
|
1483
|
+
Z.create = Ee.create;
|
|
1484
|
+
Z.toCanvas = Te.bind(null, ot.render);
|
|
1485
|
+
Z.toDataURL = Te.bind(null, ot.renderToDataURL);
|
|
1486
|
+
Z.toString = Te.bind(null, function(t, e, i) {
|
|
1487
|
+
return nn.render(t, i);
|
|
1489
1488
|
});
|
|
1490
|
-
async function
|
|
1489
|
+
async function on(t, e = 350) {
|
|
1491
1490
|
try {
|
|
1492
|
-
return await
|
|
1491
|
+
return await Z.toDataURL(t, {
|
|
1493
1492
|
width: e,
|
|
1494
1493
|
margin: 0
|
|
1495
1494
|
});
|
|
@@ -1497,63 +1496,63 @@ async function dn(t, e = 350) {
|
|
|
1497
1496
|
console.error(i);
|
|
1498
1497
|
}
|
|
1499
1498
|
}
|
|
1500
|
-
var
|
|
1501
|
-
const
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1504
|
-
], -1),
|
|
1499
|
+
var rn = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
1500
|
+
const sn = { class: "flex items-start" }, an = /* @__PURE__ */ b("div", null, [
|
|
1501
|
+
/* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1502
|
+
/* @__PURE__ */ b("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1503
|
+
], -1), ln = { class: "flex flex-col gap-16 mt-16" }, cn = ["src"], un = /* @__PURE__ */ Re({
|
|
1505
1504
|
__name: "LinkDeviceDialog",
|
|
1506
1505
|
setup(t) {
|
|
1507
|
-
const e =
|
|
1508
|
-
var h,
|
|
1509
|
-
return `https://${(h = l.value) != null && h.url ? l.value.url : (
|
|
1506
|
+
const e = be(), i = ze(), r = Ve(), o = z(), n = z(), a = rn.crmUrl, s = z(), l = ie(() => i.membership), f = ie(() => {
|
|
1507
|
+
var h, u;
|
|
1508
|
+
return `https://${(h = l.value) != null && h.url ? l.value.url : (u = l.value) == null ? void 0 : u.business}.${a}`;
|
|
1510
1509
|
});
|
|
1511
1510
|
async function g(h) {
|
|
1512
|
-
const
|
|
1513
|
-
return `${
|
|
1511
|
+
const u = await $e.getOtp(h);
|
|
1512
|
+
return `${f.value}?link-device=${u.otp}`;
|
|
1514
1513
|
}
|
|
1515
1514
|
async function B(h) {
|
|
1516
|
-
const
|
|
1517
|
-
s.value =
|
|
1515
|
+
const u = await g(h);
|
|
1516
|
+
s.value = u, o.value = await on(u);
|
|
1518
1517
|
}
|
|
1519
|
-
return
|
|
1518
|
+
return De(async () => {
|
|
1520
1519
|
if (await e.readLocations(), !e.locations.length) {
|
|
1521
1520
|
r.close();
|
|
1522
1521
|
return;
|
|
1523
1522
|
}
|
|
1524
1523
|
const h = e.locations[0]._id;
|
|
1525
1524
|
n.value = h, await B(h);
|
|
1526
|
-
}), (h,
|
|
1527
|
-
const
|
|
1528
|
-
return V(),
|
|
1529
|
-
default:
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
M(
|
|
1525
|
+
}), (h, u) => {
|
|
1526
|
+
const w = U("FmIcon"), v = U("FmSelect"), S = U("FmButton"), y = U("FmCard");
|
|
1527
|
+
return V(), we(y, { class: "p-24 max-w-[350px]" }, {
|
|
1528
|
+
default: G(() => [
|
|
1529
|
+
b("div", sn, [
|
|
1530
|
+
an,
|
|
1531
|
+
M(w, {
|
|
1533
1532
|
name: "close",
|
|
1534
|
-
onClick:
|
|
1533
|
+
onClick: u[0] || (u[0] = (d) => m(r).close()),
|
|
1535
1534
|
class: "cursor-pointer"
|
|
1536
1535
|
})
|
|
1537
1536
|
]),
|
|
1538
|
-
|
|
1537
|
+
b("div", ln, [
|
|
1539
1538
|
M(v, {
|
|
1540
|
-
modelValue:
|
|
1539
|
+
modelValue: m(n),
|
|
1541
1540
|
"onUpdate:modelValue": [
|
|
1542
|
-
|
|
1541
|
+
u[1] || (u[1] = (d) => ke(n) ? n.value = d : null),
|
|
1543
1542
|
B
|
|
1544
1543
|
],
|
|
1545
1544
|
label: "Select Location",
|
|
1546
|
-
items:
|
|
1545
|
+
items: m(e).locationItems.filter((d) => !!d.value)
|
|
1547
1546
|
}, null, 8, ["modelValue", "items"]),
|
|
1548
|
-
|
|
1549
|
-
src:
|
|
1547
|
+
b("img", {
|
|
1548
|
+
src: m(o),
|
|
1550
1549
|
class: "aspect-square w-full"
|
|
1551
|
-
}, null, 8,
|
|
1550
|
+
}, null, 8, cn),
|
|
1552
1551
|
M(S, {
|
|
1553
1552
|
class: "mx-auto",
|
|
1554
1553
|
variant: "plain",
|
|
1555
1554
|
icon: "content_copy",
|
|
1556
|
-
onClick:
|
|
1555
|
+
onClick: u[2] || (u[2] = (d) => m(xe)(m(s)))
|
|
1557
1556
|
})
|
|
1558
1557
|
])
|
|
1559
1558
|
]),
|
|
@@ -1562,41 +1561,41 @@ const mn = { class: "flex items-start" }, gn = /* @__PURE__ */ w("div", null, [
|
|
|
1562
1561
|
};
|
|
1563
1562
|
}
|
|
1564
1563
|
});
|
|
1565
|
-
var
|
|
1566
|
-
const
|
|
1564
|
+
var dn = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
1565
|
+
const fn = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, gn = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-md-800" }, "Setting", -1), hn = {
|
|
1567
1566
|
key: 0,
|
|
1568
1567
|
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
1569
|
-
},
|
|
1570
|
-
/* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
-
], -1),
|
|
1568
|
+
}, mn = { class: "col-span-2 flex flex-col xs:col-span-3" }, pn = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "Basic Information", -1), yn = { class: "space-y-24" }, wn = { class: "space-y-8" }, bn = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "Counter App", -1), vn = { class: "fm-typo-body-lg-400" }, Cn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, _n = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, En = { class: "space-y-8" }, Bn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, An = { class: "space-y-8" }, Mn = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1), Sn = { class: "space-y-8" }, Tn = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, [
|
|
1569
|
+
/* @__PURE__ */ Q(" Free Credit as Discount "),
|
|
1570
|
+
/* @__PURE__ */ b("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1571
|
+
], -1), In = { class: "space-y-8" }, Pn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Nn = { class: "space-y-8" }, Ln = /* @__PURE__ */ b("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1), Un = { class: "flex justify-end pb-24" }, Fn = { class: "col-span-1 space-y-8 xs:hidden" }, Rn = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1), Dn = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1), kn = { class: "fm-typo-en-body-lg-600" }, Vn = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1), xn = { class: "fm-typo-en-body-lg-600" }, $n = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1), zn = { class: "fm-typo-en-body-lg-600" }, Hn = /* @__PURE__ */ b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1), Kn = { class: "fm-typo-en-body-lg-600" }, oo = /* @__PURE__ */ Re({
|
|
1573
1572
|
__name: "Setting",
|
|
1574
1573
|
setup(t) {
|
|
1575
|
-
const e =
|
|
1576
|
-
(
|
|
1577
|
-
(
|
|
1578
|
-
],
|
|
1579
|
-
var
|
|
1580
|
-
return `https://${(
|
|
1581
|
-
}),
|
|
1582
|
-
var
|
|
1583
|
-
return Math.min((((c = (
|
|
1574
|
+
const e = at(), i = be(), r = ze(), { global: o, minor: n } = it, a = Ve(), s = z(), l = z(!1), f = [
|
|
1575
|
+
(d) => !d || d.length >= 6 || "Invalid URL format, please enter at least 6 characters",
|
|
1576
|
+
(d) => !d || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(d) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
|
|
1577
|
+
], g = dn.appUrl, B = ie(() => {
|
|
1578
|
+
var d;
|
|
1579
|
+
return `https://${(d = s.value) == null ? void 0 : d.business}.${g}`;
|
|
1580
|
+
}), h = z(), u = z([]), w = ie(() => {
|
|
1581
|
+
var d, c;
|
|
1582
|
+
return Math.min((((c = (d = s.value) == null ? void 0 : d.advertisements) == null ? void 0 : c.length) ?? 0) + 1, 5);
|
|
1584
1583
|
});
|
|
1585
|
-
async function
|
|
1584
|
+
async function v() {
|
|
1586
1585
|
a.open({
|
|
1587
1586
|
title: "",
|
|
1588
|
-
dialogComponent:
|
|
1587
|
+
dialogComponent: un,
|
|
1589
1588
|
closeButton: !1
|
|
1590
1589
|
});
|
|
1591
1590
|
}
|
|
1592
|
-
async function
|
|
1593
|
-
await
|
|
1591
|
+
async function S(d) {
|
|
1592
|
+
await st.remove(
|
|
1594
1593
|
"Are you sure you want to unlink this device?",
|
|
1595
1594
|
"Unlink device",
|
|
1596
1595
|
"Unlink"
|
|
1597
1596
|
) && await n(
|
|
1598
1597
|
async () => {
|
|
1599
|
-
await
|
|
1598
|
+
await $e.unregisterDevice(d), await i.readLocationDevices();
|
|
1600
1599
|
},
|
|
1601
1600
|
{
|
|
1602
1601
|
message: "Unlinking device",
|
|
@@ -1604,26 +1603,26 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1604
1603
|
}
|
|
1605
1604
|
);
|
|
1606
1605
|
}
|
|
1607
|
-
async function
|
|
1606
|
+
async function y() {
|
|
1608
1607
|
await n(
|
|
1609
1608
|
async () => {
|
|
1610
|
-
var
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1613
|
-
const c =
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1609
|
+
var p;
|
|
1610
|
+
const d = gt(s.value);
|
|
1611
|
+
d.welcomeMessage && !((p = d.welcomeMessage) != null && p.content) && (d.welcomeMessage.content = "Hi there, you have been invited to join our membership");
|
|
1612
|
+
const c = lt.parse(d);
|
|
1613
|
+
h.value === null && c.image ? await K.delete(K.coverImagePath()) : h.value && (c.image = await K.update(
|
|
1614
|
+
K.coverImagePath(),
|
|
1615
|
+
h.value
|
|
1617
1616
|
)), l.value ? c.advertisements = (await Promise.all(
|
|
1618
|
-
new Array(
|
|
1619
|
-
var
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
) : (
|
|
1617
|
+
new Array(w.value - 1).fill(null).map(async (_, E) => {
|
|
1618
|
+
var T;
|
|
1619
|
+
const A = u.value[E];
|
|
1620
|
+
return A ? await K.update(
|
|
1621
|
+
K.advertisementPath(E, A),
|
|
1622
|
+
A
|
|
1623
|
+
) : (T = c.advertisements) == null ? void 0 : T[E];
|
|
1625
1624
|
})
|
|
1626
|
-
)).filter((
|
|
1625
|
+
)).filter((_) => _) : c.advertisements = [], await dt.update(c), await r.readMembership(), s.value = r.membership;
|
|
1627
1626
|
},
|
|
1628
1627
|
{
|
|
1629
1628
|
message: "Updating membership",
|
|
@@ -1631,147 +1630,147 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1631
1630
|
}
|
|
1632
1631
|
);
|
|
1633
1632
|
}
|
|
1634
|
-
return
|
|
1633
|
+
return De(async () => {
|
|
1635
1634
|
await o(async () => {
|
|
1636
|
-
var
|
|
1637
|
-
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership, l.value = (((
|
|
1635
|
+
var d, c;
|
|
1636
|
+
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership, l.value = (((d = s.value.advertisements) == null ? void 0 : d.length) ?? 0) > 0, u.value = ((c = s.value.advertisements) == null ? void 0 : c.map(() => null)) ?? [];
|
|
1638
1637
|
});
|
|
1639
|
-
}), (
|
|
1640
|
-
var
|
|
1641
|
-
const
|
|
1642
|
-
return V(),
|
|
1643
|
-
M(
|
|
1638
|
+
}), (d, c) => {
|
|
1639
|
+
var R, H;
|
|
1640
|
+
const p = U("FmPageHead"), _ = U("FmButton"), E = U("FmTextField"), A = U("FmCard"), T = U("FmPill"), P = U("FmSwitch"), N = U("FmMenuDivider");
|
|
1641
|
+
return V(), q(fe, null, [
|
|
1642
|
+
M(p, {
|
|
1644
1643
|
title: "Setting",
|
|
1645
1644
|
class: "xs:hidden"
|
|
1646
1645
|
}),
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
M(
|
|
1646
|
+
b("div", fn, [
|
|
1647
|
+
gn,
|
|
1648
|
+
M(_, {
|
|
1650
1649
|
icon: "info",
|
|
1651
1650
|
variant: "tertiary"
|
|
1652
1651
|
})
|
|
1653
1652
|
]),
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
M(
|
|
1653
|
+
m(s) ? (V(), q("div", hn, [
|
|
1654
|
+
b("div", mn, [
|
|
1655
|
+
pn,
|
|
1656
|
+
b("div", yn, [
|
|
1657
|
+
M(E, {
|
|
1659
1658
|
label: "Membership title",
|
|
1660
|
-
modelValue:
|
|
1661
|
-
"onUpdate:modelValue": c[0] || (c[0] = (C) =>
|
|
1659
|
+
modelValue: m(s).name,
|
|
1660
|
+
"onUpdate:modelValue": c[0] || (c[0] = (C) => m(s).name = C)
|
|
1662
1661
|
}, null, 8, ["modelValue"]),
|
|
1663
|
-
M(
|
|
1662
|
+
M(E, {
|
|
1664
1663
|
disabled: !0,
|
|
1665
|
-
"model-value":
|
|
1666
|
-
rules:
|
|
1664
|
+
"model-value": m(s).business,
|
|
1665
|
+
rules: f,
|
|
1667
1666
|
required: !0,
|
|
1668
1667
|
label: "Member app URL",
|
|
1669
|
-
"helper-text":
|
|
1670
|
-
placeholder:
|
|
1671
|
-
"onUpdate:modelValue": c[2] || (c[2] = (C) =>
|
|
1668
|
+
"helper-text": m(B),
|
|
1669
|
+
placeholder: m(s).business.toString(),
|
|
1670
|
+
"onUpdate:modelValue": c[2] || (c[2] = (C) => m(s).url = C)
|
|
1672
1671
|
}, {
|
|
1673
|
-
prepend:
|
|
1674
|
-
|
|
1672
|
+
prepend: G(() => [
|
|
1673
|
+
Q(" https:// ")
|
|
1675
1674
|
]),
|
|
1676
|
-
append:
|
|
1677
|
-
|
|
1678
|
-
M(
|
|
1675
|
+
append: G(() => [
|
|
1676
|
+
Q(" ." + k(m(g)) + " ", 1),
|
|
1677
|
+
M(_, {
|
|
1679
1678
|
icon: "content_copy",
|
|
1680
1679
|
variant: "tertiary",
|
|
1681
|
-
onClick: c[1] || (c[1] = (C) =>
|
|
1680
|
+
onClick: c[1] || (c[1] = (C) => m(xe)(m(B)))
|
|
1682
1681
|
})
|
|
1683
1682
|
]),
|
|
1684
1683
|
_: 1
|
|
1685
1684
|
}, 8, ["model-value", "helper-text", "placeholder"]),
|
|
1686
|
-
M(
|
|
1685
|
+
M(Ne, {
|
|
1687
1686
|
label: "Cover image",
|
|
1688
1687
|
class: "w-2/3 xs:w-full",
|
|
1689
1688
|
"image-fit": "cover",
|
|
1690
1689
|
"aspect-ratio": "3/1",
|
|
1691
|
-
thumbnail:
|
|
1690
|
+
thumbnail: m(s).image || void 0,
|
|
1692
1691
|
"onUpdate:file": c[3] || (c[3] = async (C) => {
|
|
1693
|
-
|
|
1692
|
+
h.value = C, C || (m(s).image = null);
|
|
1694
1693
|
})
|
|
1695
1694
|
}, null, 8, ["thumbnail"]),
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
M(
|
|
1695
|
+
b("div", wn, [
|
|
1696
|
+
bn,
|
|
1697
|
+
M(_, {
|
|
1699
1698
|
variant: "plain",
|
|
1700
1699
|
icon: "link",
|
|
1701
1700
|
label: "Link Device",
|
|
1702
|
-
onClick:
|
|
1701
|
+
onClick: v
|
|
1703
1702
|
}),
|
|
1704
|
-
(V(!0),
|
|
1705
|
-
key:
|
|
1703
|
+
(V(!0), q(fe, null, Ie(m(i).locationDevices, (C, L) => (V(), we(A, {
|
|
1704
|
+
key: L,
|
|
1706
1705
|
variant: "outlined",
|
|
1707
1706
|
class: "flex items-center justify-between px-16 py-12"
|
|
1708
1707
|
}, {
|
|
1709
|
-
default:
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1708
|
+
default: G(() => [
|
|
1709
|
+
b("div", null, [
|
|
1710
|
+
b("p", vn, k(C.name || `Device ${C._id}`), 1),
|
|
1711
|
+
b("p", Cn, " Activation date: " + k(m(rt)(m(ft)(C._id.toString())).format(
|
|
1713
1712
|
"D MMM YYYY"
|
|
1714
1713
|
)), 1),
|
|
1715
|
-
|
|
1714
|
+
b("p", _n, " Linked location: " + k(m(i).locations.find((D) => D._id == C.location).name), 1)
|
|
1716
1715
|
]),
|
|
1717
|
-
M(
|
|
1716
|
+
M(_, {
|
|
1718
1717
|
icon: "link_off",
|
|
1719
1718
|
variant: "tertiary",
|
|
1720
|
-
onClick: (D) =>
|
|
1719
|
+
onClick: (D) => S(C._id)
|
|
1721
1720
|
}, null, 8, ["onClick"])
|
|
1722
1721
|
]),
|
|
1723
1722
|
_: 2
|
|
1724
1723
|
}, 1024))), 128))
|
|
1725
1724
|
]),
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
M(
|
|
1725
|
+
b("div", En, [
|
|
1726
|
+
b("div", Bn, [
|
|
1727
|
+
Q(" Advertisement "),
|
|
1728
|
+
M(T, { variant: "premium" })
|
|
1730
1729
|
]),
|
|
1731
|
-
M(
|
|
1732
|
-
modelValue:
|
|
1733
|
-
"onUpdate:modelValue": c[4] || (c[4] = (C) =>
|
|
1730
|
+
M(P, {
|
|
1731
|
+
modelValue: m(l),
|
|
1732
|
+
"onUpdate:modelValue": c[4] || (c[4] = (C) => ke(l) ? l.value = C : null),
|
|
1734
1733
|
label: "Advertisement",
|
|
1735
1734
|
sublabel: "This will be show on FeedMe ordering app",
|
|
1736
1735
|
"label-placement": "right",
|
|
1737
|
-
disabled: !
|
|
1736
|
+
disabled: !m(i).isPremium,
|
|
1738
1737
|
value: ""
|
|
1739
1738
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1740
|
-
|
|
1739
|
+
m(l) ? (V(), q("div", {
|
|
1741
1740
|
class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
|
|
1742
|
-
key:
|
|
1741
|
+
key: m(w)
|
|
1743
1742
|
}, [
|
|
1744
|
-
(V(!0),
|
|
1745
|
-
var D,
|
|
1746
|
-
return V(),
|
|
1743
|
+
(V(!0), q(fe, null, Ie(m(w), (C, L) => {
|
|
1744
|
+
var D, te;
|
|
1745
|
+
return V(), we(Ne, {
|
|
1747
1746
|
class: "w-[200px]",
|
|
1748
1747
|
"image-fit": "cover",
|
|
1749
1748
|
label: "",
|
|
1750
1749
|
"aspect-ratio": "2/3",
|
|
1751
|
-
thumbnail: (
|
|
1750
|
+
thumbnail: (te = (D = m(s)) == null ? void 0 : D.advertisements) == null ? void 0 : te[L],
|
|
1752
1751
|
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
1753
1752
|
"recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
|
|
1754
|
-
file: u
|
|
1755
|
-
"onUpdate:file": (
|
|
1756
|
-
|
|
1753
|
+
file: m(u)[L] ?? void 0,
|
|
1754
|
+
"onUpdate:file": (ne) => {
|
|
1755
|
+
m(s).advertisements || (m(s).advertisements = []), ne ? (m(s).advertisements[L] = "", m(u)[L] = ne) : (m(s).advertisements.splice(L, 1), m(u).splice(L, 1));
|
|
1757
1756
|
}
|
|
1758
1757
|
}, null, 8, ["thumbnail", "file", "onUpdate:file"]);
|
|
1759
1758
|
}), 256))
|
|
1760
|
-
])) :
|
|
1759
|
+
])) : Pe("", !0)
|
|
1761
1760
|
]),
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
M(
|
|
1765
|
-
"model-value": ((
|
|
1761
|
+
b("div", An, [
|
|
1762
|
+
Mn,
|
|
1763
|
+
M(E, {
|
|
1764
|
+
"model-value": ((R = m(s)) == null ? void 0 : R.brand) || "",
|
|
1766
1765
|
"max-length": 15,
|
|
1767
1766
|
label: "Brand Name",
|
|
1768
1767
|
"show-word-count": "",
|
|
1769
|
-
"helper-text": `RM 0 ${((
|
|
1770
|
-
"onUpdate:modelValue": c[5] || (c[5] = (C) =>
|
|
1768
|
+
"helper-text": `RM 0 ${((H = m(s)) == null ? void 0 : H.brand) || ""}: YOUR CUSTOMER MESSAGE`,
|
|
1769
|
+
"onUpdate:modelValue": c[5] || (c[5] = (C) => m(s).brand = C)
|
|
1771
1770
|
}, null, 8, ["model-value", "helper-text"]),
|
|
1772
|
-
M(
|
|
1773
|
-
modelValue:
|
|
1774
|
-
"onUpdate:modelValue": c[6] || (c[6] = (C) =>
|
|
1771
|
+
M(ut, {
|
|
1772
|
+
modelValue: m(s).welcomeMessage,
|
|
1773
|
+
"onUpdate:modelValue": c[6] || (c[6] = (C) => m(s).welcomeMessage = C),
|
|
1775
1774
|
variables: [
|
|
1776
1775
|
"user.name",
|
|
1777
1776
|
"user.gender",
|
|
@@ -1782,106 +1781,77 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1782
1781
|
placeholder: "Hi there, you have been invited to join membership"
|
|
1783
1782
|
}, null, 8, ["modelValue"])
|
|
1784
1783
|
]),
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
M(
|
|
1788
|
-
"model-value": (
|
|
1789
|
-
|
|
1790
|
-
"helper-text": "Will be shown as email of the sender (requires DNS configuration, Contact us to verify your domain.)",
|
|
1791
|
-
placeholder: "noreply@feedme.cc",
|
|
1792
|
-
disabled: "",
|
|
1793
|
-
"onUpdate:modelValue": c[7] || (c[7] = (C) => {
|
|
1794
|
-
var P;
|
|
1795
|
-
(P = u(s)) != null && P.email || (u(s).email = {
|
|
1796
|
-
from: C
|
|
1797
|
-
}), u(s).email.from = C || null;
|
|
1798
|
-
}),
|
|
1799
|
-
rules: [u(De).ruleAtPath(u(m), "email.from")]
|
|
1800
|
-
}, null, 8, ["model-value", "rules"]),
|
|
1801
|
-
M(A, {
|
|
1802
|
-
"model-value": ((Le = (Ue = u(s)) == null ? void 0 : Ue.email) == null ? void 0 : Le.name) || null,
|
|
1803
|
-
label: "Sender name",
|
|
1804
|
-
"helper-text": "Will be shown as the name of the sender",
|
|
1805
|
-
"onUpdate:modelValue": c[8] || (c[8] = (C) => {
|
|
1806
|
-
var P;
|
|
1807
|
-
(P = u(s)) != null && P.email || (u(s).email = {
|
|
1808
|
-
name: C
|
|
1809
|
-
}), u(s).email.name = C || null;
|
|
1810
|
-
}),
|
|
1811
|
-
rules: [u(De).ruleAtPath(u(m), "email.name")]
|
|
1812
|
-
}, null, 8, ["model-value", "rules"])
|
|
1813
|
-
]),
|
|
1814
|
-
w("div", Dn, [
|
|
1815
|
-
kn,
|
|
1816
|
-
M(N, {
|
|
1817
|
-
"model-value": u(s).freeCreditAsDiscount ?? !1,
|
|
1818
|
-
"onUpdate:modelValue": c[9] || (c[9] = (C) => u(s).freeCreditAsDiscount = C),
|
|
1784
|
+
b("div", Sn, [
|
|
1785
|
+
Tn,
|
|
1786
|
+
M(P, {
|
|
1787
|
+
"model-value": m(s).freeCreditAsDiscount ?? !1,
|
|
1788
|
+
"onUpdate:modelValue": c[7] || (c[7] = (C) => m(s).freeCreditAsDiscount = C),
|
|
1819
1789
|
label: "Free Credit as Discount",
|
|
1820
1790
|
sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
|
|
1821
1791
|
"label-placement": "right",
|
|
1822
1792
|
value: ""
|
|
1823
1793
|
}, null, 8, ["model-value"])
|
|
1824
1794
|
]),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
M(
|
|
1795
|
+
b("div", In, [
|
|
1796
|
+
b("div", Pn, [
|
|
1797
|
+
Q(" Member Card "),
|
|
1798
|
+
M(T, { variant: "premium" })
|
|
1829
1799
|
]),
|
|
1830
|
-
M(
|
|
1831
|
-
"model-value":
|
|
1832
|
-
"onUpdate:modelValue": c[
|
|
1800
|
+
M(P, {
|
|
1801
|
+
"model-value": m(s).cardEnable ?? !1,
|
|
1802
|
+
"onUpdate:modelValue": c[8] || (c[8] = (C) => m(s).cardEnable = C),
|
|
1833
1803
|
label: "",
|
|
1834
1804
|
sublabel: "Allow member to bind card via member app",
|
|
1835
1805
|
"label-placement": "right",
|
|
1836
1806
|
value: "",
|
|
1837
|
-
disabled: !
|
|
1807
|
+
disabled: !m(i).isPremium
|
|
1838
1808
|
}, null, 8, ["model-value", "disabled"])
|
|
1839
1809
|
]),
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
M(
|
|
1810
|
+
b("div", Nn, [
|
|
1811
|
+
Ln,
|
|
1812
|
+
M(ct, {
|
|
1843
1813
|
label: "Select restaurant",
|
|
1844
|
-
"model-value":
|
|
1845
|
-
"onUpdate:modelValue": c[
|
|
1814
|
+
"model-value": m(s).targetLocation ?? null,
|
|
1815
|
+
"onUpdate:modelValue": c[9] || (c[9] = (C) => m(s).targetLocation = C)
|
|
1846
1816
|
}, null, 8, ["model-value"])
|
|
1847
1817
|
]),
|
|
1848
|
-
|
|
1849
|
-
M(
|
|
1818
|
+
b("div", Un, [
|
|
1819
|
+
M(_, {
|
|
1850
1820
|
label: "Update",
|
|
1851
1821
|
type: "button",
|
|
1852
|
-
onClick:
|
|
1853
|
-
disabled: !!
|
|
1854
|
-
loading: !!
|
|
1822
|
+
onClick: y,
|
|
1823
|
+
disabled: !!m(e).loadingQueue.length,
|
|
1824
|
+
loading: !!m(e).loadingQueue.length
|
|
1855
1825
|
}, null, 8, ["disabled", "loading"])
|
|
1856
1826
|
])
|
|
1857
1827
|
])
|
|
1858
1828
|
]),
|
|
1859
|
-
|
|
1860
|
-
M(
|
|
1829
|
+
b("div", Fn, [
|
|
1830
|
+
M(A, {
|
|
1861
1831
|
variant: "outlined",
|
|
1862
1832
|
class: "flex flex-col p-24 gap-8"
|
|
1863
1833
|
}, {
|
|
1864
|
-
default:
|
|
1865
|
-
var C,
|
|
1834
|
+
default: G(() => {
|
|
1835
|
+
var C, L, D;
|
|
1866
1836
|
return [
|
|
1867
|
-
|
|
1868
|
-
M(
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1837
|
+
Rn,
|
|
1838
|
+
M(N, { class: "my-4" }),
|
|
1839
|
+
b("div", null, [
|
|
1840
|
+
Dn,
|
|
1841
|
+
b("div", kn, k(m(s).name), 1)
|
|
1872
1842
|
]),
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1843
|
+
b("div", null, [
|
|
1844
|
+
Vn,
|
|
1845
|
+
b("div", xn, k((((C = m(s).advertisements) == null ? void 0 : C.length) ?? 0) || "No advertisments"), 1)
|
|
1876
1846
|
]),
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1847
|
+
b("div", null, [
|
|
1848
|
+
$n,
|
|
1849
|
+
b("div", zn, k(m(s).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
|
|
1880
1850
|
]),
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
(
|
|
1851
|
+
b("div", null, [
|
|
1852
|
+
Hn,
|
|
1853
|
+
b("div", Kn, k(!m(s).targetLocation || m(s).targetLocation.length == m(be)().locations.length ? "All locations" : (D = (L = m(s)) == null ? void 0 : L.targetLocation) == null ? void 0 : D.map(
|
|
1854
|
+
(te) => m(i).locations.find((ne) => ne._id == te).name
|
|
1885
1855
|
).join(", ")), 1)
|
|
1886
1856
|
])
|
|
1887
1857
|
];
|
|
@@ -1889,11 +1859,11 @@ const bn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1889
1859
|
_: 1
|
|
1890
1860
|
})
|
|
1891
1861
|
])
|
|
1892
|
-
])) :
|
|
1862
|
+
])) : Pe("", !0)
|
|
1893
1863
|
], 64);
|
|
1894
1864
|
};
|
|
1895
1865
|
}
|
|
1896
1866
|
});
|
|
1897
1867
|
export {
|
|
1898
|
-
|
|
1868
|
+
oo as default
|
|
1899
1869
|
};
|